Increase SmallVector<> size in DiagnosticsEngine::setSeverityForGroup

In a Clang bootstrap, this vector always held 129 elements.

Also switch to a range-based for loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215360 91177308-0d34-0410-b5e6-96231b3b80d8
Increase the size of ToolChain::FilePaths

In a Clang bootstrap build, the size was always at least 9.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215362 91177308-0d34-0410-b5e6-96231b3b80d8
Coverage mapping: emit mapping for cxx constructors that use microsoft's ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215365 91177308-0d34-0410-b5e6-96231b3b80d8
GCC compatibility: Ignore -fexec-charset=UTF-8 argument. It is the default in Clang. Reject other values. 

Summary:
Just like with -finput-charset=UTF-8 in review http://reviews.llvm.org/D4347, I think we should just ignore it when UTF-8 is provided.


Reviewers: rnk, rafael

Reviewed By: rafael

Subscribers: rafael, cfe-commits

Differential Revision: http://reviews.llvm.org/D4841

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215368 91177308-0d34-0410-b5e6-96231b3b80d8
Increase the size of two SmallVectors in Generic_GCC::GCCInstallationDetector::init

In a bootstrap build of Clang, the size was always greater than 12.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215369 91177308-0d34-0410-b5e6-96231b3b80d8
ToolChains.cpp: Increase size of Lines vector in DetectDistro

In a Clang bootstrap, the size of this vector was always 11.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215370 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r215365 - Coverage mapping: emit mapping for cxx constructors that use microsoft's ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215371 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Properly perform lookup when acting on fields for desig inits

Clang used a custom implementation of lookup when handling designated
initializers.  The custom code was not particularly optimized and relied
on standard lookup for typo-correction anyway.

This custom code has to go, it doesn't properly support MSVC-style
anonymous structs embedded inside other records; replace it with the
typo-correction path.

This has the side effect of speeding up semantic handling of the fields
for a designated initializer while simplifying the code at the same
time.

This fixes PR20573.

Differential Revision: http://reviews.llvm.org/D4839

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215372 91177308-0d34-0410-b5e6-96231b3b80d8
Add some FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215375 91177308-0d34-0410-b5e6-96231b3b80d8
unique_ptr-ify the MemoryBuffer parameter of GlobalModuleIndex

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215376 91177308-0d34-0410-b5e6-96231b3b80d8
unique_ptr-ify FileSystemStatCache::setNextStatCache

And in the process, discover that FileManager::removeStatCache had a
double-delete when removing an element from the middle of the list (at
the beginning or the end of the list, there was no problem) and add a
unit test to exercise the code path (which successfully crashed when run
(with modifications to match the old API) without this patch applied)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215388 91177308-0d34-0410-b5e6-96231b3b80d8
Change MemoryBuffer* to MemoryBuffer& parameter to Lexer::ComputePreamble

(dropping const from the reference as MemoryBuffer is immutable already,
so const is just redundant - and while I'd personally put const
everywhere, that's not the LLVM Way (see llvm::Type for another example
of an immutable type where "const" is omitted for brevity))

Changing the pointer argument to a reference parameter makes call sites
identical between callers with unique_ptrs or raw pointers, minimizing
the churn in a pending unique_ptr migrations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215391 91177308-0d34-0410-b5e6-96231b3b80d8
Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dump
anyway. If -ast-dump *is* also provided, then dump the AST declarations as well
as the lookup results. This is invaluable for cross-correlating the lookup
information with the declarations actually found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215393 91177308-0d34-0410-b5e6-96231b3b80d8
Reject varargs '...' in function prototype if there are more parameters after
it. Diagnose with recovery if it appears after a function parameter that was
obviously supposed to be a parameter pack. Otherwise, warn if it immediately
follows a function parameter pack, because the user most likely didn't intend
to write a parameter pack followed by a C-style varargs ellipsis.

This warning can be syntactically disabled by using ", ..." instead of "...".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215408 91177308-0d34-0410-b5e6-96231b3b80d8
Reject virt-specifiers on friend declarations. Give anonymous bitfields a
location so their diagnostics have somewhere to point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215416 91177308-0d34-0410-b5e6-96231b3b80d8
Debuginfo: Correctly tag variadic ObjC methods with DW_TAG_unspecified_parameter.

Fixes rdar://13690847

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215423 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly implement -include search logic.

According to the gcc docs, -include uses the current working directory
for the lookup instead of the main source file.

This patch gets rid of NormalizeIncludePath (which relied on an
implementation detail of FileManager / FileEntry for the include path
logic to work), and instead hands the correct lookup information down to
LookupFile.

This will allow us to change the FileEntry's behavior regarding its Name
caching.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215433 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Frontend/print-header-includes.c REQUIRES shell due to "cd".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215434 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Avoid bad line break.

Before:
  int
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(const
                                typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);

After:
  int aaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
      const typename aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215442 91177308-0d34-0410-b5e6-96231b3b80d8
Add documentation on how Language option in .clang-format files work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215443 91177308-0d34-0410-b5e6-96231b3b80d8