]> granicus.if.org Git - clang/log
clang
10 years agoAdd a test for Static Analyzer checker plugins
Alp Toker [Thu, 9 Jan 2014 00:47:40 +0000 (00:47 +0000)]
Add a test for Static Analyzer checker plugins

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

10 years ago[ms-abi] Refactor Microsoft Record Layout
Warren Hunt [Thu, 9 Jan 2014 00:30:56 +0000 (00:30 +0000)]
[ms-abi] Refactor Microsoft Record Layout

This patch refactors microsoft record layout to be more "natural".  The
most dominant change is that vbptrs and vfptrs are injected after the
fact.  This simplifies the implementation and the math for the offest
for the first base/field after the vbptr.

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

10 years agoUsed the DataLayout methods instead of the Module methods.
Rafael Espindola [Thu, 9 Jan 2014 00:17:51 +0000 (00:17 +0000)]
Used the DataLayout methods instead of the Module methods.

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

10 years agoImplement isCXX11FinalKeyword() in terms of isCXX11VirtSpecifier()
Alp Toker [Thu, 9 Jan 2014 00:13:52 +0000 (00:13 +0000)]
Implement isCXX11FinalKeyword() in terms of isCXX11VirtSpecifier()

It's not worth keeping two copies of the identifier init and comparison code
just to save a pointer coparison.

This should reduce further once we get proper contextual keywords in the token
stream, so having the identifier checks in one place is a step towards that.

Cleanup only.

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

10 years agoAttempting a fix the build bots should be happier with. Amends 198804.
Aaron Ballman [Wed, 8 Jan 2014 23:26:53 +0000 (23:26 +0000)]
Attempting a fix the build bots should be happier with. Amends 198804.

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

10 years agoSilencing an MSVC warning about control reaching the end of a non-void function.
Aaron Ballman [Wed, 8 Jan 2014 23:08:41 +0000 (23:08 +0000)]
Silencing an MSVC warning about control reaching the end of a non-void function.

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

10 years agoEnsure that ENABLE_SHARED is substituted for use in Windows builds
Alp Toker [Wed, 8 Jan 2014 20:06:24 +0000 (20:06 +0000)]
Ensure that ENABLE_SHARED is substituted for use in Windows builds

We (perhaps over-cautiously) disable the new plugin tests on static Windows
builds right now, matching what LLVM core does. This change was needed for the
lit check to work.

Thanks to Warren Hunt for spotting this.

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

10 years ago[Serialization] In ASTReader::getInputFile record it when we didn't find the file...
Argyrios Kyrtzidis [Wed, 8 Jan 2014 19:13:34 +0000 (19:13 +0000)]
[Serialization] In ASTReader::getInputFile record it when we didn't find the file to avoid looking it up again.

Hopefully addresses rdar://14514222.

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

10 years ago[analyzer] Warn about double-delete in C++ at the second delete...
Jordan Rose [Wed, 8 Jan 2014 18:46:55 +0000 (18:46 +0000)]
[analyzer] Warn about double-delete in C++ at the second delete...

...rather somewhere in the destructor when we try to access something and
realize the object has already been deleted. This is necessary because
the destructor is processed before the 'delete' itself.

Patch by Karthik Bhat!

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

10 years agoclang-format: Don't hang forever when encountering a stray "}" in an @implementation...
Benjamin Kramer [Wed, 8 Jan 2014 15:59:42 +0000 (15:59 +0000)]
clang-format: Don't hang forever when encountering a stray "}" in an @implementation block.

PR18406.

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

10 years agoclang-format: Fix spacing in Cpp11 braced lists:
Daniel Jasper [Wed, 8 Jan 2014 15:41:13 +0000 (15:41 +0000)]
clang-format: Fix spacing in Cpp11 braced lists:

Before:
  vector<int> foo{ ::SomeFunction()};

After:
  vector<int> foo{::SomeFunction()};

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

10 years agoTreating the RegParmAttr as a TypeAttr because that is what it is.
Aaron Ballman [Wed, 8 Jan 2014 13:23:01 +0000 (13:23 +0000)]
Treating the RegParmAttr as a TypeAttr because that is what it is.

Patch reviewed by Rafael Espindola.

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

10 years agoDefine ENABLE_CLANG_EXAMPLES instead of relying on BUILD_EXAMPLES
Alp Toker [Wed, 8 Jan 2014 13:00:32 +0000 (13:00 +0000)]
Define ENABLE_CLANG_EXAMPLES instead of relying on BUILD_EXAMPLES

This is a further build fix attempt for r198747 on some Makefile builders where
the value wasn't set at all.

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

10 years agoProspective build fix for the Makefile system
Alp Toker [Wed, 8 Jan 2014 12:03:17 +0000 (12:03 +0000)]
Prospective build fix for the Makefile system

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

10 years agoBuild fix following r198747
Alp Toker [Wed, 8 Jan 2014 11:55:49 +0000 (11:55 +0000)]
Build fix following r198747

Convert CMake CLANG_BUILD_EXAMPLES to a boolean value for consumption by
Python, otherwise the raw config string gets passed through which may not be
0/1.

The if/else matches the technique used to solve the problem in LLVM's own
CMakeLists.txt.

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

10 years agoUse -std=gnu89 in tools/c-index-test/CMakeLists.txt
Rafael Espindola [Wed, 8 Jan 2014 11:44:42 +0000 (11:44 +0000)]
Use -std=gnu89 in tools/c-index-test/CMakeLists.txt

With the old use of -std=c89 off_t is not defined and the build fails.

This seems to be another variation of
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40278.

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

10 years agoAdd tests for clang plugins
Alp Toker [Wed, 8 Jan 2014 11:38:47 +0000 (11:38 +0000)]
Add tests for clang plugins

Somehow the entire plugin infrastructure went wholly untested until now.

The only plugins available for use in testing are the examples, so plugin tests
will only be run if CLANG_BUILD_EXAMPLES is enabled in the build.

(The examples should really be enabled by default, not just to aid testing but
also to prevent bitrot in some key user-facing code. I'll propose that
shortly.)

Requires supporting changes in LLVM r198746.

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

10 years agoFor AArch64, support builtin neon vector type with 'long' as base element type.
Jiangning Liu [Wed, 8 Jan 2014 07:51:48 +0000 (07:51 +0000)]
For AArch64, support builtin neon vector type with 'long' as base element type.

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

10 years agoRP18408: If a member template is used as a template template argument, it does
Richard Smith [Wed, 8 Jan 2014 01:51:59 +0000 (01:51 +0000)]
RP18408: If a member template is used as a template template argument, it does
not cause the template specialization to have no linkage.

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

10 years agoPR18400: ignore cv-qualifiers on the underlying type of an enumeration.
Richard Smith [Wed, 8 Jan 2014 01:16:19 +0000 (01:16 +0000)]
PR18400: ignore cv-qualifiers on the underlying type of an enumeration.

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

10 years ago[Driver] Fix a typo in the setting of the arch name when -arch x86_64h is used.
Quentin Colombet [Wed, 8 Jan 2014 01:02:06 +0000 (01:02 +0000)]
[Driver] Fix a typo in the setting of the arch name when -arch x86_64h is used.
<rdar://problem/15711488>

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

10 years agoPR18234: Mark a tag definition as invalid early if it appears in a
Richard Smith [Wed, 8 Jan 2014 00:56:48 +0000 (00:56 +0000)]
PR18234: Mark a tag definition as invalid early if it appears in a
type-specifier in C++. Some checks will assert in this case otherwise (in
particular, the access specifier may be missing if this happens inside a class
definition, due to a violation of an AST invariant).

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

10 years agoRe-applying r198699 after reverting r198461.
Adrian Prantl [Tue, 7 Jan 2014 22:05:55 +0000 (22:05 +0000)]
Re-applying r198699 after reverting r198461.
Debug info: Implement a cleaner version of r198461. For symmetry with
C and C++ don't emit an extra lexical scope for the compound statement
that is the body of an Objective-C method.

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

10 years agoRevert "Debug info: Ensure that the last stop point in a function is still within"
Adrian Prantl [Tue, 7 Jan 2014 22:05:52 +0000 (22:05 +0000)]
Revert "Debug info: Ensure that the last stop point in a function is still within"

This reverts commit r198461.

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

10 years agoRevert "Debug info: Implement a cleaner version of r198461. For symmetry with"
Adrian Prantl [Tue, 7 Jan 2014 22:05:45 +0000 (22:05 +0000)]
Revert "Debug info: Implement a cleaner version of r198461. For symmetry with"

This reverts commit 198699 so we can get a cleaner patch.

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

10 years ago[analyzer] Files with .c extensions are still C++ files if the compiler is CXX.
Jordan Rose [Tue, 7 Jan 2014 21:39:51 +0000 (21:39 +0000)]
[analyzer] Files with .c extensions are still C++ files if the compiler is CXX.

PR18339

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

10 years ago[analyzer] Pointers escape into +[NSValue valueWithPointer:]...
Jordan Rose [Tue, 7 Jan 2014 21:39:48 +0000 (21:39 +0000)]
[analyzer] Pointers escape into +[NSValue valueWithPointer:]...

...even though the argument is declared "const void *", because this is
just a way to pass pointers around as objects. (Though NSData is often
a better one.)

PR18262

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

10 years ago[analyzer] Remove unused ARCNotOwnedSymbol retain count return effect.
Jordan Rose [Tue, 7 Jan 2014 21:39:41 +0000 (21:39 +0000)]
[analyzer] Remove unused ARCNotOwnedSymbol retain count return effect.

RetainCountChecker has to track returned object values to know if they are
retained or not. Under ARC, even methods that return +1 are tracked by the
system and should be treated as +0. However, this effect behaves exactly
like NotOwned(ObjC), i.e. a generic Objective-C method that actually returns
+0, so we don't need a special case for it.

No functionality change.

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

10 years agoUpdating the documentation about how to add attributes based on the rather extensive...
Aaron Ballman [Tue, 7 Jan 2014 20:12:20 +0000 (20:12 +0000)]
Updating the documentation about how to add attributes based on the rather extensive refactorings that have happened over the past several months.

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

10 years ago[cmake] Write Version.inc at cmake time, not at build time.
Nico Weber [Tue, 7 Jan 2014 20:10:39 +0000 (20:10 +0000)]
[cmake] Write Version.inc at cmake time, not at build time.

In SVN checkouts, clang_revision_tag is rerun on every build, even if nothing
else is dirty.  After this change, Version.inc is only written at cmake time,
so that empty builds run 0 build steps (like r191784 apparently did for git).

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

10 years agoDebug info: Implement a cleaner version of r198461. For symmetry with
Adrian Prantl [Tue, 7 Jan 2014 19:24:24 +0000 (19:24 +0000)]
Debug info: Implement a cleaner version of r198461. For symmetry with
C and C++ don't emit an extra lexical scope for the compound statement
that is the body of an Objective-C method.

rdar://problem/15010825

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

10 years agoShorten the output of `clang-format --version`, include revision number.
Nico Weber [Tue, 7 Jan 2014 16:27:35 +0000 (16:27 +0000)]
Shorten the output of `clang-format --version`, include revision number.

Before:
  $ clang-format  --version
  LLVM (http://llvm.org/):
    LLVM version 3.5svn
    Optimized build with assertions.
    Built Jan  3 2014 (14:28:46).
    Default target: x86_64-apple-darwin13.0.0
    Host CPU: core-avx-i

Now:
  $ bin/clang-format --version
  clang-format version 3.5 (198452)

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

10 years agoRemove unused include.
Rafael Espindola [Tue, 7 Jan 2014 15:11:31 +0000 (15:11 +0000)]
Remove unused include.

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

10 years agoUpdate Clang for the move of headers in r198688.
Chandler Carruth [Tue, 7 Jan 2014 12:34:48 +0000 (12:34 +0000)]
Update Clang for the move of headers in r198688.

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

10 years agoSort all the #include lines with LLVM's utils/sort_includes.py which
Chandler Carruth [Tue, 7 Jan 2014 11:51:46 +0000 (11:51 +0000)]
Sort all the #include lines with LLVM's utils/sort_includes.py which
encodes the canonical rules for LLVM's style. I noticed this had drifted
quite a bit when cleaning up LLVM, so wanted to clean up Clang as well.

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

10 years agoFor areVectorOperandsLaxBitCastable(), only return false if both opearands are vector...
Argyrios Kyrtzidis [Tue, 7 Jan 2014 07:59:31 +0000 (07:59 +0000)]
For areVectorOperandsLaxBitCastable(), only return false if both opearands are vector types
and add a diagnostic when the operand is a vector and non-scalar value.

rdar://15722301

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

10 years agoFix a -Wparentheses warning from GCC that caught a badly formed assert.
Chandler Carruth [Tue, 7 Jan 2014 06:52:12 +0000 (06:52 +0000)]
Fix a -Wparentheses warning from GCC that caught a badly formed assert.

I have no idea why Clang's warning doesn't fire here, looks like a Clang
bug. I'll investigate that separately.

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

10 years agoCodeGen: Include llvm/Config/config.h for strtoll on Windows
Justin Bogner [Tue, 7 Jan 2014 03:43:15 +0000 (03:43 +0000)]
CodeGen: Include llvm/Config/config.h for strtoll on Windows

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

10 years agoFix 'unkown' typo in test -target from r198321
Alp Toker [Tue, 7 Jan 2014 02:47:19 +0000 (02:47 +0000)]
Fix 'unkown' typo in test -target from r198321

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

10 years agoupdate comment.
Adrian Prantl [Tue, 7 Jan 2014 02:40:59 +0000 (02:40 +0000)]
update comment.

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

10 years agoBring back magic constants in the digraph diagnostic
Alp Toker [Tue, 7 Jan 2014 02:35:33 +0000 (02:35 +0000)]
Bring back magic constants in the digraph diagnostic

This backs out changes in commit r198605 and part of r198604, replacing the
original tok::kw_template with a slightly more obvious placeholder
tok::unknown.

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

10 years agoImplement a new -fstandalone-debug option. rdar://problem/15685848
Adrian Prantl [Tue, 7 Jan 2014 01:19:08 +0000 (01:19 +0000)]
Implement a new -fstandalone-debug option. rdar://problem/15685848
It controls everything that -flimit-debug-info used to, plus the
vtable type optimization. The old -fno-limit-debug-info option is now an
alias to -fstandalone-debug and vice versa.

Standalone is the default on Darwin until dtrace is updated to work with
non-standalone debug info (rdar://problem/15758808).

Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind
because NoStandaloneDebugInfo sounded even more confusing.

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

10 years agoObjectiveC. Computation of offsets when doing @encode type encoding
Fariborz Jahanian [Tue, 7 Jan 2014 01:02:50 +0000 (01:02 +0000)]
ObjectiveC. Computation of offsets when doing @encode type encoding
is only used in an assert. Do not do it if assert is not on.

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

10 years agoclang/test/CodeGenCXX/instr-profile.cpp: Appease -Asserts.
NAKAMURA Takumi [Tue, 7 Jan 2014 00:59:39 +0000 (00:59 +0000)]
clang/test/CodeGenCXX/instr-profile.cpp: Appease -Asserts.

FIXME: Don't seek bb labels, like "if.else"

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

10 years agoCodeGen: Sentences end with a period
Justin Bogner [Tue, 7 Jan 2014 00:20:28 +0000 (00:20 +0000)]
CodeGen: Sentences end with a period

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

10 years agoProperly sort CMake list. NFC.
Ted Kremenek [Mon, 6 Jan 2014 23:20:52 +0000 (23:20 +0000)]
Properly sort CMake list.  NFC.

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

10 years agoCodeGen: Initial instrumentation based PGO implementation
Justin Bogner [Mon, 6 Jan 2014 22:27:43 +0000 (22:27 +0000)]
CodeGen: Initial instrumentation based PGO implementation

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

10 years agoDriver: Accept -fprofile-instr-use and -fprofile-instr-generate
Justin Bogner [Mon, 6 Jan 2014 22:27:36 +0000 (22:27 +0000)]
Driver: Accept -fprofile-instr-use and -fprofile-instr-generate

These flags will be used for instrumentation based PGO.

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

10 years agoProspective MSVC 2010 build fix
Alp Toker [Mon, 6 Jan 2014 15:52:13 +0000 (15:52 +0000)]
Prospective MSVC 2010 build fix

Try to fix Compiler Error C2011 following r198607 by removing enum from 'enum
TokenKind' parameter types.

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

10 years agoCorrect underlying integer type of enum TokenKind
Alp Toker [Mon, 6 Jan 2014 12:54:51 +0000 (12:54 +0000)]
Correct underlying integer type of enum TokenKind

This matches up the underlying type against the actual storage type 'unsigned
short' and lets us get rid of some casts while we're at it.

Effort is made to keep this building in pre-C++11 but as with other features
Token will be less efficiently packed in in legacy configurations.

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

10 years agoSimplify diagnostic tag type using the token kind formatter
Alp Toker [Mon, 6 Jan 2014 12:54:41 +0000 (12:54 +0000)]
Simplify diagnostic tag type using the token kind formatter

As far as the parser is concerned the tag type is always a keyword.

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

10 years agoDon't use magic constants in the digraph diagnostic
Alp Toker [Mon, 6 Jan 2014 12:54:32 +0000 (12:54 +0000)]
Don't use magic constants in the digraph diagnostic

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

10 years agoSupport diagnostic formatting of keyword tokens
Alp Toker [Mon, 6 Jan 2014 12:54:18 +0000 (12:54 +0000)]
Support diagnostic formatting of keyword tokens

Implemented with a new getKeywordSpelling() accessor. Unlike getTokenName() the
result of this function is stable and may be used in diagnostic output.

Uses of this feature are split out into the subsequent commit.

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

10 years agoRename getTokenSimpleSpelling() to getPunctuatorSpelling()
Alp Toker [Mon, 6 Jan 2014 12:54:07 +0000 (12:54 +0000)]
Rename getTokenSimpleSpelling() to getPunctuatorSpelling()

That's what it does, what the documentation says it does and what callers
expect it to do.

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

10 years agoHighlight the previous underlying enum type when diagnosing a mismatch
Alp Toker [Mon, 6 Jan 2014 11:31:18 +0000 (11:31 +0000)]
Highlight the previous underlying enum type when diagnosing a mismatch

enum-scoped.cpp:93:6: error: enumeration redeclared with different underlying type 'short' (was 'int')
  enum Redeclare6 : short;
       ^
enum-scoped.cpp:92:6: note: previous declaration is here
  enum Redeclare6 : int;
       ^            ~~~

The redeclaration source range is still missing but this is a step forward,
potentially edging towards a FixIt.

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

10 years agoDiagnose enum redeclarations properly
Alp Toker [Mon, 6 Jan 2014 11:31:06 +0000 (11:31 +0000)]
Diagnose enum redeclarations properly

In all three checks, the note indicates a previous declaration and never a 'use'.

Before:

  enum-scoped.cpp:92:6: note: previous use is here
    enum Redeclare6 : int;
         ^

After:

  enum-scoped.cpp:92:6: note: previous declaration is here
    enum Redeclare6 : int;
         ^

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

10 years agoUse token kind instead of '%select{.|->}0' in diagnostic
Alp Toker [Mon, 6 Jan 2014 11:30:41 +0000 (11:30 +0000)]
Use token kind instead of '%select{.|->}0' in diagnostic

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

10 years agoApply some LLVM_READONLY / LLVM_READNONE on diagnostic functions
Alp Toker [Mon, 6 Jan 2014 11:30:15 +0000 (11:30 +0000)]
Apply some LLVM_READONLY / LLVM_READNONE on diagnostic functions

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

10 years ago[OpenCL] Produce an error if an address space is used on the return
Joey Gouly [Mon, 6 Jan 2014 11:26:18 +0000 (11:26 +0000)]
[OpenCL] Produce an error if an address space is used on the return
type of a function.

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

10 years agoThis helper method isn't needed, and it's unsafe for it to use StringRef in the first...
Aaron Ballman [Sun, 5 Jan 2014 21:08:29 +0000 (21:08 +0000)]
This helper method isn't needed, and it's unsafe for it to use StringRef in the first place. Replaced the unsafe code with the proper accessor.

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

10 years agoclang-format: Spacing inside enum braces.
Daniel Jasper [Sun, 5 Jan 2014 13:23:23 +0000 (13:23 +0000)]
clang-format: Spacing inside enum braces.

Before (in Google style):
  enum ShortEnum {A, B, C};

After:
  enum ShortEnum { A, B, C };

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

10 years agoclang-format: Allow formatting short enums on a single line.
Daniel Jasper [Sun, 5 Jan 2014 12:38:10 +0000 (12:38 +0000)]
clang-format: Allow formatting short enums on a single line.

Before:
  enum ShortEnum {
    A,
    B,
    C
  };

After:
  enum ShortEnum { A, B, C };

This seems to be the predominant choice in LLVM/Clang as well as in
Google style.

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

10 years agoFix 'declartion' typos
Alp Toker [Sun, 5 Jan 2014 06:38:57 +0000 (06:38 +0000)]
Fix 'declartion' typos

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

10 years agoPre-declare '::type_info' in MicrosoftMode only, not MicrosoftExt
Alp Toker [Sun, 5 Jan 2014 06:38:18 +0000 (06:38 +0000)]
Pre-declare '::type_info' in MicrosoftMode only, not MicrosoftExt

It was previously enabled in both but should only have been part of the drop-in
quirks mode that is 'MicrosoftMode' given that it's only useful for
compatibility with the Microsoft headers/runtime.

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

10 years agoTweak the parse recovery in r198540
Alp Toker [Sun, 5 Jan 2014 04:17:27 +0000 (04:17 +0000)]
Tweak the parse recovery in r198540

Cover a hypothetical case when we might not have reached the final argument
declaration for some reason during recovery, and split out for readability.

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

10 years agoFix bungled parse recovery in K&R function declarations
Alp Toker [Sun, 5 Jan 2014 03:27:57 +0000 (03:27 +0000)]
Fix bungled parse recovery in K&R function declarations

  void knrNoSemi(i) int i { }

Adherents of The C Programming Language unfortunate enough to miss a semicolon
as above would be met with a cascade of errors spanning the remainder of the
TU.

This patch introduces a beautiful parse error recovery, complete with helpful
FixIt to restore sanity.

Before (output redacted for brevity):

  error: 'error' diagnostics seen but not expected:
    File declarators.c Line 119: declaration does not declare a parameter
    File declarators.c Line 123: declaration does not declare a parameter
    File declarators.c Line 127: parameter named 'func_E12' is missing
    File declarators.c Line 127: expected ';' at end of declaration
    File declarators.c Line 133: parameter named 'func_E13' is missing
    File declarators.c Line 133: expected ';' at end of declaration
    File declarators.c Line 139: parameter named 'func_E14' is missing
    File declarators.c Line 139: expected ';' at end of declaration
    File declarators.c Line 145: parameter named 'func_E15' is missing
    File declarators.c Line 145: expected ';' at end of declaration
    File declarators.c Line 150: expected function body after function declarator
    File declarators.c Line 119: declaration of 'enum E11' will not be visible outside of this function
    File declarators.c Line 123: declaration of 'enum E12' will not be visible outside of this function
    File declarators.c Line 133: ISO C forbids forward references to 'enum' types
    File declarators.c Line 133: declaration of 'enum E13' will not be visible outside of this function
    File declarators.c Line 139: ISO C forbids forward references to 'enum' types
    File declarators.c Line 139: declaration of 'enum E14' will not be visible outside of this function
    File declarators.c Line 145: ISO C forbids forward references to 'enum' types
    File declarators.c Line 145: declaration of 'enum E15' will not be visible outside of this function
    ...

After:

  declarators.c:103:24: error: expected ';' at end of declaration
  void knrNoSemi(i) int i { }
                         ^
                         ;

Patch found in a sealed envelope dated 1978 with the message "Do not open until
January 2014"

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

10 years agoParse: Token consumption modernization and loop de-nesting
Alp Toker [Sun, 5 Jan 2014 03:27:11 +0000 (03:27 +0000)]
Parse: Token consumption modernization and loop de-nesting

Cleanup only.

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

10 years agoRevert "ToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode...
Alp Toker [Sat, 4 Jan 2014 15:58:28 +0000 (15:58 +0000)]
Revert "ToolingTest.cpp: Fix r158592, runToolOnCode.FindsNoTopLevelDeclOnEmptyCode on msvc. LangOpts.MicrosoftExt still appends "class type_info;"."

type_info has been made an implicitly predeclared type in r198497 and will no
longer appear as a user-declared type so we can remove this old hack.

This reverts commit r158595.

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

10 years agoMove MS predefined type_info out of InitializePredefinedMacros
Alp Toker [Sat, 4 Jan 2014 15:25:02 +0000 (15:25 +0000)]
Move MS predefined type_info out of InitializePredefinedMacros

Instead of keeping it in amongst the macros, build the declaration at Sema init
the same way we do with other predeclared and builtin types.

In practice this means the declaration is marked implicit and therefore won't
show up as an unwanted user-declared type in tooling which has been a
frequently reported issue (though I haven't been able to cook up a test).

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

10 years agoOnly mark dump() function definitions 'used' in debug builds
Alp Toker [Sat, 4 Jan 2014 13:47:14 +0000 (13:47 +0000)]
Only mark dump() function definitions 'used' in debug builds

This has the dual effect of (1) enabling more dead-stripping in release builds
and (2) ensuring that debug helper functions aren't stripped away in debug
builds, as they're intended to be called from the debugger.

Note that the attribute is applied to definitions rather than declarations in
headers going forward because it's now conditional on NDEBUG:

  /// \brief Mark debug helper function definitions like dump() that should not be
  /// stripped from debug builds.

Requires corresponding macro added in LLVM r198456.

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

10 years agoAdd an additional check in test/Sema/ext_vector_casts.c
Argyrios Kyrtzidis [Sat, 4 Jan 2014 06:27:45 +0000 (06:27 +0000)]
Add an additional check in test/Sema/ext_vector_casts.c

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

10 years ago[analyzer] Remove IdempotentOperations checker.
Ted Kremenek [Sat, 4 Jan 2014 05:52:11 +0000 (05:52 +0000)]
[analyzer] Remove IdempotentOperations checker.

This checker has not been updated to work with interprocedural analysis,
and actually contains both logical correctness issues but also
memory bugs.  We can resuscitate it from version control once there
is focused interest in making it a real viable checker again.

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

10 years ago[Sema] When checking if a bitcast is appropriate between vector types, take into
Argyrios Kyrtzidis [Sat, 4 Jan 2014 03:31:22 +0000 (03:31 +0000)]
[Sema] When checking if a bitcast is appropriate between vector types, take into
consideration the num-of-elements*width-of-element width.

Disallow casts when such width is not equal between the vector types otherwise
we may end up with an invalid LLVM bitcast.

rdar://15722308.

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

10 years agoIgnore qualified templated functions for -Winfinite-recursion. This treats
Richard Trieu [Sat, 4 Jan 2014 01:57:42 +0000 (01:57 +0000)]
Ignore qualified templated functions for -Winfinite-recursion.  This treats
functions like Foo<5>::run() the same way as run<5>() for this warning.

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

10 years ago[ms-cxxabi] Improve vbtable name mangling accuracy
Reid Kleckner [Fri, 3 Jan 2014 23:42:00 +0000 (23:42 +0000)]
[ms-cxxabi] Improve vbtable name mangling accuracy

Summary:
This makes us more compatible with MSVC 2012+ and fixes PR17748 where we
would give two tables the same name.

Rather than doing a fresh depth-first traversal of the inheritance graph
for every record's vbtables, now we memoize vbtable paths for each
record.  By doing memoization, we end up considering virtual bases of
subobjects that come later in the depth-first traversal.  Where
previously we would have ignored a virtual base that we'd already seen,
we now consider it for name mangling purposes without emitting a
duplicate vbtable for it.

Reviewers: majnemer

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2509

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

10 years agoDebug info: Ensure that the last stop point in a function is still within
Adrian Prantl [Fri, 3 Jan 2014 23:34:30 +0000 (23:34 +0000)]
Debug info: Ensure that the last stop point in a function is still within
the lexical block formed by the compound statement that is the function
body.

rdar://problem/15010825

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

10 years agoRefactored Builtin::Context::isPrintfLike and isScanfLike into a helper function...
Aaron Ballman [Fri, 3 Jan 2014 20:10:54 +0000 (20:10 +0000)]
Refactored Builtin::Context::isPrintfLike and isScanfLike into a helper function. The implementations are identical, except for the format arguments being searched for.

No functional changes intended.

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

10 years agoFix 80 col violation.
Argyrios Kyrtzidis [Fri, 3 Jan 2014 19:53:09 +0000 (19:53 +0000)]
Fix 80 col violation.

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

10 years agoPass the decl directly to the diagnostic, no need to call getDeclName().
Argyrios Kyrtzidis [Fri, 3 Jan 2014 19:39:23 +0000 (19:39 +0000)]
Pass the decl directly to the diagnostic, no need to call getDeclName().

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

10 years agoFixing a FIXME; the RetTy template parameter is always bool in practice, and so it...
Aaron Ballman [Fri, 3 Jan 2014 19:26:43 +0000 (19:26 +0000)]
Fixing a FIXME; the RetTy template parameter is always bool in practice, and so it has been removed. No functional changes intended.

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

10 years agoUpdate for llvm's DataLayout including mangling information.
Rafael Espindola [Fri, 3 Jan 2014 19:22:05 +0000 (19:22 +0000)]
Update for llvm's DataLayout including mangling information.

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

10 years agoMarked the default constructor as an LLVM_DELETED_FUNCTION.
Aaron Ballman [Fri, 3 Jan 2014 18:51:47 +0000 (18:51 +0000)]
Marked the default constructor as an LLVM_DELETED_FUNCTION.

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

10 years agoRemoved one of the string versions of getQualifiedNameAsString, and switched over...
Aaron Ballman [Fri, 3 Jan 2014 18:42:48 +0000 (18:42 +0000)]
Removed one of the string versions of getQualifiedNameAsString, and switched over to using printQualifiedName where possible. No functional changes intended.

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

10 years ago[objc] Refactor and improve functionality for the -Wunused-property-ivar warning.
Argyrios Kyrtzidis [Fri, 3 Jan 2014 18:32:18 +0000 (18:32 +0000)]
[objc] Refactor and improve functionality for the -Wunused-property-ivar warning.

- Remove the additions to ObjCMethodDecl & ObjCIVarDecl that were getting de/serialized and consolidate
  all functionality for the checking for this warning in Sema::DiagnoseUnusedBackingIvarInAccessor
- Don't check immediately after the method body is finished, check when the @implementation is finished.
  This is so we can see if the ivar was referenced by any other method, even if the method was defined after the accessor.
- Don't silence the warning if any method is called from the accessor silence it if the accessor delegates to another method via self.

rdar://15727325

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

10 years agoReformat the description strings. No functionality change.
Rafael Espindola [Fri, 3 Jan 2014 18:13:17 +0000 (18:13 +0000)]
Reformat the description strings. No functionality change.

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

10 years agoWe haven't cared about VS 2005 in a long time, and VS 2003 in even longer.
Aaron Ballman [Fri, 3 Jan 2014 18:10:25 +0000 (18:10 +0000)]
We haven't cared about VS 2005 in a long time, and VS 2003 in even longer.

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

10 years agoFixed a FIXME; created a print method for Selectors that accepts a raw_ostream, and...
Aaron Ballman [Fri, 3 Jan 2014 17:59:55 +0000 (17:59 +0000)]
Fixed a FIXME; created a print method for Selectors that accepts a raw_ostream, and started using it in places it made sense.

No functional changes intended, just API cleanliness.

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

10 years agoMake clang::ento::CreateAnalysisConsumer a part of a public interface of the static...
Alexander Kornienko [Fri, 3 Jan 2014 17:23:10 +0000 (17:23 +0000)]
Make clang::ento::CreateAnalysisConsumer a part of a public interface of the static analyzer.

Summary:
This allows for a better alternative to the FrontendAction hack used in
clang-tidy in order to get static analyzer's ASTConsumer.

Reviewers: jordan_rose, krememek

Reviewed By: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2505

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

10 years agoSimplifying the mutual exclusion check now that the diagnostics engine knows how...
Aaron Ballman [Fri, 3 Jan 2014 16:23:46 +0000 (16:23 +0000)]
Simplifying the mutual exclusion check now that the diagnostics engine knows how to handle Attr objects directly. Updates an associated test case due to the attribute name being properly quoted again.

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

10 years ago[OpenCL] Add test case for previous commit.
Joey Gouly [Fri, 3 Jan 2014 15:11:57 +0000 (15:11 +0000)]
[OpenCL] Add test case for previous commit.

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

10 years agoUsing the proper helper function instead of manually doing this work. No functional...
Aaron Ballman [Fri, 3 Jan 2014 15:02:58 +0000 (15:02 +0000)]
Using the proper helper function instead of manually doing this work. No functional changes intended.

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

10 years agoRemoving some more unnecessary manual quotes from diagnostics.
Aaron Ballman [Fri, 3 Jan 2014 14:54:10 +0000 (14:54 +0000)]
Removing some more unnecessary manual quotes from diagnostics.

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

10 years agoRemoving an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.
Aaron Ballman [Fri, 3 Jan 2014 14:48:20 +0000 (14:48 +0000)]
Removing an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.

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

10 years agoRemoving some more unnecessary manual quotes from diagnostics.
Aaron Ballman [Fri, 3 Jan 2014 14:23:03 +0000 (14:23 +0000)]
Removing some more unnecessary manual quotes from diagnostics.

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

10 years ago[OpenCL] Variables in the constant address space must be initialized.
Joey Gouly [Fri, 3 Jan 2014 14:16:55 +0000 (14:16 +0000)]
[OpenCL] Variables in the constant address space must be initialized.

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

10 years agoRemoving some more unnecessary manual quotes from diagnostics.
Aaron Ballman [Fri, 3 Jan 2014 14:06:37 +0000 (14:06 +0000)]
Removing some more unnecessary manual quotes from diagnostics.

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

10 years agoIt turns out the problem was a bit more wide-spread. Removing a lot of unneeded typec...
Aaron Ballman [Fri, 3 Jan 2014 13:56:08 +0000 (13:56 +0000)]
It turns out the problem was a bit more wide-spread. Removing a lot of unneeded typecasts. getScopeRep() already returns a NestedNameSpecifier.

No functional changes intended.

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

10 years agoRemoving an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.
Aaron Ballman [Fri, 3 Jan 2014 13:45:46 +0000 (13:45 +0000)]
Removing an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.

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

10 years agoRemoving some more unnecessary manual quotes from diagnostics. Updated the related...
Aaron Ballman [Fri, 3 Jan 2014 13:34:55 +0000 (13:34 +0000)]
Removing some more unnecessary manual quotes from diagnostics. Updated the related test case to ensure correctness.

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

10 years agoclang-format: Recognize single-line macro usages inside macros.
Daniel Jasper [Fri, 3 Jan 2014 11:50:46 +0000 (11:50 +0000)]
clang-format: Recognize single-line macro usages inside macros.

Before:
  #define LIST(L)                                                     \
    L(FirstElement) L(SecondElement) L(ThirdElement) L(FourthElement) \
        L(FifthElement)

After:
  #define LIST(L)    \
    L(FirstElement)  \
    L(SecondElement) \
    L(ThirdElement)  \
    L(FourthElement) \
    L(FifthElement)

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