]> granicus.if.org Git - clang/log
clang
12 years agoRestrict the set of declaration kinds for which we allow trailing comments.
Dmitri Gribenko [Fri, 6 Jul 2012 23:27:33 +0000 (23:27 +0000)]
Restrict the set of declaration kinds for which we allow trailing comments.

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

12 years agoImplement -Wpedantic and --no-pedantic to complement -Weverything.
Ted Kremenek [Fri, 6 Jul 2012 23:07:31 +0000 (23:07 +0000)]
Implement -Wpedantic and --no-pedantic to complement -Weverything.

This patch introduces some magic in tablegen to create a "Pedantic" diagnostic
group which automagically includes all warnings that are extensions.  This
allows a user to suppress specific warnings traditionally under -pedantic used
an ordinary warning flag.  This also allows users to use #pragma to silence
specific -pedantic warnings, or promote them to errors, within blocks of text
(just like any other warning).

-Wpedantic is NOT an alias for -pedantic.  Instead, it provides another way
to (a) activate -pedantic warnings and (b) disable them.  Where they differ
is that -pedantic changes the behavior of the preprocessor slightly, whereas
-Wpedantic does not (it just turns on the warnings).

The magic in the tablegen diagnostic emitter has to do with computing the minimal
set of diagnostic groups and diagnostics that should go into -Wpedantic, as those
diagnostics that already members of groups that themselves are (transitively) members
of -Wpedantic do not need to be included in the Pedantic group directly.  I went
back and forth on whether or not to magically generate this group, and the invariant
was that we always wanted extension warnings to be included in -Wpedantic "some how",
but the bookkeeping would be very onerous to manage by hand.

-no-pedantic (and --no-pedantic) is included for completeness, and matches many of the
same kind of flags the compiler already supports.  It does what it says: cancels out
-pedantic.  One discrepancy is that if one specifies --no-pedantic and -Weverything or
-Wpedantic the pedantic warnings are still enabled (essentially the -W flags win).  We
can debate the correct behavior here.

Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp
that determine whether to include the "-pedantic" flag in the warning output.  This is
no longer needed, as all extensions now have a -W flag.

This patch also significantly reduces the number of warnings not under flags from 229
to 158 (all extension warnings).  That's a 31% reduction.

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

12 years ago[analyzer] Fix mis-committed test. No functionality change.
Jordan Rose [Fri, 6 Jul 2012 22:10:39 +0000 (22:10 +0000)]
[analyzer] Fix mis-committed test. No functionality change.

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

12 years agoConstify the argument to SourceLocation::getFromPtrEncoding.
Jordan Rose [Fri, 6 Jul 2012 22:00:04 +0000 (22:00 +0000)]
Constify the argument to SourceLocation::getFromPtrEncoding.

This allows SourceLocations to be stored in generic "data" fields
that are typed as "const void *" and are also used to point to
const objects.

Really we should probably be returning a const pointer from
getPtrEncoding as well, but in some places we want to store
SourceLocations in the same generic "data" field as proper
pointers to /mutable/ objects. Oh well.

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

12 years ago[analyzer] Add comments to Calls.h.
Jordan Rose [Fri, 6 Jul 2012 22:00:01 +0000 (22:00 +0000)]
[analyzer] Add comments to Calls.h.

No functionality change.

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

12 years ago[analyzer] Be careful about LazyCompoundVals, which may be for the first field.
Jordan Rose [Fri, 6 Jul 2012 21:59:56 +0000 (21:59 +0000)]
[analyzer] Be careful about LazyCompoundVals, which may be for the first field.

We use LazyCompoundVals to avoid copying the contents of structs and arrays
around in the store, and when we need to pass a struct around that already
has a LazyCompoundVal we just use the original one. However, it's possible
that the first field of a struct may have a LazyCompoundVal of its own, and
we currently can't distinguish a LazyCompoundVal for the first element of a
struct from a LazyCompoundVal for the entire struct. In this case we should
just drop the optimization and make a new LazyCompoundVal that encompasses
the old one.

PR13264 / <rdar://problem/11802440>

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

12 years agoSprinkle llvm_unreachable around to placate GCC's -Wreturn-type.
Matt Beaumont-Gay [Fri, 6 Jul 2012 21:13:09 +0000 (21:13 +0000)]
Sprinkle llvm_unreachable around to placate GCC's -Wreturn-type.

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

12 years agoobjc-arc: warn when assigning retained object to
Fariborz Jahanian [Fri, 6 Jul 2012 21:09:27 +0000 (21:09 +0000)]
objc-arc: warn when assigning retained object to
a 'weak' property just as we do the same for
'weak' variables. // rdar://11814185

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

12 years agoobjective-c++11: extend c++11 range-based loop to iterate
Fariborz Jahanian [Fri, 6 Jul 2012 19:04:04 +0000 (19:04 +0000)]
objective-c++11: extend c++11 range-based loop to iterate
over objective-c container collection. // rdar://9293227

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

12 years agoDon't store pointers into a std::vector (RawCommentList::Comments). Although
Dmitri Gribenko [Fri, 6 Jul 2012 18:19:34 +0000 (18:19 +0000)]
Don't store pointers into a std::vector (RawCommentList::Comments).  Although
currently we take address of std::vector's contents only after we finished
adding all comments (so no reallocation can happen), this will change in
future.

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

12 years agoStop using new[] on llvm::BumpPtrAllocator.
Dmitri Gribenko [Fri, 6 Jul 2012 16:41:59 +0000 (16:41 +0000)]
Stop using new[] on llvm::BumpPtrAllocator.

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

12 years agoUse C++ cast.
Dmitri Gribenko [Fri, 6 Jul 2012 15:40:08 +0000 (15:40 +0000)]
Use C++ cast.

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

12 years agoRemove unreachable default case to pacify clang's -Wcovered-switch-default.
Benjamin Kramer [Fri, 6 Jul 2012 15:27:25 +0000 (15:27 +0000)]
Remove unreachable default case to pacify clang's -Wcovered-switch-default.

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

12 years agoASTContext.cpp: Appease msvc to cast NULL to typed pointer, or msvc mistakes NULL...
NAKAMURA Takumi [Fri, 6 Jul 2012 11:51:12 +0000 (11:51 +0000)]
ASTContext.cpp: Appease msvc to cast NULL to typed pointer, or msvc mistakes NULL as int.

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

12 years agoclang/test/CodeGen/fp-contract.c: It requires ppc32!
NAKAMURA Takumi [Fri, 6 Jul 2012 11:11:27 +0000 (11:11 +0000)]
clang/test/CodeGen/fp-contract.c: It requires ppc32!

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

12 years ago[cindex.py] Fix erroneous comment for CompileCommands
Arnaud A. de Grandmaison [Fri, 6 Jul 2012 08:22:05 +0000 (08:22 +0000)]
[cindex.py] Fix erroneous comment for CompileCommands

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

12 years agoAnother fix for the configure build: correct order of dependencies.
Manuel Klimek [Fri, 6 Jul 2012 08:13:45 +0000 (08:13 +0000)]
Another fix for the configure build: correct order of dependencies.

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

12 years agoBuild-fix: Remove non-existent directories from Makefiles.
Manuel Klimek [Fri, 6 Jul 2012 06:00:30 +0000 (06:00 +0000)]
Build-fix: Remove non-existent directories from Makefiles.

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

12 years agoAdds the AST Matcher library, which provides a in-C++ DSL to express
Manuel Klimek [Fri, 6 Jul 2012 05:48:52 +0000 (05:48 +0000)]
Adds the AST Matcher library, which provides a in-C++ DSL to express
matches on interesting parts of the AST, and callback mechanisms to
act on them.

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

12 years agoCommentParser.cpp: remove unused variable.
Dmitri Gribenko [Fri, 6 Jul 2012 01:14:58 +0000 (01:14 +0000)]
CommentParser.cpp: remove unused variable.

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

12 years agoForgot to rename one use of FPContractModeTy
Lang Hames [Fri, 6 Jul 2012 01:10:46 +0000 (01:10 +0000)]
Forgot to rename one use of FPContractModeTy

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

12 years agoAdd -ffp-contract = { fast | on | off } command line option support.
Lang Hames [Fri, 6 Jul 2012 00:59:19 +0000 (00:59 +0000)]
Add -ffp-contract = { fast | on | off }   command line option support.

This flag sets the 'fp-contract' mode, which controls the formation of fused
floating point operations. Available modes are:

- Fast: Form fused operations anywhere.
- On: Form fused operations where allowed by FP_CONTRACT. This is the default
      mode.
- Off: Don't form fused operations (in future this may be relaxed to forming
       fused operations where it can be proved that the result won't be
       affected).

Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off'
modes are equivalent.

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

12 years agoComment.h: correct identation
Dmitri Gribenko [Fri, 6 Jul 2012 00:45:54 +0000 (00:45 +0000)]
Comment.h: correct identation

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

12 years agoAdded a new memberfor Parser, to be used soon
Fariborz Jahanian [Fri, 6 Jul 2012 00:42:20 +0000 (00:42 +0000)]
Added a new memberfor Parser, to be used soon
for doing delayed parsing of c++ method defined in
objc class implementations.

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

12 years agoImplement AST classes for comments, a real parser for Doxygen comments and a
Dmitri Gribenko [Fri, 6 Jul 2012 00:28:32 +0000 (00:28 +0000)]
Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
  or verbatim command.
* Inline content is placed within some block.  Inline content includes plain
  text, inline commands and HTML as tag soup.

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

12 years ago[objcmt] Check for classes that accept 'objectForKey:' (or the other selectors
Argyrios Kyrtzidis [Fri, 6 Jul 2012 00:07:09 +0000 (00:07 +0000)]
[objcmt] Check for classes that accept 'objectForKey:' (or the other selectors
that the migrator handles) but return their instances as 'id', resulting
in the compiler resolving 'objectForKey:' as the method from NSDictionary.

When checking if we can convert to subscripting syntax, check whether
the receiver is a result of a class method from a hardcoded list of
such classes. In such a case return the specific class as the interface
of the receiver.

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

12 years agoobjective-c: don't involve properties when checking
Fariborz Jahanian [Thu, 5 Jul 2012 22:26:07 +0000 (22:26 +0000)]
objective-c: don't involve properties when checking
under -Wsuper-class-method-mismatch for method
mismatches in current and suprt class.
// rdar://11793793

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

12 years ago[objcmt] Allow migrating to subscripting syntax for other classes
Argyrios Kyrtzidis [Thu, 5 Jul 2012 21:49:51 +0000 (21:49 +0000)]
[objcmt] Allow migrating to subscripting syntax for other classes
(apart from NSDictionary/NSArray) that implement objectForKey:/objectAtIndex/etc.
and the subscripting methods as well.

Part of rdar://11734969

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

12 years agoThread-safety analysis: eliminate false positives in case where the definition
DeLesley Hutchins [Thu, 5 Jul 2012 21:16:29 +0000 (21:16 +0000)]
Thread-safety analysis: eliminate false positives in case where the definition
duplicates attributes on the declaration.  Also eliminates a false negative in
ReleasableMutexLock.  Fixing this bug required some refactoring.

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

12 years ago[analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer...
Anna Zaks [Thu, 5 Jul 2012 20:44:02 +0000 (20:44 +0000)]
[analyzer] Add a statistic for maximum CFG size and a script to summarize analyzer stats from scan-build output.

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

12 years agoMIPS: Define __mips_dsp_rev / __mips_dspr2 / __mips_dsp macros
Simon Atanasyan [Thu, 5 Jul 2012 20:16:22 +0000 (20:16 +0000)]
MIPS: Define __mips_dsp_rev / __mips_dspr2 /  __mips_dsp macros
if -mdsp or -mdspr2 options are provided.

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

12 years agoobjective-c++ parsing. Turn off delayed parsing
Fariborz Jahanian [Thu, 5 Jul 2012 19:34:20 +0000 (19:34 +0000)]
objective-c++ parsing. Turn off delayed parsing
of out-of-line c++ method definition which happens
to be inside an objc class implementation
until I can figure out how to do it. This is to fix
a broken project.

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

12 years agoMIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.
Simon Atanasyan [Thu, 5 Jul 2012 19:23:00 +0000 (19:23 +0000)]
MIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.

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

12 years agoMIPS: Factor out the code converting command line options to target features.
Simon Atanasyan [Thu, 5 Jul 2012 18:51:43 +0000 (18:51 +0000)]
MIPS: Factor out the code converting command line options to target features.

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

12 years agoRelease notes for r158230 "Disallow using ObjC literals in direct comparisons"
Jordan Rose [Thu, 5 Jul 2012 18:48:30 +0000 (18:48 +0000)]
Release notes for r158230 "Disallow using ObjC literals in direct comparisons"

This may turn out to be a controversial change, due to string literals being
uniqued at link time, but Apple's docs only say "The compiler makes such
object constants unique on a per-module basis..."[1] without actually saying
what a "module" is. (It's not a clang module.) Furthermore, this uniqueness
guarantee often can't be guaranteed once the string has been passed through
framework code.

If this does turn out very controversial, we could downgrade this to a
DefaultError warning for strings, and leave it as a true Error for other
kinds of literals.

(<rdar://problem/11300873>)

[1]: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/CreatingStrings.html

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

12 years agoAdapts the FrontendAction convenience functions so that it can be
Manuel Klimek [Thu, 5 Jul 2012 18:13:01 +0000 (18:13 +0000)]
Adapts the FrontendAction convenience functions so that it can be
used with classes that generate ASTConsumers; this allows decoupling
the ASTConsumer generation from the Frontend library (like, for example,
the MatchFinder in the upcoming ASTMatcher patch).

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

12 years agoMIPS: Define __mips16 macro if -mips16 option is provided.
Simon Atanasyan [Thu, 5 Jul 2012 16:06:06 +0000 (16:06 +0000)]
MIPS: Define __mips16 macro if -mips16 option is provided.

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

12 years agoMIPS: Replace the pair of boolean flags by enumeration to hold selected float ABI.
Simon Atanasyan [Thu, 5 Jul 2012 15:32:46 +0000 (15:32 +0000)]
MIPS: Replace the pair of boolean flags by enumeration to hold selected float ABI.

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

12 years agoMIPS: Add -mips16 / -mno-mips16 command line support.
Simon Atanasyan [Thu, 5 Jul 2012 14:19:39 +0000 (14:19 +0000)]
MIPS: Add -mips16 / -mno-mips16 command line support.

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

12 years agoGive test check tags consistent names.
Simon Atanasyan [Thu, 5 Jul 2012 11:30:19 +0000 (11:30 +0000)]
Give test check tags consistent names.

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

12 years agoPR13273: When performing list-initialization with an empty initializer list,
Richard Smith [Thu, 5 Jul 2012 08:39:21 +0000 (08:39 +0000)]
PR13273: When performing list-initialization with an empty initializer list,
actually perform value initialization rather than trying to fake it with a call
to the default constructor. Fixes various bugs related to the previously-missing
zero-initialization in this case.

I've also moved this and the other list initialization 'special case' from
TryConstructorInitialization into TryListInitialization where they belong.

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

12 years agoFix some memory leaks found by the static analyzer. Thanks to John Smith for running...
Richard Smith [Thu, 5 Jul 2012 08:20:49 +0000 (08:20 +0000)]
Fix some memory leaks found by the static analyzer. Thanks to John Smith for running it over Clang.

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

12 years agoUpdate unittests for include change.
Benjamin Kramer [Wed, 4 Jul 2012 20:33:53 +0000 (20:33 +0000)]
Update unittests for include change.

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

12 years agoDrop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.
Benjamin Kramer [Wed, 4 Jul 2012 20:19:54 +0000 (20:19 +0000)]
Drop the ASTContext.h include from DeclFriend.h and DeclTemplate.h.

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

12 years agoRemove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.
Benjamin Kramer [Wed, 4 Jul 2012 18:45:14 +0000 (18:45 +0000)]
Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.

No functionality change.

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

12 years agoDrop the ASTContext.h include from Stmt.h and fix up transitive users.
Benjamin Kramer [Wed, 4 Jul 2012 17:04:04 +0000 (17:04 +0000)]
Drop the ASTContext.h include from Stmt.h and fix up transitive users.

This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.

ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h

Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.

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

12 years agoSplit out the "empty" case for compound statement into a separate ctor.
Benjamin Kramer [Wed, 4 Jul 2012 17:03:41 +0000 (17:03 +0000)]
Split out the "empty" case for compound statement into a separate ctor.

Move the ASTContext-dependent version out of line.

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

12 years agoCXXRecordDecl: Split getBases/getVBases into a slow and a fast path.
Benjamin Kramer [Wed, 4 Jul 2012 17:03:33 +0000 (17:03 +0000)]
CXXRecordDecl: Split getBases/getVBases into a slow and a fast path.

This avoids costly computation of getASTContext() and drops the header
dependency from DeclCXX.h to ASTContext.h.

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

12 years agoHoist the logic for selecting the Objective-C dispatch method into the runtime
David Chisnall [Wed, 4 Jul 2012 11:52:24 +0000 (11:52 +0000)]
Hoist the logic for selecting the Objective-C dispatch method into the runtime
class, from the target.  No functionality change, just less duplicated logic.

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

12 years agoA few more cleanups for the GNU family of ObjC runtimes.
David Chisnall [Wed, 4 Jul 2012 10:37:03 +0000 (10:37 +0000)]
A few more cleanups for the GNU family of ObjC runtimes.

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

12 years agoRenamed RawComment kinds to avoid name clash.
Abramo Bagnara [Wed, 4 Jul 2012 07:30:26 +0000 (07:30 +0000)]
Renamed RawComment kinds to avoid name clash.

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

12 years agoMove a comment from the commit message into the code.
Bob Wilson [Wed, 4 Jul 2012 00:18:41 +0000 (00:18 +0000)]
Move a comment from the commit message into the code.

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

12 years agoObj-C++11 parser: handle a fall out of delayed
Fariborz Jahanian [Tue, 3 Jul 2012 23:22:13 +0000 (23:22 +0000)]
Obj-C++11 parser: handle a fall out of delayed
c-function parsing when a declaration with
C++0x braced-init-list is inside an @implementation.

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

12 years ago[analyzer] For now, don't inline non-static member overloaded operators.
Jordan Rose [Tue, 3 Jul 2012 22:55:57 +0000 (22:55 +0000)]
[analyzer] For now, don't inline non-static member overloaded operators.

Our current inlining support (specifically RegionStore::enterStackFrame)
doesn't know that calls to overloaded operators may be calls to non-static
member functions, and that in these cases the first argument should be
treated as 'this'. This caused incorrect results and sometimes crashes.

The long-term fix will be to rewrite RegionStore::enterStackFrame to use
CallEvent and its subclasses, but for now we can just disable these
problematic calls by classifying them under a new CallEvent,
CXXMemberOperatorCall.

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

12 years agoObj-C++11 parser: fix broken parsing of c-function
Fariborz Jahanian [Tue, 3 Jul 2012 22:54:28 +0000 (22:54 +0000)]
Obj-C++11 parser: fix broken parsing of c-function
defined in class implementations.

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

12 years agoObj-C++11 parser: turn off buffering of
Fariborz Jahanian [Tue, 3 Jul 2012 22:29:23 +0000 (22:29 +0000)]
Obj-C++11 parser: turn off buffering of
c-function defined in objc class
implementation for now.

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

12 years agoobjective-c: Refactor parse/sema portion of
Fariborz Jahanian [Tue, 3 Jul 2012 22:00:52 +0000 (22:00 +0000)]
objective-c: Refactor parse/sema portion of
objective-c's fast enumeration statement,
for more work to come.

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

12 years agoRename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
David Chisnall [Tue, 3 Jul 2012 20:49:52 +0000 (20:49 +0000)]
Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
runtime to gnustep from gnu.  Fix EH for the GCC runtime.

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

12 years agoWhen using -pg targeting OS X 10.8, pass -no_new_main to the linker.
Bob Wilson [Tue, 3 Jul 2012 20:42:10 +0000 (20:42 +0000)]
When using -pg targeting OS X 10.8, pass -no_new_main to the linker.

By default on OS X 10.8, we don't link with a crt1.o file and the linker
knows to use _main as the entry point.  But, when compiling with -pg, we
need to link with the gcrt1.o file, and the linker needs to be told to use
the "start" symbol as the entry point.  The -no_new_main linker option does
that last part.  <rdar://problem/11491405>

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

12 years ago[libclang] CompilationDatabase naming and comment fixes
Arnaud A. de Grandmaison [Tue, 3 Jul 2012 20:38:12 +0000 (20:38 +0000)]
[libclang] CompilationDatabase naming and comment fixes

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

12 years agoCommentLexer: remove Markdown tokens from the token list (they are not emitted by...
Dmitri Gribenko [Tue, 3 Jul 2012 20:21:49 +0000 (20:21 +0000)]
CommentLexer: remove Markdown tokens from the token list (they are not emitted by lexer).

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

12 years agoThread safety analysis: improve handling of smart pointers.
DeLesley Hutchins [Tue, 3 Jul 2012 19:47:18 +0000 (19:47 +0000)]
Thread safety analysis: improve handling of smart pointers.

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

12 years agoMake the following changes in the way Mips handles vector arguments and return
Akira Hatanaka [Tue, 3 Jul 2012 19:24:06 +0000 (19:24 +0000)]
Make the following changes in the way Mips handles vector arguments and return
values:

- Return integer vectors in integer registers.
- Pass vector arguments in integer registers.
- Set an upper bound for argument alignment. The largest alignment is 8-byte
  for O32 and 16-byte for N32/64.

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

12 years agoThread Safety Analysis: handle expressions involving temporaries,
DeLesley Hutchins [Tue, 3 Jul 2012 18:25:56 +0000 (18:25 +0000)]
Thread Safety Analysis: handle expressions involving temporaries,
e.g. ExprWithCleanups.

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

12 years agoCommentBriefParser: remove dead store. Found by Clang Analyzer.
Dmitri Gribenko [Tue, 3 Jul 2012 18:10:20 +0000 (18:10 +0000)]
CommentBriefParser: remove dead store.  Found by Clang Analyzer.

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

12 years agoAdd additional architecture defines for PPC targets.
Hal Finkel [Tue, 3 Jul 2012 16:51:04 +0000 (16:51 +0000)]
Add additional architecture defines for PPC targets.

Patch by Andy Gibbs.

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

12 years ago[libclang] Protect against a race condition where a thread
Argyrios Kyrtzidis [Tue, 3 Jul 2012 16:30:52 +0000 (16:30 +0000)]
[libclang] Protect against a race condition where a thread
may be destroying an ASTUnit while cleanupOnDiskMapAtExit is
getting called.

rdar://11781241

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

12 years agoclang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (from getValueAsStr...
NAKAMURA Takumi [Tue, 3 Jul 2012 14:45:09 +0000 (14:45 +0000)]
clang/utils/TableGen/ClangAttrEmitter.cpp: Fix abuse of StringRef (from getValueAsString()).

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

12 years agoSilence warning in -Asserts build
Matt Beaumont-Gay [Tue, 3 Jul 2012 03:55:58 +0000 (03:55 +0000)]
Silence warning in -Asserts build

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

12 years agoShare ConvertUTF8toWide() between Lex and CodeGen.
Nico Weber [Tue, 3 Jul 2012 02:24:52 +0000 (02:24 +0000)]
Share ConvertUTF8toWide() between Lex and CodeGen.

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

12 years agoRename -Wself-assign-memvar to -Wself-assign-field to improve local consistency a...
Nico Weber [Tue, 3 Jul 2012 02:03:06 +0000 (02:03 +0000)]
Rename -Wself-assign-memvar to -Wself-assign-field to improve local consistency a bit.

(cf -Wunused-private-field and several other existing -field diagnostics.)

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

12 years agoRemove a redundant assignment to the FDecl variable from *inside* it's
Chandler Carruth [Tue, 3 Jul 2012 00:15:11 +0000 (00:15 +0000)]
Remove a redundant assignment to the FDecl variable from *inside* it's
initializer.

I really feel like Clang should warn about this, but I can't describe
a good reason. GCC will warn on this in some cases under
-Wsequence-point, but it actually seems like a false positive for that
warning....

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

12 years agoSignificantly simplify CGExprAgg's logic about ignored results:
John McCall [Mon, 2 Jul 2012 23:58:38 +0000 (23:58 +0000)]
Significantly simplify CGExprAgg's logic about ignored results:
if we want to ignore a result, the Dest will be null.  Otherwise,
we must copy into it.  This means we need to ensure a slot when
loading from a volatile l-value.

With all that in place, fix a bug with chained assignments into
__block variables of aggregate type where we were losing insight into
the actual source of the value during the second assignment.

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

12 years agoDocumentation cleanup:
James Dennett [Mon, 2 Jul 2012 23:57:26 +0000 (23:57 +0000)]
Documentation cleanup:
* Added file header documentation with \file and \brief;
* Cleaned up existing doc comments and added/annotated \brief summaries.

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

12 years agoDocumentation cleanup: Delete a duplicated/malformed doc comment.
James Dennett [Mon, 2 Jul 2012 23:56:17 +0000 (23:56 +0000)]
Documentation cleanup: Delete a duplicated/malformed doc comment.

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

12 years ago[libclang] Introduce clang_Cursor_isDynamicCall which,
Argyrios Kyrtzidis [Mon, 2 Jul 2012 23:54:36 +0000 (23:54 +0000)]
[libclang] Introduce clang_Cursor_isDynamicCall which,
given a cursor pointing to a C++ method call or an ObjC message,
returns non-zero if the method/message is "dynamic", meaning:

  For a C++ method: the call is virtual.
  For an ObjC message: the receiver is an object instance, not 'super' or a
  specific class.

rdar://11779185

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

12 years agoobjective-c: just as we have done for method definitions,
Fariborz Jahanian [Mon, 2 Jul 2012 23:37:09 +0000 (23:37 +0000)]
objective-c: just as we have done for method definitions,
c-functions declared in implementation should have their
parsing delayed until the end so, they can access forward
declared private methods. // rdar://10387088

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

12 years ago-Wuninitialized: assume that an __attribute__((returns_twice)) function might
Richard Smith [Mon, 2 Jul 2012 23:23:04 +0000 (23:23 +0000)]
-Wuninitialized: assume that an __attribute__((returns_twice)) function might
initialize any variable. This is extremely conservative, but is sufficient for
now.

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

12 years agoDocumentation cleanup:
James Dennett [Mon, 2 Jul 2012 23:17:34 +0000 (23:17 +0000)]
Documentation cleanup:
* Primarily, added \brief to most of include/clang/Basic, instead of prefixing
  the comments with "DeclaredName - ";
* Made some brief summaries significantly briefer;
* Fixed up some erroneous uses of \see and \arg;
* Fixed up some extraneous backslashes in \code...\endcode blocks;
* Fixed up some typos/spelling errors.

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

12 years agotest/Driver/crash-report.c: don't fail if there are no files left behind by a previou...
Richard Smith [Mon, 2 Jul 2012 23:11:27 +0000 (23:11 +0000)]
test/Driver/crash-report.c: don't fail if there are no files left behind by a previous run of this test!

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

12 years agoThread safety analysis: fixed bug that occurs when very silly people
DeLesley Hutchins [Mon, 2 Jul 2012 22:26:29 +0000 (22:26 +0000)]
Thread safety analysis:  fixed bug that occurs when very silly people
use scoped_lockable without putting unlock_function on the
destructor.

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

12 years ago[analyzer] Introduce CXXAllocatorCall to handle placement arg invalidation.
Jordan Rose [Mon, 2 Jul 2012 22:21:47 +0000 (22:21 +0000)]
[analyzer] Introduce CXXAllocatorCall to handle placement arg invalidation.

This is NOT full-blown support for operator new, but removes some nasty
duplicated code introduced in r158784.

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

12 years agoThread safety analysis: fixed incorrect error message at the end of a locks_required...
DeLesley Hutchins [Mon, 2 Jul 2012 22:16:54 +0000 (22:16 +0000)]
Thread safety analysis: fixed incorrect error message at the end of a locks_required function.

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

12 years agoThread safety analysis: don't warn in case of duplicate annotation.
DeLesley Hutchins [Mon, 2 Jul 2012 22:12:12 +0000 (22:12 +0000)]
Thread safety analysis: don't warn in case of duplicate annotation.

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

12 years agoImprove crash reporting test coverage.
David Blaikie [Mon, 2 Jul 2012 22:07:20 +0000 (22:07 +0000)]
Improve crash reporting test coverage.

This adds validation that the
* repro source is only rewrite-includes processed, not fully preprocessed.
* repro script contains macro definitions (-DFOO=BAR).

Based on suggestions/help by Matt Beaumont-Gay.

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

12 years agoThread Safety Analysis: turn off checking within trylock functions.
DeLesley Hutchins [Mon, 2 Jul 2012 21:59:24 +0000 (21:59 +0000)]
Thread Safety Analysis: turn off checking within trylock functions.

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

12 years agoAdd a warning flag for "'extern' variable has an initializer".
Matt Beaumont-Gay [Mon, 2 Jul 2012 21:58:14 +0000 (21:58 +0000)]
Add a warning flag for "'extern' variable has an initializer".

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

12 years agoExtend a workaround for a CMake bug in LLVM's r159593 to apply to
Chandler Carruth [Mon, 2 Jul 2012 21:46:03 +0000 (21:46 +0000)]
Extend a workaround for a CMake bug in LLVM's r159593 to apply to
a Clang target which hits the same bug directly.

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

12 years ago[analyzer] If 'super' is known to be nil, we can still mark its range.
Jordan Rose [Mon, 2 Jul 2012 21:41:56 +0000 (21:41 +0000)]
[analyzer] If 'super' is known to be nil, we can still mark its range.

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

12 years agoRevert "Remove unused member (& consequently unused parameter) in SA's Call code."
Jordan Rose [Mon, 2 Jul 2012 21:41:53 +0000 (21:41 +0000)]
Revert "Remove unused member (& consequently unused parameter) in SA's Call code."

...and instead add an accessor. We're not using this today, but it's something
that should probably stay in the source for potential clients, and it doesn't
cost a lot. (ObjCPropertyAccess is only created on the stack, and right now
there's only ever one alive at a time.)

This reverts r159581 / commit 8e674e1da34a131faa7d43dc3fcbd6e49120edbe.

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

12 years agoWe support a mode where the Clang regression tests are run but not the
Chandler Carruth [Mon, 2 Jul 2012 21:37:04 +0000 (21:37 +0000)]
We support a mode where the Clang regression tests are run but not the
Clang unit tests. It's not clear why we support this mode in builds
where LLVM is available (LLVM itself does not), but at least this makes
us support it correctly.

This also fixes a long-standing bug where we would pass the unit test
param flag to lit in the standalone build even though the standalone
build *never* has the unittests built and ready for testing.

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

12 years agoInclude -D files in crash report repro scripts. (PR13255)
David Blaikie [Mon, 2 Jul 2012 21:28:00 +0000 (21:28 +0000)]
Include -D files in crash report repro scripts. (PR13255)

Now that we're only using -frewrite-includes rather than full preprocessing
when producing repro source files, we should also include command line macro
definitions in the repro script.

I don't have a test case for this because I'm not sure if/how I can open the
crash report file when the name is only known by scraping the crash report
output. Suggestions welcome if anyone thinks it'd be helpful.

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

12 years agoIn blocks, only pretend that enum constants have enum type if necessary.
Jordan Rose [Mon, 2 Jul 2012 21:19:23 +0000 (21:19 +0000)]
In blocks, only pretend that enum constants have enum type if necessary.

In C, enum constants have the type of the enum's underlying integer type,
rather than the type of the enum. (This is not true in C++.) Thus, when a
block's return type is inferred from an enum constant, it is incompatible
with expressions that return the enum type.

In r158899, I told block returns to pretend that enum constants have enum
type, like in C++. Doug Gregor pointed out that this can break existing code.

Now, we don't check the types of return statements until the end of the block.
This lets us go back and add implicit casts in blocks with mixed enum
constants and enum-typed expressions.

<rdar://problem/11662489> (again)

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

12 years agoWhen we're looking for redeclarations which might provide a definition in CodeGen...
Eli Friedman [Mon, 2 Jul 2012 21:05:30 +0000 (21:05 +0000)]
When we're looking for redeclarations which might provide a definition in CodeGen, make sure we examine all the redeclarations.  PR13252.

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

12 years agoMake this test invariant to future changes of the max loop unrolling count.
Ted Kremenek [Mon, 2 Jul 2012 21:02:22 +0000 (21:02 +0000)]
Make this test invariant to future changes of the max loop unrolling count.

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

12 years agoBe more eager about setting the 'Invalid' bit on an invalid class
Douglas Gregor [Mon, 2 Jul 2012 21:00:41 +0000 (21:00 +0000)]
Be more eager about setting the 'Invalid' bit on an invalid class
template instantiation. I wasn't able to reproduce this down to
anything small enough to put in our test suite, but it's "obviously"
okay to set the invalid bit earlier and precludes a
known-broken-but-not-marked-broken class from being used elsewhere.

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

12 years agoClone a bit of LIT flag defaults from the LLVM CMake file into the
Chandler Carruth [Mon, 2 Jul 2012 20:52:55 +0000 (20:52 +0000)]
Clone a bit of LIT flag defaults from the LLVM CMake file into the
standalone section of the Clang CMake files.

This will likely make the lit runs in Clang much more suitable to IDEs
such as Xcode and MSVC when operating in a standalone mode.

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

12 years agoRemove unused member (& consequently unused parameter) in SA's Call code.
David Blaikie [Mon, 2 Jul 2012 20:44:57 +0000 (20:44 +0000)]
Remove unused member (& consequently unused parameter) in SA's Call code.

This member became unused in r159559.

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

12 years agoReintroduced FieldDecl public methods setBitWidth and removeBitWidth.
Abramo Bagnara [Mon, 2 Jul 2012 20:35:48 +0000 (20:35 +0000)]
Reintroduced FieldDecl public methods setBitWidth and removeBitWidth.

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

12 years agoBail out the LiveVariables analysis when the CFG is very large, as
Ted Kremenek [Mon, 2 Jul 2012 20:21:52 +0000 (20:21 +0000)]
Bail out the LiveVariables analysis when the CFG is very large, as
we are encountering some scalability issues with memory usage.   The
appropriate long term fix is to make the analysis more scalable, but
this will at least prevent the analyzer swapping when
analyzing very large functions.

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