TableGen: Remove extraneous '\' at EOL in generated tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157700 91177308-0d34-0410-b5e6-96231b3b80d8
Disable -Wunique-enum for anonymous enums.

This is a large class of false positives where anonymous enums are used to
declare constants (see Clang's Diagnostics.h for example). A small number of
true positives could probably be found in this bucket by still warning if the
anonymous enum is used in a declarator (enum { ... } x;) but so far we don't
believe this to be a source of significant benefit so I haven't bothered to
preserve those cases.

General offline review/acknowledgment by rtrieu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157713 91177308-0d34-0410-b5e6-96231b3b80d8
Suggest '%@' for Objective-C objects in ObjC format strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157716 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test for '%@' suggestion for classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157718 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer]Fix another occurrence of iterator invalidation (LocalTUDecls)

Follow up in r155693, r155680.

Prevents a hard to reproduce crash with the following stack trace:
3  libsystem_c.dylib 0x00007ff55a835050 _sigtramp + 18446744029881443184
4  clang             0x0000000106218e97 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
+ 519
5  clang             0x0000000105cf3002 clang::ParseAST(clang::Sema&,
bool, bool) + 690
6  clang             0x00000001059a41d8
clang::ASTFrontendAction::ExecuteAction() + 312
7  clang             0x00000001059a3df7 clang::FrontendAction::Execute()
+ 231
8  clang             0x00000001059b0ecc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 860
9  clang             0x000000010595e451
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 961
10 clang             0x0000000105947f29 cc1_main(char const**, char
const**, char const*, void*) + 969
11 clang             0x0000000105958259 main + 473
12 clang             0x0000000105947b34 start + 52

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157721 91177308-0d34-0410-b5e6-96231b3b80d8
Change wording of 'memcpy' type mismatch warning and remove fixit.

As per comments following r157659.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157722 91177308-0d34-0410-b5e6-96231b3b80d8
Only visit default arguments for template declarations when visiting the template declaration which introduced them. Patch by Yang Chen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157723 91177308-0d34-0410-b5e6-96231b3b80d8
Add builtin for pclmulqdq instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157733 91177308-0d34-0410-b5e6-96231b3b80d8
Allow some BugReports to opt-out of PathDiagnostic callstack pruning until we have significantly
improved the pruning heuristics.  The current heuristics are pretty good, but they make diagnostics
for uninitialized variables warnings particularly useless in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157734 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an object lifetime issue in clang/Tooling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157759 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Cleanup for r157721.
We should lock the number of elements after the initial parsing is
complete. Recursive AST visitors in AnalyzesConsumer and CallGarph can
trigger lazy pch deserialization resulting in more calls to
HandleTopLevelDecl and appending to the LocalTUDecls list. We should
ignore those.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157762 91177308-0d34-0410-b5e6-96231b3b80d8
Updating the visualizers to include more datatypes.  Patch thanks to Jay Blanchard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157763 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix BugType memory leak in IdempotentOperationChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157772 91177308-0d34-0410-b5e6-96231b3b80d8
objc: properties of NSObject attribute must
have correct pointer type or issue error,
instead of crashing in IRGen. // rdar:// 11569860


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157780 91177308-0d34-0410-b5e6-96231b3b80d8
In TypoCorrectionConsumer, BestResults to CorrectionResults to lessen
the confusion among all of the uses of Best* in relation to the set of
possible typo correction results. Also add a method to return the set of
typo corrections that have the single best edit distance--it returns the
second half of the first pair in TypoEditDistanceMap (with
getBestEditDistance already returning the first half).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157781 91177308-0d34-0410-b5e6-96231b3b80d8
Anonymous union members within a struct are now properly handled as an unevaluated field in C++11 mode.  This fixes PR12866.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157784 91177308-0d34-0410-b5e6-96231b3b80d8
[arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer
when migrating.

rdar://11569198

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157785 91177308-0d34-0410-b5e6-96231b3b80d8
Support C++11 enum forward declarations.

Part of rdar://11570854

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157787 91177308-0d34-0410-b5e6-96231b3b80d8
Added a test for ToolInvocation::mapVirtualFile method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157812 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Fix SATestAdd to work with SATestBuild.

Also, eliminate global 'IsReferenceBuild' in SATestBuild. It doesn't get
passed around that much.

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