]> granicus.if.org Git - clang/log
clang
12 years ago[libclang] Fix getting a cursor inside an angled #include directive.
Argyrios Kyrtzidis [Tue, 11 Sep 2012 02:17:21 +0000 (02:17 +0000)]
[libclang] Fix getting a cursor inside an angled #include directive.

Fixed by pointing the end location of the preprocessed entity for the #include
at the closing '>', instead of the start of '<'.

rdar://11113134

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

12 years agoUpdate comment and space.
Eric Christopher [Tue, 11 Sep 2012 01:36:56 +0000 (01:36 +0000)]
Update comment and space.

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

12 years agoThe type of the self and cmd variables should be artificial. (Note
Eric Christopher [Tue, 11 Sep 2012 01:36:54 +0000 (01:36 +0000)]
The type of the self and cmd variables should be artificial. (Note
that the types aren't artificial the args are, but this is currently
represented by an artificial type.)

Found by inspection.

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

12 years ago[ms-inline asm] Add $$ before numeric constants in the IR.
Chad Rosier [Tue, 11 Sep 2012 00:51:28 +0000 (00:51 +0000)]
[ms-inline asm] Add $$ before numeric constants in the IR.

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

12 years agoFix buffer overflow.
Eli Friedman [Tue, 11 Sep 2012 00:36:26 +0000 (00:36 +0000)]
Fix buffer overflow.

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

12 years ago[analyzer] Member function calls that use qualified names are non-virtual.
Jordan Rose [Tue, 11 Sep 2012 00:31:02 +0000 (00:31 +0000)]
[analyzer] Member function calls that use qualified names are non-virtual.

C++11 [expr.call]p1: ...If the selected function is non-virtual, or if the
  id-expression in the class member access expression is a qualified-id,
  that function is called. Otherwise, its final overrider in the dynamic type
  of the object expression is called.

<rdar://problem/12255556>

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

12 years ago[analyzer] Turn stl inlining back on.
Anna Zaks [Mon, 10 Sep 2012 23:59:02 +0000 (23:59 +0000)]
[analyzer] Turn stl inlining back on.

The one reported bug, which was exposed by stl inlining, is addressed in
r163558.

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

12 years ago[analyzer] Do not count calls to small functions when computing stack
Anna Zaks [Mon, 10 Sep 2012 23:35:11 +0000 (23:35 +0000)]
[analyzer] Do not count calls to small functions when computing stack
depth.

We only want to count how many substantial functions we inlined. This
is an improvement to r163558.

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

12 years ago[PCH] Add a null check to avoid crashing.
Argyrios Kyrtzidis [Mon, 10 Sep 2012 23:28:22 +0000 (23:28 +0000)]
[PCH] Add a null check to avoid crashing.

Unfortunately, no test case. rdar://11960120

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

12 years agoProvide fixed target triples to make test results consistent across ARM hosts.
David Blaikie [Mon, 10 Sep 2012 23:06:08 +0000 (23:06 +0000)]
Provide fixed target triples to make test results consistent across ARM hosts.

Patch by David Tweed, review by myself and John McCall.

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

12 years ago[libclang] Do index 'extern' declarations inside functions.
Argyrios Kyrtzidis [Mon, 10 Sep 2012 22:58:04 +0000 (22:58 +0000)]
[libclang] Do index 'extern' declarations inside functions.

rdar://12257073

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

12 years ago[analyzer] Add an option to enable/disable objc inlining.
Anna Zaks [Mon, 10 Sep 2012 22:56:41 +0000 (22:56 +0000)]
[analyzer] Add an option to enable/disable objc inlining.

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

12 years agoRevert "Remove clang man page reference to -Oz. It's not an option we want people...
Ted Kremenek [Mon, 10 Sep 2012 22:50:05 +0000 (22:50 +0000)]
Revert "Remove clang man page reference to -Oz.  It's not an option we want people to use, and is around for historical reasons."

This should be discussed more first.

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

12 years ago[analyzer] Add ipa-always-inline-size option (with 3 as the default).
Anna Zaks [Mon, 10 Sep 2012 22:37:19 +0000 (22:37 +0000)]
[analyzer] Add ipa-always-inline-size option (with 3 as the default).

The option allows to always inline very small functions, whose size (in
number of basic blocks) is set using -analyzer-config
ipa-always-inline-size option.

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

12 years agoFix PR13784: instantiation of an abstract class in a conditional operator.
David Blaikie [Mon, 10 Sep 2012 22:05:41 +0000 (22:05 +0000)]
Fix PR13784: instantiation of an abstract class in a conditional operator.

A couple of missing "RequireNonAbstractType" calls in conditional operator
handling. I looked for opportunities to tie this check in to all relevant
callers of PerformCopyInitialization (couldn't be all callers since this is
called for base subobject copying too, where it's acceptable to copy abstract
types) but the callers varied too much & in many cases had substantial code
or conditionals on the RequireNonAbstractType call, the
PerformCopyInitialization call, or the code between the two calls.

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

12 years agoMove the null check outside of the loop, no functionality change.
Argyrios Kyrtzidis [Mon, 10 Sep 2012 22:04:26 +0000 (22:04 +0000)]
Move the null check outside of the loop, no functionality change.

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

12 years ago[PCH] When loading fields from external storage make sure to also
Argyrios Kyrtzidis [Mon, 10 Sep 2012 22:04:22 +0000 (22:04 +0000)]
[PCH] When loading fields from external storage make sure to also
load in the IndirectField declarations as well.

Field designators in initializer lists depend on traversing the fields
decl chain to find the indirect fields.

Fixes rdar://12239321

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

12 years ago[analyzer] Make the defaults explicit for each of the new config options.
Jordan Rose [Mon, 10 Sep 2012 21:54:24 +0000 (21:54 +0000)]
[analyzer] Make the defaults explicit for each of the new config options.

Also, document both new inlining options in IPA.txt.

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

12 years ago[analyzer] For now, don't inline C++ standard library functions.
Jordan Rose [Mon, 10 Sep 2012 21:27:35 +0000 (21:27 +0000)]
[analyzer] For now, don't inline C++ standard library functions.

This is a (heavy-handed) solution to PR13724 -- until we know we can do
a good job inlining the STL, it's best to be consistent and not generate
more false positives than we did before. We can selectively whitelist
certain parts of the 'std' namespace that are known to be safe.

This is controlled by analyzer config option 'c++-stdlib-inlining', which
can be set to "true" or "false".

This commit also adds control for whether or not to inline any templated
functions (member or non-member), under the config option
'c++-template-inlining'. This option is currently on by default.

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

12 years agoRemove redundant semicolons which are null statements.
Dmitri Gribenko [Mon, 10 Sep 2012 21:20:09 +0000 (21:20 +0000)]
Remove redundant semicolons which are null statements.

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

12 years agoComment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.
Dmitri Gribenko [Mon, 10 Sep 2012 20:32:42 +0000 (20:32 +0000)]
Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.

Now we have a list of all commands.  This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed).  Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands.  Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID.  Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state.  But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object.  This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed.  This is a source-incompatible
change for this C API.

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

12 years agoRemove clang man page reference to -Oz. It's not an option we want people to use...
Ted Kremenek [Mon, 10 Sep 2012 20:10:37 +0000 (20:10 +0000)]
Remove clang man page reference to -Oz.  It's not an option we want people to use, and is around for historical reasons.

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

12 years agoThread-safety analysis: differentiate between two forms of analysis; a precise
DeLesley Hutchins [Mon, 10 Sep 2012 19:58:23 +0000 (19:58 +0000)]
Thread-safety analysis: differentiate between two forms of analysis; a precise
analysis that may give false positives because it is confused by aliasing, and
a less precise analysis that has fewer false positives, but may have false
negatives.  The more precise warnings are enabled by -Wthread-safety-precise.
An additional note clarify the warnings in the precise case.

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

12 years agoNow that I have a test file to work with, disable the Filecheck part of this test.
Ted Kremenek [Mon, 10 Sep 2012 19:50:17 +0000 (19:50 +0000)]
Now that I have a test file to work with, disable the Filecheck part of this test.

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

12 years agoCorrectly 'cat' out test files.
Ted Kremenek [Mon, 10 Sep 2012 19:13:08 +0000 (19:13 +0000)]
Correctly 'cat' out test files.

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

12 years agoFix another case where we should be using isBeforeInTranslationUnit().
Ted Kremenek [Mon, 10 Sep 2012 19:07:56 +0000 (19:07 +0000)]
Fix another case where we should be using isBeforeInTranslationUnit().

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

12 years agoAdd a few more cases where we should be using isBeforeInTranslationUnit().
Ted Kremenek [Mon, 10 Sep 2012 19:02:33 +0000 (19:02 +0000)]
Add a few more cases where we should be using isBeforeInTranslationUnit().

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

12 years agoAs a debugging aid to unbreak the buildbots, cat the plist files so I can view them...
Ted Kremenek [Mon, 10 Sep 2012 18:38:43 +0000 (18:38 +0000)]
As a debugging aid to unbreak the buildbots, cat the plist files so I can view them on different builders.

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

12 years agoMore tweaking and test cases for call to super
Fariborz Jahanian [Mon, 10 Sep 2012 18:04:25 +0000 (18:04 +0000)]
More tweaking and  test cases for call to super
annotations. // rdar://6386358

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

12 years agoRe-enable FileCheck testing of retain-release.m test, and force
Ted Kremenek [Mon, 10 Sep 2012 17:35:24 +0000 (17:35 +0000)]
Re-enable FileCheck testing of retain-release.m test, and force
a C++ dialect.  Let's see if this is the portability issue with this test.

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

12 years agoobjective-C: Improving diagnostocs for missing call to
Fariborz Jahanian [Mon, 10 Sep 2012 16:51:09 +0000 (16:51 +0000)]
objective-C: Improving diagnostocs for missing call to
super's annotated methods. // rdar://6386358

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

12 years agoTemporarily disable FileCheck part of this test.
Ted Kremenek [Mon, 10 Sep 2012 15:16:32 +0000 (15:16 +0000)]
Temporarily disable FileCheck part of this test.

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

12 years agoAllow vector types in pseudo-destructor expressions. Fixes PR13798.
Douglas Gregor [Mon, 10 Sep 2012 14:57:06 +0000 (14:57 +0000)]
Allow vector types in pseudo-destructor expressions. Fixes PR13798.

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

12 years agoWorkaround for MacOSX build failure with gcc <= 4.4
Alexander Kornienko [Mon, 10 Sep 2012 14:54:38 +0000 (14:54 +0000)]
Workaround for MacOSX build failure with gcc <= 4.4

Summary:
A better solution to http://llvm.org/bugs/show_bug.cgi?id=13777
Named namespace + more unique name to make ODR violations unlikely.

Reviewers: chandlerc, doug.gregor, klimek

Reviewed By: doug.gregor

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

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

12 years agoRevert "Revert Ted's r163489 and r163490, due to breakage."
Ted Kremenek [Mon, 10 Sep 2012 14:50:55 +0000 (14:50 +0000)]
Revert "Revert Ted's r163489 and r163490, due to breakage."

I need to see how this breaks on other platforms when I fix the issue
that Benjamin Kramer pointed out.

This includes r163489 and r163490, plus a two line change.

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

12 years agoMake helper functions static.
Benjamin Kramer [Mon, 10 Sep 2012 11:57:16 +0000 (11:57 +0000)]
Make helper functions static.

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

12 years agoWrong crtbegin/crtend pair used for PIE on Android.
Evgeniy Stepanov [Mon, 10 Sep 2012 10:30:12 +0000 (10:30 +0000)]
Wrong crtbegin/crtend pair used for PIE on Android.

Android uses the same flavour of crt*.o for PIE and non-PIE executables, and a
different one for DSOs. GNU/Linux, on the other hand, uses one set of crt*.o
for non-PIE executables, and another for both PIE executables and DSOs.

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

12 years agoRevert Ted's r163489 and r163490, due to breakage.
NAKAMURA Takumi [Mon, 10 Sep 2012 09:17:27 +0000 (09:17 +0000)]
Revert Ted's r163489 and r163490, due to breakage.

r163489, "Take another crack at stabilizing the emission order of analyzer"
r163490, "Use isBeforeInTranslationUnitThan() instead of operator<."

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

12 years agoMIPS: Use -march=arch option to select either generic MIPS ISA,
Simon Atanasyan [Mon, 10 Sep 2012 08:32:41 +0000 (08:32 +0000)]
MIPS: Use -march=arch option to select either generic MIPS ISA,
or the name of a particular processor.

The patch reviewed by Douglas Gregor.

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

12 years agoUse isBeforeInTranslationUnitThan() instead of operator<.
Ted Kremenek [Mon, 10 Sep 2012 06:56:07 +0000 (06:56 +0000)]
Use isBeforeInTranslationUnitThan() instead of operator<.

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

12 years agoTake another crack at stabilizing the emission order of analyzer
Ted Kremenek [Mon, 10 Sep 2012 06:20:06 +0000 (06:20 +0000)]
Take another crack at stabilizing the emission order of analyzer
diagnostics without using FoldingSetNodeIDs.  This is done
by doing a complete recursive comparison of the PathDiagnostics.

Note that the previous method of comparing FoldingSetNodeIDs did
not end up relying on unstable things such as pointer addresses, so
I suspect this may still have some issues on various buildbots because
I'm not sure if the true source of non-determinism has been eliminated.
The tests pass for me, so the only way to know is to commit this change
and see what happens.

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

12 years agoHave PathDiagnosticPiece::getString() return a StringRef instead
Ted Kremenek [Mon, 10 Sep 2012 06:19:53 +0000 (06:19 +0000)]
Have PathDiagnosticPiece::getString() return a StringRef instead
of a std::string.

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

12 years agoIndent the "message" key in analyzer plist output.
Ted Kremenek [Mon, 10 Sep 2012 06:19:43 +0000 (06:19 +0000)]
Indent the "message" key in analyzer plist output.

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

12 years agoAdd handy script for updating plist FileCheck expected output for
Ted Kremenek [Mon, 10 Sep 2012 06:19:34 +0000 (06:19 +0000)]
Add handy script for updating plist FileCheck expected output for
analyzer tests.

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

12 years agoRawCommentList: don't copy the whole new RawComment to LastComment each time.
Dmitri Gribenko [Sun, 9 Sep 2012 20:47:31 +0000 (20:47 +0000)]
RawCommentList: don't copy the whole new RawComment to LastComment each time.
We just need a single SourceLocation for previous comment end.

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

12 years agoRemove dead method ProgramState::MarshalState().
Ted Kremenek [Sun, 9 Sep 2012 14:55:59 +0000 (14:55 +0000)]
Remove dead method ProgramState::MarshalState().

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

12 years agoAdded missing const.
Abramo Bagnara [Sun, 9 Sep 2012 10:21:24 +0000 (10:21 +0000)]
Added missing const.

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

12 years agoFixed support for disabled wchar_t and added an appropriate test.
Abramo Bagnara [Sun, 9 Sep 2012 10:13:32 +0000 (10:13 +0000)]
Fixed support for disabled wchar_t and added an appropriate test.

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

12 years agoclang/test/Sema/format-strings-scanf.c: Relax a couple of expressions with expected...
NAKAMURA Takumi [Sat, 8 Sep 2012 12:06:00 +0000 (12:06 +0000)]
clang/test/Sema/format-strings-scanf.c: Relax a couple of expressions with expected-warning-re to let matched for Win32 targets.

- format specifies type 'wchar_t **' (aka 'int **') but the argument has type 'float *'
- format specifies type 'wchar_t **' (aka 'unsigned short **') but the argument has type 'float *'

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

12 years agoAdd some ARM EABI preprocessor builtins tests
Anton Korobeynikov [Sat, 8 Sep 2012 08:45:10 +0000 (08:45 +0000)]
Add some ARM EABI preprocessor builtins tests

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

12 years agoDo not construct StringRef from NULL argument.
Anton Korobeynikov [Sat, 8 Sep 2012 08:22:13 +0000 (08:22 +0000)]
Do not construct StringRef from NULL argument.

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

12 years agoProvide some ACLE C defines. This should fix PR13796
Anton Korobeynikov [Sat, 8 Sep 2012 08:08:27 +0000 (08:08 +0000)]
Provide some ACLE C defines. This should fix PR13796

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

12 years agoTry disabling the FileCheck part of the retain-release.m test to see if it fixes...
Ted Kremenek [Sat, 8 Sep 2012 07:40:15 +0000 (07:40 +0000)]
Try disabling the FileCheck part of the retain-release.m test to see if it fixes the buildbots.

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

12 years agoFix bug in BugReporter::RemoveUneededCalls() where "prunable"
Ted Kremenek [Sat, 8 Sep 2012 07:18:18 +0000 (07:18 +0000)]
Fix bug in BugReporter::RemoveUneededCalls() where "prunable"
PathDiagnosticEventPieces were *always* pruned.  Instead, they
are suppose to only be pruned if the entire call gets pruned.

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

12 years agoWhen a bad UTF-8 encoding or bogus escape sequence is encountered in a
Richard Smith [Sat, 8 Sep 2012 07:16:20 +0000 (07:16 +0000)]
When a bad UTF-8 encoding or bogus escape sequence is encountered in a
string literal, produce a diagnostic pointing at the erroneous character
range, not at the start of the literal.

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

12 years agoThis test does not require --exact-match from FileCheck.
Ted Kremenek [Sat, 8 Sep 2012 04:29:08 +0000 (04:29 +0000)]
This test does not require --exact-match from FileCheck.

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

12 years agoAttempt (again) to stabilize the order of the emission of diagnostics
Ted Kremenek [Sat, 8 Sep 2012 04:26:37 +0000 (04:26 +0000)]
Attempt (again) to stabilize the order of the emission of diagnostics
of the analyzer by using the FullProfile() of a PathDiagnostic
for ordering them.

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

12 years agoFormat strings: suggest %lld instead of %qd and %Ld with -Wformat-non-iso.
Jordan Rose [Sat, 8 Sep 2012 04:00:12 +0000 (04:00 +0000)]
Format strings: suggest %lld instead of %qd and %Ld with -Wformat-non-iso.

As a corollary to the previous commit, even when an extension is
available, we can still offer a fixit to the standard modifier.

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

12 years agoFormat strings: %Ld isn't available on Darwin or Windows.
Jordan Rose [Sat, 8 Sep 2012 04:00:03 +0000 (04:00 +0000)]
Format strings: %Ld isn't available on Darwin or Windows.

This seems to be a GNU libc extension; we offer a fixit to %lld on
these platforms.

<rdar://problem/11518237>

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

12 years ago-fcatch-undefined-behavior: Factor emission of the creation of, and branch to,
Richard Smith [Sat, 8 Sep 2012 02:08:36 +0000 (02:08 +0000)]
-fcatch-undefined-behavior: Factor emission of the creation of, and branch to,
the trap BB out of the individual checks and into a common function, to prepare
for making this code call into a runtime library. Rename the existing EmitCheck
to EmitTypeCheck to clarify it and to move it out of the way of the new
EmitCheck.

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

12 years ago[analyzer] ObjCSelfInitChecker should always clean up in postCall checks.
Jordan Rose [Sat, 8 Sep 2012 01:47:28 +0000 (01:47 +0000)]
[analyzer] ObjCSelfInitChecker should always clean up in postCall checks.

ObjCSelfInitChecker stashes information in the GDM to persist it across
function calls; it is stored in pre-call checks and retrieved post-call.
The post-call check is supposed to clear out the stored state, but was
failing to do so in cases where the call did not have a symbolic return
value.

This was actually causing the inappropriate cache-out from r163361.
Per discussion with Anna, we should never actually cache out when
assuming the receiver of an Objective-C message is non-nil, because
we guarded that node generation by checking that the state has changed.
Therefore, the only states that could reach this exact ExplodedNode are
ones that should have merged /before/ making this assumption.

r163361 has been reverted and the test case removed, since it won't
actually test anything interesting now.

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

12 years ago[analyzer] Add debug output for ObjCSelfInitChecker's state.
Jordan Rose [Sat, 8 Sep 2012 01:47:11 +0000 (01:47 +0000)]
[analyzer] Add debug output for ObjCSelfInitChecker's state.

No functionality change.

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

12 years agoRevert "Add plist output for retain-release.m in addition to -verify checking."
Ted Kremenek [Sat, 8 Sep 2012 01:25:02 +0000 (01:25 +0000)]
Revert "Add plist output for retain-release.m in addition to -verify checking."

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

12 years agoRevert "Attempt to make the PathDiagnostic emission order more deterministic by"
Ted Kremenek [Sat, 8 Sep 2012 01:25:00 +0000 (01:25 +0000)]
Revert "Attempt to make the PathDiagnostic emission order more deterministic by"

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

12 years agoRevert "Further tweaks to hopefully make the PathDiagnostic emission more deterministic."
Ted Kremenek [Sat, 8 Sep 2012 01:24:53 +0000 (01:24 +0000)]
Revert "Further tweaks to hopefully make the PathDiagnostic emission more deterministic."

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

12 years ago[analyzer] Remove constraints on dead symbols as part of removeDeadBindings.
Jordan Rose [Sat, 8 Sep 2012 01:24:53 +0000 (01:24 +0000)]
[analyzer] Remove constraints on dead symbols as part of removeDeadBindings.

Previously, we'd just keep constraints around forever, which means we'd
never be able to merge paths that differed only in constraints on dead
symbols.

Because we now allow constraints on symbolic expressions, not just single
symbols, this requires changing SymExpr::symbol_iterator to include
intermediate symbol nodes in its traversal, not just the SymbolData leaf
nodes.

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

12 years ago[analyzer] Symbolic regions are live if any subregions are live.
Jordan Rose [Sat, 8 Sep 2012 01:24:49 +0000 (01:24 +0000)]
[analyzer] Symbolic regions are live if any subregions are live.

RegionStoreManager was only treating a SymbolicRegion's symbel as live
if there was a binding referring to the region itself.

No test case because constraints are currently not being cleaned out
of the constraint manager at all (even if the symbol is legitimately dead).

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

12 years ago[analyzer] Cast the result of a placement new-expression to the correct type.
Jordan Rose [Sat, 8 Sep 2012 01:24:38 +0000 (01:24 +0000)]
[analyzer] Cast the result of a placement new-expression to the correct type.

This is necessary because further analysis will assume that the SVal's
type matches the AST type. This caused a crash when trying to perform
a derived-to-base cast on a C++ object that had been new'd to be another
object type.

Yet another crash in PR13763.

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

12 years ago[analyzer] Address John's code review for r163407.
Anna Zaks [Sat, 8 Sep 2012 00:09:02 +0000 (00:09 +0000)]
[analyzer] Address John's code review for r163407.

Teach malloc sizeof checker to find type inconsistencies in multi-
dimensional arrays.

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

12 years agoobjective-C: introduce __attribute((objc_requires_super)) on method
Fariborz Jahanian [Fri, 7 Sep 2012 23:46:23 +0000 (23:46 +0000)]
objective-C: introduce __attribute((objc_requires_super)) on method
in classes. Use it to flag those method implementations which don't
contain call to 'super' if they have 'super' class and it has the method
with this attribute set. This is wip. // rdar://6386358

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

12 years agoIn ARC, if we're emitting assembly markers for calls to
John McCall [Fri, 7 Sep 2012 23:30:50 +0000 (23:30 +0000)]
In ARC, if we're emitting assembly markers for calls to
objc_retainAutoreleasedReturnValue, we need to also be killing
them during return peepholing.  Make sure we recognize an
intervening bitcast, but more importantly, assert if we can't
find the asm marker at all.  rdar://problem/12133032

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

12 years agoFurther tweaks to hopefully make the PathDiagnostic emission more deterministic.
Ted Kremenek [Fri, 7 Sep 2012 23:13:11 +0000 (23:13 +0000)]
Further tweaks to hopefully make the PathDiagnostic emission more deterministic.

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

12 years agoFixed http://llvm.org/bugs/show_bug.cgi?id=13777
Alexander Kornienko [Fri, 7 Sep 2012 22:44:34 +0000 (22:44 +0000)]
Fixed http://llvm.org/bugs/show_bug.cgi?id=13777

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

12 years agoRemove ProgramState::getSymVal(). It was being misused by Checkers,
Ted Kremenek [Fri, 7 Sep 2012 22:31:01 +0000 (22:31 +0000)]
Remove ProgramState::getSymVal().  It was being misused by Checkers,
with at least one subtle bug in MacOSXKeyChainAPIChecker where the
calling the method was a substitute for assuming a symbolic value
was null (which is not the case).

We still keep ConstraintManager::getSymVal(), but we use that as
an optimization in SValBuilder and ProgramState::getSVal() to
constant-fold SVals.  This is only if the ConstraintManager can
provide us with that information, which is no longer a requirement.
As part of this, introduce a default implementation of
ConstraintManager::getSymVal() which returns null.

For Checkers, introduce ConstraintManager::isNull(), which queries
the state to see if the symbolic value is constrained to be a null
value.  It does this without assuming it has been implicitly constant
folded.

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

12 years agoAttempt to make the PathDiagnostic emission order more deterministic by
Ted Kremenek [Fri, 7 Sep 2012 22:24:24 +0000 (22:24 +0000)]
Attempt to make the PathDiagnostic emission order more deterministic by
looking at PathPieces.

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

12 years agoAdd default implementation of ConstraintManager::getSymVal() and a doxygen comment.
Ted Kremenek [Fri, 7 Sep 2012 22:24:21 +0000 (22:24 +0000)]
Add default implementation of ConstraintManager::getSymVal() and a doxygen comment.

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

12 years agoRemove ConstraintManager:isEqual(). It is no longer used.
Ted Kremenek [Fri, 7 Sep 2012 22:24:18 +0000 (22:24 +0000)]
Remove ConstraintManager:isEqual().  It is no longer used.

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

12 years agoAdd plist output for retain-release.m in addition to -verify checking.
Ted Kremenek [Fri, 7 Sep 2012 20:31:32 +0000 (20:31 +0000)]
Add plist output for retain-release.m in addition to -verify checking.

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

12 years agoAmpersand goes with identifier.
Chad Rosier [Fri, 7 Sep 2012 19:49:55 +0000 (19:49 +0000)]
Ampersand goes with identifier.

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

12 years ago[analyzer] Use cast<> instead of getAs<> for a CFGElement known to be a CFGStmt.
Jordan Rose [Fri, 7 Sep 2012 19:48:09 +0000 (19:48 +0000)]
[analyzer] Use cast<> instead of getAs<> for a CFGElement known to be a CFGStmt.

When adding the next statement to the CoreEngine's work list, we take care
of all the special cases first. We certainly shouldn't be building
PostStmts with null statements (the diagnostics machinery assumes such
StmtPoints do not exist), and we should find out sooner if we're missing
a special case.

A refinement of r163402 that should help prevent further issues like PR13760.

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

12 years agoMoved back getCharAndSizeNoWarn to public area.
Abramo Bagnara [Fri, 7 Sep 2012 19:43:13 +0000 (19:43 +0000)]
Moved back getCharAndSizeNoWarn to public area.

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

12 years ago[analyzer] Fix a false positive in sizeof malloc checker.
Anna Zaks [Fri, 7 Sep 2012 19:20:13 +0000 (19:20 +0000)]
[analyzer] Fix a false positive in sizeof malloc checker.

Don't warn when the sizeof argument is an array with the same element
type as the pointee of the return type.

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

12 years agoAdd test case for <rdar://problem/12075238>, which recently got fixed by changes...
Ted Kremenek [Fri, 7 Sep 2012 19:09:51 +0000 (19:09 +0000)]
Add test case for <rdar://problem/12075238>, which recently got fixed by changes to RegionStore.

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

12 years agoWhitespace.
Chad Rosier [Fri, 7 Sep 2012 18:46:57 +0000 (18:46 +0000)]
Whitespace.

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

12 years agoBring buildbots back. Fix scoping issue and coding style from r163397.
Chad Rosier [Fri, 7 Sep 2012 18:44:15 +0000 (18:44 +0000)]
Bring buildbots back.  Fix scoping issue and coding style from r163397.

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

12 years ago[analyzer] Don't use the address of a temporary CFGElement.
Jordan Rose [Fri, 7 Sep 2012 18:36:17 +0000 (18:36 +0000)]
[analyzer] Don't use the address of a temporary CFGElement.

GCC destroys temporary objects more aggressively than clang, so this
results in incorrect behavior when compiling GCC Release builds.

We could avoid this issue under C++11 by preventing getAs from being
called when 'this' is an rvalue:

  template<class ElemTy> const ElemTy *getAs() const & { ... }
  template<class ElemTy> const ElemTy *getAs() const && = delete;

Unfortunately, we do not have compatibility macros for this behavior yet.

This will hopefully fix PR13760 and PR13762.

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

12 years agoThread-safety analysis: Add support for selectively turning off warnings
DeLesley Hutchins [Fri, 7 Sep 2012 17:34:53 +0000 (17:34 +0000)]
Thread-safety analysis:  Add support for selectively turning off warnings
within part of a particular method.

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

12 years ago[analyzer] Explain why we need condition 8.
Anna Zaks [Fri, 7 Sep 2012 16:22:09 +0000 (16:22 +0000)]
[analyzer] Explain why we need condition 8.

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

12 years agoAttempt to pacify Windows buildbots.
Roman Divacky [Fri, 7 Sep 2012 13:52:05 +0000 (13:52 +0000)]
Attempt to pacify Windows buildbots.

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

12 years agoLink to crtend.S when PIE in the FreeBSD driver. Patch by Brooks Davis!
Roman Divacky [Fri, 7 Sep 2012 13:36:21 +0000 (13:36 +0000)]
Link to crtend.S when PIE in the FreeBSD driver. Patch by Brooks Davis!

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

12 years agoAdds a first iteration of the basic AST matcher documentation landing page.
Manuel Klimek [Fri, 7 Sep 2012 13:13:53 +0000 (13:13 +0000)]
Adds a first iteration of the basic AST matcher documentation landing page.

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

12 years agoIntroduces anchors into LibASTMatchersReference.html.
Manuel Klimek [Fri, 7 Sep 2012 13:10:32 +0000 (13:10 +0000)]
Introduces anchors into LibASTMatchersReference.html.

This allows linking to LibASTMatchersRefernce.html#<matcher><N>Anchor to
link to the N'the declaration of a matcher and automatically expand
its documentation.

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

12 years agoChange the behavior of the isDerivedFrom-matcher to not match on the
Daniel Jasper [Fri, 7 Sep 2012 12:48:17 +0000 (12:48 +0000)]
Change the behavior of the isDerivedFrom-matcher to not match on the
class itself. This caused some confusion (intuitively, a class is not
derived from itself) and makes it hard to write certain matchers, e.g.
"match and bind any pair of base and subclass".

The original behavior can be achieved with a new isA-matcher.  Similar
to all other matchers, this matcher has the same behavior and name as
the corresponding AST-entity - in this case the isa<>() function.

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

12 years agoImplements hasAncestor.
Manuel Klimek [Fri, 7 Sep 2012 09:26:10 +0000 (09:26 +0000)]
Implements hasAncestor.

Implements the hasAncestor matcher. This builds
on the previous patch that introduced DynTypedNode to build up
a parent map for an additional degree of freedom in the AST traversal.

The map is only built once we hit an hasAncestor matcher, in order
to not slow down matching for cases where this is not needed.

We could implement some speed-ups for special cases, like building up
the parent map as we go and only building up the full map if we break
out of the already visited part of the tree, but that is probably
not going to be worth it, and would make the code significantly more
complex.

Major TODOs are:
- implement hasParent
- implement type traversal
- implement memoization in hasAncestor

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

12 years agoRevert "Rework the retain-release.m test to use FileCheck and the "text" output"
Ted Kremenek [Fri, 7 Sep 2012 07:40:40 +0000 (07:40 +0000)]
Revert "Rework the retain-release.m test to use FileCheck and the "text" output"

Apparently the output of this test is not deterministic.  Needs investigation.

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

12 years agoFix off-by-one bug in diagnostic prose of ObjCContainersASTChecker.
Ted Kremenek [Fri, 7 Sep 2012 07:13:08 +0000 (07:13 +0000)]
Fix off-by-one bug in diagnostic prose of ObjCContainersASTChecker.
While the check itself should count 0-based for the parameter index,
the diagnostic should be 1-based (first, second, third, not start at 0).

Fixes <rdar://problem/12249569>.

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

12 years agoExplodedGraph::shouldCollectNode() should not collect nodes for non-Expr Stmts
Ted Kremenek [Fri, 7 Sep 2012 06:56:18 +0000 (06:56 +0000)]
ExplodedGraph::shouldCollectNode() should not collect nodes for non-Expr Stmts
(as this previously was the case before this was refactored).  We also shouldn't
need to specially handle BinaryOperators since the eagerly-assume heuristic tags
such nodes.

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

12 years agoRework the retain-release.m test to use FileCheck and the "text" output
Ted Kremenek [Fri, 7 Sep 2012 06:51:47 +0000 (06:51 +0000)]
Rework the retain-release.m test to use FileCheck and the "text" output
of the analyzer, as the RetainReleaseChecker has many fine-grain
path diagnostic events that were not being checked.  This uncovered
an inconsistency between the path diagnostics between Objective-C
and Objective-C++ code in ConditionBRVisitor that was fixed in a recent
patch.

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

12 years agoFix bug in ConditionBRVisitor where for C++ (and not C) we were not ignoring
Ted Kremenek [Fri, 7 Sep 2012 06:51:37 +0000 (06:51 +0000)]
Fix bug in ConditionBRVisitor where for C++ (and not C) we were not ignoring
implicit pointer-to-boolean conversions in condition expressions.  This would
result in inconsistent diagnostic emission between C and C++.

A consequence of this is now ConditionBRVisitor and TrackConstraintBRVisitor may
emit redundant diagnostics, for example:

  "Assuming pointer value is null" (TrackConstraintBRVisitor)
  "Assuming 'p' is null" (ConditionBRVisitor)

We need to reconcile the two, and perhaps prefer one over the other in some
cases.

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

12 years agoPR9023: A template template parameter whose template parameter list contains an
Richard Smith [Fri, 7 Sep 2012 02:06:42 +0000 (02:06 +0000)]
PR9023: A template template parameter whose template parameter list contains an
unexpanded parameter pack is a pack expansion. Thus, as with a non-type template
parameter which is a pack expansion, it needs to be expanded early into a fixed
list of template parameters.

Since the expanded list of template parameters is not itself a parameter pack,
it is permitted to appear before the end of the template parameter list, so also
remove that restriction (for both template template parameter pack expansions and
non-type template parameter pack expansions).

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