LLVM_ON_WIN32 case: use the proper key in the UniqueFiles map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160041 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Misc/diag-template-diffing-color.cpp: Introduce the feature 'ansi-escape-sequences'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160043 91177308-0d34-0410-b5e6-96231b3b80d8
How to set up clang tools for llvm

Summary: How to guide for setting up clang tooling for llvm repo.

Test Plan: this is untested

Reviewers: klimek, djasper

Reviewed By: klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160047 91177308-0d34-0410-b5e6-96231b3b80d8
Fix usage instructions for clang-check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160048 91177308-0d34-0410-b5e6-96231b3b80d8
Temporarily revert this to see if it brings the gdb bot back.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160049 91177308-0d34-0410-b5e6-96231b3b80d8
Fix handling of curly braces in NVPTX inline asm

Fixes bug 13322

Patch by Dmitry Mikushin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160050 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused override of CompilerInvocation::setLangDefaults().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160051 91177308-0d34-0410-b5e6-96231b3b80d8
Default to -std=c++11 on Windows.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160052 91177308-0d34-0410-b5e6-96231b3b80d8
Emit -verify diagnostics even when we have a fatal error.

Previously we'd halt at the fatal error as expected, but not actually emit
any -verify-related diagnostics. This lets us catch cases that emit a
/different/ fatal error from the one we expected.

This is implemented by adding a "force emit" mode to DiagnosticBuilder, which
will cause diagnostics to immediately be emitted regardless of current
suppression. Needless to say this should probably be used /very/ sparingly.

Patch by Andy Gibbs! Tests for all of Andy's -verify patches coming soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160053 91177308-0d34-0410-b5e6-96231b3b80d8
Mention -fms-compatibility and -fdelayed-template-parsing in UsersManual.

Also mention that -std=c++11 is now on by default on windows.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160054 91177308-0d34-0410-b5e6-96231b3b80d8
Handle #pragma visibility in explicit specializations and enums.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160057 91177308-0d34-0410-b5e6-96231b3b80d8
[driver] Fix so that clang can find correct path prefix for libc object files
from GNU binutils supporting multi-arch folder for ARM target.
Patch by Jiangning Liu <jiangning.liu@arm.com>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160060 91177308-0d34-0410-b5e6-96231b3b80d8
Add a hook to supply a custom CompilationDatabase. To add a custom CompilationDatabase, make it implement findCompilationDatabaseForDirectory in CustomCompilationDatabase.h and set USE_COSTUM_COMPILATION_DATABASE.

Differential Revision: http://llvm-reviews.chandlerc.com/D4

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160061 91177308-0d34-0410-b5e6-96231b3b80d8
Move CompileAssert into namespace clang::ast_matchers:: to avoid naming
collisions until it is properly integrated in llvm/Support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160063 91177308-0d34-0410-b5e6-96231b3b80d8
Allow -verify directives to be filtered by preprocessing.

This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler,
which then only reads the -verify directives that are actually in live
blocks of code. It also makes it simpler to handle -verify directives that
appear in header files, though we still have to manually reparse some files
depending on how they are generated.

This requires some test changes. In particular, all PCH tests now have their
-verify directives outside the "header" portion of the file, using the @line
syntax added in r159978. Other tests have been modified mostly to make it
clear what is being tested, and to prevent polluting the expected output with
the directives themselves.

Patch by Andy Gibbs! (with slight modifications)

The new Frontend/verify-* tests exercise the functionality of this commit,
as well as r159978, r159979, and r160053 (Andy's other -verify enhancements).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160068 91177308-0d34-0410-b5e6-96231b3b80d8
Start testing some commented-out cases of badly-formed __has_include.

Filed PR13334 for the cases that cause the compiler to crash, and
PR13335 for the cases where we should be recovering more gracefully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160070 91177308-0d34-0410-b5e6-96231b3b80d8
Introduce a flag in SourceManager to treat non-system source files
as "volatile", meaning there's a high enough chance that they may
change while we are trying to use them.

This flag is only enabled by libclang.
Currently "volatile" source files will be stat'ed immediately
before opening them, because the file size stat info
may not be accurate since when we got it (e.g. from the PCH).
This avoids crashes when trying to reference mmap'ed memory
from a file whose size is not what we expect.

Note that there's still a window for a racing issue to occur
but the window for it should be way smaller than before.
We can consider later on to avoid mmap completely on such files.

rdar://11612916

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160074 91177308-0d34-0410-b5e6-96231b3b80d8
Enable comment parsing and semantic analysis to emit diagnostics.  A few
diagnostics implemented -- see testcases.

I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file.  But I don't feel strongly about it.

This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).

In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to.  There is no easy way to find a decl by 
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments.  If we do --
then we do the usual comment-finding process.

It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.

Added -Wdocumentation-html flag for semantic HTML errors to allow the user to 
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160087 91177308-0d34-0410-b5e6-96231b3b80d8
Stop instantiating a class if we hit a static_assert failure. Also, if the
static_assert fails when parsing the template, don't diagnose it again on every
instantiation.


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