History log of /external/clang/include/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7b2f9cd6e7159a7ff2cffec105c7f3844929eae8 27-Oct-2011 Shih-wei Liao <sliao@google.com> Revert "Hard-code 2 constants to tolerate GCC 4.0.1 used by Xcode 3.0." DO NOT MERGE.

This reverts commit e21f6df11b8c17c06d57723e6f4c9aa040eba72c.
lang/Basic/PartialDiagnostic.h
d685e4bd2edf35d57268738dd95d6eb263bee46f 27-Oct-2011 Shih-wei Liao <sliao@google.com> Revert "Declare friend class to tolerate GCC 4.0.1 used by Xcode 3.0." DO NOT MERGE.

This reverts commit 4ab4645135c72306a667e04a8488fbaeb368028a.
lang/Parse/Parser.h
56ea11a9b9a3f4d9ae5f2781bf4bc27bd9fc0b03 27-Oct-2011 Shih-wei Liao <sliao@google.com> Revert "Declare BalancedDelimiterTracker as Parser's friend class." DO NOT MERGE.

This reverts commit 651532b889888c98aaee15d5da25e0b90a5cdaa3.
lang/Parse/Parser.h
b4f8fc61109d163d49e031ace9418fe80972107f 27-Oct-2011 Shih-wei Liao <sliao@google.com> Revert "Forward-declare BalancedDelimiterTracker and then befriend it." DO NOT MERGE.

This reverts commit bd4fa564d5b959f5464adce4daef80a2c86333e2.
lang/Parse/Parser.h
bd4fa564d5b959f5464adce4daef80a2c86333e2 23-Oct-2011 Shih-wei Liao <sliao@google.com> Forward-declare BalancedDelimiterTracker and then befriend it.

To tolerate GCC 4.0.1 used in Xcode 3.0.

Change-Id: Ia4f5987d3c44c22543ac2e2c2d96578a099700f2
lang/Parse/Parser.h
651532b889888c98aaee15d5da25e0b90a5cdaa3 23-Oct-2011 Shih-wei Liao <sliao@google.com> Declare BalancedDelimiterTracker as Parser's friend class.

Declare this friend class to tolerate GCC 4.0.1 used by Xcode 3.0.

Change-Id: Ie7172edaf3f408c53d2ca09c67cb55d9c3e3e43a
lang/Parse/Parser.h
4ab4645135c72306a667e04a8488fbaeb368028a 23-Oct-2011 Shih-wei Liao <sliao@google.com> Declare friend class to tolerate GCC 4.0.1 used by Xcode 3.0.

Change-Id: I59f3e05adf62e9d5cfa59bb3853066d4c101ba65
lang/Parse/Parser.h
e21f6df11b8c17c06d57723e6f4c9aa040eba72c 23-Oct-2011 Shih-wei Liao <sliao@google.com> Hard-code 2 constants to tolerate GCC 4.0.1 used by Xcode 3.0.

See http://gcc.gnu.org/gcc-4.2/changes.html. GCC 4.0.1 doesn't support
those visibility overhaul. Without this change, we'll hit compilation
errors on Xcode 3.0.

Change-Id: I4b9642861cc53cda5d07850df93fa47dd6a116cf
lang/Basic/PartialDiagnostic.h
8d9185790fa5bd6673af91babe1ac47ab8e98a82 23-Oct-2011 Shih-wei Liao <sliao@google.com> Revert "Revert "Don't crash when trying to emit too many fixits. Also, keep some constants in""

This reverts commit e499e7fc549c186aa1c50fabed7748a0ac6d302f
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
e499e7fc549c186aa1c50fabed7748a0ac6d302f 22-Oct-2011 Shih-wei Liao <sliao@google.com> Revert "Don't crash when trying to emit too many fixits. Also, keep some constants in"

This reverts commit 7035f310f5cfedb35ee4422bcab98e9f18f4ce63.
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
00a92abaf907802bfa4d6f38bdd242c6bfc34c09 21-Oct-2011 Logan Chien <loganchien@google.com> Merge with clang upstream Oct 20th 2011 (r142531)

Change-Id: I42181113f38ce445f2a48694d6f654438562b71e
18c9bd3b4751c70f297caadf9ae0bfb863df2be7 19-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix the signatures of vfork, __sigsetjmp and sigsetjmp.

Patch by Dimitry Andric.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
43f5103f8051bbac19022e6edaf7d9138b0f3c0f 19-Oct-2011 Douglas Gregor <dgregor@apple.com> Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
53e535161dfa9850de394b300915fc250eb0fdf4 19-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add a -Wc++98-compat warning for friend functions of class templates which would
be implicitly instantiated (resulting in a redefinition) in C++98.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
013e5ce167d72b3617951002f8aea5ff79a37d72 19-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Move static array parameter checks to SemaExpr, per Doug's request

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
77faa365cb2322cfc8edf58a4f5d68f2370cc39a 19-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> -Wc++98-compat: warn if a SFINAE substitution in C++11 suppresses an access
control diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
c9003c89c7aead1686aba89c8e3ddcea1f2bec54 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Move predecessor into the NodeBuilder context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
4e82d3cf6fd4c907265e3fa3aac0a835c35dc759 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Make NodeBuilder and Pred node loosely coupled

NodeBuilder should not assume it's dealing with a single predecessor. Remove predecessor getters. Modify the BranchNodeBuilder to not be responsible for doing auto-transitions (which depend on a predecessor).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
3152b3cb5b6a2f797d0972c81a5eb3fd69c0d620 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove StmtNodeBuilder from CheckerContext

It now only depends on a generic NodeBuilder instead. As part of this change, make the generic node builder results finalized by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
319a9184d5ca9f77622b45ae15c08f6b9ce01621 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Subclassing StmtBuilder from the NodeBuilder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
67d9fbac82922ef5b6c9ba5ac4a07e80f9960292 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove dead code.
ExprEngineBuilders is not used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h
9a1e3ab97c48a0381cce449b833c56997048a6d1 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove redundant method + whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
cd656cab3fa3dd4b0c974c6ae1c0e60880b18c22 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Modularize builder use in processBranch.

Take advantage of the new builders for branch processing. As part of this change pass generic NodeBuilder (instead of BranchNodeBuilder) to the BranchCondition callback and remove the unused methods form BranchBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
ad62deeb70e97da6bd514dd390ea1ce6af6ad81d 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Pull Pred out of NodeBuilderContext.
Each builder will have a different one, so it doesn't make sense to keep it in the context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
8c90aadce33152b03e3d1d5c7e9c468c7b939c96 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Rely only on NodeBuilder inside CheckerContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
d0b080664bc6514793351a2e2a87ce67214f5306 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove redundant assignment operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
a19f4af7a94835ce4693bfe12d6270754e79eb56 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] NodeBuilder Refactoring: Subclass BranchNodeBuilder from NodeBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
f05aac8472d8ed081a361a218fd14d59ddc91b85 19-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Node Builder refactoring: Introduce a simple Node Builder responsible for generating the node frontier.

Currently we have a bunch of different node builders which provide some common
functionality but are difficult to refactor. Each builder generates nodes of
different kinds and calculates the frontier nodes, which should be propagated
to the next step (after the builder dies).

Introduce a new NodeBuilder which provides very basic node generation facilities
but takes care of the second problem. The idea is that all the other builders
will eventually use it. Use this builder in CheckerContext instead of
StmtNodeBuilder (the way the frontier is propagated to the StmtBuilder
is a hack and will be removed later on).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
c705d2520a51de1dc38d36efada8e9bc2d8b0d1f 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure we do a correct invalid check in clang_getExpansionLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
6b13022faef260c8f49d04310f4a2c0a57f9103b 18-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> -Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 2.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
097f6b008254dc7b7f89ec3daafc163bf2a0e307 18-Oct-2011 Douglas Gregor <dgregor@apple.com> Remove unused data member

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e0a22d06888c13989b3f72db319f1d498bf69153 18-Oct-2011 John McCall <rjmccall@apple.com> Macro metaprogramming for builtin types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/BuiltinTypes.def
lang/AST/Type.h
ebaf0e6ab743394dda086a01b457838cb6e589a8 18-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> -Wc++98-compat and -Wc++98-compat-pedantic warnings for Sema, part 1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
024f4be866d13dd2b0ec062e694a62ca84c37191 18-Oct-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Support -iframework.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
7a81e41a5e92dad2dd2a4edf27960c5d7f9c8063 18-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: diagnose invalid argument to an
iboutletcollection attribute intead of crashing.
// rdar://10296078


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
341350ee62abd1ad818e1e3d926cd718960e439b 18-Oct-2011 Douglas Gregor <dgregor@apple.com> Make it possible to compute the type of 'this' without capturing
it. Refactoring to be used in a moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
aca19be8731fc31cff68702de0dc7f30ce908979 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index implicit property references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142355 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a7da2155167676a6a5d9fca4de947a9cab2a4908 18-Oct-2011 Hans Wennborg <hans@hanshq.net> Suggest %zu for size_t args to printf.

For PR11152. Make PrintSpecifier::fixType() suggest "%zu" for size_t, etc.
rather than looking at the underlying type and suggesting "%llu" or other
platform-specific length modifiers. Applies to C99 and C++11.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
2dc7ece8a83f371cb86c2f93282cb3c8e2d010ec 18-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wc++11-compat warning for an inline specifier on an explicit instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3e2e91e934ecf083a7c0835b58d9627ca2faddc9 18-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Refactor the checking for explicit template instantiations being performed in
the right namespace in C++11 mode. Teach the code to prefer the 'must be in
precisely this namespace' diagnostic whenever that's true, and fix a defect
which resulted in the -Wc++11-compat warning in C++98 mode sometimes being
omitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
85def357129b6cdfd69a66ad0e6994506418a2a9 18-Oct-2011 John McCall <rjmccall@apple.com> In hasPlaceholderType(Kind) and isSpecificPlaceholderType(Kind), assert
that the parameter is actually a placeholder type kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
841804baff6ea8ba1904a2ba81265aae1479e882 18-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wc++98-compat warnings for uses of the new keywords 'alignof', 'char16_t',
'char32_t', 'constexpr', 'decltype', 'noexcept', 'nullptr' and 'static_assert'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
ea523d73a6de06f828952a02f5ff86e4cc631695 18-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Wire up support for the controlling the extended dwarf .file directive. With
r142300 but not this patch, clang -S may emit .s files that assemblers other
than llvm-mc can't parse.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
19706f8e702c04d19bc1ace504cbb9df008b6daa 18-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -static-libstdc++ for linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
66d5ce11b9426f6a59f61a03cbd8dbf047cc9350 17-Oct-2011 Ted Kremenek <kremenek@apple.com> Move about 20 random diagnostics under -W flags. Patch by Ahmed Charles!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
454b57ac42c9ce0bed9b7a99c2ed5a18fbcd286b 17-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of __atomic_is_lock_free. The input is the size of an atomic type rather than an atomic type itself just to save some implementation pain; I can change that if it seems worthwhile.

I think this is the last hook needed for <atomic> besides defines for ATOMIC_CHAR_LOCK_FREE and friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
9f80a97408ee0da939654d851ff42ad07d47e9c7 17-Oct-2011 DeLesley Hutchins <delesley@google.com> Substitute for arguments in method calls -- refactoring

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ThreadSafety.h
abd2a3e8bc251a693d4d09819fd76f2e482c21ff 17-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Code completion chunks are pod-like.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
4e7064fa7e344e8f87a5b8457e96dfdd252c4a9e 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a new high level API for indexing clients that assumes
more of the work involved in indexing a translation unit and simplifies client
implementations.

Only C/ObjC for now, C++ (and comments) to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142233 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b4a686df4de21ec4eeca69211b21f7fe716abeae 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTConsumer::HandleTopLevelDeclInObjCContainer which accepts
top-level declarations that occurred inside an ObjC container.

This is useful to keep track of such decls otherwise when e.g. a function
is declared inside an objc interface, it is not passed to HandleTopLevelDecl
and it is not inside the DeclContext of the interface that is returned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
b05d7b20171bbd2feb14b059f39332cbe1bf1014 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track when a ObjC interface/protocol was initially created as a forward reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5acb0c98b363400f6ade0ae7250f0102224e806b 17-Oct-2011 John McCall <rjmccall@apple.com> Teach the ARC compiler to not require __bridge casts when
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Initialization.h
lang/Sema/Sema.h
0ddaeb9b031070ec64afe92d9892875ac44df427 17-Oct-2011 John McCall <rjmccall@apple.com> Add a new placeholder type to represent "unbridged"
casts in ARC.

No semantic analysis yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Serialization/ASTBitCodes.h
4919dfd54e2296ca997e3d1c9dab85976bba8e95 17-Oct-2011 John McCall <rjmccall@apple.com> Add a helper function for determining whether an expression
has placeholder type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
aa93a875605536d72a10359a0098396192b7d4ec 17-Oct-2011 Douglas Gregor <dgregor@apple.com> For modules, all macros that aren't include guards are implicitly
public. Add a __private_macro__ directive to hide a macro, similar to
the __module_private__ declaration specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Basic/TokenKinds.def
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
05edf668f0984bfa2994ddc8bb7b78d9fb24cf11 17-Oct-2011 Douglas Gregor <dgregor@apple.com> When building a module, use the macro definitions on the command line
as part of the hash rather than ignoring them. This means we'll end up
building more module variants (overall), but it allows configuration
macros such as NDEBUG to work so long as they're specified via command
line. More to come in this space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
1e12c59e8f9bb76c23628c4e0d0a1dfced0b1fa0 16-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Split apart the state accumulated during constant expression evaluation and the
end result. Use this split to propagate state information and diagnostics
through more of constant expression evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
20cdbeb8f36576f469db195b4140c293c7281718 16-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Add sema checks for calls to functions taking static array parameters

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142157 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
c223518ebf72e1709dc8938cd9384161ea5ec0bb 16-Oct-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Diagnose when omitting braces in direct list-initialization in C++0x.

This also applies to C99-style aggregate literals, should they be used in C++11, since they are effectively identical to constructor call list-initialization syntax.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
091fffeed8971a577bc3c8057c1ec40015a22775 16-Oct-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Drop the Diagnose parameter from Sema::PerformImplicitConversion again and instead use TryImplicitConversion in CheckSingleAssignmentConstraints when that function is in no-diagnostics mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4ba55659982bf45eedc9d32851815e5c4b6d8460 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Now that the structure of this is more reasonably laid out, fix a long
standing deficiency: we were providing no macro backtrace information
whenever caret diagnostics were turned off. This sinks the logic for
suppressing the code snippet and caret to the code that actually prints
tho code snippet and caret. Along the way, clean up the naming of
functions, remove some now fixed FIXMEs, and generally improve the
wording and logic of this process.

Add a test case exerecising this functionality. It is notable that the
resulting messages are extremely low quality. I'm working on a follow-up
patch that should address this and have left a FIXME in the test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnostic.h
2ed3495278c13802a3d85578ab20560dcb0ef270 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Add proper doxyments to the entry point routine, and remove a dead parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnostic.h
21a869aace45586125238fde88c477b330618a0b 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Persist the TextDiagnostic object across multiple diagnostics as long as
the SourceManager doesn't change, and the source files don't change.
This greatly simplifies the interfaces and interactions. The lifetime of
the TextDiagnostic object forms the 'session' over which we attempt to
condense and deduplicate information in diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
7531f571808201d44002fa38b67ee0a81e5ae936 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Clean up the names of all the TextDiagnostic methods (and even a static
function) to agree with the coding conventions, and in one case have
a bit more information in it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnostic.h
6ddd8871c07ab161742e8ed37d3ef121ac79fa59 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Move two functions out of the public interface that shouldn't have ever
been there. Also delete their redundant doxyments in favor of those in
the source file. I'm putting the doxyments for private and static
helpers into the implementation file, and only the public interface
doxyments into the header. If folks have strong opinions about this type
of split, feel free to chime in, I'm happy to re-organize.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnostic.h
db463bb2e4a9751f4cbe53996db751e1985ee966 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Graduate the TextDiagnostic interface to its own header and source file,
making it accessible to anyone from the Frontend library. Still a good
bit of cleanup to do here, but its a good milestone. This ensures that
*all* of the functionality needed to implement the DiagnosticConsumer is
exposed via the generic interface in some form. No sneaky re-use of
static functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnostic.h
03efd2efeeafc97db9a956df8c6ab88fbb6160da 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Rationalize the last bit of "arbitrary" state that is carried between
diagnostics to control suppression of redundant information. It now
follows the same model as all the other state, and has a bit more clear
semantics.

This is making the duality of the state a bit annoying, and I've added
a FIXME to resolve it. The problem is that I need to lift the
TextDiagnostic up into an externally visible layer before that can
happen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
d614040a678c994b0171234e7f5f9cf61e9f86fe 15-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Neither 'Warning' nor 'NonNote' was a good name for this location...
It's the last include-stack-root we tried to walk up. Use a better name
and better doxyments for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
cae9ab1a8af46643f8cf89399c9ccfb28fba0c36 15-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Sink the include stack printing into the generic text diagnostic
utility. This is a particularly nice win because it removes a pile of
parameters from these routines. Also name them a bit better. I'm trying
to follow the pattern of 'emit' routines writing directly to what is
expected to be the final output, while 'print' routines take a output
stream argument and can be used to build up intermediate buffers, etc.

Also, fix a bug I spotted by inspection from my last commit where
'LastLoc' and 'LastNonNoteLoc' were reversed. It's really scary that
this didn't trigger a single test failure. Will be working on tests for
more of this functionality now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
f54a61454e548fff63d6ce5700ecc2958297207e 15-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Rationalize some of how the locations of prior diagnostics are tracked
across emissions.

1) The include stack printing is conditioned on non-note diagnostics,
not just on warning diagnostics.
2) Those should be full source locations as they're tied to a source
manager.
3) We should pass in the prior state to the TextDiagnostic constructor,
allow it to mutate as diagnostics are emitted, and then cache the
final state before tearing it down.

Some of this remains incomplete, specifically #3 isn't finished for the
non-note location. That'll come when the include stack printing sinks
down a level.

This also highlights how *completely* bug-ridden this code is. For
example, we currently do all these comparisons of a FullSourceLoc and
a SourceLocation... which silently does a SourceLocation to
SourceLocation comparison, completely disregarding the source manager
from whence one of the arguments came. Oops! Good thing in practice this
wasn't important, but it could in theory be suppressing caret
diagnostics in a second TU on a single clang invocation. I'm hoping to
hammer these bugs out as the refactorings occur, although for so many of
them it's really unlikely I can dream up a test case that would show the
potentially buggy behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
9ed3066cfe4545acec30aff63581d1a7b5c88128 15-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Sink the EmitDiagnosticLoc method down to the generic TextDiagnostic
interface now that its only caller is there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
60e4a2a5e9bf534e106b0c2553d06e06c3d07794 15-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Sink the non-caret diagnostic logic down and out of the diagnostic
consumer. The TextDiagnostic interface now has a generic entry point for
emitting a diagnostic which uses a minimal interface that should be
compatible with StoredDiagnostics such as are available in libclang etc.

Some unfortunate shuffling of static functions as things get relocated.
Also some unfortunate public interface points added to
TextDiagnosticPrinter, but those are the next bits to get moved so they
won't last long.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
55c611021e771a816e6e3679928439f667f12eb9 15-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Simplify the interface of a helper method in the TextDiagnosticPrinter
to operate directly on the source location and ranges associated with
a diagnostic rather than digging them out of the diagnostic. This had
a side benefit of cleaning up its code a tiny bit by using the ArrayRef
interface.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
28409289193afca1a3178a9796f8e8aebcb76896 15-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Add an accessor for all of the ranges in a diagnostic as an ArrayRef.
This will simplify a number of calls in the diagnostic printing going
forward.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
0aa86c0463a881be85fd34e04c7de3379997621d 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add -Wc++98-compat warning for deduced 'auto' type specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7fe6208c3fa91f835813bb78236ef5c2bbf81053 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement -Wc++98-compat warnings for the parser.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
6a2ccc51d9b8357e1433e0029d544d95c5877a5c 15-Oct-2011 Ted Kremenek <kremenek@apple.com> Convert stray doxygen comments to regular comments. They logically represent the fields in FunctionProtoType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b8706f95eae8f85af01a26eee899c5daf8d6fcde 15-Oct-2011 Ted Kremenek <kremenek@apple.com> Revert "Move doxygen comments to pair with the actual values."

John convinced me this wasn't the right thing to do. I'll follow up with a second
commit to make these non-doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d60feeb90a4278dfb875fece6587e4c5c1198a60 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Use of override keywords in C++98 should produce a warning by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
05f9931eefa394698d168dc8e60334180ff6a869 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename an ExtWarn to ext_ for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
661a99690bc133bbaa029da925481d4a860dec90 15-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> -Wc++98-compat warnings for the lexer.

This also adds a -Wc++98-compat-pedantic for warning on constructs which would
be diagnosed by -std=c++98 -pedantic (that is, it warns even on C++11 features
which we enable by default, with no warning, in C++98 mode).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
b75a3451bcae1301875282e73a13934c90b6574c 15-Oct-2011 Douglas Gregor <dgregor@apple.com> Teach the ASTImporter to perform DeclContext lookups in a way that
avoids loading data from an external source, since those lookups were
causing some "interesting" recursion in LLDB.

This code is not efficient. I plan to remedy this inefficiency in a
follow-up commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
aa4a99b4a62615db243f7a5c433169f2fc704420 15-Oct-2011 Anton Korobeynikov <asl@math.spbu.ru> Provide half floating point support as a storage only type.
Lack of half FP was a regression compared to llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/Specifiers.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.def
lang/Sema/DeclSpec.h
lang/Serialization/ASTBitCodes.h
dfa64ba45922e1c28e36341bdf34785fea74659b 15-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Add template instantiation support for AtomicExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
7c9412cdad37146e6d1eee15eaa0d7a1d93e6ee1 14-Oct-2011 Douglas Gregor <dgregor@apple.com> Teach the ASTImporter not to import redundant fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
d9b0fdf2641ee3ef6d8c6a78bbc0a76083b7a553 14-Oct-2011 Joerg Sonnenberger <joerg@bec.de> vfork comes from unistd.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
abb5afadd11b19568359880faa5d966a4e33551c 14-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow calling ASTUnit::LoadFromCompilerInvocationAction with a previously created ASTUnit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
2be460723940f8184ec36529b6f6ddf59c04e411 14-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Misc fixes for atomics. Biggest fix is doing alignment correctly for _Atomic types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/TargetInfo.h
41be673e93ed225b45479557b20ff19b3082bae8 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> -Wc++98-compat: warn on C++11 attributes and alignas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
e5acd13f885ac95d0f2dafda245625b8190235ac 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r141898 (reverted in r141921), without the -Wc++98-compat-variadic-templates flag. Consensus is that -Wc++98-compat is a useful addition to clang, but per-C++11-feature warnings may not be.
Original patch by Jeffrey Yasskin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
fe6f64846b8714b2951d9ea80fc40a3e020f3920 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> [temp.explicit]p1: constexpr cannot be specified in explicit instantiations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b8989f27f116ff2400e92a52c067a69846119eb5 14-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.

Passing a pointer was a bad idea as it collides with the overload for void*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
72b2625aa67c8213acaf4bf6209b67859d60e2cf 14-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Serialize info about redeclared objc methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
d5951cbf4ef86c417609237e6815ac3ca638a09c 14-Oct-2011 Joerg Sonnenberger <joerg@bec.de> Add flags for the remaining shift related warnings
(-Wshift-count-negative, -Wshift-count-overflow).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a1de8cb4b5b1c4139ebfc266ba5d3842421fc8a8 14-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Improve arc diagnostic when method is not
found in receiver's class. // rdar://9970739


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cb1c9c36b856ad24bd32ec673fb2490d9770ab5f 14-Oct-2011 Douglas Gregor <dgregor@apple.com> Under ARC, merge the bit corresponding to the ns_returns_retained
attribute from the first declaration to later declarations. Fixes
<rdar://problem/10142572>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9ce6377714a8eb8f577c87028300421e72b00dc9 14-Oct-2011 Matt Beaumont-Gay <matthewbg@google.com> Only warn in -Wliteral-conversion if the conversion loses information

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2060650f2743650a815ce3daa414352911d408fd 14-Oct-2011 Douglas Gregor <dgregor@apple.com> When declaring an out-of-line template, attempt to rebuild any types
within the template parameter list that may have changed now that we
know the current instantiation. Fixes <rdar://problem/10194295>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
6164ea1d75385b6fc3c19e5ab9bb686298436a5a 14-Oct-2011 Erik Verbruggen <erikjv@me.com> Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
retrieve annotations from completion string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141953 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
3a919e7110407ae7609bb6edc57aac16a5990661 14-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Really protect from infinite loop when there are objc method redeclarations.

Serialization part will come later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b40034c2e580ab3b08de9dfb738d8e5d8ef79136 14-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track of objc method redeclarations in the same interface.

Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1f528a62258ee818e3df49016bff974a1459b5d1 14-Oct-2011 Ted Kremenek <kremenek@apple.com> Move doxygen comments to pair with the actual values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3d5f955855cab5a831cc6b9339dc77a7d46f1a30 14-Oct-2011 Douglas Gregor <dgregor@apple.com> Add a preprocessor callback that is invoked every time the 'defined'
operator is seen, from Jason Haslam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
78f0ea710875425d501a4736565b3a34cf1840c8 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for -std=gnu90 and -std=c++03, for compatibility with modern gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandards.def
f38eaa4748ee6164d5e36309fecef71765ff8b2b 14-Oct-2011 Jeffrey Yasskin <jyasskin@google.com> Revert the -Wc++98-compat flag because dgregor doesn't like it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
575fdda948e07c1afc6fcdced9e5cf0b7905a54e 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename -Wc++0x-compat, -Wc++0x-extensions and -Wc++0x-narrowing from c++0x to
c++11. The old names are kept for backwards-compatibility. Patch by Ahmed
Charles! Names for backwards-compatible DiagGroups removed by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
cda57822327499aeb6fe606f9cf5903cffca3444 14-Oct-2011 Nico Weber <nicolasweber@gmx.de> Extend -Wno-sizeof-array-argument to strncpy and friends.

This finds 2 bugs in chromium and 1 in hunspell, with 0 false positives.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
48a9d189bbc989369155195a4ce8c7e1c02ea02a 14-Oct-2011 Jeffrey Yasskin <jyasskin@google.com> Implement the first piece of a -Wc++98-compat flag so that people can build in
C++11 mode but keep their sources compatible with C++98. This patch implements
the -Wc++98-compat-variadic-templates sub-flag and -Wc++98-compat to include
it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
9e7617220135a6f6226cf09cb242cc1b905aedb4 13-Oct-2011 Ted Kremenek <kremenek@apple.com> Tweak -Wuninitialized's handling of 'int x = x' to report that as the root cause of an uninitialized variable IFF there are other uses of that uninitialized variable. Fixes <rdar://problem/9259237>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
5f1c822def3efffe1d8f7299fbbbc3b1cdd4833d 13-Oct-2011 Erik Verbruggen <erikjv@me.com> Allow for annotate attributes after access specifiers. When such
attributes are found, propagate them to subsequent declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141861 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
dac6cec94c23ba7c9021590a88878768abde4f2e 13-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
6700415542121e2cb7d867728046ffa21e402019 12-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Add returns_twice to functions that are known to return twice. This implements
the same behavior of gcc by keeping the attribute out of the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
d768150ef57f617c8d9fef48f3c92e8f21698024 12-Oct-2011 Ted Kremenek <kremenek@apple.com> Implement built-in macro '__has_warning', which allows one to query if a warning flag is valid. Fixes <rdar://problem/10263428>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticIDs.h
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
b3df1386680b3830d2f4d300d4d7eaba134135fc 12-Oct-2011 Douglas Gregor <dgregor@apple.com> Switch diagnostic text from "C++0x" over to "C++11".

We'd also like for "C++11" or "c++11" to be used for the warning
groups, but without removing the old warning flags. Patches welcome;
I've run out of time to work on this today.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
920c9c1155c118ac40e5209d4b757b9f54186339 12-Oct-2011 Ted Kremenek <kremenek@apple.com> Fix typo in name of diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
312fb51f0aefc83ca4a774e9019180bc86b1b45d 12-Oct-2011 Douglas Gregor <dgregor@apple.com> Add -std=c++11 and -std=gnu++11 language flags, from Ahmed Charles

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandards.def
4a8dfb511e8f84b2e38b7a86d8ddf05ac1e1a41b 12-Oct-2011 Douglas Gregor <dgregor@apple.com> Introduce BalancedDelimiterTracker, to better track open/close
delimiter pairs and detect when we exceed the implementation limit for
nesting depth, from Aaron Ballman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
796dbfb6c43336f58c026137c438e53eadc381f7 12-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce SourceManager::getFileLoc which returns a file location
taking into account macro arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
5fa6a0422f12216d549d0f2991a29d5690634065 12-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: don't consider class types with mutable members to be literal types.

The standard doesn't allow this, but mutable constexpr variables break the
semantics so badly that we can't reasonably accept them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d5e1d606f8c22ebda17c6fbf952f8c1696428758 12-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Handle Perforce-style conflict markers like normal conflict markers. Perforce
swaps over the <<<< and >>>> markers, and uses shorter markers than traditional
tools.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
6dbba4fc128e2e2f5b26be996392bd32c0707f13 12-Oct-2011 John McCall <rjmccall@apple.com> Catch placeholder types in DefaultLvalueConversion
and DefaultFunctionArrayLvalueConversion. To prevent
significant regression for should-this-be-a-call fixits,
and to repair some such regression from the introduction of
bound member placeholders, make those placeholder checks
try to build calls appropriately. Harden the build-a-call
logic while we're at it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141738 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
98d86b98b3fd0bd9c546123b16fd9995509aaae1 11-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add a -Wc++0x-compat warning for C++11 keywords used as identifiers when in
C++98 mode. Only the first occurrence of each keyword will produce a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Basic/IdentifierTable.h
lang/Lex/Preprocessor.h
2492c89882b5c5ce03afb4704fee67b7eff8f5ee 11-Oct-2011 Douglas Gregor <dgregor@apple.com> Add support for viewing the module graph via Graphviz, for debugging
purposes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ModuleManager.h
92d6d404833468120f9a86fb360691ac60585551 11-Oct-2011 Daniel Dunbar <daniel@zuster.org> Driver: Add support for a new -nostdlibinc option.
- This disables the system include directories, but not the compiler builtin
directories. Useful for projects that want to use things like the intrinsic
headers, but are otherwise freestanding.

- I'm willing to reconsider the option naming, I also considered providing an
explicit -builtinc (which would match -nobuiltininc), but this is more
consistent with existing options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
a268fc0f2229eb132ebc8501b140093aeb5516bf 11-Oct-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Replace -nostdinc by -nostdsysteminc (which is just system include
paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/HeaderSearchOptions.h
71fdf469a3b6d7d557b0bfba36e8659f4966c565 11-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove an unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
c892c5fa92db137ff68d95afb13fe969d17f4fb2 11-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
769bb2d0dbd173589747cc8e7428a66db3b2692e 11-Oct-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Get rid of ShouldDeleteMoveConstructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c32d684d6c787b332a64c9013598d5ef668c4b45 11-Oct-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Consolidate copy constructor deletion into ShouldDeleteSpecialMember.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
276b061970939293f1abaf694bd3ef05b2cbda79 11-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of __atomic_* (everything except __atomic_is_lock_free).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
f11dbe9676832e599e046b2ed0f132a6bb858e0a 11-Oct-2011 Francois Pichet <pichet2000@gmail.com> [Microsoft] If -fms-compatibility, then downgrade missing typename error to warning at function prototype scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
fac9467d1676dc05761e12e41e13e01a3a3da52b 11-Oct-2011 Kaelyn Uhrain <rikka@google.com> Add typo correction for type names.

The main motivation was to do typo correction in C++ "new" statements,
though picking it up in other places where type names are expected was
pretty much a freebie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
e1e7862586b6077a68dea05bcdbb67f63be3057d 11-Oct-2011 Ted Kremenek <kremenek@apple.com> Place diagnostic group ext_typecheck_decl_incomplete_type under a -W flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2c712f50cd56eaf3662989b556e9c6b1e8fcd11a 11-Oct-2011 Kaelyn Uhrain <rikka@google.com> Move some bool flags out of function parameter lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
a696ece1ac449a2b77e7c0a693b55cb10e9e2068 10-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Implement ConcurrencyCheck using a recursive mutex to allow re-entrancy in the same thread.
The checks are performed only in DEBUG, it becomes no-op in release mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
a6b8b2c09610b8bc4330e948ece8b940c2386406 10-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation refactoring:
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
1055393814ac989727aa7437a5f3c3c44b4f83e5 10-Oct-2011 Kaelyn Uhrain <rikka@google.com> Give nicer note when a member redeclaration has or lacks 'const'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
36bc2c663f600e7c9dc1a800d36f16603ca3ea51 10-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: Some refactoring of overriding method decl. code
for future work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
147545d698972cfd34ece30a5d55e8180784161e 10-Oct-2011 Douglas Gregor <dgregor@apple.com> Parse the initializer for a class member after handling its
declarator, so that the declarator is in scope for the
initializer. Fixes PR9989.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
e16da07474c376fbbeda2d4238cf35e2bd664d5a 10-Oct-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Begin work consolidating ShouldDelete* functions.

Begin with just default constructors. One note is that as a side effect
of this, a conformance test was removed on the basis that this is almost
certainly a defect as with most of union initialization. As it is, clang
does not implement union initialization close to the standard as it's
quite broken as written. I hope to write a paper addressing the issues
eventually.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
883af83bd6f9b0b60b8c7a78b8682eb8ab40a4a8 10-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement the restrictions in C++ [class.friend]p6, which disallow
defining a friend function with a qualified name or in a local
class. Fixes PR9853.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b5ae92f2f52df88ae14504d3a3f2bddb479829b6 10-Oct-2011 Douglas Gregor <dgregor@apple.com> Diagnose attempts to qualify the name of an instance variable or
property in an Objective-C++ member access expression. Fixes PR9759.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ae57eadbc1a923efb72924765445db915cc23a9b 10-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add driver/frontend support for precompiled headers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
b5a0187b12524d2c1e6ac96e81715d1e70bbe0ad 09-Oct-2011 Douglas Gregor <dgregor@apple.com> Diagnose attempts to declare a non-static data member with a
non-identifier name. Fixes PR10839.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
15e24065a4a8b6b9d58e138969f8f6ac7495d837 08-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
a5937bbfd19e61d651a58b0f0ffeef68457902a5 08-Oct-2011 Ted Kremenek <kremenek@apple.com> Remove AnalysisContext::getLiveVariables(), and introduce a templatized mechanism to lazily create analyses that are attached to AnalysisContext objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/AnalysisContext.h
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
ec2ec1f20322076717c3865b196f7a1c95d883a4 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In DeclContext::LoadLexicalDeclsFromExternalStorage don't clear out
the fields if they are already loaded, just ignore them when we are building
the chain in BuildDeclChain.

This fixes an lldb issue where fields were removed and not getting re-added
because lldb is based on ASTImporter adding decls to DeclContext and fields
were already added before by the ASTImporter.

We should really simplify the interaction between DeclContext <-> lldb
going forward..

rdar://10246067

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
3f5e8d87dbf449d8b39fe96068415428594d370e 07-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Previously, we were passing to CheckerContext enough info to construct ProgramPoint and it would pass it to NodeBuilder, which in turn would construct the ProgramPoint. Simplify it by just passing the ProgramPoint to CheckerContext. The ProgramPoint can only change if a checker tags it, in which case, we create a copy with the given tag.

(A step closer to making CheckerContext work with all node builders, not only StmtNodeBuilder.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
13bf6336ab395eb6af487ab96d32229460907769 07-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc++: some minor cleanup and a test case
for atomic setters which requires assignment operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
63d3201619fdac284adfd3b9328562fa20a01c40 07-Oct-2011 Anna Zaks <ganna@apple.com> ProgramPoint cleanup after the previous commit r141408 (remove the copy constructor, mark withTag const).

Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
af42712cd8f548f15c700d49a7038ddb846aafa8 07-Oct-2011 Anna Zaks <ganna@apple.com> Add a copy constructor to ProgramPoint and pull withTag() method from a child. (withTag essentialy creates a copy with a given tag.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
163b151809beef8f917fd16c546016e83ae3e361 07-Oct-2011 Bob Wilson <bob.wilson@apple.com> Clang driver changes for iOS 5.0 and OS X Lion support.

Check whether the libc++ library is available when using -stdlib=libc++,
and also adjust the check for whether to link with -lgcc_s.1.
Patch by Ted Kremenek and Daniel Dunbar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
5e1cdac63c3d9c9b32fa41fa0b2d242a58a20d49 07-Oct-2011 John McCall <rjmccall@apple.com> Rename TagDecl::isDefinition -> isCompleteDefinition
for better self-documenting code, since the semantics
are subtly different from getDefinition().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/TypeLoc.h
7d65f6965d215f4cb2eb0738ee1b9024e5ab5bba 07-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: Improve on diagnostic when atomic proeprty is synthesized
on one accessor and user-provide with another.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a180f04c091bf3ede4fe292ba6a29d61da09e936 07-Oct-2011 John McCall <rjmccall@apple.com> Move type-checking for C-style casts in C into the now-misnamed
SemaCXXCast.cpp. Should have no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/Sema.h
c076e37e2223cfe998fa5e657dece30da78fcdc4 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implicitly assume that a ObjC category to an unavailable interface is also unavailable;
only give an 'unavailable' error on the @implementation of the category. rdar://10234078

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3a387441ae339363ee5b254658f295e97bd9e913 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
51c3b79caa493a53d324190c0d7e3cd1fe93d4f3 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> llvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory_barrier.

__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.

Thanks to Jeffrey Yasskin for the thorough review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/Specifiers.h
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
57e264e9f4ff0a72f3585a960cdf63437b76fa93 06-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc++: For atomic properties of c++ class objec typet, appropriate
operator= is called. Issue a warning for non-trivial case until
runtime support is provided. // rdar://6137845


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d51e43af0b3a6897b971f316c4de2035ec82d1f2 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: add -fcuda-is-device flag

This frontend-only flag is used by the IR generator to determine
whether to filter CUDA declarations for the host or for the device.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
e57ffac6326c20da8f688f937100c03e90b7fabe 06-Oct-2011 Erik Verbruggen <erikjv@me.com> [libclang] Removed accidental addition of CXCursor_AnnotateAttr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141292 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
733dbc805facad7cebec5420f6c47c83848cee5f 06-Oct-2011 Erik Verbruggen <erikjv@me.com> [libclang] Fix symbol export for clang_Range_isNull so MSVC won't complain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141282 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b52c0dddffdb27b3a058913020001afcfc937d8d 06-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR11067: A definition of a constexpr static variable doesn't need an initializer if the in-class declaration had one. Such a declaration must be initialized by a constant expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d12059673dcef32bc2b6bae5321654d33863afe6 06-Oct-2011 Erik Verbruggen <erikjv@me.com> Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141278 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Lookup.h
lang/Sema/Sema.h
aed123ec3cc37e457fe20a6158fdadf8849ad916 06-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,
and a callback and finds all identifier references of the cursor in the file.

rdar://7948304

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141277 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d211cb709510fbe7e75167b9feee0050851d001a 06-Oct-2011 Ted Kremenek <kremenek@apple.com> Use a sidetable in ASTContext for ParmVarDecls whose index exceeds the 8 bits reserved for that value in VarDecl. Fixes PR 10538.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
f77c49681ab347f7602b21beda8be8b39386e0d2 06-Oct-2011 Ted Kremenek <kremenek@apple.com> Hoist truncation checking for ParmVarDeclBitfields::ParameterIndex into its own helper method. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b8b0e75aeec85a7a268fdba311de4f1cd527fae1 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add a non-standard extension, cl_clang_storage_class_specifiers,
which enables support for C99 storage-class specifiers.

This extension is intended to be used by implementations to implement
OpenCL C built-in functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OpenCLExtensions.def
lang/Sema/DeclSpec.h
08f35a79f7506d6ac0349764aa4d6021a1e1c6e2 06-Oct-2011 Ivan Krasin <krasin@chromium.org> Add -Wlanguage-extension-token option for ext_token_used warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
6ee5b9384533d5b3f8c18b578fccd3935e1b892f 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Clang-side build system infrastructure for multiple tblgens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Makefile
lang/Basic/Makefile
lang/Driver/Makefile
lang/Lex/Makefile
lang/Parse/Makefile
lang/Serialization/Makefile
390909c89c98ab1807e15e033a72e975f866fb23 06-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove the dependency on CheckerContext::getStmt() as well as the method itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
4eff823b8e015e003d05953c386d685ee6bb6235 06-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove the last dependency on CheckerContext::getNodeBuilder() as well as the method itself.

Checkers should not directly access NodeBuilder, nodes can be created by calling the CheckerContext's generateNode() methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
dff6ef903ff4fcb43b5ea292ecd772e381393b5d 06-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] OSAtomicChecker implements evalCall in a very invasive way - it essentially simulates inlining of compareAndSwap() by means of setting the NodeBuilder flags and calling ExprEngine directly.

This commit introduces a new callback just for this checker to unblock checker API cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
9dd0065e61ea4b48b19eee550704ce964e64e946 05-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Document ObjCMethodDecl::setMethodParams.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
88934e85f81abdc4fb5202325252be3bcab5ebf0 05-Oct-2011 Daniel Dunbar <daniel@zuster.org> Driver & AST: Implement support for -fpack-struct and -fpack-struct= command
line options.
- <rdar://problem/10120602>, PR9631

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.def
lang/Driver/CC1Options.td
lang/Driver/Options.td
42b2984771a7fd1b17c78bbb2c59fed3db2f1960 05-Oct-2011 Douglas Gregor <dgregor@apple.com> Expose more statement, expression, and declaration kinds in libclang,
from Manuel Holtgrewe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141200 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7cc58b4c927fca539d43eaa58e00dca95946eb7c 05-Oct-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Added a flag to identify resolved overloaded function references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/Sema/Initialization.h
lang/Sema/Overload.h
lang/Sema/Sema.h
b45ae256cfd5ef3ab22b4d715159f978d8120d45 05-Oct-2011 John McCall <rjmccall@apple.com> Refactor the analysis of C++ cast expressions so that even
C-style and functional casts are built in SemaCXXCast.cpp.
Introduce a helper class to encapsulate most of the random
state being passed around, at least one level down.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
cbb7add8d7e3f868a6695a601e45fc13257bd9f5 05-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Removing more references to CheckerContext::getNodeBuilder(): ask CheckerContext to generate the nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
50f3cade2a87bda005ae08d42b51c5b960b07779 05-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor node generation to use less code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
43f7e62442f17a2527f6eed387c86b38ffd5dc2a 05-Oct-2011 Chad Rosier <mcrosier@apple.com> [driver] Improve r141053 by only emitting the warning if the original input
was assembly. Otherwise, something like -save-temps causes the integrated
assembler to warn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
5d0ea6d62e076c776ddad028c4eb615783be1323 04-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Removing references to CheckerContext::getNodeBuilder(): checkers can obtain block count directly from the Context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
68af536046461b514b59aedac016b52784ece3f7 04-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: Turn diagnostic on property type mismatch in
continuation class into warning. // rdar://10231514


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8ba721428af297e540fb40b176eeeea0ee010c1f 04-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove unused methods, add comments to others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
06d92bf8a294412340b94e0f4c1b4b78b2651824 04-Oct-2011 Ted Kremenek <kremenek@apple.com> Place diagnostic warn_atomic_property_rule under a -W flag. Fixes <rdar://problem/10230631>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d649c57c264cd2e5114a445fcea96564bc80476f 04-Oct-2011 Ted Kremenek <kremenek@apple.com> Place diagnostic warn_ownin_getter_rule under a -W flag. Fixes <rdar://problem/10230626>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3b8b00b1ec3d26d57157f9ed5004adad78e28535 04-Oct-2011 Ted Kremenek <kremenek@apple.com> Place diagnostic ext_predef_outside_function under a -W flag. Fixes <rdar://problem/10226192>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f347667044100b8a91076480a8e73a2abb418b05 04-Oct-2011 Ted Kremenek <kremenek@apple.com> Place warning warn_drv_no_debug_w_integrated_as under a -W flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
10a82cde7c317c5dd41dc3faf17f503c52ce2a3d 04-Oct-2011 Bob Wilson <bob.wilson@apple.com> Rip out flags for controlling C++ "production mode" separately.

This is old leftover cruft from the days when C++ was not yet ready
for prime time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
1711fc91efb36d131f7ba771f73f0154dc1abd1f 04-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve location fidelity of objc decls.

-Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl.
-Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the
class name, not the location of '@'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
968b7a71c88bcd157f7d271517d7ceb266fed63a 04-Oct-2011 Chad Rosier <mcrosier@apple.com> [driver] Emit a warning if the user has requested debug information and we're
using the integrated assembler.
rdar://10216353

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
1e9775d36de8edbc665c0f0bf4dae1400e3d2112 03-Oct-2011 Anna Zaks <ganna@apple.com> [analyzer] In UndefBranchChecker, use a node generator which does not create an edge/branching. (ExprEngine should be in charge of generating edges. The checkers should examine the condition and generate PostCondition node if needed.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
a08529cc3f00e0b47a3c028823634129ac46847b 03-Oct-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed exapnsion range for # and ##.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
7035f310f5cfedb35ee4422bcab98e9f18f4ce63 03-Oct-2011 Matt Beaumont-Gay <matthewbg@google.com> Don't crash when trying to emit too many fixits. Also, keep some constants in
sync between DiagnosticsEngine and PartialDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
f87cced71a955dca5731e7b28bc182e4824c0355 03-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Propagate __attribute__((returns_twice)) from C to IL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
491306a83c4f0f49f95a3bcbca8580cb98a91c7a 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow getting all source locations of selector identifiers in a ObjCMethodDecl.

Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is

-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;

In such cases we infer the locations instead of storing them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/ExprObjC.h
lang/AST/SelectorLocationsKind.h
b994e6c7d57b00e3e0f69d152065e2cf85d1de33 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move field in ObjCMessageExpr to avoid padding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
207180802c836fda8acbedb47a92f9d2bdca59c3 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow getting all source locations of selector identifiers in a ObjCMessageExpr.

Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is

-Immediately before the arguments: [foo first:1 second:2]
-With a space between the arguments: [foo first: 1 second: 2]
-For nullary selectors, immediately before ']': [foo release]

In such cases we infer the locations instead of storing them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/SelectorLocationsKind.h
8d9ed7980405e91a12e33338a78fb99620adf553 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> ArrayRef'ize ObjCMessageExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
04fb8ef41ed2bd9533ba9392b4db1a7379752c16 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add an assertion that we don't overflow the bitfield ObjCMessageExpr::NumArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
11d77169555480ee0a04c6e5bc390d8fde41175d 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass from the parser the locations of selector identifiers when creating
objc method decls.

They are not stored in the AST yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Sema/Sema.h
da92a7f91cf88f49e02050919676f7fb8e3bdff8 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived from the selector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
951376242c076c3f62dd78bf672909fc011991db 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass all the locations of the selector identifiers for a message expression from the parser.

They are not kept in the AST yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Sema/Sema.h
78dd67e78c50a7abdc7c358e5eac1770d5fea22a 03-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: diagnose invalid calls across targets

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Overload.h
lang/Sema/Sema.h
1f24076313e3c4921134db555194605c9a1ea49e 03-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: add separate diagnostics for too few/many exec config args

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
8591a7f5215f6469603e6bc8f4fdbcc78e215ab9 03-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: diagnose unconfigured calls to global functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d1e40d5389a4382cbebc97d54792f41ee0414af4 02-Oct-2011 John McCall <rjmccall@apple.com> Make -fobjc-nonfragile-abi the -cc1 default, since it's the
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.

This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.

Most, though, it involved a perl script to translate a ton
of test cases.

Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
cdda47faab5c2c61c239491a1a091e071ed3e38e 01-Oct-2011 John McCall <rjmccall@apple.com> Parse attributes written in an ObjC method parameter type as
attributes on the parameter declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
e82247a71a1a76e78f3b979b64d5f6412ab40266 01-Oct-2011 John McCall <rjmccall@apple.com> Hey, maybe we shouldn't silently ignore decl attributes
on declarators written as types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
lang/Sema/Sema.h
9f569cca2a4c5fb6026005434e27025b9e71309d 01-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: semantic checking for constexpr functions and constructors. Based in
part on patches by Peter Collingbourne.

We diverge from the C++11 standard in a few areas, mostly related to checking
constexpr function declarations, and not just definitions. See WG21 paper
N3308=11-0078 for details.

Function invocation substitution is not available in this patch; constexpr
functions cannot yet be used from within constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
2cf031d33ce6801dc11183a3cb48168f53fe06c4 01-Oct-2011 John McCall <rjmccall@apple.com> Allow the results of cf_returns_not_retained function
calls, or calls to audited functions without an explicit
return attribute, to be casted without a bridge cast.
Tie this mechanism in with the existing exceptions to
the cast restrictions. State those restrictions more
correctly and generalize.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
7df2ff45f101c87398329d0ea23c1377328dca40 01-Oct-2011 John McCall <rjmccall@apple.com> Tweak the interface for analyzing the CF conventions for a name
to take a FunctionDecl* instead of an llvm::StringRef. Eventually
we might push more logic in there, like using slightly different
conventions for C++ methods.

Also, fix a bug where 'copy' and 'create' were being caught in
non-camel-cased strings. We want copyFoo and CopyFoo and XCopy
but not Xcopy or xcopy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
5202a4d0bbd9b9a98958b2d9869e38b3f118b73c 01-Oct-2011 Ted Kremenek <kremenek@apple.com> Enable -Wstrlcpy-strlcat-size by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
717a20b9cebb0d261b74995f8ebf3a1c814bbc08 01-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Mark a TagDecl when it is free standing (e.g. "struct foo;")

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
26e0b304557519c12b150afe23cd24e28fa20a1d 30-Sep-2011 Daniel Dunbar <daniel@zuster.org> Revert my --working-directory option, which wasn't well thought through.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
2dfdb948bef51a601e763191e4becfe59880d382 30-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s public:/private:/protected: specifiers.

Patch by Paolo Capriotti!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140864 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a891a32d3762ee641a29c091d286f2a7432671a5 30-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a bug in the token caching for inline constructors in C++11, and improve error recovery in both dialects. This should fix the GCC test suite failures as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
8dfac0baaf0f81d3945bcb306480e358ba8d1f08 30-Sep-2011 John McCall <rjmccall@apple.com> Add explicit attributes to mark functions as having had their
CoreFoundation object-transfer properties audited, and add a #pragma
to cause them to be automatically applied to functions in a particular
span of code. This has to be implemented largely in the preprocessor
because of the requirement that the region be entirely contained in
a single file; that's hard to impose from the parser without registering
for a ton of callbacks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
lang/Sema/AttributeList.h
lang/Sema/Sema.h
e4c6675cccbaac991843def43072687bca50d989 30-Sep-2011 Ted Kremenek <kremenek@apple.com> Fix crash when analyzing C++ code involving constant enums and switch statements (<rdar://problem/10202899>).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
d30952838421ddfb9f7e346b2ba8213889a5f789 30-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Add -analyzer-purge option which can take on multiple values, remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
lang/Frontend/AnalyzerOptions.h
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
3fedbe1f71c18fba01d39109d606f421a0103a2a 30-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Some fixes for MS-style asm parsing: specifically, add some error checking, and handle asm comments using semicolons correctly. (The comments are actually surprisingly tricky.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
55dec868977ccb89cab0286122f9345f63bb5de7 30-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr functions are implicitly const. More tests to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
2d23ec29805f54edb3243022c64d752b8fbe5f46 30-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> Suggest adding 'constexpr' if the GNU extension for in-class initializers for static const float members is used in C++11 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
947be1941e9a1d4233116f51a45799d3904d4231 30-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> Mark the ExtWarn for in-class initialization of static const float members as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0f32caff4dc351719ca3362d95f859d72fdd6f1b 30-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. Enumerators may inherit the deprecated/unavailable
attributes from the enumeration type.
// rdar://10201690


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
2da7a51270a5f40e88d07750ebdadd774368b9f4 29-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> In C++0x, static const volatile data members cannot be initialized in-class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c6d990a767150b02337de1136fdb55ccf349f4d1 29-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: semantic checking for constexpr variables.

We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
97db7265ac1993e14e5877292e23d5ed2e9cf719 29-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> c - Enumerators may inherit the deprecated/unavailable
attributes from the enumeration type.
// rdar://10201690


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c41f3652f4e836cff988320bad2d6c5f416ebe1f 29-Sep-2011 Anna Zaks <ganna@apple.com> Add more comments to several checker callback functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
82d0b0aab9088e977c2a44c4a5a90479c63149fe 29-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for alignment-specifiers in C1X and C++11, remove
support for the C++0x draft [[align]] attribute and add the C1X
standard header file stdalign.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
35f37cd6637f5cb4dbf18a542b501fd40522ba7b 29-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Add a warning group for warnings about using C1X features as extensions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
3497fdfdb742f55d7b7ec8e22779fb08962b8441 29-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for parsing an attribute-specifier-seq containing multiple
attribute-specifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
fe98da0fa352462c02db037360788748f95466f7 29-Sep-2011 John McCall <rjmccall@apple.com> Add an ns_bridged attribute, used to specify that a
pointer to the annotated struct type can be used as an
Objective-C object pointer. If an argument is given, the
type is actually "toll-free bridged" to the specific type
named there, rather than just to 'id'.

For now, we cannot rely on all types being so annotated,
and we'll always have to have exceptions for things like
CFTypeRef (aka const void*), but this is clearly a good
foundation for improving toolage in this area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
2f041d0b12aa87f3345e5fb2e38fefba30c5bff3 29-Sep-2011 Ted Kremenek <kremenek@apple.com> Like IBOutletCollection, it only makes sense to apply the IBOutlet annotation to Objective-C object types. Fixes <rdar://problem/10142685>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Basic/DiagnosticSemaKinds.td
aeacae523a1c6e5bb99d12754415bbbc3ccb86c9 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostic: Kill off a few unnecessary functions now that refactoring is done, and add a note that the new setDiagnosticGroup{...} methods only operate on the current diagnostic state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
be1aa410274b28fc143c47c814f07c989f4534d6 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings.
- This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticIDs.h
a5e41333b06fdf036d58495490eb14d6a0a3fcf7 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Add three explicit bits to DiagnosticMappingInfo to track "no-warning-as-error", "no-error-as-fatal", and "show-in-system-header", and update DiagnosticsEngine::setDiagnosticGroup{WarningAsError,ErrorAsFatal} and GetDefaultDiagMappingInfo to set them appropriately.
- No actual functionality change for now, we still also use the diag::Mapping::{MAP_WARNING_NO_ERROR,MAP_ERROR_NO_FATAL,MAP_WARNING_SHOW_IN_SYSTEM_HEADER} for a little while longer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticIDs.h
3f8394669673451061f57ced81f0a2cae087f119 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Add a DiagnosticIDs::getDiagnosticsInGroup method, and use
that in DiagnosticEngine instead of the convoluted calling into DiagnosticIDs
which then calls back into the DiagnosticsEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
ba494c64365d78b1cdb6baea4d1e79263389fda9 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostic: Add a DiagSate::getOrAddMappingInfo method.
- Also, spell const_iterator as const_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
09ea68d17bc0fc0b16d287ad4d3f61fe7def4f17 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Move setDiagnosticMapping() to using DiagnosticMappingInfo
and eliminate setDiagnosticMappingInternal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b1c99c679adb53be8f478d08be83af6c9c22ae4b 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Add a DiagnosticMappingInfo helper class, and switch to
storing mappings with that instead of straying some magic constants about the
source.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
c3c4a89747e12ebc2eabe57265c8b69ab720ecbf 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Eliminate getDiagnosticMappingInfo method, which wasn't worth methodizing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
1656aaec223949245fdbebf306b719cba0b687ca 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostic: Eliminate the extra "mapping" out-parameter now that I killed the sole client.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
76101cfe52d1b56974bf0e316247b3201f87c463 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker.
- The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticIDs.h
80d572d87e2a8258262fd9caa463ae9c046f7bf0 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Fix 80-col viola.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticIDs.h
4aa8f2bce0f498152d624f748712a991adc23fdd 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostic: Factor out
DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which
more accurately model the correct API -- no internal change to the diagnostics
engine yet though.
- Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
08d6acf6e5efa6df57345922d412476127f856fc 29-Sep-2011 Douglas Gregor <dgregor@apple.com> Introduce an opt-in warning when a module is being implicitly built
from sources.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
aee526e77657afd1600276450e9c346953ad51d7 29-Sep-2011 Douglas Gregor <dgregor@apple.com> Introduce a pure virtual clone() method to DiagnosticConsumer, so that
we have the ability to create a new, distict diagnostic consumer when
we go off and build a module. This avoids the currently horribleness
where the same diagnostic consumer sees diagnostics for multiple
translation units (and multiple SourceManagers!) causing all sorts of havok.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ChainedDiagnosticConsumer.h
lang/Frontend/CompilerInstance.h
lang/Frontend/LogDiagnosticPrinter.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/VerifyDiagnosticConsumer.h
lang/Rewrite/FixItRewriter.h
lang/Rewrite/Rewriter.h
4213df3b5da21ce25a4541ca5c447eeb28b515a3 29-Sep-2011 Daniel Dunbar <daniel@zuster.org> Basic/Diagnostics: Split out the default warning "no-Werror" and
"show-in-system-header" bits, which is part of teasing them apart from the
diagnostic mapping kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140742 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticIDs.h
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
78213e4aec6d8d22b5828dd2687fa19116ebaa26 28-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc arc: Diagnose block pointer type mismatch when
some arguments types are ns_consumed and some otherwise
matching types are not. This is objc side of
// rdar://10187884


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9a9cddeaaebf3a84529a66c5e9212a555913084f 28-Sep-2011 Richard Trieu <rtrieu@google.com> Fix typo. string-convervion -> string-conversion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
fcc1e50ebcb441c6c610ccd539f57c57549bd66c 28-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce non-const Decl::getParentFunctionOrMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
de5db649fd5f9aedde200f443ad73d62517b1c88 28-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Range_isNull.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140706 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c3a2e654f1e1c5cf956d0666d9c4c2f60a66f112 28-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Clean up a bit of the uses of CPU in the TargetInfo classes. This makes
it an error if a CPU is provided for a target that doesn't implement
logic handling CPU settings, to match the ABI settings. It also removes
the CPU parameter from the getDefaultFeatures method. This parameter was
always filled in with the same value as setCPU was called with, and at
this point every single target implementation that referenced the CPU
within this function has needed to store the CPU via setCPU anyways in
order to implement other interface points.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c8680f46970a5a53d07e05edd93657e64764da3c 28-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Decl::getParentFunctionOrMethod which if the decl is defined inside
a function/method/block it returns the corresponding DeclContext, otherwise it returns null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
8987b2385d9ba63ada66e1344ace79b04d5cb5c3 28-Sep-2011 Douglas Gregor <dgregor@apple.com> Only print _Bool as 'bool' when 'bool' is defined as an object-like
macro whose only replacement token is '_Bool'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/PrettyPrinter.h
lang/Sema/Sema.h
30c42404202d2e2512e51efc6066bd614cfdb5a4 28-Sep-2011 Douglas Gregor <dgregor@apple.com> When 'bool' is not a built-in type but is defined as a macro, print
'bool' rather than '_Bool' within types, to make things a bit more
readable. Fixes <rdar://problem/10063263>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/PrettyPrinter.h
lang/AST/Type.h
3240fe3b715327c8fda6f5a3bc8a092b1fce82a7 28-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objcetive-c-arc: When overriding a method, its ns_consumed patameter
attribute must match its overriden method. Same also for
ns_returns_retained/not_retained on the result type.
This is one half of // rdar://10187884


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
c1c0dfb376b829b94d4c61e9f358ce23e6aa3169 27-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Get rid of useless helper Sema::CastCategory.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
2fe363622c32c471e8a68c68ba5cc372644f24fb 27-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Some changes to improve compatibility for MSVC-style C++ struct layout. Patch from r4start at gmail.com (with some minor modifications by me).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
5f0bfc522266f3319c4a6262b016a552de058c7f 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Expose array size and element type, patch by Vinay Sajip!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140614 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6b4ff04dd22e7159887ea6c1bb8b1c01fc9c70a9 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a callback to PPCallbacks for lines skipped by the preprocessor.

Patch by Jason Haslam!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/Preprocessor.h
b201e16e0c331b0bdeae7b30f9f79aae32beb1b2 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Break SourceManager::translateFileLineCol into translateFile, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c737acb8e86564becc5939d681089d1851e6be1a 27-Sep-2011 Douglas Gregor <dgregor@apple.com> Revert r139989 and r140031, which implemented the Objective-C type
system change in <rdar://problem/10109725> that allows conversion from
'self' in class methods to the root of the class's hierarchy. This
conversion rule is a hack that has non-trivial repurcussions
(particularly with overload resolution).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
2246368b1061ef48e00bfc95d519d4393dff9926 27-Sep-2011 Bill Wendling <isanbard@gmail.com> Revert r140589. It was causing failures during llvm compilation:

llvm[1]: Compiling CommandLine.cpp for Debug+Asserts build
if /Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang++ -I/Users/void/llvm/llvm.obj/include -I/Users/void/llvm/llvm.obj/lib/Support -I/Users/void/llvm/llvm.src/include -I/Users/void/llvm/llvm.src/lib/Support -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -Wcast-qual -m64 -Wall -W -Wno-unused-parameter -Wwrite-strings -c -MMD -MP -MF "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d" /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp -o /Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o ; \
then /bin/mv -f "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d"; else /bin/rm "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp"; exit 1; fi
In file included from /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp:25:
/Users/void/llvm/llvm.src/include/llvm/Support/system_error.h:690:14: error: unknown type name 'make_error_condition'; did you mean 'error_condition'?
{*this = make_error_condition(_e);}
^~~~~~~~~~~~~~~~~~~~
error_condition
...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
fa865df489fe68668c554dece36c68b4ce03920f 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> MSVC is stuck in the 80s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140597 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f39d962cf84f46d2c0512157259ae1d41a1a5173 27-Sep-2011 David Blaikie <dblaikie@gmail.com> Renaming PathDiagnosticClients.h to PathDiagnosticConsumers.h (issue 5397)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathDiagnosticClients.h
lang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
93476ddd9ce490f9c08d78b640efad812cb019d1 27-Sep-2011 Kaelyn Uhrain <rikka@google.com> Add typo correction for the type name in C++ "new" statements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b0d6eaa6b646c18c49923aefc76973801f561701 27-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isNull and clang_Cursor_getTranslationUnit functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140587 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
02fa1b9cd6f185fead44f910733ff1086a6c5a0b 27-Sep-2011 Richard Trieu <rtrieu@google.com> Move string literal to bool conversion into its own warning flag -Wstring-conversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8f944492f21a2fb61d539d933add5b1fc7b00e94 26-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Add a small note to BaseSubobject about where it is actually used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/BaseSubobject.h
a48e676a717309afa50ae06a3d4674acec025bf9 26-Sep-2011 Douglas Gregor <dgregor@apple.com> Re-arrange and bitfieldify data members of CXXConstructExpr to save a
little storage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
480b53cfff18c40d10fcb09b0185a9b75dfd491e 26-Sep-2011 Douglas Gregor <dgregor@apple.com> Diagnose attempts to use 'using typename' with a non-identifier name,
from Stepan Dyatkovskiy. Fixes PR10925.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
fb3612ef197cb8532c05f33889ec1aed7c26e5cb 26-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Associate the macro arguments location map with a FileID instead
of a ContentCache, since multiple FileIDs can have the same ContentCache
but the expanded macro arguments locations will be different.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
527f98d65ff1e7c3ed6c8467ca7f516f3ea7ad9b 26-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove SourceManager::getLocation().

It's not descriptive enough and it's just a call of translateFileLineCol()
followed by a call to getMacroArgExpandedLocation(), which is better to be
called explicitly since it has a certain cost and is not always required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
ee0f84fc84ed7de7975e102668d8e53a778f7a8c 26-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't map a file:line:col triplet that is inside the preamble range to
a "loaded" location of the precompiled preamble.

Instead, handle specially locations of preprocessed entities:
-When looking up for preprocessed entities, map main file locations inside the
preamble range to a preamble loaded location.
-When getting the source range of a preprocessing cursor, map preamble loaded
locations back to main file locations.

Fixes rdar://10175093 & http://llvm.org/PR10999

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
aef05892611562a5a2de7f4687c9f22607d3a9ac 26-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> Add missing spaces in diagnostic messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
24018467ddb13857b764182f7753764d2f32f87d 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move VTable builder to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/VTableBuilder.h
5c551f7aef7db952eca6133366e5afa9e37ab0b7 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move VTT builder to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/VTTBuilder.h
33446f1a22a662335c76e2ef7511e48f61801a35 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move BaseSubobject class to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/BaseSubobject.h
40847cfb58acc3cac7d68727df9455ac45f2e118 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename DiagnosticInfo to Diagnostic as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/IdentifierTable.h
lang/Basic/PartialDiagnostic.h
lang/Frontend/ChainedDiagnosticConsumer.h
lang/Frontend/LogDiagnosticPrinter.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/VerifyDiagnosticConsumer.h
lang/Rewrite/FixItRewriter.h
ef3643fbbbf66247c5e205497fae0f46e240c143 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename PathDiagnosticClient to PathDiagnosticConsumer as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/Core/PathDiagnosticClients.h
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
621bc69624599da62abd9bc9e5edd8a63ac99fe6 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename VerifyDiagnosticsClient to VerifyDiagnosticConsumer as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticConsumer.h
lang/Frontend/VerifyDiagnosticsClient.h
4e85b8ae413fa00fa42aa3e625c2db3b1932f8d3 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename ChainedDiagnosticClient to ChainedDiagnosticConsumer as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/ChainedDiagnosticConsumer.h
78ad0b98848c17a0a11847fa1d456e2dfec8aa2f 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename DiagnosticClient to DiagnosticConsumer as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/ARCMT.h
lang/Basic/Diagnostic.h
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/CompilerInstance.h
lang/Frontend/LogDiagnosticPrinter.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/VerifyDiagnosticsClient.h
lang/Rewrite/FixItRewriter.h
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/FileRemapper.h
lang/AST/ASTContext.h
lang/AST/ASTDiagnostic.h
lang/AST/ASTImporter.h
lang/AST/Decl.h
lang/AST/DeclarationName.h
lang/AST/Mangle.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
lang/Basic/PartialDiagnostic.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/CodeGen/BackendUtil.h
lang/CodeGen/ModuleBuilder.h
lang/Driver/ArgList.h
lang/Driver/Driver.h
lang/Frontend/ASTConsumers.h
lang/Frontend/ASTUnit.h
lang/Frontend/AnalyzerOptions.h
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/DiagnosticOptions.h
lang/Frontend/LogDiagnosticPrinter.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/Utils.h
lang/Frontend/VerifyDiagnosticsClient.h
lang/Index/TranslationUnit.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Rewrite/ASTConsumers.h
lang/Rewrite/FixItRewriter.h
lang/Sema/DeclSpec.h
lang/Sema/Scope.h
lang/Sema/ScopeInfo.h
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/Frontend/CheckerRegistration.h
026cb7604c8ef0bc7032e4c067500907d03b67a3 26-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Inline this method now that its completely trivial, and prepare for
hoisting parts of the text diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
8be5c159df96c88880a50086a41efc86b89a46a4 26-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Actually remove the members of CaretDiagnostic no longer in use for
tracking the start and stop of macro expansion suppression. Also remove
the Columns variable which was just a convenience variable based on
DiagOpts. Instead we materialize it in the one piece of code that cared.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
b9c398b25b9c24769fb30b90c3805a500806e06f 26-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Sink the logic for suppressing some macro expansion notes from the
TextDiagnosticPrinter into the CaretDiagnostic class. Several
interesting results from this:

- This removes a significant per-diagnostic bit of state from the
CaretDiagnostic class, which should eventually allow us to re-use the
object.
- It removes a redundant recursive walk of the macro expansion stack
just to compute the depth. We don't need the depth until we're
unwinding anyways, so we can just mark when we reach it.
- It also paves the way for several simplifications we can do to how we
implement the suppression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
fd2a00a60837d19fcf27449d1c580bb1b24ba429 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Add a special note for overload resolution when an initializer list argument
cannot be converted.
This is in preparation for overload resolution of initializer lists.
Currently, you will always get this message when you try to pass an init
list to an overloaded function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6df6548e44a61c444bd85dccd0398cba047c79b1 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Correctly parse braced member initializers (even in delayed parsing) and correctly pass
the information on to Sema. There's still an incorrectness in the way template instantiation
works now, but that is due to a far larger underlying representational problem.
Also add a test case for various list initialization cases of scalars, which test this
commit as well as the previous one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/MultiInitializer.h
lang/Sema/Sema.h
14b0c194b356a1204d081765b3e6699687bed97c 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Give InitListChecker a verification-only mode, where it neither emits diagnostics nor
builds a semantic (structured) initializer list, just reports on whether it can match
the given list to the target type.
Use this mode for doing init list checking in the initial step of initialization, which
will eventually allow us to do overload resolution based on the outcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140457 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
lang/Sema/Overload.h
lang/Sema/Sema.h
8713d4e874f2adc2928ebfb86c845574a14e3b3e 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> In Initialization, add step kind SK_ListConstructorCall (list-initialization
resolves to a constructor call in C++11) and failure kind
FK_ListInitializationFailed (early InitListChecker run failed).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
b0edea9f03cf81227fa35513802f8f146f65c528 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Inline Sema::CheckInitList into its only user.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5d3d41d0873d51b405972baf38e1f3a7ef5b49e0 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Fix typos and non-doxygen-ness in a few comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
a4b984d8396724a8e1137c22186c558c0cb0bf3f 24-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc - redeclaration of property in extension class
must match property type declaration in its
primary class. // rdar://10142679


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4f163424152259f5dafe6ccc696c97a80fc504fc 23-Sep-2011 Matt Beaumont-Gay <matthewbg@google.com> Add DiagGroups to a couple of warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
63bc59bf22b8f2e672fcf3904fe33993f69e006f 23-Sep-2011 Daniel Dunbar <daniel@zuster.org> Driver: Add a --working-directory option which can be used to cause the compiler
to operate "as if" in a certain working directory.
- For now, we just implement this by changing the actual working directory, but
eventually we would want to handle this transparently. This is useful to
avoid an extra exec() pair in some situations, and will be something we would
want to support for more flexibility in using the Clang libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Stmt.h
f1f8b1a404d9ce6f0eb78e97b598a220d8ca9090 23-Sep-2011 Richard Trieu <rtrieu@google.com> Add a new warning to -Wliteral-conversion to catch cases where a string literal
is cast to a boolean. An exception has been made for string literals in
logical expressions to allow the common case of use in assert statements.

bool x;
x = "hi"; // Warn here
void foo(bool x);
foo("hi"); // Warn here
assert(0 && "error");
assert("error); // Warn here



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9fe8c74a93ac8e92512615c5f83e7a328b3b0544 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Fix missing includes for llvm_unreachable


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Type.h
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/DeclTemplate.h
lang/AST/DeclVisitor.h
lang/AST/Mangle.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/AST/StmtVisitor.h
lang/AST/Type.h
lang/AST/TypeVisitor.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Sema/DeclSpec.h
47adebef0df6dce752fe9a45e9190e8005b5d07c 22-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> Add support for CPATH and friends.

This moves the existing code for CPATH into the driver and adds the environment lookup and path splitting there.
The paths are then passed down to cc1 with -I options (CPATH), added after the normal user-specified include dirs.
Language specific paths are passed via -LANG-isystem and the actual filtering is performed in the frontend.

I tried to match GCC's behavior as close as possible

Fixes PR8971.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/HeaderSearchOptions.h
71a7605977113c795edd44fcbd2302ad49506653 22-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't use TemplateArgumentListInfo inside AST nodes because it may leak.
Use ASTTemplateArgumentListInfo instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateBase.h
b0c3e0909bb04af0bfb82ad01ab6909649d68cca 22-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
d0109823a08e19d6b27ee28ecfef1244611f09f9 22-Sep-2011 Ted Kremenek <kremenek@apple.com> Place diagnostic warn_ivar_use_hidden under the flag -Wshadow-ivar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5f625712f622f6e57de17b6f7eec242956b993ee 22-Sep-2011 Anna Zaks <ganna@apple.com> ST->scanReachableSymbols() is creating a SubRegionMap (SRM) on every call since one SRM is created in each ScanReachableSymbols instance. Creating the object just once and calling only scan inside the loop gives ~ 14% speed up of the StaticAnalyzer run (Release+Asserts).

Pull out the declaration of the ScanReachableSymbols so that it can be used directly. Document ProgramState::scanReachableSymbols() methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
77b6de07be9186063c12928d2e9785a5d4eecbf6 22-Sep-2011 David Blaikie <dblaikie@gmail.com> ArrayRef-ifying the fields passed to Sema::ActOnFields


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
a71f9d0a5e1f8cafdd23a17e292de22fdc8e99ff 22-Sep-2011 David Blaikie <dblaikie@gmail.com> ArrayRef-ifying the UnexpandedParameterPacks passed to Sema::CheckParameterPacksForExpansion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4278c654b645402554eb52a48e9c7097c9f1233a 21-Sep-2011 David Blaikie <dblaikie@gmail.com> ArrayRef-ifying Function/BlockDecl's setParams


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f250365ce65412d7d4e331fccf042b6e974c2f14 21-Sep-2011 Douglas Gregor <dgregor@apple.com> Diagnose attempts to write a templated data member, from Stepan
Dyatkovskiy! Fixes PR10896.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ca82a82082edc982a1fb5fcfef2dd2c8cf9bc824 21-Sep-2011 John McCall <rjmccall@apple.com> Enforce access control for conversion operators used in contextual
conversions (rather than just call-arguments).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
09ca9ef5f92cf4375a19bf7a80d571779c9f370f 21-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Fix a bug where PathDiagnosticLocation did not generate a valid range and add asserts to check validity of locations early on. Ignore invalid ranges in PathDiagnosticPiece (they could be added by checker writers).

Addresses radar://10124836 and radar://radar10102244.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
290ad8c8eb1546692b20c4095ee441023f2f1005 21-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Merge ASTReader::LoadPreprocessedEntity with ReadPreprocessedEntity
and don't store the ID for each preprocessed entity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
ef70724e66d8ede0edbe260fbcdd9781688bb1fd 21-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor PathDiagnosticLocation: Remove SourceRange member from PathDiagnosticLocation - FullSourceLoc Loc and PathDiagnosticRange Range are sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
c20f399889f53f74eef0404388de4086b36d2948 21-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor PathDiagnosticLocation: Add comments. Remove the last constructor which could allow invalid locations to slip in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
bc0a3016b9fd51f84780f0f82fb0f7f2ca93e8ff 21-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove dead code. (This code is trying to implement the idea that PathDiagnosticClient could implement DiagnosticClient and has been dead for a while).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
5555bf78e0a76337f7149669723bf4f3f9ddbc1c 21-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove PreprocessingDirectiveKind since it's not necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
de4e0a8e57e643bbe78ad37ad6023c45a8a9f7e2 21-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> The location of the name in MacroDefinition is the beginning of its range,
don't store an extra location for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
590dd8e0959d8df5621827768987c4792b74fc06 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor PathDiagnosticLocation: Make PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation.

(Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
61ab80a8b35e6fe9363e8ef1b3d27209b0e89349 20-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] Default to arm mode when using the integrated assembler.
rdar://10125227

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
b66f4867702697f1f097ab95f8a23a39310430e0 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor PathDiagnosticLocation: Use PointerUnion of LocationContext and AnalysisContext to support creation of PathDiagnosticLocations for checkers which no context sensitivity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
e97436732c0f20aa15ecbf92a5f905eee888528f 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor PathDiagnosticLocation: Lazily query LocationContext for a ParentMap as needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
23803374d8db054192ea6fcb766b87e04f26c8fb 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove LocationContext and a dependency from PathDiagnosticLoaction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
9d8c2b61519cb05ac6737cc542e274f9e2e0552a 20-Sep-2011 John McCall <rjmccall@apple.com> Fix a crash-on-invalid with bad CV-qualification on 'this' in the
presence of an implicit move assignment operator. I think the implicit
copy assignment operator case was also wrong, but just in a "displaying
the wrong diagnostic" way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b490c4bb01a5a3a86947851fa66823dda32ed012 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor PathDiagnosticLocation: Pre-compute Range and Location with gen methods on object creation instead of computing on demand. This would allow to remove dependency on the other members which help with construction and might not even be valid at later stages (to be removed later on).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
1531bb0c69d9afff6a6434e4cadf345eb628b287 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Use more create methods in the PathDiagnostic, cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
4522e2a9e7fa0313e8e5a388d8f0ab66feccc6af 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] BugReport has a profile method, so reuse it here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
cf8742e471a712d551d9a348c85050427dce0b4a 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Add a convinience method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
a2d7e6511a8767dc67381c210601b895a8ebae39 20-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Constify a method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
0c706c29f20b6fa36759fa41333b9c3ec0bd2969 20-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Add list initialization for complex numbers in C. Essentially, this allows "_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description.

<rdar://problem/9397672>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Initialization.h
8c25fc584ce27d59df9923f153e8a132dde58d04 19-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: introduce support for function scope __local variables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/Specifiers.h
a68c4aff8cd3aada697ad36dc6582d0e09b4b0d2 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] The range map for SLoc offsets is a reversed one, not negated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
92ddef1bf843e1e18c040d69f48a6bf0bc7c776a 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In libclang, when visiting preprocessed entities in a source range, use
PreprocessingRecord's getPreprocessedEntitiesInRange.

Also remove all the stuff that were added in ASTUnit that are unnecessary now
that we do a binary search for preprocessed entities and deserialize only
what is necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Lex/PreprocessingRecord.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTSerializationListener.h
lang/Serialization/ASTWriter.h
b6441ef9b7285bd1aa77b05b10f473f7a3f413e7 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce local_begin()/local_end() methods in PreprocessingRecord which
return iterators for local, non-loaded, preprocessed entities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
507097ec40105ed927cb5a744fad98f5875aacac 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When getting a source location from a file:line:col triplet
check whether the requested location points inside the precompiled preamble,
in which case the returned source location will be a "loaded" one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
efa2ff8603dae51f5f5ed7509a503f477498ad22 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Break SourceManager::translateFileLineCol into translateLineCol that returns the
source location of line:col of a specific FileID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2dbaca748bc3eb6539f417bd8354c930bdf88fa4 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce PreprocessingRecord::getPreprocessedEntitiesInRange()
which will do a binary search and return a pair of iterators
for preprocessed entities in the given source range.

Source ranges of preprocessed entities are stored twice currently in
the PCH/Module file but this will be fixed in a subsequent commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/Module.h
a64ccefdf0ea4e03ec88805d71b0af74950c7472 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.

It already works (and is useful with) macro locs as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Serialization/ASTReader.h
5a4374812c56aa60672e291b07e14d3696bbb5a6 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make ASTReader/ASTWriter friends of SourceLocation. They already
depend on internal knowledge of SourceLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Serialization/ASTReader.h
aa6edaeb35e02a07bd4840c0159900754f083ce5 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce isLoadedSourceLocation() and isLocalSourceLocation() methods in SourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
1f6d22550161fffbe82ea9a8a143b2c1247f5f3c 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Const-ify some methods in ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
ac1ffcc55b861737ba2466cd1ca1accd8eafceaa 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Preload the PreloadSLocEntries through the SourceManager and
don't call ReadSLocEntryRecord() directly because the entry may have
already been loaded in which case calling ReadSLocEntryRecord()
directly would trigger an assertion in SourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
4d1cbcf6b9aaae7f82c6e332f46b2ad2d8971bd0 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For SourceManager::isBeforeInTranslationUnit, when one location
points at the inclusion/expansion point of the other, regard this
as coming before the other.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
950be71c745409e373ae8a834490f9026c8ac222 19-Sep-2011 Richard Trieu <rtrieu@google.com> Changes to the name lookup have caused a regression in the digraph fix-it hint.
For instance:

template <class T> void E() {};
class F {};

void test() {
::E<::F>();
E<::F>();
}

Gives the following error messages:

error: found '<::' after a template name which forms the
digraph '<:' (aka '[') and a ':', did you mean '< ::'?
::E<::F>();
^~~
< ::
error: expected expression
E<::F>();
^
error: expected ']'
note: to match this '['
E<::F>();

This patch adds the digraph fix-it check right before the name lookup,
moves the shared checking code to a new function, and adds new
tests to catch future regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
24dd9ad9001d1aa16223de135d7e4ed34e94b207 19-Sep-2011 Erik Verbruggen <erikjv@me.com> Removed an unused field and its accessors methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
1d4e8e9340c9699069a33a74562e883a305f7607 17-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc - Treat type of 'self' in class methods as root of
class of this method. // rdar://10109725


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
62ec1f2fd7368542bb926c04797fb07023547694 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.

Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.def
lang/Parse/Parser.h
ae55608a29d61737b7c5390e2d1bb30ab8d5febb 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> As per discussion with Doug Gregor on the IRC channel, introduce a new compiler switch: -fms-compatility.

Microsoft specific tweaking will now fall into 2 categories:

- fms-extension: Microsoft specific extensions that should never change the meaning of an otherwise well formed code. Currently map to LangOptions::Microsoft. (To be clearer, I am planning to change the name to LangOptions::MicrosoftExt).

- fms-compatibility: Really a MSVC emulation mode. Map to LangOptions::MicrosoftMode. Can change the meaning of an otherwise standard conformant program.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.def
lang/Driver/CC1Options.td
lang/Driver/Options.td
61c5e340c26971d195bd27232e7f2e71be24bb52 17-Sep-2011 Douglas Gregor <dgregor@apple.com> With modules, we can end up loading a new module after we've seen an
arbitrary amount of code. This forces us to stage the AST writer more
strictly, ensuring that we don't assign a declaration ID to a
declaration until after we're certain that no more modules will get
loaded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
0cd59482abd8aec9ed1eaad11f5fe9c1e42639f6 16-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 5 of ?):
- Get rid of PathDiagnosticLocation(SourceRange r,..) constructor by providing a bunch of create methods.
- The PathDiagnosticLocation(SourceLocation L,..), which is used by crate methods, will eventually become private.
- Test difference is in the case when the report starts at the beginning of the function. We used to represent that point as a range of the very first token in the first statement. Now, it's just a single location representing the first character of the first statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
fba18aa8f2cd1994dc65e8cb9f4be201c560dc0b 16-Sep-2011 Douglas Gregor <dgregor@apple.com> Add an experimental flag -fauto-module-import that automatically turns
#include or #import direcctives of framework headers into module
imports of the corresponding framework module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/PreprocessorOptions.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Lex/Preprocessor.h
dd22509c82eb7681a0f46b41d61cb2e25a4d8fa1 15-Sep-2011 Richard Trieu <rtrieu@google.com> Finish the lex->LHS and rex->RHS cleanup in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4ebd45f4279d84416568ada6adf56044bdf391b7 15-Sep-2011 Douglas Gregor <dgregor@apple.com> Detect cyclic module dependencies in a manner that is rather more
graceful than running out of stack space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Frontend/PreprocessorOptions.h
7489889dd4e0fb5cd4b4176c59283da3b217f14e 15-Sep-2011 Douglas Gregor <dgregor@apple.com> Eliminate the list of modules from the preprocessor options. This was
used back when we had an -import-module command-line option, but it's
no longer used (or useful).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
531dcce3e5f5d5234520df7593e285d7dd007456 15-Sep-2011 Douglas Gregor <dgregor@apple.com> Eliminate the unused -create-module cc1-level option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
4fdf97bf51d2a156cec3232efd6dae110aa02aa0 15-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?):
- Fix a fixme and move the logic of creating a PathDiagnosticLocation corresponding to a ProgramPoint into a PathDiagnosticLocation constructor.
- Rename PathDiagnosticLocation::create to differentiate from the added constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
74558b4c2f4136b0d89bbaa974df1070593b355a 15-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: changing naming in error messages based on reviewer comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e24692b30adbe8144597678a0e3354912e99c747 15-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Overhaul how preprocessed entities are [de]serialized.

-Use an array of offsets for all preprocessed entities
-Get rid of the separate array of offsets for just macro definitions;
for references to macro definitions use an index inside the preprocessed
entities array.
-Deserialize each preprocessed entity lazily, at first request; not in bulk.

Paves the way for binary searching of preprocessed entities that will offer
efficiency and will simplify things on the libclang side a lot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/Serialization/Module.h
69f5d14bae44f05b22fa50bb87122a61081fcd57 15-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: cleaning up FIXME for trylocks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
4e4bc75d3570835e13183c66ac08974cdc016007 15-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: refactoring various out of scope warnings to use the same inteface. This eliminates a lot of unnecessary duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ThreadSafety.h
lang/Basic/DiagnosticSemaKinds.td
220ac8c175cb1bf9b18d82eefe036995d7a2164d 15-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?):
- Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext.
- Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
b50dd472cd6c8b13213626f13a928dbe41581f09 14-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: small fixes in comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ThreadSafety.h
8ee51ef211bfed9ce04bc93835e19aee014f2fae 14-Sep-2011 Douglas Gregor <dgregor@apple.com> Teach the driver to always pass down a module cache path. If none is
supplied, use something derived from the system's temporary
directory. Depends on LLVM r139725.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
df8327c28d293cf7c6952b86dba26863235dcc0f 14-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: reverting to use separate warning for requirement to hold any lock

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
19903465e960329c0d5d93327f4046d036b0bc75 14-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: adding additional documentation to the main thread safety interface, and making the destructor for the thread safety handler pure virtual

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ThreadSafety.h
7c24334bedf59bd9af57ee53eb8f6d9f6a50ca9b 14-Sep-2011 Kaelyn Uhrain <rikka@google.com> Plug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/TypoCorrection.h
297b20ac5c1a638e650a7d85c2eab9916bb4ed57 14-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> Use a group for a diagnostics I added late.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
528a499eb84d61667f65b16a13780c135b822f6b 14-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: warn when a 'retain' block property is
declared which does not force a 'copy' of the block literal
object. // rdar://9829425


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
33e8491d7cf757812b9f8d126e0368c3ac0d2dd6 14-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Remove redundant copy constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
4d353eb8af7324c0ee3736c736668f6c9b162ee0 14-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] After CFG has been linearized, we can have a situation where an ExpoledNode has an invalid SourceLocation (which has no correspondence in the source code). This commit is the first step to solve this problem.
- It adds LocationContext to the PathDiagnosticLocation object and uses it to lookup the enclosing statement with a valid location.
- So far, the LocationContext is only available when the object is constructed from the ExplodedNode.
- Already found some subtle bugs(in plist-output-alternate.m) where the intermediate diagnostic steps were not previously shown.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
43f48b0b1bc763dc56db6e01de4fcc44ad389bef 14-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Refactor: Make PathDiagnosticLocation responsible for creating a valid object given an ExploadedNode (the same logic can be reused by other checkers).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
6e975c4517958bcc11c834336d340797356058db 14-Sep-2011 Douglas Gregor <dgregor@apple.com> For modules, use a hash of the compiler version, language options, and
target triple to separate modules built under different
conditions. The hash is used to create a subdirectory in the module
cache path where other invocations of the compiler (with the same
version, language options, etc.) can find the precompiled modules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Driver/CC1Options.td
lang/Frontend/CompilerInvocation.h
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/PreprocessorOptions.h
lang/Lex/HeaderSearch.h
e6be34d8f77312edf9ed38034e52cb4d22c8e1c1 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_getPresumedLocation which works like clang_getExpansionLocation
but takes into account #line directives coming from preprocessed files.

Patch by Vinay Sajip!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139647 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1c7e0472f5683a8ade62285f366637050cf113e5 13-Sep-2011 Douglas Gregor <dgregor@apple.com> When building a module on-demand, clear out the "non-modular" language
and preprocessor options (such as macro definitions) first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.def
lang/Basic/LangOptions.h
lang/Frontend/PreprocessorOptions.h
18aa2ff4641847d7f8866e8c5912d4d0ddb858ce 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename InterFace -> Interface, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
6dc6f008994472cf4da321855e8c51c39720f3ed 13-Sep-2011 John McCall <rjmccall@apple.com> A strong property of block type has "copy" setter semantics, not "retain".
This is consistent with the behavior of assigning into a __strong l-value,
and it's also necessary for ensuring that the ivar doesn't end up a dangling
reference. We decided not to change the behavior of "retain" properties, but
just to make them warnings/errors when of block type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f1e7af36d6673185994b3d1751cf7e9a9a1491b8 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add the location of the interface reference to IBOutletCollectionAttr.
Depends on a llvm tablegen commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
265941bc308d65cc270d5c4de5806f37ce405606 13-Sep-2011 John McCall <rjmccall@apple.com> Refactoring, mostly to give ObjCPropertyDecls stronger invariants for
their semantic attributes and then to take advantage of that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
7d5e81bf24dbfd334a7c62a7ae51043c79a69aa9 13-Sep-2011 Douglas Gregor <dgregor@apple.com> Switch the serialization of LangOptions over to use the .def file. We
should no longer have the serialization of LangOptions out of sync
with the structure itself (yay).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.def
lang/Basic/LangOptions.h
6639e9255489ad8e10278d5658fdd4b3c0e1e4cd 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang]
-Allow cursor visitation of an attribute using its source range
-Add C++ 'final' and 'override' attributes as cursor kinds
-Simplify the logic that marks 'final' and 'override' attributes as tokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139609 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e289d81369914678db386f6aa86faf8f178e245d 13-Sep-2011 Douglas Gregor <dgregor@apple.com> Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.

AST serialization changes are next up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.def
lang/Basic/LangOptions.h
8c7f4bca64d5128311ce50449ae9d2048c2ffea4 13-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] Add follow up comment for r139551 to ensure the unused option is not
removed in the future.
rdar://10110352 and PR10908

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
768d6cae40ad4ff3aed5483269d068ff7a45e229 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep the source range of attributes. Depends on a llvm tablegen commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Sema/Sema.h
ffcc3105d223899740e79f3f8199f3881df4d1de 13-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Record the full source range of an attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Sema/AttributeList.h
c985b88efc9188845952ab524fe6d4717705257b 13-Sep-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, downgrade "goto into protected scope" from error to warning if we are jumping over a variable initialization via a goto.

This fixes a few errors when parsing MFC code with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
83754162f698a5dafad93fb89be0953651a604d0 13-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Add a bit to the CFGBlock to track when it contains a no-return
CFGElement. This will allow greatly simplifying the logic in
-Wreturn-type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
c5d9a90b3a3c16324e0cceeccec3d2993888deb6 13-Sep-2011 John McCall <rjmccall@apple.com> Don't use native atomics on ivars whose size is not a power of two,
even on architectures that support unaligned access (which is the
only way this is otherwise legal, given that ivars apparently do
not honor alignment attributes).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
c8cfc74bdcc999828bc232294d937fb191940d5b 13-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Enhance the CFG construction to detect no-return destructors for
temporary objects and local variables. When detected, these split the
block, marking the new one as having only the exit block as a successor.
This prevents a large number of false positives in warnings sensitive to
no-return constructs such as -Wreturn-type, and fixes the remainder of
PR10063 along with several variations of this bug that had not been
reported. The test cases are extended across the board to cover these
patterns.

This also checks in a stress test for these types of CFGs. The stress
test declares some 32k variables, a mixture of no-return and normal
destructors. Previously, this resulted in roughly 2500 CFG blocks, but
didn't model any of the no-return destructors. With this patch, it
results in over 33k blocks, many of them now unreachable.

The nice thing about how the analyzer is set up? This causes *no*
regression in performance of building the CFG. It actually in some cases
makes it faster, as best I can benchmark. The analysis for -Wreturn-type
(and any other that cares about no-return code paths) is technically
slower now as it has to look at many more candidate blocks, but it
computes the correct answer. I have more test cases to follow, I think
they all work now. Also I have further work that should dramatically
simplify analyses in the presence of no-return.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
78243658c533168d51fd076fba328437932ba6f1 13-Sep-2011 Douglas Gregor <dgregor@apple.com> When compiling a module on-demand, re-use the diagnostics client
already provided. This required a little bit of clean-up in the way
that VerifyDiagnosticsClient managed ownership of its underlying
"primary" client, because now it will no longer always take ownership.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/CompilerInstance.h
lang/Frontend/VerifyDiagnosticsClient.h
21cae2059a06f7d89eee169409c9266def1b1aca 13-Sep-2011 Douglas Gregor <dgregor@apple.com> When an import statement fails to find a module in the module cache,
but there is a corresponding umbrella header in a framework, build the
module on-the-fly so it can be immediately loaded at the import
statement. This is very much proof-of-concept code, with details to be
fleshed out over time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/FileManager.h
lang/Lex/HeaderSearch.h
dc3e7255f1a35ca5cf352a40a5952db0e65c7900 13-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] Ignore the '--' option, rather then fail. Do so to match gcc's
behavior.
rdar://10110352 and PR10908

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
9a6da6930644b4f2dbe4885b0eb4fc1274ff56a4 12-Sep-2011 Douglas Gregor <dgregor@apple.com> Introduce a cc1-level option to provide the path to the module cache,
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/HeaderSearchOptions.h
lang/Lex/HeaderSearch.h
e389585f8a40f80004d3b98b99f3980305ef78a0 12-Sep-2011 Douglas Gregor <dgregor@apple.com> Diagnose attempt to mark function-local declarations as __module_private__.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a81fffe678107d49a9f1c03d80adf85f18a9867f 12-Sep-2011 Anna Zaks <ganna@apple.com> Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
f3a762a8de396af471f35b77f6897989867c898e 12-Sep-2011 Douglas Gregor <dgregor@apple.com> Remove the restriction on module-private friends. Since the friend
declaration may be the first declaration, we want the ability to that
declaration to be marked module-private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
33e56f3273457bfa22c7c50bc46cf5a18216863d 10-Sep-2011 John McCall <rjmccall@apple.com> Rename the ARC cast kinds to start with "ARC".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/OperationKinds.h
ac5ecf46c51c4e9128612d68ff20d465eb192554 10-Sep-2011 David Blaikie <dblaikie@gmail.com> Correctly referring to the null pointer as 'null' not the macro 'NULL' in the boolean conversion diagnostic message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4f4f349208b2b2307454e169ac7b039e989f003f 10-Sep-2011 David Blaikie <dblaikie@gmail.com> Show either a location or a fixit note, not both, for uninitialized variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dc05b11c67331016473fbc7909827b1b89c9616b 10-Sep-2011 John McCall <rjmccall@apple.com> When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.

There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/OperationKinds.h
lang/Sema/Sema.h
b3321093f6ead084427eb4a6621832fc4ee2f5de 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Fix a diagnostics crasher with -Wmissing-noreturn in Objective-C
methods, and improve the diagnostic slightly along the way. Fixes
<rdar://problem/10098695>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
02a5e875cca1ce2f471dad06fb5557346d99c164 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Don't crash when we fail to load a module. It's unbecoming of a
well-bred compiler like Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
08e0bc16b3312c27e87d33be7dcf3d4fe5bdd2e2 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Kill of the Decl::PCHLevel field entirely. We now only need to know
whether a Decl was deserialized from an AST file (any AST file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Frontend/ASTUnit.h
a1364be341550d71dff27dd8de0c6872ba6c707e 10-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Extend the Stmt AST to make it easier to look through label, default,
and case statements. Use this to make the logic in the CFG builder more
robust at finding the actual statements within a compound statement,
even when there are many layers of labels obscuring it.

Also extend the test cases for a large chunk of PR10063. Still more work
to do here though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
919814def90acecd25a35445862f0c0ff72a9b05 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Introduce a new predicate Decl::isFromASTFile() to determine whether a
declaration was deserialized from an AST file. Use this instead of
Decl::getPCHLevel() wherever possible. This is a simple step toward
killing off Decl::getPCHLevel().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Sema/Lookup.h
d5b16055782034ca90153880c36bd88b59c63aa0 10-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: removing unnecessary import and reordering import list

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ThreadSafety.h
77f68bb90af93b95045fb994e7cd68137adcc132 10-Sep-2011 Julien Lerouge <jlerouge@apple.com> Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
712f2fcb70ae2eb0cb684d565e7d2cb76881006b 10-Sep-2011 Douglas Gregor <dgregor@apple.com> In the ASTReader, replace the never-NULL Preprocessor pointer with a
Preprocessor reference. Simplify some code along the way, so there is
no separate "initialize the preprocessor" step.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
359427794704666ff7a5a933ace11c5256fa3af7 09-Sep-2011 Douglas Gregor <dgregor@apple.com> In ASTReader, replace the never-NULL ASTContext pointer with an
ASTContext reference. Remove all of the extra checking and logic that
was used to cope with a NULL ASTContext. No effective functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
6274d30d77870393d83a404dd223b8005f2b8cd5 09-Sep-2011 Douglas Gregor <dgregor@apple.com> Friends cannot be declared module-private

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
d023aec8907831a18d3514a95b843a7ee06b6b5e 09-Sep-2011 Douglas Gregor <dgregor@apple.com> Specializations cannot be module-hidden. Diagnose attempts to do so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
13db5cfc4e5f03eb70efe0d227b53b8280f16161 09-Sep-2011 John McCall <rjmccall@apple.com> Treat the weak export of block runtime symbols as a deployment-target
feature akin to the ARC runtime checks. Removes a terrible hack where
IR gen needed to find the declarations of those symbols in the translation
unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
e761230ae3751b525cadd8066c74ec278ee4ef57 09-Sep-2011 Douglas Gregor <dgregor@apple.com> __module_private__ is inherited by redeclarations of an entity, and
must also be present of the first declaration of that entity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
99107ebc0a5aea953b736e12757e0919d5249d43 09-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: This patch deals with previously unhandled cases when building lock expressions. We now resolve this expressions, avoid crashing when encountering cast expressions, and have a diagnostic for unresolved lock expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ThreadSafety.h
lang/Basic/DiagnosticSemaKinds.td
402aa0698fec81e574818a0a6c2000fac0b2c4c6 09-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread Safety: Moving the analysis to a new file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ThreadSafety.h
a49d1d8a34381802040c3d7fa218e93b457d2b1d 09-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: refactoring test cases

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
45df9c68b4d8eb2206b884c38e89f56d41452c83 09-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use ArrayRef in ExternalASTSource::SetExternalVisibleDeclsForName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
0bcc9bc6cd46757000245fb7b91302e6ec3478a1 09-Sep-2011 John McCall <rjmccall@apple.com> Contextually converting to 'id' is not a useful operation. Contextually
converting to an arbitrary Objective-C pointer type is. Without
significantly re-implementing anything, change the API to reflect this,
and as a minor optimization, strip the pointer conversion off before
potentially building it.

Mostly, this removes a really bizarre-looking bit of code from
BuildInstanceMessage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee 09-Sep-2011 John McCall <rjmccall@apple.com> Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/OperationKinds.h
lang/AST/Type.h
90ab75b5ad328d2b155ec83fd4e80cd0f7af5729 09-Sep-2011 Richard Trieu <rtrieu@google.com> Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
b2fc69097d15f6374b9e5e6101f33960c34acbed 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change references to StmtTy to Stmt and removed typedefs of StmtTy. Also removed typedef of AttrTy since it is not used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
8d267c57afb3af418ed5281b7a9bb4555d701a82 09-Sep-2011 Douglas Gregor <dgregor@apple.com> Modules: introduce the __module_private__ declaration specifier, which
indicates that a declaration is only visible within the module it is
declared in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/TokenKinds.def
lang/Sema/DeclSpec.h
lang/Sema/Lookup.h
lang/Sema/Sema.h
f81e5a9e3f3ff80c56e4afb4fe6311a8735f36e8 09-Sep-2011 Richard Trieu <rtrieu@google.com> Change all references of type ExprTy to Expr and get rid of the typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
ccd891ae75e9678f1138868e50508c8083d021fa 09-Sep-2011 Richard Trieu <rtrieu@google.com> Capitialize paramater names in SemaExpr.cpp and resolve any parameter name conflicts between declarations and definitions from this and previous refactorings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5330ee071743b8a896aa46979b020e6c3ca9b1cc 09-Sep-2011 Eric Christopher <echristo@apple.com> Rearrange comment slightly for Bill.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
179b920a8bca0811cf4ae32910925c3f98cca4cc 09-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: small edit to unused variation on warning left in by accident from earlier commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8bccabeac6b98650dfd88bd1fc84e841eb42af4b 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread Safety: In C++0x Mutexes are the objects that control access to shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
87198c304cc1fae48b7a06ce9faf8b4017981059 08-Sep-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> The frexp, modf, and remquo builtins are not 'const'.

These functions return a second value by writing to a pointer argument,
so they cannot be marked 'readnone' which implies that they don't access
memory.

<rdar://problem/10070234>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
978191e0906606e32965cebcf81627d8e8711b13 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: Adding basic support for locks required and excluded attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a53257c94a4d871e64070f72edb687dcfb08c15d 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: shared vs. exclusive locks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ed9d84a2112e2bd56befb5f4fa8fc5bdf71fafa3 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread safety: added support for function scopes in attribute arguments.

This patch was written by DeLesley Hutchins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Sema/Sema.h
eff98fc3561f6b717f6348f04b3f4fe03e934466 08-Sep-2011 Caitlin Sadowski <supertri@google.com> Thread Safety: Patch to implement delayed parsing of attributes within a
class scope.

This patch was also written by DeLesley Hutchins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/CMakeLists.txt
lang/Makefile
lang/Parse/CMakeLists.txt
lang/Parse/Makefile
lang/Parse/Parser.h
lang/Sema/Sema.h
8f7c540ac42370c40ebcdc4b69018c938faf94ec 08-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix annotation and getting a "macro expansion" cursor
for a builtin macro expansion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
29f39425fc7fcaede88a7e573f392975f8dc5e3e 08-Sep-2011 Eric Christopher <echristo@apple.com> Add a block comment explaining how the different source locations work
including some source examples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
14068e83f30864ed278fa43c5954404b47e99e7d 08-Sep-2011 David Blaikie <dblaikie@gmail.com> Adding FixIts to static/inline main declaration diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
e97179c675b341927807c718be215c8d1aab8acb 08-Sep-2011 Douglas Gregor <dgregor@apple.com> Implement the Objective-C 'instancetype' type, which is an alias of
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
b8db7cd9ac05c522855631670ec2e97255384f5a 08-Sep-2011 Douglas Gregor <dgregor@apple.com> Optimize the preprocessor's handling of the __import_module__
keyword. We now handle this keyword in HandleIdentifier, making a note
for ourselves when we've seen the __import_module__ keyword so that
the next lexed token can trigger a module import (if needed). This
greatly simplifies Preprocessor::Lex(), and completely erases the 5.5%
-Eonly slowdown Argiris noted when I originally implemented
__import_module__. Big thanks to Argiris for noting that horrible
regression!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/Preprocessor.h
a3e9a969fd25022805a9e0ad827f3729286f6d58 07-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r139222, operator->() in PreprocessingRecord::iterator. It is useful
to meet the requirements of the InputIterator concept.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
edc08821d3f73514291b339db29aca1a17485e39 07-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc-gc: More sema work for properties declared 'weak'
in GC mode. // rdar://10073896


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5770bb707db9169c258859a9e7c935f99a32d64c 07-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Extract the emission of the diagnostic's location into a separate
function. This is really the beginning of the second phase of
refactorings here. The end goal is to have (roughly) three interfaces:

1) Base class to format a single diagnostic suitable for display on the
console.
2) Extension of the base class which also displays a caret diagnostic
suitable for display on the console.
3) An adaptor that implements the DiagnosticClient by delegating to #1
and/or #2 as appropriate.

Once we have these, things like libclang's formatDiagnostic can use #1
and #2 to provide really well formatted (and consistently formatted!)
textual formatting of diagnostics.

Getting there is going to be quite a bit of shuffling. I'm basically
sketching out where the interface boundaries can be drawn for #1 and #2
within the existing classes. That lets me shuffle with a minimum of fuss
and delta. Once that's done, and any of the related interfaces that need
to change are updated, I'll hoist these into separate headers and
re-implement libclang in terms of their interfaces. Long WIP, but
comments at each step welcome. =D

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
6c57ccec994f09d732a381bb4bb16c79d181e5ac 07-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Move the HilightRange method from TextDiagnosticPrinter down to
CaretDiagnostic. It's completely generic, with nothing to do with the
diagnostic client or info APIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
900693b715b3832a42ae87157332baece94ccdd8 07-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Make sure the FunctionDecl's created by "#pragma weak" have correct ParmVarDecl's. PR10878.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
a1e99cc7e9b89b27ea0a0351ef9f1421f62156e5 07-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> operator->() in PreprocessingRecord::iterator is useless since we
are returning a pointer to pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
5182a1858f4483c7289997d365ba3e103cd7d1b7 07-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Switch the CharSourceRange array to a small vector. The array was
a stack array of a magical size with an assert() that we never
overflowed it. That seems incredibly risky. We also have a very nice API
for bundling up a vector we expect to usually have a small size without
loss of functionality or security if the size is excessive.

The fallout is to remove the last pointer+size parameter pair that are
traced through the recursive caret diagnostic emission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
0f74d1e441fdf2229118b7ca5c88db29d5e8f44f 07-Sep-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, if we are inside a template class member function and we can't resolve a function call then create a type-dependent CallExpr even if the function has no type dependent arguments. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes.

With this patch in, clang will generate only 37 errors (down from 212) when parsing a typical MFC source file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8a7b3f73d06a7181f2228d1605235b1b5484255f 07-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Use ArrayRef for the fixit hint array rather than a pointer and a size.
Clean up loops over the hints to use the more idiomatic iterator form in
LLVM and Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
f1bb0b049f7292336d3e2229a56e05003820b0f4 06-Sep-2011 Ted Kremenek <kremenek@apple.com> Place 'equality comparison with extraneous parentheses...' into a subgroup of -Wparentheses called -Wparentheses-equality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
f8b7f7177d722d254e255a7754446148ef514789 06-Sep-2011 Douglas Gregor <dgregor@apple.com> Implement the Named Return Value Optimization (NRVO) for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
edc41e163c8f8d0cc69a3fc017beba14262af316 06-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
38f1d680b41f8bb8deb72899c7a45aebaadd0e52 05-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Enable -Wdangling-fields by default in Clang. I've run this warning over
a very large chunk of code and found zero false positives. I've only
found a few bugs, but that likely is because bugs of this nature
actually do manifest. We've also identified several bugs that were
caught by Valgrind, but would have been caught faster and more easily
with this warning.

If anyone has concerns, or this causes fallout on any build bots, lemme
know. I'm happy to just put it under -Wmost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8f4fb190852d3f86787c7e2c3dfc1b96143197ae 04-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
7d100872341f233c81e1d7b72b40457e62c36862 04-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support code-completion for C++ inline methods and ObjC buffering methods.

Previously we would cut off the source file buffer at the code-completion
point; this impeded code-completion inside C++ inline methods and,
recently, with buffering ObjC methods.

Have the code-completion inserted into the source buffer so that it can
be buffered along with a method body. When we actually hit the code-completion
point the cut-off lexing or parsing.

Fixes rdar://10056932&8319466

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
bf3380a317ab09ae7f23c1bc17cb562f8175a986 03-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Teach -Wdangling-field to warn about temporaries bound to references as
well.

Also, clean up the flow of the code a bit, and factor things more
nicely.

Finally, add the test case that was missing from my previous
commit (sorry), with new tests added to cover temporaries and other fun
cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
81c6477bcd39b6b1a0a7d9c38da5ab8cbb6ea565 03-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Add a simple new warning to catch blatantly dangling pointer and
reference members of classes. We've had several bugs reported because of
this, and there's no reason not to flag it right away in the compiler.

Comments especially welcome on the strategy for implementing this
warning (IE, what should trigger this?) and on the text of the warning
itself.

I'm going to extend this to cover obvious cases with temporaries and
beef up the test cases some in subsequent patches. I'll then run it over
a large codebase and make sure its not misbehaving before I add it to
-Wall or turn it on by default. I think this one might be a good
candidate for on by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d1e5a89226da79f7e6f43d40facc46abda9e5245 02-Sep-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Remove TransferFuncs.h, then deal with the fallout.

And with that, TransferFuncs is gone!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Checkers/LocalCheckers.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h
17a38e2636a8b1ce473fc6504c4b16cb09db29f4 02-Sep-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Move the knowledge of whether or not GC is enabled for the current analysis from CFRefCount to ExprEngine.

Remove TransferFuncs from ExprEngine and AnalysisConsumer.

Demote RetainReleaseChecker to a regular checker, and give it the name osx.cocoa.RetainCount (class name change coming shortly). Update tests accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
09a26ad31d63b3faa9f1fe0041156746da84cdf5 02-Sep-2011 Richard Trieu <rtrieu@google.com> Refactor CheckAddressOfOperand() by pulling out redundant code and moving hard coding strings from SemaExpr.cpp to DiagnosticSemaKinds.td.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f8a1e51c48761ee1d7803c3fa35ac94f42ebb55e 02-Sep-2011 Douglas Gregor <dgregor@apple.com> Always construct an ASTReader with a non-NULL ASTContext and
Preprocessor, eliminating the constructor that was used by ASTUnit
(which didn't provide an ASTContext or Prepreprocessor). Ensuring that
both objects are non-NULL will simplify module loading (but none of
that is done yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 02-Sep-2011 Douglas Gregor <dgregor@apple.com> Extend the ASTContext constructor to delay the initialization of
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
998b3d3e8528ebd9d2c5d78d3a82edd90a8953a4 02-Sep-2011 Douglas Gregor <dgregor@apple.com> Allow the preprocessor to be constructed without performing target-
and language-specific initialization. Use this to allow ASTUnit to
create a preprocessor object *before* loading the AST file. No actual
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
lang/Lex/Preprocessor.h
e2ca828119b8bff4a5c25c6db8ee4fec558451e7 01-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't try keeping a 'LeadingEmptyMacroLoc' in NullStmt. This fails
in the face of buffering C++/ObjC method bodies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Lex/Preprocessor.h
lang/Sema/Sema.h
898267f67b8131c4bed4430e2cfaf69ccf4c2de1 01-Sep-2011 Richard Trieu <rtrieu@google.com> Extend the self-reference warning to catch when a constructor references itself upon initialization, such as using itself within its own copy constructor.

struct S {};
S s(s);


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
aec230d29835285777ecc467e268c83b33a2adde 01-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Fix test/ARCMT/remove-statements.m regression due to
Objective-C method buffering(rdar://10056942)

Turned out the same issue existed for C++ inline methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
3e3cd93b2fd9644e970c389e715c13883faf68b6 01-Sep-2011 Douglas Gregor <dgregor@apple.com> Teach ASTContext and Preprocessor to hold on to references to the same
LangOptions, rather than making distinct copies of
LangOptions. Granted, LangOptions doesn't actually get modified, but
this will eventually make it easier to construct ASTContext and
Preprocessor before we know all of the LangOptions.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/ASTUnit.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTReader.h
7143aab97c6e849a5a5005b7853b8c7d5af008ed 01-Sep-2011 Douglas Gregor <dgregor@apple.com> Modules hide macro definitions by default, so that silly things like
include guards don't show up as macro definitions in every translation
unit that imports a module. Macro definitions can, however, be
exported with the intentionally-ugly #__export_macro__
directive. Implement this feature by not even bothering to serialize
non-exported macros to a module, because clients of that module need
not (should not) know that these macros even exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Basic/TokenKinds.def
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTWriter.h
e6b8d68a927368b06ac06cc9ac9e7f60aa966d5f 01-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support importing of ObjC categories from modules.

The initial incentive was to fix a crash when PCH chaining categories
to an interface, but the fix was done in the "modules way" that I hear
is popular with the kids these days.

Each module stores the local chain of categories and we combine them
when the interface is loaded. We also warn if non-dependent modules
introduce duplicate named categories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/Serialization/Module.h
50c909bd837f00265034d876736e2db47686be38 01-Sep-2011 Chandler Carruth <chandlerc@gmail.com> Create a CaretDiagnostic class to hold the logic for emitting
(unsurprisingly) caret diagnostics. This is designed to bring some
organization to the monstrous EmitCaretDiagnostic function, and allow
factoring it more easily and with less mindless parameter passing.

Currently this just lifts the existing function into a method, and
splits off the obviously invariant arguments to be class members. No
functionality is changed, and there are still lots of warts to let
existing code continue functioning as-is. Definitely WIP, more cleanups
to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
8697d308c1bdd50e5c45757ac11be701c26e9e97 01-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: this patch (re)introduces objective-c's default property
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
e082af17d4b425a49f7f8bccc2a99810f0072828 31-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch the "no module found" default-fatal warning to a default-fatal error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
819e74544a326b90d13aa73e6497b187c6545ff5 31-Aug-2011 John McCall <rjmccall@apple.com> Don't assert when diagnosing a missing cast of an unknown-anytype
message send to an unknown method.

rdar://problem/9416370, redux.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
65030af6526748ce11534e92f0ccefc44091ba13 31-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch __import__ over to __import_module__, so we don't conflict with
existing practice with Python extension modules. Not that Python
extension modules should be using a double-underscored identifier
anyway, but...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/TokenKinds.def
lang/Lex/Preprocessor.h
lang/Sema/Sema.h
140ab234c23f392d5422691c5de1ee3c15026def 31-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c - This patch buffers method implementations
and does the Sema on their body after the entire
class/category @implementation is seen. This change allows messaging
of forward private methods, as well as, access to
synthesized ivars of properties with foward synthesize
declarations; among others. In effect, this patch removes
several restrictions placed on objective-c due to in-place
semantics processing of methods.
This is part of // rdar://8843851.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
20174221af145554b76a0b0f5e4eb3ac70d05945 31-Aug-2011 Chandler Carruth <chandlerc@gmail.com> Update libclang to have APIs corresponding to the new 'expansion' naming
system for macro-backed source locations. The old APIs are preserved for
legacy users.

This was intended to land with the main work of instantiation ->
expansion, but despite running it by Doug over a month ago, I forgot to
commit it. Very sorry for that...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138860 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b0656ec72e25e5c8e463c2dc39914636f0cb06d1 31-Aug-2011 Chandler Carruth <chandlerc@gmail.com> Improve the diagnostic text for -Wmissing-noreturn to include the name
of the function in question when applicable (that is, not for blocks).
Patch by Joerg Sonnenberger with some stylistic tweaks by me.

When discussing this weth Joerg, streaming the decl directly into the
diagnostic didn't work because we have a pointer-to-const, and the
overload doesn't accept such. In order to make my style tweaks to the
patch, I first changed the overload to accept a pointer-to-const, and
then changed the diagnostic printing layer to also use
a pointer-to-const, cleaning up a gross line of code along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
f84139a1331c63c998e8b7d54148c75ac0b48ccd 31-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Change err_pp_file_not_found back to an Error; when it's a Warning, we suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.)

Fixes <rdar://10041960>. And also brings down the number of warnings without a flag by one :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
1155c42e7b1b4e401bb0a331a6d715d637958c75 31-Aug-2011 Douglas Gregor <dgregor@apple.com> Allow C99 hexfloats in C++0x mode. This change resolves the standards
collision between C99 hexfloats and C++0x user-defined literals by
giving C99 hexfloats precedence. Also, warning about user-defined
literals that conflict with hexfloats and those that have names that
are reserved by the implementation. Fixes <rdar://problem/9940194>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 30-Aug-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Declare and define implicit move constructor and assignment operator.

This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
955fadbdfecfa24a590febe66a86519096787f2d 30-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove a few mutating ObjCCategoryDecl methods.

Remove
-setClassInterface
-setNextClassCategory
-insertNextClassCategory

and combine them in the Create function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3b84ab9f2adff42dcae3509c854a446b95917a10 30-Aug-2011 Jordy Rose <jediknil@belkadan.com> Remove obsolete ObjCInferRelatedReturnType from LangOptions...the correct option is ObjCInferRelatedResultType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
1335cf086f85a6ec6165a91e60828d8d5ea08cec 30-Aug-2011 Caitlin Sadowski <supertri@google.com> Thread safety: Adding a name to the thread safety diagnostic group to prevent typos

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
05b436ef550837e2141c55c590fb16010b8658d8 30-Aug-2011 Caitlin Sadowski <supertri@google.com> Thread safety: added basic handling for pt_guarded_by/var and guarded_by/var annotations. We identify situations where we are accessing (reading or writing) guarded variables, and report an error if the appropriate locks are not held.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
10af87932fe4bffad539b24d512a33a1803daeae 29-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Minor clean up of objc's decl context stuff.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138742 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
80cb6e69d9e85231588ae604e4bc2bc9a07389af 29-Aug-2011 Nico Weber <nicolasweber@gmx.de> Warn on missing [super finalize] calls.

This matches gcc's logic. Second half of PR10661.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/IdentifierTable.h
lang/Sema/Sema.h
f5e39ece75b18c9ce19351929d4879ad9731e7f5 28-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Header cleanup to decrease coupling (and recompilation). No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/BugType.h
lang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/Environment.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
dbd658e139b3e0bf084f75feaea8d844af9e319f 28-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Introduce a new callback for checkers, printState, to be used for debug-printing the contents of a ProgramState.

Unlike the other callbacks, this one is a simple virtual method, since it is only to be used for debugging.

This new callback replaces the old ProgramState::Printer interface, and allows us to move the printing of refcount bindings from CFRefCount to RetainReleaseChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
lang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h
93bd5ca766c4d7906878f4ffe76ce1b2080e540b 28-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Remove the ProgramState argument from ExprEngine::evalBind; we were ignoring it anyway. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
e38dd95dddb8f1b38469c8d0e28aa1c660489324 28-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Migrate argument invalidation from CFRefCount to ExprEngine.

This is a common path for function and C++ method calls, Objective-C messages and property accesses, and C++ construct-exprs.

As support, add message receiver accessors to ObjCMessage and CallOrObjCMessage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
537716ad8dd10f984b6cfe6985afade1185c5e3c 28-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Change the check::RegionChanges callback to include the regions explicitly requested for invalidation.

Also, allow CallOrObjCMessage to wrap a CXXConstructExpr as well.

Finally, this allows us to remove the clunky whitelisting system from CFRefCount/RetainReleaseChecker. Slight regression due to CXXNewExprs not yet being handled in post-statement callbacks (PR forthcoming).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
lang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
b8607398a5e1e552f82a86d1d8c3a4031ac4c946 27-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c - Make warning on unimplemented protocols point
to class implementation where it is supposed to be
implemented. // rdar://10009982.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
07453ac7b3d46f930733b44a593737bdd98706b6 27-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Rename current PathDiagnosticClient::HandlePathDiagnostic() to HandlePathDiagnosticImpl(), and slot in new HandlePathDiagnostic() for potentially handling concurrent access to PathDiagnosticClients (in the future).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
95ed7784a335aca53b0c6e952cf31a4cfb633360 27-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Parser.h
lang/Sema/Sema.h
6be16fe900bdd1e5f677d23ae34fffead5bcfc77 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Take an entirely different approach to handling the "parsing" of
__import__ within the preprocessor, since the prior one foolishly
assumed that Preprocessor::Lex() was re-entrant. We now handle
__import__ at the top level (only), after macro expansion. This should
fix the buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/Preprocessor.h
5f8d604246976a93a73549b07bbc8ee0b2061b50 27-Aug-2011 John McCall <rjmccall@apple.com> The lvalue-to-rvalue on structs in C++ is actually part
of default argument promotion and needs to happen unconditionally.
This is particularly semantically important in C++0x.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
6748ae15b3eed61b3b61f9b77470a802a1643fbb 27-Aug-2011 Benjamin Kramer <benny.kra@googlemail.com> Twinify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/FileRemapper.h
62088e3317c74a3a8baf2db3e1bd7ab0b7ddc590 27-Aug-2011 Ted Kremenek <kremenek@apple.com> Control 'invalid conversion specifier' warnings under a subflag (-Wformat-invalid-specifier) of -Wformat. Fixes <rdar://problem/10031930>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
16f6c03d67a1fbcce8a85eb3849fcf8234f99344 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Silence a GCC warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
831c6313dfa36f297094cd593a9dd3cb60649362 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Remove the -import-module option. It's no longer useful

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
6aa52ec6b969faabf3764baf79d89810b8249a7e 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce support for a simple module import declaration, which
loads the named module. The syntax itself is intentionally hideous and
will be replaced at some later point with something more
palatable. For now, we're focusing on the semantics:
- Module imports are handled first by the preprocessor (to get macro
definitions) and then the same tokens are also handled by the parser
(to get declarations). If both happen (as in normal compilation),
the second one is redundant, because we currently have no way to
hide macros or declarations when loading a module. Chris gets credit
for this mad-but-workable scheme.
- The Preprocessor now holds on to a reference to a module loader,
which is responsible for loading named modules. CompilerInstance is
the only important module loader: it now knows how to create and
wire up an AST reader on demand to actually perform the module load.
- We search for modules in the include path, using the module name
with the suffix ".pcm" (precompiled module) for the file name. This
is a temporary hack; we hope to improve the situation in the
future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/IdentifierTable.h
lang/Basic/TokenKinds.def
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
lang/Lex/ModuleLoader.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Sema.h
f43b5e84aa982afacd87a225440ec88a9b66c1a0 27-Aug-2011 Chad Rosier <mcrosier@apple.com> Cleanup r138662 per Ben and David's suggestions, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
2ea054fbc59ed19b8e3304e7e7cbdd56a5a5120f 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Teach the ASTReader how to avoid cycles when loading declarations that
are lexically within a particular DeclContext. Test forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Lex/ModuleLoader.h
fe87fc73c0091a8d6ba04b7e3b5f144d4a0517a3 26-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] When generating temporary files allow a prefix to be added. In many
cases we want the prefix to be the original file name less the suffix. For an
input such as test.c to named temporary would be something like test-3O4Clq.o
Part of <rdar://problem/8314451>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
9414449e299036efbd411d92266983dfc24e24e9 26-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Mention property's attribute by name when
finding life-time conflict with its declared ivar.
// rdar://10007230


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
782f63ecd124f9384f988dc7e0cf4ae1540c15f6 26-Aug-2011 Jeffrey Yasskin <jyasskin@google.com> Handle CXXTempObjectRegion in StackAddrEscapeChecker.

Also convert stack-addr-ps.cpp to use the analyzer instead of just Sema, now
that it doesn't crash, and extract the stack-block test into another file since
it errors, and that prevents the analyzer from running.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
1b9060553221720152e12981109549e0a1d8e3a1 26-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Add -mglobal-merge/-mno-global-merge machine options to enable/disable merging of
globals during codegen.
Fixes <rdar://problem/10017909>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
321d70fbde6a0d584a05845f605744889193e70b 26-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Increase the number of possible checks for a checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
b5af843a20e237ad1a13ad66a867e200695b8c8e 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Eliminate the -chained-pch flag and all of the frontend and libclang options associated with it. Chained PCH is the only way to build a PCH file that includes another PCH file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138597 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Driver/CC1Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/FrontendOptions.h
9293ba8e26fcba18505b273ecc9b66645133fcce 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Remove the Chaining argument from the PCH/module generator. It's no longer used

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
lang/Serialization/ASTWriter.h
467dc88512b4ba4bb16e274ea3771dc1415d31da 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
lang/Parse/ParseAST.h
lang/Sema/Sema.h
lang/Serialization/ASTWriter.h
6f155de99c59af890817146ec8526bafb6560f1f 26-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix getting a cursor that points inside tag definition that is part
of a type specifier.

e.g. for:

typedef struct _MyS {
int foo;
} MyS;

pointing at field 'foo' would give a cursor for the typedef declaration 'MyS'
instead of the field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
f249bf3b9f8bd3af711ffe9de411fc435871a4f6 25-Aug-2011 Douglas Gregor <dgregor@apple.com> Preload source location entries as soon as we've loaded a particular
AST file, rather than waiting until we finish loading the top-level
AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
lang/Serialization/Module.h
f09530f88ece49993f1b72271b0417574e897956 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Reverse r138567 until a buildbot failure is investigated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
c69a292f9f7bee2a7359df18d1db501d8717f0b2 25-Aug-2011 Douglas Gregor <dgregor@apple.com> Move file validation in the ASTReader from "top of chain" validation
to "when loading a particular module" validation, since it was only
validating local information anyway. This shouldn't change anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
98339b96a8089a6da715487e432c5abfca0ca0df 25-Aug-2011 Douglas Gregor <dgregor@apple.com> Factor the Module and ModuleManager classes out into separate headers
and .cpp files, since ASTReader.cpp was getting way too large. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
lang/Serialization/Module.h
lang/Serialization/ModuleManager.h
03c107a42fae79e89d0016999a1a04c07d65591a 25-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make Lexer::ComputePreamble accept a LangOptions parameter, otherwise it may be
out-of-sync how a file is compiled. Patch by Matthias Kleine!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
af6fbe42e4e0bbc42e9bf824ae2a24417ae1665f 25-Aug-2011 Chad Rosier <mcrosier@apple.com> 80-column and spacing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
d10a381d92a60d4f4c126c4e81045c8ad4636a0b 25-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch ASTReader::GetHeaderFileInfo() from a walk over the module
chain to a proper search.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
d8e987bee9d39f9131e9be319483265fd894c108 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc -arse: Use DeclGroup for forward class declarations;
as in @class foo, bar. More cleanup to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
3d15ab8d0822637ff5e39594c4f34172241cad2e 25-Aug-2011 Douglas Gregor <dgregor@apple.com> Use the module manager's search facility to look for methods with a
given selector, rather than walking the chain backwards. Teach its
visitor how to merge multiple result sets into a single result set,
combining the results of selector lookup in several different modules
into a single result set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
58fd97a6f4f7c909aeef46b501ab46f3d6eac671 25-Aug-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __ptr32 keyword.
Patch by Chris Cudmore!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
c266de97e269c3747ffc2d122fe53185b541cb37 24-Aug-2011 Douglas Gregor <dgregor@apple.com> Don't force the complete deserialization of the visible-declarations
table when serializing an AST file. This was a holdover from the days
before chained PCH, and is a complete waste of time and storage
now. It's a good thing it's useless, because I have no idea how I
would have implemented MaterializeVisibleDecls efficiently in the
presence of modules.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTReader.h
lang/Serialization/ChainedIncludesSource.h
851c75a279bb4441bc6802d0258ceb4ab64738d4 24-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a depth-first search of modules into the module manager,
which supports both pre-order and post-order traversal via a visitor
mechanism. Use this depth-first search with a post-order traversal to
give predictable ordering semantics when walking all of the lexical
declarations in the translation unit.

Eventually, module imports will occur in the source code rather than
at the beginning, and we'll have to revisit this walk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
14924267950e75c6c1f6fcea39fa507b7168bc39 24-Aug-2011 Anna Zaks <ganna@apple.com> [analyzer] Allow checker writes to specify that no region should be accosiated with the report. (Useful when we report an error on endOfPath or deadSymbols, when the range of the last expression might have nothing to do with the error.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
0d95f77ba180aee35b74f3bf9f8543477f3af543 24-Aug-2011 Douglas Gregor <dgregor@apple.com> In the AST reader, switch name lookup within a DeclContect over to the
module DAG-based lookup scheme. This required some reshuffling, so
that each module stores its own mapping from DeclContexts to their
lexical and visible sets for those DeclContexts (rather than one big
"chain").

Overall, this allows simple qualified name lookup into the translation
unit to gather results from multiple modules, with the lookup results
in module B shadowing the lookup results in module A when B imports A.

Walking all of the lexical declarations in a module DAG is still a
mess; we'll end up walking the loaded module list backwards, which
works fine for chained PCH but doesn't make sense in a DAG. I'll
tackle this issue as a separate commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
cc075e4092900ac9eec9dc92e35096eae1ee29c7 24-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc - fix up the builtin type for objc_assign_ivar.
// rdar://9362887.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
0f3b4ca1764cd6d457f511d340fba504f41763c3 24-Aug-2011 Ted Kremenek <kremenek@apple.com> Start reworking -Wunreachable-code. The original analysis had serious flaws with how it
handled SCC's of dead code, or simply having false negatives by overly suppressing warnings.

WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ReachableCode.h
f0e71aede7ccf3e311feac6a414c431f7a0fc3c8 24-Aug-2011 Ted Kremenek <kremenek@apple.com> CFG: record set of C++ 'try' dispatch blocks, which could be of interest to various analyses (e.g., reachability).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
f1d10d939739f1a4544926d807e4f0f9fb64be61 24-Aug-2011 Ted Kremenek <kremenek@apple.com> Constify the result of CFGStmt::getStmt().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
8ed557991fe8d51eb27e6c439030ec6ef93a2b8f 24-Aug-2011 Ted Kremenek <kremenek@apple.com> Add 'const' version of CompoundStmt::children().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
f40fd6bbb2684db5efb18627ea355613c235d23f 24-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Refactor and fix checking for initialization of flexible array members. The old version had the checks scattered across the code, missed some checks, and had a couple nasty bugs in existing checks.

Fixes PR10648 and another similar accepts-invalid bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d7cb46c316808169679a8d72c69f02a1e55d78a8 23-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove one SourceManager::isInFileID overload and use isOffsetInFileID for the other.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
b6c465e17ec37390667223a18a340e8652c212ff 23-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Amend r138129 (reduction of SLocEntries) which introduced performance regression due
to increased calls to SourceManager::getFileID. (rdar://9992664)

Use a slightly different approach that is more efficient both in terms of speed
(no extra getFileID calls) and in SLocEntries reduction.

Comparing pre-r138129 and this patch we get:

For compiling SemaExpr.cpp reduction of SLocEntries by 26%.
For the boost enum library:
-SLocEntries -34% (note that this was -5% for r138129)
-Memory consumption -50%
-PCH size -31%

Reduced SLocEntries also benefit the hot function SourceManager::getFileID,
evident by the reduced "FileID scans".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
499ea5550d6e2fc5cfbd33b47f06d92ce25d7a13 23-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce SourceManager::isInSLocAddrSpace and use it in TokenLexer instead of isInFileID
since it is a bit more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/TokenLexer.h
5d579e7b0463a2e65328df85e4fed8e07799fd9e 23-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename SourceManager::isBeforeInSourceLocationOffset -> isBeforeInSLocAddrSpace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
984e42ca1ff7775ce39372c314f1cb7d6862c4c7 23-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move a couple of SourceManager functions out-of-line; no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
3ac1fbc303d22af2e11a14023ecee7bd7b7d0bfd 23-Aug-2011 Caitlin Sadowski <supertri@google.com> Thread-safety analysis: adding in a basic lockset tracking system. This
system flags an error when unlocking a lock which was not held, locking
the same lock twice, having a different lockset on each iteration of a
loop, or going out of scope while still holding a lock. In order to
successfully use the lockset, this patch also makes sure that attribute
arguments are attached correctly for later parsing.

This patch was also worked on by DeLesley Hutchins.

Note: This patch has been reviewed by Chandler Carruth and Jeffrey
Yasskin. Feel free to provide post-commit review comments for a
subsequent patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AnalysisBasedWarnings.h
f857186fd1995b34185d063a29b11ad4f948519f 23-Aug-2011 Eric Christopher <echristo@apple.com> Add support for a verifier to the driver. Currently only verifies debug
output on darwin so is hard coded there.

As a note this will need a little bit of refactoring in the class
hierarchy to separate it out for different verifiers based on input type.

Fixes rdar://8256258.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
lang/Driver/Options.td
2fef11164cbe804f7b808c07757c6f900c08d765 23-Aug-2011 Nico Weber <nicolasweber@gmx.de> enable -fstack-protector on 10.5 for usermode binaries by default.

This matches gcc's behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
294396b9f2a2f4ffee6b7ed5e61211fde50b6554 23-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Migrate the handling of retain-count-related RetEffects and ArgEffects from CFRefCount to RetainReleaseChecker. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
2f64cfe19e8bf6b6ba1660e38da8c421440457fe 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc refactoring - minor clean up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
7f2531cb41448852ec78de90fc1d3c0149c95d7d 22-Aug-2011 Anna Zaks <ganna@apple.com> Static Analyzer Diagnostics: Allow checkers to add ExtraDescriptiveText, now renamed into ExtraText, to the diagnostic without subclassing BugReport.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
9735c5e60027b26a809df19677ff16a4d13f1321 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc - Simplify switing objc decl context by using
a context switching object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9a1ecf0522ccb7a45577f856150c15af0ee1df2a 22-Aug-2011 Nico Weber <nicolasweber@gmx.de> Warn on missing [super dealloc] calls.

This matches gcc's logic. Half of PR10661.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
80f775359357f90f34b6adb8104506f13a816a67 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc- checking for objc decl context range is unreliable and
subject to change. Check for equality instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
a28948f34817476d02412fa204cae038e228c827 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Restore patch I reversed in r138040. Known buildbot
failures are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Parser.h
lang/Sema/Sema.h
ec5bc81fd55bfcc26fc4bde6d5e33113d94c2209 22-Aug-2011 Zhongxing Xu <xuzhongxing@foxmail.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
21032df7a0dfc129a8f0c5e004811b455baafb7a 22-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix gcc build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
d9d2b679d0728ea7f539f38aaea38e26b8b08043 22-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Boost the efficiency of SourceManager::getMacroArgExpandedLocation.

Currently getMacroArgExpandedLocation is very inefficient and for the case
of a location pointing at the main file it will end up checking almost all of
the SLocEntries. Make it faster:

-Use a map of macro argument chunks to their expanded source location. The map
is for a single source file, it's stored in the file's ContentCache and lazily
computed, like the source lines cache.
-In SLocEntry's FileInfo add an 'unsigned NumCreatedFIDs' field that keeps track
of the number of FileIDs (files and macros) that were created during preprocessing
of that particular file SLocEntry. This is useful when computing the macro argument
map in skipping included files while scanning for macro arg FileIDs that lexed from
a specific source file. Due to padding, the new field does not increase the size
of SLocEntry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/PreprocessorLexer.h
500abad7edfcc2409b18dd616cdbc28a094926f5 21-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Migrate return value handling from CFRefCount to ExprEngine. This seems to result in a minor performance hit, but I think that will go away again once we eliminate TransferFuncs from function calls entirely.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
f8b5aae41e46f94fe90ed5f1ee98f36f0aa59dc9 20-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Handle reads of ObjCPropertyRefExprs implicitly in Environment. No need to bind an explicit value and create a new node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
211f6e894895f552e0a98421b2f6e931ca4a8c11 20-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a module visitation function that starts at the top-level
modules (those that no other module depends on) and performs a search
over all of the modules, visiting a new module only when all of the
modules that depend on it have already been visited. The visitor can
abort the search for all modules that a module depends on, which
allows us to minimize the number of lookups necessary when performing
a search.

Switch identifier lookup from a linear walk over the set of modules to
this module visitation operation. The behavior is the same for simple
PCH and chained PCH, but provides the proper search order for
modules. Verified with printf debugging, since we don't have enough in
place to actually test this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
23f395ee1bf4e4aa76b310d896a951799eaca94a 20-Aug-2011 Anna Zaks <ganna@apple.com> Static Analyzer Diagnostics: Move the responsibility for generating the endOfPath diagnostic piece from BugReport to BugReporterVisitor. Switch CFRefCount to use visitors in order to generate the endOfPath piece.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
dc757b049796949e4b11646445a6598f0bdabd7a 20-Aug-2011 Anna Zaks <ganna@apple.com> Static Analyzer Diagnostics: Switch CFRefCount to using the new visitor API. BugReport no longer needs to inherit from BugReporterVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
d60a34a4e514ec0dfddd05ef2744be104e111f45 20-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For assigning SourceLocations to macro arg tokens, reserve a single SLocEntry
for tokens that are lexed consecutively from the same FileID, instead of creating
a SLocEntry for each token. e.g for

assert(foo == bar);

there will be a single SLocEntry for the "foo == bar" chunk and locations
for the 'foo', '==', 'bar' tokens will point inside that chunk.

For parsing SemaExpr.cpp, this reduced the number of SLocEntries by 25%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/TokenLexer.h
ec3b5389a5032433116ec2f2ee266b9666ad2eb4 20-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename TokenLexer::getMacroExpansionLocation -> getExpansionLocForMacroDefLoc, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenLexer.h
54232ade44d31e98ea83f43ca066128e315dcbda 20-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor common functionality into SourceManager::getFileIDSize, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
50bbc165b063155cc23c360deb7b865502e068e2 20-Aug-2011 Anna Zaks <ganna@apple.com> Static Analyzer Diagnostics: Kill the addVisitorCreator(callbackTy, void*) API in favor of addVisitor(BugReporterVisitor*).

1) Create a header file to expose the predefined visitors. And move the parent(BugReporterVisitor) there as well.

2) Remove the registerXXXVisitor functions - the Visitor constructors/getters can be used now to create the object. One exception is registerVarDeclsLastStore(), which registers more then one visitor, so make it static member of FindLastStoreBRVisitor.

3) Modify all the checkers to use the new API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
dcf3c0f648edac4d4da1b05840e21ed23b9ca37e 19-Aug-2011 Douglas Gregor <dgregor@apple.com> Remove another unused function from ModuleManager. We have no notion of a 'last' module any more

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
a3a0cf07fea63c020b0a261cb765ffdb5af991e6 19-Aug-2011 Douglas Gregor <dgregor@apple.com> Remove unused function ModuleManager::exportLookup()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
5c5218e188b39b2e93b541156a69ef061e11aab8 19-Aug-2011 Matt Beaumont-Gay <matthewbg@google.com> Improve the correctness and accuracy of the message for -Wdynamic-class-memaccess

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e6f07f538fd0eddd6c087fcc01d4e4ff19129c71 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Revers r138040. Need to look at a few buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Parser.h
lang/Sema/Sema.h
3dbf2f5f00cfc8b25318c119c0d39f4a49d15ebe 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Bring objective-c handling of decl context
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Parser.h
lang/Sema/Sema.h
00fd773ae92aa452be1bb139a186599b2c43531a 19-Aug-2011 Ted Kremenek <kremenek@apple.com> Rename -Wstrl-incorrect-size to -Wstrlcpy-strlcat-size. This warning really is just specific to strlcpy and strlcat.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fac4ece118d43e43e625c6d2b9a98905b1372d51 19-Aug-2011 Douglas Gregor <dgregor@apple.com> Teach ModuleManager::addModule() to check whether a particular module
has already been loaded before allocating a new Module structure. If
the module has already been loaded (uniquing based on file name), then
just return the existing module rather than trying to load it again.

This allows us to load a DAG of modules. Introduce a simple test case
that forms a diamond-shaped module graph, and illustrates that a
source file importing the bottom of the diamond can see declarations
in all four of the modules that make up the diamond.

Note that this version moves the file-opening logic into the module
manager, rather than splitting it between the module manager and the
AST reader. More importantly, it properly handles the
weird-but-possibly-useful case of loading an AST file from "-".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
3b030a28cda2b953758507769c1d436bec5ec45e 19-Aug-2011 Anna Zaks <ganna@apple.com> Fix a memory leak in the analyzer - BugReports didn't get freed. Plus, remove invalid assert from the destructor which wasn't called previously due to the leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
8e6431adab313e283a992698f6fc7afe62420999 19-Aug-2011 Anna Zaks <ganna@apple.com> Static Analyzer Diagnostics: Move custom diagnostic visitors from BugReporterContext to BugReport.

One API change: I added BugReporter as an additional parameter to the BugReporterVisitor::VisitNode() method to allow visitors register other visitors with the report on the fly (while processing a node). This functionality is used by NilReceiverVisitor, which registers TrackNullOrUndefValue when the receiver is null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
3366582a026ce8044d58352088df358a9e987508 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Remove main() *errors* from warning group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bd5da9d1a711e90b3bc265b4798954085c0b48d9 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Reapply r137903, but fix the definition of size_t in the test case to use __SIZE_TYPE__ (and hence be portable).

Also, change the warning to -Wstrl-incorrect-size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
5c5f03e4020e90b9760ec547962ba02b029cc359 18-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Support code-completion inside macro arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
870d1fee3c5027efe7fd23d6935952bc1f419f99 18-Aug-2011 Chad Rosier <mcrosier@apple.com> Temporarily revert r137925 to appease buildbots. Original commit message:

Teach ModuleManager::addModule() to check whether a particular module
has already been loaded before allocating a new Module structure. If
the module has already been loaded (uniquing based on file name), then
just return the existing module rather than trying to load it again.

This allows us to load a DAG of modules. Introduce a simple test case
that forms a diamond-shaped module graph, and illustrates that a
source file importing the bottom of the diamond can see declarations
in all four of the modules that make up the diamond.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
516116308007280f0dd6661cdd94112468c3c5fc 18-Aug-2011 Kaelyn Uhrain <rikka@google.com> Rework DiagnoseInvalidRedeclaration to add the ability to correct typos when
diagnosing invalid function redeclarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1f89b4016505045d79b53ce1204fc2c46c7d01c9 18-Aug-2011 Manuel Klimek <klimek@google.com> Fixes traversal of class template nodes on template instantiations.
Also fixes a spelling error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
3bd9aa4593b4332d477407d9b5a42f3c4ababb21 18-Aug-2011 Francois Pichet <pichet2000@gmail.com> Add support for MSVC __unaligned attribute. Necessary to parse MSVC headers in 64-bit mode (ie: when _M_IA64 or _M_AMD64 is defined)

more info: http://msdn.microsoft.com/en-us/library/ms177389.aspx

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
a4c189f4356f24d984aac781d7762b8c55082b7e 18-Aug-2011 Douglas Gregor <dgregor@apple.com> Teach ModuleManager::addModule() to check whether a particular module
has already been loaded before allocating a new Module structure. If
the module has already been loaded (uniquing based on file name), then
just return the existing module rather than trying to load it again.

This allows us to load a DAG of modules. Introduce a simple test case
that forms a diamond-shaped module graph, and illustrates that a
source file importing the bottom of the diamond can see declarations
in all four of the modules that make up the diamond.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
10bc00fd45824f9b5cd139d63af8b0f6d28aadda 18-Aug-2011 Douglas Gregor <dgregor@apple.com> Keep track of which modules have been loaded directly (e.g., via
-import-module) vs. loaded because some other module depends on
them. As part of doing this, pass down the module that caused a module
to be loaded directly, rather than assuming that we're loading a
chain. Finally, write out all of the directly-loaded modules when
serializing an AST file (using the new IMPORTS record), so that an AST
file can depend on more than one other AST file, all of which will be
loaded when that AST file is loaded. This allows us to form and load a
tree of modules, but we can't yet load a DAG of modules.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
1cb4f664fd4f72a65a145e9ff8a7e2540ab09156 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Revert r137903, "Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now)."

This currently doesn't work on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
f19eef86422b82e3415c56077f85085e0074e893 18-Aug-2011 Anna Zaks <ganna@apple.com> Fix a regression form r137894. Make sure the custom BugReporterVisitors get registred as they were in EnhancedBugReport. Would be good to add a test for this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
1e473ccb0e0f6fd1954bef330f7193c1a3fb3ba1 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Implement '-Weverything', which enables all warnings except those explicitly mapped to be ignored.

Currently this includes -pedantic warnings as well; we'll need to consider whether these should
be included.

This works as expected with -Werror.

Test cases were added to Sema/warn-unused-parameters.c, but they should probably be broken off into
their own test file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
1b2d53647dda5e4a70cea54ec3bedbf167081120 18-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For the MacroExpands preprocessor callback, also pass the SourceRange
of expansion (for function macros it includes the right paren).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
4b53117c9942db2e08f18be25d9ccf7daf6af0b2 18-Aug-2011 Ted Kremenek <kremenek@apple.com> Add experimental -Wstrlcpy-size warning that looks to see if the size argument for strlcpy/strlcat is the size of the *source*, and not the size of the *destination*. This warning is off by default (for now).

Warning logic provided by Geoff Keating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
e7c4c4ccc6a51c82332382267b84e9d72f229b5e 18-Aug-2011 Anna Zaks <ganna@apple.com> Add more comments for BugReport.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
b7530a4ca9a7ef62350682bbb374a06de6fdaa9f 18-Aug-2011 Anna Zaks <ganna@apple.com> Remove DiagBugReport by pulling it into its parent BugReport.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
e172e8b9e7fc67d7d03589af7e92fe777afcf33a 18-Aug-2011 Anna Zaks <ganna@apple.com> Remove EnhancedBugReport and RangedBugReport - pull all the extra functionality they provided into their parent BugReport. The only functional changes are: made getRanges() non const - it adds default range to Ranges if none are supplied, made getStmt() private, which was another FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
e95b9198b8b70ce0219cfb89483b41102e02dbf5 17-Aug-2011 Douglas Gregor <dgregor@apple.com> In the AST file format, eliminate the CHAINED_METADATA record. Instead,
all AST files have a normal METADATA record that has the same form
regardless of whether we refer to a chained PCH or any other kind of
AST file.

Introduce the IMPORTS record, which describes all of the AST files
that are imported by this AST file, and how (as a module, a PCH file,
etc.). Currently, we emit at most one entry to this record, to support
chained PCH.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
38ca02ed9495a3c708fafc7d8b7d87a8cfcfe8f3 17-Aug-2011 Anna Zaks <ganna@apple.com> Add a bit more comments to the BugReporter and friends.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
75cf3e86d33ce810c12084126385371b335c30ba 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Mark objc methods that are implicitly declared for properties (not user-declared) as implicit.
This results in libclang ignoring such methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ec8058f64bbcd79bd47748f4cf8628123dd3bae6 17-Aug-2011 Chandler Carruth <chandlerc@gmail.com> Treating the unused equality comparisons as something other than part of
-Wunused was a mistake. It resulted in duplicate warnings and lots of
other hacks. Instead, this should be a special sub-category to
-Wunused-value, much like -Wunused-result is.

Moved to -Wunused-comparison, moved the implementation to piggy back on
the -Wunused-value implementation instead of rolling its own, different
mechanism for catching all of the "interesting" statements.

I like the unused-value mechanism for this better, but its currently
missing several top-level statements. For now, I've FIXME-ed out those
test cases. I'll enhance the generic infrastructure to catch these
statements in a subsequent patch.

This patch also removes the cast-to-void fixit hint. This hint isn't
available on any of the other -Wunused-value diagnostics, and if we want
it to be, we should add it generically rather than in one specific case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
9d8eb3b2a892697aed332f6c318a8554fc2623ce 17-Aug-2011 Chandler Carruth <chandlerc@gmail.com> Introduce a new warning, -Wtop-level-comparison. This warning is
a complement to the warnings we provide in condition expressions. Much
like we warn on conditions such as:

int x, y;
...
if (x = y) ... // Almost always a typo of '=='

This warning applies the complementary logic to "top-level" statements,
or statements whose value is not consumed or used in some way:

int x, y;
...
x == y; // Almost always a type for '='

We also mirror the '!=' vs. '|=' logic.

The warning is designed to fire even for overloaded operators for two reasons:

1) Especially in the presence of widespread templates that assume
operator== and operator!= perform the expected comparison operations,
it seems unreasonable to suppress warnings on the offchance that
a user has written a class that abuses these operators, embedding
side-effects or other magic within them.
2) There is a trivial source modification to silence the warning for
truly exceptional cases:

(void)(x == y); // No warning

A (greatly reduced) form of this warning has already caught a number of
bugs in our codebase, so there is precedent for it actually firing. That
said, its currently off by default, but enabled under -Wall.

There are several fixmes left here that I'm working on in follow-up
patches, including de-duplicating warnings from -Wunused, sharing code
with -Wunused's implementation (and creating a nice place to hook
diagnostics on "top-level" statements), and handling cases where a proxy
object with a bool conversion is returned, hiding the operation in the
cleanup AST nodes.

Suggestions for any of this code more than welcome. Also, I'd really
love suggestions for better naming than "top-level".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8a01087664cc78c0572c985949b9ebf3c184dbee 17-Aug-2011 Jordy Rose <jediknil@belkadan.com> Hook up -W[no-]analyzer-incompatible-plugin to new warning, and unbreak buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
b7b0608c3aeee3eb9f14520eb7eff159b855a34b 17-Aug-2011 Jordy Rose <jediknil@belkadan.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
a8fd0bc069275d8e7bc9fa72c2d93a76302e5e48 17-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Add a warning for an incompatible plugin version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
8e240498dfd4355849bcec943e97799f7f75d93d 17-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Add some documentation for the new analyzer plugin infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerOptInfo.h
lang/StaticAnalyzer/Core/CheckerRegistry.h
77a33a71701b59affb5337d9e2b57d69bc095c7d 17-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Add basic support for pluggable checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerOptInfo.h
lang/StaticAnalyzer/Core/CheckerRegistry.h
ac836e442cbd17f33533bd0b4879258945bc1723 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce SourceManager::getMacroArgExpandedLocation function.

If we pass it a source location that points inside a function macro argument,
the returned location will be the macro location in which the argument was expanded.
If a macro argument is used multiple times, the expanded location will
be at the first expansion of the argument.
e.g.
MY_MACRO(foo);
^
Passing a file location pointing at 'foo', will yield a macro location
where 'foo' was expanded into.

Make SourceManager::getLocation call getMacroArgExpandedLocation as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
37e59a10a7a537428e5997fd5896f5b89fd34e6b 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make SourceManager::isBeforeInTranslationUnit handle macro locations correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
08b86531ade68727c56918f162816075b87c864a 16-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Overhaul of checker registration in preparation for basic plugin support. Removes support for checker groups (we can add them back in later if we decide they are still useful), and -analyzer-checker-help output is a little worse for the time being (no packages).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Checkers/ClangCheckers.h
lang/StaticAnalyzer/Core/CheckerOptInfo.h
lang/StaticAnalyzer/Core/CheckerProvider.h
lang/StaticAnalyzer/Core/CheckerRegistry.h
lang/StaticAnalyzer/Frontend/CheckerRegistration.h
lang/StaticAnalyzer/Frontend/FrontendActions.h
6c7511db998817e64f2e124013e7d7c9a430c580 16-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] add ExprEngine::getEagerlyAssumedTags() to allow externally querying of "eagerly assumed" expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
86b39f20d5091ca3fdcbeb4a22766aaffdf6ac35 16-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Remove PostStmtCustom ProgramPoint. It can be represented using tagged PostStmts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
ae160f880d183ab938fd7ce3b891694ae2f569c0 16-Aug-2011 Ted Kremenek <kremenek@apple.com> Add missing header files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
lang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
427964e15f1b9595659cea3fcb4dd808a00f37b5 16-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Require explicit cursor visitation for all TypeLocs (compilation will
fail if a TypeLoc kind is not handled) and handle DecltypeTypeLoc and InjectedClassNameTypeLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
18c66fdc3c4008d335885695fe36fb5353c5f672 16-Aug-2011 Ted Kremenek <kremenek@apple.com> Rename GRState to ProgramState, and cleanup some code formatting along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/Environment.h
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h
af1fc7af351758b0ea0d285bdfe5640128109a4e 15-Aug-2011 Richard Smith <richard-llvm@metafoo.co.uk> Track in the AST whether a function is constexpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
faef9fcb41cff7c2cbafb86d3af47c422ddf3010 15-Aug-2011 Bob Wilson <bob.wilson@apple.com> Make -findirect-virtual-calls and -fterminated-vtables aliases of -fapple-kext.
Outside the driver, they were already treated that way, but the driver was not
giving them the same special treatment as -fapple-kext, e.g., falling back to
llvm-gcc for i386/Darwin kexts. Radar 9868422.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
9b127f3b44e685cbe513595b7e0115b0884b0604 15-Aug-2011 Matt Beaumont-Gay <matthewbg@google.com> Add fixit notes for -Wconstant-logical-operand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
507d6758fb5b5c871b0796c75ac08fc478f51ed7 14-Aug-2011 Francois Pichet <pichet2000@gmail.com> Another typo found by Nico; Doug also warned me about it, but I didn't listen to him.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0d95f0d7b81110f77e99e833f766d19be7b7e072 14-Aug-2011 Francois Pichet <pichet2000@gmail.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
af0f4d0b2e38c810effc8b024ad2fb6604eec5d3 14-Aug-2011 Francois Pichet <pichet2000@gmail.com> Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.

Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};

This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DeclNodes.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Serialization/ASTBitCodes.h
cc52a0688f46cd04dd6b4670b304cbe82e3018c0 14-Aug-2011 Nico Weber <nicolasweber@gmx.de> Add support of -x objc-cpp-output, -x objc++-cpp-output to the Driver.

Matches gcc, and is also required for using ccache with clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
9c378f705405d37f49795d5e915989de774fe11f 13-Aug-2011 Ted Kremenek <kremenek@apple.com> Cleanup various declarations of 'Stmt*' to be 'Stmt *', etc. in libAnalyzer and libStaticAnalyzer[*]. It was highly inconsistent, and very ugly to look at.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/StaticAnalyzer/Checkers/LocalCheckers.h
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/Environment.h
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h
lang/StaticAnalyzer/Core/PathSensitive/WorkList.h
1ab69c513239596946286373e081b89fa3358612 13-Aug-2011 Ted Kremenek <kremenek@apple.com> Document purpose of ProgramPointTag::getTagKind().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
ca804539d908d3a0e8c72a0df5f1f571d29490bb 13-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] change "tag" in ProgramPoint from "void*" to a ProgramPointTag*.

Having a notion of an actual ProgramPointTag will aid in introspection of the analyzer's behavior.
For example, the GraphViz output of the analyzer will pretty-print the tags in a useful manner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
be69f6092668b0586c8729855c01ca2eea22e6fe 13-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Refactor a bit to enable a few fixes when generating diagnostics. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
096aef9597b263b4cd6a0feaacf9e7214fa9c75a 12-Aug-2011 Jordy Rose <jediknil@belkadan.com> [analyzer] Nitpicks on Olaf's patch, which I meant to e-mail but then didn't in
time. One is cleanup, the other is me being OCD about enum group nesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
3a02b44e3948f7762dbfba94b7961281ca29d022 12-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> metadata generated by the compiler does not include the weak
attribute of a property. patch by Remy Demarest fixes it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
261f5b47323d5afd32da83e71284a6258791f72f 12-Aug-2011 Ted Kremenek <kremenek@apple.com> Place err_cfstring_literal_not_string_constant and warn_cfstring_truncated under "-WCFString" flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
42cd50c4e76380c34866d246099da6d13b71fe9b 12-Aug-2011 Ted Kremenek <kremenek@apple.com> Place diagnostic warn_stringcompare under the "-Wstring-compare" flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9d9eef9c56aa14117a7f2c83beb2d674eef3d1fa 12-Aug-2011 Ted Kremenek <kremenek@apple.com> Place warnings related to incorrect "main()" declaration under "-Wmain".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8ed72530ce7c3bd6bb1dceaf8108fbeddde80e4e 12-Aug-2011 Ted Kremenek <kremenek@apple.com> Add -Wtypename-missing flag for diagnostic warn_typename_missing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9697934650354bed2e509d8e7e44f21a1fb00f76 12-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Introduce new MemRegion, "TypedValueRegion", so that we can separate TypedRegions that implement getValueType() from those that don't.

Patch by Olaf Krzikalla!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
772eeaefef2c883aabe35caf4543e7e32d290183 12-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch the __int128_t and __uint128_t types over to predefined types
in the AST format, which are built lazily by the ASTContext when
requested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Serialization/ASTBitCodes.h
7a27ea52b7bd635c89bec5a9c521a3bf7d204238 12-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch the Objective-C 'SEL' type over to a predefined type in the
AST file format, lazily generating the actual declaration in
ASTContext as needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Serialization/ASTBitCodes.h
79d6726921897811232554ed94c5d77b5b7b3fc0 12-Aug-2011 Douglas Gregor <dgregor@apple.com> Switch the Objective-C 'Class' type over to a predefined type in the
AST file format, lazily generating the actual declaration in
ASTContext as needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Serialization/ASTBitCodes.h
4dfd02a17c6d604c72e6936527c5e1c56d3ecb7a 12-Aug-2011 Douglas Gregor <dgregor@apple.com> Move the creation of the predefined typedef for Objective-C's 'id'
type over into the AST context, then make that declaration a
predefined declaration in the AST format. This ensures that different
AST files will at least agree on the (global) declaration ID for 'id',
and eliminates one of the "special" types in the AST file format.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Serialization/ASTBitCodes.h
e685848689474c600a4cc4fc3930562281c784ef 12-Aug-2011 NAKAMURA Takumi <geek4civic@gmail.com> include/clang/Config/config.h.cmake: Reorder and reword to follow (generated) llvm/Config/config.h.in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Config/config.h.cmake
b7c324f8581a55e2a918e5f3eb2e7418b09df0f2 12-Aug-2011 Douglas Gregor <dgregor@apple.com> Collapse ASTWriter::WriteASTChain into ASTWriter::WriteASTCore,
eliminating a pile of redundant code (and probably some bugs in the
process). The variation between chained and non-chained PCH is fairly
small now anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
cb9657cfba92d5a3009e1b37109e03258c20d327 12-Aug-2011 Bill Wendling <isanbard@gmail.com> Remove extra semicolons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticIDs.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
579ad7ac56f7940cc543b7216ee1b1a7de1ed712 12-Aug-2011 Anna Zaks <ganna@apple.com> Optimizations for Dependent Symbol tracking (as per Ted's code review for r137309):

1) Change SymbolDependTy map to keep pointers as data. And other small tweaks like making the DenseMap smaller 64->16 elements; remove removeSymbolDependencies() as it will probably not be used.

2) Do not mark dependents live more then once.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
6bf2b9fbd3e3adc38d4712de79aeaa81d651aa08 12-Aug-2011 Douglas Gregor <dgregor@apple.com> In the serialized AST format, make the translation unit a "predefined"
declaration that never actually gets serialized. Instead, serialize
the various kinds of update records (lexical decls, visible decls, the
addition of an anonymous namespace) for the translation unit, even if
we're not chaining. This way, we won't have to deal with multiple
loaded translation unit declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
79e610a99b43b9e6df8f9b6b59dbaf5d38a682d3 12-Aug-2011 Richard Trieu <rtrieu@google.com> The current warning in -Wnull-arithmetic for comparisons between NULL and non-pointers is not very helpful. This patch will update the wording to be more helpful to users.

Old warning:

warning: use of NULL in arithmetic operation [-Wnull-arithmetic]
return 10 <= NULL;
^ ~~~~

New warning:

warning: comparison between NULL and non-pointer ('int' and NULL) [-Wnull-arithmetic]
return 10 <= NULL;
~~ ^ ~~~~


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
01a4cf11777bb34c35f5d251a9e95eb736d0842b 11-Aug-2011 Douglas Gregor <dgregor@apple.com> Encapsulate the Objective-C id/Class/SEL "redefinition" types in
ASTContext with accessors/mutators. The only functional change is that
the AST writer won't bother writing the id/Class/SEL redefinition type
if it hasn't been explicitly set; previously, it ended up being
written as a synonym for the built-in id/Class/SEL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
89f920940de4b414616cabb310c37fa84ed2476a 11-Aug-2011 Anna Zaks <ganna@apple.com> Analyzer Core: Adding support for user-defined symbol dependencies. (For example, the allocated resource symbol only needs to be freed if no error has been returned by the allocator, so a checker might want to make the lifespan of the error code symbol depend on the allocated resource symbol.) Note, by default, the map that holds the dependencies will get destroyed along with the SymbolManager at the end of function exploration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
03720fce6e709661af020f3e4e6dfd08a96e8044 11-Aug-2011 Craig Topper <craig.topper@gmail.com> Raw string followup. Pass a couple StringRefs by value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
2fa4e86b4fdada3b9ecbbbd99965b83ed879f69b 11-Aug-2011 Craig Topper <craig.topper@gmail.com> Add support for C++0x raw string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
75eeeb173cd3f6425247d3686c19e49117834fc3 11-Aug-2011 Anna Zaks <ganna@apple.com> Make SymbolManager comments doxygen friendly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
0e89061a399bae32f0eca5b85658ad66a58c504d 11-Aug-2011 Anna Zaks <ganna@apple.com> Cleanup: remove CleanedSate member and GetState() wrapper from StmtNodeBuilder, not needed as of r137273.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
db5e8cd095d1ffdd18f5620ad2348b5f386bebe3 11-Aug-2011 Anna Zaks <ganna@apple.com> Cleanup: remove GetState() wrapper from ExprEngine, not needed as of r137273.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
6bd528b9d703fdea51053719d9c53504a61a6bd7 11-Aug-2011 Anna Zaks <ganna@apple.com> Analyzer Core: In checkDeadSymbols checker callback, provide the state in which the symbols are not yet deleted so that checkers could inspect them. Since we are now always creating a transition in ProcessStmt(), remove the logic for adding a transition when none was generated. TODO: the extra transitions will have to be removed; more cleanups; a checker that tests teh new fucntionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
6b8bc0707f26aa6acfdd80a59b9a3850cafbe387 10-Aug-2011 Richard Smith <richard-llvm@metafoo.co.uk> Renamings to consistently use 'Constexpr' not 'ConstExpr' when referring to the C++0x 'constexpr' keyword.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
730cfb18463d8c2f6d0e4d4380fdd67e4abe5d97 10-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Using existing infrastructure for finding
overridden methods to diagnose their type mismatch.
This is a general solution for previous fixes
for // rdar://6191214 and // rdar://9352731
and removes lots of duplicate code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/IdentifierTable.h
lang/Sema/Sema.h
a19950edd94c1b80e73c9f45d821b125bd0ee72f 10-Aug-2011 John McCall <rjmccall@apple.com> Change an assert into a check. I'm pretty sure there was a point
in time when this assert was valid, but it's not valid now.
Also teach this code to correctly introduce function-to-pointer
decay.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b51e0315d4ffd12670441ea2284ae1188485df14 09-Aug-2011 Caitlin Sadowski <supertri@google.com> Thread Safety: Added basic argument parsing for all new attributes.

This patch special cases the parser for thread safety attributes so that all
attribute arguments are put in the argument list (instead of a special
parameter) since arguments may not otherwise resolve correctly without two-token
lookahead.

This patch also adds checks to make sure that attribute arguments are
lockable objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
0815b579b31cb3129f732bb7ea36fd6ba6949e98 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Move the creation of the record type for the state of Objective-C fast
enumerations from the ASTContext into CodeGen, so that we don't need
to serialize it to AST files. This appears to be the last of the
low-hanging fruit for SpecialTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Serialization/ASTBitCodes.h
5c0d3d66bf06213009802876a14e6298efc1e0b0 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Don't serialize the block descriptor or block extended descriptor
types to AST files; they're only used by debug info generation anyway,
and shouldn't ever exist in the AST anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Serialization/ASTBitCodes.h
45c4ea75b235de94f44bf96843624e6a559e4c00 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Move the construction of the RecordDecl representing the runtime
layout of a constant NSString from the ASTContext over to CodeGen,
since this is solely CodeGen's responsibility. Eliminates one of the
unnecessary "special" types that we serialize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Serialization/ASTBitCodes.h
3b8043b49aff6e5d70f29ef5684214ce2473763c 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Migrate the serialization of ASTContext's AutoDeduceTy and
AutoRRefDeductTy from the "special types" block to predefined
types. The latter behaves better when loading multiple AST files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTWriter.h
6948bc4bcbd92502d90b877780a3b746275efa5b 09-Aug-2011 Ted Kremenek <kremenek@apple.com> Provide diag_iterator for iterating over the built-in diagnostic IDs/names in the internal table of DiagnosticIDs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticIDs.h
5d8c062b8c1e5d42ecfa3c6ad52cf71c966516f0 08-Aug-2011 Ted Kremenek <kremenek@apple.com> Add -W flag for ARC warning "performSelector may cause a leak because its selector is unknown".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2112190efa85f50af84a3c4efe03c5bf69247ba2 08-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance)
"conformsTo" two protocols which conflict (have methods which conflict).
This patch fixes the previous patch where warnings were coming out in
non-deterministic order. This is 2nd part of // rdar://6191214.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Sema/Sema.h
993124ecdd44ec1430a3b7f01b22f65bbaadb586 06-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Start sketching out a new BugReporterVisitor that inspects branches and other expressions to generate interesting path events in diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
bea2753da897ede723e70bcd17023d050b0603d0 06-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Change SymbolReaper to store region roots implied by the Environment, allowing it be queried when
determining if symbols derived from regions are still live.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/Environment.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
3f10e32b15e54f507aed90cb72d73c7acaa500bb 06-Aug-2011 Anna Zaks <ganna@apple.com> Static Analyzer: Add a convinience API. Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
270ba59c4111c9e9d040cf3b95f1f3e0a8440dff 06-Aug-2011 Ted Kremenek <kremenek@apple.com> Revert 136984 and 136927.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Sema/Sema.h
d6c8865e6f306556b7eef972ceec2cc8ba026a0d 06-Aug-2011 Kaelyn Uhrain <rikka@google.com> Perform array bounds checking in more situations and properly handle special
case situations with the unary operators & and *. Also extend the array bounds
checking to work with pointer arithmetic; the pointer arithemtic checking can
be turned on using -Warray-bounds-pointer-arithmetic.

The changes to where CheckArrayAccess gets called is based on some trial &
error and a bunch of digging through source code and gdb backtraces in order
to have the check performed under as many situations as possible (such as for
variable initializers, arguments to function calls, and within conditional in
addition to the simpler cases of the operands to binary and unary operator)
while not being called--and triggering warnings--more than once for a given
ArraySubscriptExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
e735e2deb9e57d9b62c1258ee236ccfeba8e84b2 06-Aug-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Wire up -import-module to run ReadAST for each module loaded.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
8e68f1c8a2919ea83c2053731d6011074f1062e1 05-Aug-2011 Roman Divacky <rdivacky@freebsd.org> Let attribute((cdecl)) and company override -mrtd default calling convention.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c268434b332bbe57950d977633369bf5822d9554 05-Aug-2011 Chandler Carruth <chandlerc@gmail.com> Flesh out the -Warray-bounds detection of C89 tail-padded one-element
arrays. This now suppresses the warning only in the case of
a one-element array as the last field in a struct where the array size
is a literal '1' rather than any macro expansion or template parameter.

This doesn't distinguish between the language standard in use to allow
code which dates from C89 era to compile without the warning even in C99
and C++ builds. We could add a separate warning (under a different flag)
with fixit hints to switch to a flexible array, but its not clear that
this would be desirable. Much of the code using this idiom is striving
for maximum portability.

Tests were also fleshed out a bit, and the diagnostic itself tweaked to
be more pretty w.r.t. single elment arrays. This is more ugly than
I would like due to APInt's not being supported by the diagnostic
rendering engine.

A pseudo-patch for this was proposed by Nicola Gigante, but I reworked
it both for several correctness issues and for code style.

Sorry this was so long in coming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
894e4d5d232a23668b3f585fdaa56858cfabf3d3 05-Aug-2011 Chandler Carruth <chandlerc@gmail.com> Change the this -W flag to 'return-stack-address'.

~or~

Paint the bikeshed green.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc2f30c4ed7770b6005bd55b529a55c1fcc250fc 05-Aug-2011 Matt Beaumont-Gay <matthewbg@google.com> Extend memset/memcpy/memmove checking to include memcmp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
ace5e76e5c707f4a8447abc01ef540fa6d57ff95 05-Aug-2011 Kaelyn Uhrain <rikka@google.com> Have the typo correction in DiagnoseEmptyLookup properly handle template
functions when performing function overload resolution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
dd7fddb5b6883326e52b278a9b7e9cefea29aae0 05-Aug-2011 Chad Rosier <mcrosier@apple.com> More whitespace and naming fixup. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
42d7b2d25b6f90dc397886d05502b10ab5a8b51b 05-Aug-2011 Matt Beaumont-Gay <matthewbg@google.com> Specialize diag::warn_unused_call for the "warn_unused_result" attribute, so
it can be controlled with a distinct flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
270f943c8547d325ad9ddd8c89a08b3a047b293d 05-Aug-2011 Matt Beaumont-Gay <matthewbg@google.com> Put a few warnings into a DiagGroup. Feel free to improve the flag name!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6a3bec320e5617922f1f15657dcdaeb22610ca23 04-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance)
"conformsTo" two protocols which conflict (have methods which conflict).
This is 2nd part of // rdar://6191214.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Sema/Sema.h
8fa0a80b4482ad94e82c4a19e23de17fd69140b5 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Add a new libclang API to return a CXCompletionString for an arbitrary
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136911 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
272b6bc6a6c8fc04f951ad850df68c44d137f513 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce local -> global mapping for preprocessed entity IDs. This is
the last of the ID/offset/index mappings that I know
of. Unfortunately, the "gap" method of testing doesn't work here due
to the way the preprocessing record performs iteration. We'll do more
testing once multi-AST loading is possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ContinuousRangeMap.h
3b2257ca054aa0b7d0150a294f184e9349cda433 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Remove the unset, unused return value of
ASTReader::ReadMacroRecord(). No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
6e43f3f0e2fa7a4b50d2497de94a40437cd26003 04-Aug-2011 Chad Rosier <mcrosier@apple.com> Additional comments and whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
4d9d157afb35742bc6348defbe45bc6de780ec77 04-Aug-2011 Kaelyn Uhrain <rikka@google.com> Match type names and give more info for out-of-line function definition errors.

Having a function declaration and definition with different types for a
parameter where the types have same (textual) name can occur when an unqualified
type name resolves to types in different namespaces in each location.

The error messages have been extended by adding notes that point to the first
parameter of the function definition that doesn't match the declaration, instead
of a generic "member declaration nearly matches". The generic message is still
used in cases where the mismatch is not in the paramenter list, such as
mismatched cv qualifiers on the member function itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
fb2d9e092f19cfcdd11ebd5ceac40456c090c7db 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Implement the local -> global remapping for macro definition IDs in
the detailed preprocessing record. Tested with the standard "gaps" method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
ae7902c4293d9de8b9591759513f0d075f45022a 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Parsing of C++0x lambda expressions, from John Freeman with help from
David Blaikie!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
61a4e6a835cafe11421b217bf94a610d9e44205f 04-Aug-2011 John McCall <rjmccall@apple.com> Take -Wvector-conversions out of -Wmost; it needs a lot of
QoI work. rdar://problem/9887979. If some open-source
wants to get an idea for what QoI work I have in mind,
ping me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
70529099e60c0bb53fdf0f31b387f487807b3d99 04-Aug-2011 Chad Rosier <mcrosier@apple.com> Add documentation for useBitFieldTypeAlignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
61a62216a0bb33fb668ab653d9f9a704e43d2fc6 04-Aug-2011 Chad Rosier <mcrosier@apple.com> Add partial support for using anonymous bitfields (e.g., int : 0) to enforce
alignment. This fixes cases where the anonymous bitfield is followed by a
non-bitfield member. E.g.,

struct t4
{
int foo : 1;
long : 0;
char bar;
};

Part of rdar://9859156

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e92b8a1dbba150e213c4980710fcb59ec5c5c570 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Don't introduce a local -> global mapping for CXXBaseSpecifiers. The
IDs will never cross module boundaries, since they're tied to the
CXXDefinitionData, so just use a local mapping throughout. Eliminate
the global -> local tables and supporting data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
b18b1fd33f958264630fbae2602c81275bae8c9a 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce local -> global selector ID mapping into the AST
reader. Tested with the usual "gaps" method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
6ec60e00eeaaed78d98c85ce962d6f328094ca14 03-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a local-to-global remapping for identifiers in the AST
reader, and fix up the one (!) place where we were improperly mapping
a local ID to a global ID. Tested via the usual "gaps" trick.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
f0c1d8f804e7854bedf3f241409185951ee67866 03-Aug-2011 Kaelyn Uhrain <rikka@google.com> Improve overloaded function handling in the typo correction code.

Change TypoCorrection to store a set of NamedDecls instead of a single
NamedDecl. Also add initial support for performing function overload
resolution to Sema::DiagnoseEmptyLookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
lang/Sema/TypoCorrection.h
74133075f5024ce87e4c1eb644d77c20e1c521f4 03-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Methods declared in methods must type match
those declated in its protocols. First half or // rdar://6191214


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
43fd9388d374f29e908e611a686c6137553efa79 03-Aug-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Fix a few typos



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
4192f0336e86532904b82ae63cd57b966f1c6dfd 03-Aug-2011 Douglas Gregor <dgregor@apple.com> Remove stray comma

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
0a14e4bf604a91b035a479235adf4c2f6c9128a2 03-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a constant for the number of predefined declarations in an
AST file, along with an enumeration naming those predefined
declarations. No functionality change, but this will make it easier to
introduce new predefined declarations, when/if we need them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
496c709a6f08f5c502b6f592ddd9ed40f953a5e5 03-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce the local -> global declaration ID mapping into the AST
reader, to allow AST files to be loaded with their declarations
remapped to different ID numbers. Fix a number of places where we were
either failing to map local declaration IDs into global declaration
IDs or where interpreting the local declaration IDs within the wrong
module.

I've tested this via the usual "random gaps" method. It works well
except for the preamble tests, because our handling of the precompiled
preamble requires declaration and preprocessed entity to be stable
when parsing code and then loading that back into memory. This
property will hold in general, but my randomized testing naturally
breaks this property to get more coverage. In the future, I expect
that the precompiled preamble logic won't need this property.

I am very unhappy with the current handling of the translation unit,
which is a rather egregious hack. We're going to have to do something
very different here for loading multiple AST files, because we don't
want to have to cope with merging two translation units. Likely, we'll
just handle translation units entirely via "update" records, and
predefine a single, fixed declaration ID for the translation
unit. That will come later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
88710f22be1acb04b7d812aebe87bea56394c07c 03-Aug-2011 Eli Friedman <eli.friedman@gmail.com> A couple fixes for preprocessor expressions:

1. Be more tolerant of comments in -CC (comment-preserving) mode. We were missing a few cases.

2. Make sure to expand the second FOO in "#if defined FOO FOO". (See also
r97253, which addressed the case of "#if defined(FOO FOO".)

Fixes PR10286.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
fc6142779f42058b4a39a29b6209a01a6de9fe7c 02-Aug-2011 Chad Rosier <mcrosier@apple.com> Fix cmake for r136702 (at least for the most part). Chandler has been kind
enough to offer to investigate the underlying issue. Thanks to Doug for his
assistance as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Config/config.h.cmake
4068eaaec44346a5866dcf3e5e4204ca82134e53 02-Aug-2011 Chad Rosier <mcrosier@apple.com> Temporarily revert parts of r136702 to make cmake builds happy.
Someone with more cmake experience want to throw me a bone? :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Config/config.h.cmake
e36050111e2bdb7efc014af9dd7f0009b492ac36 02-Aug-2011 Douglas Gregor <dgregor@apple.com> Change the hashing function for DeclContext lookup within an AST file
by eliminating the type ID from constructor, destructor, and
conversion function names. There are several reasons for this change:
- A given type (say, int*) isn't guaranteed to have a single, unique
type ID within a chain of PCH files. Hence, we could end up hashing
based on the wrong type ID, causing name lookup to fail.

- The mapping from types back to type IDs required one DenseMap
entry for every type that was ever deserialized, which was an
unacceptable cost to support just the name lookup of constructors,
destructors, and conversion functions. Plus, this mapping could
never actually work with chained or multiple PCH, based on the first
bullet.

Once we have eliminated the type from the hash function, these
problems go away, as does my horrible "reverse type remap" hack, which
was doomed from the start (see bullet #1 above) and far too
complicated.

However, note that removing the type from the hash function means that
all constructors, destructors, and conversion functions have the same
hash key, so I've updated the caller to double-check that the
declarations found have the appropriate name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
2b81910618f63e4ce2373c926a26e76b4b91373f 02-Aug-2011 Chad Rosier <mcrosier@apple.com> When the compiler crashes, the compiler driver now produces diagnostic
information including the fully preprocessed source file(s) and command line
arguments. The developer is asked to attach this diagnostic information to a
bug report.
rdar://9575623


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Config/config.h.cmake
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/Job.h
c24a1eef40207457692a1ad597cefdd0dc8fa149 02-Aug-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Following up the earlier refactoring/cleanup work by fixing up how we manage the virtual files the ASTReader has to handle. Specifically, this occurs when the reader is reading AST files that were created in memory and not written to disk. For example, when a user creates a chained PCH using command line flags. These virtual files are stored in MemoryBuffers in ChainIncludeSource.cpp, and then read back in by the ASTReader. This patch moves the management of these buffers into the ModuleManager, so that it becomes the authority on where these buffers are located.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
a119da0761cb6b85f53857eaee50f6ad8c5ea0a0 02-Aug-2011 Douglas Gregor <dgregor@apple.com> Implement a proper local -> global type ID remapping scheme in the AST
reader. This scheme permits an AST file to be loaded with its type IDs
shifted anywhere in the type ID space.

At present, the type indices are still allocated in the same boring
way they always have been, just by adding up the number of types in
each PCH file within the chain. However, I've done testing with this
patch by randomly sliding the base indices at load time, to ensure
that remapping is occurring as expected. I may eventually formalize
this in some testing flag, but loading multiple (non-chained) AST
files at once will eventually exercise the same code.

There is one known problem with this patch, which involves name lookup
of operator names (e.g., "x.operator int*()") in cases where multiple
PCH files in the chain. The hash function itself depends on having a
stable type ID, which doesn't happen with chained PCH and *certainly*
doesn't happen when sliding type IDs around. We'll need another
approach. I'll tackle that next.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ContinuousRangeMap.h
8df5c9b5d65beec807e4e77dae2813dd193f77dd 02-Aug-2011 Douglas Gregor <dgregor@apple.com> Add a debugging dump for Module (also emitted as part of the AST
reader statistics), to show the local-to-global mappings. The only
such mapping we have (at least, for now) is for source location
offsets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
f33740efdb2d836a96ba97ca3004d46404401439 02-Aug-2011 Douglas Gregor <dgregor@apple.com> Generalize the module offset map to include mapping information for
all of the kinds of IDs that can be offset. No effectively
functionality change; this is preparation for adding remapping for
IDs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ContinuousRangeMap.h
7898005b35f8ee5c639e1247ce56b63004b86b03 02-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: reverse patch for // rdar://9818354



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5d51a1d22d862dfae44eaa098af4e09bbfebae72 01-Aug-2011 Douglas Gregor <dgregor@apple.com> Rename the AST file's SOURCE_LOCATION_MAP to MODULE_OFFSET_MAP, to indicate the greater role it will soon play in remapping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
0bfe83b5a98ce37bf3a10274bca6f93ca4cb9696 30-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Annotation of parameters that got default args from a previous declarations was
broken because the end location of the parameter was the end location of the default arg,
resulting in a source range that could begin in one file and end in another.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f78c4e57122dad4430329135b966dfc241a6425b 30-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce a Fix-It for the "missing sentinel" warning, adding an
appropriate sentinel at the end of the argument list. Also, put the
sentinel warnings under -Wsentinel. Fixes <rdar://problem/8764236>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
d2d8be6a27d0ef73d46039604682f7890e1cc3e0 30-Jul-2011 Douglas Gregor <dgregor@apple.com> Add code completion to produce "else" blocks after an "if"
statement. Fixes <rdar://problem/9229438>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0f91c8ccb398be2bd40dc402309bd79737542396 30-Jul-2011 Douglas Gregor <dgregor@apple.com> When performing code completion after at @interface, allow both
already-defined and forward-declared results. Already-defined results
are fine because they could be the start of a category. Fixes
<rdar://problem/9811691>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
4eb7522e70a7212328089f0ef490380a9ba322a3 30-Jul-2011 Douglas Gregor <dgregor@apple.com> When complaining about a non-POD second argument to va_arg, use a
special diagnostic for ARC ownership-qualified types. We wouldn't want
to expose Objective-C programmers to the term "POD", would we? Fixes
<rdar://problem/9772982>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
70a34da7a767bda69958d8f659de9f87b03de747 29-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Remove recursive visitation in ExprEngine::VisitObjCForCollectionStmt because it isn't needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
4410a935e8d8ee3c903b858bbf74ca24fce629b5 29-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Remove explicit argument processing from ExprEngine::VisitObjCMessage() since it is no longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
2e09163890b51aa8766564780154531451a3cf0b 29-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Renamed Loaded member to ImportedBy, as it's easier to read. Added another set to represent the modules a module imports.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
d16aa4139b8e6d08c0166945ab24ce340055465c 29-Jul-2011 Douglas Gregor <dgregor@apple.com> Add a missing \endcode for Doxygen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
c0a575f9b791a25c94b1c3c832dd73ec564646bb 29-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make DiagnosticErrorTrap keep a count of the errors that occurred so multiple
DiagnosticErrorTraps can be composed (e.g. a trap inside another trap).

Fixes http://llvm.org/PR10462 & rdar://9852007.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
9827a8049a793f23c62ade8f24f0c66c2dbf6741 29-Jul-2011 Douglas Gregor <dgregor@apple.com> In the ASTReader, replace the continuous range maps whose value types
were (Module*, Offset) with equivalent maps whose value type is just a
Module*. The offsets have moved into corresponding "Base" fields
within the Module itself, where they will also be helpful for
local->global translation (eventually).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
9aab1489866a5afe1a8a3267f9ad7124034fd644 29-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Fix an inconsistency in Sema::ConvertArgumentsForCall in that
the callee note diagnostic was not emitted in the case where
there were too few arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1e849b6f43a6aded51466978d826e938859130db 29-Jul-2011 Douglas Gregor <dgregor@apple.com> Move the base type ID from the ASTReader's global type map into the
Module itself, which makes more sense. This pattern to be repeated
several more times.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
fefe91e6017321aa7db431b94cb3615f6c97da7a 29-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: warn if implementation of a method in category
masks an existing method in its primary class, class extensions,
and primary class's non-optional protocol methods; as primary
class, or one of its subclass's will implement this method.
This warning has potential of being noisy so it has its own
group. // rdar://7020493


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
b4ae29ced808ae77914754a9e966513aa26b580b 29-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Some documentation fixes so that we are explicit about which iteration order is source-order. Also, removing unused NextInSource field of Module.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
a4c7a4314ffbe402091695874e93d9b0a79c8099 29-Jul-2011 Ted Kremenek <kremenek@apple.com> Really remove FlatStoreManager and BasicStoreManager, this time from the driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
lang/Frontend/AnalyzerOptions.h
882998923889a2fcce9b49696506c499e22cf38f 29-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Overhaul how the static analyzer expects CFGs by forcing CFGs to be linearized only when used by the static analyzer. This required a rewrite of LiveVariables, and exposed a ton of subtle bugs.

The motivation of this large change is to drastically simplify the logic in ExprEngine going forward.

Some fallout is that the output of some BugReporterVisitors is not as accurate as before; those will
need to be fixed over time. There is also some possible performance regression as RemoveDeadBindings
will be called frequently; this can also be improved over time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/CFG.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
fde18c53548769748b7a2fc59f5281fdec848686 29-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] add accessor to StoreRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
fa7a95c62aa573a30d87c215b320b0086ed08bdc 29-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Add StoreManager::includedInBindings() to to query whether a region is used in any bindings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/Store.h
eea72a925f294225391ecec876a342771c09b635 29-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] fix handling of MaterializeTemporaryExpr by binding the result value to
the proper expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
86c67d8802a9e0887c31c850188991465ac3c1bd 29-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce the local-global mapping for preprocessed entities, and use
it appropriately. Also, patch up a place where we were failing to map
local macro definition IDs into global macro definition IDs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
e144c70d07bf7af6c0337000ac4c4e805fc6d842 29-Jul-2011 Douglas Gregor <dgregor@apple.com> Use local-to-global mapping appropriately for macro definitions in the ASTReader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
2d2689ab787c6d54cb985c28ff3f16370bc01b0f 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Use the local -> global mapping functions for selectors more
consistently in the ASTReader.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
95eab176f51beed44a9bc14c0dcdd37844b23740 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Teach the ASTReader to perform local and global mapping of identifier
IDs properly, although the mapping itself is still trivial.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
db33e14661c7a118a2d9a777ae69c0ecaa036e1e 28-Jul-2011 Caitlin Sadowski <supertri@google.com> Added basic parsing for all remaining attributes, thread safety
analysis. This includes checking that the attributes are applied in the
correct contexts and with the correct number of arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
6722155dfe056e2c3dfbacbcaffae04dea0c2be0 28-Jul-2011 Anna Zaks <ganna@apple.com> Add */& mismatch fixit generation to the Sema::DiagnoseAssignmentResult().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6e4a3f5c59664af13e02e9bb58c2810b830e3b96 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Make the deserialization of Sema::PendingInstantiations lazy. At this
point, ASTReader::InitializeSema() has very little interesting work,
*except* issues stemming from preloaded declarations. That's something
we'll still need to cope with.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Serialization/ASTReader.h
f3546eeef1eed4661b77b93b91a29be1bf5f7d0b 28-Jul-2011 Anna Zaks <ganna@apple.com> Refactor the */& mismatch fixit generation out of SemaOverload and provide a simple conversion checking function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
lang/Sema/SemaFixItUtils.h
f2abb52acbba25ad93a1ecdc24d994b9694803a1 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Promote the deserialized PendingInstantiations vector from being a
Module member to being an ASTReader member; we want it to be
centralized for lazy deserialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
dfe6543e12eca5c79421378b7fa6b3e8fc403e63 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Lazily deserialize Sema::VTableUses. Plus, fix the utterly and
completely broken deserialization mapping code we had for VTableUses,
which would have broken horribly as soon as our local-to-global ID
mapping became interesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
31e37b2d7b4815fdea6a35d49f33005562f0d494 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Make Sema::WeakUndeclaredIdentifiers lazily deserialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Sema/Weak.h
lang/Serialization/ASTReader.h
8a22e27af58776b9bd9e51b913514fbfa4d4fa84 28-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Add missing documentation onto new member variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
fdde9e719ad75e656a1475a36b06c2f88f0957cc 28-Jul-2011 Caitlin Sadowski <supertri@google.com> Added parsing for guarded_var, pt_guarded_var, lockable,
scoped_lockable, and no_thread_safety_analysis attributes, all for thread safety analysis

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
1afb661bc5444462a246cefa0effa61ef25fab29 28-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Switch the ModuleManager over to using a FileManager and FileEntry* as part of its lookup instead of the filename. This is a more correct unique identifier, as symlinks can be handled by the FileManager.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Serialization/ASTReader.h
5b9dc7caaef0469babc45dd8e713727a136ce517 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Make Sema::ReferencedSelectors lazily deserialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Serialization/ASTReader.h
8451ec7e709baf777bec07dc70653e0c523dd120 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Move a Module's ReferencedSelectorsData into the ASTReader itself, so
that it accumulates referenced selectors from each of the modules/PCH
files as they are loaded. No actual functionality change, yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
ec12ce2f6da44bfc9048772327a3924498099d60 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Make Sema::LocallyScopedExternalDecls lazily deserialized. In theory,
we could turn this into an on-disk hash table so we don't load the
whole thing the first time we need it. However, it tends to be very,
very small (i.e., empty) for most precompiled headers, so it isn't all
that interesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136352 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
b4dc485a2b38ea98ba7da01596fd0e8438120346 28-Jul-2011 Douglas Gregor <dgregor@apple.com> AST serialization support for the Framework in IndexHeaderMapHeader
fields of HeaderFileInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
lang/Serialization/ASTReader.h
65e02fa80e1c185f18e5f81cefc30d75383a7301 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce the "-index-header-map" option, to give special semantics
for quoted header lookup when dealing with not-yet-installed
frameworks. Fixes <rdar://problem/9824020>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/HeaderSearchOptions.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
a126f17ca83b985300c1f65cee647bea108db657 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Switch Sema::DynamicClasses over to LazyVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
7e90985df09855dc309ed888a5b16a0ae684f8e3 28-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Cut down the number of open/close system calls for output files.

For PCH files, have only one open/close for temporary + rename to be safe from race conditions.
For all other output files open/close the output file directly.

Depends on llvm r136310. rdar://9082880 & http://llvm.org/PR9374.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
d58a0a55e64a7c410a80e9d6dcd899e61e99cc4d 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Switch Sema::ExtVectorDecls over to LazyVector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
5cb3d699f0e37de1767eb23d26d03953a46cf1ff 28-Jul-2011 Richard Trieu <rtrieu@google.com> Add template instantiations to the output of -ast-dump.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1fc1de48cdf9a2f241e0f2c7b9e9db2322f1b794 28-Jul-2011 Chad Rosier <mcrosier@apple.com> The -fapple-kext flag was designed to "do the right thing" for building code for
use in KEXTs. However, users/Xcode still need to tweak the linker flags to do
the right thing, and end up using -Xlinker, for example. Instead, have the
driver "do the right thing" when linking when -fapple-kext is present on the
command line, and we should have Xcode use -fapple-kext instead of setting other
flags like -Xlinker -kext or -nodefaultlibs.
rdar://7809940

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
0129b561a1452bf057f6b18b6a1de815d487ab81 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Turn Sema::DelegatingCtorDecls into a LazyVector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
07524039dce5c820f111a1b3f772b4261f004b4a 27-Jul-2011 John McCall <rjmccall@apple.com> The lock operand to an @synchronized statement is also
supposed to be a full-expression; make it so. In ARC, make sure
we retain the lock for the entire protected block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
a2ee20aa9660851080135219cac5b31fbac08b78 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Switch Sema::UnusedFileScopedDecls over to a LazyVector.
- Added LazyVector::erase() to support this use case.
- Factored out the LazyDecl-of-Decls to RecordData translation in
the ASTWriter. There is still a pile of code duplication here to
eliminate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
aca25bccefe56121b686706afc84c8cb5d46e65b 27-Jul-2011 Anna Zaks <ganna@apple.com> Add a utility function to the Lexer, which makes it easier to find a token after the given location. (It is a generalized version of trans::findLocationAfterSemi from ArcMigrate, which will be changed to use the Lexer utility).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
a862320972e63349524dc9aa744dec1b95f54ba1 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce a new data structure, LazyVector, which is a vector whose
contents are lazily loaded on demand from an external source (e.g., an
ExternalASTSource or ExternalSemaSource). The "loaded" entities are
kept separate from the "local" entities, so that the two can grow
independently.

Switch Sema::TentativeDefinitions from a normal vector that is eagerly
populated by the ASTReader into one of these LazyVectors, making the
ASTReader a bit more like me (i.e., lazy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
d648d373d6c14dccadd3bef7b560f6a7296f949e 27-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Silence gcc warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
020972d5d6dc1f3c49839cfbadcccf4cbefb2f4d 27-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Forbid address-space-qualified function types, per TR 18037

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5cee1195584fa8672253139c86e922daeda69b9e 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Add support for C++0x unicode string and character literals, from Craig Topper!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
lang/Basic/DiagnosticLexKinds.td
lang/Basic/IdentifierTable.h
lang/Basic/TokenKinds.def
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/Token.h
lang/Lex/TokenConcatenation.h
lang/Parse/Parser.h
18fd0c6915b45c4daafe18e3cd324c13306f913f 27-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] More automatic transformations and safety improvements; rdar://9615812 :

- Replace calling -zone with 'nil'. -zone is obsolete in ARC.
- Allow removing retain/release on a static global var.
- Fix assertion hit when scanning for name references outside a NSAutoreleasePool scope.
- Automatically add bridged casts for results of objc method calls and when calling CFRetain, for example:

NSString *s;
CFStringRef ref = [s string]; -> CFStringRef ref = (__bridge CFStringRef)([s string]);
ref = s.string; -> ref = (__bridge CFStringRef)(s.string);
ref = [NSString new]; -> ref = (__bridge_retained CFStringRef)([NSString new]);
ref = [s newString]; -> ref = (__bridge_retained CFStringRef)([s newString]);
ref = [[NSString alloc] init]; -> ref = (__bridge_retained CFStringRef)([[NSString alloc] init]);
ref = [[s string] retain]; -> ref = (__bridge_retained CFStringRef)([s string]);
ref = CFRetain(s); -> ref = (__bridge_retained CFTypeRef)(s);
ref = [s retain]; -> ref = (__bridge_retained CFStringRef)(s);

- Emit migrator error when trying to cast to CF type the result of autorelease/release:
for

CFStringRef f3() {
return (CFStringRef)[[[NSString alloc] init] autorelease];
}

emits:

t.m:12:10: error: [rewriter] it is not safe to cast to 'CFStringRef' the result of 'autorelease' message; a __bridge cast may result in a pointer to a destroyed object and a __bridge_retained may leak the object
return (CFStringRef)[[[NSString alloc] init] autorelease];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t.m:12:3: note: [rewriter] remove the cast and change return type of function to 'NSString *' to have the object automatically autoreleased
return (CFStringRef)[[[NSString alloc] init] autorelease];
^

- Before changing attributes to weak/unsafe_unretained, check if the backing ivar
is set to a +1 object, in which case use 'strong' instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
990567cb60e8530ba01b41d4e056e32b44b95ec0 27-Jul-2011 John McCall <rjmccall@apple.com> Clean up the analysis of the collection operand to ObjC
for-in statements; specifically, make sure to close over any
temporaries or cleanups it might require. In ARC, this has
implications for the lifetime of the collection, so emit it
with a retain and release it upon exit from the loop.

rdar://problem/9817306



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
d1194fbbf65374bfa3578eb40a547e4f97b497d1 27-Jul-2011 Ted Kremenek <kremenek@apple.com> clang_getCXTUResourceUsage: report memory used by HeaderSearch.

This required converting the StringMaps to use a BumpPtrAllocator. I measured the
compile time and saw no observable regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136190 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/HeaderSearch.h
ca7dc2b755eb81ac95121ce1a1f1aa44a4a0fe12 27-Jul-2011 Ted Kremenek <kremenek@apple.com> clang_getCXTUResourceUsage: Report memory used by data structures in SourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136189 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/SourceManager.h
ef8c79c52200e4f7c32f8ef2744c1557b7f3f3ea 27-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Re-fix r136172 so it isn't an error; apparently, some people are fond of their undefined behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
191591336f639dad1504e863733fb831645c1644 27-Jul-2011 Jeffrey Yasskin <jyasskin@google.com> This patch implements as much of the narrowing conversion error specified by
[dcl.init.list] as is possible without generalized initializer lists or full
constant expression support, and adds a c++0x-compat warning in C++98 mode.

The FixIt currently uses a typedef's basename without qualification, which is
likely to be incorrect on some code. If it's incorrect on too much code, we
should write a function to get the string that refers to a type from a
particular context.

The warning is currently off by default. I'll fix LLVM and clang before turning
it on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Initialization.h
lang/Sema/Sema.h
e33f643230738400f0bf5503a87d886e9bc635de 27-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Diagnose trying to delete a pointer to an abstract class with a non-virtual destructor. PR10504.

I'm not completely sure the standard allows us to reject this, but if it doesn't, it should. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
aba9ff5d4aa9cccf88b5178f55e1fab24a210197 27-Jul-2011 Anna Zaks <ganna@apple.com> Remove unused diagnostic definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
e52c91478a144f913019591ee1839e1846345f71 27-Jul-2011 Eli Friedman <eli.friedman@gmail.com> A couple minor issues with Sema for delete:

1. Attempting to delete an expression of incomplete class type should be an error, not a warning.

2. If someone tries to delete a pointer to an incomplete class type, make sure we actually emit
the delete expression after we warn.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
473506bd9dfd84944c2c5ca2c2a38814f46febc6 26-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In ARC we emit an error when compiling:

@interface Foo : NSObject
@property (readonly) id myProp;
@end

@implementation Foo
@synthesize myProp;
@end

t.m:9:13: error: ARC forbids synthesizing a property of an Objective-C object with unspecified storage attribute
@synthesize myProp;
^

which is fine, we want the ownership of the synthesized ivar to be explicit. But we should _not_ emit an error
for the following cases, because we can get the ownership either from the declared ivar or from the property type:

@interface Foo : NSObject {
__weak id _myProp1;
id myProp2;
}
@property (readonly) id myProp1;
@property (readonly) id myProp2;
@property (readonly) __strong id myProp3;
@end

@implementation Foo
@synthesize myProp1 = _myProp1;
@synthesize myProp2;
@synthesize myProp3;
@end

rdar://9844006.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
91d1bd6ede1d101a2e49719250c33154b39e0016 26-Jul-2011 Ted Kremenek <kremenek@apple.com> Report more memory using in Preprocessor::getTotalMemory() and PreprocessingRecord::getTotalMemory().

Most of the memory was already reported; but now we report more memory from side data structures.

Fixes <rdar://problem/9379717>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
2760455396abd72f0842122170dfab6126c46891 26-Jul-2011 Kaelyn Uhrain <rikka@google.com> Revert r136046 while fixing handling of e.g. &foo[index_one_past_size]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
48d2c3f7c3ca48da05436afdc8426a245294ee65 26-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> This patch extends the previous patch by starting to incorporate more functionality, like lookup-by-name and exporting lookup tables, into the module manager. Methods now have documentation. A few more functions have been switched over to the new iterator style and away from manual/explicit iteration. Ultimately we want to move away from name lookup here, as symlinks make filenames not a safe unique value, but we use it here as a stopgap before better measures are in place (namely instead using FileEntry* from a global FileManager).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
0a47d69af8bda945352997af3da4687a3356096a 26-Jul-2011 Douglas Gregor <dgregor@apple.com> Add new libclang API, clang_codeCompleteGetObjCSelector(), which
provides the partial Objective-C selector used in a code
completion. From Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136084 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
9f1210c3280104417a4ad30f0a00825ac8fa718a 26-Jul-2011 Chad Rosier <mcrosier@apple.com> After further discussion it has been determined that alignof should report
the preferred alignment. Thus, revert r135934, r135935, and r135940.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3201f382956ed9beee9fb31229c2835c1208889c 26-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Clean up as many of the comments in Basic I can find to talk in terms of
'expansion' rather than 'instantiation' for macro source locations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
1728762d5a8cfaf8d64385f47b311e84de1ae7a2 26-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Migrate 'Instantiation' data and API bits of SLocEntry to 'Expansion'
etc. With this I think essentially all of the SourceManager APIs are
converted. Comments and random other bits of cleanup should be all thats
left.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
78df836808aee22c3157e1bc23bc4ec569b80568 26-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Convert InstantiationInfo and much of the related code to ExpansionInfo
and various other 'expansion' based terms. I've tried to reformat where
appropriate and catch as many references in comments but I'm going to do
several more passes. Also I've tried to expand parameter names to be
more clear where appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
bf340e452339e374ea6eef78c1f0a2abdd16c5a3 26-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename create(MacroArg)InstantiationLoc to create(MacroArg)ExpansionLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
96d3589e523a04f4ff2058a7919226ce60696ae8 26-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename SourceManager (and InstantiationInfo) isMacroArgInstantiation API
to isMacroArgExpansion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
b48f7c059e74cd5395ca542c1a96be16e42f3d80 26-Jul-2011 Kaelyn Uhrain <rikka@google.com> Expand array bounds checking to work in the presence of unary & and *,
and to work with pointer arithmetic in addition to array indexing.

The new pointer arithmetic porition of the array bounds checking can be
turned on by -Warray-bounds-pointer-arithmetic (and is off by default).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
48a8d14fc6f064a5297024c2b34733a4080b2efe 26-Jul-2011 Francois Pichet <pichet2000@gmail.com> Fix the MSVC build. 2 problems:
- buildPieces was return a C++ object from inside an extern "C". (MSVC didn't like that)
- clang_getCursorReferenceNameRange was missing a CINDEX_LINKAGE causing a link error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135983 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
642116259e8df6286063a17361c20e95b5017a0a 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationLineNumber to getExpansionLineNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
b49dcd249c7f4f034493741f95394987a4ccf244 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Repair some indentation I missed in my previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a77c031cb66f75d22672070052cc6e0205289ff8 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationColumnNumber to getExpansionColumnNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
e7b2b6e87dbe5b1207f77b6ff9c210a02f95bb39 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getDecomposedInstantiationLoc to getDecomposedExpansionLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
f84ef95ecec34f27fd05eb4e0392ca6bd3bd0be0 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> getInstantiationLocSlowCase -> getExpansionLocSlowCase

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
999f739404edf2078cf9f9c28b4dc45c19765842 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename SourceManager::getImmediateInstantiationRange to
getImmediateExpansionRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
5d6d89fef8c7fff8b1a67c943fb5557a2a803468 25-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Refactor of how modules are handled in ASTReader to remove explicit uses of a chain of AST files, instead redirect calls through a module manager. This should help move toward a DAG and the potential of loading multiple, unrelated PCH files. It's still early in development.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
822f54a7ba3eca643104623e8048be20a3391b19 25-Jul-2011 Chad Rosier <mcrosier@apple.com> Allow target to specify about using minimum alignment vs preferred. Takes care of
FIXME: Override "preferred align" for double and long long for ARM apcs-gnu ABI.
Also part of rdar://9802874

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
01231610bc89a8d3ae1bdfee0063af9386fd82a4 25-Jul-2011 Axel Naumann <Axel.Naumann@cern.ch> Pick up expected diagnostics not only in the main file but also in the file where the first diagnostic occurred.
Useful if the main file is not relevant (like with cling).
By Vassil Vassilev.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticsClient.h
430d7a1a621a126a9ffe442ad8987ba02b46dae9 25-Jul-2011 Douglas Gregor <dgregor@apple.com> Added clang_getCursorReferenceNameRange to libclang to to retrieve parts of
a cursor reference, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135920 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
edc3dccece244a584f8ebdb81da6c962c08e79be 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename SourceManager::getInstantiationRange to getExpansionRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
402785357ab053dd53f4fdd858b9630a5e0f8bad 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Mechanically rename SourceManager::getInstantiationLoc and
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
eee3ef177a171c06f826c331e7a9e256d01eaeb0 24-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc: clang should warn if redeclaration of methods
declared in protocol in the class qualified by the
protocol have type conflicts. To reduce amount of
noise, this is done when class is implemented.
// rdar://9352731


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
ab4e83b904d81d8ab1f8c594655822a023cad87d 23-Jul-2011 Douglas Gregor <dgregor@apple.com> Extend libclang with clang_equalRanges, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135860 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2d3ba4f5a923a90c3fc290ddfba5e36c2d0a9b46 23-Jul-2011 Chris Lattner <sabre@nondot.org> Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon Mulder!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/LLVM.h
lang/Driver/Driver.h
lang/Frontend/Utils.h
lang/Lex/Preprocessor.h
d47d3b0cfeb7e8564ff77f48130fe63282b6d127 23-Jul-2011 Chris Lattner <sabre@nondot.org> clean up forward declarations of raw_ostream to use the new LLVM.h
patch by Jon Mulder!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
lang/Basic/SourceManager.h
lang/Lex/DirectoryLookup.h
lang/StaticAnalyzer/Core/CheckerProvider.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
46f72725b85649f284ab4ebfbb1883cd727538c1 23-Jul-2011 Anna Zaks <ganna@apple.com> Add ext_backslash_newline_eof to Wnewline-eof group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
cfe1bcb440ef2fde5e0df6e07a5abbeee089e6e7 23-Jul-2011 Anna Zaks <ganna@apple.com> Expose no newline at end of file warning under Wnewline-eof flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
832d620b4ae0fc5fe28561b885b4cfc65cf5c9ab 22-Jul-2011 Douglas Gregor <dgregor@apple.com> Switch all of the "isysroot" const char*'s throughout the AST reader
and writer to StringRef or std::string, as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
72a9ae18553bf8b6bdad84d2c54f73741a47e275 22-Jul-2011 Douglas Gregor <dgregor@apple.com> Rename ASTReader::PerFileData to serialization::Module, pulling it out
of ASTReader so it can become its own full-fledged class
(eventually). No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
7107d360db751aa974285ae2136aed76b6691b86 22-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Add a missing forward declaration and namespace qualifier to this
header. This showed up in client code that has a different include
ordering after Chris's shuffle of raw_ostream. All of the Clang code
ends up with a header included before this one that provides the needed
type and using declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
dc7c5ad7a15914b7ae24f31f18a20ad2f8ecd0bc 22-Jul-2011 John McCall <rjmccall@apple.com> Document the existing objc_precise_lifetime attribute.
Introduce and document a new objc_returns_inner_pointer
attribute, and consume it by performing a retain+autorelease
on message receivers when they're not immediately loaded from
an object with precise lifetime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
8f1231b70c2b1f6fe0cee097b447487b26810301 22-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce a global bit-offset continuous range map into the ASTReader,
so that we have one, simple way to map from global bit offsets to
local bit offsets. Eliminates a number of loops over the chain, and
generalizes for more interesting bit remappings.

Also, as an amusing oddity, we were computing global bit offsets
*backwards* for preprocessed entities (e.g., the directly included PCH
file in the chain would start at offset zero, rather than the original
PCH that occurs first in translation unit). Even more amusingly, it
made precompiled preambles work, because we were forgetting to adjust
the local bit offset to a global bit offset when storing preprocessed
entity offsets in the ASTUnit. Two wrongs made a right, and now
they're both right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
4947e25dd9f7ac1f2176d63262563ba3e96538fe 22-Jul-2011 Douglas Gregor <dgregor@apple.com> Fix an embarrassing bug in relocatable PCH support, where we were
passing a temporary const char* down as the "isysroot" parameter and
then accessing it later. Fixes <rdar://problem/9035180>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
db8264e4c5ffd7af6fbad4ca4306bd382bb02691 22-Jul-2011 Jordy Rose <jediknil@belkadan.com> Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.
This was previously not-const only because it has to lazily construct a chain
of ivars the first time it is called (and after the chain is invalidated).
In practice, all the clients were just const_casting their const Decls;
all those now-unnecessary const_casts have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135741 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
527eec86ce96695a7198073e574bf4a184848d24 22-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Any use of @synthesize or @dynamic lexically after a method (or C function) implementation
will be rejected with a compilation error in ARC mode, and a compiler warning otherwise.
This may cause breakage in non-arc (and arc) tests which don't expect warning/error. Feel free
to fix the tests, or reverse the patch, if I am unavailable. // rdar://9818354 - WIP


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
393f249399fe30e9580e1529a7479489e90f3a57 22-Jul-2011 Douglas Gregor <dgregor@apple.com> In the AST reader, factor out the mapping of local type IDs to global
type IDs into a single place, and make sure that all of the callers
use the appropriate functions to do the mapping. Since the mapping is
still the identity function, this is essentially a no-op.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
f5bb9ae23d68ffb1e1c37b05fc8d943bc6bff12e 22-Jul-2011 Douglas Gregor <dgregor@apple.com> Clean up the rest of the local -> global declaration ID mappings
within the ASTReader (I hope).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
409448c832d27703146b70a1137d86b020f29863 22-Jul-2011 Douglas Gregor <dgregor@apple.com> In the ASTReader, factor out the loading of (local) declaration IDs,
such that every declaration ID loaded from an AST file will go through
a central local -> global mapping function. At present, this change
does nothing, since the local -> global mapping function is the
identity function.

This is the mechanical part of the refactoring; a follow-up patch will
address a few remaining areas where it's not obvious whether we're
dealing with local or global IDs.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
428382c1ae2e867604ace65713345c9b6cd7e95e 21-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix diagnostic when loading a PCH which has different enabled/disabled state of -fobjc-arc. rdar://9818341

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
1da901467f72d1733704b068e22089813a1962fd 21-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Cleaning up more of the ID situation in the AST reader. This patch relaxes and generalizes how CXX base specifiers are identified and loaded by using a ContinuousRangeMap. This also adds a global bit offset (or base) to the PerFileData.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
23d7df5ce30f4a068e13ad6cb81d473365d260db 21-Jul-2011 Douglas Gregor <dgregor@apple.com> Add some debugging output to the AST reader, so we can see the global remappings we generate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
aab24a616de59c543d78d7636f22fb786053fefa 21-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc - Diagnose missing method return type specifier under
a warning flag. // rdar://9615045


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
1a23f12e1e283384b76e768a83f01bfcbbd61ca0 21-Jul-2011 Douglas Gregor <dgregor@apple.com> One last RandomAccessIterator operator for PreprocessingRecord::iterator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
67029567f7d39d9356fbc505fffc2c1e21bf06ce 21-Jul-2011 Douglas Gregor <dgregor@apple.com> Add the remaining RandomAccessIterator operations to
PreprocessingRecord::iterator. Where's concept_map when I need it?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
8d366c0e347ab600ac09e2ba9b676d12017a448a 21-Jul-2011 Francois Pichet <pichet2000@gmail.com> For some reason I don't fully comprehend, the MSVC debug build will fail with a huge 50+ lines template error message if PreprocessingRecord::iterator has no operator<()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
4fed22cdd8bb7d98127853ebb3f42be66bf2ce59 21-Jul-2011 Ted Kremenek <kremenek@apple.com> Move AnalysisManager constructor out of line. No functionality change (yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
bc5cb8a5fe2b88f917d47ceb58b53696a121e57e 21-Jul-2011 Ted Kremenek <kremenek@apple.com> Simplify passing of CFGBuildOptions around for AnalysisContext. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
5254161b269829b74e7a9379b1bdfa27de72d7cc 21-Jul-2011 Richard Trieu <rtrieu@google.com> Remove warning for conditional operands of differend signedness from -Wsign-compare. Cases that previously warn on this will have a different warning emitted from -Wsign-conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e081a61bb0dc546fd623bf259435d17c9a4ea0d5 21-Jul-2011 Douglas Gregor <dgregor@apple.com> New libclang API to expose container type for code completion, from
Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135651 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
4c30bb148b53c8063e940ca3e049ba4d270dc9d5 21-Jul-2011 Douglas Gregor <dgregor@apple.com> Rework the detailed preprocessing record to separate preprocessing
entities generated directly by the preprocessor from those loaded from
the external source (e.g., the ASTReader). By separating these two
sets of entities into different vectors, we allow both to grow
independently, and eliminate the need for preallocating all of the
loaded preprocessing entities. This is similar to the way the recent
SourceManager refactoring treats FileIDs and the source location
address space.

As part of this, switch over to building a continuous range map to
track preprocessing entities.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
lang/Serialization/ASTReader.h
ffe9edd45f26873d58e7ddf79d403dd8072b748b 21-Jul-2011 Anna Zaks <ganna@apple.com> Addressing code review comments for commit 135509 - Add FixItHints in case a C++ function call is missing * or & operators on

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Overload.h
e9b76c11a88d0af98f32d11a6668d03d45be3123 20-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Continuing to improve and generalize how IDs are handled in ASTReader. This patch cleans up and generalizes TypeID loading and uses a similar table-lookup to Doug's previous Decl patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
d7a3ba03f69892aac02e0771eb2e6d1b7b1d1267 20-Jul-2011 Chad Rosier <mcrosier@apple.com> Temporarily revert r135614 while I fix the cmake build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/Job.h
2da13b15959365df7edf1ed12a049b599b39c276 20-Jul-2011 Chad Rosier <mcrosier@apple.com> When the compiler crashes, the compiler driver now produces diagnostic information
including the fully preprocessed source file(s) and command line arguments. The
developer is asked to attach this diagnostic information to a bug report.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/Job.h
909bcb37c4bc1ea1a62d505881defc3c3ba0eca3 20-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> arc-objc++: Issue an arc specific diagnostic when overload resolution
fails because of lifetime differences of parameter and argument type.
// rdar://9790531


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9d102547dc44d064b40473a5a5166a8bb0dec99a 20-Jul-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r135574 (Jul 20th 2011)

Change-Id: Ib6cc2ba08a63e4cf8febc05fb6e3f2ca58f1d71d
5d8179106fc513a04458d49abe682151f75c8f6a 20-Jul-2011 Chris Lattner <sabre@nondot.org> arrayref should now move in here, and redundant #includes of <cassert> can go
away (since it comes in through Casting.h). This will have to wait for another
day when I'm unmotivated though, or someone else to pick it up :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LLVM.h
db999aad8a1b9dc265b2e627be334be6580a86a3 20-Jul-2011 Chris Lattner <sabre@nondot.org> remove some now-redundant forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExternalASTSource.h
lang/AST/NestedNameSpecifier.h
lang/AST/PrettyPrinter.h
lang/AST/TemplateBase.h
lang/Analysis/CFG.h
lang/Basic/SourceLocation.h
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/FrontendAction.h
lang/Index/ASTLocation.h
lang/Rewrite/FixItRewriter.h
lang/Rewrite/Rewriter.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Initialization.h
8cc488fefb2fb04bc8d5398da29f0182f97934cf 20-Jul-2011 Chris Lattner <sabre@nondot.org> add raw_ostream and Twine to LLVM.h, eliminating a ton of llvm:: qualifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/DeclarationName.h
lang/AST/Mangle.h
lang/AST/NestedNameSpecifier.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
lang/AST/TemplateBase.h
lang/AST/TemplateName.h
lang/Analysis/Analyses/FormatString.h
lang/Analysis/CFG.h
lang/Basic/LLVM.h
lang/Basic/MacroBuilder.h
lang/Basic/OnDiskHashTable.h
lang/Basic/PrettyStackTrace.h
lang/Basic/SourceLocation.h
lang/Basic/VersionTuple.h
lang/CodeGen/BackendUtil.h
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/OptTable.h
lang/Frontend/ASTConsumers.h
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendActions.h
lang/Frontend/LogDiagnosticPrinter.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/Utils.h
lang/Index/ASTLocation.h
lang/Index/CallGraph.h
lang/Parse/Parser.h
lang/Rewrite/ASTConsumers.h
lang/Rewrite/FixItRewriter.h
lang/Rewrite/Rewriter.h
lang/Rewrite/Rewriters.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Initialization.h
lang/Sema/Lookup.h
lang/Sema/PrettyDeclStackTrace.h
lang/Serialization/ASTWriter.h
lang/StaticAnalyzer/Core/CheckerProvider.h
lang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/Frontend/FrontendActions.h
686775deca8b8685eb90801495880e3abdd844c2 20-Jul-2011 Chris Lattner <sabre@nondot.org> now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/ARCMT.h
lang/ARCMigrate/ARCMTActions.h
lang/ARCMigrate/FileRemapper.h
lang/AST/ASTContext.h
lang/AST/ASTDiagnostic.h
lang/AST/ASTImporter.h
lang/AST/Attr.h
lang/AST/CXXInheritance.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/ExternalASTSource.h
lang/AST/Mangle.h
lang/AST/Stmt.h
lang/AST/TemplateBase.h
lang/AST/Type.h
lang/AST/UnresolvedSet.h
lang/Analysis/Analyses/FormatString.h
lang/Analysis/DomainSpecific/CocoaConventions.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Basic/Builtins.h
lang/Basic/DelayedCleanupPool.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LLVM.h
lang/Basic/PartialDiagnostic.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Basic/TargetInfo.h
lang/CodeGen/CodeGenAction.h
lang/Driver/Action.h
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/Driver.h
lang/Driver/Job.h
lang/Driver/Option.h
lang/Driver/Tool.h
lang/Driver/ToolChain.h
lang/Driver/Util.h
lang/Frontend/ASTUnit.h
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/LangStandard.h
lang/Frontend/LogDiagnosticPrinter.h
lang/Frontend/PreprocessorOptions.h
lang/Frontend/Utils.h
lang/Index/Entity.h
lang/Index/Handlers.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroInfo.h
lang/Lex/PPCallbacks.h
lang/Lex/PTHManager.h
lang/Lex/Pragma.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Parse/Parser.h
lang/Rewrite/FrontendActions.h
lang/Rewrite/Rewriter.h
lang/Sema/AttributeList.h
lang/Sema/CXXFieldCollector.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/DeclSpec.h
lang/Sema/DelayedDiagnostic.h
lang/Sema/Designator.h
lang/Sema/ExternalSemaSource.h
lang/Sema/IdentifierResolver.h
lang/Sema/Initialization.h
lang/Sema/Overload.h
lang/Sema/Ownership.h
lang/Sema/Scope.h
lang/Sema/ScopeInfo.h
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Sema/TemplateDeduction.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/Serialization/ChainedIncludesSource.h
lang/Serialization/ContinuousRangeMap.h
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/BugType.h
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/Environment.h
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Frontend/FrontendActions.h
9594675cc1eb52a054de13c4a21e466643847480 20-Jul-2011 Chris Lattner <sabre@nondot.org> introduce a centralized place to introduce and inject llvm types into the
clang namespace. There are a number of LLVM types that are used pervasively
and it doesn't make sense to keep qualifying them. Start with casting
operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Stmt.h
lang/AST/Type.h
lang/Basic/LLVM.h
lang/Driver/Action.h
lang/Driver/Job.h
lang/Driver/Option.h
14ad03b6f4350f062256757efc4149a7df94bdf9 20-Jul-2011 Douglas Gregor <dgregor@apple.com> Use a ContinuousRangeMap to map from the global macro definition ID in
the AST reader down to the AST file + local ID, rather than walking
the PCH chain. More cleanup/generalization, although there is more
work to do for preprocessed entities. In particular, the
"preallocation" scheme for preprocessed entities is not going to work
well with late loading of PCH files, and it's likely we'll have to do
something akin to the SourceManager's negative/positive loading.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
96958cbe6fb423ab2446629ead5f1b138398433c 20-Jul-2011 Douglas Gregor <dgregor@apple.com> Use a ContinuousRangeMap to map from the global selector ID in the AST
reader down to the AST file + local ID, rather than walking the PCH
chain. No functionality change; this is generalization and cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
67268d02388d3d25107fa9cf4998c35246255a65 20-Jul-2011 Douglas Gregor <dgregor@apple.com> Use a ContinuousRangeMap to map from the global identifier ID in the
AST reader down to the AST file + local ID, rather than walking the
PCH chain. No functionality change; this is generalization and cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
07e5f1a7047f82da14c3223d14435bee4e763369 20-Jul-2011 Douglas Gregor <dgregor@apple.com> Try to appease MSVC's standard library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ContinuousRangeMap.h
96e973f2be14c9b82136f74b4108465d24894fea 20-Jul-2011 Douglas Gregor <dgregor@apple.com> Use a ContinuousRangeMap to map from the global declaration ID in the
AST reader down to the AST file + local ID within that file, rather
than lamely walking the PCH chain. There's no actual functionality
change now, but this is cleaner and more general.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
0ff6f8f038f32d85c32fd984673cea51ef737b22 20-Jul-2011 Richard Smith <richard-llvm@metafoo.co.uk> Replace r134583's fix for PR10290 with one which also works for non-value-dependent cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
51e11f743e7478e94218b3c28283454dae1c6533 20-Jul-2011 Richard Smith <richard-llvm@metafoo.co.uk> Use the zero from the correct enumeration when initializing this variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
b89fe6b04c5b8a2d080c1c5605b72f809fc9ee68 19-Jul-2011 Anna Zaks <ganna@apple.com> Add FixItHints in case a C++ function call is missing * or & operators on one/several of it's parameters (addresses http://llvm.org/PR5941).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Overload.h
7ee2049278b98d42709380054eb83f4952af1200 19-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Add some additional driver flags to optionally emit or save the pre-migration ARC errors.

-arcmt-migrate-emit-errors : Emits the pre-migration ARC errors but it doesn't affect anything else
-arcmt-migrate-report-output : Writes out the pre-migration ARC errors to the provided plist file

rdar://9791454

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/ARCMT.h
lang/ARCMigrate/ARCMTActions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/FrontendOptions.h
d6dbb8759a05ab32db67f089c1f5d3f53091e9ed 19-Jul-2011 Jeffrey Yasskin <jyasskin@google.com> Name the "c++0x-compat" warning group, and fix the names of two
warnings that were intended to be inside it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
f62d43d2afe1960755a1b5813cae1e5983bcac1b 19-Jul-2011 Douglas Gregor <dgregor@apple.com> Revamp the SourceManager to separate the representation of parsed
source locations from source locations loaded from an AST/PCH file.

Previously, loading an AST/PCH file involved carefully pre-allocating
space at the beginning of the source manager for the source locations
and FileIDs that correspond to the prefix, and then appending the
source locations/FileIDs used for parsing the remaining translation
unit. This design forced us into loading PCH files early, as a prefix,
whic has become a rather significant limitation.

This patch splits the SourceManager space into two parts: for source
location "addresses", the lower values (growing upward) are used to
describe parsed code, while upper values (growing downward) are used
for source locations loaded from AST/PCH files. Similarly, positive
FileIDs are used to describe parsed code while negative FileIDs are
used to file/macro locations loaded from AST/PCH files. As a result,
we can load PCH/AST files even during parsing, making various
improvemnts in the future possible, e.g., teaching #include <foo.h> to
look for and load <foo.h.gch> if it happens to be already available.

This patch was originally written by Sebastian Redl, then brought
forward to the modern age by Jonathan Turner, and finally
polished/finished by me to be committed.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ContinuousRangeMap.h
74fb1a493cf5d2dd0fb51a4eadf74e85e10a3457 19-Jul-2011 Ted Kremenek <kremenek@apple.com> Add hooks into the CFG builder to force that specific expressions are always CFGElements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
5b106a872d66f57522b1cc6d1b67f93704409114 18-Jul-2011 Jeffrey Yasskin <jyasskin@google.com> Define DiagnosticBuilder<<APValue so it's easy to include APValues in
diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
dce67a70a86db8758c926a76fdd980f5369d5746 18-Jul-2011 Nick Lewycky <nicholas@mxc.ca> In C99, emit an inline function when encountering an extern redeclaration.
Fixes PR10233!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
99d3594a56fb8e6900611ede7330aae61e924ec4 17-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r135359 at Sun. 17th July 2011.
0556048ae8ff743d0abb9fa88a0d0ee8e9123742 16-Jul-2011 Ted Kremenek <kremenek@apple.com> [analyzer] Place checking for Core Foundation "Create" rule into a proper API. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
174cba922331b896949d02d8b1a05f1998ed98e1 16-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r135344 at Sat. 16th July 2011.
e2f854ddd365e6837cef3e1a1b7621b32200fc71 16-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r135304 and apply fix in clang_getCanonicalCursor per Doug's, Fariborz's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ba6ffaf21e465c0926d7fc5fa294ea52f8d45faf 15-Jul-2011 Douglas Gregor <dgregor@apple.com> Augment the interface of ExternalASTSource::FindExternalLexicalDecls()
to allow clients to specify that they've already (correctly) loaded
declarations, and that no further action is needed.

Also, make sure that we clear the "has external lexical declarations"
bit before calling FindExternalLexicalDecls(), to avoid infinite
recursion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Serialization/ASTReader.h
lang/Serialization/ChainedIncludesSource.h
cea2e3d7ea9cdc763f7a98937c09769cd4d1f582 15-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> The canonical decl for an ObjCImplDecl is it's interface class. Fixes rdar://8728637.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5b8968cc599eb6100bb73ae87be9d6cd2577ac9e 15-Jul-2011 Douglas Gregor <dgregor@apple.com> Store bracket locations for array subscript expressions, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f70d12dbd49fcc25f1dfc0127217112ae76bcb8f 15-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Move the Serialization library from 'instantiation' to 'expansion', with
the exception of its uses of SourceManager and SourceLocation APIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTWriter.h
7110fd6c32306b3feb97b9edb8064b1b68a54e6b 15-Jul-2011 John McCall <rjmccall@apple.com> Add serialization support for SubstNonTypeTemplateParmExpr.
Also add the missing serialization support for SEHTryStmt,
SEHFinallyStmt, and SEHExceptStmt, and fix and finish the
serialization support for AsTypeExpr. In addition, change
the code so that it will no longer link if a Stmt subclass
is missing serialization support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/Serialization/ASTBitCodes.h
379010addb0e84fd0fbc37c829baf658958521bd 15-Jul-2011 John McCall <rjmccall@apple.com> Fix the definition of AsTypeExpr. I'm still not sure this
is right --- shouldn't there be a TypeLoc in here somewhere? ---
but at least it doesn't have a redundant QualType and a broken
children() method.

Noticed this while doing things in serialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
91a5755ad73c5dc1dfb167e448fdd74e75a6df56 15-Jul-2011 John McCall <rjmccall@apple.com> Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
165622faa4a472ff94352dee534e2adeaac9c824 15-Jul-2011 Ted Kremenek <kremenek@apple.com> Add 'Contains()' method to GRStateTrait for ImmutableList. Patch by Rui Paulo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h
b29a6108b164b183d32d8c14bf5b7492a483c7c9 15-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Switch help text in the CC1 driver from 'instantiation' to 'expansion'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
3b80232b50c29b245e674f5aa02047b408e41018 14-Jul-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Remove InitializationSequence::ReferenceBinding, the last redundant sequence kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
4d461b691a57544340bf511bd662001fd2d1da1a 14-Jul-2011 Caitlin Sadowski <supertri@google.com> Moving one misplaced entry in the attribute enum in AttributeList.h into alphabetical order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AttributeList.h
9f79a1f89695a79d5e29a72c28ffb59823b31cef 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Update the remaining comments in Frontend to 'expansion'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
lang/Frontend/PreprocessorOptions.h
fd14e91dc0ac5db175c4b30af98e7f8adabcb508 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Clean up some comments I missed when switching from
NestedMacroInstantiations -> NestedMacroExpansions.

With this change, libclang should be completely converted except for
uses of SourceManger and SourceLocation APIs, and the C bindings for
those APIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135149 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ba7537febdf1bc1cc617e1f1746f2644feba6274 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> NestedMacroInstantiations -> NestedMacroExpansions

This is switches all the interfaces points (and most of the commenst
/ local variables I saw on my way through) regarding the
NestedMacroInstantiations bit.

The libclang enums corresponding to this state were renamed, but
a legacy enum was added with the old name, and the same value to keep
existing clients working. I've added a documentation blurb for it, but
let me know if there is a canonical way to document legacy elemenst of
the libclang interface.

No functionality changed here, even in tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135141 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
9b2a0ac970a077bdc0bf08c6c682f80ad733c892 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Update all of the libclang code corresponding to the preprocessor
MacroInstantiation -> MacroExpansion rename. Internally, everything is
switched.

Introduce a new cursor kind enum with the new name, but retain the old
name as an alias so that we don't break backwards compatibility.

Also update the debug printing routine to use 'macro expansions' as its
explicitly not guaranteed to be stable, and mechanically switch the test
cases over to that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135140 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9e5bb85ac899eeab7c21b5ff9030c3da6ff4837b 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Move the rest of the preprocessor terminology from 'instantiate' and
variants to 'expand'. This changed a couple of public APIs, including
one public type "MacroInstantiation" which is now "MacroExpansion". The
rest of the codebase was updated to reflect this, especially the
libclang code. Two of the C++ (and thus easily changed) libclang APIs
were updated as well because they pertained directly to the old
MacroInstantiation class.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
433db06b614f26dc6829e86d6ff469e2cca7d4f9 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Convert terminology in the Lexer from 'instantiate' and variants to
'expand'. Also update the public API it provides to the new term, and
propagate that update to the various clients.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
d0f5e443ceed37e1a72015bd109db8e5fc6206cf 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Switch the TokenLexer's terminology from various forms of 'instantiate'
to 'expand' for macros. Only comments and uses local to the TokenLexer
are updated.

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenLexer.h
90ebed0734fac9b464c9bdff53fbf85a86b27f32 13-Jul-2011 Douglas Gregor <dgregor@apple.com> Add 'mutable' to the function declarator chunk, to be used when
parsing lambda expressions, from John Freeman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
48218c60d6b53b7880917d1366ee716dec2145ca 13-Jul-2011 John McCall <rjmccall@apple.com> In debugger mode, make ObjC message sends to unknown selectors return
__unknown_anytype, and rewrite such message sends correctly.

I had to bite the bullet and actually add a debugger support mode for this
one, which is a bit unfortunate, but there really isn't anything else
I could imagine doing; this is clearly just debugger-specific behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
c286f3835eb6001c61664cef5d610dfaf80a6e9b 13-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc++: Some level of covariance is allowed in ObjC properties.
Make it also available in ObjC++ propeties. // rdar://9740328


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bb52786da8d055568eef6e5694288c1258bc8c2a 12-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Implement -MG. Fixes PR9613

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Driver/CC1Options.td
lang/Frontend/DependencyOutputOptions.h
98a5403ecf1d2b60ae8cbf43e54194bd762cacaa 12-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> Fix a bug where a local variable named 'self' is causing
implicit ivar accesses to go through the 'self' variable
rather than the real 'self' for the method. // rdar://9730771


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
f1588660c109610e6a79c786b83b7c9bbd6ed31e 12-Jul-2011 Douglas Gregor <dgregor@apple.com> Improve name mangling for instantiation-dependent types that are not
dependent. This covers an odd class of types such as

int (&)[sizeof(sizeof(T() + T()))];

which involve template parameters but, because of some trick typically
involving a form of expression that is never type-dependent, resolve
down to a non-dependent type. Such types need to be mangled
essentially as they were written in the source code (involving
template parameters), rather than via their canonical type.

In general, instantiation-dependent types should be mangled as
they were written in the source. However, since we can't do that now
without non-trivial refactoring of the AST (see the new FIXME), I've
gone for this partial solution: only use the as-written-in-the-source
mangling for these strange types that are instantiation-dependent but
not dependent. This provides better compatibility with previous
incarnations of Clang and with GCC. In the future, we'd like to get
this right.

Fixes <rdar://problem/9663282>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6af9f3ca25157379efd5c1caad82e9d01c17b9ff 12-Jul-2011 Douglas Gregor <dgregor@apple.com> Fix the desugaring of dependent decltype and typeof(expr) nodes. The
isSugared() and desugar() routines previously provided were never
actually called, since the corresponding types
(DependentTypeOfExprType, DependentDecltypeType) don't have
corresponding type classes. Outside of the current (incomplete) patch
I'm working on, I haven't found a way to trigger this problem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9f3480bab8fcb6547978f8ad9e2b8f468e3658ee 12-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move OBJC_PR_NumBits out of PropertyAttributeKind enum, to its own NumPropertyAttrsBits.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
79e6bd379773447a74cc3e579d9081e4c5cb6d63 12-Jul-2011 Douglas Gregor <dgregor@apple.com> Centralize the getCanonicalType() calls in the Itanium C++ mangling
code so that they only occur in a single place. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Sema/Sema.h
0a68dc7f04be1542ce249ff4adb169453698ad91 12-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [ARC] Complain about property without storage attribute when @synthesizing it, not at its declaration.

For this sample:

@interface Foo
@property id x;
@end

we get:

t.m:2:1: error: ARC forbids properties of Objective-C objects with unspecified storage attribute
@property id x;
^
1 error generated.

The error should be imposed on the implementor of the interface, not the user. If the user uses
a header of a non-ARC library whose source code he does not have, we are basically asking him to
go change the header of the library (bad in general), possible overriding how the property is
implemented if he gets confused and says "Oh I'll just add 'copy' then" (even worse).

Second issue is that we don't emit any error for 'readonly' properties, e.g:

@interface Foo
@property (readonly) id x; // no error here
@end

@implementation Foo
@synthesize x; // no error here too
@end

We should give an error when the implementor is @synthesizing a property which doesn't have
any storage specifier; this is when the explicit specifier is important, because we are
going to create an ivar and we want its ownership to be explicit.

Related improvements:
-OBJC_PR_unsafe_unretained turned out to not fit in ObjCPropertyDecl's bitfields, fix it.
-For properties of extension classes don't drop PropertyAttributesAsWritten values.
-Have PropertyAttributesAsWritten actually only reflect what the user wrote

rdar://9756610.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
46d37c10404097eed7c173b17e52693edcb66486 11-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Add diagnostic for constructs like "va_arg(l, float)" which have undefined behavior. PR10201.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
97c337c2bdf3ec53073c7e7dd656aa0dd37ee409 11-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Move the remapping functions to clang-c/Index.h and change 'arcmt_' prefix to 'clang_'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134916 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/ARCMigrate.h
lang-c/Index.h
4e7c7f2b78ac3930e45f00626ef6acf08b3f80ca 11-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Diagnose when captured variable in block literals
require destruction and there is possibility of that without
construction. Thanks Johnm for review and suggestions offline.
// rdar://9535237.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0673cb30340aadaede7b795c763b00f6b64e611c 11-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Apply patch from Richard Trieu to fix PR9548:

When two different types has the same text representation in the same
diagnostic message, print an a.k.a. after the type if the a.k.a. gives extra
information about the type.

class versa_string;

typedef versa_string string;

namespace std {template <typename T> class vector;}

using std::vector;

void f(vector<string> v);

namespace std {
class basic_string;
typedef basic_string string;
template <typename T> class vector {};
void g() {
vector<string> v;
f(v);
}
}

Old message:
----------------
test.cc:15:3: error: no matching function for call to 'f'
f(&v);
^
test.cc:7:6: note: candidate function not viable: no known conversion from
'vector<string>' to 'vector<string>' for 1st argument
void f(vector<string> v);
^
1 error generated.

New message:
---------------
test.cc:15:3: error: no matching function for call to 'f'
f(v);
^
test.cc:7:6: note: candidate function not viable: no known conversion from
'vector<string>' (aka 'std::vector<std::basic_string>') to
'vector<string>' (aka 'std::vector<versa_string>') for 1st argument
void f(vector<string> v);
^
1 error generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Basic/Diagnostic.h
386b0075d02837cba066d299adb0bbc6c3ebd2ee 11-Jul-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Added removeBitWidth method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
699f9b1effc8fd891637797ef3dc58d7b80d476a 10-Jul-2011 Francois Pichet <pichet2000@gmail.com> Change __debugbreak signature to void __debugbreak(void); MSVC compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
69325d5b7cfecf1b3128745efc33612aedf1b8b4 09-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.

This is a new mode of migration, where we avoid modifying the original files but
we emit temporary files instead.

<path> will be used to keep migration process metadata. Currently the temporary files
that are produced are put in the system's temp directory but we can put them
in the <path> if is necessary.

Also introduce new ARC migration functions in libclang whose only purpose,
currently, is to accept <path> and provide pairs of original file/transformed file
to map from the originals to the files after transformations are applied.

Finally introduce the c-arcmt-test utility that exercises the new libclang functions,
update arcmt-test, and add tests for the whole process.

rdar://9735086.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134844 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/ARCMigrate.h
lang/ARCMigrate/ARCMT.h
lang/ARCMigrate/ARCMTActions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/FrontendOptions.h
094240ab184c3ca4b94e9d7eac80fcd34d8dd30c 08-Jul-2011 Cameron Zwarich <zwarich@apple.com> Add codegen support for the fma/fmal/fmaf builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
82007c3a3f60ce2299c74333a881e4fdfc2135ce 08-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc++-arc: more diagnosis of converting a weak-unavailable
object to a __weak object type. // rdar://9732636


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c8d1ecca1cd3fadbd331d15c420755aa6184554b 08-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Keep track of which source locations are part of a macro argument
instantiation and improve diagnostics which are stem from macro
arguments to trace the argument itself back through the layers of macro
expansion.

This requires some tricky handling of the source locations, as the
argument appears to be expanded in the opposite direction from the
surrounding macro. This patch provides helper routines that encapsulate
the logic and explain the reasoning behind how we step through macros
during diagnostic printing.

This fixes the rest of the test cases originially in PR9279, and later
split out into PR10214 and PR10215.

There is still some more work we can do here to improve the macro
backtrace, but those will follow as separate patches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134660 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
7a084ec568f8336ec6f10011d0118a6b19e253cb 08-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc++-arc: diagnose assignment/cast of a weak-unavailable
object to a __weak object/type. // rdar://9732636.
One item is yet todo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3bd21383f0d788e49af71c5d25255197ddb8a59b 08-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Remove BoostCon-specific code from Clang. FWIW, I'm a fan of things like this living in a separate branch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
7a759606d93975866051f67104ae58446e55f404 07-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move SourceManager::isAt[Start/End]OfMacroInstantiation functions to the Lexer, since they depend on it now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
dbd3c85825ad59896292ac7d326fe1985768f1e3 07-Jul-2011 Cameron Zwarich <zwarich@apple.com> r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,
so roll it out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2357aeec0da2740838963880edd97e43f14cb6fd 07-Jul-2011 Nick Lewycky <nicholas@mxc.ca> A redeclaration of an inline method in C99 mode should trigger emission of that
function. Fixes PR10233!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c5f90c2250f20037e604e849044442d70573507e 07-Jul-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Undo r134587 as the bug was actually a deep and hideous one in the
client code.

My bad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
04e5a2509d1eed48cc0c7115c52089bef35b36af 07-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: diagnose assignment/cast of a weak-unavailable
object to a __weak object/type. // rdar://9732636.
This is objc side of things. objc++ side tbd.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
3da626b4f38eb0350de960d71271ca77af7a9cc8 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang aPI function,
clang_codeCompleteGetContexts(), that provides the client with
information about the context in which code completion has occurred
and what kinds of entities make sense as completions at that
point. Patch by Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134615 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
7e5e5f4cc36fe50f46ad76dca7a266434c94f475 07-Jul-2011 John McCall <rjmccall@apple.com> In ARC, reclaim all return values of retainable type, not just those
where we have an immediate need of a retained value.

As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.

rdar://problem/9504800



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/AST/Stmt.h
72ac120023abb73f3ff9386e193fed55fa9a96e2 07-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Add -ccc-arcmt-check/-ccc-arcmt-modify driver option aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b73377eeb3eff76be134203aebb6068244b177f3 07-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make the Preprocessor more memory efficient and improve macro instantiation diagnostics.

When a macro instantiation occurs, reserve a SLocEntry chunk with length the
full length of the macro definition source. Set the spelling location of this chunk
to point to the start of the macro definition and any tokens that are lexed directly
from the macro definition will get a location from this chunk with the appropriate offset.

For any tokens that come from argument expansion, '##' paste operator, etc. have their
instantiation location point at the appropriate place in the instantiated macro definition
(the argument identifier and the '##' token respectively).
This improves macro instantiation diagnostics:

Before:

t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int')
int y = M(/);
^~~~
t.c:5:11: note: instantiated from:
int y = M(/);
^

After:

t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int')
int y = M(/);
^~~~
t.c:3:20: note: instantiated from:
\#define M(op) (foo op 3);
~~~ ^ ~
t.c:5:11: note: instantiated from:
int y = M(/);
^

The memory savings for a candidate boost library that abuses the preprocessor are:

- 32% less SLocEntries (37M -> 25M)
- 30% reduction in PCH file size (900M -> 635M)
- 50% reduction in memory usage for the SLocEntry table (1.6G -> 800M)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/MacroInfo.h
lang/Lex/TokenLexer.h
8b86ef0b71900c64c0c2cfca54cac08a203a16a4 07-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix bug in SourceManager::getDecomposedInstantiationLocSlowCase.

It would add up relative (decomposed) offsets like in getDecomposedSpellingLocSlowCase, but while
it makes sense to preserve the offset among lexed spelling locations, it doesn't make
sense to add anything to the offset of the instantiation location. The instantiation
location will be the same regardless of the relative offset in the tokens that were
instantiated.

This bug didn't actually affect anything because, currently, in practice we never create macro
locations with relative offset greater than 0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
e9a37e45e2832869e3814b9e3ddeae13e0f4386a 07-Jul-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Ensure that we actually visit function parameter declarations with
RecursiveASTVisitor.

This deficiency was discovered while working with the AST matcher
framework and likely impacts other users of RecursiveASTMatcher who
previously weren't seeing these Decls in their visitation.

Patch reviewed by Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
bca01b46850f867b2f4137f25c882022b58f8471 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Properly implement the scope restriction on the NRVO for
throw-expressions, such that we don't consider the NRVO when the
non-volatile automatic object comes from outside the innermost try
scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were
incorrect but it didn't matter because IR generation doesn't actually
apply the NRVO here. In C++0x, however, we were moving from an object
when in fact we should have copied from it. Fixes PR10142 /
<rdar://problem/9714312>.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Parse/Parser.h
lang/Sema/Scope.h
lang/Sema/Sema.h
7263feeb367ab55af7e9a6fd701148b1b8264dba 06-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> Some code cleanup of r134522


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
742352a3984aeef9ecf911be23e673e97b34595f 06-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Support objc_arc_weak_unavailable on those
classes which are incompatible with weak references.
// rdar://9693477


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
85bea9777d444ccbcc086d98f075fe666c2e865d 06-Jul-2011 Douglas Gregor <dgregor@apple.com> Keep track of when "unrecoverable" errors occur, then allow
clang_saveTranslationUnit() to save a PCH file if the only errors it
contains are recoverable errors. Fixes <rdar://problem/9727804>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
39c411fa229b2a6747b92f945d1702ee674d3470 06-Jul-2011 Douglas Gregor <dgregor@apple.com> libclang: Allow callers of clang_saveTranslationUnit() to distinguish
between different classes of errors. Addresses most of
<rdar://problem/9660328>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134495 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
5d98994c7749312a43ce6adf45537979a98e7afd 06-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Build up statistics about the work done for analysis based warnings.
Special detail is added for uninitialized variable analysis as this has
serious performance problems than need to be tracked.

Computing some of this data is expensive, for example walking the CFG to
determine its size. To avoid doing that unless the stats data is going
to be used, we thread a bit into the Sema object to track whether
detailed stats should be collected or not. This bit is used to avoid
computations whereever the computations are likely to be more expensive
than checking the state of the flag. Thus, counters are in some cases
unconditionally updated, but the more expensive (and less frequent)
aggregation steps are skipped.

With this patch, we're able to see that for 'gcc.c':
*** Analysis Based Warnings Stats:
232 functions analyzed (0 w/o CFGs).
7151 CFG blocks built.
30 average CFG blocks per function.
1167 max CFG blocks per function.
163 functions analyzed for uninitialiazed variables
640 variables analyzed.
3 average variables per function.
94 max variables per function.
96409 block visits.
591 average block visits per function.
61546 max block visits per function.

And for the reduced testcase in PR10183:
*** Analysis Based Warnings Stats:
98 functions analyzed (0 w/o CFGs).
8526 CFG blocks built.
87 average CFG blocks per function.
7277 max CFG blocks per function.
68 functions analyzed for uninitialiazed variables
1359 variables analyzed.
19 average variables per function.
1196 max variables per function.
2540494 block visits.
37360 average block visits per function.
2536495 max block visits per function.

That last number is the somewhat scary one that indicates the problem in
PR10183.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/AnalysisContext.h
lang/Sema/AnalysisBasedWarnings.h
lang/Sema/Sema.h
786dcd9dca76e3780fdb9642c0db33ed13db1187 06-Jul-2011 Douglas Gregor <dgregor@apple.com> Teach the static analyzer's interpretation of Cocoa conventions to
obey the objc_method_family attribute when provided. Fixes
<rdar://problem/9726279>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
19f74acdf8842ceece578b7307884f5ba22d7f59 06-Jul-2011 Rafael Espindola <rafael.espindola@gmail.com> Use attributes from the definition (if available) when
instantiating functions.

Fixes PR10272.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
9dc71d2fddcd283e07d45f3894c8559e2f7dd9a7 06-Jul-2011 John McCall <rjmccall@apple.com> Fixed enum types can be complete without actually being valid to use
as scope specifiers; diagnose the attempt, rather than letting it go
to an assert. The rest of PR10264.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/Sema/DeclSpec.h
8be80e1e6effd5a333bc70e7f030dc9397d0554e 06-Jul-2011 Douglas Gregor <dgregor@apple.com> Improve the Python bindings for libclang in a few ways, from Eli
Bendersky. Specifically:

* Implemented a new function in libclang: clang_isAttribute

* Fixing TranslationUnit.get_includes to only go through the argument
* buffer when it contains something. This fixed a crash on Windows

* clang_getFileName returns CXString, not char*. Made appropriate
* fixes in cindex.py - now the relevant tests pass and we can see the
* full locations correctly again (previously there was garbage in
* place of the file name)
* Exposed clang_getCursorDisplayName to the python bindings



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134460 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
256a76e0b0e0c9e65a3122917d553ef10bc84d29 06-Jul-2011 John McCall <rjmccall@apple.com> Call objc_terminate() instead of abort() when a cleanup throws an
exception in Objective-C; in Objective-C++ we still use std::terminate().
This is only available in very recent runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/ObjCRuntime.h
lang/Frontend/CodeGenOptions.h
c06e0743431b28c96e0bbe27cc07851d2e0d2681 06-Jul-2011 John McCall <rjmccall@apple.com> Missing header from last commit; accidental change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ObjCRuntime.h
9f084a3166b684573ba49df28fc5792bc37d92e1 06-Jul-2011 John McCall <rjmccall@apple.com> Change the driver's logic about Objective-C runtimes: abstract out a
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.

The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
lang/Frontend/CodeGenOptions.h
9670e179a67d868e171feac44fb8f9e2f108c5e8 06-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: enforce performSelector rules in rejecting retaining selectors
passed to it, and unknown selectors causing potential leak.
// rdar://9659270


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/IdentifierTable.h
b18b8ad63061c23daf4d95b022764027739691d8 06-Jul-2011 Dan Gohman <gohman@apple.com> Add the ObjC ARC optimization passes manually, now that they're not
hardwired into the default pass list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/BackendUtil.h
e7e66f72221d6233bdad3b87a717e7382acd477b 05-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Remove unused member of Builtin::Info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
c261c76812a256c98cf3309c92f77e7ce1e8848b 05-Jul-2011 Douglas Gregor <dgregor@apple.com> Some documentation fixes for the parser, from John Freeman

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bcf6a8025aa50f3f28cfbd0470cf3e8f5cffbab2 05-Jul-2011 Douglas Gregor <dgregor@apple.com> StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
3fd1ba0fa133d1c6e641770d0bc56606587d3eef 05-Jul-2011 Douglas Gregor <dgregor@apple.com> Clean up and refactor ParseFunctionDeclarator to reduce code
repetition and better reflect the actual grammar, from John Freeman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3242ee01d43c6b6f5db968cd2c82e5d18d71283c 04-Jul-2011 Anders Carlsson <andersca@mac.com> Remove unused parameter from ActOnDeclarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3c54415a4e1db09b210a466469c72d2582ce1d83 02-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r134305 at Sat. 2nd July 2011.
377fde82248fc0162d04f72c26485303f3058ff1 02-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Reorganize builtins to separate out builtins which require MMX registers. No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
05d4876a64865e34366b58fc8a6848c3cde895d9 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix the warning that is emitted when an ownership attribute is applied incorrectly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0a85183be6930571f3af8e5a976d24c3f95e5b25 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [ARC] When casting from a pointer to an objective-c object with known ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:

id x;
(NSString**)&x; // Casting as (__strong NSString**).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
707f101d3302b76ee01e8ca29b1a61f081137b9f 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Remove Sema::ActOnCastOfParenListExpr and move most of its functionality to
newly introduced Sema::BuildVectorLiteral.
-Make Sema::ActOnCastExpr handle a vector initializer both when the cast'ed expression
is a ParenListExpr and when it is a ParenExpr.
-Ultimately make Sema::ActOnParenOrParenListExpr independent of what the cast type was.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
31862ba5ea70b1f2c81d03f8a0100b61cd6f06f6 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [ARC] When casting from a pointer to an objective-c object with known ownership, if the
cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type
to the cast type:

id x;
static_cast<NSString**>(&x); // Casting as (__strong NSString**).

This currently only works for C++ named casts, C casts to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Sema/Sema.h
17b6399f8461c5b7e1c6f367b0a0dde49f921240 02-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Declarator::ObjCCatchContext, this will result in correct error for 'auto' in obj-c catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
9864c7dc0232701b9cc6b3928a867c11c92564a5 02-Jul-2011 Douglas Gregor <dgregor@apple.com> Refactor AttributeList.h to use alphabetical order, from Caitlin Sadowski

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AttributeList.h
c89edf5aaa08683f4afcf61a7a1d183c08b76498 01-Jul-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix AST representations of alias-declarations which define tag types. Inside classes, the tag types need to have an associated access specifier, and inside function definitions, they need to be included in the declarations of the DeclStmt. These issues manifested as assertions during template instantiation, and also in a WIP constexpr patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
01b6e31a62e2265849f4388b9be6be0a5d13348d 01-Jul-2011 Douglas Gregor <dgregor@apple.com> When we create a precompiled preamble, don't copy the
CompilerInvocation on the stack, because other objects (e.g., the
CompilerInstance) maintain an intrusive reference-counted pointer to
the CompilerInvocation. This doesn't matter in the normal case,
because we take back the CompilerInvocation. However, during crash
recovery, this leads to us trying to free an object on the stack, and
hilarity ensues. Fixes <rdar://problem/9652540>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
561f81243f665cf2001caadc45df505f826b72d6 01-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce the notion of instantiation dependence into Clang's AST. A
type/expression/template argument/etc. is instantiation-dependent if
it somehow involves a template parameter, even if it doesn't meet the
requirements for the more common kinds of dependence (dependent type,
type-dependent expression, value-dependent expression).

When we see an instantiation-dependent type, we know we always need to
perform substitution into that instantiation-dependent type. This
keeps us from short-circuiting evaluation in places where we
shouldn't, and lets us properly implement C++0x [temp.type]p2.

In theory, this would also allow us to properly mangle
instantiation-dependent-but-not-dependent decltype types per the
Itanium C++ ABI, but we aren't quite there because we still mangle
based on the canonical type in cases like, e.g.,

template<unsigned> struct A { };
template<typename T>
void f(A<sizeof(sizeof(decltype(T() + T())))>) { }
template void f<int>(A<sizeof(sizeof(int))>);

and therefore get the wrong answer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/NestedNameSpecifier.h
lang/AST/Stmt.h
lang/AST/TemplateBase.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/Sema/LocInfoType.h
d57b7ff9bebc4c45f325fc1be6f238cfcd4c3732 30-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Replace an unreachable error path with an assert
(SourceManager::createFileID cannot return an invalid file ID).
Also update a comment to reflect this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a1a38741fdf676af3174ea6f465eb07da003e761 30-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
ca0d0d4a0d6ecd256d4bf8c1a0dc183a83119833 30-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Improve the wording of the warning when returning a value from
a constructor or destructor.

Patch by Hans Wennborg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
146060435c3efce95c95a092c7a1eb651cfb9ae0 30-Jun-2011 John McCall <rjmccall@apple.com> Preserve that a TemplateName was arrived at by substituting
for a template template parameter.

Uses to follow.

I've also made the uniquing of SubstTemplateTemplateParmPacks
use a ContextualFoldingSet as a minor space efficiency.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
lang/AST/Type.h
1901dce8b1e78d0bf7072cccab695bd58c7eec21 30-Jun-2011 John McCall <rjmccall@apple.com> Document and check tighter assumptions about the TemplateName of a
TemplateSpecializationType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5b3284a9275a27f5c4410e25eb8933be540601d6 30-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a caching mechanism for macro expanded tokens.

Previously macro expanded tokens were added to Preprocessor's bump allocator and never released,
even after the TokenLexer that were lexing them was finished, thus they were wasting memory.
A very "useful" boost library was causing clang to eat 1 GB just for the expanded macro tokens.

Introduce a special cache that works like a stack; a TokenLexer can add the macro expanded tokens
in the cache, and when it finishes, the tokens are removed from the end of the cache.

Now consumed memory by expanded tokens for that library is ~ 1.5 MB.

Part of rdar://9327049.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
c5c5e92ec53f7e6ac7ebbbf77c6d8e4b7d88daec 30-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Preprocessor::getTotalMemory() and use it in CIndex.cpp, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
5d9b6bf9de98a33427fc7a3beeca90a3002b4744 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Use existing -fcatch-undefined-behavior option,
replacing -freset-local-blocks. // rdar://9227352


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
95b135b5c677173a2f27e9b150843545abf0d97c 29-Jun-2011 David Chisnall <csdavec@swan.ac.uk> Make ARC support default to true. Please can we stop making Objective-C runtime features part of the platform description? This only makes sense for Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
1077e420b89c9541396135157f22a1eff6062edf 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Under a compiler flag, -freset-local-blocks,
wipe out stack blocks when they go out of scope.
// rdar://9227352


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
de31fd7eeebdc64fb043463e7f515dab8eccac8d 28-Jun-2011 Eric Christopher <echristo@apple.com> Split out logic for valid clobbers and valid inline asm registers.

Fixes rdar://9281377


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
d8bba9c15230d2b1b3893e272106aa79efc50251 28-Jun-2011 Douglas Gregor <dgregor@apple.com> Add support for C++ namespace-aware typo correction, e.g., correcting

vector<int>

to

std::vector<int>

Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.

Thanks Kaelyn!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
lang/Sema/Sema.h
lang/Sema/TypoCorrection.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
83068315f7d9ed7b82ec35c2c26702151d186a70 28-Jun-2011 Chris Lattner <sabre@nondot.org> Fix PR9279 - Macro expansion stack trace seriously broken with function-style macros, by not recursively printing notes for other 'instantiated from' notes.

This is a one line fix here:
+ // Don't print recursive instantiation notes from an instantiation note.
+ Loc = SM.getSpellingLoc(Loc);

While here, fix the testcase to be more precise (it got filecheck'ized
brutally), and fix EmitCaretDiagnostic to be private and to not pass down
the unused 'Level' argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
0b8c98f3ddf83adcb9e9d98b68ce38e970cdee73 28-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Declarator::CXXNewContext and remove 'AutoAllowedInTypeName' parameter
from Sema::GetTypeForDeclarator. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
d3880f8458bb6a03818ee01f758c32f945de3eaa 28-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Centralize all checks for a C++ tag definition inside a typename in
Sema::GetTypeForDeclarator and remove its 'OwnedDecl' out parameter.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
6326e05fe8c2ff92b65b4759a91e45fad5ef886f 28-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Provide fix-it for '.' <-> '->' for Objective-C ivar/property access.
// rdar://7811841


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
6ce51ee94bd300c5f30930d96436fd53e4ea89a7 28-Jun-2011 John McCall <rjmccall@apple.com> Don't factor in visibility for templates and template arguments
for explicit specializations with their own explicit visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
0c1c98c2375fe68fee0a6075905772e5290d4a28 27-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Cache the result of AttributeList::getKind(); it's relatively expensive to compute, and we query it frequently enough that it showed up in a profile.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AttributeList.h
37ac1ea86c11f0163e6f88af421fd50b81fb300d 27-Jun-2011 Bob Wilson <bob.wilson@apple.com> Minor grammatical fix for error message. Radar 9681093.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7e47e1e7e6a2b83d903c97129f27e92f584c3dc2 27-Jun-2011 Douglas Gregor <dgregor@apple.com> Reduce the size of the ExtInfo bitfield in FunctionType from 9 bits
down to 8 by restricting the maximum allowed regparm value to 6
(previously it was 7). I need the extra bit in Type to handle
instantiation-dependence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TargetInfo.h
6628969c3e3886b68d8a0051df7e222aa50ef118 27-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Cleanup a fixme by using a specific diagnostic for subscripting
a pointer to void.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
13b21be065e9feb0759303bd51b8e8653130f0fb 27-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Factor out (some of) the checking for invalid forms of pointer
arithmetic into a couple of common routines. Use these to make the
messages more consistent in the various contexts, especially in terms of
consistently diagnosing binary operators with invalid types on both the
left- and right-hand side. Also, improve the grammar and wording of the
messages some, handling both two pointers and two (different) types.

The wording of function pointer arithmetic diagnostics still strikes me
as poorly phrased, and I worry this makes them slightly more awkward if
more consistent. I'm hoping to fix that with a follow-on patch and test
case that will also make them more helpful when a typedef or template
type parameter makes the type completely opaque.

Suggestions on better wording are very welcome, thanks to Richard Smith
for some initial help on that front.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
555f57e3549fb5cc963a2ce38180c4f3643a6f95 25-Jun-2011 Douglas Gregor <dgregor@apple.com> When deciding how to parse "= something" as part of a member
declaration, determine whether the declaration will end up declaring a
function using semantic criteria (e.g., it will have function type)
rather than purely syntactic criteria (e.g., it has the form of a
function declarator). Fixes <rdar://problem/9670557>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
lang/Sema/LocInfoType.h
lang/Sema/Sema.h
831fb9622581fc3b777848e6b097a0cb23d124de 25-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc/mrc: Allow ns_returns_not_retained attribute on properties
to turn off warning on those properties which follow Cocoa naming
convention for retaining objects and yet they were not meant for
such purposes. Also, perform consistancy checking for declared
getters of such methods. // rdar://9636091



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
537c3461166ce074d05fb7c96ffa98ed54c9aaa0 25-Jun-2011 Bob Wilson <bob.wilson@apple.com> Revert "Shorten some ARM builtin names by removing unnecessary "neon" prefix."
Sorry, this was a bad idea. Within clang these builtins are in a separate
"ARM" namespace, but the actual builtin names should clearly distinguish tha
they are target specific.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
89f19e43730a2895cd81159d375c71c91872b8c2 24-Jun-2011 Bob Wilson <bob.wilson@apple.com> Shorten some ARM builtin names by removing unnecessary "neon" prefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f2050f21a1e2c640710776c6e7b37c8c3d96ecf3 24-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Give more descriptive diagnostics when
making unsafe assignment of a retainable
object, Per John's request.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
921c14322977253a60dcb171f45e468c95fe41f8 24-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Check on a variety of unsafe assignment of retained
objects. // rdar://9495837


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
f58de90e209eac7159a52e75dcd6e99b3a6311a6 24-Jun-2011 Bob Wilson <bob.wilson@apple.com> Fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
b8b0313e84700b5c6d597b3be4de41c97b7550f1 24-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename objc_lifetime -> objc_ownership, and modify diagnostics to talk about 'ownership', not 'lifetime'.

rdar://9477613.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
a81397323cc8475ef8243f938118a9c231fb18ff 24-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> When forming a cycle in objc's inheritance hierarchy,
diagnose it properly and don't throw clang into an
infinit loop. // rdar://9653341


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d028302b57ff14a495eaa220393ae40c14a583f4 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Improve on warning when objc pointer is used in
c++ catch in fragile abi - per Eli's request.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4c4cbe5794897442e7cd5a57932f6aa91b6dff55 23-Jun-2011 Douglas Gregor <dgregor@apple.com> Remove superfluous comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
8cf0f52037e0c4bf656953ae63a07e8156aeb5fb 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Move definition of template <typename T> void Decl::dropAttr
to its header to avoid an explicit instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
7f88c0133272129111ec32d7aa5eacf6e685c6fc 23-Jun-2011 Douglas Gregor <dgregor@apple.com> Bump Token::Kind from an unsigned char to an unsigned short, from Anton Lokhmotov

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
cf5abc7ba032bd35158e4d75b0bc92a482fc67e8 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Support for catching objc pointer objects in c++ catch-statement
in fragile abi mode and some other cleanups. // rdar://8940528



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
b9b4b789ebd28d6fde1c42de820b036ffaf95162 23-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Fix Sema::CheckVectorOperands so that it doesn't try to insert a cast expression into the LHS of a compound assignment. Fixes compound assignment of various "compatible" vector types, including NEON-vector and gcc-vector types.

<rdar://problem/9640356>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c3ca14d13741889a9b924d0ca32e818f07a9834a 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Remove multiple use of weak_import attribute on
same declaration. Templatize dropAttr for general use.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
3e66003c1f03bf734efbd0f8eea35784a2d78d66 23-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133721, Fri. 24th Jun.
8785d115ebaf1a850f5e581e4acd2dbfb2b843cb 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Remove weak_import attribute on new declaration.
// rdar://9538608


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1626601b00a1feccd6b7a3f54e2991f56b659192 23-Jun-2011 Dylan Noblesmith <nobled@dreamwidth.org> avoid using config.h in public headers

This is the only usage in clang's headers, and it's for a define
that only exists on CMake builds for the sake of the MSVC compiler,
so just use an ifdef instead.

Also add an include for config.h in a file that actually needs it,
and was picking it up by accident indirectly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
7062281f240ef9c4fb343614fb2406532307c4a5 23-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133678 at Thu. 23th Jun 2011.
2b1ad8b42bbbe00a1845e566f52f1941b8dbc725 23-Jun-2011 Douglas Gregor <dgregor@apple.com> Move all of Sema's member-access-related checking out of SemaExpr.cpp
and into a new file, SemaExprMember.cpp, bringing SemaExpr.cpp just
under 10,000 lines of code (ugh). No functionality change, although I
intend to do some refactoring of this code to address PR8368 at some
point in the "near" future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/Sema.h
572bbec2e0e23f684108e3a410a67c8c60ff9179 23-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow unavailable function calls inside unavailable functions in C++/ObjC++ as well. rdar://9660196

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
d543130a3009a350017e2e411ea43bb3e5459b96 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Issue warning if weak_import attribute is added to an already
declared variable and ignore it. // rdar://9538608


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9d96bce991048fd2337cf058ec6a6a722207cbf2 22-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Alloa catching Objective-C id's being thrown with C++ throw
in Darwin's fragile abi mode. // rdar://8940528


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0d9106fc97cde979a995e26b18bcd2643f8afb55 22-Jun-2011 Manuel Klimek <klimek@google.com> Changes ParenListExpr to always require a type.
Removes dead code found in the process.
Adds a test to verify that ParenListExprs do not have NULL types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c09ce1224dedc470fce9747e5936ff83cc6762eb 22-Jun-2011 Douglas Gregor <dgregor@apple.com> Copy diagnostic pragmas to the preprocessed output, from Richard Osborne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
5b27b6d1311fbcc26e7258f2f59f047af63fb0aa 22-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Put all ARC-related warnings into the "arc" diagnostic group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
d26fef0e80033eaee3a2c95c14eb2e91931d92fb 22-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change "cannot assign retained object.." warning to "assigning retained object.."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b4b7b5034bb8304ed03416635bf64c75c39889fc 22-Jun-2011 Douglas Gregor <dgregor@apple.com> Give MaterializeTemporaryExpr the exact type of the lvalue it binds
to, including cv-qualifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
45ba8a6ab70afd418d35d2502849fa11ff73ed1a 22-Jun-2011 Douglas Gregor <dgregor@apple.com> Fix typo in comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Specifiers.h
25a767651d14db87aa03dd5fe3e011d877dd4100 22-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DelayedCleanupPool useful for simplifying clean-up of certain resources that, while their
lifetime is well-known and restricted, cleaning them up manually is easy to miss and cause a leak.

Use it to plug the leaking of TemplateIdAnnotation objects. rdar://9634138.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DelayedCleanupPool.h
lang/Parse/Parser.h
0a17cae4e3dcccda0e930f9f55574c8f3bb5337c 22-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Extend the deleted overload candidate note to cover all cases. It
probably shouldn't cover the implicit member case, but it needs to until
more descriptive diagnostics are implemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
661c67a9227708056850403847a10395308705e5 22-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Attempt to reapply this patch for caching copy assignment operator
lookup. Previously, it was breaking self-host, but it's been a week and
a half and I can't reproduce, so I need to see if it's still failing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
57b9d9810d969df141a19dae8bea9defddb02264 21-Jun-2011 Bob Wilson <bob.wilson@apple.com> Fix a case that I missed in r133550.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
5dd45f13dc4463f0c18b923fe6795ce55103301d 21-Jun-2011 Bob Wilson <bob.wilson@apple.com> Make InitHeaderSearch::AddPath and HeaderSearchOptions::AddPath consistent
use an "IgnoreSysRoot" argument. HeaderSearchOptions had been using the
opposite form with "IsSysRootRelative", which made for much confusion when
looking at true/false values in calls in AddPath. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
13c4f2144b35bda21746eb60ad90e52a9bd8dcda 21-Jun-2011 Bob Wilson <bob.wilson@apple.com> Fix the default libc++ header search path to be sysrooted. Radar 9639692.

The -cxx-isystem path is not prefixed with the sysroot directory, so it's
not a good way for the driver to set the system default C++ search path.
Instead, add -stdlib as a cc1 option and teach the frontend how to find the
headers. The driver can then just pass -stdlib through to "cc1".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/HeaderSearchOptions.h
ee273b3b312642da33dd832125206d30e07fc811 21-Jun-2011 Bob Wilson <bob.wilson@apple.com> Fix cut-and-paste error: --stdlib is an alias for -stdlib, not -std.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
ed798951b46555946c95cb76568ea3cf0b16c9ab 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> Driver: Factor out IsUsingLTO helper function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
e26bdb91b7e3912ffe895b78a446db94471a59dd 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Add a -fuse-register-sized-bitfield-access option, for testing.
- Changes bit-field access policy to try to use (aligned) register sized accesses.

The idea here is that by using larger accesses we expose more coalescing
potential to the backend when we have situations like adjacent bit-fields in the
same structure (which is common), and that the backend should be smart enough to
narrow the accesses down when no coalescing is done or when it is shown not to
be profitable.

--
$ clang -m32 -O3 -S -o - t.c
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movb (%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, (%eax)
movb 1(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 1(%eax)
movb 2(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 2(%eax)
movb 3(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 3(%eax)
popl %ebp
ret

$ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl $-2139062144, %ecx ## imm = 0xFFFFFFFF80808080
andl (%eax), %ecx
orl $16843009, %ecx ## imm = 0x1010101
movl %ecx, (%eax)
popl %ebp
ret
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
08737c49bd98f73b50fe90fd19f97c41cd29e3d1 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> Basic: Add TargetInfo::getRegisterWidth hook.
- For clarity only, currently just assumes register width == long width.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0b5810882bd34183c2b764676cafa4c2ce324740 21-Jun-2011 Douglas Gregor <dgregor@apple.com> A few tweaks to MaterializeTemporaryExpr suggested by John.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
af9751747b098d77052cb71f1e648f29cfbadcc1 21-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: CodeGen part of unbridged cast of CF types.
// rdar://9474349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
03e80030515c800d1ab44125b9052dfffd1bd04c 21-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce a new AST node describing reference binding to temporaries.

MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given

const int& r = 1.0;

The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value.

IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Serialization/ASTBitCodes.h
65aa6885818d4b4eea2e5a9d12085b2398148662 21-Jun-2011 Jay Foad <jay.foad@gmail.com> Make more use of llvm::StringRef in various APIs. In particular, don't
use the deprecated forms of llvm::StringMap::GetOrCreateValue().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/IdentifierTable.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Lex/LiteralSupport.h
c3b9014c7236a15cf467662264b243a22c420312 21-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Add support for -Wa,--noexecstack when building from a non-assembly file. For
an assembly file it worked correctly, while for a .c file it would given an
error about how --noexecstack is not a supported argument to -Wa.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
cfd323d0d4476dd4ff64097c91b114067ecaa82b 21-Jun-2011 Eric Christopher <echristo@apple.com> Move additional register names to their own lookup, separate from
register aliases. Fixes unnecessary renames of clobbers.

Fixes part of rdar://9425559


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1522a7c35e9872c5767721350fc8050be5b14fd2 20-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: allow explicit unbridged casts if the source of the cast is a
message sent to an objc method (or property access)
// rdar://9474349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
33f46e22b7fc3b75c34b6d892790f80869da0300 20-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warn for un-parenthesized '&' inside '|' (a & b | c), rdar://9553326.

Patch by Henry Mason with tweaks by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c04985647bbd54d53b1f1219287eddce8ff530b5 20-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Remove this poor "abstraction" from the AST. Sorry! =D

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6af966266235cae3287d50f1a10072bc48759ba0 20-Jun-2011 Francois Pichet <pichet2000@gmail.com> Remove more unnecessary #include <llvm/ADT/SmallVector.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Driver/Compilation.h
lang/Rewrite/FixItRewriter.h
45ee1532ca3a8c6146fd9d396b795c35edb4d3dc 20-Jun-2011 Francois Pichet <pichet2000@gmail.com> Remove unnecessary include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
bc8d7f9fd4346cfcc285868be32b74e019a40f01 20-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Restructure the API in Type based on a conversation with Richard Smith.
This makes 'isPointerLikeType' a little less confusing, and pulls the
decay check into a separate interface that is much more clear and
concrete. Also, just implement these as logical wrappers around other
predicates. Having a switch based implementation isn't likely to be
necessary. We can try to optimize them later if they show up on
a profile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
732271ee3f97249c1b73088b402665ce4332256e 19-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Turn -Wnull-arithmetic back on by default -- we now have tests for the
false positives, including those in the GCC test suite, and don't warn
about them.

Let me know if this causes fallout, we can turn it back off if needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2af68e4761ed30181540dafb5572993daffa4910 19-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Add test cases for false positives on -Wnull-arithmetic from Richard
Trieu, and fix them by checking for array and function types as well as
pointer types.

I've added a predicate method on Type to bundle together the logic we're
using here: isPointerLikeType(). I'd welcome better names for this
predicate, this is the best I came up with. It's implemented as a switch
to be a touch lighter weight than all the chained isa<...> casts that
would result otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4e5c886eb6b3e86f7de0f203a2f643d764880cb6 19-Jun-2011 Francois Pichet <pichet2000@gmail.com> Add support for MSVC __debugbreak compiler intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
18e0461ad72dcf6ec93cd3b1df7bf1b5a30b10b7 18-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Accept no-return stripping conversions for pointer type arguments after
deducing template parameter types. Recently Clang began enforcing the
more strict checking that the argument type and the deduced function
parameter type (after substitution) match, but that only consideres
qualification conversions.

One problem with this patch is that we check noreturn conversions and
qualification conversions independently. If a valid conversion would
require *both*, perhaps interleaved with each other, it will be
rejected. If this actually occurs (I'm not yet sure it does) and is in
fact a problem (I'm not yet sure it is), there is a FIXME to implement
more intelligent conversion checking.

However, this step at least allows Clang to resume accepting valid code
we're seeing in the wild.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
e665d6929e11796620ff799bc0186ebd747bfc76 18-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Fix the ARC migrator. -arcmt-modify requires running before the initialization of SourceManager
because it is going to modify the input file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/ARCMTActions.h
lang/Frontend/FrontendAction.h
c2e70b46b686c8debb3020891a5593f298b053ae 18-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Remove '-arcmt-modify-in-memory', it turned out less useful than we hoped it would be.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/ARCMT.h
lang/ARCMigrate/ARCMTActions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/FrontendOptions.h
b64915a41bf681e97609055b2068647f5fe29740 17-Jun-2011 John McCall <rjmccall@apple.com> Only accept __bridge_retain in system headers, as Doug suggested.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
1816442fd19cb2f1c35a807391a6b7f280b35c58 17-Jun-2011 John McCall <rjmccall@apple.com> As a hopefully temporary workaround for a header mistake, treat
__bridge_retain as a synonym for __bridge_retained.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
4e938df04897ebc196d92b4f7f77b19f204e9d24 17-Jun-2011 Richard Trieu <rtrieu@google.com> Put the new warning from revision 133196 on NULL arithmetic behind the flag -Wnull-arthimetic and set to DefaultIgnore. A few edge cases need to be worked out before this can be set to default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7acddacc921cd0b3f813443a8641eeddb82dfbd4 17-Jun-2011 John McCall <rjmccall@apple.com> Objective-C fast enumeration loop variables are not retained in ARC, but
they should still be officially __strong for the purposes of errors,
block capture, etc. Make a new bit on variables, isARCPseudoStrong(),
and set this for 'self' and these enumeration-loop variables. Change
the code that was looking for the old patterns to look for this bit,
and change IR generation to find this bit and treat the resulting
variable as __unsafe_unretained for the purposes of init/destroy in
the two places it can come up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0f9dc86a14068e04e0d2cc6b4ff15eca571236ce 17-Jun-2011 Douglas Gregor <dgregor@apple.com> When an explicit specialization has a storage specifier, error if that
storage specifier is different from the storage specifier on the
template. If that storage specifier is the same, then we only warn.

Thanks to John for the prodding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
51d7cdd4bfd11e0eeac55517419d0ebba0abb4cb 17-Jun-2011 Douglas Gregor <dgregor@apple.com> Downgrade the error complaining about presence of a storage class
specifier on an explicit specialization to a warning, since neither
EDG nor GCC diagnose this code as ill-formed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7a883e3e1798efdb12f06e4e1b722f9a659dbac3 17-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Add support for -force_load flag, for compat with Apple gcc. rdar://9555962 .



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
6970155edde8c79cf22824322470485434b8eb83 17-Jun-2011 Francois Pichet <pichet2000@gmail.com> Finish 2 sentences.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
12ee102774c747874f0a6904089100667153b0c0 17-Jun-2011 Chris Lattner <sabre@nondot.org> comment improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
ebb6164bebf2b1e4f439433e751710b506918f62 17-Jun-2011 Chris Lattner <sabre@nondot.org> code cleanups, no behavior change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
3e95ba94fd34c5f6420c57d7732f601875074681 16-Jun-2011 Richard Trieu <rtrieu@google.com> Add a new warning when a NULL constant is used in arithmetic operations. The warning will fire on cases such as:

int x = 1 + NULL;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a92d7e7a55a35b28437103130904a6401bf35408 16-Jun-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Fix of a minor typo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
707a23e8b87410332b55bb4534fa1c799edef38a 16-Jun-2011 Douglas Gregor <dgregor@apple.com> Teach the warning about non-POD memset/memcpy/memmove to deal with the
__builtin_ versions of these functions as well as the normal function
versions, so that it works on platforms where memset/memcpy/memmove
are macros that map down to the builtins (e.g., Darwin). Fixes
<rdar://problem/9372688>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b1f7d2496a2916cfad17633e403151dd09118821 16-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> arc: diagnose dereferencing a __weak pointer which may be
null at any time. // rdar://9612030


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
16c8f9d68ae6d302083763d4733e728634717dec 16-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133163 at Fri. 17th Jun 2011.
dbfb371e297794e827ad2e5b33b45fafbfc46b29 16-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement the consistency checking for C++ [temp.deduct.call]p3, which
checks that the deduced argument type for a function call matches the
actual argument type provided. The only place we've found where the
consistency checking should actually cause template argument deduction
failure is due to qualifier differences that don't fall into the realm
of qualification conversions (which are *not* checked when we
initially perform deduction). However, we're performing the full
checking as specified in the standard to ensure that no other cases
exist.

Fixes PR9233 / <rdar://problem/9039590>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f7f8188fac71e34e09ee457ff6f039f5d14ad117 16-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Raise the ARCMT functionality in Clang into proper FrontendActions.
These are somewhat special in that they wrap any other FrontendAction,
running various ARC transformations or checks prior to the standard
action's run. To implement them easily, this extends FrontendAction to
have a WrapperFrontendAction utility class which forwards all calls by
default to an inner action setup at construction time. This is then
subclassed to override the specific behavior needed by the different
ARCMT tools.

Finally, FrontendTool is taught how to create these wrapper actions from
the existing flags and options structures.

The result is that clangFrontend no longer depends on clangARCMigrate.
This is very important, as clangARCMigrate *heavily* depends on
clangFrontend. Fundamentally ARCMigrate is at the same layer as
a library like Rewrite, sitting firmly on top of the Frontend, but tied
together with the FrontendTool when building the clang binary itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/ARCMTActions.h
lang/Frontend/FrontendAction.h
000d428347f352979e0f6dffcf0a64e73af0a2b5 16-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Rework the warning for 'memset(p, 0, sizeof(p))' where 'p' is a pointer
and the programmer intended to write 'sizeof(*p)'. There are several
elements to the new version:

1) The actual expressions are compared in order to more accurately flag
the case where the pattern that works for an array has been used, or
a '*' has been omitted.
2) Only do a loose type-based check for record types. This prevents us
from warning when we happen to be copying around chunks of data the
size of a pointer and the pointer types for the sizeof and
source/dest match.
3) Move all the diagnostics behind the runtime diagnostic filter. Not
sure this is really important for this particular diagnostic, but
almost everything else in SemaChecking.cpp does so.
4) Make the wording of the diagnostic more precise and informative. At
least to my eyes.
5) Provide highlighting for the two expressions which had the unexpected
similarity.
6) Place this diagnostic under a flag: -Wsizeof-pointer-memaccess

This uses the Stmt::Profile system for computing #1. Because of the
potential cost, this is guarded by the warning flag. I'd be interested
in feedback on how bad this is in practice; I would expect it to be
quite cheap in practice. Ideas for a cheaper / better way to do this are
also welcome.

The diagnostic wording could likely use some further wordsmithing.
Suggestions welcome here. The goals I had were to: clarify that its the
interaction of 'memset' and 'sizeof' and give more reasonable
suggestions for a resolution.

An open question is whether these diagnostics should have the note
attached for silencing by casting the dest/source pointer to void*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b11382497a923b0d7009e85a1d8eb7bf93ec6d0d 16-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Make the Stmt::Profile method const, and the StmtProfile visitor
a ConstStmtVisitor. This also required adding some const iteration
support for designated initializers and making some of the getters on
the designators const.

It also made the formatting of StmtProfile.cpp rather awkward. I'm happy
to adjust any of the formatting if folks have suggestions. I've at least
fitted it all within 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
a07398ed98ea2b55ad7a505a3aab18aed93b149f 16-Jun-2011 John McCall <rjmccall@apple.com> Restore correct use of GC barriers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9d4562445decb576249a049f5cdaf04a138bda33 16-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Make the presentation of the warnings on 'x + y ? 1 : 0' a bit more
pretty. In particular this makes it much easier for me to read messages
such as:

x.cc:42: ?: has lower ...

Where I'm inclined to associate the third ':' with a missing column
number, but in fact column numbers have been turned off. Similar
punctuation collisions happened elsewhere as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
82d1cc06ea533267e24ffe8b5885062ca062b479 16-Jun-2011 John McCall <rjmccall@apple.com> Suppress an over-zealous MSVC warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
8f0e8d22960d56f8390f4971e2c0f2f0a0884602 16-Jun-2011 John McCall <rjmccall@apple.com> The ARC Migration Tool. All the credit goes to Argyrios and Fariborz
for this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/ARCMigrate/ARCMT.h
lang/ARCMigrate/FileRemapper.h
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/OperationKinds.h
lang/AST/ParentMap.h
lang/AST/PrettyPrinter.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/AST/StmtObjC.h
lang/AST/Type.h
lang/Basic/Attr.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/LangOptions.h
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Driver/ToolChain.h
lang/Frontend/CodeGenOptions.h
lang/Frontend/FrontendOptions.h
lang/Frontend/PreprocessorOptions.h
lang/Frontend/Utils.h
lang/Parse/Parser.h
lang/Rewrite/Rewriter.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/DelayedDiagnostic.h
lang/Sema/Initialization.h
lang/Sema/Overload.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
204e13395d83524e9a557c3f3fd6df2e2f353b9d 16-Jun-2011 John McCall <rjmccall@apple.com> Introduce a utility routine for checking whether a block's captures
include a specific variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
add80bb3957dba1d9389304453c0a4c975768bd7 16-Jun-2011 John McCall <rjmccall@apple.com> Missing files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
923cd5744a724d9302ea12baa5476ad1c37f474d 15-Jun-2011 John McCall <rjmccall@apple.com> Generate enumerators for diagnostic categories. Patch by Argyrios!
Depends on LLVM r133093.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCategories.h
4ac01401b1ec602a1f58c217544d3dcb5fcbd7f1 15-Jun-2011 Douglas Gregor <dgregor@apple.com> Eliminate a 'default' case in template argument deduction, where we
were just punting on template argument deduction for a number of type
nodes. Most of them, obviously, didn't matter.

As a consequence of this, make extended vector types (via the
ext_vector_type attribute) actually work properly for several
important cases:
- If the attribute appears in a type-id (i.e, not attached to a
typedef), actually build a proper vector type
- Build ExtVectorType whenever the size is constant; previously, we
were building DependentSizedExtVectorType when the size was constant
but the type was dependent, which makes no sense at all.
- Teach template argument deduction to handle
ExtVectorType/DependentSizedExtVectorType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1454cb952b76a7dc441f2ae1b7f8d998a54a23cf 15-Jun-2011 Douglas Gregor <dgregor@apple.com> Properly implement C++0x [stmt.dcl]p3, which requires a scope to be
protected in the case where a variable is being initialized by a
trivial default constructor but has a non-trivial destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cf739927f9b00c801867f620b04b79e3259c311f 15-Jun-2011 Nico Weber <nicolasweber@gmx.de> Warn on "void f(int a[10]) { sizeof(a); }"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
fa821380182f00eddfa536280b5a103c59e5c1c4 15-Jun-2011 Ted Kremenek <kremenek@apple.com> Sema: show shift result in hexadecimal

Change the output for -Wshift-overflow and
-Wshift-sign-overflow to an unsigned hexadecimal. It makes
more sense for looking at bits than a signed decimal does.
Also, change the diagnostic's wording from "overrides"
to "sets".

This uses a new optional argument in APInt::toString()
that adds the '0x' prefix to hexademical numbers.

This fixes PR 9651.

Patch by nobled@dreamwidth.org!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
74da19fc3a52d7e3005eeb7a7833859da84fd12a 15-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce a -cc1-level option to turn off related result type
inference, to be used (only) by the Objective-C rewriter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
997e15cfdc5c78cf3cd9c520dd1bcf3eef4750c0 14-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Bad table discription of fromat-y2k causes
no-format-y2k turn off -Wformat altogether.
// rdar://9504680


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
e4a1c64700304459ac436fe29cb498f2da3b6194 14-Jun-2011 Nico Weber <nicolasweber@gmx.de> Warn on memset(ptr, 0, sizeof(ptr)). Diagnostic wording by Jordy Rose.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2a00b8347bdf0064cc106295a070c00669ded9a9 14-Jun-2011 Jay Foad <jay.foad@gmail.com> Hyphenate "argument-dependent".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e1eed38733ed47d44f9d8c7731817c411eaf4141 14-Jun-2011 Chris Lattner <sabre@nondot.org> when compiling in a GNU mode (e.g. gnu99) treat VLAs with a size that can be folded to a constant
as constant size arrays. This has slightly different semantics in some insane cases, but allows
us to accept some constructs that GCC does. Continue to be pedantic in -std=c99 and other
modes. This addressed rdar://8733881 - error "variable-sized object may not be initialized"; g++ accepts same code


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
24c38e1ff057ce49c866294bf486444255e18f31 14-Jun-2011 Chris Lattner <sabre@nondot.org> fix rdar://9204520 - Accept int(0.85 * 10) as an initializer in a class member
as an extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0adde128d96a73864569516e684faa570e3c0333 14-Jun-2011 David Majnemer <david.majnemer@gmail.com> Properly diagnose using abstract and incomplete types in va_arg

- Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there
- Incomplete and abstract types are considered hard errors


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fd05ca03abdfb38f78b9535d996ecc9c39d3b0db 14-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Move GlobalDecl to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/GlobalDecl.h
4c4efee6d3113f20b41efaeec08934332d2ea40e 13-Jun-2011 Douglas Gregor <dgregor@apple.com> Eliminate the -f[no]objc-infer-related-result-type flags; there's no
reason to allow the user to control these semantics through a flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
db11b0187bafe77263036eafc3977fa5da3bcf1a 13-Jun-2011 David Majnemer <david.majnemer@gmail.com> Give a diagnostic when using non-POD types in a va_arg


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c2cdd5354aba8d6a74c45231829f3bbbbfeb2781 12-Jun-2011 Richard Smith <richard-llvm@metafoo.co.uk> Don't assert on initialized typedef declarations in classes:

struct {
typedef int A = 0;
};

According to the C++11 standard, this is not ill-formed, but does not have any ascribed meaning. We can't reasonably accept it, so treat it as ill-formed.

Also switch C++ from an incorrect 'fields can only be initialized in constructors' diagnostic for this case to C's 'illegal initializer (only variables can be initialized)'



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7a614d8380297fcd2bc23986241905d97222948c 11-Jun-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++11 in-class initialization of non-static data members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/ExceptionSpecificationType.h
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
lang/Sema/Scope.h
lang/Sema/Sema.h
926df6cfabf3eaa4afc990c097fa4619b76a9b57 11-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement Objective-C Related Result Type semantics.

Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:

t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^

It also means that we get decent type inference when writing code in
Objective-C++0x:

auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Sema/Sema.h
45937ae10a0f70f74508165aab4f2b63e18ea747 11-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Restore 'atomic' as an attribute of objc
properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Sema/DeclSpec.h
e5df885367b9e122ac11c89ddfbc62375695cdab 10-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r132843 at Fri. 10th Jun 2011.
3bde0ce7a18d2513ebe286df67baa32700fd3d6b 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> This change is breaking selfhost. Revert it until I have more time
to study it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
53e669f4bd617dc4df1b1850bcd3998d7680bdc5 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement caching of copy assignment operator lookup.

I believe, upon, careful review, that this code causes us to incorrectly
handle exception specifications of copy assignment operators in C++03
mode. However, we currently do not seem to properly implement the subtle
distinction between copying of members and bases made by implicit copy
constructors and assignment operators in C++03 - namely that they are
limited in their overload selection - in all cases. As such, I feel that
committing this code is correct pending a careful review of our
implementation of these semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c530d1758cef1acc596f2ec905665da534e66d29 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement caching for copy constructors in similar situations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b320e0c322fb71d6235ebca9ec22940a97bdcdc7 10-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement caching of default constructors on the resolution table. This
isn't yet used for the less controlled environments of initialization.

Also a few random text fixups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
bbf34c024398e7bae825686dcff4c3b901ec9f89 10-Jun-2011 Richard Trieu <rtrieu@google.com> Made changes to how 'struct'/'class' mismatches are handled in -Wmismatched-tags.
- Removed fix-it hints from template instaniations since changes to the
templates are rarely helpful.
- Changed the caret in template instaniations from the class/struct name to the
class/struct keyword, matching the other warnings.
- Do not offer fix-it hints when multiple declarations disagree. Warnings are
still given.
- Once a definition is found, offer a fix-it hint to all previous declarations
with wrong tag.
- Declarations that disagree with a previous definition will get a fix-it hint
to change the declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
2f072b442879b8bba8c5dea11d7c61bedb1924ae 09-Jun-2011 Hans Wennborg <hans@hanshq.net> Handle overloaded operators in ?: precedence warning

This is a follow-up to r132565, and should address the rest of PR9969:

Warn about cases such as

int foo(A a, bool b) {
return a + b ? 1 : 2; // user probably meant a + (b ? 1 : 2);
}

also when + is an overloaded operator call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d7bc7a210993fc4f67cdf5764ce4ef33f2a8ede3 09-Jun-2011 Bob Wilson <bob.wilson@apple.com> Add isVCVT_N flag to identify Neon VCVT_N intrinsics, which require special
range checking for immediate operands. Radar 9558930.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
b92003b3d8d6128be3daa0b3f40a042a08545644 08-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Remove 'atomic' as a property attribute keyword.
It is not a sanctioned keyword and is assumed as default.
// rdar://8790791


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Sema/DeclSpec.h
6ce33d67e2ed4f8c9395a807bebd25be04580c0f 08-Jun-2011 Stuart Hastings <stuart@apple.com> Followup to 132737; make two-character string explicit, add some
comments. rdar://problem/9037836


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
169dd31c6c552c9234ae97ac2013f9635bdbfa32 08-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Revert "hack in my new variables for GCC"

Very sorry for the accidental commit of WIP code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Config/config.h.cmake
8afdd56babf69cd8e3b45d0baff0d4fc20d088a0 08-Jun-2011 Chandler Carruth <chandlerc@gmail.com> hack in my new variables for GCC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Config/config.h.cmake
002333f8b2cf1a8614e532f6ce366b21af85142c 08-Jun-2011 Stuart Hastings <stuart@apple.com> Clang support for ARM Uv/Uy/Uq inline-asm constraints.
rdar://problem/9037836


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
175df89a9794271669ec347c8c842a99271cbfce 07-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> More coherent diagnostic when a stack variable is
declared __weak objc-gc mode. // rdar://9666091.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5b01b8319012c6b568de6dfff935c1b16184952f 07-Jun-2011 Douglas Gregor <dgregor@apple.com> Downgrade the warning about the use of typedefs for class template
specializations within an explicit instantiation to default to off
(enabled by -pedantic). Nobody else seem to implement C++
[temp.explicit]p3. Fixes PR10093.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7f4afa55bb1c580739a98bf8051d6400f4fc5738 06-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Don't put a note in the DiagGroup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
89b9f10cca9e2812b3e7943d3150fe6c9028bbe4 06-Jun-2011 Douglas Gregor <dgregor@apple.com> Diagnose the condition in C++ [temp.expl.spec]p16 that prohibits
specializing a member of an unspecialized template, and recover from
such errors without crashing. Fixes PR10024 / <rdar://problem/9509761>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7299a4ef4d75901012e006f463d789447976a21b 06-Jun-2011 Francois Pichet <pichet2000@gmail.com> ok now, let's fix that MSVC warning for real.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c9f487a8aa73376b8cbee364663b50956fc641a2 06-Jun-2011 Francois Pichet <pichet2000@gmail.com> Fix MSVC warning:
"unsafe mix of type 'int' and type 'bool' in operation"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f50e88a793dd5bc7073c717fec78912e3234e95a 06-Jun-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept due to a lack of proper support for two-phase name lookup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7491c499e826682e128a400038361ebcbde30eec 05-Jun-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Drop most of InitializationSequence::SequenceKind's values. They didn't really contain any information that the step array didn't contain too. This makes debugging dumps a bit less informative, but probably not significantly so. The advantage is that the redundancy is gone, so the code is easier to understand.
ReferenceBinding is still there, because it is used in some unclear code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
d695d6bb7323672e29dbb1556a3dafde3d3b2732 05-Jun-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Remove more references to FailedSequence.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
383616cd2e61131a534afd9364ef53f643e1f834 05-Jun-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Remove all references to InitializationSequence::FailedSequence from outside SemaInit.cpp. Replace them with the boolean conversion or the new Failed() function. This is a first step towards removing InitializationSequence::SequenceKind. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
dbef1bb8a8118b7b73e184e08fccfe0eaf914dda 05-Jun-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Parse C++0x generalized initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
4ae5b7208ef72dec2a79d3d1c602cb47e9750d69 05-Jun-2011 Douglas Gregor <dgregor@apple.com> Identity and non-identity standard conversion sequences can be
compared even when one is a reference binding and the other is not
(<rdar://problem/9173984>), but the definition of an identity sequence
does not involve lvalue-to-rvalue adjustments (PR9507). Fix both
inter-related issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132660 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
ab3c80e79e09132d1ee51b7c11ca697cb4592913 04-Jun-2011 Richard Smith <richard-llvm@metafoo.co.uk> Remove the old implementation of -verify, which has been dead code since r88750.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
7339902e47acacad0d6b911c54ee3aa8cbfac683 04-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Revert r132630. GCC passes everything down, we aren't trying to replicate that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f6ff3abc3a7ee63fcf279e68ef802a12d94adf08 04-Jun-2011 Nick Lewycky <nicholas@mxc.ca> GCC passes -z foo directly through to the linker (and yes -z=foo becomes
"-z =foo"). Do the same thing in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
308742c87e2311c3f349092e5b823c3821e61b10 04-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Reimplement r132572 on top of a FoldingSet, thus hopefully solving both
the self-host failures and Chandler's concerns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/Sema.h
7b33c2b3908b178511ccaace8cacb5e5b14552a9 04-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Remove extraneous "virtual" keyword and non-virtual destructor. Caught by
-Wnon-virtual-dtor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
61eee0ca33b29e102f11bab77c8b74cc00e2392b 04-Jun-2011 Tanya Lattner <tonic@nondot.org> Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
953c564288f2f376fed9c3540096bde3694bbb7a 04-Jun-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Improvements to abbreviations for PCH which add support for EnumDecl, ObjCIvarDecl, TypedefDecl, VarDecl and FieldDecl and improve support for ParmVarDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
352697a87bca664356f21a838b162084013625ea 04-Jun-2011 Douglas Gregor <dgregor@apple.com> Expose @synthesize and @dynamic via their own cursor kinds in
libclang. Fixes <rdar://problem/9537904>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132603 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c5c9b538de70124a57bee0adbfdd7853a582176e 03-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r132572 to figure out why it broke selfhost and clean it up as
suggested by Chandler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/Sema.h
8fd7722fce4e4f9549897699ec3a4c752613b214 03-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Begin implementing a cache of special member lookups. Currently only
destructors are implemented but other special members are on the way,
which is where the real benefits of this will be visible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/Sema.h
5a4cca2cc576bb42309e3e86befaa904283e9c8c 03-Jun-2011 Matt Beaumont-Gay <matthewbg@google.com> Don't warn about -Wno-foo where foo is an unknown warning option. Explicitly
passing -Wunknown-warning-option will re-enable warnings about -Wno-foo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
9cfdae3144fc004cf203b05288f4dab49097ce7b 03-Jun-2011 Hans Wennborg <hans@hanshq.net> Warn about missing parentheses for conditional operator.

Warn in cases such as "x + someCondition ? 42 : 0;",
where the condition expression looks arithmetic, and has
a right-hand side that looks boolean.

This (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132565 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
78e9c55c9acc85d82f4dd53a49c05310b4b56a1b 03-Jun-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a warning flag for the warning about default arguments making
special member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c7f532f9b8e934a0a284d15a739333372e979f61 03-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r132540 at Fri. 3rd Jun 2011.
929f0135ab60166202f52e0dd19835c0490d792a 03-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Clean up the "non-POD memaccess" stuff some. This adds a properly named
diagnostic group to cover the cases where we have definitively bad
behavior: dynamic classes.

It also rips out the existing support for POD-based checking. This
didn't work well, and triggered too many false positives. I'm looking
into a possibly more principled way to warn on the fundamental buggy
construct here. POD-ness isn't the critical aspect anyways, so a clean
slate is better. This also removes some silliness from the code until
the new checks arrive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a72d8c4556fbdfca2c9e101722812861fcbdde12 03-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce additional abbreviations into the AST writer for
DeclRefExprs, IntegerLiterals, and others, reducing Cocoa PCH size by
~1% and C++ header size by ~2.5%. From Jonathan Turner!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTWriter.h
4cdb0e2a2e9d93805e5ceaf8bc7018bdd166aec1 02-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Store the offsets of source location file entries and go through them
in ASTReader::validateFileEntries().

This avoids going through all source location entries and fixes the performance regression.
Many thanks to Doug for the hint!
(rdar://9530587)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
01ba8545fb6bae2a370606b4f40f0d17eb0a8c6c 02-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Add -fno-gnu89-inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
16f213142f8f8f5410672205a19f79ed3c232929 02-Jun-2011 Manuel Klimek <klimek@google.com> Reverts the Tooling changes as requested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/ASTMatchers.h
lang/Tooling/Tooling.h
lang/Tooling/VariadicFunction.h
fb3f4aad0436a9c40e9130598162150890c405b5 02-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -fgnu89-inline. Fixes PR10041.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
9277bea0e6b4202845b9a8160b4d18a6f026c2ba 01-Jun-2011 Ted Kremenek <kremenek@apple.com> Rename -Wunknown-attributes to -Wattributes to match GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
6a5e062cbcb5c10e745f241604ca080d5cfbefcc 01-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Don't use stdint.h; including it directly is not allowed from LLVM code because it doesn't exist on MSVC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/ASTMatchers.h
4e1ff2b6c9bdffd1cc202a2c9a38393d78f4bca5 01-Jun-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove pointless assert, N is unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/ASTMatchers.h
c89db5acb0b2661bdbbfe9e2f5d968a8b7d45b48 01-Jun-2011 Benjamin Kramer <benny.kra@googlemail.com> Change a name for consistency and hopefully unbreak builds with gcc 4.6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/ASTMatchers.h
b68ffb107a86f5e3851e8108c712b64dd16ba258 01-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Be conservative and check all the files the PCH references to see if
a file was modified since the time the PCH was created.

The parser is not fit to deal with stale PCHs, too many invariants do not hold up. rdar://9530587.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
64cbdf370984783911bb6d3bc25ec35a8b59e998 01-Jun-2011 Manuel Klimek <klimek@google.com> This patch implements an AST matching framework that allows to write
tools that match on the C++ ASTs. The main interface is in ASTMatchers.h,
an example implementation of a tool that removes redundant .c_str() calls
is in the example RemoveCStrCalls.cpp.

Various contributions:
Zhanyong Wan, Chandler Carruth, Marcin Kowalczyk, Wei Xu, James Dennett.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/ASTMatchers.h
lang/Tooling/Tooling.h
lang/Tooling/VariadicFunction.h
5aecb786a32d321e8d3462cd49e50092e8d55cd3 01-Jun-2011 Francois Pichet <pichet2000@gmail.com> Revert 132332 (Microsoft friend as a forward declaration), John McCall pointed out a better/simpler way to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
8adc227de934e23c72eb8d9abf5c0e3dfffec131 31-May-2011 Francois Pichet <pichet2000@gmail.com> For compatibility with MSVC, a friend declaration also act as a forward declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope.
Example:

class A {
friend class B;
B* b;
};
B* global_b;


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
8155910a192dafa423d6b932b7d127d48e4641e8 31-May-2011 Nick Lewycky <nicholas@mxc.ca> Whenever we instantiate a static data member, make sure to define any new
vtables! Fixes PR10020

This also allows us to revert the part of r130023 which added a big loop around
the template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1838ca5618bc6c84ca3d13d84717bf32d9862bb3 29-May-2011 Richard Trieu <rtrieu@google.com> Add a new warning on NULL pointer constant to integer conversion.

This path was reviewed by Chandler Carruth at http://codereview.appspot.com/4538074/



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e72c55b9a11be9f00fa3f66f7ad6b73b2814e963 29-May-2011 Chandler Carruth <chandlerc@gmail.com> Fix a regression in the source locations for unary trait expressions.
I tried to use an assert to prove that I could remove each of the
arguments I did, but ended up writing my assert with inverted logic.
Doh! Reported by Xi Wang on cfe-dev. I have manually verified the source
locations and ranges for these using -ast-dump. I tried writing a test
case that would catch these, but these expressions aren't exposed in the
c-index-test's token annotation utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
43c9791207a2bd7cef8b17e9bfc4dd87db21690f 28-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream r132249 at Sat. 28th. May 2011.
26c1b8df8d1af0d8ef7f6c726fe1a8a9ddc60267 28-May-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add support for ARM ldrexd/strexd builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
469244a322dd5d35cee1d02d70a2edbc12ac5ce7 28-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a couple of helper methods in the SourceManager API, isAtStartOfMacroInstantiation/isAtEndOfMacroInstantiation
useful only for source locations that point at a macro token.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
e4d645cbe073042d8abc1a4eb600af4ff7a8dffb 27-May-2011 Chandler Carruth <chandlerc@gmail.com> Enhance Clang to start instantiating static data member definitions
within class templates when they are necessary to complete the type of
the member. The canonical example is code like:

template <typename T> struct S {
static const int arr[];
static const int x;
static int f();
};

template <typename T> const int S<T>::arr[] = { 1, 2, 3 };
template <typename T> const int S<T>::x = sizeof(arr) / sizeof(arr[0]);
template <typename T> int S<T>::f() { return x; }

int x = S<int>::f();

We need to instantiate S<T>::arr's definition to pick up its initializer
and complete the array type. This involves new code to specially handle
completing the type of an expression where the type alone is
insufficient. It also requires *updating* the expression with the newly
completed type. Fortunately, all the other infrastructure is already in
Clang to do the instantiation, do the completion, and prune out the
unused bits of code that result from this instantiation.

This addresses the initial bug in PR10001, and will be a step to
fleshing out other cases where we need to work harder to complete an
expression's type. Who knew we still had missing C++03 "features"?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f968d8374791c37bc464efd9168c2d33dd73605f 27-May-2011 Douglas Gregor <dgregor@apple.com> Objective-C doesn't consider the use of incomplete types as method
parameter types to be ill-formed. However, it relies on the
completeness of method parameter types when producing metadata, e.g.,
for a protocol, leading IR generating to crash in such cases.

Since there's no real way to tighten down the semantics of Objective-C
here without breaking existing code, do something safe but lame:
suppress the generation of metadata when this happens.

Fixes <rdar://problem/9123036>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f858bd817e8d6eac58ae496fa96a2f508fbb286f 26-May-2011 Richard Trieu <rtrieu@google.com> Add a fix-it and better error recovery for improperly nested namespaces. This will give a better error message for cases such as "namespace foo::bar::baz {}" and a suggested fix-it of "namespace foo { namespace bar { namespace baz {} } }"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
9d342d0121531bcbd2410f600a751dc85993bdee 26-May-2011 Chandler Carruth <chandlerc@gmail.com> Add a convenience interface for checking expression arguments to unary
traits which uses the information embedded in the expression. Use this
to simplify several interfaces which repeated information embedded in
the expression through explicit arguments. I added an assertion that the
only extra piece of data to come in from the parser matches what is
stored in the expression. No functionality change intended here.

Also cleaned up the doxygen comments for some of these methods and some
formatting oddities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
9ae60d54e4454192384933f3020968ea5c8c3540 26-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a new warning for when adding a default argument to a method
makes it into a special member function. This is very bad and can lead
to all sorts of nastiness including implicit member functions violating
the One Definition Rule. This should probably be made ill-formed in a
later version of the standard, but for now we'll just warn.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e5cfd52a3a5d4bb46f77323fa8fa0b973fcde7bc 26-May-2011 Ted Kremenek <kremenek@apple.com> static analyzer: when conservatively evaluating functions, don't invalidate the values of globals when the called function is strlen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
82713174914bdb927a254c5ee188e35fd79c4948 26-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Update our diagnostics to properly account for move operations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
ffe37fdda5b4b4f162a45155c30d9f60ce110c12 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a little bit of cleanup and a lot more of the base work
behind implicit moves. We now correctly identify move constructors and
assignment operators and update bits on the record correctly. Generation
of implicit moves (declarations or definitions) is not yet supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
lang/Sema/Sema.h
563a645de82231a55e221fe655b7188bf8369662 25-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists, __if_not_exists extension at class scope.

Example:

typedef int TYPE;
class C {
__if_exists(TYPE) {
TYPE a;
}
__if_not_exists(TYPE) {
this will never be parsed.
}
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
477aab6782795e7472055a54108d2df270ce1a89 25-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> A StringRef-ication of the DiagnosticIDs API and internals.

Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.

Depends on llvm commit r132046.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
3573fff02a7f021bebdf3c7f59f631eb5dccbd44 25-May-2011 Daniel Dunbar <daniel@zuster.org> Driver: Don't warn about unused PIE arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
ca63c200346c0ca9e00194ec6e34a5a7b0ed9321 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a new type node, UnaryTransformType, designed to represent a
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Basic/Specifiers.h
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
6f0074ae2f466bae9f415da268d61a2dc1fabe26 24-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add new warning that warns when invoking 'delete' on a polymorphic, non-final, class without a virtual destructor.

Patch by Matthieu Monrocq!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
848afb0c1ff4571ca7a21927ecc2699ea2e7429a 24-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131958 at Tue. 24th May 2011.
74a5fd8bcc68b540b58f6fcd2d80e6e926966e71 24-May-2011 Nico Weber <nicolasweber@gmx.de> Make it possible for external tools to distinguish between paths that come from -I and paths that come from -system. Patch from Paul Holden!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
0f161593b36584ec447e5268dbed2953489854d8 24-May-2011 Francois Pichet <pichet2000@gmail.com> MSVC doesn't do any validation regarding exception specification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b2ee8305f878259613b65d0f96a03f7f852977ea 23-May-2011 Francois Pichet <pichet2000@gmail.com> Emulate a MSVC bug where if during an using declaration name lookup, the declaration found is unaccessible (private) and that declaration was bring into scope via another using declaration whose target declaration is accessible (public) then no error is generated.

Example:
class A { public: int f(); };
class B : public A { private: using A::f; };
class C : public B { private: using B::f; };

Here, B::f is private so this should fail in Standard C++, but because B::f refers to A::f which is public MSVC accepts it.

This fixes 1 error when parsing MFC code with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Lookup.h
74a63bca21a352319162505dce8310c1d6ed15cd 22-May-2011 David Chisnall <csdavec@swan.ac.uk> Change the default for supporting ObjC GC to true. This shouldn't really be in ToolChain at all, since it's a property of the objc runtime library.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
4d509341bd5db06a517daa311379f52bb540bc34 21-May-2011 Eli Friedman <eli.friedman@gmail.com> Fix the clang part of PR7952: rewrite the specialization of isa<> in DeclBase,
and stop abusing the multi-level dereference isa<> used to allow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
e885e188b25dc218132402d1f48fb35e175bfb2e 21-May-2011 Douglas Gregor <dgregor@apple.com> Diagnose the presence of storage-class-specifiers on explicit
instantiations and specializations. Fixes <rdar://problem/9126453> and PR8700.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c9471b0ff1815ed0149dbfcad0f385ed8648eeb0 21-May-2011 Douglas Gregor <dgregor@apple.com> Introduce the -fdiagnostics-format=xxx option to control how Clang
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.

Note that we no longer change the diagnostic format based on
-fms-extensions.

Patch by Andrew Fish!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
5e9ebb3c0fb554d9285aa99c470abdf283272bd9 21-May-2011 Douglas Gregor <dgregor@apple.com> A few more is(Un)signedIntegerType/is(Un)signedOrEnumerationType cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
0fd228d48bbf05d08d9b408023d7c8ddb681bc91 21-May-2011 Douglas Gregor <dgregor@apple.com> Implement C++0x semantics for passing non-POD classes through varargs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
575a1c9dc8dc5b4977194993e289f9eda7295c39 20-May-2011 Douglas Gregor <dgregor@apple.com> Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/Type.h
b7ec906b189f71ab35825bdb60fb1f6c4c40880b 20-May-2011 Douglas Gregor <dgregor@apple.com> Downgrade the error about re-opening an inline namespace as non-inline
to a warning, since apparently libstdc++'s debug mode does this (and
we can recover safely). Add a Fix-It to insert the "inline", just for kicks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4926d832aa2f0af9d7c00633727d49e7967eb978 20-May-2011 Douglas Gregor <dgregor@apple.com> Clean up two comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131727 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
7dfd96fd5f4e63071f5d4f684e9f0e1928d226c7 20-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131722 at Fri. 20th May 2011.
1e55e91a257c4ddd4364656b048a3c345c366804 20-May-2011 Matt Beaumont-Gay <matthewbg@google.com> Undo enough of r131143 to make private copy ctor diags say "copy constructor" again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
46a49391efab20d7a2a1c18f22edb3d76b465252 19-May-2011 Joerg Sonnenberger <joerg@bec.de> Correction for r131662, the GNU as option is --fatal-warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
d793350dee89688f1cc939096dc60c3bc15c20fe 19-May-2011 Joerg Sonnenberger <joerg@bec.de> Support -fatal-warnings for the assembler frontend


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
db5d44b775c60166074acd184ca9f1981c10c2a7 19-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement __underlying_type for libc++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/Specifiers.h
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
0ee33912f8ec3453856c8a32ed2c2e8007bed614 19-May-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Reapply r121528, fixing PR9941 by delaying the exception specification check for destructors until the class is complete and destructors have been adjusted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1d78032167c2f2d470e4270aadcb07ff71e6c7e1 18-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r121528 as it breaks a simple testcase, which leads to, among
other things, libcxx not building.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0320a1d7b3305d1aef36ee68b77bebe170e1d30a 18-May-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Implement implicit exception specifications of destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
403de3f932b5d1d3e4e58f69960000911d04dd2a 18-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a nasty bug where inside StringLiteralParser:

1. We would assume that the length of the string literal token was at least 2
2. We would allocate a buffer with size length-2

And when the stars aligned (one of which would be an invalid source location due to stale PCH)
The length would be 0 and we would try to allocate a 4GB buffer.

Add checks for this corner case and a bunch of asserts.
(We really really should have had an assert for 1.).

Note that there's no test case since I couldn't get one (it was major PITA to reproduce),
maybe later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
be63122e65ea06010c4ce06a77276bcb29a575b6 17-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fix some minor bugs and add a lot more test cases for defaulted
constructors, including two more FIXMEs (one of which I don't actually
understand).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6ee6cf6a13e4047a78ce61951870c6605a7260f0 17-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131450 at Tue. 17th May 2011.
2636197098e02fd7c90f9496056b8ab886dcbff0 17-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Reapply the commits that r131401 reverted and add a fix for PR9927.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
81e557b1ded0e3249f784172c54728469baad1db 16-May-2011 Manuel Klimek <klimek@google.com> Pulls the common part of the clang-check example into Tooling, to allow new tools to be implemented without duplicating the boilerplate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/Tooling.h
4ea030403d509f5b320b8e1d7952447aba5c2f6c 16-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 131377, 131369 and 131365.
131365 caused PR9927.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
23c608d6815f188cb0bd3444c9708383c6461036 15-May-2011 John McCall <rjmccall@apple.com> Add a method for checking whether a function is one of the reserved global
placement allocation or deallocation functions. These functions cannot be
replaced by the user and are exempt from the normal requirements on
allocation functions (e.g. that they must return unaliased memory).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ffb945ffb5d29b80fd93649c3572b6d87abce3fc 15-May-2011 Anders Carlsson <andersca@mac.com> When emitting the destructor for a class with a vtable, if we can determine
that the destructor body is trivial and that all member variables also have either
trivial destructors or trivial destructor bodies, we don't need to initialize the
vtable pointers since no virtual member functions will be called on the destructor.

Fixes PR9181.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
02c5116db6a40e806534c416e0abb22b8840831e 14-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Create proper Objective-C @encoding for C++ classes; fixes rdar://9357400.

Go through and expand the members of bases into the encoding string (and encode the VTable as well).
Unlike gcc which expands virtual bases as many times as they appear in the
hierarchy, clang will only expand them once at the end, to reflect the actual layout.

Note that there doesn't seem to be a way to indicate in the encoding that
packing/alignment of members is different that normal, in which case
the encoding will be out-of-sync with the real layout.
If the runtime switches to just consider the size of types without
taking into account alignment, we could easily make padding explicit in the
encoding (e.g. using arrays of chars). The encoding strings would be
longer then though.

Also encode a flexible array member as array of 0 size, like gcc, not as a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3b5904ba83fc9b968b1cd6f1ce78d01bfd6e8686 14-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit an error when trying to @encode an incomplete type.

There are APIs, e.g. [NSValue valueWithBytes:objCType:], which use the encoding to find out
the size of an object pointed to by a pointer. Make things safer by making it illegal to @encode
incomplete types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
e1e96a6201168c232a06ec81685f948e05fddd39 14-May-2011 Francois Pichet <pichet2000@gmail.com> Revert 131347. It asserts if the specialization in within a class template:

template<class U>
struct X1 {
template<class T> void f(T*);
template<> void f(int*) { }
};

Won't be so simple. I need to think more about it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1fa8028d9ff5de64f8b9d55731ca83a2d3423a77 14-May-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, allow template function explicit specialization at class scope.
Necessary to parse MFC and MSVC standard lib code.

Example:
struct X {
template<class T> void f(T) { }
template<> void f(int) { }
}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2b188085eccf741a9520ba86f1e6e32d0e0cd3f2 14-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> What I hope to be an implementation of defaulted copy assignment
operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
7f410191f344dc26aa926de6593fdacaad9fd1a7 14-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> More progress towards defaulted copy assignment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
30de05c228d5d38dbfdeeeb598cb960646bf998a 14-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Start implementing defaulted copy assignment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
d01d2b2de449d68e6c44d99a12c0c1fc53222113 14-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131335 at Sat. 14th May 2011.
c1b5fa41f09512c74030b9a2a0d1564535e22a76 13-May-2011 Peter Collingbourne <peter@pcc.me.uk> Introduce __has_extension macro

__has_extension is a function-like macro which takes the same set
of feature identifiers as __has_feature. It evaluates to 1 if the
feature is supported by Clang in the current language (either as a
language extension or a standard language feature) or 0 if not.

At the same time, add support for the C1X feature identifiers
c_generic_selections (renamed from generic_selections) and
c_static_assert, and document them.

Patch by myself and Jean-Daniel Dupas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Lex/Preprocessor.h
600d57ff204fb8167134aa4a4b9a3f74d5113a50 13-May-2011 Bill Wendling <isanbard@gmail.com> Remove the 'unaligned load' builtins now that they're no longer used in the *mmintrin.h files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
819e9bfe398bd556f43ca1f0c24d1b3fa21f41ef 13-May-2011 Fariborz Jahanian <fjahanian@apple.com> refactor CheckForwardProtocolDeclarationForCircularDependency returns
'true' on detecting protocol cycles. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
49634cf3b9b0c3da2aedc3bdefbf331bce167239 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Defaulting copy constructors now works reasonably well.

One more special member to go

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
8cad3046be06ea73ff8892d947697a21d7a440d3 13-May-2011 Peter Collingbourne <peter@pcc.me.uk> Refactoring of constant expression evaluator

This introduces a generic base class for the expression evaluator
classes, which handles a few common expression types which were
previously handled separately in each class. Also, the expression
evaluator now uses ConstStmtVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
lang/AST/Expr.h
7999991060b136db49eb9d6b34595383de56278c 13-May-2011 Peter Collingbourne <peter@pcc.me.uk> Add a ConstStmtVisitor class

ConstStmtVisitor is a constness-preserving variant of StmtVisitor.
ConstStmtVisitor and StmtVisitor share an implementation using a common
base class, StmtVisitorBase, which uses a template template parameter
to build pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
2bb110125e0e5adb7c1c65d12adfa34151ca1c47 13-May-2011 Douglas Gregor <dgregor@apple.com> When determining whether we can make a declaration into a global
constant, also consider whether it's a class type that has any mutable
fields. If so, it can't be a global constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
feb375d31b7e9108b04a9f55b721d5e0c793a558 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement the __is_trivially_copyable type trait

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
2be7e90b81509204b99b7bbf9753ad17b894a12a 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement defaulting of destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
cb45a0f42964ab5fa1474b25abcc1ae3a8bd0ab8 13-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Hrm

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
5762c0bec6b73a7f6360a71b94b07b7ba0e4b5e8 13-May-2011 Nick Lewycky <nicholas@mxc.ca> Add a method to query whether or not a class has a default constructor declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
96b69a7305e20c98f1a3e2e7cd52e2d6c5d53835 13-May-2011 Fariborz Jahanian <fjahanian@apple.com> After issuing diagnostics on circular protocol list,
don't build circular AST in protocol's protocol list
when user code has introduced it. Indexer and other
clients may crash. // rdar://9221614


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0c9643008e5a35cac76cf3419b3308dcad97e53e 12-May-2011 Bill Wendling <isanbard@gmail.com> LLVM doesn't always optimize away the four loads from this:

(__m128){ p[0], p[1], p[2], p[3] }

which produces really bad code. This could be done in instcombine, but it's
probably better to do it in the front-end instead.
<rdar://problem/9424836>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
211924b563aa31421836cee7655be729ad02733f 12-May-2011 Douglas Gregor <dgregor@apple.com> Add clang_CXXMethod_isVirtual() to libclang, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131230 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e4246a633b13197634225971b25df0cbdcec0c5d 12-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Properly parse the 'default' and 'delete' keywords.

They are actually grammatically considered definitions and parsed
accordingly.

This fixes the outstanding bugs regarding defaulting functions after
their declarations.

We now really nicely diagnose the following construct (try it!)

int foo() = delete, bar;

Still todo: Defaulted functions other than default constructors
Test cases (including for the above construct)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
ca46d131aa40ae953d719b096cb951b385787445 12-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement deletion of explicitly defaulted default constructors.

We still don't parse out-of-line defaults correctly, which is needed to
get the full effect out of this patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cf41cdd14d0b0be75bf2da4559ad5f48cc8dc33e 12-May-2011 Ted Kremenek <kremenek@apple.com> Place "conflicting distributed object modifiers..." warnings under a -W flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cdee3fee8ca4df7fb9179f29cc3ba96ac4fd0f95 12-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement implicit deletion of default constructors.

Yes, I'm aware that the diagnostics are awful.

Tests to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
6a24747beed797b2f1184c66ca45beb4db20eb08 11-May-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, allow pure specifier (=0) on inline functions declared at class scope.
This removes 2 errors when parsing MFC code with clang

Example:
class A {
virtual void f() = 0 { }
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
44054452c416a622b8f19a6d157a0affc05b9aa8 10-May-2011 Douglas Gregor <dgregor@apple.com> Tweak the diagnostics for the C++0x extensions to friend types to note
that they are C++0x extensions, and put them in the appropriate
group. We already support most of the semantics. Addresses
<rdar://problem/9407525>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f961ea5716867b5e426fb2136edd6d1f04c3a7ca 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Re-do R131114 without breaking code.

I've edited one diagnostic which would print "copy constructor" for copy
constructors and "constructor" for any other constructor. If anyone is
extremely enamored with this, it can be reinstated with a simple boolean
flag rather than calling getSpecialMember, which is inappropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
c840649ed5acccf68e1bc5a9d22f2ea017074586 10-May-2011 Douglas Gregor <dgregor@apple.com> Reimplement Sema::MatchTemplateParametersToScopeSpecifier() based on
the semantic context referenced by the nested-name-specifier rather
than the syntactic form of the nested-name-specifier. The previous
incarnation was based on my complete misunderstanding of C++
[temp.expl.spec]. The latest C++0x working draft clarifies the
requirements here, and this rewrite is intended to follow that.

Along the way, improve source location information in the
diagnostics. For example, if we report that a specific type needs or
doesn't need a 'template<>' header, we dig out that type in the
nested-name-specifier and highlight its range.

Fixes: PR5907, PR9421, PR8277, PR8708, PR9482, PR9668, PR9877, and
<rdar://problem/9135379>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
680404e0d91ac67c91097af6c62bc92f1fba5965 10-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 131114. This fixes PR9884.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
001cad932380419c6fbfecbeec63e0579f5ecbf3 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Further implement defaulting constructors.

Focus is on default constructors for the time being. Currently the
exception specification and prototype are processed correctly. Codegen
might work but in all likelihood doesn't.

Note that due to an error, out-of-line defaulting of member functions is
currently impossible. It will continue to that until I muster up the
courage to admit that I secretly pray to epimetheus and that I need to
rework the way default gets from Parse -> Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
a780da70f74ab09ed1f91c1e992abf850e5268ea 10-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> The last of the trivial constructor changes, make CXXSpecialMember
reflect our new, more accurate AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
7604f64a865bdba86c05cab76bcd47fd10372eb8 10-May-2011 Douglas Gregor <dgregor@apple.com> Ignore const/volatile/restrict qualifiers on anonymous structs and
unions. Fixes PR8326.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DeclSpec.h
37b8c9ee7cf2b4d5ce3ccd3be1fcadd18a783a57 09-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Clean up trivial default constructors now.

hasTrivialDefaultConstructor() really really means it now.

Also implement a fun standards bug regarding aggregates. Doug, if you'd
like, I can un-implement that bug if you think it is truly a defect.

The bug is that non-special-member constructors are never considered
user-provided, so the following is an aggregate:

struct foo {
foo(int);
};

It's kind of bad, but the solution isn't obvious - should

struct foo {
foo (int) = delete;
};

be an aggregate or not?

Lastly, add a missing initialization to FunctionDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
023df37c27ee8035664fb62f206ca58f4e2a169d 09-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and
modify the semantics slightly to accomodate default constructors (I
hope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/TypeTraits.h
76934c703e53f676b96e4127663b4adb0285ea4a 08-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Restore an accidentally-deleted word.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
377e1bd6853118c5b1718503569e5179c40f09b7 08-May-2011 Douglas Gregor <dgregor@apple.com> Relax the conversion rules for Objective-C GC qualifiers a
bit by allowing __weak and __strong to be added/dropped as part of
implicit conversions (qualification conversions in C++). A little
history: GCC lets one add/remove/change GC qualifiers just about
anywhere, implicitly. Clang did roughly the same before, but we
recently normalized the semantics of qualifiers across the board to
get a semantics that we could reason about (yay). Unfortunately, this
tightened the screws a bit too much for GC qualifiers, where it's
common to add/remove these qualifiers at will.

Overall, we're still in better shape than we were before: we don't
permit directly changing the GC qualifier (e.g., __weak -> __strong),
so type safety is improved. More importantly, we're internally
consistent in our handling of qualifiers, and the logic that allows
adding/removing GC qualifiers (but not adding/removing address
spaces!) only touches two obvious places.

Fixes <rdar://problem/9402499>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f986038beed360c031de8654cfba43a5d3184605 07-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for _if_exists and __if_not_exists at namespace/global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
52bbe7a1133c3cb57e9246f1b96c12940ea3821a 06-May-2011 Fariborz Jahanian <fjahanian@apple.com> Establish a new alignment for an ms_struct bitfield following
a non-bitfield if size of their types differ.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
31d375f056447d4e2418275d4913661d3bfedb3e 06-May-2011 Douglas Gregor <dgregor@apple.com> Keep track of the file ID corresponding to the original file used to
build a precompiled header. Use this information to eliminate the call
to SourceManager::getLocation() while loading a precompiled preamble,
since SourceManager::getLocation() itself causes unwanted
deserialization.

Fixed <rdar://problem/9399352>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
bb85f8edca8103aa10e4b2f4a6fcc3a251b0ea03 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Per Richard's suggestion, rename DefLoc to DefaultLoc where it appears.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
26dc3e08da33594bb2fe5466ce48b4544a626cf0 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fix diagnostics to start with a lower case letter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticSemaKinds.td
1e862693c63067ae467b0b3884c44f753cd6e821 06-May-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __if_exists and __if_not_exists construct inside function definition.
Allow to include or exclude code depending on if a symbol exists or not. Just like a #ifdef but for C/C++ symbols.

More doc: http://msdn.microsoft.com/en-us/library/x7wy9xh3(v=VS.100).aspx

Support at class and namespace scopes will be added later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/Sema.h
10620eb5164e31208fcbf0437cd79ae535ed0559 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Modify some deleted function methods to better reflect reality:

- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)

This fixes the bug that we weren't catching

void foo() = delete;
void foo() {}

as being a redefinition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
5f3827cabd526d0dd5f291d46c310103cebe7a44 06-May-2011 Eli Friedman <eli.friedman@gmail.com> Fix a couple of comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
dca8ee8b7bc86076916a3a80f553f7a4e98c14af 06-May-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang parsing flag,
CXTranslationUnit_NestedMacroInstantiations, which indicates whether
we want to see "nested" macro instantiations (e.g., those that occur
inside other macro instantiations) within the detailed preprocessing
record. Many clients (e.g., those that only care about visible tokens)
don't care about this information, and in code that uses preprocessor
metaprogramming, this information can have a very high cost.

Addresses <rdar://problem/9389320>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130990 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
2174d4c11c1544a6729637790637b765e35b67a3 06-May-2011 Anders Carlsson <andersca@mac.com> Warn when trying to call a pure virtual member function in a class from the class constructor/destructor. Fixes PR7966.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fe2695eec167b28578825576863228f86b392f24 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Do defaulted constructors properly.

Explictly defaultedness is correctly reflected on the AST, but there are
no changes to how that affects the definition of functions or much else
really.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Sema/Sema.h
5f802e51406664ca9b6e0d57fc7ce37ea97a1c65 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert r130912 in order to approach defaulted functions from the other
direction and not introduce things in the wrong place three different
times.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Sema/Sema.h
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e 05-May-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++0x alias templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/Basic/DeclNodes.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Serialization/ASTBitCodes.h
4b81cde48b8b56c219e8d665884f5f33139b5eca 05-May-2011 Douglas Gregor <dgregor@apple.com> When providing code completions for an Objective-C property access,
also include methods with zero-argument selectors. Implements
<rdar://problem/9048332>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
e59abb56ce0e1c206fb80bd945a0c358b0abe1ef 05-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a Diagnostic::Report function that accepts and emits a StoredDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
38165ae49d8af7dcc135858f347fdbce295093fd 05-May-2011 Ted Kremenek <kremenek@apple.com> Place "incompatible pointer types assigning..." warning under a flag, allowing it to be surgically mapped to an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9be6e7ce5788e50c62d40c59b0bbc2ea423683f7 05-May-2011 Ted Kremenek <kremenek@apple.com> Add Checker callback for running a checker at the end of processing an entire TranslationUnit. Patch by Lei Zhang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
ad7ec12ef2edbadb85a3754f0395ef2f06d4256c 05-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement some framework for defaulted constructors.

There's some unused stuff for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Sema/Sema.h
3dc05418538c719fea48b906bfa4febe5296e126 05-May-2011 Nick Lewycky <nicholas@mxc.ca> Preserve the full name of the file, so that '-c -o foo.pic.o' produces
foo.pic.gcno instead of foo.gcno.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
c1598700010cea9364a58a65e967b0b56361b6aa 05-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Change cycle detection to be based off of a warning flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
ebcbe1d3dc7d4f0c1f540a632fa0684dd0a857d5 05-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> there i fixed it

Increase robustness of the delegating constructor cycle detection
mechanism. No more infinite loops on invalid or logic errors leading to
false results. Ensure that this is maintained correctly accross
serialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
c9366ba8fff6461a5b7f0fd2626d1bce3e98e629 05-May-2011 Matt Beaumont-Gay <matthewbg@google.com> Implement Sema::isExprCallable.

We can use this to produce nice diagnostics (and try to fixit-and-recover) in
various cases where we might see "MyFunction" instead of "MyFunction()". The
changes in SemaExpr are an example of how to use isExprCallable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5ea4f44e34449a78d6b38aa47c14b527839d7aac 04-May-2011 Nick Lewycky <nicholas@mxc.ca> Record where the GCOV data files should be placed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
9b3acaa32548d0ce78b9c39a3911397f6738a47c 04-May-2011 Fariborz Jahanian <fjahanian@apple.com> More ms_struct bitfield stuff:
Adjacent bit fields are packed into the same 1-, 2-, or
4-byte allocation unit if the integral types are the same
size. // rdar://8823265.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
69d891d45a29fdd0074ff3eb158694e95fef57e1 04-May-2011 Axel Naumann <Axel.Naumann@cern.ch> From Vassil Vassilev:
Like in r126648, provide (empty) default implementation for pure virtual getMemoryBufferSizes(). Not all use cases have meaningful implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
fe57eef44cc80e5bb51e4f484835be08b8d84256 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a better version of delegating constructor cycle detection.

This is more efficient as it's all done at once at the end of the TU.
This could still get expensive, so a flag is provided to disable it. As
an added bonus, the diagnostics will now print out a cycle.

The PCH test is XFAILed because we currently can't deal with a note
emitted in the header and I, being tired, see no other way to verify the
serialization of delegating constructors. We should probably address
this problem /somehow/ but no good solution comes to mind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Sema/Sema.h
5e1db6a434d0e3fe0fbde0bca2ec44552818fb22 04-May-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to return the amount of memory used by the Preprocessor's bump allocator as well as those from the PreprocessingRecord.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130823 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/PreprocessingRecord.h
156b640c67300f2b70eb11102aa393a610798cc6 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement serialization of delegating constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
fa74c2344addf92826c938758fb4dc612a004eb9 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Ensure that delegating constructor loop detection uses canonical
declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
dd3e5549e3c11e217078938aacf72f042eea5343 04-May-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),
which determines whether a particular file is actually a header that
is intended to be guarded from multiple inclusions within the same
translation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130808 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/HeaderSearch.h
d808bd2978bd4ac95a92b309b038452b533fd7a0 04-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTUnit::LoadFromCompilerInvocationAction that allows one to create an ASTUnit
from a CompilerInvocation along with an ASTFrontendAction to invoke, and without all the goo
about the precompiled preamble.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
06bc9eb9908e42696775b395b290827bde468c8b 03-May-2011 Douglas Gregor <dgregor@apple.com> Extend -Wnon-pod-memset to also encompass memcpy() and memmove(),
checking both the source and the destination operands, renaming the
warning group to -Wnon-pod-memaccess and tweaking the diagnostic text
in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
2a053a33707eba9e642adedb557b1a6aace103b5 03-May-2011 Douglas Gregor <dgregor@apple.com> Separate the -Wnon-pod-memset warnings into two separate warnings:
- a default-on warning for pointers to dynamic classes (= classes with vtables)
- a default-off warning for other non-POD types



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0f4be74ff0273e505d383f89174ef539828424ed 03-May-2011 Chandler Carruth <chandlerc@gmail.com> When parsing a template friend declaration we dropped the template
parameters on the floor in certain cases:
class X {
template <typename T> friend typename A<T>::Foo;
};

This was parsed as a *non* template friend declaration some how, and
received an ExtWarn. Fixing the parser to actually provide the template
parameters to the freestanding declaration parse triggers the code which
specifically looks for such constructs and hard errors on them.

Along the way, this prevents us from trying to instantiate constructs
like the above inside of a outer template. This is important as loosing
the template parameters means we don't have a well formed declaration
and template instantiation will be unable to rebuild the AST. That fixes
a crash in the GCC test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
2bc0e5d955dbee5518afa59e1c66025a78b097f1 03-May-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add a few ARM coprocessor builtins. The llvm side of the commit contains the intrinsics and matching patterns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
1dd986dff9ddfbec687975700770bb377988e9ed 03-May-2011 Richard Trieu <rtrieu@google.com> Added an assert to IntegerLiteral to ensure that the integer type passed in has the same size as the APInt passed in. Also, updated the comments around IntegerLiteral.

Changed the integer type that range-based for-loops used. Switched to pointer difference type, which satisfies the new assert in IntegerLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1a584022c86bd0778cf7ad1fbea08c78869cf216 02-May-2011 Eric Christopher <echristo@apple.com> Add the -mstackrealign option which just communicates the need to
force align the stack to the backend.

Fixes rdar://9289631


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
35bdbf40624beba3fc00cb72ab444659939c1a6b 02-May-2011 Ted Kremenek <kremenek@apple.com> Augment retain/release checker to not warn about tracked objects passed as arguments to C++ constructors. This is a stop-gap measure for Objective-C++ code that uses smart pointers to manage reference counts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
b2dba4bc0eee144baa60e36599a0887496d1295e 02-May-2011 Chad Rosier <mcrosier@apple.com> When using -std= flag added check to make sure language and standard are compatable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandard.h
lang/Frontend/LangStandards.def
f4bbbf0aaf741cc7d014e2cf059670a6756f8cbd 02-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a warning for when reinterpret_cast leads to undefined behavior, patch by Richard Trieu!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
340fa242130c2d8d74c83edca0952e771aebe0e6 02-May-2011 Fariborz Jahanian <fjahanian@apple.com> More rule enforcement of zero bitfields for ms_struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7f00f842aaf628c1b02c471a233184024511fedd 02-May-2011 Chandler Carruth <chandlerc@gmail.com> I updated this constructor's interface, and didn't have to fix any
callers. Shockingly enough, *there are none*!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7079886ab5a9df450ed773419f0ae81f8404e2aa 02-May-2011 John McCall <rjmccall@apple.com> Revise the representation of parameter scope data so that the
scope depth overlaps with the ObjCDeclQualifier, dropping
memory usage back to previous levels.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3aa8140bde5b9bedf13e46ec0a668daa54814196 02-May-2011 Chandler Carruth <chandlerc@gmail.com> Add an optional field attached to a DeclRefExpr which points back to the
Decl actually found via name lookup & overload resolution when that Decl
is different from the ValueDecl which is actually referenced by the
expression.

This can be used by AST consumers to correctly attribute references to
the spelling location of a using declaration, and otherwise gain insight
into the name resolution performed by Clang.

The public interface to DRE is kept as narrow as possible: we provide
a getFoundDecl() which always returns a NamedDecl, either the ValueDecl
referenced or the new, more precise NamedDecl if present. This way AST
clients can code against getFoundDecl without know when exactly the AST
has a split representation.

For an example of the data this provides consider:
% cat x.cc
namespace N1 {
struct S {};
void f(const S&);
}
void test(N1::S s) {
f(s);
using N1::f;
f(s);
}

% ./bin/clang -fsyntax-only -Xclang -ast-dump x.cc
[...]
void test(N1::S s) (CompoundStmt 0x5b02010 <x.cc:5:20, line:9:1>
(CallExpr 0x5b01df0 <line:6:3, col:6> 'void'
(ImplicitCastExpr 0x5b01dd8 <col:3> 'void (*)(const struct N1::S &)' <FunctionToPointerDecay>
(DeclRefExpr 0x5b01d80 <col:3> 'void (const struct N1::S &)' lvalue Function 0x5b01a20 'f' 'void (const struct N1::S &)'))
(ImplicitCastExpr 0x5b01e20 <col:5> 'const struct N1::S' lvalue <NoOp>
(DeclRefExpr 0x5b01d58 <col:5> 'N1::S':'struct N1::S' lvalue ParmVar 0x5b01b60 's' 'N1::S':'struct N1::S')))
(DeclStmt 0x5b01ee0 <line:7:3, col:14>
0x5b01e40 "UsingN1::;")
(CallExpr 0x5b01fc8 <line:8:3, col:6> 'void'
(ImplicitCastExpr 0x5b01fb0 <col:3> 'void (*)(const struct N1::S &)' <FunctionToPointerDecay>
(DeclRefExpr 0x5b01f80 <col:3> 'void (const struct N1::S &)' lvalue Function 0x5b01a20 'f' 'void (const struct N1::S &)' (UsingShadow 0x5b01ea0 'f')))
(ImplicitCastExpr 0x5b01ff8 <col:5> 'const struct N1::S' lvalue <NoOp>
(DeclRefExpr 0x5b01f58 <col:5> 'N1::S':'struct N1::S' lvalue ParmVar 0x5b01b60 's' 'N1::S':'struct N1::S'))))

Now we can tell that the second call is 'using' (no pun intended) the using
declaration, and *which* using declaration it sees. Without this, we can
mistake calls that go through using declarations for ADL calls, and have no way
to attribute names looked up with using declarations to the appropriate
UsingDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
fb44de956f27875def889482b5393475060392af 02-May-2011 John McCall <rjmccall@apple.com> Store a parameter index and function prototype depth in every
parameter node and use this to correctly mangle parameter
references in function template signatures.

A follow-up patch will improve the storage usage of these
fields; here I've just done the lazy thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Sema/Scope.h
lang/Sema/Sema.h
6857c3e12c86fd0271eb46baab5b18756a94f4cb 02-May-2011 Chandler Carruth <chandlerc@gmail.com> Remove the NameQualifier struct, which was just a wrapper around
NestedNameSpecifierLoc. It predates when we had such an object.

Reference the NNSLoc directly in DREs, and embed it directly into the
MemberNameQualifier struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7e740bd36772aae16b5cc5e605998ccc5eaf26db 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Several cosmetic changes, no functionality changed.

Mostly trailing whitespace so that me editor nuking it doesn't muddy the
waters of subsequent commits that do change functionality.

Also nukes a stray statement that was harmless but redundant that
I introduced in r130666.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cb66cff8fdf641f57f85dedb515a5f3240e3a9bb 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Move the state bits in DeclRefExpr out of the pointer union and into
a bitfield in the base class. DREs weren't using any bits here past the
normal Expr bits, so we have plenty of room. This makes the common case
of getting a Decl out of a DRE no longer need to do any masking etc.

Also, while here, clean up code to use the accessor methods rather than
directly poking these bits, and provide a nice comment for DREs that
includes the information previously attached to the bits going into the
pointer union.

No functionality changed here, but DREs should be a tad faster now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
5d65e34b08b3e57a4da834195757d0d15baaffd0 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Switch getAs to castAs (didn't know about this before!) and simplify
some code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
960d13dde337a59dacc9dc3936c26d4aa8478986 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Based on the new information in the AST provided by r130628, write
3 lines of code and improve a bunch of information in the libclang view
of the code.

Updates the two tests that exercise this with the new data, checking
that each new source location actually points back to the declared
template parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
aaf147be3cc7403d8f7889d363421bb291ef23f2 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Move several more type traits' implementations into the AST. A few were
already present in the AST, and I added the ones that weren't.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d064c70bc63ad742d11625e485c1dc1631f6e303 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Remove more dead code for emitting diagnostics. The callers of these
functions already precluded dependent types from reaching them.

Also change one of the callers to not error when a trait is applied to
a dependent type. This is a perfectly reasonable pattern, and both Unary
and Binary type traits already support dependent types (by populating
the AST with a nonce value).

Remove the actual diagnostic, since these aren't errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
336f51e463340dc7b159bc38517ac4a68081302d 01-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve traversing of BlockExprs in RecursiveASTVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
98fa94d2564057555c4a12e8737b8371700cf6e4 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Remove the type traits UTT_IsLvalueExpr and UTT_IsRvalueExpr.

As might be surmised from their names, these aren't type traits, they're
expression traits. Amazingly enough, they're expression traits that we
have, and fully implement. These "type" traits are even parsed from the
same tokens as the expression traits. Luckily, the parser only tried the
expression trait parsing for these tokens, so this was all just a pile
of dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TypeTraits.h
059ce0d92eb5a7da900ae735dc0a2ea3d64f4b0b 01-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fully implement delegating constructors!

As far as I know, this implementation is complete but might be missing a
few optimizations. Exceptions and virtual bases are handled correctly.

Because I'm an optimist, the web page has appropriately been updated. If
I'm wrong, feel free to downgrade its support categories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Initialization.h
lang/Sema/Sema.h
09e2c524a18435211cfbc2fb355f91e1ac43ea89 01-May-2011 John McCall <rjmccall@apple.com> Improve the documentation for the two ObjCDeclQualifiers so that I
stop considering whether I can compress them. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Sema/DeclSpec.h
f1e4fbf3112f33ec5b7bc5c57ec148445190d0a8 01-May-2011 John McCall <rjmccall@apple.com> Compress some bits. Only matters for MSVC, or if we ever
devirtualize Decl (because bits can't get laid out in base
classes if the base is POD).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b7efff4bae117604f442bb6859c844f90b15f3ff 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Switch the interface name for both TemplateTypeParmType and
SubstTemplateTypeParmType to be 'getIdentifier' instead of 'getName' as
it returns an identifier. This makes them more consistent with the
NamedDecl interface.

Also, switch back to using this interface to acquire the indentifier in
TypePrinter.cpp. I missed this in r130628.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
4fb86f8c4585e53c21c847ad3de9e3b2de123cd9 01-May-2011 Chandler Carruth <chandlerc@gmail.com> Re-applies the patch first applied way back in r106099, with
accompanying fixes to make it work today.

The core of this patch is to provide a link from a TemplateTypeParmType
back to the TemplateTypeParmDecl node which declared it. This in turn
provides much more precise information about the type, where it came
from, and how it functions for AST consumers.

To make the patch work almost a year after its first attempt, it needed
serialization support, and it now retains the old getName() interface.
Finally, it requires us to not attempt to instantiate the type in an
unsupported friend decl -- specifically those coming from template
friend decls but which refer to a specific type through a dependent
name.

A cleaner representation of the last item would be to build
FriendTemplateDecl nodes for these, storing their template parameters
etc, and to perform proper instantation of them like any other template
declaration. They can still be flagged as unsupported for the purpose of
access checking, etc.

This passed an asserts-enabled bootstrap for me, and the reduced test
case mentioned in the original review thread no longer causes issues,
likely fixed at somewhere amidst the 24k revisions that have elapsed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
f24a151d645abc89f94aa58ad59f3131502041b1 30-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -fno-dwarf2-cfi-asm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
769d0cc72b1831785596d0e76f327bdb887823be 30-Apr-2011 Douglas Gregor <dgregor@apple.com> When comparing parameters of reference-to-qualified type during
partial ordering of function templates, use a simple superset
relationship rather than the convertibility-implying
isMoreQualifiedThan/compatibilyIncludes relationship. Fixes partial
ordering between references and address-space-qualified references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ec997dc66627957bcdcd3db7906a68c1e14a279c 30-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Rename the last '[hH]asStandardLayout' entites to '[iI]sStandardLayout'
based on Doug's preferences when we discussed this in IRC. This brings
the wording more in line with the standard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
636a617cc6021a4366380b3ce673f4472f3d99db 30-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Hoist all of the type-specific trait logic for __is_standard_layout into
a Type method isStandardLayoutType, to keep our user API matching the
type trait builtins as closely as possible. Also, implement it in terms
of other Type APIs rather than in terms of other type traits. This
models the implementation on that of isLiteralType and isTrivialType.
There remain some common problems with these traits still, so this is
a bit of a WIP. However, we can now fix all of these traits at the same
time and in a consistent manner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a8225449421e8c1e996a7c48300521028946482a 30-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Completely re-implement the core logic behind the __is_standard_layout
type trait. The previous implementation suffered from several problems:

1) It implemented all of the logic in RecordType by walking over every
base and field in a CXXRecordDecl and validating the constraints of
the standard. This made for very straightforward code, but is
extremely inefficient. It also is conceptually wrong, the logic tied
to the C++ definition of standard-layout classes should be in
CXXRecordDecl, not RecordType.
2) To address the performance problems with #1, a cache bit was added to
CXXRecordDecl, and at the completion of every C++ class, the
RecordType was queried to determine if it was a standard layout
class, and that state was cached. Two things went very very wrong
with this. First, the caching version of the query *was never
called*. Even within the recursive steps of the walk over all fields
and bases the caching variant was not called, making each query
a full *recursive* walk. Second, despite the cache not being used, it
was computed for every class declared, even when the trait was never
used in the program. This probably significantly regressed compile
time performance for edge-case files.
3) An ASTContext was required merely to query the type trait because
querying it performed the actual computations.
4) The caching bit wasn't managed correctly (uninitialized).

The new implementation follows the system for all the other traits on
C++ classes by encoding all the state needed in the definition data and
building up the trait incrementally as each base and member are added to
the definition of the class.

The idiosyncracies of the specification of standard-layout classes
requires more state than I would like; currently 5 bits. I could
eliminate one of the bits easily at the expense of both clarity and
resilience of the code. I might be able to eliminate one of the other
bits by computing its state in terms of other state bits in the
definition. I've already done that in one place where there was a fairly
simple way to achieve it.

It's possible some of the bits could be moved out of the definition data
and into some other structure which isn't serialized if the serialized
bloat is a problem. That would preclude serialization of a partial class
declaration, but that's likely already precluded.

Comments on any of these issues welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
3fd823b0625eba87153fe592a0fd12e088db3b36 30-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Reject invalid arch combinations with
-mios-simulator-version-min.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
9d609f2b0dd604879f8b284ded1f14ba300e8070 30-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Sketch initial support for a -mios-simulator-version-min= flag
and associated deployment target environment variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
654f6b2b53af2c950c62ef0161fa021648accbcb 30-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a couple of assertions to make sure the bitfields can fit the value assigned to them. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
a0fa203f04235cb6d05eeb8cea3392a01aa7571b 30-Apr-2011 Bob Wilson <bob.wilson@apple.com> Add -Oz option and use it to set the inline threshold to 25.
Radar 9333566. Patch by Chad Rosier!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
202e123d0d680af6d1754b22246ea63fb3604931 29-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Disable -Wnon-pod-memset for now while I try to reduce the false
positives still further.

The plan is to:

1) Create a more targeted warning for memset of memory pointing at
a type with virtual methods or bases where a vptr would be
overwritten.
2) Consider turning the above warning back on by default.
3) Evaluate whether any false positives in the existing warning can be
detected and white listed in the warning implementation.
4) If #3 lowers the noise floor enough, enable the full warning in -Wall
or -Wextra.

Comments or suggestions welcome. Even more welcome are specific test
cases which trigger the warning and shouldn't.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0a241a1755b5e4d3adb0d828dff42f96a5a8bd95 29-Apr-2011 Ted Kremenek <kremenek@apple.com> Change -Wparentheses to not imply -Widiomatic-parentheses. Users rarely want to see these warnings, and often explicitly pass -Wparentheses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
43fa33b4bedc28d2faa17d678ad1f40eb42817a1 29-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Relax the non-POD memset warning to use the less restrictive C++11
definition of POD. Specifically, this allows certain non-aggregate
types due to their data members being private.

The representation of C++11 POD testing is pretty gross. Any suggestions
for improvements there are welcome. Especially the name
'isCXX11PODType()' seems truly unfortunate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f79a71908d6f28cb2bc0c081d9a801ed14d61d82 29-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Add a decl update when a static data member of a class template is instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTWriter.h
0acc4ea40d2a75fbaf385e095a252f59078c7b94 29-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Use std::vector for ASTReader's ASTBuffers, instead of std::deque.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
e9b5f3d4acfc2ad6e8b65a4072464e997dea9ed3 29-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report the sizes of the memory buffers used by PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130460 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTReader.h
lang/Serialization/ChainedIncludesSource.h
f61b831d7f6a15676b07647f507de80324cb7056 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report how much memory is used by SourceManager's memory buffers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130433 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/SourceManager.h
25aaf28c5bec71d5d005df67ee78b908ba5940f4 28-Apr-2011 Manuel Klimek <klimek@google.com> Fixes ArrayTypeTraitExpr (-Wnon-virtual-dtor).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
3cda937d4c015ff6070f1117024621a452cfaddd 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Add comment to CFGBlock suggested by Jiri Slaby.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
ba29bd25515fbd99e98ba0fedb9d93617b27609e 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report the amount of memory used by ASTContext's side tables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130383 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/ASTContext.h
457aaf0692dfb2d9638f383334b81027f637f20c 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Enhance clang_getCXTUResourceUsage() to report the amount of memory used by SourceManager's content cache allocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130380 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/SourceManager.h
cf5664114eb75c6a5fef2bed1c0f0d0fb19debc9 28-Apr-2011 John Wiegley <johnw@boostpro.com> A few corrections to type traits that missed the last checkin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
338d7f7362d18fa9c39c6bb5282b4e20574a9309 28-Apr-2011 Francois Pichet <pichet2000@gmail.com> Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin defines to real types.

Otherwise statements like:
__int64 var = __int64(0);

would be expanded to:
long long var = long long(0);

and fail to compile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
28bbe4b8acc338476fe0825769b41fb32b423c72 28-Apr-2011 John Wiegley <johnw@boostpro.com> Parsing/AST support for Structured Exception Handling

Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/IdentifierTable.h
lang/Basic/StmtNodes.td
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Sema.h
61d0b6baf47cf411f6c0f6ddb4acffcfeec724f1 28-Apr-2011 Douglas Gregor <dgregor@apple.com> More cleanup of template argument deduction and its handling of
non-CVR qualifiers. We can now properly match address-space--qualified
references during template argument deduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 28-Apr-2011 John Wiegley <johnw@boostpro.com> Implementation of Embarcadero array type traits

Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
20c0da7787c9a7d2529e42a4a91d777778595d74 28-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/type-traits

Patch authored by John Wiegley.

These type traits are used for parsing code that employs certain features of
the Embarcadero C++ compiler. Several of these constructs are also desired by
libc++, according to its project pages (such as __is_standard_layout).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
26517e4ffe7c2c366496feb02370ba24ab5ae8f5 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Remove unused method CFGBlock::hasBinaryBranchTerminator().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
14d56ef43ff4921c6749f7340212fbb743fdbb9b 27-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of my ms_struct patch.
// rdar://8823265 related.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9a05fa97df4d5e64f740848a7759ecae5e1ed162 27-Apr-2011 Manuel Klimek <klimek@google.com> This is the next step in building the standalone tools infrastructure:
This patch simplifies writing of standalone Clang tools. As an
example, we add clang-check, a tool that runs a syntax only frontend
action over a .cc file. When you integrate this into your favorite
editor, you get much faster feedback on your compilation errors, thus
reducing your feedback cycle especially when writing new code.

The tool depends on integration of an outstanding patch to CMake to
work which allows you to always have a current compile command
database in your cmake output directory when you set
CMAKE_EXPORT_COMPILE_COMMANDS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/Tooling.h
7ccc95bceebb2d1c8fbe277c9e33bde7dc1ccbb1 27-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Add a warning (-Wnon-pod-memset) for calls to memset() with
a destination pointer that points to a non-POD type. This can flag such
horrible bugs as overwriting vptrs when a previously POD structure is
suddenly given a virtual method, or creating objects that crash on
practically any use by zero-ing out a member when its changed from
a const char* to a std::string, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
d46a1125d43bcfd47fbd1206ebd1226863549390 27-Apr-2011 John McCall <rjmccall@apple.com> Diagnose attempts to implicitly instantiate a template before it is
fully defined. Somehow this escaped notice for a very long time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5ecdd78408a1c6f4be506d94f776642570d27336 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Introduce a new parser annotation token for primary expressions. When
ClassifyName() builds a primary expression, generate one of these
annotation tokens rather than jumping into the parser.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
d0719b183ae331e0e8731c486f21392e0eb288c3 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Clean out some cruft I introduced when adding Sema::ClassifyName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d9d75e57dfa22366c0379c92beac1db82db34e9a 27-Apr-2011 Douglas Gregor <dgregor@apple.com> Simplify the parser's handling of Sema::ClassifyName() for types, by
creating a type-annotation token rather than jumping into the
declaration parsing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
6b4f567109d76ce1f1de289554e35f2a7bbeff6b 27-Apr-2011 Ted Kremenek <kremenek@apple.com> Allow 'Environment::getSVal()' to allow an optional way for checkers to do a direct lookup to values bound to expressions, without
resulting to lazy logic. This is critical for the OSAtomicChecker that does a simulated load on any arbitrary expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/Environment.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
0047012d99e9f80e242f9dbbc374049d478ffc6f 27-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add support for Microsoft __interface keyword. An __interface class is basically a normal class containing just pure virtual functions. No urgency to enforce that restriction in clang for now, so make __interface an "class" alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
b7d98d35ea723624345f06e5895ddce2e0388ef0 27-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> If a null statement was preceded by an empty macro keep its instantiation source location
in NullStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Lex/Preprocessor.h
lang/Sema/Sema.h
028ea4bf0c643e0e2a8fa086c28beb0d5b594ba7 27-Apr-2011 Douglas Gregor <dgregor@apple.com> When computing Objective-C pointer conversions in C++, retain
the qualifiers (e.g., GC qualifiers) on the type we're converting
from, rather than just blindly adopting the qualifiers of the type
we're converting to or dropping qualifiers altogether.

As an added bonus, properly diagnose GC qualifier mismatches to
eliminate a crash in the overload resolution failure diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7412494982c8b50c90961302c3a718633b2c3ab7 26-Apr-2011 Manuel Klimek <klimek@google.com> To be able to replay compilations we need to accurately remodel how
includes get resolved, especially when they are found relatively to
another include file. We also try to get it working for framework
includes, but that part of the code is untested, as I don't have a code
base that uses it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
864c041e118155c2b1ce0ba36942a3da5a4a055e 26-Apr-2011 John McCall <rjmccall@apple.com> Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function. Diagnose this in the general case. Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/Type.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
c1a0a73c1fad684dd23e9aade02c4e00dbaeaee6 26-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Add ms_struct attribute on record typee
(and ignore it for now) - wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
lang/Sema/Sema.h
7a3a8148ab21dba3965622b03969bae721d561e2 26-Apr-2011 NAKAMURA Takumi <geek4civic@gmail.com> include/clang/AST/StmtIterator.h: std::pair should be provided by <utility>. libcxx needs it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
8d8f2c20f3e21c7516e5d27293f08283913904d1 26-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a crash when ASTReader emits diagnostic when another one is in flight. Fixes rdar//9334563.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
62c9258f4a71569a66d805fc7776526a2c76b34e 25-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Recognize gcc's ms_struct pragma (and ignore for now).
This is wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
8d5fcc7e3fc7347b87b6a95b398d5e17faf974e0 25-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add Windows SEH keywords.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
552622067dc45013d240f73952fece703f5e63bd 25-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/expr-traits

Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/ExpressionTraits.h
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
912d372642584b1d91ac75cb5da8e0eb8155c7b1 25-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Missing bit of r130117.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
74b485a2b36c0ba33a85ba9cb6e36e0e3a1fada1 24-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Set the correct anonymous namespace (must be last reopening), and behave correctly in the presence of the ever-annoying linkage specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
58a2cd8c0d52e710cbcc57a67eac7b51b0b831c4 24-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Synthesizing the definition of an implicit member is an AST modification, so notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/ASTMutationListener.h
lang/Sema/Sema.h
lang/Serialization/ASTWriter.h
9856c993d5bbe966290ef36de8dc5428a0097710 24-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Give MultiplexConsumer.h a header guard.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/MultiplexConsumer.h
b5ef3ca808b16aa2ba010251773e820f57190d1a 24-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Fix PathDiagnosticClients.h header guard. (Case error)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathDiagnosticClients.h
a5d318ad4ad3a110b3abb34f765e69b76f7c0bcd 24-Apr-2011 Francois Pichet <pichet2000@gmail.com> Downgrade unnecessary "typename" from error to warning in Microsoft mode.
This fixes 1 error when parsing MSVC 2008 headers with clang.

Must "return true;" even if it is a warning because the rest of the code path assumes that SS is set to something. The parser will get back on its feet and continue parsing the rest of the declaration correctly so it is not a problem.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
312eadb832cab4497a069409954500d8192b8f0d 24-Apr-2011 Douglas Gregor <dgregor@apple.com> Implement a new identifier-classification scheme where Sema
performs name lookup for an identifier and resolves it to a
type/expression/template/etc. in the same step. This scheme is
intended to improve both performance (by reducing the number of
redundant name lookups for a given identifier token) and error
recovery (by giving Sema a chance to correct type names before the
parser has decided that the identifier isn't a type name). For
example, this allows us to properly typo-correct type names at the
beginning of a statement:

t.c:6:3: error: use of undeclared identifier 'integer'; did you mean
'Integer'?
integer *i = 0;
^~~~~~~
Integer
t.c:1:13: note: 'Integer' declared here
typedef int Integer;
^


Previously, we wouldn't give a Fix-It because the typo correction
occurred after the parser had checked whether "integer" was a type
name (via Sema::getTypeName(), which isn't allowed to typo-correct)
and therefore decided to parse "integer * i = 0" as an expression. By
typo-correcting earlier, we typo-correct to the type name Integer and
parse this as a declaration.

Moreover, in this context, we can also typo-correct identifiers to
keywords, e.g.,

t.c:7:3: error: use of undeclared identifier 'vid'; did you mean
'void'?
vid *p = i;
^~~
void

and recover appropriately.

Note that this is very much a work-in-progress. The new
Sema::ClassifyName is only used for expression-or-declaration
disambiguation in C at the statement level. The next steps will be to
make this work for the same disambiguation in C++ (where
functional-style casts make some trouble), then push it
further into the parser to eliminate more redundant name lookups.

Fixes <rdar://problem/7963833> for C and starts us down the path of
<rdar://problem/8172000>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
1501ba306cf9370e409db42991cb636232237b11 24-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Put -Wunneeded-internal-declaration under UnusedFunction group so it will be disabled with -Wno-unused-function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
9b6347cd410be55425f7062d22fd6e4ecb4e1a58 24-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Implement most of the remaining logic in __is_literal type trait. This
should now support all of the C++98 types, and all of the C++0x types
Clang supports.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
3840281126e7d10552c55f6fd8b1ec9483898906 24-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Add support for '__is_literal_type' spelling of the existing
'__is_literal' type trait for GCC compatibility. At least one relased
version if libstdc++ uses this name for the trait despite it not being
documented anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
4d6e5a22d9481bb83b82d911727540096d171c0b 24-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Begin tracking trivialness of move constructors and move assignment
operators in C++ record declarations.

This patch starts off by updating a bunch of the standard citations to
refer to the draft 0x standard so that the semantics intended for move
varianst is clear. Where necessary these are duplicated so they'll be
available in doxygen.

It adds bit fields to keep track of the state for the move constructs,
and updates all the code necessary to track this state (I think) as
members are declared for a class. It also wires the state into the
various trait-like accessors in the AST's API, and tests that the type
trait expressions now behave correctly in the presence of move
constructors and move assignment operators.

This isn't complete yet due to these glaring FIXMEs:
1) No synthesis of implicit move constructors or assignment operators.
2) I don't think we correctly enforce the new logic for both copy and
move trivial checks: that the *selected* copy/move
constructor/operator is trivial. Currently this requires *all* of them
to be trivial.
3) Some of the trait logic needs to be folded into the fine-grained
trivial bits to more closely match the wording of the standard. For
example, many of the places we currently set a bit to track POD-ness
could be removed by querying other more fine grained traits on
demand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0d2d1bcef51993ca3fd957e45fb7ec85e45016e5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Teach the AST reader and writer to preserve the __DEPRECATED bit in
language options, and warn when reading an AST with a different value
for the bit.

There doesn't appear to be a good way to test this (commenting out
similar other language options doesn't break anything) but if folks have
suggestions on tests I'm happy to add them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
c69a505cfa318d571ce8a0cd038c8d958585a735 23-Apr-2011 Jay Foad <jay.foad@gmail.com> Remove unused STL header includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Driver/Arg.h
lang/Frontend/ASTConsumers.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroInfo.h
lang/Lex/PTHLexer.h
lang/Lex/Pragma.h
lang/Lex/PreprocessorLexer.h
lang/Parse/Parser.h
lang/Rewrite/FrontendActions.h
lang/Rewrite/Rewriter.h
lang/StaticAnalyzer/Core/CheckerProvider.h
f8c247d247f9f7ab2bf4965677e6d056711c99d5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Move all of the logic for __DEPRECATED to the driver based on comments
from dgregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
89ebaed91cca7fd296ec7804e4e9fb68949c1d0e 23-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> "note" location of forward class used as receiver of
a 'deprecated' selector in the diagnostics for the
selector. // rdar://9309223



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4a47e8d35dc1778ef7e428d9edd7676be67e725f 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Remove unnecessary const away cast in LateTemplateParserCallback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
b7e9589bce9852b4db9575f55ac9137572147eb5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Implement basic __is_trivial type-trait support, enough to close PR9472.
This introduces a few APIs on the AST to bundle up the standard-based
logic so that programmatic clients have access to exactly the same
behavior.

There is only one serious FIXME here: checking for non-trivial move
constructors and move assignment operators. Those bits need to be added
to the declaration and accessors provided.

This implementation should be enough for the uses of __is_trivial in
libstdc++ 4.6's C++98 library implementation.

Ideas for more thorough test cases or any edge cases missing would be
appreciated. =D

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
4e61ddd644e9c6293697a966d98d7c1905cf63a8 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Sort the type traits in a few places where they weren't previously
sorted in order to prepare for adding some new ones.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
1cfe3c305c0d5393fd94167808b8f5d96cd65227 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. This
matches GCC behavior which libstdc++ uses to limit #warning-based
messages about deprecation.

The machinery involves threading this through a new '-fdeprecated-macro'
flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We
turn the flag off in the driver when the warning is turned off (modulo
matching some GCC bugs). We record this as a language option, and key
the preprocessor on the option when introducing the define.

A separate flag rather than a '-D' flag allows us to properly represent
the difference between C and C++ builds (only C++ receives the define),
and it allows the specific behavior of following -Wdeprecated without
potentially impacting the set of user-provided macro flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
f3babb93eba416ff30c4408d843b7408221e1d4e 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> GCC overloads -Wwrite-strings just to make it extra confusing. While it
changes language semantics in C and ObjC (which Clang has supported for
a while), in C++ it's the name used for Clang's
-Wdeprecated-writable-strings.

Clang's name is at least less overloaded if still confusing (the string
isn't writable, we just allow converting to a non-const pointer without
warning), so I've left it in place and made the GCC name an alias for
compatibility.

With this I've implemented all the aspects of GCC's -Wwrite-strings I've
encountered which didn't work with Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
50465d1d2f5f6dd3d8e18e2cf7bad4691e5ca6a8 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> There were some frustrating problems with the implementation of
-Wwrite-strings. First and foremost, once the positive form of the flag
was passed, it could never be disabled by passing -Wno-write-strings.
Also, the diagnostic engine couldn't in turn use -Wwrite-strings to
control diagnostics (as GCC does) because it was essentially hijacked to
drive the language semantics.

Fix this by giving CC1 a clean '-fconst-strings' flag to enable
const-qualified strings in C and ObjC compilations. Corresponding
'-fno-const-strings' is also added. Then the driver is taught to
introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings'
dominates.

This entire flag is basically GCC-bug-compatibility driven, so we also
match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm
open to changing this though as it seems insane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
bb29d1ba8b0895e3923c724f49845636f35b4bde 23-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't allow reinterpret_cast to reference of vector element and property expression. Thanks goes to Eli Friedman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d4a0caf78e7c18e7aca65fbfd799a6c024ff51fb 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Correctly emit a diagnostic for multiple templated function definitions in -flate-template-parsing mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b464a5b18916b467ed884d07f9e34295d39cec0a 23-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> reinterpret_cast to reference of a bit-field is not allowed.

Fixes rdar://9202628 & http://llvm.org/PR9564.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
788440378c442562497c09610939cbe6218ab43d 23-Apr-2011 Douglas Gregor <dgregor@apple.com> At the end of the translation unit, defining a vtable can introduce
new templates that need to be instantiated and vice-versa. Iterate
until we've instantiated all required templates and defined all
required vtables. Fixed PR9325 / <rdar://problem/9055177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.

Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Parse/Parser.h
lang/Sema/Sema.h
64089cece350472c04b420c497ae391443353325 23-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes an instance method meta-data generation bug in
ObjC NeXt runtime where method pointer registered in
metadata belongs to an unrelated method. Ast part of this fix,
I turned at @end missing warning (for class
implementations) into an error as we can never
be sure that meta-data being generated is correct.
// rdar://9072317


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
cf320c6388c90f1938c264e87d77a0e43946e2c3 22-Apr-2011 Francois Pichet <pichet2000@gmail.com> For consistency, change suffix from war_ to warn_ for some Microsoft warnings I introduced lately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
2e510a0c0f7afa7951aa19c65a06c2da579535a8 22-Apr-2011 Francois Pichet <pichet2000@gmail.com> Downgrade error "static declaration of 'foo' follows non-static declaration" to a warning in Microsoft mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
49e5b913d7953dfbf62a020e648b725038de4789 22-Apr-2011 Francois Pichet <pichet2000@gmail.com> _declspec is an alias for __declspec.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
e8ba8d78a258ec992d3521eebdae8324db777b14 22-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
compile time) and .gcda emission (at runtime). --coverage enables both.

This does not yet add the profile_rt library to the link step if -fprofile-arcs
is enabled when linking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
144bc08f5fe6046bd8e07de5e41a4237dd2c6275 22-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't hide #warnings in a system header, same as gcc. Fixes rdar://8495837.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticIDs.h
lang/Basic/DiagnosticLexKinds.td
bb9b80c308d7d3f758886243c7145404a50c66cf 21-Apr-2011 Richard Trieu <rtrieu@google.com> Add a fixit suggest for missing case keywords inside a switch scope. For instance, in the following code, 'case ' will be suggested before the '1:'

switch (x) {
1: return 0;
default: return 1;
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/Scope.h
lang/Sema/Sema.h
723b1782460bc448d9d865e9b828c09d26a50964 21-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Alphabetize this one flag, just to pull it out of my patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
3e8dc2ac8926dfbebd8f2f6b74ceba4befccd4d2 21-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the ArrayFiller to fill out "holes" in the array initializer due to designated initializers,
avoiding to create separate Exprs for each one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cf3ce5d89628b3955c638fb102c8dc4c24e1986d 21-Apr-2011 Manuel Klimek <klimek@google.com> Adds a function to run FrontendActions over in-memory code. This is
the first step towards a standalone Clang tool infrastructure.
The plan is to make it easy to build command line tools that run over
the AST of source files in a project outside of the build system.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Tooling/Tooling.h
0e02f6ef48a098cc27a250e644415038c2fa52a5 21-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Tweak -Xarch diags a bit more, we can't actually differentiate between
unknown and "required more arguments", but only the latter should be feasible in
practice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
7e9293b8be1716149f2150f96e76876719f14e45 21-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Improve -Xarch argument diagnostics a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
13d7dc04f3ae095c195446376df54fb2c8d4aead 21-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Have #pragma message not turn into error by -Werror, by default. Fixes rdar://9308989.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticLexKinds.td
4423ac0282acb8ba801eb05b38712438dc0c1e3e 21-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For

double data[20000000] = {0};

we would blow out the memory by creating 20M Exprs to fill out the initializer.

To fix this, if the initializer list initializes an array with more elements than
there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression
that specifies an expression to be used for value initialization of the rest of the elements.

Fixes rdar://9275920.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a10ae7b895737694ddc3f0f3fc6105c4871fef23 21-Apr-2011 Bill Wendling <isanbard@gmail.com> Remove __builtin_ia32_loadup[sd] since clang can represent the actions natively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
285dc6530b37d632cd858bac444d29044de4d283 20-Apr-2011 Justin Holewinski <justin.holewinski@gmail.com> PTX: Add PTX intrinsics as builtins and add ptx32 and ptx64 as valid architectures for triples, e.g. ptx32-unknown-unknown

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsPTX.def
lang/Basic/TargetBuiltins.h
109ec1b05664e35e710785314c12552307f39a7d 20-Apr-2011 Douglas Gregor <dgregor@apple.com> Fix a crash-on-invalid involving non-identifier names in a member
access expression that appears to be a property reference. Fixes
<rdar://problem/8985943>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f787002478f09af1741fb0f82a562002e6799c49 20-Apr-2011 Ted Kremenek <kremenek@apple.com> Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129857 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e23ac65af568ffe611b0990818ac3a57c856a4d8 20-Apr-2011 Douglas Gregor <dgregor@apple.com> Teach SourceManager::getSLocEntry() that it can fail due to problems
during deserialization from a precompiled header, and update all of
its callers to note when this problem occurs and recover (more)
gracefully. Fixes <rdar://problem/9119249>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Serialization/ASTReader.h
6b6b42aed07726178f61954ac6e51f47da00275c 19-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> We regard a function as 'unused' from the codegen perspective, so our warnings diverge from
gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context
(e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed
is somewhat misleading.

- Don't emit 'unused' warnings for functions that are referenced in any part of the user's code.
- A warning that an internal function/variable won't get emitted is useful though, so introduce
-Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not
"needed" ('used' from the codegen perspective), e.g:

static void foo() { }

template <int>
void bar() {
foo();
}

test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted
static void foo() { }
^

Addresses rdar://8733476.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
1c860d5640e8eebb11a5d515a761242b66761b0b 19-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> Add a new expression classification, CL_AddressableVoid

CL_AddressableVoid is the expression classification used for void
expressions whose address can be taken, i.e. the result of [], *
or void variable references in C, as opposed to things like the
result of a void function call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4e6a3f7310d3d9232877ed6f439247b1054b1e47 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Report memory usage for global code completion results in CXTUMemoryUsage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129733 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
59fc1e55da9c856d1703d3d3ac14a36320d26b30 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Add libclang API to query how much memory is used by a CXTranslationUnit. This is a WIP. Currently we report
the amount used for expressions, types, identifiers, and selectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129730 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
61e0b94838127601718c64b80940868d4b995e1f 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Add ASTContext::getTotalMemory() to allow clients to query how much memory is bump allocated for declarations, statements, and types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
97f55d6ffd548d1777d790c84b358030682f9de2 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Add SelectorTable::getTotalMemory() to allow clients to query how much memory is used by selectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
877ded8532736d49b3cda8708cf0e5e9c44a760b 18-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Support -fno-lto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
10c8d9e63bcc96d55f788e7c08b72ce626c8aeec 16-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Rewriter::IncreaseIndentation() which increase indentations for the lines between the given source range.
To determine what the indentation should be, a SourceLocation 'parentIndent' parameter is used that should be at
a source location with an indentation one degree lower than the given range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
7d2b8c1fcc2b707be78b09930a7767477822462f 16-Apr-2011 Douglas Gregor <dgregor@apple.com> Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/CMakeLists.txt
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticIDs.h
lang/Basic/Makefile
lang/Driver/CC1Options.td
lang/Driver/DriverDiagnostic.h
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
5666d36cce566b59be271670364794de9803af04 15-Apr-2011 Douglas Gregor <dgregor@apple.com> Forbid the use of C++ new/delete to allocate/free objects within an
address space. I could see that this functionality would be useful,
but not in its current form (where the address space is ignored):
rather, we'd want to encode the address space into the parameter list
passed to operator new/operator delete somehow, which would require a
bunch more semantic analysis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d4c5f84bbed2ecb5ddd0f0e8316c553b2084772a 15-Apr-2011 Douglas Gregor <dgregor@apple.com> Implement appropriate semantics for C++ casting and conversion when
dealing with address-space- and GC-qualified pointers. Previously,
these qualifiers were being treated just like cvr-qualifiers (in some
cases) or were completely ignored, leading to uneven behavior. For
example, const_cast would allow conversion between pointers to
different address spaces.

The new semantics are fairly simple: reinterpret_cast can be used to
explicitly cast between pointers to different address spaces
(including adding/removing addresss spaces), while
static_cast/dynamic_cast/const_cast do not tolerate any changes in the
address space. C-style casts can add/remove/change address spaces
through the reinterpret_cast mechanism. Other non-CVR qualifiers
(e.g., Objective-C GC qualifiers) work similarly.

As part of this change, I tweaked the "casts away constness"
diagnostic to use the term "casts away qualifiers". The term
"constness" actually comes from the C++ standard, despite the fact
that removing "volatile" also falls under that category. In Clang, we
also have restrict, address spaces, ObjC GC attributes, etc., so the
more general "qualifiers" is clearer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8b36a9ee7fe7204b30a85b95b11850aeb4b63ee3 15-Apr-2011 Michael J. Spencer <bigcheesegs@gmail.com> Add 3DNow! Intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
162e1c1b487352434552147967c3dd296ebee2f7 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Support for C++11 (non-template) alias declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/Basic/DeclNodes.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Serialization/ASTBitCodes.h
831efaeb4ba2c0939db6eeb77229d9e47dd03c9c 15-Apr-2011 Ted Kremenek <kremenek@apple.com> Improve diagnostics on GNU attributes by warning about attributes that should have no arguments or parameters. Patch by Michael Han!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AttributeList.h
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/CharUnits.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/Type.h
lang/Basic/Diagnostic.h
lang/Basic/IdentifierTable.h
lang/Basic/PartialDiagnostic.h
lang/Basic/SourceManager.h
lang/Basic/TokenKinds.def
lang/Driver/OptParser.td
lang/Lex/HeaderSearch.h
lang/Lex/MultipleIncludeOpt.h
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
lang/Sema/IdentifierResolver.h
lang/Sema/Initialization.h
lang/Sema/Scope.h
lang/Sema/Sema.h
lang/Sema/TemplateDeduction.h
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
c6eb44b321c543c5bcf28727228a0cceced57e2e 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement static asserts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/TokenKinds.def
f111d935722ed488144600cea5ed03a6b5069e8f 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement generic selections

As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/Ownership.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
7e7fbd05a5dfdb0addfc8b5af2fcbed8c7b5fb87 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: add a language standard

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Basic/TokenKinds.def
lang/Frontend/LangStandard.h
lang/Frontend/LangStandards.def
ad762fcdc16b9e4705b12b09d92b8c026212b906 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/AST/PrettyPrinter.h
lang/AST/RecursiveASTVisitor.h
lang/AST/StmtCXX.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
ea698b3f6cad84f7f583282dce3e03e24fe80e98 14-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Detect when the string "<::" is found in code after a cast or template name and is interpreted as "[:" because of the digraph "<:". When found, give an error with a fix-it to add whitespace between the "<" and "::".

Patch by Richard Trieu! Plus a small tweak from me to deal with one of the tokens coming from a macro.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
414d8967e1d760ea1e19a4aca96b13777a8cf8c5 14-Apr-2011 Anton Korobeynikov <asl@math.spbu.ru> Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or
AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86.

In particular, all library functions should always be AAPCS regardless of floating point ABI used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
8a9013d24864272cf5b18c908a267bd7a2bda4c4 14-Apr-2011 Douglas Gregor <dgregor@apple.com> Parse an '@' in an Objective-C++ class member specification,
diagnosing it as an error rather than looping infinitely. Also,
explicitly disallow @defs in Objective-C++. Fixes <rdar://problem/9260136>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
5bbcdbf36f8cf79d99703ef20848c55960065e43 14-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Chained PCH: Remember when additional specializations are added to a function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/AST/DeclTemplate.h
lang/Serialization/ASTWriter.h
e7a03c98f0a3c0263ac569ad42cb5329672fd7ee 14-Apr-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Add header guards to include/clang/Basic/ConvertUTF.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/ConvertUTF.h
dde5557e87e1163ad792471e0bdbb2cd17894576 14-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Re-fix r129481 and r129465 properly. Nulls fixits shouldn't be dropped in
DiagnosticBuilder::AddFixItHint: they will be dropped along with any
other (possibly valid) fixits later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
3e2193ce5feb2feb092e5ae615e85148e06e9fd2 14-Apr-2011 Anders Carlsson <andersca@mac.com> Add a flag to StringLiteral to keep track of whether the string is a pascal string or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fd183ba0b16718ff05e161bc479678e447df4999 13-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Collect the options applicable to the Rewriter methods into a RewriterOptions struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
6943e9befee204becfae55de1298b3d5fee87934 13-Apr-2011 Francois Pichet <pichet2000@gmail.com> In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal to the type of one of the base classes then downgrade the missing typename error to a warning. Up to now this is the only case I found where MSVC doesn't require "typename" at class scope. Really strange!
This fixes 1 error when parsing the MSVC 2008 header files.
Example:

template<class T> class A {
public:
typedef int TYPE;
};
template<class T> class B : public A<T> {
public:
A<T>::TYPE a; // no typename required because A<T> is a base class.
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
b8f17abf30a9aab6382c84a758fd6679a8b5583a 13-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Redeclaration of 'self' should be flagged in
objective-c instead of crashing in IRgen.
// rdar://9154582.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f077c0d4bb1598f9201cdc38592634ca8922da6c 12-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Don't treat -m{abi,arch,cpu,cmodel}= as "driver" options, they don't
modify the driver planning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
627788c29976fbeb4ad47bcfcb3576889070e357 12-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fix a regression where the initializer implements
the initialized's protocol and yet clang warns.
objective-c issue, // rdar://9267196


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
755d8497e39071aa24acc173ff07083e3256b8f8 12-Apr-2011 John McCall <rjmccall@apple.com> After some discussion with Doug, we decided that it made a lot more sense
for __unknown_anytype resolution to destructively modify the AST. So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/Basic/DiagnosticSemaKinds.td
235c02f79e0ece9463490aa87eaaa02bad300dac 12-Apr-2011 Ted Kremenek <kremenek@apple.com> Teach GRState::getSValAsScalarOrLoc() about C++ references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
9fec9b1fbd32e71ce8acb701165fd6649b3d8285 12-Apr-2011 Ted Kremenek <kremenek@apple.com> C++ static analysis: also invalidate fields of objects that are the callees in C++ method calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
d762357055f3d82959604743dbff20ca337e04be 11-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
1d015313b27f6002b1c4a74e478ede1622141b4e 11-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fixup more objc rwriter bug having to do with
rewriting of blocks which have objective-c
stuff which need be rewritten as well. // rdar://9254348


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
379b5155b4566f63679e1da6b0ceb5fdfa2aec6d 11-Apr-2011 John McCall <rjmccall@apple.com> More __unknown_anytype work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/Basic/DiagnosticSemaKinds.td
575b374fdbfc2c2224fd3047ac11ffc4b8db9ae5 11-Apr-2011 Anders Carlsson <andersca@mac.com> Remove CK_DynamicToNull.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
0fee330f5754ca4b248e5bb7363e834668aff06d 11-Apr-2011 Anders Carlsson <andersca@mac.com> Add CXXDynamicCastExpr::isAlwaysNull() which will be replacing the cast kind I added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
bc34b1d7f4f371bfdebf68d66086f54586d68abe 11-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR9669: implement correct checking for [dcl.init.string]p2.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7d99bc37e77157523e3bfbc6c077842b74e6690f 10-Apr-2011 Anders Carlsson <andersca@mac.com> As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
represents a dynamic cast where we know that the result is always null.

For example:

struct A {
virtual ~A();
};
struct B final : A { };
struct C { };

bool f(B* b) {
return dynamic_cast<C*>(b);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
fb8721ce4c6fef3739b1cbd1e38e3f1949462033 10-Apr-2011 John McCall <rjmccall@apple.com> Simplify calling CheckPlaceholderExpr, converge on it in a few places,
and move a vector-splat check to follow l-value conversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f65076ebf5e8bc5ae7b77fe3c3a65dc5db8d763f 10-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Enhance the diagnostic for literal float -> int conversions to suggest
rewriting the literal when the value is integral. It is not uncommon to
see code written as:

const int kBigNumber = 42e5;

Without any real awareness that this is no longer an ICE. The note helps
automate and ease the process of fixing code that violates the warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d051e00ad674754d476cc1fa0442da0bc47b2c8 10-Apr-2011 Francois Pichet <pichet2000@gmail.com> MSVC accepts that default parameters be redefined for member functions
of template class. The new value is ignored.

This fixes 1 error when parsing MSVC 2010 header files with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a5fc472b353b88be3b4981da946fb01f5a5cc0c6 10-Apr-2011 John McCall <rjmccall@apple.com> Fix a bunch of major problems with __unknown_anytype and properly test
for them. The only major missing feature is references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Basic/Specifiers.h
lang/Basic/TokenKinds.def
lang/Driver/CC1Options.td
lang/Sema/DeclSpec.h
2eba7abeab4abddd28644200397f8a1d5badccdd 09-Apr-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r129173 (Apr 8th 2011)

Upstream Revision
git-id: 0ff32595e4b92c5bdee78946b39f9e990b20cc90
svn-id: 129173
b8a3e8139b9fe513500c89bbcd9133415654a689 09-Apr-2011 Dylan Noblesmith <nobled@dreamwidth.org> refactor -ccc-gcc-name code

Put the logic for deciding the default name for gcc/g++
in the only place that actually cares about it.

This also pushes an ifdef out of the generic driver code
to a little further down, when the target is actually known.
Hopefully it can be changed into just a runtime check
in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
a49218e17bcbb1acde0245773173e2c0c42f4f19 09-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR8369: make __attribute((regparm(0))) work correctly. Original patch by
pageexec@freemail.hu, tweaks by me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b6006696358572a668d6de773af8f550e54259bf 09-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Clean up the bool conversion warning. Group it with other conversion
warnings, and make its text appropriate for constant bool expressions
other than 'false'. This should finish off PR9612.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129205 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
23aa9c8ca0bc441aab2a38a4c9fc7a1c9e9ac16a 09-Apr-2011 Chris Lattner <sabre@nondot.org> add a __sync_swap builtin to fill out the rest of the __sync builtins.
Patch by Dave Zarzycki!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
a00d678f32f44668f42112a749fd4fe9c6e061e5 09-Apr-2011 Eric Christopher <echristo@apple.com> Remove a pair of unused diagnostic messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0ff32595e4b92c5bdee78946b39f9e990b20cc90 09-Apr-2011 Chris Lattner <sabre@nondot.org> complete documentation of flags, patch by nobled


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
ec7346077c1fb423c9279771675c098bc2dffc92 09-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Properly traverse a ObjCMethodDecl in RecursiveASTVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
49af1f3cedc55726e4a3dd343eb4a8e24eab8439 08-Apr-2011 Evan Cheng <evan.cheng@apple.com> Rename -mtrap_function= to -ftrap_function= since it's now a target neutral options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b20e442b31287b7e926a118dec36bddc34dbe730 08-Apr-2011 Evan Cheng <evan.cheng@apple.com> Add -mtrap_function=<> option. rdar://9257465

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
429bb276991ff2dbc7c5b438828b9b7737cb15eb 08-Apr-2011 John Wiegley <johnw@boostpro.com> Use ExprResult& instead of Expr *& in Sema

This patch authored by Eric Niebler.

Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr
pointers as in/out parameters (Expr *&). This is especially true for the
routines that apply implicit conversions to nodes in-place. This design is
workable only as long as those conversions cannot fail. If they are allowed
to fail, they need a way to report their failures. The typical way of doing
this in clang is to use an ExprResult, which has an extra bit to signal a
valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema
interface. We suggest changing the Expr *& parameters in the Sema interface
to ExprResult &. This increases interface consistency and maintainability.

This interface change is important for work supporting MS-style C++
properties. For reasons explained here
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>,
seemingly trivial operations like rvalue/lvalue conversions that formerly
could not fail now can. (The reason is that given the semantics of the
feature, getter/setter method lookup cannot happen until the point of use, at
which point it may be found that the method does not exist, or it may have the
wrong type, or overload resolution may fail, or it may be inaccessible.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
lang/Sema/Sema.h
b7bc34a83aff8af09f2a78aa6d1dcafe18ad8619 08-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Warn for any kind of initialization if initializer does not
implement lhs's protocols. // rdar://9091389.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
584b9d6bd0ce199787900695fe75528fcde405fe 08-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Switch 'is possibly uninitialized' to 'may be uninitialized' based on
Chris's feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f04eb2de1f17dce4dfaebbf9002844087b7d357d 08-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Now that the analyzer is distinguishing between uninitialized uses that
definitely have a path leading to them, and possibly have a path leading
to them; reflect that distinction in the warning text emitted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
089f872fedb175f7569f24f1dba362ffbc403528 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Don't attempt to forward some Clang-only options to cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b6534bbee90bf73f364072051d10b60352d43c3e 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Fronted/CC_LOG_DIAGNOSTICS: Wire up dwarf-debug-flags support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
28f14933edc863821e4f2ffa3663835c62440dcb 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Fronted/CC_LOG_DIAGNOSTICS: Output main file name, and add support for
outputting dwarf-debug-flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LogDiagnosticPrinter.h
64bfbf573e625c04abc3d40faa9b695fe21ebdbb 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Continue flushing out LogDiagnosticPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LogDiagnosticPrinter.h
9df23493f5b8a223dfbc491e4b7de3850797c2e7 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Sketch a LogDiagnosticPrinter object, and wire CC_LOG_DIAGNOSTICS to
it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LogDiagnosticPrinter.h
b680d4bc53ecfece9b583f8e8566fddb5189d39a 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> ChainedDiagnosticClient: Fix a bug where chained diagnostic clients wouldn't
accurately track warning/error counts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ChainedDiagnosticClient.h
08c6695f6018fb6cb1a7c7d311a851aa5c233bc0 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Sketch support for -diagnostic-log-file, which still doesn't do anything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/CC1Options.td
lang/Frontend/DiagnosticOptions.h
b65ed34ebf0380c001756eea7a1c1d01e110b557 07-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Enhance the Rewriter.

-Allow removing a line completely if it ends up empty
-Provide more control on what should be removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129085 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
8f89652be7bb85bdac83c37fec85f20cdd2dfc83 07-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add FullSourceLoc::BeforeThanCompare. a comparison function class, useful for sorting FullSourceLocs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
c8a22b091677c02003880166e5d5767ca8d74b70 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to the
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to
transparently capture the compiler diagnostics from a build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/Driver.h
737d5447b5d20633992ee5388eca5270c28c8ae7 07-Apr-2011 Abramo Bagnara <abramo.bagnara@gmail.com> In C++ the argument of logical not should always be bool. Added missing implicit cast for scalars.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 07-Apr-2011 John McCall <rjmccall@apple.com> Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
759abb4d9ec14ae32104a9677b60f0542b60d1d8 06-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fix lookup for class messages sent to qualified-class
types such that protocols are seached first. Fixes
// rdar://9224670


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
9a7319305fc25222b91d585dfa056c8cdbac8434 06-Apr-2011 Nowar Gu <nowar100@gmail.com> Merge upstream until 2011.04.05.
4c8acc9b0158081635e1dabd49304377ae67ca98 05-Apr-2011 Michael J. Spencer <bigcheesegs@gmail.com> Fix spelling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
30f64714da00794cfc4179c5d5046b0c7d4cd3c0 05-Apr-2011 Eric Christopher <echristo@apple.com> Make this const, there's probably no harm in it and it silences a bunch
of warnings when passing const arguments into the function.

Fixes PR9426


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
ae8ec2b8b890ad663bdeb27e69f590c71b966cb6 05-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix building with gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
d40066b0fb883839a9100e5455e33190b9b8abac 05-Apr-2011 Ted Kremenek <kremenek@apple.com> Fix PR 9626 (duplicated self-init warnings under -Wuninitialized) with numerous CFG and UninitializedValues analysis changes:

1) Change the CFG to include the DeclStmt for conditional variables, instead of using the condition itself as a faux DeclStmt.
2) Update ExprEngine (the static analyzer) to understand (1), so not to regress.
3) Update UninitializedValues.cpp to initialize all tracked variables to Uninitialized at the start of the function/method.
4) Only use the SelfReferenceChecker (SemaDecl.cpp) on global variables, leaving the dataflow analysis to handle other cases.

The combination of (1) and (3) allows the dataflow-based -Wuninitialized to find self-init problems when the initializer
contained control-flow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
832316e9a04242972f4b57281dccb8e4cf5894ea 05-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move Driver::createInvocationFromArgs function to Frontend library to avoid dependency cycle
between libFrontend and libDriver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Frontend/Utils.h
054e4f50e2f1995e91b0cd3c3258aa252785fe3f 04-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Driver::createInvocationFromArgs used to create a CompilerInvocation from command-line args.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
5862f0e1ac29c5af8089b4bf119fd4493f6ab58c 04-Apr-2011 Ted Kremenek <kremenek@apple.com> When emitting a "too many arguments to function call..." error, also include a note with a location for the function prototype.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cccc02ac215ffc16fc4b3ebfee5ee87c40e30505 04-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR9585: add __decltype as a keyword. While I'm here, alphabetize the list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
8083414ee7cc8f5c807ed6a4e120fb4e0ab50ff8 03-Apr-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Add a new ProgramPoint PostCondition to represent the post position of a branch condition, and a new generateNode method to BranchNodeBuilder using PostCondition ProgramPoint. This method generates a new ExplodedNode but not a new block edge.

Patch by Lei Zhang!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
4d840e9ac4d8e9baa9459ca3dd7ab14ae884a80f 02-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Simplify CheckerFn template and use it more to reduce duplication. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
e87e717b0dbe4776f2b4dbb1e6ce2a19f562d2b0 02-Apr-2011 csmon7507 <csmon7507@gmail.com> Merge branch 'upstream' into logan-fastforward-20110320
2bfa3019b8fb35931ca4927feaf25d39161b423e 02-Apr-2011 Zhongxing Xu <xuzhongxing@gmail.com> Remove a redundant method. We have a const version.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
422ab7a49a9a4252dbc6350e49d7a5708337b9c7 02-Apr-2011 Ted Kremenek <kremenek@apple.com> Teach IdempotentOperationsChecker about paths aborted because ExprEngine didn't know how to handle a specific Expr type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
66750fa464ace9f8c41666c8585ec71a248c1cca 02-Apr-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Rename 'BlocksAborted' to 'BlocksExhausted' to reflect that a given CFGBlock was analyzed too many times.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
f445debe3a6825e6528655db0906ce4fa41240ea 01-Apr-2011 csmon <csmon@csmon-desktop.(none)> Merge branch 'upstream' into logan-fastforward-20110320
ce0682ff4647b885d41847b0f97918504282c2e8 31-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Make ChainedIncludesSource an ExternalSemaSource, otherwise initialization of the ASTReader is incomplete, leading to errors like not realizing std::type_info is already defined.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ChainedIncludesSource.h
ad1a4c6e89594e704775ddb6b036ac982fd68cad 31-Mar-2011 Daniel Dunbar <daniel@zuster.org> Change Clang's __VERSION__ to include the same basic info as in clang -v.
- Please never ever ever ever write a tool that sniffs this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
2d33e423d5091b7d2cb8618952752abd55bba965 31-Mar-2011 Bob Wilson <bob.wilson@apple.com> Use intrinsics for Neon vmull operations. Radar 9208957.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
b78c33f74970c23878c03294760054b3a4c006eb 30-Mar-2011 Ted Kremenek <kremenek@apple.com> Put "#pragma message ..." into its own warning (human friendly) category.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
a6c530868fd8ca54b0a2e00f3a623af72e8dc979 30-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Silence warnings of unkwown -Wlarger-than and -Wframe-larger-than. Fixes rdar://6970318.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b277159055933e610bbc80262b600d3ad7e0595c 30-Mar-2011 Ted Kremenek <kremenek@apple.com> Begin reworking static analyzer support for C++ method calls. The current logic was divorced
from how we process ordinary function calls, had a tremendous about of redundancy, and relied
strictly on inlining behavior (which was incomplete) to provide semantics instead of falling
back to the conservative analysis we use for C functions. This is a significant step into
making C++ analyzer support more useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128557 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
68af13f3ca39947e3f285f864fe3b76640fddf69 30-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Fix IRGen issues related to using property-dot syntax
for prperty reference types. // rdar://9208606.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
1293cdac691975a57a0e8a4f1448b3ed9e293c50 29-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Checker Packages can now belong to a group. This requires llvm commit r128474.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Checkers/CheckerBase.td
969323239f16589329d091a2b8ef200fcfe7c9e9 29-Mar-2011 Daniel Dunbar <daniel@zuster.org> Integrated-As: Support -Wa,-L when using the integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
402adc3bc0ddbbb46cb0b8d29812a9c2f605ec4f 29-Mar-2011 Daniel Dunbar <daniel@zuster.org> Frontend/cc1as: Add support for -L.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
7f3ad231bed2184694e407772689e8903068bdca 28-Mar-2011 Eli Friedman <eli.friedman@gmail.com> Remove stray null from the middle of a comment. (Found because my editor
was refusing to open the file.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
4147d307086cf024a40a080e2bf379e9725f6f41 27-Mar-2011 Francois Pichet <pichet2000@gmail.com> Improve recovery (error + fix-it) when parsing type dependent template name without the "template" keyword.

For example:
typename C1<T>:: /*template*/ Iterator<0> pos;

Also the error is downgraded to an ExtWarn in Microsoft mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
a7689efa25bf54452c758c672bd1a5608d5757cc 27-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Diagnose uninitialized uses of a variable within its own initializer.
This is basically the same idea as the warning on uninitialized uses of
fields within an initializer list. As such, it is on by default and
under -Wuninitialized.

Original patch by Richard Trieu, with some massaging from me on the
wording and grouping of the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d06fea8580658470f92fb5d0d3d7ab5b475728dc 27-Mar-2011 Anton Yartsev <anton.yartsev@gmail.com> supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
abaca7a8be8e79cc01354676e3bcb26575640311 27-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Add an option to suppress include stack printing on note diagnostics.
These stacks are often less important than those on primary diagnostics.

As the number of notes grows, this becomes increasingly important. The
include stack printing is clever and doesn't print stacks for adjacent
diagnostics from the same file, but when a note is in between a sequence
of errors in a header file, and the notes all refer to some other file,
we end up getting a worst-case ping-pong of include stacks that take up
a great deal of vertical space.

Still, for now, the default behavior isn't changed. We can evaluate user
feedback with the flag.

Patch by Richard Trieu, a couple of style tweaks from me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
lang/Frontend/TextDiagnosticPrinter.h
5adb5a84bfb4f2e5f1ea28fdfc6ee1cd9b622c60 27-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Add -f[no-]strict-overflow to the Clang driver. Use it to set the
default for -fwrapv if that flag isn't specified explicitly. We always
prefer an explict setting of -fwrapv when present. Also adds support for
-fno-wrapv to allow disabling -fwrapv even when -fno-strict-overflow is
passed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
077f490d0a514dcc448475f33f799934252b85a7 26-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> More coherent diagnostic attempting to assign to a member of a const object returned
from an objective-c message: // rdar://9005189


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
3d9ce907a7a77dba1f81bfff6af05f7cbe31b115 26-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Make diagnostic clearer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4421d2b341d041df44013769f23c306308bbab83 26-Mar-2011 Douglas Gregor <dgregor@apple.com> On Mac OS X, the presence of an 'availability' attribute for that
platform implies default visibility. To achieve these, refactor our
lookup of explicit visibility so that we search for both an explicit
VisibilityAttr and an appropriate AvailabilityAttr, favoring the
VisibilityAttr if it is present.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b53e417ba487f4193ef3b0485b420e0fdae643a2 26-Mar-2011 Douglas Gregor <dgregor@apple.com> Extend the new 'availability' attribute with support for an
'unavailable' argument, which specifies that the declaration to which
the attribute appertains is unavailable on that platform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/AttributeList.h
2234873111009eb8655d63362cedc422eb9fc517 26-Mar-2011 John McCall <rjmccall@apple.com> Allow GC qualifiers to be added/removed by conversions from/to void*
without a warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3812999df1a50e0804985c8845fcfa3fd7ffe14c 26-Mar-2011 Craig Silverstein <csilvers2000@yahoo.com> TraverseNestedNameSpecifier -> TraverseNestedNameSpecifierLoc in a few
places where we can, now. OK-ed by dgregor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
8a29ba0d66bce99014651f1e3351aef6c3361d3f 25-Mar-2011 Anders Carlsson <andersca@mac.com> Remove the last of ClassVirtSpecifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
2c3ee54e51d835a35bbf781c69e17f39e2ba0480 25-Mar-2011 Anders Carlsson <andersca@mac.com> Get rid of handling of the 'explicit' keyword from class-head. We still parse it though, although that will change shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
844c25d4383ccaf44765687cc4a7e591b3fe1472 25-Mar-2011 Anders Carlsson <andersca@mac.com> Remove warnings about using override control keywords in inline function definitions; they will be allowed in the next C++0x draft.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
b1f39680a2e3bce508dba0600665860e5ba5fb70 25-Mar-2011 Anders Carlsson <andersca@mac.com> Remove 'new' from virt-specifier since it's going to be removed in the next C++0x draft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
909a70d8a185f701c20bacc3c76f8f5979cbbc7c 25-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Apply the nonnull attribute to constructor expressions too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0b7e678a11ece4288dc01aebb5b17e5eef8f8d2d 24-Mar-2011 John McCall <rjmccall@apple.com> Insomniac refactoring: change how the parser allocates attributes so that
AttributeLists do not accumulate over the lifetime of parsing, but are
instead reused. Also make the arguments array not require a separate
allocation, and make availability attributes store their stuff in
augmented memory, too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
2b32dad701ef3e666e3b9cea02e1d094a1078c6f 24-Mar-2011 Anders Carlsson <andersca@mac.com> Add a new warning for exit-time destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c05a94b7accd4035bf5d5897c434c445b22da855 24-Mar-2011 John McCall <rjmccall@apple.com> Call out ObjC parameter types as a different kind of declarator context
from a normal type-spec, just for completeness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
d97f558f48865aa96e7bdf9c1c9315790c3d77c9 23-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Support for Transparent unions used as overloadable
function parameter. // rdar:// 9129552
and PR9406.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
29233802236f7fe1db20e00eca4f5cc8f3f64ade 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Teach DelayedDiagnostic to copy its string, rather than hope that the
string itself lives longer than the DelayedDiagnostic. Fixes a recent
use-after-free regression due to my availability attribute work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
7f9fc3f7ce076645cb6aefc99c64d9446caf13d6 23-Mar-2011 Chris Lattner <sabre@nondot.org> switch a few Driver APIs to use llvm::ArrayRef, cleaning up code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
9d5a165d301cc9df68631e624322dd2a962f65b3 23-Mar-2011 Ted Kremenek <kremenek@apple.com> Fix crash in clang_getInstantiationLoc() when SourceManager::getInstantiationLoc() can return a SourceLocatin with an invalid
FileID on invalid code. Fixes <rdar://problem/9164623>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/Attr.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TargetInfo.h
lang/Basic/VersionTuple.h
lang/Parse/Parser.h
lang/Sema/AttributeList.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
ac4df2454d5462c3bf5f369d65c3ad651100fa40 23-Mar-2011 John McCall <rjmccall@apple.com> Warn about unused declaration-specifiers on tag declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3c66d30d513106bb794990c5e4ba36a31ac19f15 22-Mar-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Add a more explicit -backend-option flag for passing backend command
line options, instead of leveraging the blanket -mllvm option.
- This allows using the frontend itself without requiring the backend have
those options available (i.e., if the target wasn't built).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
97d2d2e368d3ead34d83c328383711c7dabab60a 22-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r127980 (Mar 20th 2011)
e5a3ce6dd555788a49efaabc3bd46d704e5e9d65 22-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Don't clear OverloadCandidateSets on destruction, it has no effect anymore.

And clearing a SmallPtrSet can be an expensive operation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
614f96a7cf94805c2d336639300b62dc2f54e9e0 22-Mar-2011 Ted Kremenek <kremenek@apple.com> Migrate 'PrettySTackTraceParserEntry' object out of Parser, and have it constructed within ParseAST. This avoids double crashes
during crash recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
da60885cb4ee85d167cf704061f10b758067cf5a 21-Mar-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Change CC_PRINT_HEADERS to not print header depth markers, these don't
really make any sense in this environment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
4f32786ac45210143654390177105eb749b614e9 21-Mar-2011 Ted Kremenek <kremenek@apple.com> Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes.

This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct
ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance
object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/FileManager.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Lex/Preprocessor.h
05e5930166333e382522b942f00d08abc6c0a28e 21-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Memorize presence/absence of -nostdlib in Driver.
Drop program paths on NetBSD (unused). Only include lib dir, if
-nostdlib is absent. Use = to allow --sysroot to work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
8ab2bdcc4f397e100c684ede8e8ca6e226e1380a 21-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Remember sysroot in Driver. Pass it down to ld for NetBSD, FreeBSD
and DragonFly. Use the --sysroot= form for Linux. Fix handling of =
prefix for -B.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
8e02635c9c276720a1e6f926b33303a53cebe9c7 18-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r127869 (Mar 18th 2011)
eedd4670b2eb7e4d67d11b2f26ed1ad304b70596 20-Mar-2011 Francois Pichet <pichet2000@gmail.com> Downgrade err_mismatched_exception_spec to a ExtWarning in Microsoft mode. MSVC doesn't do any validation on exception specifications.

This remove 1 error when parsing MSVC stl lib with clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ba814e775e1ccaba7c729a651e004d6721e16c01 19-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Initialize FakeAddressSpaceMap flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
e5da3e6e5671728007b720bd3afdef3332351358 19-Mar-2011 Anton Yartsev <anton.yartsev@gmail.com> makes vec_step operator work when AltiVec support is enabled

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
f899af662801ee6bb82be871eb0b8d19b61503ba 19-Mar-2011 Ken Dyck <kd@kendyck.com> Add pre- and post-increment/decrement operators to CharUnits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
af13d5b25b360e698cc1cf1055ad7d14e008e505 19-Mar-2011 Ted Kremenek <kremenek@apple.com> Rename class 'CFGReachabilityAnalysis' to 'CFGReverseBlockReachabilityAnalysis'.

This rename serves two purposes:

- It reflects the actual functionality of this analysis.
- We will have more than one reachability analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/CFGReachabilityAnalysis.h
lang/Analysis/AnalysisContext.h
d2427ddf00aacdc288c386f3882e0821ca9bd27b 19-Mar-2011 Ted Kremenek <kremenek@apple.com> Add libclang hook 'clang_toggleCrashRecovery()', which provides a mechanism for a client to enable/disable CrashRecovery within libclang function calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127920 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
207f4d8543529221932af82836016a2ef066c917 18-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers. Patch originally by ARM;
language-specific address space support by myself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/AddressSpaces.h
lang/Basic/LangOptions.h
lang/Basic/OpenCL.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.def
lang/Driver/CC1Options.td
lang/Parse/Parser.h
lang/Sema/AttributeList.h
2ed42287b9b88a0bb08ab10e95e306da3f294ba9 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL
comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
ac0659ae4124156915eddf70e78065df224d34c8 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver: Give SelectTool access to the action inputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
7dbafb3ade491a41100c97597209455ee10c537d 18-Mar-2011 Anders Carlsson <andersca@mac.com> Add FileManager::getNoncachedStatValue, which will resolve relative paths against the working directory specified in the file system options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
d6a49bb69fadcb04119433278c808797a87d2d31 18-Mar-2011 Douglas Gregor <dgregor@apple.com> Add an opt-in -Wheader-hygiene, which current diagnoses the use of
global using directives in C++ headers, from Elliot Glaysher!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
7f0a915eb546d353071be08c8adec155e5d9a0dc 18-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed inconsistency when adding TemplateParameterListsInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
32096695c76033a6b0b1747c439f7378a11e8312 18-Mar-2011 John McCall <rjmccall@apple.com> The Darwin kernel does not provide useful guard variable support.
Issue this as an IR-gen error; it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
a085da86242c9b8e3466f8cf6f4397e9f248fd20 17-Mar-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR9488: 'auto' type substitution can fail (for instance, if it creates a reference-to-void type). Don't crash if it does.
Also fix an issue where type source information for the resulting type was being lost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0a65f946721f1505e5577b1910f3193888696573 17-Mar-2011 Ted Kremenek <kremenek@apple.com> Rename -Wuninitialized-maybe to -Wconditional-uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
0daaf32723ac78549c507c2a68a5300502703673 16-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Use ElaboratedType also for C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
lang/Sema/DeclSpec.h
eef7ac5837ef3e0682ac0973121fff8edaa46ca4 16-Mar-2011 Douglas Gregor <dgregor@apple.com> Detect attempts to provide a specialization of a function within a
dependent scope and produce an error (rather than crashing). Fixes PR8979.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3cd0128ce49abe658d1858c541e836e57959e04a 16-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Having FileManager::getFile always open the file, brought much consternation and leaking of file descriptors.

Add 'openFile' bool to FileManager::getFile to specify whether we want to have the file opened or not, have it
false by default, and enable it only in HeaderSearch.cpp where the open+fstat optimization matters.

Fixes rdar://9139899.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
db2eae639d3b7ed61ceb56890b73168517ef57f1 16-Mar-2011 Douglas Gregor <dgregor@apple.com> Clean up our handling of template-ids that resolve down to a single
overload, so that we actually do the resolution for full expressions
and emit more consistent, useful diagnostics. Also fixes an IRGen
crasher, where Sema wouldn't diagnose a resolvable bound member
function template-id used in a full-expression (<rdar://problem/9108698>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7839febe5839cf42d76b068b1d79400ad366262b 16-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Remove a duplicate language feature

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandards.def
b5142bb7af5c70fffd09f05172a1379a35a9c29a 16-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Add a 'RawPath' parameter to the PPCallbacks interface. This allows
clients to observe the exact path through which an #included file was
located. This is very useful when trying to record and replay inclusion
operations without it beind influenced by the aggressive caching done
inside the FileManager to avoid redundant system calls and filesystem
operations.

The work to compute and return this is only done in the presence of
callbacks, so it should have no effect on normal compilation.

Patch by Manuel Klimek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127742 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
c9977d09a2de7f7d2245973413d4caf86c736640 16-Mar-2011 Douglas Gregor <dgregor@apple.com> Make sure that we always pop a function's scope *before* we call
ActOnFinishFunctionBody/ActOnBlockStmtExpr. This way, we ensure that
we diagnose undefined labels before the jump-scope checker gets run,
since the jump-scope checker requires (as its invariant) that all of
the GotoStmts be wired up correctly.

Fixes PR9495.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127738 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
250e7a74d5a23db5bd7202ecb0bb4a8fef6016b4 16-Mar-2011 Douglas Gregor <dgregor@apple.com> When we're inserting a synthesized label declaration for a
forward-looking "goto" statement, make sure to insert it *after* the
last declaration in the identifier resolver's declaration chain that
is either outside of the function/block/method's scope or that is
declared in that function/block/method's specific scope. Previously,
we could end up inserting the label ahead of declarations in inner
scopes, confusing C++ name lookup.

Fixes PR9491/<rdar://problem/9140426> and <rdar://problem/9135994>.

Note that the crash-on-invalid PR9495 is *not* fixed. That's a
separate issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/IdentifierResolver.h
24f4674e697fb53587f0e8485e9c6592f7021ef2 16-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Added missing methods to get Designators source range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
db9e9e61f8311d8852bd15730f78e56f3ffa0508 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Remove warning for null characters in CFString literals. Clang handles them just fine, and GCC 4.2 doesn't warn here either.

We added this warning back in 2007 when we were comparing against GCC 4.0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
99439d474e7cb48497a2da4c35f70cdc1d5b153f 15-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Implement a hack to work around the changing exception specification of operator new in C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
d0956fcaecf3f5b7c5e849ca9a94a4ee2ccbc0e4 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Remove duplicate group definition that snuck in due to a merge conflict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
908c09f64e50db64c935255089ffcf4615ca4b0e 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Take 2: merge -Wuninitialized-experimental into -Wuninitialized. Only *must-be-uninitialized* warnings are reported, with *maybe-uninitialized* under a separate flag. I await any fallout/comments/feedback, although hopefully this will produce no noise for users.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
76709bf816e5e1b70b859bb607cf3ee91db12b76 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
f7bafc77ba12bb1beb665243a0334cd81e024728 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Split warnings from -Wuninitialized-experimental into "must-be-initialized" and "may-be-initialized" warnings, each controlled by different flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
6f34213f8d6ae8c77685b53664527e39bfaaca3b 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Rename UninitializedValuesV2 to UninitializedValues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/Analyses/UninitializedValuesV2.h
f3f5379f6da7f8f141a53e2945871a5aa5431e02 15-Mar-2011 Ted Kremenek <kremenek@apple.com> Remove old UninitializedValues analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
7cbc558ffda5877ec4d2e432534e3d3d4ac10050 14-Mar-2011 Douglas Gregor <dgregor@apple.com> When synthesizing a label declaration based on a goto statement that
cannot yet be resolved, be sure to push the new label declaration into
the right place within the identifier chain. Otherwise, name lookup in
C++ gets confused when searching for names that are lexically closer
than the label. Fixes PR9463.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/IdentifierResolver.h
9fc90c1bf7498dc53862156205ab95868b8b849f 14-Mar-2011 Ted Kremenek <kremenek@apple.com> Incorporate source ranges for RangeBugReport when coelescing reports into equivalence classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
a4fdbfad150ae37bddaa4094d3925a27a1a1cf3f 14-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Block return type of the initialized must be
be more speciaclized than that of the initializer,
when matching protocol qualifier list.
// rdar:// 9118343.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2e2468e2d2ccbb9a38fe3b6b754009af7e5d39a9 14-Mar-2011 Anders Carlsson <andersca@mac.com> Get rid of the static FileManager::FixupRelativePath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
d05c2006f2fca763be9680ab673f7c66adbf90a1 13-Mar-2011 Anders Carlsson <andersca@mac.com> Change GetNullarySelector and GetUnarySelector to take a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8026f6d82f7fa544bc0453714fe94bca62a1196e 13-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/Type.h
90ba78c64d0c24cfbc1bf88728db9775d44d7f9f 12-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Place duplicate argument declaration in in
method prototypes under the -Wduplicate-method-arg and
turn it off by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
lang/Parse/Parser.h
lang/Sema/Sema.h
caa35e4bbfccaaa6c4d69f29b3f1a8b544b3645e 12-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Disable inherited constructors for 2.9."
It is only meant for the release branch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a808c544f9df4d17cb189ba6aa167478cf17ad4a 12-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Disable inherited constructors for 2.9.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
60618fa7f88d5162bb5b40988b6b38d4d75d6fc6 12-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Propagate the new exception information to FunctionProtoType.
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/ExceptionSpecificationType.h
lang/Sema/Sema.h
796aa443ab5ed036f42ef33fed629e1b4b34871b 12-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Forgotten part of previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Sema/DeclSpec.h
06dec892b5300b43263d25c5476b506c9d6cfbad 12-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Renamed OffsetOfNode::getRange to getSourceRange for uniformity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fadb53b351977ca7f99a9a613596cba6531979a3 12-Mar-2011 Douglas Gregor <dgregor@apple.com> Fixes for some more expressions containing function templateids that
should be resolvable, from Faisal Vali!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
6f4596cfb70ec706dd2da38db1be3663c214ff7a 12-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a hack intended to allow Clang to parse libstdc++ 4.5's
headers, which use C++0x generalized initializer lists. Per PR7069, it
appears that the only use is as the return type of a function, so this
commit enables this extension just in that narrow case. If it's enough
for libstdc++ 4.5, or if it can be trivially extended to work with
libstdc++ 4.5, we'll keep it. Otherwise, or if this breaks anything,
we'll revert and wait for the real feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f4f7cb814f8537606754b9eb8848094196e73214 11-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: if double precision floating point constant encountered
without cl_khr_fp64, warn and cast to single precision

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 11-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
c57c17dced5fb16a83a2ffb2b7e8c148df69ba5a 10-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Avoid do drop outer template parameter lists on the floor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0d28d360b5559abda755e50b855ba5e59727d9cd 10-Mar-2011 Ted Kremenek <kremenek@apple.com> When doing reachability analysis for warnings issued under DiagRuntimeBehavior, don't construct a ParentMap or CFGStmtMap.
Instead, create a small set of Stmt* -> CFGBlock* mappings during CFG construction for only the statements we care about
relating to the diagnostics we want to check for reachability.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
b8ad5ee345fa1fdd1fa9253f2d01f69becc88a04 10-Mar-2011 Ted Kremenek <kremenek@apple.com> Rework interaction between AnalysisContext and CFG::BuildOptions to keep a BuildOptions object around instead of keeping a copy of the flags.

Moreover, change AnalysisContext to use an OwningPtr for created analysis objects instead
of directly managing them.

Finally, add a 'forcedBlkExprs' entry to CFG::BuildOptions that will be used by the
CFGBuilder to force specific expressions to be block-level expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
975cc644d5d9dafdb4060aa31c9753d0554e1308 10-Mar-2011 Daniel Dunbar <daniel@zuster.org> Revert r127206 "Detect attempts to provide a specialization of a function within
a...", it appears to cause us to reject various valid codes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
61478065fbcafcf5295bb0fb796c9a92f2d861e0 09-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Lookup selector in protocol list of qualified objc type
to avoid a bogus warning. // rdar:// 9072298



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b0f4b9a558933b307073f7cd7753602f94354ae9 09-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce '-chain-include' option to specify headers that will be converted to chained PCHs in memory
without having to use multiple runs and intermediate files.

Intended for testing & debugging of chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
lang/Serialization/ASTReader.h
lang/Serialization/ChainedIncludesSource.h
ba877adeb49ed6dc17f27fa3a3bcd0cca713fd68 09-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed InnerLocStart.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
02b3774347158753dd72c1bb8a29eb78a16440ab 09-Mar-2011 NAKAMURA Takumi <geek4civic@gmail.com> include/clang/Basic/BuiltinsX86.def: __builtin_ia32_crc32**() should be defined to take unsigned args and to return unsigned value.

mingw-w64's intrin.h declares __builtin_ia32_crc32**() as external.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
86f436f451ce5004b155d1f30495586dba6180b7 09-Mar-2011 NAKAMURA Takumi <geek4civic@gmail.com> include/clang/Makefile: [PR2928] "make install" may install include files along explicit pattern, not to install CMake's building stuff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Makefile
27d70656d3ce7c9e030b6dea468cfc96687010d5 09-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream (Nov 6th 2011)
eecf5fa12d5426637c47d7072f0c193a8d7ff68b 09-Mar-2011 John McCall <rjmccall@apple.com> Add a bit to ParmVarDecl indicating whether the parameter undergoes
K&R-style default argument promotion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
299a4a967b02c9f0d0d94ad8560e3ced893f9116 09-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceManager
should report the original file name for contents of files that were overriden by other files,
otherwise it should report the name of the new file. Default is true.

Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
cf333339615da345c2ed6e873d94a501810d9f3f 09-Mar-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Fix use-after-free bug in RegionStore involving LazyCompoundValueData not reference counting Store objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
b77cab97f17f946744c920629ca17271308d8ebf 08-Mar-2011 Douglas Gregor <dgregor@apple.com> Clarify the context in which an Objective-C type name is being parsed
by using an enumeration rather than a boolean value. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f52516038ab5d0b1b90a6dd32f46b7d6dabd04c8 08-Mar-2011 Douglas Gregor <dgregor@apple.com> Teach libclang's token-annotation logic about context-sensitive
keywords for Objective-C+ and C++0x.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/DeclSpec.h
a2026c96d3935e7909e049ad9096762844544ed6 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Sema/Sema.h
acba90f30876b4140b738f0d3dd0e50724053a96 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed NamespaceDecl source range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Sema/Sema.h
f2cf562cec11dec926c0a29a71769a27fed02962 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed bitfields source range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for all DeclaratorDecl's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/Sema/Sema.h
834e3f6c77d9ac03997a3f0c56934edcf406a355 08-Mar-2011 John McCall <rjmccall@apple.com> Fix my earlier commit to work with escaped newlines and leave breadcrumbs
in case we want to make a world where we can check intermediate instantiations
for this kind of breadcrumb.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Sema/Sema.h
2792fa5115c5de7cbe11d99d23663c569bfb4cae 08-Mar-2011 John McCall <rjmccall@apple.com> objc_gc wants a pointer type, not a function type; give it a more appropriate
diagnostic. Also, these attributes are commonly written with macros which we
actually pre-define, so instead of expanding the macro location, refer to the
instantiation location and name it using the macro loc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
30900dafbe972f4802c2663262b4393edab0d1cd 08-Mar-2011 John McCall <rjmccall@apple.com> Add an API call to retrieve the spelling data of a token from its SourceLocation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
db93fdee6c5a24e86ee5ed8c1d3b597e17d5893b 08-Mar-2011 Douglas Gregor <dgregor@apple.com> Detect attempts to provide a specialization of a function within a
dependent scope and produce an error (rather than crashing). Fixes PR8979.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d52e8b821a1a1cc58eec2f8446488566436eacc8 07-Mar-2011 Carl Norum <carl.norum@apple.com> Change diagnostic message from "Extension" to "ExtWarn" to find more problems with missing semicolons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
d97cec3deb6e34f0f9d4f5f8ec11b28e44812727 07-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> g++ is more permissive regarding flexible arrays.
It will accept flexible array in union and also as the sole element of a struct/class.

Fixes rdar://9065507.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc20945c787a56abe418947fc6a2c520bcec66c0 07-Mar-2011 Douglas Gregor <dgregor@apple.com> Support explicit template specialization and instantiation for members
of a C++0x inline namespace within enclosing namespaces, as noted in
C++0x [namespace.def]p8.

Fixes <rdar://problem/9006349>, a libc++ failure where Clang was
rejected an explicit specialization of std::swap (since libc++ puts it
into an inline, versioned namespace std::__1).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/IdentifierResolver.h
lang/Sema/Sema.h
c2f3e7f42c8bf9e8d4393a6e8c4762dafc4f28dd 07-Mar-2011 John McCall <rjmccall@apple.com> The conditional needs to be pushed before the branch. Make the test less
trivial to check this. Adjust for style.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Type.h
d47aad92ccfb6c2cf5921f8fefddd7e541dc9bb3 07-Mar-2011 Anders Carlsson <andersca@mac.com> Add a non-static FixupRelativePath to FileManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
65f7165676854bf75494f5b73a620d7237db5d41 07-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Redo part of r127137:
Pass down the correct C->getArgs, but keep it with the original
DerivedArgList type. Slightly adjust the MakeIndex call for the
different base type. This unbreaks the handling of --no-mangle on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
e6ec11aa15c7104d57009c6e036bf4ae29c35fb2 07-Mar-2011 Douglas Gregor <dgregor@apple.com> Remove the AST printer (-ast-print-xml), which is too incomplete and
too low-level to actually be useful but is just interesting enough for
people to try to use it (which won't actually work beyond toy examples).

To bring back the AST printer, it needs to be:
- Complete, covering all of C/C++/Objective-C
- Documented, with appropriate Schema against which we can validate
the output
- Designed for C/C++/Objective-C, not Clang's specific ASTs
- Stable across Clang versions
- Well-tested


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/DeclContextXML.def
lang/Frontend/DeclXML.def
lang/Frontend/DocumentXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
lang/Frontend/StmtXML.def
lang/Frontend/TypeXML.def
9ade4ae4fb7ed1fcbd63835d9f8f53052f0657a2 07-Mar-2011 Joerg Sonnenberger <joerg@bec.de> If called as *cpp or *cpp-[^-]*, run only the preprocessor. If no
input is specified, use stdin implicitly. Based on a patch from
Roman Divacky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
af036a6c25f540a9daf51e721485ae6d0e645bd8 06-Mar-2011 Anders Carlsson <andersca@mac.com> Convert FileManager::FixupRelativePath over to using PathV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
eff1dbec93999bfc5406eb861efd8add9de23633 06-Mar-2011 Douglas Gregor <dgregor@apple.com> We may fail to map a declaration in a template to its instantiated
declaration because of interesting ordering dependencies while
instantiating a class template or member class thereof. Complain,
rather than asserting (+Asserts) or silently rejecting the code
(-Asserts).

Fixes the crash-on-invalid in PR8965.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
841b238087d6cdb21c2443b7429cb85bd1f9fce2 06-Mar-2011 Douglas Gregor <dgregor@apple.com> Rename the type argument for the iboutletcollection attribute to not
conflict with MinGW headers, from Kirk Beitz!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
c850578dbfa68cf2d2776f59a5cb0009134d970e 06-Mar-2011 Anders Carlsson <andersca@mac.com> Write CXX base specifier offsets for chained ASTs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
ec356c320a81062b1843f0dbe7fedf29ed947ece 06-Mar-2011 Douglas Gregor <dgregor@apple.com> xpose HeaderSearch::SearchDirs to tools,s, from Paul Holden

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
a868c3799b739781db325c1bd2c6afd182bc9bd6 06-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Completed source ranges fixes for all classes inheriting from TypeDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
344577e6b58f42d18dc8118c8903b49a85dc005e 06-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed TypedefDecl and TemplateTypeParameter source range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
8b5b4099c61a136e9a1714c4d8a593febe942268 06-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Reinstate r127112, "Propagate new-style exception spec information to ExtProtoInfo.", this time with the missing header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/ExceptionSpecificationType.h
lang/Sema/DeclSpec.h
708a86690469474f0a8149abca71aa4c62bf9710 06-Mar-2011 NAKAMURA Takumi <geek4civic@gmail.com> Revert r127112, "Propagate new-style exception spec information to ExtProtoInfo."

It seems missing "clang/Basic/ExceptionSpecificationType.h".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/DeclSpec.h
06bfa84588658d721094f383d6950e75100c4c4c 05-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Propagate new-style exception spec information to ExtProtoInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/DeclSpec.h
6e5d319b671dbb0ecf70619834aa23c853d17621 05-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Propagate new-style exception spec information to Declarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
6784304db526cde59046d613c4175ce2caf93e44 05-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed LabelDecl source range and cleaned creation code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Sema/Sema.h
c494f77363f057dd8619fec4e885c4f80e3d1b66 05-Mar-2011 Douglas Gregor <dgregor@apple.com> When determining template instantiation arguments within a function
template (not a specialization!), use the "injected" function template
arguments, which correspond to the template parameters of the function
template. This is required when substituting into the default template
parameters of template template parameters within a function template.

Fixes PR9016.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
7acafd032e145dbdbbed9274ca57ec2c86b912bc 05-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for noexcept specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
b6ab6c1ca733fda2302a1c5066bdfc6218c89e41 05-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Improved MemberPointerType source locations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127085 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
b1c86492f9a9bef01a4567408c22f961bbd604fe 05-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Currently we can only remap a file by creating a MemoryBuffer and replacing the file contents with it.
Allow remapping a file by specifying another filename whose contents should be loaded if the original
file gets loaded. This allows to override files without having to create & load buffers in advance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
15727ddb11405c45372150b5bfb07dbfa4c9960b 05-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce OwnsRemappedFileBuffers field in ASTUnit, indicating whether the ASTUnit should delete the remapped buffers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
4e43259267f1ca1cab95b40cbd324fb4e75252ac 05-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Give warnings about static initializers of non-integral type their own warning
flag so it can be individually controlled. The new flag is
-Wc++0x-static-nonintegral-init.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
cb710a4df50b79659399f0722ea29e90251ea834 04-Mar-2011 Douglas Gregor <dgregor@apple.com> Diagnose destructor templates. Fixes PR7904.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7ec1873d694cf870264694d2b61219a03492bc30 04-Mar-2011 Douglas Gregor <dgregor@apple.com> When clearing a LookupResult structure, clear out the naming class,
too. Fixes PR7900.

While I'm in this area, improve the diagnostic when the type being
destroyed doesn't match either of the types we found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Lookup.h
6cd9d4aa13c2145c8b4398453974515b734bfe42 04-Mar-2011 Douglas Gregor <dgregor@apple.com> Teach Sema::ActOnCXXNestedNameSpecifier and Sema::CheckTemplateIdType
to cope with non-type templates by providing appropriate
errors. Previously, we would either assert, crash, or silently build a
dependent type when we shouldn't. Fixes PR9226.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
9a299e0575ce235f491014627c7267e2d2cd73de 04-Mar-2011 Douglas Gregor <dgregor@apple.com> Make sure to put template parameters into their owning template's
DeclContext once we've created it. This mirrors what we do for
function parameters, where the parameters start out with
translation-unit context and then are adopted by the appropriate
DeclContext when it is created. Also give template parameters public
access and make sure that they don't show up for the purposes of name
lookup.

Fixes PR9400, a regression introduced by r126920, which implemented
substitution of default template arguments provided in template
template parameters (C++ core issue 150).

How on earth could the DeclContext of a template parameter affect the
handling of default template arguments?

I'm so glad you asked! The link is
Sema::getTemplateInstantiationArgs(), which determines the outer
template argument lists that correspond to a given declaration. When
we're instantiating a default template argument for a template
template parameter within the body of a template definition (not it's
instantiation, per core issue 150), we weren't getting any outer
template arguments because the context of the template template
parameter was the translation unit. Now that the context of the
template template parameter is its owning template, we get the
template arguments from the injected-class-name of the owning
template, so substitution works as it should.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
4a85a73466bfb541cd9c7b57a99292a0b6900b9b 04-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for ClassTemplateSpecializationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
77d4ee2bfc90b77ec8b818de985cd4aceeef757b 04-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Improved TemplateTypeParmDecl end location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
8fbb7628e9fc364bbfb65bdf2c2468b0d06a7e5b 04-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed end location of FriendDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
203548ba4b72e7e59320d352afc1eb0b5ab131de 03-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for LabelDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
55a9637969260ca7eb66011732094b33f049c52a 03-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Removed left brace location from LinkageSpecDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5f6bcbebedb85ee745cbd9a3ca51ca8c766a6117 03-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed end source location for LinkageSpecDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
21e006e51a7f9889f55f5bc7b3ca8b50d17571ec 03-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for FileScopeAsmDecl. Others source range fixes will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Sema/Sema.h
67714230a191bc3c01f33378f34f34ef377991a6 03-Mar-2011 Douglas Gregor <dgregor@apple.com> When we use the default template arguments of a template template
parameter, save the instantiated default template arguments along with
the explicitly-specified template argument list. That way, we prefer
the default template template arguments corresponding to the template
template parameter rather than those of its template template argument.

This addresses the likely direction of C++ core issue 150, and fixes
PR9353/<rdar://problem/9069136>, bringing us closer to the behavior of
EDG and GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c5aff4497e5bfd7523e00b87560c1a5aa65136cc 03-Mar-2011 Ted Kremenek <kremenek@apple.com> Teach CFGImplicitDtor::getDestructorDecl() about arrays of objects with destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
0a9beb52baa6c990d45d638a177d9456e650282a 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Force CaseStmt to store its child statements in source-code order,
which is important for libclang's token-annotation and
where's-my-cursor functionality. Fixes <rdar://problem/9004439>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9c6082fe89c61af697f017aa80937581cc2128d8 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Revert "Add CC_Win64ThisCall and set it in the necessary places."

This reverts commit 126863.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TargetInfo.h
75e85048e73fcde2ce9d8a48dfdb1220e132eb59 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Fix the source range for a member access expression that includes a
nested-name-specifier and improve the detection of implicit 'this'
bases. Fixes <rdar://problem/8750392>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c9f8f5a726bbb562e4b2d4b19d66e6202dcb2657 02-Mar-2011 Ted Kremenek <kremenek@apple.com> Introduce CFGImplicitDtor::isNoReturn() to query whether a destructor actually returns. Use this for -Wreturn-type to prune false positives reported in PR 6884.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Add CC_Win64ThisCall and set it in the necessary places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TargetInfo.h
9151c11836f5fbb36cedfe4d22df7e00e77a1d42 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off TreeTransform::TransformNestedNameSpecifier() in favor of the
source-location-preserving
TreeTransform::TranformNestedNameSpecifierLoc(). No functionality
change: the victim had no callers (that themselves had callers) anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1d752d7d68359fd8f7701585d4658aa70e129261 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Kill off the TreeTransform::TransformTemplateName overload that has
poor source-location information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f1fe3759e6e8b1756c514f1181c86bd4b9d1666c 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Fix a thinko found by Craig Silverstein

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126850 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
b6744efecba58792cce20d2d7b9ee39927c5422e 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into template
template arguments. I believe that this is the last place in the AST
where we were storing a source range for a nested-name-specifier
rather than a proper nested-name-specifier location structure. (Yay!)

There is still a lot of cleanup to do in the TreeTransform, which
doesn't take advantage of nested-name-specifiers with source-location
information everywhere it could.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateBase.h
46bb4f1a3ac9517406887939612eb8df4b7be006 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Eliminate some unused getQualifierRange() member functions. We deal in nested-name-specifier locations now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
bdc49d360f98c1194d50b8bbb24885bf8d4c1ac4 02-Mar-2011 John McCall <rjmccall@apple.com> Pretty up the wrong-number-of-arguments-for-attribute diagnostic by
using a custom plural form. Split out the range diagnostics as their
own message.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d5313b0bbf3948fe7c63bf46a7da330c96d07309 02-Mar-2011 John McCall <rjmccall@apple.com> Provide an attribute, objc_method_family, to allow the inferred family
of an Objective-C method to be overridden on a case-by-case basis. This
is a higher-level tool than ns_returns_retained &c.; it lets users specify
that not only does a method have different retain/release semantics, but
that it semantically acts differently than one might assume from its name.
This in turn is quite useful to static analysis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
0ae927bdef0d0bd2838e8274938fac8aaa9035ee 02-Mar-2011 John McCall <rjmccall@apple.com> Split out a subgroup of -Wconversion called -Wsign-conversion. Note that
unlike GCC, this is simply a subset of -Wconversion in all languages; it
is not disabled by defualt in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
21cf9770acb9de06c54289b9266f5948ae6592ab 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Re-work the handling of implicit 'this' arguments and silly GCC-style attribute argument indexes. This handles the offsets in a consistent manner for all of the attributes which I saw working with these concepts. I've also added tests for the attribute that motivated this: nonnull."
5298a6982fbc8b585cc3a0e05a449cec7316b219 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Change CXTranslationUnit to not directly cast to an ASTUnit*, but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation."
e05b5fd8bef9f2ee1379bbf1b94abde2c89da685 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Improve diagnostic for calling non-const method on const object. Fixes rdar://7743000"
ec9d42ee77dd46c7c3f33f256252a5eb3592615e 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Handle member initializer in C++ ctor. - Add a new Kind of ProgramPoint: PostInitializer. - Still use GRStmtNodeBuilder. But special handling PostInitializer in GRStmtNodeBuilder::GenerateAutoTransition(). - Someday we should clean up the interface of GRStmtNodeBuilder."
7c6e01a5715d9d517a45ca06b339e9c50f4cbfcb 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Have CXXDeleteExpr::getDestroyedType return the actual destroyed type in more situations. In particular, for code like"
e52e3c3380a571d449422ead558337abe0b4b70f 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Kill CK_Unknown and flesh out the documentation for the existing CastKinds."
751c539902cbabe6767371770cce8a54d85e9082 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Kill off the remaining places which generate CK_Unknown casts."
fc7096d7e12269a6c3eb8653419cdda647fe454b 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Move CXString creation/management routines into their own .cpp file and make the interpretation of its flags private."
30aaf442cd6161653c1bdd440a0fa87ea0378ab5 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add an ExternalASTSource hook to complete a type on demand."
c043b86e565d76f0119c4b214d37fe64115ce212 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add support for "neon_vector_type" and "neon_polyvector_type" attributes to create the special Neon vector types. These are intended to be used in Clang's version of <arm_neon.h> to define special Neon vector types that will be mangled according to ARM's ABI."
c0cf3da593547ff937874d393899bd08d66786ad 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add another case to the whitelist of cast kinds that can convert to bool. Fixes PR8608."
db1c88bbdd8ab80940d40b65ff1b3f9ca2629f5f 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a new expression kind, OpaqueValueExpr, which is useful for certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow."
1baa0f1eb1250a4d6c1b3da7ec99c6e6b91f9fc3 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add method ParentMap::addStmt()."
ca34b8f06d560b4f604934d57b2ad311c4228e32 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Assorted work leading towards the elimination of CK_Unknown."
9430f69c3790702dcbac2828c63c706a8b993e4d 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add skeleton for handling other kinds of CFGElements."
c8e86ec41fe0584c2957a1e6fd5e2d1e2fed48e2 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Revert r119045. It was failing on Windows."
ab2dac4023e636fcbc79ac6b38a4afa6953389b4 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Clean up initialization of LangOptions object by splitting part of it into a parent class 'LangOptionsBase' that default initializes all flags to 0. Now the ctor of LangOptions only initializes the flags that might be non-zero (significantly simplifying things)."
fc5395a116a4e92548f99875f5d82786c5ff82ba 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a few more complex-related cast kinds that arise due to arbitrary implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea."
9a9a3b6a98739e8a34cab6f3ba8dae36cfbedfaf 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "When complaining about ambiguous overload resolution for a unary or binary operator, provide the types."
38cf267adf22762494a72c82791a491f4ecb6db3 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Introduce five new cast kinds for various conversions into and between complex types."
7f10664133668045bf1bd7143b9cba7ffabc07f7 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Bring UsualArithmeticConversionsType back into Sema and cast the operands appropriately. There are a lot of missing complex-related cast kinds."
12823719d22e279719fd65410dd914c85ed84743 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add GRWorkList::VisitItemsInWorkList() to allow a client to introspect the contents of a worklist. This API required changing the BFS worklist to use a deque instead of a queue, but that is better for performance reasons anyway."
1472d24d9345f42fb9b4ddee26126599acde930f 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Introduce a null-to-pointer implicit cast kind."
cfe5a0619ec52cf5d0e4420314f0e3d4cba73679 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Generalize ASTContext::areCompatibleVectorTypes to handle new Neon vector types."
3c8dec3136c81c69094121b9890b7f443e4d5c56 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Increase VectorTypeBitfields::VecKind field from 2 to 3 bits. With the addition of 2 enum values for Neon vectors, this field must now hold 6 different values and so requires 3 bits. Make the NumElements field one bit smaller to compensate."
2c66aff116466318cc5959b55130cf54cc123578 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a separate NeonPolyVector kind to distinguish polynomial vector types. Add support for mangling those types according to ARM's ABI."
377e99a861ca177cf1202cb4cb4e0210f12f1ec6 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "API enhancements to TypeLocBuilder."
5ecb0486de7ec68e806c3904727ef9080dbe2c03 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Make sure to always check the result of SourceManager::getPresumedLoc(), so that we don't try to make use of an invalid presumed location. Doing so can cause crashes."
9bcfacde28f00ff228afdad16189325074b42897 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Fix use of an uninitialized SourceLocation because DeclarationNameLoc failed to completely zero-initialize itself. Now we explicitly memset all of its values."
af3528825deebc581048e7c1a3f273fe2a8dc50a 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Remove some unnecessary reinterpret_cast."
a8708b28645ae32fbbc67bd9e9b44f6669fde3e1 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Extend the bitfield-truncation warning to initializations. rdar://problem/8652606"
8a73224f8ec3c2a7e9804643cf0b72dda027c540 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Improve ASTUnit's capture of diagnostics so that the diagnostic-capturing client lives as long as the ASTUnit itself does. Otherwise, we can end up with crashes when we get a diagnostic outside of parsing/code completion. The circumstances under which this happen are really hard to reproduce, because a file needs to change from under us."
026ae918949e2b3a1eddb04a534b72ed50621830 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a variant of GCC-style vector types for ARM NEON. NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum."
a552d061088897329a579c322f445af73a54c96b 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Instantiate class member template partial specialization declarations in the order they occur within the class template, delaying out-of-line member template partial specializations until after the class has been fully instantiated. This fixes a regression introduced by r118454 (itself a fix for PR8001)."
eca5d22c16eb784e5f35ca816fa22e0c0e060417 02-Mar-2011 John McCall <rjmccall@apple.com> Support a new InheritableAttr subclass, InheritableParamAttr, which is
used for attributes that are okay to inherit when written on a parameter.
Dependent on LLVM r126827.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Basic/AttrKinds.h
lang/Sema/Sema.h
406f98f6a5a7bde5707085af8d66204e7e76af45 02-Mar-2011 Douglas Gregor <dgregor@apple.com> When we're substituting into a parameter-type-list nested inside the pattern
of an expansion, and we have a paramameter that is not a parameter
pack, don't suppress substitution of parameter packs within this
context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
85f3d76c0ecfdefcf83ea44a57b7a16119c8a045 02-Mar-2011 John McCall <rjmccall@apple.com> Move some of the logic about classifying Objective-C methods into
conventional categories into Basic and AST. Update the self-init checker
to use this logic; CFRefCountChecker is complicated enough that I didn't
want to touch it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/ExprObjC.h
lang/Analysis/DomainSpecific/CocoaConventions.h
lang/Basic/IdentifierTable.h
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
059101f922de6eb765601459925f4c8914420b23 02-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into dependent
template specialization types. This also required some parser tweaks,
since we were losing track of the nested-name-specifier's source
location information in several places in the parser. Other notable
changes this required:

- Sema::ActOnTagTemplateIdType now type-checks and forms the
appropriate type nodes (+ source-location information) for an
elaborated-type-specifier ending in a template-id. Previously, we
used a combination of ActOnTemplateIdType and
ActOnTagTemplateIdType that resulted in an ElaboratedType wrapped
around a DependentTemplateSpecializationType, which duplicated the
keyword ("class", "struct", etc.) and nested-name-specifier
storage.

- Sema::ActOnTemplateIdType now gets a nested-name-specifier, which
it places into the returned type-source location information.

- Sema::ActOnDependentTag now creates types with source-location
information.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
94fdffa4a572fc14ac296f5f1aae9db3734c72f1 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into dependent
template specialization types. There are still a few rough edges to
clean up with some of the parser actions dropping
nested-name-specifiers too early.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TypeLoc.h
bbe8e3eff56ac1d79f3668d706536e3cebe28c18 01-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Be bug compatible with GCC and ignore -pg on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
3aea4dac830cb03d883a13ab30c28a3a53beca58 01-Mar-2011 Ted Kremenek <kremenek@apple.com> For C++, enhance -Warray-bounds to recursively analyze array subscript accesses in ?: expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
9e876876afc13aa671cc11a17c19907c599b9ab9 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate the introduction of source-location information for
nested-name-speciciers within elaborated type names, e.g.,

enum clang::NestedNameSpecifier::SpecifierKind

Fixes in this iteration include:

(1) Compute the type-source range properly for a dependent template
specialization type that starts with "template template-id ::", as
in a member access expression

dep->template f<T>::f()

This is a latent bug I triggered with this change (because now we're
checking the computed source ranges for dependent template
specialization types). But the real problem was...

(2) Make sure to set the qualifier range on a dependent template
specialization type appropriately. This will go away once we push
nested-name-specifier locations into dependent template
specialization types, but it was the source of the
valgrind errors on the buildbots.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TypeLoc.h
lang/Sema/Sema.h
cfe9af250f466e7e38becea4428990448ae07737 01-Mar-2011 Roman Divacky <rdivacky@freebsd.org> Implement -mrtd which sets the StdCall calling convention to be the default
one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
2786864406af0f3ec65b300675c6f3c809c22fd7 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126748, my second attempt at nested-name-specifier source
location information for elaborated types. *sigh*


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TypeLoc.h
lang/Sema/Sema.h
be38c5f5d8fa7c43c52fafddee054b8fe8c2b964 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Reinstate r126737, extending the generation of type-source location
information for qualifier type names throughout the parser to address
several problems.

The commit message from r126737:

Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TypeLoc.h
lang/Sema/Sema.h
44cd9f9d686dfdb9ad16113c41c2dca1da35a646 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126737, the most recent nested-name-specifier location change, for buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TypeLoc.h
lang/Sema/Sema.h
3c0349e87cdbd7316d06d2411d86ee1086e717a5 01-Mar-2011 Ted Kremenek <kremenek@apple.com> In preparation for fixing PR 6884, rework CFGElement to have getAs<> return pointers instead of fresh CFGElements.

- Also, consoldiate getDtorKind() and getKind() into one "kind".
- Add empty getDestructorDecl() method to CFGImplicitDtor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126738 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
239cbb023c8da689e7722f7146914eed9755e368 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into elaborated
name types, e.g., "enum clang::NestedNameSpecifier::SpecifierKind".

Aside from the normal changes, this also required some tweaks to the
parser. Essentially, when we're looking at a type name (via
getTypeName()) specifically for the purpose of creating an annotation
token, we pass down the flag that asks for full type-source location
information to be stored within the returned type. That way, we retain
source-location information involving nested-name-specifiers rather
than trying to reconstruct that information later, long after it's
been lost in the parser.

With this change, test/Index/recursive-cxx-member-calls.cpp is showing
much improved results again, since that code has lots of
nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TypeLoc.h
lang/Sema/Sema.h
25a792b0361d80337c75a14320f5be1b210066dc 01-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove SVal::getAsVarDecl() and reason about MemRegions, not Decls. Suggestion by Ted!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
2494dd024b392b8def58bf067cc94b51c214cf77 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
DependentNameTypeLoc. Teach the recursive AST visitor and libclang how to
walk DependentNameTypeLoc nodes.

Also, teach libclang about TypedefDecl source ranges, so that we get
those. The massive churn in test/Index/recursive-cxx-member-calls.cpp
is a good thing: we're annotating a lot more of this test correctly
now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TypeLoc.h
ec8605f1d7ec846dbf51047bfd5c56d32d1ff91c 01-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Rename CheckerV2 -> Checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/Checker.h
lang/StaticAnalyzer/Core/CheckerV2.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
d26a475068535834bbebd87f429ec773d6227e41 01-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove Checker V1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/Checker.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.h
eb48bd1dd4168ab206a330bf523659170291a6a0 01-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove checker V1 registration and running from ExprEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
9f8862aa64300ef97b8fe85034ee93bbc03e3b7b 01-Mar-2011 Zhanyong Wan <wan@google.com> Improves the coding style in SValBuilder. This patch:

- renames evalCastNL and evalCastL to evalCastFromNonLoc and
evalCastFromLoc (avoid abbreviations that aren't well known).

- makes all function parameter names start with a lower case letter
for consistency and distinction from member variables.

- avoids abbreviations in function parameter names.

Reviewed by kremenek@apple.com.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
2cb4222338669a3e70b546ef264fbd5d3f96aef5 01-Mar-2011 Chris Lattner <sabre@nondot.org> -fwrapv should turn off the inbounds markers from geps used for pointer
arithmetic. This is part of PR9256, it would be great if someone else
wired up -fno-strict-overflow in the driver to -fwrapv.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
5f791bb44417ecc201ed57a85d0fe02001d8a615 01-Mar-2011 Douglas Gregor <dgregor@apple.com> Refactor the construction of nested-name-specifiers with
source-location information into a NestedNameSpecifierLocBuilder
class, which lives within the AST library and centralize all knowledge
of the format of nested-name-specifier location information here.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/Sema/DeclSpec.h
e29425bd22fbb9200bbec7b743197b9c6dad3e40 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach Sema::CheckTypenameType to use nested-name-specifiers with
source-location information. We don't actually preserve this
information in any of the resulting TypeLocs (yet), so it doesn't
matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
40d96a69c0e1e8c10f92d450c305a7aae696ca9c 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier location information into DeclRefExpr and
MemberExpr, the last of the expressions with qualifiers!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
4c9be89bb615ec07eb3ed507c8fa9d0baa8a5ad7 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
UnresolvedLookupExpr and UnresolvedMemberExpr.

Also, improve the computation that checks whether the base of a member
expression (either unresolved or dependent-scoped) is implicit. The
previous check didn't cover all of the cases we use in our
representation, which threw off source-location information for these
expressions (which, in turn, caused some breakage in libclang's token
annotation).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
c4d2c9074be6eb2091086eddd6c8f052f3b245c8 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
lang/Frontend/AnalyzerOptions.h
d655ab28fdf7c940d3f79f8f287954d7f76e0977 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Run the ExprEngine depending on the CheckerManager having path-sensitive checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
344500e3b78b95e2d911f45a64c5364d346ba799 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] The current UninitializedValuesChecker will go away, remove '-warn-uninit-values'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
a07992bb4a2c1d21ed7e4376fa6e79342be0fd18 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Remove redundant friend declaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
7c3179cf463c3b3b8c21dbb955f933ba50b74f28 28-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
CXXDependentScopeMemberExpr, and clean up instantiation of
nested-name-specifiers with dependent template specialization types in
the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
b3d74da3e1620c9a7a378afb5f244e4987e6713e 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate NSErrorChecker and DereferenceChecker to CheckerV2.

They cooperate in that NSErrorChecker listens for ImplicitNullDerefEvent events that
DereferenceChecker can dispatch.
ImplicitNullDerefEvent is when we dereferenced a location that may be null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerV2.h
deb6447d0029bdb122397fafb5fa2a4e76f2e555 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Introduce "event" mechanism in CheckerManager.

A checker can register as receiver/listener of "events" (basically it registers a callback
with a function getting called with an argument of the event type) and other checkers can
register as "dispatchers" and can pass an event object to all the listeners.
This allows cooperation amongst checkers but with very loose coupling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
c304d9058ad69ff1fcbc6d19ca0be91acfa243a2 28-Feb-2011 Axel Naumann <Axel.Naumann@cern.ch> From Vassil Vassilev:
* Add default implementations (no-op) for ExternalASTSource's pure virtual functions. There are valid use cases that can live with these defaults.
* Move ExternalASTSource's out of line implementations into separate source file.
* Whitespace, forward decl, #include cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
84021556baceb76eedf7d44be8ba71d9b8cfacce 28-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Rename tok::eom to tok::eod.

The previous name was inaccurate as this token in fact appears at
the end of every preprocessing directive, not just macro definitions.
No functionality change, except for a diagnostic tweak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Basic/TokenKinds.def
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
15348aeb81285c75b2e92b5bf8d2db3445d147c2 28-Feb-2011 Anders Carlsson <andersca@mac.com> Add a -fcxx-exceptions flag to the frontend, which can be used to enable
C++ exceptions, even when exceptions have been turned off using -fno-exceptions.
Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions.

C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and
-fno-objc-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
d3bf3c0287a057eafe4b5d5588ebbb29f40ab6e1 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Introduce SVal::getAsVarDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
cc05d511b26ac6dc80fcbcc78ac305d2755aa0b9 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate UndefBranchChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
05357018b2e5e66559ad0ce2147dc1db9af42b9d 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate ArrayBoundCheckerV2 to CheckerV2.

Turns -analyzer-check-buffer-overflows into -analyzer-checker=core.experimental.Overflow

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
58f2e7c3c3860e410fa3d8252862ef10be7cdc70 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Turn -analyzer-stats into -analyzer-checker=debug.Stats

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
6dd4dffe1090e820e9b5b25eee8ad3907a1aa679 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-checks' flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
lang/StaticAnalyzer/Checkers/LocalCheckers.h
312dbec867f6b8d6b86fd562c53352cd4db27468 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate MallocChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
3fe71f445f76003649b5da24209e80225a7ee74f 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Have CheckerManager::registerChecker return a pointer to the checker object and
only allow a checker to be registered once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
7a17851eee37f933eb57a5af7e1a0eb455443f6a 28-Feb-2011 Anders Carlsson <andersca@mac.com> Get rid of the areExceptionsEnabled() getter from LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
702e5474f570d0b83db9f354619b8ac5bc8ed743 28-Feb-2011 Chris Lattner <sabre@nondot.org> add a const version of this accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
aa2187de137e5b809dcbbe14f3b61ae907a3d8aa 28-Feb-2011 Douglas Gregor <dgregor@apple.com> When we encounter a dependent template name within a
nested-name-specifier, e.g.,

T::template apply<U>::

represent the dependent template name specialization as a
DependentTemplateSpecializationType, rather than a
TemplateSpecializationType with a dependent TemplateName.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
a02411e4d58b1730bea2a990822858ecc31e8eb1 27-Feb-2011 Douglas Gregor <dgregor@apple.com> Eliminate a silly little Parse/Sema dance when parsing typename
specifiers such as

typename T::template apply<U>

Previously, we would turn T::template apply<U> into a
TemplateSpecializationType. Then, we'd reprocess that
TemplateSpecializationType and turn it into either a
TemplateSpecializationType wrapped in an ElaboratedType (when we could
resolve "apply" to a template declaration) or a
DependentTemplateSpecializationType. We now produce the same ASTs but
without generating the intermediate TemplateSpecializationType.

The end goal here is to avoid generating TemplateSpecializationTypes
with dependent template-names, ever. We're not there yet.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
053ec969e3023e4b4a666546476ff74e6bfdfd9a 27-Feb-2011 Logan <tzuhsiang.chien@gmail.com> Merge with clang upstream Nov 10th 2010.
4171766318a2564fbc9a739be0a2851f441c0d29 26-Feb-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement delegating constructors partially.

This successfully performs constructor lookup and verifies that a
delegating initializer is the only initializer present.

This does not perform loop detection in the initialization, but it also
doesn't codegen delegating constructors at all, so this won't cause
runtime infinite loops yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Initialization.h
lang/Sema/Sema.h
8e10f3b9cc1db43645bbc2999eb163af8997d468 26-Feb-2011 John McCall <rjmccall@apple.com> Provide a bit saying that a builtin undergoes custom type-checking, then
don't let calls to such functions go down the normal type-checking path.
Test this out with __builtin_classify_type and __builtin_constant_p.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
bfdfb5a4119e1c2b173be5d0ca8a91d8c246698f 25-Feb-2011 Matt Beaumont-Gay <matthewbg@google.com> ASTStmtReader is already a friend of DependentScopeDeclRefExpr, and GCC
doesn't like re-friending.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
5e24f2a4ad3a3623349f058e99c7c71e1c8d705f 25-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Sprinkle optional text of the "unavailable' attribute
where ever such attribute causes an error diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
00cf3cc2718671aa48e8da264a523b0058a8591e 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into
DependentScopeDeclRefExpr. Plus, give NestedNameSpecifierLoc == and !=
operators, since we're going to need 'em elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/NestedNameSpecifier.h
lang/AST/RecursiveASTVisitor.h
25ca421a6049350a2748c8fd0c19a052eba6ae99 25-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Remove the FIXME I introduced last night, and pull the logic for
marking selected overloads into the callers. This allows a few callers
to skip it altogether (they would have anyways because they weren't
interested in successful overloads) or defer until after further checks
take place much like the check required for PR9323 to avoid marking
unused copy constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
2b982b778d265c337af5d1b4c74ce49479cbda7d 25-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Print optional message for attr(unavailable) in C++ mode.
// rdar://9046492


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f3db29fff6a583ecda823cf909ab7737d8d30129 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source-location information into
pseudo-destructor expressions. Also, clean up some
template-instantiation and type-checking issues with
pseudo-destructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
0cfaf6a270ecd0f5c7e541a8047c87948317548b 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into namespace
aliases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
db9924191092b4d426cc066637d81698211846aa 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Push nested-name-specifier source location information into using directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/RecursiveASTVisitor.h
30028234f38945981ebf9c8a2cb915fc2f9a63a4 25-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Rough fix for PR9323 that prevents Clang from marking copy constructor
declarations as referenced when in fact we're not going to even form
a call in the AST. This is significant because we attempt to allow as an
extension classes with intentionally private and undefined copy
constructors to have temporaries bound to references, and so shouldn't
warn about the lack of definition for that copy constructor when the
class is internal.

Doug, John wasn't really satisfied with the presence of overloading at
all. This is a stop-gap and there may be a better solution. If you can
give me some hints for how you'd prefer to see this solved, I'll happily
switch things over.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
79ac241f0b4b5a653adb7e07292d7b00c5cb92ff 25-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Give this warning a flag that can be used to turn it off in old, crufty,
legacy code that contains dead code paths referring to such
declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c22b5fff39a7520207f165fb16a27a34b944bd9c 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Use NestedNameSpecifierLoc within out-of-line variables, function, and
tag definitions. Also, add support for template instantiation of
NestedNameSpecifierLocs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/AST/Decl.h
lang/AST/NestedNameSpecifier.h
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
7decebfc7b9dc841f228c93cc2e41e3e62911ff8 25-Feb-2011 Ted Kremenek <kremenek@apple.com> Teach TextDiagnosticPrinter to print out '-Werror' in addition to the warning flag for a warning mapped to an error.

For example:

t.c:7:9: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
dc355713be51fcb4ee52d9fd6b4548ceff47fadf 25-Feb-2011 Douglas Gregor <dgregor@apple.com> Update UsingDecl, UnresolvedUsingTypenameDecl, and
UnresolvedUsingValueDecl to use NestedNameSpecifierLoc rather than the
extremely-lossy NestedNameSpecifier/SourceRange pair it used to use,
improving source-location information.

Various infrastructure updates to support NestedNameSpecifierLoc:
- AST/PCH (de-)serialization
- Recursive AST visitor
- libclang traversal (including the first tests of this
functionality)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/NestedNameSpecifier.h
lang/AST/RecursiveASTVisitor.h
lang/Frontend/DeclXML.def
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
116f3640daee424dfcdbe55e80be5a67476be4b0 25-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Intoduce '-analyzer-checker-help' flag which outputs a list of all available static analyzer checkers.

This is pretty basic for now, eventually checkers should be grouped according to package, hidden checkers should be indicated etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
lang/StaticAnalyzer/Core/CheckerProvider.h
lang/StaticAnalyzer/Frontend/FrontendActions.h
65d39251ff57b8e33cf6d3a7fcc6aa1c6f8cdc68 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't have any checkers associated with it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126440 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
lang/StaticAnalyzer/Checkers/LocalCheckers.h
c34348a7ef1a6b3f92a644a227953800cd1f9947 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Retain complete source-location information for C++
nested-name-specifiers throughout the parser, and provide a new class
(NestedNameSpecifierLoc) that contains a nested-name-specifier along
with its type-source information.

Right now, this information is completely useless, because we don't
actually store the source-location information anywhere in the
AST. Call this Step 1/N.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/Sema/DeclSpec.h
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
5fa05cb906e9ddd34ef2ae2a872014aeaf4bc04d 24-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Simplify messages as requested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f8291a190cc6765630312911f441d9e23564eda2 24-Feb-2011 Axel Naumann <Axel.Naumann@cern.ch> From Vassil Vassilev:
Add an interface for last resort, unqualified lookup. It can provide results for unqualified lookup when Sema fails to find anything itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
8be5b3aced37e1c7728741c60d47011f11649a58 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate ArrayBoundChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
9c0d6891b3ec4b0d20b8a295946c0dc5426d147c 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Don't pass a GRState to CheckerManager::runCheckersForLocation, terrible mistake.

If the state is new, make sure an ExplodedNode is associated with it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
14aba76042e041b2c5e439bf4ae353a0a3c7fd73 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach NestedNameSpecifier to keep track of namespace aliases the same
way it keeps track of namespaces. Previously, we would map from the
namespace alias to its underlying namespace when building a
nested-name-specifier, losing source information in the process.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/AST/RecursiveASTVisitor.h
lang/Sema/DeclSpec.h
64be13795a9b5b25de6b151551a2f5ef2bab353c 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove unused functions from CheckerManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126352 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
183ff98f425d470c2a0276880aaf43496c9dad14 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate CStringChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
9ddba32f25c0315cd3a6c7b63e0275b27cc1d973 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Tweak the CXXScopeSpec API a bit, so that we require the
nested-name-specifier and source range to be set at the same time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
2e4c34ac53d08633b9473df921db4c7e4c9cd577 24-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach CXXScopeSpec to handle the extension of a nested-name-specifier
with another component in the nested-name-specifiers, updating its
representation (a NestedNameSpecifier) and source-location information
(currently a SourceRange) simultaneously. This is groundwork for
adding source-location information to nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
21206d5e3167d5e8066c005c1773afc80ff50ae6 24-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Implement a warning for known shift overflows on constant shift
expressions. Consider the code:

int64_t i = 10 << 30;

This compiles fine, but most developers expect it to produce the value
for 10 gigs, not -2 gigs. This is actually undefined behavior because
the LHS is a signed integer type.

The warning is currently gated behind -Wshift-overflow.

There is a special case where only the sign bit is overridden that gets
a custom error message and is by default ignored. This case is much less
likely to cause observed buggy behavior, it's just undefined behavior
according to the spec. This warning can be enabled with
-Wshift-sign-overflow.

Original patch by Oleg Slezberg, with style tweaks and some correctness
fixes by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
277a6e752512cff286190d35cb353ce717e86b18 23-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Preserve what the user passed to -include when emitting .d files. Fixes PR8974!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
lang/Serialization/ASTReader.h
af5800a1e287990bb547e052f257adeeae5ab476 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate StackAddrLeakChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
f178ac8b68b29e44867777232ba8fee59edc4037 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Refactor EndOfFunctionNodeBuilder.

-Introduce EndOfFunctionNodeBuilder::withCheckerTag to allow it be "specialized" with a
checker tag and not require the checkers to pass a tag.
-For EndOfFunctionNodeBuilder::generateNode, reverse the order of tag/P parameters since
there are actual calls that assume the second parameter is ExplodedNode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
cd50e136ad7dc721822f5e6350769a37c216612d 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] const goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
e1bfb7ae0dd0762c88e1fd94746e973c37f2e04e 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate ChrootChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
2ea40c0db7d6e281fad49f8c34335ef04c5b9b84 23-Feb-2011 Matt Beaumont-Gay <matthewbg@google.com> fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d067c07c6cbf099b25aba38bcb66f38e79d0c420 23-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Fix the behavior of -Wignored-qualifiers on return type qualifiers in
several ways. We now warn for more of the return types, and correctly
locate the ignored ones. Also adds fix-it hints to remove the ignored
qualifiers. Fixes much of PR9058, although not all of it.

Patch by Hans Wennborg, a couple of minor style tweaks from me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
87fb9404cd962b78c98947d75d68be1691c4e737 23-Feb-2011 Douglas Gregor <dgregor@apple.com> Mention libclang in the Doxygen documentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126316 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
30726c6baee1417307236e854f1474fdb3cedb98 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate UnreachableCodeChecker to CheckerV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
2e471a3e476396be1ddca4ab8b9df721bcfc9437 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Add LangOptions in CheckerManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Frontend/CheckerRegistration.h
0761e44550f094633bbe7fd4ae1d79ec456fca69 23-Feb-2011 Anders Carlsson <andersca@mac.com> Add a -fcxx-exceptions flag to clang -cc1. This controls the newly added CXXExceptions flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
7da99b05aa9482e76b2954223b5652469004aec2 23-Feb-2011 Anders Carlsson <andersca@mac.com> Add a CXXExceptions flag to LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
79c42c88efa708d03caa109e3e2ec57a2e6abebe 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Add doxygen comments to Sema::DiagRuntimeBehavior().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0423fc6149c9f11e8892ed903a5b68133797fba5 23-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Sema: diagnose kernel calls to non-global functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
351ba91eaa6d30e523587b2d7ed676a5172c6e56 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Enhance Sema::DiagRuntimeBehavior() to delay some diagnostics to see if the related code is reachable. This suppresses some
diagnostics that occur in unreachable code (e.g., -Warray-bound).

We only pay the cost of doing the reachability analysis when we issue one of these diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
lang/Sema/ScopeInfo.h
42461eecee98fff3671b3c14ce10f1a9e18cc95c 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Migrate CFGReachabilityAnalysis out of the IdempotentOperationsChecker and into its own analysis file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/CFGReachabilityAnalysis.h
lang/Analysis/AnalysisContext.h
283a358aecb75e30fcd486f2206f6c03c5e7f11d 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Have IdempotentOperationsChecker pull its CFGStmtMap from AnalysisContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Sema/AnalysisBasedWarnings.h
3ed6fc08a9cd293d012fa49ab2a615e618d7c3fa 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Issue AnalysisBasedWarnings as part of calling Sema::PopBlockOrFunctionScope(). No real functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
lang/Sema/Sema.h
762696fff298627b72b63dbb0becf57f689801ca 23-Feb-2011 Ted Kremenek <kremenek@apple.com> Update Sema::DiagRuntimeBehavior() to take an optional Stmt* to indicate the code the diagnostic is associated with.

This Stmt* is unused, but we will use it shortly for pruning diagnostics associated
with unreachable code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5ef04ee40c3332d31b6d1439f50d0ddb45812929 23-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Switch the VerifyDiagnosticsClient to use PresumedLocs now that they
exist. Cheat and do this by adding some wrappers around the PresumedLoc
machinery that directly return the line and column number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
406c38e8c1f105acfd438f94dfbc17af817aa4a5 23-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR9276: We were missing the checks for auto deducing to different types in the same declaration group in the template instantiation case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
fc26107870e0e450d863541179234bf9063a4da7 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Silence a MSVC warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
404fc3ad6bd844bf8ce70cbf9974ab297704a122 23-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Refactor BugTypes and their ownership model.

-In general, don't have the BugReporter deleting BugTypes, BugTypes will eventually become owned by checkers
and outlive the BugReporter. In the meantime, there will be some leaks since some checkers assume that
the BugTypes they create will be destroyed by the BugReporter.
-Have BugReporter::EmitBasicReport create BugTypes that are reused if the same name & category strings
are passed to EmitBasicReport. These BugTypes are owned and destroyed by the BugReporter.
This allows bugs reported through EmitBasicReport to be coalesced.
-Remove the llvm::FoldingSet<BugReportEquivClass> from BugType and move it into the BugReporter.
For uniquing BugReportEquivClass also use the BugType* so that we can iterate over all of them using only one set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/BugType.h
b80f66847d103aee7988b791a380fc563bf89a19 23-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> DeclGroup's operator[] always returned the first Decl in the group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
65b34d7bc314c7d4b448164e1a889311bd30b375 23-Feb-2011 Matt Beaumont-Gay <matthewbg@google.com> Clean up the error recovery at the bottom of Sema::LookupMemberExpr. This
mostly just shuffles various possibilities for recovery into a more
straightforward order, but also unifies a couple of diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
12e3ecec906f65580059a9d8555849a272c2db81 23-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Provide Fixit warning when 'auto' is intended as storage
specifier in legacy code. Patch is reviewed offline by Doug.
// rdar://9036633.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
8178df3b39ab923ff5d24538812628abee33df79 22-Feb-2011 John McCall <rjmccall@apple.com> Emit the structure layout of the block literal parameter to a block
invocation function into the debug info. Rather than faking up a class,
which is tricky because of the custom layout we do, we just emit a struct
directly from the layout information we've already got.

Also, don't emit an unnecessarily parameter alloca for this "variable".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
201e519ad9cc2863bc94cf799e407a81ed29181f 22-Feb-2011 John McCall <rjmccall@apple.com> Give ImplicitParamDecl a public constructor so that it can be allocated on
the stack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
aab9e315184d344bbd733f13b68915d02db7b32b 22-Feb-2011 John McCall <rjmccall@apple.com> Provide a Decl::getNonClosureContext to look through any "closure" (i.e.
block and, eventually, C++ lambda) contexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
86f208c1a112c3e8984e63daec15ccf0a1a84329 22-Feb-2011 Douglas Gregor <dgregor@apple.com> Enable enumeration types with a fixed underlying type, e.g.,

enum X : long { Value = 0x100000000 };

when in Microsoft-extension mode (-fms-extensions). This (now C++0x)
feature has been supported since Microsoft Visual Studio .NET 2003.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
cd9ec3b4fb3d042f89aa5b572de7df3ef9ee4a80 22-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement the GNU C extension which permits the initialization of an
array from a constant array compound literal. Fixes PR9261.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Initialization.h
769ce3e93ad35bd9ac28e4d8b8f035ae4fd9a5b5 22-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Start moving the path-sensitive checkers to CheckerV2.

-Migrate ObjCSelfInitChecker to CheckerV2. In the process remove the 'preCallSelfFlags' field
from the checker class and use GRState for storing that info.
-Get ExprEngine to start delegating checker running to CheckerManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
6bcb48dc67e417e0ecce803f28d13bbea2ee0243 22-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Separate CheckerContext into its own include file. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/Checker.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
9fc8fdd79c5ecf30833ccc0dd5e14be7aa884470 22-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Fix GRStatePartialTrait<bool> and introduce GRStatePartialTrait<unsigned>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h
0bb208c91e91e2fe91e0f487b00ff4b5b30c8cc2 22-Feb-2011 Joerg Sonnenberger <joerg@bec.de> Remove the storage for -cxx-system-include. Make libcxx toolchain
use -nostdinc++ and -cxx-isystem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
a5ef584fd3d18da0c98342b4b6453948b7eb30d3 22-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Reimplement __pragma support using a TokenLexer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
b2eb53d9fd973a1a02e05e67a3307b3efd12eff2 22-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Make TokenLexer capable of storing preprocessor directive tokens

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenLexer.h
b9075601840893a8f7a21918ac4c7e28dcb67f1a 22-Feb-2011 Douglas Gregor <dgregor@apple.com> Fix a little bug in the handling of enumeration types with a fixed
underlying type: we weren't parsing unnamed enumeration types with a
fixed underlying type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
284cc8d8a90ae6558e0a4b60b7dc1ddcfd220758 22-Feb-2011 Douglas Gregor <dgregor@apple.com> Warn about implicit conversions between values of different, named
enumeration types. Fixes <rdar://problem/8559831>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e9b801f7633b11b18d357a71442bd003435784e8 22-Feb-2011 Anders Carlsson <andersca@mac.com> Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.

Update all tests accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
8110f04b39fd028496dd6bf9e3a78278c3e0a6ad 22-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> In Objective-C, there are no trailing return types, so don't produce diagnostics suggesting they are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2df6647847af283302834dadae5d9dcefa7e0ad4 22-Feb-2011 Joerg Sonnenberger <joerg@bec.de> Bug#8945: Add -cxx-isystem option to specify C++ system directories.
It works like -isystem and the search path keeps -isystem and
-cxx-isystem in order relative to each other. -cxx-isystem is only used
for C++ sources though. Drop the existing -cxx-system-include option for
cc1 as it is now redundant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/HeaderSearchOptions.h
e7397c6a1bb2b205c5fe678e26199eb26d22e38e 22-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix a few auto-related issues:

* 'auto' was being rejected on abstract-declarators with trailing return
types and on typedefs with trailing return types. 'auto' is always
allowed in these cases. This was found while testing the fix for PR 9278.

* A very poor diagnostic was being issued for auto (f() -> int): "return
type must be 'auto', not 'auto'". This is closely related to PR 9060.

* Trailing return type handling was happening slightly too late,
resulting in the checks for functions returning arrays and functions
returning functions being missed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
21761c8378a493c32ab0f7d2b8880986a0ba73a3 22-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Warn when type modifiers on objc method declarations in
protocols do not match with method implementation.
// rdar://7076235


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
ddc83f9255834217f0559b09ff75a1c50b8ce457 22-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> C++0x's deduced auto is illegal in typedefs.

This actually rules out too much, since it also catches typedefs for pointers to functions with trailing return types:

typedef auto (*F)() -> int;

Fix for that (and the same issue in all abstract-declarators) to follow shortly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
935f0f01c1ed3c2052b797ac035d57a85b78adc4 21-Feb-2011 Chris Lattner <sabre@nondot.org> add one more case of mismatched input/output constraints.
When the mismatch is due to a larger input operand that is
a constant, truncate it down to the size of the output. This
allows us to accept some cases in the linux kernel and elsewhere.
Pedantically speaking, we generate different code than GCC, though
I can't imagine how it would matter:

Clang:
movb $-1, %al
frob %al

GCC:

movl $255, %eax
frob %al



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
483b9f3bc05c5409e2c6643f1c9d91e21c8ff9d2 21-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Tweaks to C++0x deduced auto type support:
* Flag indicating 'we're parsing this auto typed variable's initializer' moved from VarDecl to Sema
* Temporary template parameter list for auto deduction is now allocated on the stack.
* Deduced 'auto' types are now uniqued.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/Sema/Sema.h
b0c2301a40a3e54ce7195f11a59d025ef60ebffb 21-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Remove warning on future change in ivar lookup rule
when doing the property default synthesis.
// rdar://9027673.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2882eca5a184c78f793188083f6ce539740a5cf2 21-Feb-2011 John McCall <rjmccall@apple.com> Pseudo-revirtualize CallExpr::getSourceRange by making it follow the
logic from CXXMemberCallExpr and by making it check for
CXXOperatorCallExpr in order to defer. This is not really an awesome solution,
but I don't have a better idea.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
751969957e4cbd4c8b5bf8508ab8620e24743005 21-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Allow -Wformat to be enabled without -Wformat-security. GCC gates
-Wformat-security on -Wformat, not vice-versa.

Fixes PR8486. Patch by Oleg Slezberg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
c8da1ecaf58ff41b652dd53331aace948027039b 20-Feb-2011 Oscar Fuentes <ofv@wanadoo.es> New function for tablegenning: clang_tablegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
lang/Basic/CMakeLists.txt
lang/Driver/CMakeLists.txt
lang/Lex/CMakeLists.txt
lang/Serialization/CMakeLists.txt
34b41d939a1328f484511c6002ba2456db879a29 20-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement the C++0x deduced 'auto' feature.

This fixes PR 8738, 9060 and 9132.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
bee5a79fc95e3003d755031e3d2bb4410a71e1c1 20-Feb-2011 Ken Dyck <kd@kendyck.com> Add const qualifier to getTypeInfoInChars().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c1cfdf8647a499b6b3024f4bd14a236cddb23988 20-Feb-2011 Anders Carlsson <andersca@mac.com> Add a LangOptions::areExceptionsEnabled and start using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
da4b7cf09ebfd4e4098b516081fa9dae2f5c99e0 20-Feb-2011 Anders Carlsson <andersca@mac.com> Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
4b93d660c6326ec79b5e369317d1051cf826c2f3 20-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Re-instate r125819 and r125820 with no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/CodeGenAction.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
96b1d4b4eb6b18dd6df7a2c0833332b45840580f 19-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 125820 and 125819 to fix PR9266.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/CodeGenAction.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
1be8eec3ddd2a23c19b453c2639226174eb5d4a8 19-Feb-2011 Douglas Gregor <dgregor@apple.com> Handle the resolution of a reference to a function template (which
includes explicitly-specified template arguments) to a function
template specialization in cases where no deduction is performed or
deduction fails. Patch by Faisal Vali, fixes PR7505!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
6c948378154dc37e772e50f95033530d506fa912 19-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Reimplement Token::isAnnotation() using TokenKinds.def. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
7f11d9cf5df1f8ce82af46eabc4ec5cec7d580b0 19-Feb-2011 Anders Carlsson <andersca@mac.com> Disallow try/catch/throw when exceptions are disabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
da2142f2e2b3a02ee6eb5de9f9e6ed6f7eb5a0c0 19-Feb-2011 Douglas Gregor <dgregor@apple.com> Revert all of my commits that devirtualized the Decl hierarchy, which
lead to a serious slowdown (4%) on parsing of Cocoa.h. This memory
optimization should be revisited later, when we have time to look at
the generated code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
8ac38d7b5d88d12f454a7cda1275bf429813151d 19-Feb-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Support -Wl, with -Xarch_. This doesn't work naturally because of
the special way we model "linker input" arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
09fe4a55248bd28a950ec4ba19900e5892be42f6 19-Feb-2011 Ted Kremenek <kremenek@apple.com> Change 'StoreRef' back to 'Store' in GRState, shrinking the size of GRState back by one pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
15e310a3b970b64a84cb30f0005bc396b4d978cb 19-Feb-2011 John McCall <rjmccall@apple.com> Warn about code that uses variables and functions with internal linkage
without defining them. This should be an error, but I'm paranoid about
"uses" that end up not actually requiring a definition. I'll revisit later.

Also, teach IR generation to not set internal linkage on variable
declarations, just for safety's sake. Doing so produces an invalid module
if the variable is not ultimately defined.

Also, fix several places in the test suite where we were using internal
functions without definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
370e6e984cc32167228b66eaf9610c010da0d794 19-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Fix crash when analyzing C++ code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
77a4d5687c2cb3199c689892c9d040a94ff270af 19-Feb-2011 Ted Kremenek <kremenek@apple.com> Add 'StoreRef' smart pointer to allow more fine-grain memory lifetime control of Store objects.

This yields a minor memory reduction (for larger functions) on Sqlite at the cost of slightly
higher memory usage on some functions because of the increased size of GRState (which can be optimized).

I expect the real memory savings from this enhancement will come when we aggressively
canabilize more of the ExplodedGraph.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
45f11b78750590b1b1bcec6746c7639a256ce2a2 19-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Fix PR8767, improve diagnostic wording when allocating an object of an
abstract class type.

Patch by Stephen Hines, with a wording tweak from Doug applied by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
82214a80c0163e01e4d8dec1426023c89277dbb4 19-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Initial steps to improve diagnostics when there is a NULL and
a non-pointer on the two sides of a conditional expression.

Patch by Stephen Hines and Mihai Rusu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
0656e5b9aa52f2a90fb38517e504b4eebbe53381 19-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Check for NULL child expressions before visiting them, as the first
thing the visit does is dyn_cast<>, which leads to a nasty segfault.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
5c722c7020b33da57090422b854072258a50b3f0 19-Feb-2011 Douglas Gregor <dgregor@apple.com> When code-completing a case statement for a switch on a value of
enumeration type, prioritize the enumeration constants and don't
provide completions for any other expressions. Fixes <rdar://problem/7283668>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
813d8346529bf094eb2b249648906ba7fd226688 18-Feb-2011 Douglas Gregor <dgregor@apple.com> Selector::getIdentifierInfoForSlot() can return NULL values, a fact
that was ignored in a few places (most notably, code
completion). Introduce Selector::getNameForSlot() for the common case
where we only care about the name. Audit all uses of
getIdentifierInfoForSlot(), switching many over to getNameForSlot(),
fixing a few crashers.

Fixed <rdar://problem/8939352>, a code-completion crasher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
febb5b884b1bb946b83800cb77cbea0119570d84 18-Feb-2011 Chris Lattner <sabre@nondot.org> fix rdar://9024687, a crash on invalid that we used to silently ignore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f4699d14b03d805ad9ccaa6288836ac2a8612925 18-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Fix a crash when analyzing C++ code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
16f744beaaa30bf3847740ca8e8beb6f0d3a0b93 18-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTContext::getLogicalOperationType() to return bool or int, depending on language.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
906c73ffbc78542ad333becb6e013dd9efc299b6 18-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction

This removes the final dependency edge from any lib outside of CodeGen
to core. As a result we can, and do, trim the dependency on core
from libclang, PrintFunctionNames, the unit tests and c-index-test.
While at it, review and trim other unneeded dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenAction.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
ef9a1d0e13662162aa8cdae8732c33b5d751d80c 18-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move TargetInfo::adjustInlineAsmType to TargetCodeGenInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
4ae493cccbfbf122ec6ebac0e330232c22fa8489 18-Feb-2011 Chris Lattner <sabre@nondot.org> implement basic support for __label__. I wouldn't be shocked if there are
bugs from other clients that don't expect to see a LabelDecl in a DeclStmt,
but if so they should be easy to fix.

This implements most of PR3429 and rdar://8287027



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Sema/Sema.h
eaca05b81b30251d3f32af9a6a6567d8e01f7cb2 18-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle UsingDecl in CFGRecStmtDeclVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
337e550218128e7d922c09bb354fbc71de90c568 18-Feb-2011 Chris Lattner <sabre@nondot.org> Switch labels over to using normal name lookup, instead of their
own weird little DenseMap. Hey look, we now emit unused label
warnings deterministically, amazing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Scope.h
lang/Sema/ScopeInfo.h
lang/Sema/Sema.h
380ebecb32993bf0426e25519eb78d7816b74b12 18-Feb-2011 Francois Pichet <pichet2000@gmail.com> Unbreak the MSVC build
std::make_pair is unreliable under MSVC 2010.

Ref: http://stackoverflow.com/questions/2691680/why-does-visual-studio-2010-throw-this-error-with-boost-1-42-0

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
e476bdce8cf3315c8ce852480503a8acc265bd54 18-Feb-2011 Chris Lattner <sabre@nondot.org> make block bodies handle undefined labels just like functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ScopeInfo.h
2d67b90a21c9c1093e6598809c2cbc832919cfe6 17-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism for the debugging info "checks".

The relative checker package is 'debug':

'-dump-live-variables' is replaced by '-analyzer-checker=debug.DumpLiveVars'
'-cfg-view' is replaced by '-analyzer-checker=debug.ViewCFG'
'-cfg-dump' is replaced by '-analyzer-checker=debug.DumpCFG'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
7dd445ec20e704846cfbdb132e56539280d71311 17-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on the non-path-sensitive-checkers:

DeadStoresChecker
ObjCMethSigsChecker
ObjCUnusedIvarsChecker
SizeofPointerChecker
ObjCDeallocChecker
SecuritySyntaxChecker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
lang/StaticAnalyzer/Checkers/LocalCheckers.h
9fb9474c5b267400d4abfbff63c8b39f378235d4 17-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer]
-Introduce CheckerV2, a set of templates for convenient declaration & registration of checkers.
Currently useful just for checkers working on the AST not the path-sensitive ones.
-Enhance CheckerManager to actually collect the checkers and turn it into the entry point for
running the checkers.
-Use the new mechanism for the LLVMConventionsChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
lang/StaticAnalyzer/Checkers/LocalCheckers.h
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerV2.h
695fb502825a53ccd178ec1c85c77929d88acb71 17-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Pass CheckerManager to the registration functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/CheckerManager.h
3406458512c3cdfe2076c46b9aedb4621297efd5 17-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Clean up the style of this function to match the conventions in the rest
of Clang, and reflows the code a bit to make it easier to read.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
57ad37823e198f977cac605dbfbaefb4daf325e9 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #2/N of __label__ support: keep pushing LabelDecl forward,
making them be template instantiated in a more normal way and
make them handle attributes like other decls.

This fixes the used/unused label handling stuff, making it use
the same infrastructure as other decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
lang/Sema/Template.h
d8e54990ade0dd5566f8e3aa2e62def08753d1e9 17-Feb-2011 Chris Lattner <sabre@nondot.org> Inline LocalInstantiationScope::getInstantiationOf into its one
client, making room for future hacking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Template.h
4d4f0db3b6bf73162e75541547e900e4248d49ef 17-Feb-2011 Chris Lattner <sabre@nondot.org> remove some dead overloads.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Template.h
91a230a15f2aca8f6a8b7fd492525ec372a98e6b 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Eliminate the internal command-line option for viewing inheritance in C++ classes, since it's only really worked for the trivial cases anyway due to lame pseudo-parsing of the class name. The viewInheritance() function is still available for use in the debugger, where this is far more useful

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
8c99d88a6cfa14fc2edab819d5e4325c973b2809 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Replace a FIXME with a comment describing why we did what we did

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f91d08712514fca6b1e66abf51a13f2d7041bb05 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Remove the last virtual member function from the Decl hierarchy,
reducing the size of all declarations by one pointer. For a 64-bit
Clang parsing Cocoa.h, this saves ~630k of memory (about 3.5% of
ASTContext's memory usage for this header).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
2ae442a8a0974aee1da389a69857a4b6f2823c1a 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize TagDecl::completeDefinition().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
afdfdc05fe8b2442713f0150a5985a9c6d852cee 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize DeclaratorDecl::getInnerLocStart() and TagDecl::getInnerLocStart().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
2a96bf5e66731bb54dff3e4aadfbbced83377530 17-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics on missing property decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ebe5a9bcc51bff434f38d94748b08e9160609ed9 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize NamedDecl::getNameForDiagnostic().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
9e6f2a8d70c3027e99c354edd9d31a37c102f30a 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize RedeclarableTemplateDecl::newCommon().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
a5b9332418f25338f118358e27303cd510d54107 17-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Implement a sub-group of -Wconversion: -Wliteral-conversion. This
specifically targets literals which are implicitly converted, a those
are more often unintended and trivial to fix. This can be especially
helpful for diagnosing what makes 'const int x = 1e6' not an ICE.

Original patch authored by Jim Meehan with contributions from other
Googlers and a few cleanups from myself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
56ca35d396d8692c384c785f9aeebcf22563fe1e 17-Feb-2011 John McCall <rjmccall@apple.com> Change the representation of GNU ?: expressions to use a different expression
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.

Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.

This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.

I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
4c3e0ee8e6208eb42c4adb78a7d35b641fd85ae9 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize Decl::getNextRedeclaration().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
543cb655b174087f6c2d22009934c9fed6c32114 17-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Implement -Wenum-compare, which warns when comparing two enums of
different types. We omit the warning when the enum types are anonymous.
Unlike GCC, this warning does not distinguish between C++ and C/ObjC for
controling whether it is on by default, it is always on by default.

Original patch contributed by Richard Trieu (@ Google), I fixed some
style issues, and cleaned it up for submission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
770877fa855d1de462392e503ef08252614b0994 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize Decl::getSourceRange()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
0eccdcac47f0ee1d2081244ca714088779b09b98 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize Decl::getCanonicalDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #1/N of implementing support for __label__: split labels into
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.

This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.

This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.

Review appreciated, particularly for the cindex and template bits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/Basic/DeclNodes.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/ScopeInfo.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
1aa3d81c6e63959ef149489eca42b1520c521af4 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Devirtualize Decl::getBody() and Decl::hasBody().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
f4a03cc2b022fab0ffac6c65449555c52036dece 17-Feb-2011 Douglas Gregor <dgregor@apple.com> De-virtualize Decl::isOutOfLine().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
e594db5c2db5ca2a03203af2915fa88619417110 17-Feb-2011 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AttributeList.h
26ae5dd9cfc561527eca418571323d90589a4b92 17-Feb-2011 Matt Beaumont-Gay <matthewbg@google.com> Fix PR9025 and add a diagnostic (and sometimes a fixit) for an overloaded
function name used as the base of a member expression. Early feedback from
Chandler Carruth, and code review from Nick Lewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c81ca9852806e75972bbb246fa916152e8fba541 17-Feb-2011 Ted Kremenek <kremenek@apple.com> Bump up IdentifierInfo::ObjCOrBuiltinID to use 11 bits instead of 10. Fixes PR 9231.

Apparently we can blow out the number of builtin IDs on FreeBSD with only 10 bits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
41aadbc530f071fe5ccbfc2560899a4a2e74c057 17-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics when property names an object type of
a forward class. // rdar://8851803


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125699 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
577cdfdb20840350e841a483df630237326126d5 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement code completion results for the Objective-C Key-Value Coding
(KVC) and Key-Value Observing (KVO) protocols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
bac77374729b3bed72f41b66cd80d6e0d38ace3b 16-Feb-2011 Ted Kremenek <kremenek@apple.com> Placate Doug and change capitalization of diagnostic note.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7dfc9420babe83e236a47e752f8723bd06070d9d 16-Feb-2011 Zhanyong Wan <wan@google.com> Makes most methods in SVals.h conform to the naming guide. Reviewed
by kremenek.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
d24eda8ad42bea6b36400d5505f67a7917d65652 16-Feb-2011 Chandler Carruth <chandlerc@gmail.com> 3000 Sema diagnostics should be enough for anyone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticIDs.h
48601b32321496b07a18fb6631f8563275d8c5fb 16-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach the CXCodeCompleteResults results structure, which stores
code-completion results accessed via libclang, to extend the lifetime
of the allocator used for cached global code-completion results at
least until these completion results are destroyed. Fixes
<rdar://problem/8997369>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
9b7db6200d366e4964d63ae1f33c7b9d7b9831cb 16-Feb-2011 Douglas Gregor <dgregor@apple.com> Improve the invalidation logic for the cache of global code
completions. We now compute a hash of the names of all top-level
declarations and macro definitions, and invalidate the cache when the
hash value changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
9c97ca091200311229ce3cb070f0ed8846687eda 16-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach PPChainedCallbacks to forward the InclusionDirective() callback.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
ca2442350a165f2587c2356009fd34d780fe3234 16-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warning -> ExtWarn

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
e996ffd240f20a1048179d7727a6ee3227261921 16-Feb-2011 John McCall <rjmccall@apple.com> Save a copy expression for non-trivial copy constructions of catch variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8fd0a5dfb025a51f48b7931b95efbf35d3c5dfc3 16-Feb-2011 Ted Kremenek <kremenek@apple.com> Tweak -Warray-bounds diagnostics based on feedback from Chandler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a0125d8520f65aca581378c235384e7affefa1fc 16-Feb-2011 Ted Kremenek <kremenek@apple.com> Add trivial buffer overflow checking in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
0b1ba6227c67d5e04b589ed8a08afa2345a40666 16-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on the apple checkers:

NilArgChecker
CFNumberCreateChecker
NSAutoreleasePoolChecker
CFRetainReleaseChecker
ClassReleaseChecker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Checkers/LocalCheckers.h
8f457004a1fdfc9c70fb52c5bc2e9d4ea6780d8d 16-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Fix typo (per Chris's comment).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ff1ed985ede24b9a45e52d726db95767e35fe21e 16-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warn for missing terminating " or ' instead of error for gcc compatibility. Fixed rdar://8914293.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
c9f2e0f286500c7e747849b3aa9c0e67a4dc90d7 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on the IdempotentOperationChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
afc4578f8e55d4377b291e2325b2e9bc2cd72e89 15-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement a special code-completion pattern for "IBAction". Fixes
<rdar://problem/8767704>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
e9baa6b82625a6e55d21a32ca0227950d30ec57d 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove ObjCSelfInitCheck from AnalyzerOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalyzerOptions.h
68e3c2eef52701a178fbcc2bb424f31dd4b36931 15-Feb-2011 Douglas Gregor <dgregor@apple.com> When code-completing within a list of declaration specifiers,
separately handle the case of a local declaration-specifier list,
including all types in the set of options. Fixes
<rdar://problem/8790735> and <rdar://problem/8662831>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
84bccea1ad9fd8bc1f4ec3d1fc5dd8d15dabffbc 15-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Serialization/deserialization support for floating point #pragma
options, enabled OpenCL extensions and default FP_CONTRACT setting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
39d3e7a26c1969fcb76bceb4ee0a410c60ea5954 15-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: semantic analysis support for cl_khr_fp64 extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8e3df4d0864f0a966c20088ca1a29c3398b7639d 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow resolving headers from a PCH even after headers+PCH were moved to another path.

Store in PCH the directory that the PCH was originally created in.
If a header file is not found at the path that we expect it to be and the PCH file
was moved from its original location, try to resolve the file by assuming that
header+PCH were moved together and the header is in the same place relative to the PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
27af04bcca46f8a3374586be1301477f9123f5e1 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix the clang-wpa example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125565 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Frontend/CheckerRegistration.h
809dfe8ad390bdaf7db12af944a84e16111efbbe 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Initialize InlineCall in AnalyzerOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalyzerOptions.h
26c05b11dc91662820e7709bb22efe9903289d1f 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Reflect changes for tablegen'ing the checkers.

-Update tablegen files for checkers, use the tablegen class name for the checker class name.
-Update ClangSACheckersProvider to not look into hidden checker packages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Checkers/CheckerBase.td
dac54c124e302d6f028ea5723c425b7f66fc7c71 15-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::Alignment to CharUnits from bit units. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
b1224f69089815fd66b04ae33215b7fba10780aa 15-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Warn if method for a deprecated method is implemented.
Warn if class for a deprecated class is implemented.
Warn if category for a deprecated class is implemented.
All under control of -Wdeprecated-implementations.
// rdar://8973810.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
d61df3d022835236656250565ee577a7b6f89775 15-Feb-2011 Ted Kremenek <kremenek@apple.com> Put "incomplete implementation" warning under a flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
79ab2c8104ef5df233d271560ccc734836738e56 14-Feb-2011 John McCall <rjmccall@apple.com> Provide overload diagnostics when explicit casts involving class types fail.
PR8626.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Initialization.h
43dee220252ef0b42c5f8a3bb1eca97f84f2565f 14-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Overhauling of the checker registration mechanism.

-Checkers will be defined in the tablegen file 'Checkers.td'.
-Apart from checkers, we can define checker "packages" that will contain a collection of checkers.
-Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g:
Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker:
-analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit
-Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and
register them with the CheckerManager which will be the entry point for all checker-related functionality.

Currently only the self-initialization checker takes advantage of the new mechanism.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
lang/StaticAnalyzer/Checkers/CheckerBase.td
lang/StaticAnalyzer/Core/CheckerManager.h
lang/StaticAnalyzer/Core/CheckerProvider.h
lang/StaticAnalyzer/Core/FrontendActions.h
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/Frontend/FrontendActions.h
5f83d6f36a7308eef21d87104fd70c421e854448 14-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove ManagerRegistry which is not used. In the future we may load analyzer plugins dynamically but
registration through static constructors should be avoided.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/ManagerRegistry.h
e6348c336fecc8da9288ea367375a1b1cd2358d2 14-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Move include/clang/StaticAnalyzer/AnalysisConsumer.h -> lib/StaticAnalyzer/Frontend/AnalysisConsumer.h since
FrontendActions.cpp is the only user.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/AnalysisConsumer.h
840c083f7996ed34d74affe322c2c53af8fa5217 14-Feb-2011 Jeffrey Yasskin <jyasskin@google.com> Add support for the builtins used in gcc 4.4's <cmath> and <complex>
headers in C++0x mode. Fixes PR9138.

Patch by John Bytheway!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
b8b07b171041561eb28024d5b4d07227c971c0f9 14-Feb-2011 Ted Kremenek <kremenek@apple.com> Handle 'UsingDirective' in CFGRecStmtDeclVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
eee1d5434ebfa955ffc3c493aecd68bb7b3f4838 14-Feb-2011 John McCall <rjmccall@apple.com> When parsing an out-of-line member function declaration, we must delay
access-control diagnostics which arise from the portion of the declarator
following the scope specifier, just in case access is granted by
friending the individual method. This can also happen with in-line
member function declarations of class templates due to templated-scope
friend declarations.

We were really playing fast-and-loose before with this sort of thing,
and it turned out to work because *most* friend functions are in file
scope. Making us delay regardless of context exposed several bugs with
how we were manipulating delay. I ended up needing a concept of a
context that's independent of the declarations in which it appears,
and then I actually had to make some things save contexts correctly,
but delay should be much cleaner now.

I also encapsulated all the delayed-diagnostics machinery in a single
subobject of Sema; this is a pattern we might want to consider rolling
out to other components of Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
02690b22ad3f290002dc04e5ec8bafde4916eaa8 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Add missing file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OpenCLExtensions.def
f315fa81eef1977b3457fd7a7d4639e060fe7278 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas. Patch originally by ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/LangOptions.h
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/AttributeList.h
lang/Sema/Sema.h
321b8179afaf803dcc56b2a19f7b0891a03c92c8 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Parse/Parser.h
lang/Sema/Sema.h
9d3f5f7550a2fab4178ed01425758c349b73a609 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Make LexOnOffSwitch a Preprocessor member function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Basic/TokenKinds.h
lang/Lex/Preprocessor.h
7502c1d3ce8bb97bcc4f7bebef507040bd93b26f 13-Feb-2011 John McCall <rjmccall@apple.com> Give some convenient idiomatic accessors to Stmt::child_range and
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
lang/AST/RecursiveASTVisitor.h
lang/AST/StmtIterator.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
0d70d71ccbc4f7f59cadb759f61b7172a149676c 13-Feb-2011 John McCall <rjmccall@apple.com> Look through array types when deciding whether a field requires non-trivial
destruction in the destructor-aliases logic. Fixes PR 9197.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e3c8c64e7735c3589e1a34e6000c93183a55920c 12-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Implement objective-c++'s block pointer type matching involving
types which are contravariance in argument types and covariance
in return types. // rdar://8979379.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
lang/Sema/Sema.h
0895d1513772eca5a20c552976209fd7f58b993f 12-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When reading the AST, delay loading of the redeclaration chain to avoid deeply nested calls.
Temporarily set the first (canonical) declaration as the previous one, which is the one that
matters, and mark the real previous DeclID to be loaded & attached later on.

Fixes rdar://8956193.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
b715a7cef11664c1c47cfc3dcc503aadc58b6cac 12-Feb-2011 Ted Kremenek <kremenek@apple.com> Weaken the ObjCSelfInitChecker to only warn when one calls an 'init' method within an 'init' method. This is a temporary stop gap to avoid false positives while we investigate how to make it smarter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h
f4e532b5a1683a9f6c842f361c7415bf3474315f 12-Feb-2011 Ted Kremenek <kremenek@apple.com> Don't emit a dead store for '++' operations unless it occurs with a return statement. We've never seen any other cases that were real bugs.

Fixes <rdar://problem/6962292>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
848ec83483ca4ba52ed72c7e29ebc330f8c87252 12-Feb-2011 Ted Kremenek <kremenek@apple.com> Don't report dead stores on unreachable code paths. Fixes <rdar://problem/8405222>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
e2f82f71385051ce5abfba317d2f592aa332c588 11-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Reject forbidden storage class specifiers in OpenCL. Patch by George Russell!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125399 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Sema/DeclSpec.h
2534528c22260211a073e192c38d0db84c70c327 11-Feb-2011 Ted Kremenek <kremenek@apple.com> Rename 'InvalidateRegions()' to 'invalidateRegions()'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
0a480293f726508ad9aed0be39e8c9779e84f2f2 11-Feb-2011 Douglas Gregor <dgregor@apple.com> Rename the operation that loads a preprocessed entity from a given offset to indicate that we're loading from an offset, not an index, lest one be confused. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
lang/Serialization/ASTReader.h
9b555ea217565ac0f8bf7255b29496916cb03476 11-Feb-2011 Zhanyong Wan <wan@google.com> Improves Clang's virtual file handling.

This patch contains:

- making some of the existing comments more accurate in the presence
of virtual files/directories.

- renaming some private data members of FileManager to match their roles better.

- creating 'DirectorEntry's for the parent directories of virtual
files, such that we can tell whether two virtual files are from the
same directory. This is useful for injecting virtual files whose
directories don't exist in the real file system.

- minor clean-ups and adding comments for class
FileManager::UniqueDirContainer and FileManager::UniqueFileContainer.

- adding statistics on virtual files to FileManager::PrintStats().

- adding unit tests to verify the existing and new behavior of FileManager.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
a9d5c30635729f076d77b4eb8d2f413b04301a89 11-Feb-2011 Ted Kremenek <kremenek@apple.com> Allow the 'Eng' entry in GRStateManager to be a (possibly null) pointer instead of a reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
f0be979bddb8baa28e77693a3dc931e487b2a9f2 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> For consistency, use llvm::raw_ostream in the rest of the mangle api.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Mangle.h
ec2990351335f163601b98e39b52425e2e9f931e 11-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::DataSize to CharUnits from bits, eliminating two
unnecessary calls to RoundUpToAlignment. No changes to functionality
intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
dd76a9ab9ea675671200f94b18ce95766841952b 11-Feb-2011 Ken Dyck <kd@kendyck.com> Add a helper function, ASTContext::toBits(), that converts sizes in
CharUnits to sizes in bits, and use it to tidy up the places where the
conversion was done explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0e376a0ca8372c9e809d08a9db2fae98394878b8 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Use raw_ostream instead of raw_svector_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Mangle.h
040a804f852c45c8b8c371ce1d421fd4cd84b6fb 11-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement AST/PCH chaining support for macro definitions. Previously,
we would deserialize all of the macro definitions we knew about while
serializing the macro definitions at the end of the AST/PCH file. Even
though we skipped most of them (since they were unchanged), it's still
a performance problem.

Now, we do the standard AST/PCH chaining trick: watch what identifiers
are deserialized as macro names, and consider only those identifiers
(along with macro definitions that have been deserialized/written in
the source) when serializing the preprocessor state.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
c4850c2aa4c281a352e228aafc51fb1e30dcad02 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Use raw_svector_ostream in more places in the mangler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Mangle.h
cfbf1c7536e016dc275139dd842d4a5f059a749f 10-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement two related optimizations that make de-serialization of
AST/PCH files more lazy:
- Don't preload all of the file source-location entries when reading
the AST file. Instead, load them lazily, when needed.
- Only look up header-search information (whether a header was already
#import'd, how many times it's been included, etc.) when it's needed
by the preprocessor, rather than pre-populating it.

Previously, we would pre-load all of the file source-location entries,
which also populated the header-search information structure. This was
a relatively minor performance issue, since we would end up stat()'ing
all of the headers stored within a AST/PCH file when the AST/PCH file
was loaded. In the normal PCH use case, the stat()s were cached, so
the cost--of preloading ~860 source-location entries in the Cocoa.h
case---was relatively low.

However, the recent optimization that replaced stat+open with
open+fstat turned this into a major problem, since the preloading of
source-location entries would now end up opening those files. Worse,
those files wouldn't be closed until the file manager was destroyed,
so just opening a Cocoa.h PCH file would hold on to ~860 file
descriptors, and it was easy to blow through the process's limit on
the number of open file descriptors.

By eliminating the preloading of these files, we neither open nor stat
the headers stored in the PCH/AST file until they're actually needed
for something. Concretely, we went from

*** HeaderSearch Stats:
835 files tracked.
364 #import/#pragma once files.
823 included exactly once.
6 max times a file is included.
3 #include/#include_next/#import.
0 #includes skipped due to the multi-include optimization.
1 framework lookups.
0 subframework lookups.

*** Source Manager Stats:
835 files mapped, 3 mem buffers mapped.
37460 SLocEntry's allocated, 11215575B of Sloc address space used.
62 bytes of files mapped, 0 files with line #'s computed.

with a trivial program that uses a chained PCH including a Cocoa PCH
to

*** HeaderSearch Stats:
4 files tracked.
1 #import/#pragma once files.
3 included exactly once.
2 max times a file is included.
3 #include/#include_next/#import.
0 #includes skipped due to the multi-include optimization.
1 framework lookups.
0 subframework lookups.

*** Source Manager Stats:
3 files mapped, 3 mem buffers mapped.
37460 SLocEntry's allocated, 11215575B of Sloc address space used.
62 bytes of files mapped, 0 files with line #'s computed.

for the same program.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Basic/OnDiskHashTable.h
lang/Lex/HeaderSearch.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
be4c8705e499b55548467eb7adaa23cbc6edfef9 10-Feb-2011 Roman Divacky <rdivacky@freebsd.org> Implement mcount profiling, enabled via -pg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
e40b69de464bc695afcaf7ef9602ad727d77b981 10-Feb-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Make GRStates reference counted, with reference counts managed by ExplodedNodes.

This reduces memory usage of the analyzer on sqlite by another 5%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
9b663716449b618ba0390b1dbebc54fa8e971124 10-Feb-2011 Ted Kremenek <kremenek@apple.com> Split 'include/clang/StaticAnalyzer' into 'include/clang/StaticAnalyzer/Core' and 'include/clang/StaticAnalyzer/Checkers'.

This layout matches lib/StaticAnalyzer, which corresponds to two StaticAnalyzer libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/AnalysisConsumer.h
lang/StaticAnalyzer/BugReporter/BugReporter.h
lang/StaticAnalyzer/BugReporter/BugType.h
lang/StaticAnalyzer/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/Core/AnalysisConsumer.h
lang/StaticAnalyzer/Core/BugReporter/BugReporter.h
lang/StaticAnalyzer/Core/BugReporter/BugType.h
lang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/Core/FrontendActions.h
lang/StaticAnalyzer/Core/ManagerRegistry.h
lang/StaticAnalyzer/Core/PathDiagnosticClients.h
lang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h
lang/StaticAnalyzer/Core/PathSensitive/Checker.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
lang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/Core/PathSensitive/CheckerVisitor.h
lang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/Core/PathSensitive/Environment.h
lang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h
lang/StaticAnalyzer/Core/PathSensitive/GRState.h
lang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h
lang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
lang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
lang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/Core/PathSensitive/SVals.h
lang/StaticAnalyzer/Core/PathSensitive/Store.h
lang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
lang/StaticAnalyzer/Core/PathSensitive/SummaryManager.h
lang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h
lang/StaticAnalyzer/Core/PathSensitive/WorkList.h
lang/StaticAnalyzer/FrontendActions.h
lang/StaticAnalyzer/ManagerRegistry.h
lang/StaticAnalyzer/PathDiagnosticClients.h
lang/StaticAnalyzer/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/PathSensitive/BlockCounter.h
lang/StaticAnalyzer/PathSensitive/Checker.h
lang/StaticAnalyzer/PathSensitive/CheckerHelpers.h
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.h
lang/StaticAnalyzer/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/PathSensitive/Environment.h
lang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/PathSensitive/ExprEngineBuilders.h
lang/StaticAnalyzer/PathSensitive/GRState.h
lang/StaticAnalyzer/PathSensitive/GRStateTrait.h
lang/StaticAnalyzer/PathSensitive/MemRegion.h
lang/StaticAnalyzer/PathSensitive/ObjCMessage.h
lang/StaticAnalyzer/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/PathSensitive/SVals.h
lang/StaticAnalyzer/PathSensitive/Store.h
lang/StaticAnalyzer/PathSensitive/SubEngine.h
lang/StaticAnalyzer/PathSensitive/SummaryManager.h
lang/StaticAnalyzer/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/PathSensitive/TransferFuncs.h
lang/StaticAnalyzer/PathSensitive/WorkList.h
7f53253223b29d77f1e9c5c0ce93a19932761b77 09-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Fix scoping of method declarations and issue
warning when same parameter name used multiple times.
// rdar://8877730


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Sema/Sema.h
bf36e25224b959595af84337339103ebc542ff8c 09-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Parse: add support for parsing CUDA kernel calls

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
1b791d6465d42a9763927be1dd8af229efcbbf5e 09-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Lexer: add CUDA kernel call tokens

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
e08ce650a2b02410eddd1f60a4aa6b3d4be71e73 09-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
14b6ba77710d6431794d65c7d58c6f29c3dc956e 09-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> AST, Sema, Serialization: keep track of cudaConfigureCall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticSemaKinds.td
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
17d3fea677753e6e3e82ffe2cbdeccbf5f2e7497 09-Feb-2011 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Wire up -mregparm=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
63c00d7f35fa060c0a446c9df3a4402d9c7757fe 09-Feb-2011 John McCall <rjmccall@apple.com> Remove vtables from the Stmt hierarchy; this was pretty easy as
there were only three virtual methods of any significance.

The primary way to grab child iterators now is with
Stmt::child_range children();
Stmt::const_child_range children() const;
where a child_range is just a std::pair of iterators suitable for
being llvm::tie'd to some locals. I've left the old child_begin()
and child_end() accessors in place, but it's probably a substantial
penalty to grab the iterators individually now, since the
switch-based dispatch is kindof inherently slower than vtable
dispatch. Grabbing them together is probably a slight win over the
status quo, although of course we could've achieved that with vtables, too.

I also reclassified SwitchCase (correctly) as an abstract Stmt
class, which (as the first such class that wasn't an Expr subclass)
required some fiddling in a few places.

There are somewhat gross metaprogramming hooks in place to ensure
that new statements/expressions continue to implement
getSourceRange() and children(). I had to work around a recent clang
bug; dgregor actually fixed it already, but I didn't want to
introduce a selfhosting dependency on ToT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtIterator.h
lang/AST/StmtObjC.h
lang/Basic/StmtNodes.td
824c547dc5d4451b9dbacc56621592fa010878f4 09-Feb-2011 Ted Kremenek <kremenek@apple.com> Initialize 'reclaimNodes'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
dec5b63c200b108851bb6486bb10060bce276414 09-Feb-2011 Ken Dyck <kd@kendyck.com> Correct units in comments describing Size and getSize().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
5f022d82696c84e4d127c558871d68ac6273274e 09-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::Size to CharUnits from bits. No changes to
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
d767d81290288c030f3be0be1d3e62b9c8df51dc 09-Feb-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Further reduce the analyzer's memory usage when analyzing sqlite3 by 7-10% by recylcing "uninteresting" ExplodedNodes.

The optimization involves eagerly pruning ExplodedNodes from the ExplodedGraph that contain
practically no difference between the predecessor and successor nodes. For example, if
the state is different between a predecessor and a node, the node is left in. Only for
the 'environment' component of the state do we not care if the ExplodedNodes are different.
This paves the way for future optimizations where we can reclaim the environment objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
lang/StaticAnalyzer/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/PathSensitive/GRState.h
58465900ca10e53b8700a64e9265870de34e1aca 09-Feb-2011 Ted Kremenek <kremenek@apple.com> Make ProgramPoint::getTag() public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
76a40219ee5624d78aba167dce02bdbaa930955f 09-Feb-2011 John McCall <rjmccall@apple.com> NonTypeTemplateParmDecl is just a DeclaratorDecl, not a VarDecl.

Also, reorganize and make very explicit the logic for determining
the value kind and type of a referenced declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DeclNodes.td
332bb2a2e3cd0a5af85758847a8050ae8ceee5f3 08-Feb-2011 John McCall <rjmccall@apple.com> When checking the 'weak' and 'weakref' attributes, look for non-external
linkage rather than the presence of the 'static' storage class specifier.
Fixes rdar://problem/8814626.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4800a5c79023271408af49797e09be32aca93232 08-Feb-2011 Douglas Gregor <dgregor@apple.com> Split the serialized representation for the detailed preprocessing
record away from the core processor record. The tangling of these two
data structures led to some inefficiencies (e.g., deserializing all
of the detailed preprocessing record when we didn't need it, such as
while performing code completion) along with some unnecessary
ugliness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
cc324ad80ab940efca006b0064f7ca70a6181816 08-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> AST: support for pre-arg expressions on CallExpr subclasses

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
09982cec0029bc495591067fa89967b6b4d1fa19 08-Feb-2011 Benjamin Kramer <benny.kra@googlemail.com> Allow multiple -B prefixes. Patch by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
f76b092e1a6f0df4a5c64aae3c71d6e81e4b717c 08-Feb-2011 John McCall <rjmccall@apple.com> Clear the linkage cache recursively. Fixes PR8926.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1e52dfc648ce0b25ef57ae29ef1b4337d80011ef 08-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Support for objextive-c++ use of property-dot syntax as receiver
in liu of a class method getter.
// rdar://8962253


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
68cf1a5a01ba43ed56a8624632fd65e0804430ac 08-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::NonVirtualAlign to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
1b528445016c2dba23babeea07e352ca8b816262 07-Feb-2011 Ted Kremenek <kremenek@apple.com> Move uninitialized variable checking back under -Wuninitialized-experimental. It is clear from user feedback that this warning is not quite ready.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6b5a61b6dc400027fd793dcadceeb9da944a37ea 07-Feb-2011 John McCall <rjmccall@apple.com> A few more tweaks to the blocks AST representation:
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary

With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.

Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/Sema/ScopeInfo.h
ab234decacef3cc7f87e2b073ed8229a6f4ca84d 06-Feb-2011 Chris Lattner <sabre@nondot.org> add some missing builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
8ef6c8cb6c5627240e2339fd7062c9873f821d7e 05-Feb-2011 Douglas Gregor <dgregor@apple.com> Improve our uniquing of file entries when files are re-saved or are
overridden via remapping. Thus, when we create a "virtual" file in the
file manager, we still stat() the real file that lives behind it so
that we can provide proper uniquing based on inodes. This helps keep
the file manager much more consistent.

To take advantage of this when reparsing files in libclang, we disable
the use of the stat() cache when reparsing or performing code
completion, since the stat() cache is very likely to be out of date in
this use case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
lang/Frontend/PreprocessorOptions.h
lang/Serialization/ASTReader.h
f677ea3cc9598d9952ad7ffab5fb322ba4c5be31 05-Feb-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Basic implementation of inherited constructors. Only generates declarations, and probably only works for very basic use cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
1de34dd8a6932fbb316e35304bf468ddb4a0841b 05-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When the out-of-line definition differs from the declaration in the return type,
say "out-of-line definition differ from the declaration in the return type" instead of
the silly "functions that differ only in their return type cannot be overloaded".

Addresses rdar://7980179.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8b789139167d721e3ef1e3d433eabeb351c36fad 05-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -Wselector should warn on implemented selectors only
when selector metadata is generated, which is triggered
by at least on class implementation. This is to match gcc's
behavior. // rdar://8851684.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fdc13a00a0077383eabf6d994de10203568415bb 04-Feb-2011 Douglas Gregor <dgregor@apple.com> When calling a bound pointer to member function, check the
cv-qualifiers on the object against the cv-qualifiers on the member
function. Fixes PR8315.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
def0354384d9c4431f7b58b664b59896d4623028 04-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement proper (de-)serialization for explicit template argument
lists with zero template arguments. Fixes some seriously scary
crashers in C++ PCH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
4ee2bb12dcb8f8b543a3581537a4bc5752106ce2 04-Feb-2011 Ted Kremenek <kremenek@apple.com> Downgrade error about attribute 'iboutlet' and 'ibaction' being applied to anything but a instance method to a warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d89d86fe4acaa4782b0ed8a684bbc1b32cb48b70 04-Feb-2011 Douglas Gregor <dgregor@apple.com> Tighten up the semantics of default template arguments, per C++0x
[temp.param]p9 and C++ DR226. Fixes PR8747.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
ee5d21f63714459f39e0be28fec9dbecf0720505 04-Feb-2011 Douglas Gregor <dgregor@apple.com> When a function template's template parameter has a default argument,
it's okay for the following template parameters to not have default
arguments (since those template parameters can still be
deduced). Also, downgrade the error about default template arguments
in function templates to an extension warning, since this is a
harmless C++0x extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
398c610b16728b4398214367dd0effd9d2e61340 04-Feb-2011 Daniel Dunbar <daniel@zuster.org> build: Add support for DISABLE_DEFAULT_STRICT_ALIASING, which does what one
might expect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
f24fe4d1f1828251bcd160244a2393f2e990f1aa 04-Feb-2011 Daniel Dunbar <daniel@zuster.org> Fix 80-col violins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenOptions.h
142f9e99018a85105cee570133c111a52f2053ec 04-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -fapple-kext cannot have 'weak' visibility in this
abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
2100fe952a644134b1dca462f2e6330cf14ef47c 03-Feb-2011 Oscar Fuentes <ofv@wanadoo.es> Moved here from LLVM Clang's configuration options and related macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Config/config.h.cmake
799ef666685d6c97d64d1970a6f68bf7923360c2 03-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -Woverloaded-virtual.

The difference with gcc is that it warns if you overload virtual methods only if
the method doesn't also override any method. This is to cut down on the number of warnings
and make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.
If we want to warn that not all overloads are overriden we can have an additional
warning like -Wpartial-override.

-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
86a4d0dd6a630639aab7715323ed068940e650af 03-Feb-2011 Douglas Gregor <dgregor@apple.com> Teach SourceManager::getLocation() how to cope with a source file
whose inode has changed since the file was first created and that is
being seen through a different path name (e.g., due to symlinks or
relative path elements), such that its FileEntry pointer doesn't match
a known FileEntry pointer. Since this requires a system call (to
stat()), we only perform this deeper checking if we can't find the
file by comparing FileEntry pointers.

Also, add a micro-optimization where we don't bother to compute line
numbers when given the location (1, 1). This improves the
efficiency of clang_getLocationForOffset().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
26743b20e4a8c2a986e6453f0c38beba0afef633 03-Feb-2011 John McCall <rjmccall@apple.com> Capture a few implicit references to 'self'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5808ce43f8d7e71f5acacc9ca320268c4f37565a 03-Feb-2011 John McCall <rjmccall@apple.com> More capturing of 'this': implicit member expressions. Getting that
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by
changing the representation of member pointer constants so that
IndirectFieldDecls aren't expanded. This led to assorted cleanups with
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
553304523bcce281aa3b1afe0f84ae34a90a3c86 03-Feb-2011 Ted Kremenek <kremenek@apple.com> Reenable -Wuninitialized warning for captured block variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f704c61b3c88659a0c9946ea26d1bbff99803792 03-Feb-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Switch -header-include-file output to use unbuffered raw_ostreams with
the atomic writes option, since the intent is that this option be set for an
entire build, which may have any number of compiler instances writing to the
same output file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
b51eee43676c2f4b7c4e1fa1648b438051b2b098 03-Feb-2011 Francois Pichet <pichet2000@gmail.com> Fix Microsoft bit field problem. This resolves the Index\complete-exprs.c regression on Win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
609e3170841dac81c3b7b6b9eccb9c520e42c9b2 03-Feb-2011 Ted Kremenek <kremenek@apple.com> Based on user feedback, swap -Wuninitialized diagnostics to have the warning refer to the bad use, and the note to the variable declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
322c29fefe7fa33f03273136eb5f8b7f5b4df7c0 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrors
CC_PRINT_OPTIONS and can be used to get some out-of-band information on header
usage from a build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
b34d69b9292534c1c574f168f0ac10aea652adca 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Add -header-include-file option, for allowing saving header include
information to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/DependencyOutputOptions.h
b376e5e71aa3e608c0481a9a7facb5d8b29d3163 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Add support (unused) for showing all "interesting" headers, not just
ones outside the predefines buffer (which is what -H does).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
6159d0fe2d40708b5a3caab91c8292253894ebf3 02-Feb-2011 Douglas Gregor <dgregor@apple.com> Revert r124704, which uniqued code-completion strings. The space
savings of 25% sounds impressive, except that this amounted to only
about 360k in our standard "large" completion result set (40,000
results). Since code completion is performance-sensitive, the 4%
slowdown due to uniquing outweighs the 360k benefit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
8e50a96b387dca7525caa8a6add31420dd82a2cd 02-Feb-2011 Benjamin Kramer <benny.kra@googlemail.com> Add NetBSD target support. Patch by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
eef63e0997e0f6d6436736ea919b851cfe34955a 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Factor out header include dumping (-H) into its own preprocessor
callbacks class.
- Aside from being generally cleaner, this also allows -H to work correctly in
modes other than standard preprocessing (e.g., -c, -MM, etc.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/Utils.h
469a1eb996e1cb0be54f9b210f836afbddcbb2cc 02-Feb-2011 John McCall <rjmccall@apple.com> An insomniac stab at making block declarations list the variables they close
on, as well as more reliably limiting invalid references to locals from
nested scopes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
lang/Sema/ScopeInfo.h
e349d2c61256f11180b7112ab592b4ae700f3dcf 02-Feb-2011 Douglas Gregor <dgregor@apple.com> Unique code-completion strings. On Cocoa.h, this costs us about 4% in
speed but saves us about 25% of the memory usage for strings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
dae687575010c9c49a4b552f5eef82cd6279d9ac 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Create a special allocator class for code completion, so that all of
the string copying goes through a single place that can have
associated state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
218937c13ef5b0625a70aad41ca7a92da9278bd2 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Allocate CodeCompletionString and all of its components in a
BumpPtrAllocator, rather than manually new/delete'ing them. This
optimization also allows us to avoid allocating memory for and copying
constant strings (e.g., "return", "class").

This also required embedding the priority and availability of results
within the code completion string, to avoid extra memory allocation
within libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
0e2dc3a1159806c8303b0979be1ce1526cc64ed3 01-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warn for "if ((a == b))" where the equality expression is needlessly wrapped inside parentheses.
It's highly likely that the user intended an assignment used as condition.

Addresses rdar://8848646.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
d880f52be3e4a8ccad92ac31932eeae5e0870a93 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement access checking for the "delete" operator. Fixes PR9050,
from Alex Miller!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6f75550e40a9177db9979fc130ce3ece026b137d 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Basic support for -mms-bitfields, from Carl Norum!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
2a7c12ccbecbf95840d073e3524e2d56e599913e 01-Feb-2011 Ken Dyck <kd@kendyck.com> Correct units in doxygen comment for NonVirtualSize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
5c3633fa57f27b0909ab5767715c4e66b8920165 01-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::NonVirtualSize from bit units to CharUnits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
86c05f3f28bcf07c97dfb1881686fc43be2f47c2 01-Feb-2011 John McCall <rjmccall@apple.com> Perform the bad-address-space conversions check as part of
CheckPointerTypesForAssignment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
293a45e724a15fb58b8805a5791f9f3aee769cf6 01-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e4be87eb661ff12524074184f43b9d11d06ad376 01-Feb-2011 John McCall <rjmccall@apple.com> Make Check*PointerTypesForAssignment private and tell them that they're
working on canonical types already.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4f5e21e24fb9e6ec473a13f83b5c9a2c41501a70 31-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach Diagnostic::setClient() to free the existing, owned
client. Fixes a libclang leak.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
ff9cd968cd5b623e3ec7e5f862b598cd22f7ec79 31-Jan-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Add an explicit RemoveFileOnSignal flag argument, to control the
automatic behavior (which is undesirable in a multithreaded context).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
94659e4bdb87534f591ae185812548c42d6efacb 31-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add -Wcustom-atomic-properties which warns if an atomic-by-default property has custom getter or setter.

The rationale is that it is highly likely that the user's getter/setter isn't atomically implemented. Off by default.
Addresses rdar://8782645.

-Wcustom-atomic-properties and -Wimplicit-atomic-properties are under the -Watomic-properties group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
683a81f4373cf1fa9d41a751dca6f7c36125b058 31-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the suggested resolution to core issue 547, extended to also
allow ref-qualifiers on function types used as template type
arguments. GNU actually allows cv-qualifiers on function types in many
places where it shouldn't, so we currently categorize this as a GNU
extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
def4e2a405a15eb8381ca305725285d27a4bab65 31-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
6684d85e9075e3c1750d911c69a517145a82a410 31-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Diagnose if extern local variable is followed by non-extern and vice-versa.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0413db4a26b0a1577b75c2979b0eb21f3490d17a 31-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Amazing that there are still issues with the fields of anonymous struct/unions..
Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f25649c74397d2620e6ac61f1045261644707c80 29-Jan-2011 Nico Weber <nicolasweber@gmx.de> Support for -plugin-arg- with -add-plugin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
d89d30fdd9e3061fb100fb8f976aab5c6cf2c901 28-Jan-2011 John McCall <rjmccall@apple.com> Fix some corner cases in the __is_base_of logic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
4867347e82648d3baf09524b98b09c297a5a198f 28-Jan-2011 Nico Weber <nicolasweber@gmx.de> PR9037: Allow override, final, and new as an extension on inline members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
b608b987718c6d841115464f79ab2d1820a63e17 28-Jan-2011 Douglas Gregor <dgregor@apple.com> Give OpaqueValueExpr a source location, because its source location
might be queried in places where we absolutely require a valid
location (e.g., for template instantiation). Fixes some major
brokenness in the use of __is_convertible_to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Sema/Sema.h
1eee5dc0465c0ab4810e21d365e881152d7f53c0 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach the evaluation of the __is_convertible_to trait to translate
access control errors into SFINAE errors, so that the trait provides
enough support to implement the C++0x std::is_convertible type trait.

To get there, the SFINAETrap now knows how to set up a SFINAE context
independent of any template instantiations or template argument
deduction steps, and (separately) can set a Sema flag to translate
access control errors into SFINAE errors. The latter can also be
useful if we decide that access control errors during template argument
deduction should cause substitution failure (rather than a hard error)
as has been proposed for C++0x.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
418df343bb50802586d20aae3b83e2eb44c6c828 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Separate the access-control diagnostics from other diagnostics that do not have SFINAE behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticIDs.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
9f3611365d0f2297a910cf246e056708726ed10a 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the Microsoft __is_convertible_to type trait, modeling the
semantics after the C++0x is_convertible type trait. This
implementation is not 100% complete, because it allows access errors
to be hard errors (rather than just evaluating false).

Original patch by Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
63e7d25d2e6036616b42f744fd4a39cd5f911960 27-Jan-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed parameter names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b7ee2e5cc999a45ec4fd7b879477816714aabb7e 27-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Revert r124217 because it didn't catch the actual error case it was trying to
catch:

lock_guard(my_mutex);

declares a variable instead of creating a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
8c29cfa09fa46387e90ecd74f4f5c447eab1c38f 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Clean up the diagnostic text for delegating constructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2a5c45b1ae4406459fbb39cb477951987c59cb0f 27-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow #pragma unused to be used on global variables like gcc. Fixes rdar://8793832.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1aa27307c462baaa9e5fda14ff6797dd39fe8b84 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach ASTUnit to save the specified target features, since
TargetInfo::CreateTargetInfo() mangles the target options in a way
that is not idempotent. Fixes <rdar://problem/8807535>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
e72fb6f40231a1e8372c7576b69f06f0a1eb28a7 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Add libclang functions to determine the const/volatile/restrict
qualifiers on a CXType. Patch from Stefan Seefeld, test by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124377 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9319b56154cfd9e3c781e54d2ee1c10c5858efed 27-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Fix crash when handling dot syntax on 'super'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ObjCMessage.h
6ec278d1a354517e20f13a877481453ee7940c78 27-Jan-2011 John McCall <rjmccall@apple.com> Do a proper recursive lookup when deciding whether a class's usual
deallocation function has a two-argument form. Store the result of this
check in new[] and delete[] nodes.

Fixes rdar://problem/8913519



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d0370f59e79702ac908c81bf556519f91e9ca297 27-Jan-2011 John McCall <rjmccall@apple.com> Provide Type::castAs<>, which is to getAs<> what cast<> is to dyn_cast<>.
Also provide a method to grab the base element type of a type without
stressing out over qualifiers (but give it a nice scary name).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
14d0aee957f11b9613fa4312919bec3cc5456a1c 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Fix a horrible bug in our handling of C-style casting, where a C-style
derived-to-base cast that also casts away constness (one of the cases
for static_cast followed by const_cast) would be treated as a bit-cast
rather than a derived-to-base class, causing miscompiles and
heartburn.

Fixes <rdar://problem/8913298>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b145ee6cc7d7db42ca4351ff3fe91f04e86a2f67 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the restriction that a function with a ref-qualifier cannot
overload a function without a ref-qualifier (C++0x
[over.load]p2). This, apparently, completes the implementation of
rvalue references for *this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1f3810623fc7adbff149585a49a3f174dafdea81 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Improve the extension warning for the use of ref-qualifiers, to
distinguish them from rvalue references. Using the rvalue-references
warning was weird when the ref-qualifier was '&'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
fcab48b626b7ce43625958e857061d721a43a5bc 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: explicitly keep track of whether a
reference binding is for the implicit object parameter of a member
function with a ref-qualifier. My previous comment, that we didn't
need to track this explicitly, was wrong: we do in fact get
rvalue-references-prefer-rvalues overloading with ref-qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
2c9a03f3b249e4d9d76eadf758a33142adc4d0a4 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: implement the implicit conversion rules
for the implicit object argument to a non-static member function with
a ref-qualifier (C++0x [over.match.funcs]p4).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Sema/Overload.h
lang/Sema/Sema.h
192e7f7e7f0493f7cdfda1d752e6de340d4e3ffe 26-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Move InheritableAttr::isInherited to Attr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
fa75e614683e94ff2e0bd651b1722935a2507758 26-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Remove Attr::isMerged; it is not used any more and redundant with
InheritableAttr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
0a9a6d68979619a621fedc5089674487f720f765 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: add name mangling for ref-qualifiers,
using rules that I just made up this morning. This encoding has now
been proposed to the Itanium C++ ABI group for inclusion, but of
course it's still possible that the mangling will change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6b4df91dc4ed4a3fc78587c49a3ed3df96b65d9c 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6,
the restrictions on .* and ->* for ref-qualified pointer-to-member
functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c78e259a5fafd889f5945bc2c48fea48cb3ef9d0 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Clean up the C++0x __has_feature tests. Specifically:
- Don't publicize a C++0x feature through __has_feature if we aren't
in C++0x mode (even if the feature is available only with a
warning).
- "auto" is not implemented well enough for its __has_feature to be
turned on.
- Fix the test of C++0x __has_feature to actually test what we're
trying to test. Searching for the substring "foo" when our options
are "foo" and "no_foo" doesn't work :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
440a48318c53647d6416bcb1ff1af1452aa5d453 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Reinstate r124236 (tweaking the rvalue-reference overload resolution
rules), now that we've actually have a clean build for me to sully.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
c938c1668b4fd12af154e965dd935a89e4801a70 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this:

- Add ref-qualifiers to the type system; they are part of the
canonical type. Print & profile ref-qualifiers
- Translate the ref-qualifier from the Declarator chunk for
functions to the function type.
- Diagnose mis-uses of ref-qualifiers w.r.t. static member
functions, free functions, constructors, destructors, etc.
- Add serialization and deserialization of ref-qualifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
fd6b874f3af26bc64a1d5781833c197b314afb8b 26-Jan-2011 Ted Kremenek <kremenek@apple.com> Merge -Wuninitialized-experimental into -Wuninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
83f51722ed2b8134810cb178f39e44da811de7cd 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Rvalue references for *this: parse ref-qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
bd5a94e263137dc3ce7c100485626bae025cf58e 26-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Enable the self-init checker under command-line option '-analyzer-check-objc-self-init' which by default
is enabled by the driver for '--analyze'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
61d2ab0fa1827c43e5f9023a26c36102cd549f82 26-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Remove CompilerInstance::getOutputFileList because it is unimplemented and unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
4d4feead7e240bf24264658b5abb0b88d52ed684 26-Jan-2011 Douglas Gregor <dgregor@apple.com> Speculatively revert r124236

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
98650449dc769dd6217f183c846dcaf9e6f94930 26-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change error "function cannot return array type" -> "blocks cannot return array type" when blocks are involved.
Addresses rdar://8876238.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b7cd135215501a154eb4f68159f3af020783099e 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Speculatively implement a tweak to the C++0x overload resolution rules
for reference binding (C++ [over.rank.ics]p3b1sb4), so that we prefer
the binding of an lvalue reference to a function lvalue over the
binding of an rvalue reference. This change resolves the ambiguity
with std::forward and lvalue references to function types in a way
that seems consistent with the original rvalue references proposal.

My proposed wording for this change is shown in
isBetterReferenceBindingKind(); we'll try to get this change adopted
in the C++0x working paper as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
5aa74affa5d61d04c4b034b3722ca41aec0cba6e 25-Jan-2011 Nico Weber <nicolasweber@gmx.de> Add -add-plugin flag, which runs plugins in addition to codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/CodeGen/CodeGenAction.h
lang/Driver/CC1Options.td
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendOptions.h
lang/Frontend/MultiplexConsumer.h
c60e13aeff96515d27638129154b1308c15ded3d 25-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Add an attribute to forbid temporary instances of a type. This allows class
authors to write

class __attribute__((forbid_temporaries)) Name { ... };

when they want to force users to name all variables of the type. This protects
people from doing things like creating a scoped_lock that only lives for a
single statement instead of an entire scope.

The warning produced by this attribute can be disabled by
-Wno-forbid-temporaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
e3115e257163321ecde429aeae75f1702f099d4c 25-Jan-2011 Ted Kremenek <kremenek@apple.com> Recycle memory for GRStates that are never referenced
by ExplodedNodes. This leads to about a 4-8%
reduction in memory footprint when analyzing
functions in sqlite3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/PathSensitive/GRState.h
a8c17a5babab35f2db26bf218e7571d1af4afedf 25-Jan-2011 Ted Kremenek <kremenek@apple.com> Teach -Wuninitialized-experimental to also warn
about uninitialized variables captured by blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValuesV2.h
lang/Basic/DiagnosticSemaKinds.td
c21c7e9c2cded68f91be15be6847c9649242dc17 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach TemplateSpecializationTypeLoc::initializeArgLocs() to actually
generate meaningful [*] template argument location information.

[*] Well, as meaningful as possible, given that this entire code path
is a hack for when we've lost type-source information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
d6b8de0e7b01196bd2bee207feb81bc409a5baf9 25-Jan-2011 John McCall <rjmccall@apple.com> Change the wording of the bad-decl-for-attribute warning and error
to make it clear that we're talking about the declarations and not the types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c7ad38168d329d778e884a8b6400bcbed8dc85ee 25-Jan-2011 John McCall <rjmccall@apple.com> Add the ns_consumes_self, ns_consumed, cf_consumed, and ns_returns_autoreleased
attributes for the benefit of the static analyzer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
16cf8f5b6f582876b64e132715280fc473f876b9 25-Jan-2011 Douglas Gregor <dgregor@apple.com> Downgrade the error about rvalue references to an extension warning
and turn on __has_feature(cxx_rvalue_references). The core rvalue
references proposal seems to be fully implemented now, pending lots
more testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
14429b918bd2f4cb52abc75546a7fe37142054ca 25-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Handle the dot syntax for properties in the ExprEngine.

We translate property accesses to obj-c messages by simulating "loads" or "stores" to properties
using a pseudo-location SVal kind (ObjCPropRef).

Checkers can now reason about obj-c messages for both explicit message expressions and implicit
messages due to property accesses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/PathSensitive/SVals.h
5286e2ddfd8332520de4c076e49991d6fe557adb 25-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Introduce ExprEngine::VisitObjCMessage for handling general ObjCMessages (both message expressions and property access)
and use it in ExprEngine::VisitObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
432424d67641d609e4990d791baa782fc161027e 25-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Introduce ObjCMessage which represents both explicit ObjC message expressions and implicit
messages that are sent for handling properties in dot syntax.

Replace all direct uses of ObjCMessageExpr in the checkers and checker interface with ObjCMessage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/Checker.h
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/PathSensitive/ObjCMessage.h
lang/StaticAnalyzer/PathSensitive/TransferFuncs.h
5505c72695161e2fb55391d1453b82b7adbff923 24-Jan-2011 Douglas Gregor <dgregor@apple.com> Disallow function template partial specializations, from Hans
Wennborg! Fixes PR8295.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cb88a1f968c3d4eb451dafb421a8d9578edcbf1a 24-Jan-2011 Anders Carlsson <andersca@mac.com> Use attributes for all the override control specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Basic/Attr.td
9ff2b13aee0f89d23ef4820218f9b88bb5e5c1c1 24-Jan-2011 Ken Dyck <kd@kendyck.com> Use CharUnits for the offset amount of RegionRawOffset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/MemRegion.h
15e14a289583616e582a23b320933e846a742626 23-Jan-2011 Anders Carlsson <andersca@mac.com> Get rid of [[hiding]], [[override]] and [[base_check]].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
f89e0424b8903438179f4a2f16dddd5e5bdc814e 23-Jan-2011 Anders Carlsson <andersca@mac.com> Get rid of the [[final]] C++0x attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
3176cca2fe2bb9ab061e8e5fc05b4d59403fcf19 23-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add support for the --noexecstack option. Fixes PR8762.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
e00909a6e997ec33d9baa5312e9d27b52a3da770 23-Jan-2011 Ted Kremenek <kremenek@apple.com> Tweak diagnostic:

error: no super class declared in @interface for 'XXX'

to be:

error: 'X' cannot use 'super' because it is a root class

The latter explains what the user actually did wrong.

Fixes: <rdar://problem/8904409>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ce93a7cee6c0ea979c12b278771a79c4d6a37fc0 23-Jan-2011 Anders Carlsson <andersca@mac.com> Accept the C++0x override control keywords as an extension in C++98. This is OK since the new syntax is unambiguous and can't be confused with C++98 syntax. If anyone disagrees, please shout!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Sema/DeclSpec.h
dfc2f1035d23e294b298766a3cf51dfe249d53a2 22-Jan-2011 Anders Carlsson <andersca@mac.com> Mark classes as final or explicit. Diagnose when a class marked 'final' is used as a base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
b76cc4d4445fd9e5b29722407ce870e3f5a64cca 22-Jan-2011 Anders Carlsson <andersca@mac.com> Add final/explicit getters and setters to CXXRecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
cc54d594d4f6509c0e3a8e349e481d9b5d899df6 22-Jan-2011 Anders Carlsson <andersca@mac.com> Parse class-virt-specifier-seqs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
46127a96b6dd6b93aa18d5f7a55bc2db8b52a2c9 22-Jan-2011 Anders Carlsson <andersca@mac.com> More work on ClassVirtSpecifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
c46bb7d098bf9e9f0258bf2bb97d8f0f7d382288 22-Jan-2011 Anders Carlsson <andersca@mac.com> Start stubbing out a ClassVirtSpecifiers class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
f1602a56f89ac48aa1b5bce42f07ee795e674a6f 22-Jan-2011 Anders Carlsson <andersca@mac.com> A member function template cannot be virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
07f402cff25354c5f06f307f19b0c57c09d964bd 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Generalize the NRVO move-construction-based initialization routine. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
fbb178a0b47fca1b0fb78c5d41198614cf52aa70 21-Jan-2011 Ted Kremenek <kremenek@apple.com> Add basic fixits for -Wuninitialized-experimental
to suggest initializations for pointer and
ObjC pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
94b1b4d785bc0f09f6af4be394e59d51f35dda60 21-Jan-2011 Ted Kremenek <kremenek@apple.com> Enhance -Wuninitialized-experimental diagnostics
to issue the warning at an uninitialized variable's
declaration, but to issue notes at possible
uninitialized uses (which could be multiple).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc15f010672a13b38104a32e3cefc7adc07ffbf7 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the preference for move-construction over copy-construction
when returning an NRVO candidate expression. For example, this
properly picks the move constructor when dealing with code such as

MoveOnlyType f() { MoveOnlyType mot; return mot; }

The previously-XFAIL'd rvalue-references test case now works, and has
been moved into the appropriate paragraph-specific test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
f5d8f466c3eebaffc51468812bdcbe7f0fe4891a 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Promote the static getNRVOCandidate() function, which computed the
NRVO candidate for a return statement, to
Sema::getCopyElisionCandidate(), and teach it enough to also determine
the NRVO candidate for a throw expression. We still don't use the
latter information, however.

Along the way, implement core issue 1148, which eliminates copy
elision from catch parameters and clarifies that copy elision cannot
occur from function parameters (which we already implemented).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c80e8115278ba1537c8b517a083ecbd0a018b579 21-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Sema: process non-inheritable attributes on function declarations early

This allows us to simplify the handling for the overloadable attribute,
removing a number of FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
60700390a787471d3396f380e0679a6d08c27f1f 21-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Sema: support for processing non-inheritable declaration attributes early

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
a97d70b7ea9633e8cbf976510d7a9ea66f4ac96c 21-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Generalise support for non-inheritable attributes

Inheritable attributes on declarations may be inherited by any later
redeclaration at merge time. By contrast, a non-inheritable attribute
will not be inherited by later redeclarations. Non-inheritable
attributes may be semantically analysed early, allowing them to
influence the redeclaration/overloading process.

Before this change, the "overloadable" attribute received special
handling to be treated as non-inheritable, while all other attributes
were treated as inheritable. This patch generalises the concept,
while removing a FIXME. Some CUDA location attributes are also marked
as non-inheritable in order to support special overloading semantics
(to be introduced in a later patch).

The patch introduces a new Attr subclass, InheritableAttr, from
which all inheritable attributes derive. Non-inheritable attributes
simply derive from Attr.

N.B. I did not review every attribute to determine whether it should
be marked non-inheritable. This can be done later on an incremental
basis, as this change does not affect default functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Basic/AttrKinds.h
fb5d7efc279335bde2cdc0a73da525d6b28201e9 21-Jan-2011 Douglas Gregor <dgregor@apple.com> Improve the diagnostic that complains about binding an rvalue
reference to an lvalue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2e1c730167d2b978c66558c029d163ffe64b9656 20-Jan-2011 Anders Carlsson <andersca@mac.com> Diagnose when a virtual member function marked final is overridden.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
ba4f5d5754c8291690d01ca9581926673d69b24c 20-Jan-2011 John McCall <rjmccall@apple.com> Fix the computation of alignment for fields of packed+aligned structs.
Part of the fix for PR8413.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4ebf1605166e0b6cc967a51429949a0722f79665 20-Jan-2011 Anders Carlsson <andersca@mac.com> Make CheckOverrideControl a member of Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
9e682d9f567a51f26c3b0673837e23bafdb09c11 20-Jan-2011 Anders Carlsson <andersca@mac.com> Diagnose virtual member functions marked override but not overriding any virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c0534b6cdc414aa86ef7e9ab37f7a81a79140f02 20-Jan-2011 Anders Carlsson <andersca@mac.com> Add IsMarkedOverride and IsMarkedFinal flags to FunctionDecl (to be used by CXXRecordDecl).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
98367f0322ac43fa5b0c7ccb33bab95f66b960f6 20-Jan-2011 Anders Carlsson <andersca@mac.com> Change the parser error to reflect that virt-specifiers are allowed on any class member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
aae5af24f031ad5f17872bd8b27ed5c175c0f90c 20-Jan-2011 Anders Carlsson <andersca@mac.com> Only allow virtual member functions to be marked 'override' and 'final'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DeclSpec.h
69a87357310260c4b2c5dce2cdcd10c3fd3a0a58 20-Jan-2011 Anders Carlsson <andersca@mac.com> Pass the VirtSpecifiers along to Sema::ActOnCXXMemberDeclarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
7eeb4ec11043d4860361348f2b19299d957d47a9 20-Jan-2011 Anders Carlsson <andersca@mac.com> Lazily initialize the 'final' and 'override' contextual keywords as suggested by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3dbdb58e2e920ad69fecbd56c25b58577ab693e8 20-Jan-2011 Ken Dyck <kd@kendyck.com> Add CharUnits::RoundUpToAlignment() to simplify rounding in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
83eecbefa4931b95231c9f2a61fb7b9b15e00eec 20-Jan-2011 Douglas Gregor <dgregor@apple.com> When building a user-defined conversion sequence, keep track of the
declaration that name lookup actually found, so that we can use it for
access checking later on. Fixes <rdar://problem/8876150>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
f2ae52605a49e5fc7a581f2c1ae02f1811034578 20-Jan-2011 Douglas Gregor <dgregor@apple.com> Sema::BuildCXXMemberCallExpr() can fail due to access or ambiguities,
so allow it to propagate the failure outward. Fixes the crashing part
of <rdar://problem/8876150>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
dfc331e04d4c6a09fb693a15fc5a57d29a198c86 20-Jan-2011 Douglas Gregor <dgregor@apple.com> Explicitly track the number of call arguments provided when performing
overload resolution, so that we only use that number of call arguments
for partial ordering. Fixes PR9006, a recent regression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
4c9131ac2d0a65cb7c0179d438ae56f7978ab012 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Variadic templates are fully implemented.

Turn on the __has_feature switch for variadic templates, document
their completion, and put the ExtWarn into the c++0x-extensions
warning group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
5ce5f5221217b64193799c2a4d5aa84432d3fba4 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Downgrade the "variadic templates are a C++0x feature" error to an
ExtWarn. We want variadic templates to be usable in libc++/libstdc++
headers even when we're in C++98/03 mode, since it's the only clean
way to implement TR1 <functional>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticSemaKinds.td
d967e31ee796efff24b84b704a063634f6b55627 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Refactor the dependence computation for DeclRefExpr so that we can
reuse it for BlockDeclRefExpr. Do so, fixing the dependence calculate
for BlockDeclRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
a779d9ca2fdf1247f65de0e6acf2870d8be53ccd 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement basic support for the use of variadic templates and blocks
together. In particular:
- Handle the use of captured parameter pack names within blocks
(BlockDeclRefExpr understands parameter packs now)
- Handle the declaration and expansion of parameter packs within a block's
parameter list, e.g., ^(Args ...args) { ... })
- Handle instantiation of blocks where the return type was not
explicitly specified. (unrelated, but necessary for my tests).

Together, these fixes should make blocks and variadic templates work
reasonably well together. Note that BlockDeclRefExpr is still broken
w.r.t. its computation of type and value dependence, which will still
cause problems for blocks in templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6952f1e4256c5b43aee5e98cea4e9b663bd1d413 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for non-type template parameter packs whose type is
a pack expansion, e.g., the parameter pack Values in:

template<typename ...Types>
struct Outer {
template<Types ...Values>
struct Inner;
};

This new implementation approach introduces the notion of an
"expanded" non-type template parameter pack, for which we have already
expanded the types of the parameter pack (to, say, "int*, float*",
for Outer<int*, float*>) but have not yet expanded the values. Aside
from creating these expanded non-type template parameter packs, this
patch updates template argument checking and non-type template
parameter pack instantiation to make use of the appropriate types in
the parameter pack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
92c3a04f3ec683f279814b0eb6d6271b3fd3a219 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Warn about the use of unparenthesized |= in conditionals (which may be
a typo for !=). Fixes PR9001, from Hans Wennborg!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2998d6b0e6d5476c473f68012a851fe4a0f609c8 19-Jan-2011 John McCall <rjmccall@apple.com> When building the copy expression for a __block variable, make sure
there's a respectable point of instantiation. Also, make sure we do
this operation even when instantiating a dependently-typed variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3b6575108a5b6d8b92ac3a9a7794bf6c3a210907 19-Jan-2011 John McCall <rjmccall@apple.com> Change the canonical representation of array types to store qualifiers on the
outermost array types and not on the element type. Move the CanonicalType
member from Type to ExtQualsTypeCommonBase; the canonical type on an ExtQuals
node includes the qualifiers on the ExtQuals. Assorted optimizations enabled
by this change.

getQualifiers(), hasQualifiers(), etc. should all now implicitly look through
array types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
f4c7371fb1d3cebcfb40abad4537bb82515704ea 19-Jan-2011 John McCall <rjmccall@apple.com> Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ASTImporter.h
lang/AST/CanonicalType.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/ExprObjC.h
lang/AST/NestedNameSpecifier.h
lang/AST/RecursiveASTVisitor.h
lang/AST/StmtIterator.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeVisitor.h
lang/Sema/Sema.h
69fc1b330090853ced40436805258fc9a0a70bdc 19-Jan-2011 Ken Dyck <kd@kendyck.com> Add a unary minus operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
0b53cf834346d78985aaa9e7300445a39c245614 19-Jan-2011 Douglas Gregor <dgregor@apple.com> Don't silently drop warning flags passed in to
clang_createTranslationUnitFromSourceFile().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
ce8890371fcdb983ae487c87fa40606a34896ff7 18-Jan-2011 John McCall <rjmccall@apple.com> Fix some unnecessarily complicated code for canonicalizing variably-modified
parameter types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
62c28c831bbf207cc36e683e7c321fc33bf8928c 18-Jan-2011 John McCall <rjmccall@apple.com> Generalize some operations on qualifiers. QualType::getQualifiers() and
::getCVRQualifiers() now look through array types, like all the other
standard queries. Also, make a 'split' variant of getUnqualifiedType().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
dbee3411a22b0dbb03267f5445f7b796104991bb 18-Jan-2011 Francois Pichet <pichet2000@gmail.com> Add support for explicit constructor calls in Microsoft mode.
For example:

class A{
public:
A& operator=(const A& that) {
if (this != &that) {
this->A::~A();
this->A::A(that); // <=== explicit constructor call.
}
return *this;
}
};

More work will be needed to support an explicit call to a template constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d8868a634d4fd362243dc646e58c3cf956c81dcd 18-Jan-2011 Douglas Gregor <dgregor@apple.com> Introduce the notion of a "minimal" import of ASTs, to better support LLDB.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
dec0984fce504a39a7f085774fb67cfd9957be58 18-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
b918d0f5d8f147e1e26c34e6cf42a79af2d2ec41 17-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Convert "#pragma unused(...)" into tokens for the parser.
This allows us to cache a "#pragma unused" that occurs inside an inline C++ member function.
Fixes rdar://8829590&8770988.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/Sema.h
b971dbdb65149a7cf0c046380186d0204e5b411e 17-Jan-2011 Anders Carlsson <andersca@mac.com> Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.

Enforce C++[class.mem]p8:
A virt-specifier-seq shall contain at most one of each virt-specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
77a8184819f6aec673e0b90f5ba967f075063521 17-Jan-2011 Francois Pichet <pichet2000@gmail.com> Revert r123600.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1f3b6fdabbb10779a473d6315154d7325ce20aea 17-Jan-2011 Anders Carlsson <andersca@mac.com> Begin work on supporting "N3206: Override control: Eliminating Attributes", from

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm

This lands support for parsing virt-specifier-seq after member functions, including the
contextual keywords 'final', and 'override'. The keywords are not yet used for anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
04eeba43040969c05cfcb563195ef5b199297b62 16-Jan-2011 Anders Carlsson <andersca@mac.com> Add AnalysisContext::dumpCFG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
e7108aba9b2428f141ee922179ee4aeafc0ca5d1 16-Jan-2011 Francois Pichet <pichet2000@gmail.com> Downgrade ext_enumerator_too_large from ExtWarn to Extension in Microsoft mode. Otherwise you can warnings flooding trying to selfhost clang with fms-extensions because of "unsigned int" -> "signed int" enumerator conversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2d75bbd36e273f7b958aefc766424220ad158bd9 16-Jan-2011 Douglas Gregor <dgregor@apple.com> Emit an extension diagnostic for C99 designated initializers that appear in C++ code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eb6f5dc86531f794ba7746a2da4d28e37cf5da7e 15-Jan-2011 Ken Dyck <ken.dyck@onsemi.com> Add toCharUnitsInBits() to simplify the many calls to CharUnits::fromQuantity() of the form CharUnits::fromQuantity(bitSize, Context.getCharWidth()).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1aee05d08b2184acadeb36de300e216390780d6c 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Introduce a new kind of TemplateName that captures a substituted
template template parameter pack that cannot be fully expanded because
its enclosing pack expansion could not be expanded. This form of
TemplateName plays the same role as SubstTemplateTypeParmPackType and
SubstNonTypeTemplateParmPackExpr do for template type parameter packs
and non-type template parameter packs, respectively.

We should now handle these multi-level pack expansion substitutions
anywhere. The largest remaining gap in our variadic-templates support
is that we cannot cope with non-type template parameter packs whose
type is a pack expansion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
lang/Basic/DiagnosticSemaKinds.td
lang/Serialization/ASTReader.h
610068c8cd2321f90e147b12cf794e1f840b6405 15-Jan-2011 Ted Kremenek <kremenek@apple.com> Add initial prototype for implementation of
-Wuninitialized based on CFG dataflow analysis. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValuesV2.h
lang/Basic/DiagnosticSemaKinds.td
200fbc877d50da9e53b9aa272b70ca3538ce3a66 15-Jan-2011 Ted Kremenek <kremenek@apple.com> Add const version if CFG::isBlkExpr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
9c34ee65a61bbfb60ae76d4df674f49df1842e70 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Tweak the storage mechanism for a set of overloaded template names in
the TemplateName class. Nothing actually changes, but I find this less
objectionable (and it will factor into an upcoming change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
c7793c73ba8a343de3f2552d984851985a46f159 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,
that captures the substitution of a non-type template argument pack
for a non-type template parameter pack within a pack expansion that
cannot be fully expanded. This follows the approach taken by
SubstTemplateTypeParmPackType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Serialization/ASTBitCodes.h
2be29f423acad3bbe39099a78db2805acb5bdf17 15-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach template template argument pack expansions to keep track of the
number of expansions, when we know it, and propagate that information
through Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
6a24bfda084f06a0b252b7befe8cbb17fce7f94e 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Handle substitutions into function parameter packs whose patterns
contain multiple parameter packs at different levels.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
67fd1251aad51bb80d050b7fa5e506fef0ec8e02 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach PackExpansionExpr to keep track of the number of pack expansions
it will expand to, if known. Propagate this information throughout Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Sema/Sema.h
3efd52cf8f4e57c5571bd8cc3168264c3bc46a1e 14-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Properly propagate #pragma diagnostic mappings from PCH but not command-line warning flags.
Addresses rdar://8435969&8852495

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
db0594bfc013131f88429add4eb653c285fa94fb 14-Jan-2011 Ted Kremenek <kremenek@apple.com> Rename 'RemoveDeadBindings()' to 'removeDeadBindings()'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/PathSensitive/Environment.h
lang/StaticAnalyzer/PathSensitive/GRState.h
lang/StaticAnalyzer/PathSensitive/Store.h
2ccf047adf877f5e821210b1ce1a2c8289acadc0 14-Jan-2011 Ted Kremenek <kremenek@apple.com> Rename 'EnterStackFrame()' to 'enterStackFrame()'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/GRState.h
lang/StaticAnalyzer/PathSensitive/Store.h
cded4f649cd4b7ba7d461c25c6482ef52b8d3a2a 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Keep track of the number of expansions to be produced from a type pack
expansion, when it is known due to the substitution of an out
parameter pack. This allows us to properly handle substitution into
pack expansions that involve multiple parameter packs at different
template parameter levels, even when this substitution happens one
level at a time (as with partial specializations of member class
templates and the signatures of member function templates).

Note that the diagnostic we provide when there is an arity mismatch
between an outer parameter pack and an inner parameter pack in this
case isn't as clear as the normal diagnostic for an arity
mismatch. However, this doesn't matter because these cases are very,
very rare and (even then) only typically occur in a SFINAE context.

The other kinds of pack expansions (expression, template, etc.) still
need to support optional tracking of the number of expansions, and we
need the moral equivalent of SubstTemplateTypeParmPackType for
substituted argument packs of template template and non-type template
parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateBase.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
c3069d618f4661d923cb1b5c4525b082fce73b04 14-Jan-2011 Douglas Gregor <dgregor@apple.com> Start implementing support for substitution into pack expansions that
involve template parameter packs at multiple template levels that
occur within the signatures members of class templates (and partial
specializations thereof). This is a work-in-progress that is deficient
in several ways, notably:
- It only works for template type parameter packs, but we need to
also support non-type template parameter packs and template template
parameter packs.
- It doesn't keep track of the lengths of the substituted argument
packs in the expansion, so it can't properly diagnose length
mismatches.

However, this is a concrete step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Serialization/ASTBitCodes.h
852f65beb12a7a735b17b60856e701be14d627d4 14-Jan-2011 Francois Pichet <pichet2000@gmail.com> Unbreak the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/ABI.h
14110477887e3dc168ffc6c191e72d705051f99e 13-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Move name mangling support from CodeGen to AST. In the
process, perform a number of refactorings:

- Move MiscNameMangler member functions to MangleContext
- Remove GlobalDecl dependency from MangleContext
- Make MangleContext abstract and move Itanium/Microsoft functionality
to their own classes/files
- Implement ASTContext::createMangleContext and have CodeGen use it

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Mangle.h
lang/Basic/ABI.h
d074441e027471a914cbb909a7aad1d43224950f 13-Jan-2011 Zhongxing Xu <xuzhongxing@gmail.com> Support inlining base initializers. We still haven't got it completely right,
since the bindings are purged after they are set up. Need to investigate
RemoveDeadBindings algorithm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/MemRegion.h
bda1efd0daf6fca9f515c6ce38d1ed71a3cca5b7 13-Jan-2011 Zhongxing Xu <xuzhongxing@gmail.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
b4857264b8d3d861f688cdaa174aab30e0729a73 13-Jan-2011 Ted Kremenek <kremenek@apple.com> Rename 'HasGeneratedNode' to 'hasGeneratedNode'
and 'getBasePredecessor()' to 'getPredecessor()'.

Also remove a unneeded save-and-restore of
node builder's tag field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/Checker.h
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/PathSensitive/ExprEngineBuilders.h
4bac726dadb09ee38bab8147f1e706380368b362 13-Jan-2011 Ted Kremenek <kremenek@apple.com> Remove CheckerContext's dependence on setting
the node builder's "tag" ivar (which we would
like to remove).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/StaticAnalyzer/PathSensitive/Checker.h
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
1d5d0b9df6d2a3df338bc3e63000536406e7666c 12-Jan-2011 Douglas Gregor <dgregor@apple.com> Add the location of the right parenthesis of a C++ named cast
(static_cast, dynamic_cast, reinterpret_cast, or const_cast) to
improve source-location information. Fixes PR8960.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
2fc1bb76e719d0620b4a6e2134413933b21ca6b6 12-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach TreeTransform how to transform a pack expansion type into
another pack expansion type. This can happen when rebuilding types in
the current instantiation.

Fixes <rdar://problem/8848837> (Clang crashing on libc++ <functional>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4ba2a17694148e16eaa8d3917f657ffcd3667be4 12-Jan-2011 Jay Foad <jay.foad@gmail.com> PR3558: mark "logically const" accessor methods in ASTContext as const,
and mark the fields they use as mutable. This allows us to remove a few
const_casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/NestedNameSpecifier.h
lang/AST/RecordLayout.h
lang/AST/Stmt.h
lang/AST/TemplateBase.h
lang/AST/Type.h
5aff5e3d1f0417d75b508619438f976ed5747c3c 12-Jan-2011 Zhongxing Xu <xuzhongxing@gmail.com> Add cast expr kinds to CheckerVisitor.def.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.def
ae278a3a57595349a411f6474938d4dd1b263a0e 12-Jan-2011 John McCall <rjmccall@apple.com> Slight bugfix to the attribute-distribution logic for GC attributes.
Slight optimization of getObjCGCAttrKind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
203e6a322ae29d577acafcb1572a57ec16e1e730 12-Jan-2011 Douglas Gregor <dgregor@apple.com> Add TemplateArgument::CreatePackCopy() to create a new parameter pack
in ASTContext-allocated memory, copying the provided template
arguments. Use this new routine where we can. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
bc6f0daca4676989116e9c6b8dafeb01ec34252d 11-Jan-2011 Eric Christopher <echristo@apple.com> Add back 122079 so we can ignore the argument some more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
6547884b9c20096594bdc652669df82c322c5eb6 11-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Support post-visiting ObjCIvarRefExprs for checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.def
5078d46af381b27be1c7e3c3e0c517e4cf7cc064 11-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Add 'bool ignorePrefix' parameter to cocoa::deriveNamingConvention to control whether
the prefix should be ignored.

E.g. if ignorePrefix is true, "_init" and "init" selectors will both be result in InitRule, but if
ignorePrefix is false, only "init" will return InitRule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
f7fbbda62705352a53ac3b495a1128946a34ced3 11-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Add 'isLoad' parameter in Checker::visitLocation() to conveniently distinguish between loads/stores.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/Checker.h
5c7bf42ef16dc767615bed10f3b7b3c1265314e1 11-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement C++ [temp.func.order]p5 more directly, by passing down the
number of explicit call arguments. This actually fixes an erroneous
test for [temp.deduct.partial]p11, where we were considering
parameters corresponding to arguments beyond those that were
explicitly provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b6a2b08a6b3fbce1a6a4b69d4185165de970696c 11-Jan-2011 Ted Kremenek <kremenek@apple.com> Remove ProgramPoint parameter from GenericNodeBuilder::generateNode().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
2b57aefea762f526405937b3c01901f8e1047edb 11-Jan-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Added warning about invalid register specification for local variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
27c54e57c4a012dcdf2b40cf985b70d0b9caa69e 11-Jan-2011 Ted Kremenek <kremenek@apple.com> Rework ExprEngine::processCFGBlockEntrance()
to use a node builder. This paves the way
for Checkers to interpose (via a "visit" method)
at the entrance to blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/PathSensitive/SubEngine.h
7771406ac3c58d77468d9d176262ad7ae7ff5050 11-Jan-2011 Ted Kremenek <kremenek@apple.com> Remove several silly methods from ento::CoreEngine
that just forwarded to ento::SubEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
21371ea7cf647f4f0f783faac325925cb8febb1c 11-Jan-2011 Douglas Gregor <dgregor@apple.com> When mapping from a function parameter pack to the set of function
parameters it expanded to, map exactly the number of function
parameters that were expanded rather than just running to the end of
the instantiated parameter list. This finishes the implementation of
the last sentence of C++0x [temp.deduct.call]p1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
55825aa2d88fe82bf3622f195046ae48532d3106 11-Jan-2011 Ted Kremenek <kremenek@apple.com> Rename misc. methods in ento::Worklist to start
with lowercase letter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/PathSensitive/WorkList.h
e36de1fe51c39d9161915dd3dbef880954af6476 11-Jan-2011 Ted Kremenek <kremenek@apple.com> Rename misc. methods in GRSubEngine to start
with a lower-case letter. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/Checker.h
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/PathSensitive/SubEngine.h
lang/StaticAnalyzer/PathSensitive/TransferFuncs.h
10ffc00e2177f042808f507c8dd50b744ed6f738 11-Jan-2011 Douglas Gregor <dgregor@apple.com> Add testing for unexpanded parameter packs in all of the C++
expression kinds. This is (indirectly) a test verifying that the
recursive AST visitor is visiting the children of these expression
nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
66cf92a9670d57da61842adb69f9b038ce29dca5 11-Jan-2011 Matt Beaumont-Gay <matthewbg@google.com> Only traverse template argument locations if we actually have explicit
template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
26c9cb55cb96643c0759c08d037c16c309864087 10-Jan-2011 Zhongxing Xu <xuzhongxing@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
d3731198193eee92796ddeb493973b7a598b003e 10-Jan-2011 Douglas Gregor <dgregor@apple.com> Work-in-progress implementation of C++0x [temp.arg.explicit]p9, which
allows an argument pack determines via explicit specification of
function template arguments to be extended by further, deduced
arguments. For example:

template<class ... Types> void f(Types ... values);
void g() {
f<int*, float*>(0, 0, 0); // Types is deduced to the sequence int*, float*, int
}

There are a number of FIXMEs in here that indicate places where we
need to implement + test retained expansions, plus a number of other
places in deduction where we need to correctly cope with the
explicitly-specified arguments when deducing an argument
pack. Furthermore, it appears that the RecursiveASTVisitor needs to be
auditied; it's missing some traversals (especially w.r.t. template
arguments) that cause it not to find unexpanded parameter packs when
it should.

The good news, however, is that the tr1::tuple implementation now
works fully, and the tr1::bind example (both from N2080) is actually
working now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateBase.h
lang/Sema/Sema.h
lang/Sema/Template.h
50f6aca5d7c41c6a5db75838c6a4d670cbb9b4f3 10-Jan-2011 Zhongxing Xu <xuzhongxing@gmail.com> Add some expression kinds to CheckerVisitor.def.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.h
65423aeb996a296cf2964f136ce4a4a937bd1687 10-Jan-2011 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
f51d0b6c2f5abd09d3a7ba907a3d9b7a43752f3d 09-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Rename CXXCtorInitializer::BaseOrMember to Initializee, since it will also be
used to store the CXXConstructorDecl in a delegating constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/RecursiveASTVisitor.h
lang/Analysis/CFG.h
lang/Analysis/ProgramPoint.h
lang/Parse/Parser.h
lang/Sema/Ownership.h
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
97fcc4977b21da43ab106607ad472149b7d4785a 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Check for delegating constructors and (currently) return an error about them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
65197b4b0c55bb74af0450230d61ee9461223721 08-Jan-2011 Ted Kremenek <kremenek@apple.com> Add semantic checking that the "thousands grouping"
prefix in a printf format string is matched
with the appropriate conversion specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
bd18d4584aae0ed6f7111ef5713784cf29fe663f 08-Jan-2011 Ted Kremenek <kremenek@apple.com> Add printf format string parsing support for '
prefix to format conversions (POSIX extension).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
91fc73e7ffb1fa1da0276518359d3bd4ed11c843 07-Jan-2011 Douglas Gregor <dgregor@apple.com> When instantiating the arguments to an initializer, use the
TreeTransform version of TransformExprs() rather than explicit loop,
so that we expand pack expansions properly. Test cast coming soon...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f84109ee6aeffb09366bd70c8593ce1b7818b1ad 07-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Update AST reader/writer to handle new AppleKext.
Fix an unexpected hickup caused by exceeding size of
generated table (and a misleading comment). Improve
on help message for -fapple-kext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticIDs.h
lang/Driver/CC1Options.td
12c9c00024a01819e3a70ef6d951d32efaeb9312 07-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement substitution of a function parameter pack for its set of
instantiated function parameters, enabling instantiation of arbitrary
pack expansions involving function parameter packs. At this point, we
can now correctly compile a simple, variadic print() example:

#include <iostream>
#include <string>

void print() {}

template<typename Head, typename ...Tail>
void print(const Head &head, const Tail &...tail) {
std::cout << head;
print(tail...);
}

int main() {
std::string hello = "Hello";
print(hello, ", world!", " ", 2011, '\n');
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
lang/Sema/Template.h
170464b7c0a2c0c86f2821f14a46f0d540cb5e94 07-Jan-2011 Francois Pichet <pichet2000@gmail.com> Prefix all attribute enumerators with attr_ for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3cd47e7883dbfce73189b583850cea81e1d1d261 07-Jan-2011 Francois Pichet <pichet2000@gmail.com> Do not use cdecl, fastcall, stdcall etc.. as identifier name. They are reserved keywords at least on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b466d01e464b21832c23eeed90112bc5c26c0236 07-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Add all options needed to support -fapple-kext. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
a009b59fc2c550a229b9146aabda8e33fe3a7771 07-Jan-2011 Douglas Gregor <dgregor@apple.com> Factor out the template transformation of a sequence of function
parameters into parameter types, so that substitution of
explicitly-specified function template arguments uses the same
path. This enables the use of explicitly-specified function template
arguments with variadic templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Sema/Sema.h
f5c65ffbd7374b6c8d9f1e361041578640cab320 06-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement template argument deduction from a call to a function
template whose last parameter is a parameter pack. This allows us to
form a call to, e.g.,

template<typename ...Args1, typename ...Args2>
void f(std::pair<Args1, Args2> ...pairs);

given zero or more instances of "pair".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ebfde17d96960808fdc8d39098968818a18f2f42 06-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Put warning about makeing a string writable into
its own deprecated diagnostics group so it can be
turned off selectively. // rdar://8827606


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c81f2a2c7f83e64b3ef2b77030536290d0e2b350 06-Jan-2011 Roman Divacky <rdivacky@freebsd.org> PowerPC fixes.

Fix the width and align of bool type on Darwin to be 32bits
while keeping it 8 everywhere else.

Change the definition of va_list to default to SV4 ABI one
and let darwin subtarget override this.

Both changes submitted by Nathan Whitehorn and reviewed
by Rafael Espindola.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
914c9a61b7ef96ed259a464f20e51d166b5f68b0 06-Jan-2011 Chandler Carruth <chandlerc@gmail.com> Tweak the wording of this warning further based on a suggestion from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9d156a7b1b2771e191f2f5a45a7b7a694129463b 06-Jan-2011 John McCall <rjmccall@apple.com> Introduce an AttributedType, but don't actually use it anywhere yet.
The initial TreeTransform is a cop-out, but it's more-or-less equivalent
to what we were doing before, or rather what we're doing now and might
eventually stop doing in favor of using this type.
I am simultaneously intrigued by the possibilities of rebuilding a
dependent Attri



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Serialization/ASTBitCodes.h
b0ddf3aeb2f119cac42468b029584e8839b354cc 06-Jan-2011 Douglas Gregor <dgregor@apple.com> When default-initializing a TemplateArgumentLocInfo, make sure that we
initialize *all* of the bits to zero. Also, when the pattern of a
template argument pack expansion, make sure to set the ellipsis
location along all paths.

This should clear up the valgrind failure that popped up in Clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
603cfb4da2f7ba08a1c3452c2fbf70585b8e7621 06-Jan-2011 Douglas Gregor <dgregor@apple.com> Initial implementation of function parameter packs. This implementation allows:

1) Declaration of function parameter packs
2) Instantiation of function parameter packs within function types.
3) Template argument deduction of function parameter packs when
matching two function types.

We're missing all of the important template-instantiation logic for
function template definitions, along with template argument deduction
from the argument list of a function call, so don't even think of
trying to use these for real yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
1fe85ea697fb5c85acded3ac0ddbc19f89c2e181 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Add Decl::isParameterPack(), which covers both function and template
parameter packs, along with ParmVarDecl::isParameterPack(), which
looks for function parameter packs. Use these routines to fix some
obvious FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
b1fa3dc2f914aaa8b5a851c6b5115ec239d20495 05-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the proper enum as parameter, instead of unsigned. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1d65ebba273e6797902dcfa93964bae5ca0fe8d2 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Eliminate two "unsupported" errors relating to variadic templates: one
for template template argument pack expansions (which was no longer
used) and another that was a placeholder for an llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a7fc901a2e39bfe55bfcff5934b2d9fdf9656491 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Replace the representation of template template argument pack
expansions with something that is easier to use correctly: a new
template argment kind, rather than a bit on an existing kind. Update
all of the switch statements that deal with template arguments, fixing
a few latent bugs in the process. I"m happy with this representation,
now.

And, oh look! Template instantiation and deduction work for template
template argument pack expansions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateBase.h
ba68eca7582a62e3e2ff4b0eba1b2b73a6b80895 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Add semantic analysis for the creation of and an AST representation
for template template argument pack expansions. This allows fun such
as:

template<template<class> class ...> struct apply_impl { /*...*/ };
template<template<class> class ...Metafunctions> struct apply {
typedef typename apply_impl<Metafunctions...>::type type;
};

However, neither template argument deduction nor template
instantiation is implemented for template template argument packs, so
this functionality isn't useful yet.

I'll probably replace the encoding of template template
argument pack expansions in TemplateArgument so that it's harder to
accidentally forget about the expansion. However, this is a step in
the right general direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/Sema/ParsedTemplate.h
f457c1a0a46d11623c3d4594b57dff7f5a1151da 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement proper parameter pack matching for non-type template
parameters and template template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
61c4d28e36cd3f1be392cb77f07436d1fa6b0f9f 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for template template parameter packs, e.g.,

template<template<class> class ...Metafunctions>
struct apply_to_each;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Sema/Sema.h
711c52bb20d0c69063b52a99826fb7d2835501f1 05-Jan-2011 John McCall <rjmccall@apple.com> Refactor the application of type attributes so that attributes from
the declaration-specifiers and on the declarator itself are moved
to the appropriate declarator chunk. This permits a greatly
simplified model for how to apply these attributes, as well as
allowing a much more efficient query for the GC attribute.
Now all qualifier queries follow the same basic strategy of
"local qualifiers, local qualifiers on the canonical type,
then look through arrays". This can be easily optimized by
changing the canonical qualified-array-type representation.

Do not process type attributes as decl attributes on declarations
with declarators.

When computing the type of a block, synthesize a prototype
function declarator chunk if the decl-spec type was not a
function. This simplifies the logic for building block signatures.

Change the logic which inserts an objc_read_weak on a block
literal to only fire if the block has a __weak __block variable,
rather than if the return type of the block is __weak qualified,
which is not actually a sensible thing to ask.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
2fdc5e8199e1e239620f2faae88997153703e16f 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Many of the built-in operator candidates introduced into overload
resolution require that the pointed-to type be an object type, but we
weren't filtering out non-object types. Do so, fixing PR7851.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
54c53cca105ed595e12fecf04e415c3712bda936 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Improve our handling of non-type template parameters in partial
specializations. We weren't dealing with any of the cases where the
type of the non-type template argument differs from the type of the
corresponding template parameter in the primary template. We would
think that the template parameter in the partial specialization was
not deducible (and warn about it, incorrectly), then fail to convert a
deduced parameter to the type of the template parameter in the partial
specialization (which may involve truncation, among other
things). Fixes PR8905.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
843cb8d425851a21c765114a1bbf049f0bb3e630 04-Jan-2011 Matt Beaumont-Gay <matthewbg@google.com> Fix wording for err_invalid_use_of_bound_member_func


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
112c3307aaa9ae9ee6ff5c2b4f6a53b1ea3c6f19 04-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Fold -fobjc-nonfragile-abi2 into -fobjc-nonfragile-abi.
// rdar://8818375



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
ee8aff06f6a96214731de17b2cb6df407c6c1820 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement the sizeof...(pack) expression to compute the length of a
parameter pack.

Note that we're missing proper libclang support for the new
SizeOfPackExpr expression node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
9f7a6eeee441bcbb1b17208cb3abd65a0017525a 04-Jan-2011 Chandler Carruth <chandlerc@gmail.com> Implement -Wself-assign, which warns on code such as:

int x = 42;
x = x; // Warns here.

The warning avoids macro expansions, templates, user-defined assignment
operators, and volatile types, so false positives are expected to be low.

The common (mis-)use of this code pattern is to silence unused variable
warnings, but a more idiomatic way of doing that is '(void)x;'.
A follow-up to this will add a note and fix-it hint suggesting this
replacement in cases where the StmtExpr consists precisely of the self
assignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
b2b5cc0cf908d516a107d373db963f692449a8a8 04-Jan-2011 Chandler Carruth <chandlerc@gmail.com> Enhance the diagnostic for negative array sizes to include the
declaration name of the array when present. This ensures that
a poor-man's C++03 static_assert will include the user error message
often embedded in the name.

Update all the tests to reflect the new wording, and add a test for the
name behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3fb9e4b89f72823f162096086f0f964e6dcf66d6 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement pack expansion of base initializers, so that we can
initialize those lovely mixins that come from pack expansions of base
specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
b162054ba8f5b64fe87fbc4837933ab23eebd52b 04-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename MaybeSkipFunctionBodyForCodeCompletion -> trySkippingFunctionBodyForCodeCompletion and check isCodeCompletionEnabled() before doing the call.
Suggestions by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1b21391b3b1b7dd829c35f9b69199ed2a67da25a 04-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix 80 column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f90b27ad077c3339b62befc892382845339f9490 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement pack expansions whose pattern is a base-specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
0fe5397b26695926a835fa99eceb7fc879b307af 03-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When in code-completion, skip obj-c method bodies for speed up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bacb9493770ff19cfd8f7bc46a075f14b4d08159 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Unwrap template argument packs when checking the template arguments of
a class template partial specialiation, and look through pack
expansions when checking the conditions of C++0x [temp.class.spec]p8.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
925910d488051cbd4e38f350c1e9d69c473f09a0 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Diagnose the presence of unexpanded parameter packs within class
template partial specialization arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
af4bad23013532f4c94cdc27887623f45e6f7020 03-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove a couple of setters that have no callers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3437f1f1294499d4ef306c1089fcb3e29ec2aa68 03-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Speed up code-completion by skipping function bodies.

When we are in code-completion mode, skip parsing of all function bodies except the one where the
code-completion point resides.

For big .cpp files like 'SemaExpr.cpp' the improvement makes a huge difference, in some cases cutting down
code-completion time -62% !

We don't get diagnostics for the bodies though, so modify the code-completion tests that check for errors.

See rdar://8814203.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
aa165f8458b51c546bebff947343e1a36f3594cb 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Refactor the tree transform's many loops over sets of expressions
(transforming each in turn) into calls into one central routine
(TransformExprs) that transforms a list of expressions. This
refactoring is preparatory work for pack expansions whose in an
expression-list.

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
be230c36e32142cbdcdbe9c97511d097beeecbab 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for pack expansions whose pattern is a non-type
template argument (described by an expression, of course). For
example:

template<int...> struct int_tuple { };

template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};

It also lays the foundation for pack expansions in an initializer-list.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
6b9109e9d5446f213b12d2a6b76495bffb06b794 03-Jan-2011 Douglas Gregor <dgregor@apple.com> When we attempt to create a built-in that involves a library type we
don't have access to (e.g., fprintf, which needs the library type
FILE), fail with a warning and forget about the builtin
entirely. Previously, we would actually provide an error, which breaks
autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
743b82bf3c500de45715498dbf25f0fb39e71462 02-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Unkown -> Unknown

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5389f48b24937ad7b4093307128b3cbf25235654 30-Dec-2010 David Chisnall <csdavec@swan.ac.uk> Expose Objective-C type encodings of declarations to libclang users. This also adds a method in ASTContext which encodes FunctionDecls using the same encoding format that is used for Objective-C methods.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122639 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/ASTContext.h
3f59c975aa5d047f7edd1b900b5e885c38af0ef7 26-Dec-2010 Chris Lattner <sabre@nondot.org> The -fshort-wchar option causes wchar_t to become unsigned, in addition to being
16-bits in size. Implement this by splitting WChar into two enums, like we have
for char. This fixes a miscompmilation of XULRunner, PR8856.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TargetInfo.h
lang/Frontend/TypeXML.def
a6b0b96e5376cd9cf182a3e240e0537feed43cde 24-Dec-2010 Ted Kremenek <kremenek@apple.com> Add basic support for pointer arithmetic in
SimpleSValBuilder. This clears up some
false positives emitted by ArrayBoundCheckerV2
due to the lack of support for pointer arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/PathSensitive/MemRegion.h
lang/StaticAnalyzer/PathSensitive/Store.h
3252134192221e65c937124cc79b97d3b04389ae 24-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the EntoSA directories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/StaticAnalyzer/EntoSA/AnalysisConsumer.h
lang/StaticAnalyzer/EntoSA/BugReporter/BugReporter.h
lang/StaticAnalyzer/EntoSA/BugReporter/BugType.h
lang/StaticAnalyzer/EntoSA/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/EntoSA/Checkers/DereferenceChecker.h
lang/StaticAnalyzer/EntoSA/Checkers/LocalCheckers.h
lang/StaticAnalyzer/EntoSA/FrontendActions.h
lang/StaticAnalyzer/EntoSA/ManagerRegistry.h
lang/StaticAnalyzer/EntoSA/PathDiagnosticClients.h
lang/StaticAnalyzer/EntoSA/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/EntoSA/PathSensitive/BlockCounter.h
lang/StaticAnalyzer/EntoSA/PathSensitive/Checker.h
lang/StaticAnalyzer/EntoSA/PathSensitive/CheckerHelpers.h
lang/StaticAnalyzer/EntoSA/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/EntoSA/PathSensitive/CheckerVisitor.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/EntoSA/PathSensitive/Environment.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ExprEngineBuilders.h
lang/StaticAnalyzer/EntoSA/PathSensitive/GRState.h
lang/StaticAnalyzer/EntoSA/PathSensitive/GRStateTrait.h
lang/StaticAnalyzer/EntoSA/PathSensitive/MemRegion.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SVals.h
lang/StaticAnalyzer/EntoSA/PathSensitive/Store.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SubEngine.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SummaryManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/TransferFuncs.h
lang/StaticAnalyzer/EntoSA/PathSensitive/WorkList.h
194252d41408b4e765bbaadfe77b5c4502489454 24-Dec-2010 Chris Lattner <sabre@nondot.org> don't use #pragma mark, it isn't portable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1a3942a18b1ca2f9c00ebdd016bea0ef15a0f9a0 24-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> ifndef _MSC_VER out #pragma mark on MSVC. It still tries to parse the text even
though it doesn't know what it is, and complains about invalid tokens ;/.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
7f040a9d817cd1c72b565e92abff473510bf9e1d 24-Dec-2010 John McCall <rjmccall@apple.com> Refactor how we collect attributes during parsing, and add slots for attributes
on array and function declarators. This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
10738d36b150aa65206890c1c845cdba076e4200 24-Dec-2010 Douglas Gregor <dgregor@apple.com> Add an AST representation for non-type template parameter
packs, e.g.,

template<typename T, unsigned ...Dims> struct multi_array;

along with semantic analysis support for finding unexpanded non-type
template parameter packs in types, expressions, and so on.

Template instantiation involving non-type template parameter packs
probably doesn't work yet. That'll come soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
a8bc8c9e9ba5bffebde00340786fe8542469c435 23-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement parsing of function parameter packs and non-type template
parameter packs (C++0x [dcl.fct]p13), including disambiguation between
unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for
cases like

void f(T...)

where T may or may not contain unexpanded parameter packs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
c32647d111e516593b9ba242cad7b8ff4016c155 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Add -fobjc-default-synthesized-properties flag
to allow us to explicitly control whether or
not Objective-C properties are default synthesized.
Currently this feature only works when using
the -fobjc-non-fragile-abi2 flag (so there is
no functionality change), but we can now turn
off this feature without turning off all the features
coupled with -fobjc-non-fragile-abi2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Driver/ToolChain.h
21142581d55918beed544a757e4af3bb865b1812 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Chris Lattner has strong opinions about directory
layout. :)

Rename the 'EntoSA' directories to 'StaticAnalyzer'.

Internally we will still use the 'ento' namespace
for the analyzer engine (unless there are further
sabre rattlings...).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/EntoSA/AnalysisConsumer.h
lang/EntoSA/BugReporter/BugReporter.h
lang/EntoSA/BugReporter/BugType.h
lang/EntoSA/BugReporter/PathDiagnostic.h
lang/EntoSA/Checkers/DereferenceChecker.h
lang/EntoSA/Checkers/LocalCheckers.h
lang/EntoSA/FrontendActions.h
lang/EntoSA/ManagerRegistry.h
lang/EntoSA/PathDiagnosticClients.h
lang/EntoSA/PathSensitive/AnalysisManager.h
lang/EntoSA/PathSensitive/BasicValueFactory.h
lang/EntoSA/PathSensitive/BlockCounter.h
lang/EntoSA/PathSensitive/Checker.h
lang/EntoSA/PathSensitive/CheckerHelpers.h
lang/EntoSA/PathSensitive/CheckerVisitor.def
lang/EntoSA/PathSensitive/CheckerVisitor.h
lang/EntoSA/PathSensitive/ConstraintManager.h
lang/EntoSA/PathSensitive/CoreEngine.h
lang/EntoSA/PathSensitive/Environment.h
lang/EntoSA/PathSensitive/ExplodedGraph.h
lang/EntoSA/PathSensitive/ExprEngine.h
lang/EntoSA/PathSensitive/ExprEngineBuilders.h
lang/EntoSA/PathSensitive/GRState.h
lang/EntoSA/PathSensitive/GRStateTrait.h
lang/EntoSA/PathSensitive/MemRegion.h
lang/EntoSA/PathSensitive/SValBuilder.h
lang/EntoSA/PathSensitive/SVals.h
lang/EntoSA/PathSensitive/Store.h
lang/EntoSA/PathSensitive/SubEngine.h
lang/EntoSA/PathSensitive/SummaryManager.h
lang/EntoSA/PathSensitive/SymbolManager.h
lang/EntoSA/PathSensitive/TransferFuncs.h
lang/EntoSA/PathSensitive/WorkList.h
lang/StaticAnalyzer/AnalysisConsumer.h
lang/StaticAnalyzer/BugReporter/BugReporter.h
lang/StaticAnalyzer/BugReporter/BugType.h
lang/StaticAnalyzer/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/Checkers/DereferenceChecker.h
lang/StaticAnalyzer/Checkers/LocalCheckers.h
lang/StaticAnalyzer/EntoSA/AnalysisConsumer.h
lang/StaticAnalyzer/EntoSA/BugReporter/BugReporter.h
lang/StaticAnalyzer/EntoSA/BugReporter/BugType.h
lang/StaticAnalyzer/EntoSA/BugReporter/PathDiagnostic.h
lang/StaticAnalyzer/EntoSA/Checkers/DereferenceChecker.h
lang/StaticAnalyzer/EntoSA/Checkers/LocalCheckers.h
lang/StaticAnalyzer/EntoSA/FrontendActions.h
lang/StaticAnalyzer/EntoSA/ManagerRegistry.h
lang/StaticAnalyzer/EntoSA/PathDiagnosticClients.h
lang/StaticAnalyzer/EntoSA/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/EntoSA/PathSensitive/BlockCounter.h
lang/StaticAnalyzer/EntoSA/PathSensitive/Checker.h
lang/StaticAnalyzer/EntoSA/PathSensitive/CheckerHelpers.h
lang/StaticAnalyzer/EntoSA/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/EntoSA/PathSensitive/CheckerVisitor.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/EntoSA/PathSensitive/Environment.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/EntoSA/PathSensitive/ExprEngineBuilders.h
lang/StaticAnalyzer/EntoSA/PathSensitive/GRState.h
lang/StaticAnalyzer/EntoSA/PathSensitive/GRStateTrait.h
lang/StaticAnalyzer/EntoSA/PathSensitive/MemRegion.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SVals.h
lang/StaticAnalyzer/EntoSA/PathSensitive/Store.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SubEngine.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SummaryManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/EntoSA/PathSensitive/TransferFuncs.h
lang/StaticAnalyzer/EntoSA/PathSensitive/WorkList.h
lang/StaticAnalyzer/FrontendActions.h
lang/StaticAnalyzer/ManagerRegistry.h
lang/StaticAnalyzer/PathDiagnosticClients.h
lang/StaticAnalyzer/PathSensitive/AnalysisManager.h
lang/StaticAnalyzer/PathSensitive/BasicValueFactory.h
lang/StaticAnalyzer/PathSensitive/BlockCounter.h
lang/StaticAnalyzer/PathSensitive/Checker.h
lang/StaticAnalyzer/PathSensitive/CheckerHelpers.h
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.def
lang/StaticAnalyzer/PathSensitive/CheckerVisitor.h
lang/StaticAnalyzer/PathSensitive/ConstraintManager.h
lang/StaticAnalyzer/PathSensitive/CoreEngine.h
lang/StaticAnalyzer/PathSensitive/Environment.h
lang/StaticAnalyzer/PathSensitive/ExplodedGraph.h
lang/StaticAnalyzer/PathSensitive/ExprEngine.h
lang/StaticAnalyzer/PathSensitive/ExprEngineBuilders.h
lang/StaticAnalyzer/PathSensitive/GRState.h
lang/StaticAnalyzer/PathSensitive/GRStateTrait.h
lang/StaticAnalyzer/PathSensitive/MemRegion.h
lang/StaticAnalyzer/PathSensitive/SValBuilder.h
lang/StaticAnalyzer/PathSensitive/SVals.h
lang/StaticAnalyzer/PathSensitive/Store.h
lang/StaticAnalyzer/PathSensitive/SubEngine.h
lang/StaticAnalyzer/PathSensitive/SummaryManager.h
lang/StaticAnalyzer/PathSensitive/SymbolManager.h
lang/StaticAnalyzer/PathSensitive/TransferFuncs.h
lang/StaticAnalyzer/PathSensitive/WorkList.h
fd03843f0597de5eeced69ca9ae45c478fb2b153 23-Dec-2010 John McCall <rjmccall@apple.com> Kill RecordType::getAddressSpace() and its fixme; that's just not how
address spaces work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
b9c6631941619fb8c74f1056fbc56270629201c1 23-Dec-2010 Douglas Gregor <dgregor@apple.com> Reimplement the comparison of a class template partial
specialization's template arguments against the primary template's
template arguments using the obvious, correct method of checking the
injected-class-name type (C++ [temp.class.spec]p9b3). The previous
incarnation of this comparison attempted to use its own formulation of
the injected-class-name, which is redudant and, with the introduction
of variadic templates, became wrong (again).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3a8f40ed5e86a97e07d255976a95d2f3ad792b6d 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename headers: 'clang/GR' 'clang/EntoSA' and
update Makefile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/EntoSA/AnalysisConsumer.h
lang/EntoSA/BugReporter/BugReporter.h
lang/EntoSA/BugReporter/BugType.h
lang/EntoSA/BugReporter/PathDiagnostic.h
lang/EntoSA/Checkers/DereferenceChecker.h
lang/EntoSA/Checkers/LocalCheckers.h
lang/EntoSA/FrontendActions.h
lang/EntoSA/ManagerRegistry.h
lang/EntoSA/PathDiagnosticClients.h
lang/EntoSA/PathSensitive/AnalysisManager.h
lang/EntoSA/PathSensitive/BasicValueFactory.h
lang/EntoSA/PathSensitive/BlockCounter.h
lang/EntoSA/PathSensitive/Checker.h
lang/EntoSA/PathSensitive/CheckerHelpers.h
lang/EntoSA/PathSensitive/CheckerVisitor.def
lang/EntoSA/PathSensitive/CheckerVisitor.h
lang/EntoSA/PathSensitive/ConstraintManager.h
lang/EntoSA/PathSensitive/CoreEngine.h
lang/EntoSA/PathSensitive/Environment.h
lang/EntoSA/PathSensitive/ExplodedGraph.h
lang/EntoSA/PathSensitive/ExprEngine.h
lang/EntoSA/PathSensitive/ExprEngineBuilders.h
lang/EntoSA/PathSensitive/GRState.h
lang/EntoSA/PathSensitive/GRStateTrait.h
lang/EntoSA/PathSensitive/MemRegion.h
lang/EntoSA/PathSensitive/SValBuilder.h
lang/EntoSA/PathSensitive/SVals.h
lang/EntoSA/PathSensitive/Store.h
lang/EntoSA/PathSensitive/SubEngine.h
lang/EntoSA/PathSensitive/SummaryManager.h
lang/EntoSA/PathSensitive/SymbolManager.h
lang/EntoSA/PathSensitive/TransferFuncs.h
lang/EntoSA/PathSensitive/WorkList.h
lang/GR/AnalysisConsumer.h
lang/GR/BugReporter/BugReporter.h
lang/GR/BugReporter/BugType.h
lang/GR/BugReporter/PathDiagnostic.h
lang/GR/Checkers/DereferenceChecker.h
lang/GR/Checkers/LocalCheckers.h
lang/GR/FrontendActions.h
lang/GR/ManagerRegistry.h
lang/GR/PathDiagnosticClients.h
lang/GR/PathSensitive/AnalysisManager.h
lang/GR/PathSensitive/BasicValueFactory.h
lang/GR/PathSensitive/BlockCounter.h
lang/GR/PathSensitive/Checker.h
lang/GR/PathSensitive/CheckerHelpers.h
lang/GR/PathSensitive/CheckerVisitor.def
lang/GR/PathSensitive/CheckerVisitor.h
lang/GR/PathSensitive/ConstraintManager.h
lang/GR/PathSensitive/CoreEngine.h
lang/GR/PathSensitive/Environment.h
lang/GR/PathSensitive/ExplodedGraph.h
lang/GR/PathSensitive/ExprEngine.h
lang/GR/PathSensitive/ExprEngineBuilders.h
lang/GR/PathSensitive/GRState.h
lang/GR/PathSensitive/GRStateTrait.h
lang/GR/PathSensitive/MemRegion.h
lang/GR/PathSensitive/SValBuilder.h
lang/GR/PathSensitive/SVals.h
lang/GR/PathSensitive/Store.h
lang/GR/PathSensitive/SubEngine.h
lang/GR/PathSensitive/SummaryManager.h
lang/GR/PathSensitive/SymbolManager.h
lang/GR/PathSensitive/TransferFuncs.h
lang/GR/PathSensitive/WorkList.h
9ef6537a894c33003359b1f9b9676e9178e028b7 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename static analyzer namespace 'GR' to 'ento'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
lang/GR/AnalysisConsumer.h
lang/GR/BugReporter/BugReporter.h
lang/GR/BugReporter/BugType.h
lang/GR/BugReporter/PathDiagnostic.h
lang/GR/Checkers/DereferenceChecker.h
lang/GR/Checkers/LocalCheckers.h
lang/GR/FrontendActions.h
lang/GR/ManagerRegistry.h
lang/GR/PathDiagnosticClients.h
lang/GR/PathSensitive/AnalysisManager.h
lang/GR/PathSensitive/BasicValueFactory.h
lang/GR/PathSensitive/BlockCounter.h
lang/GR/PathSensitive/Checker.h
lang/GR/PathSensitive/CheckerHelpers.h
lang/GR/PathSensitive/CheckerVisitor.h
lang/GR/PathSensitive/ConstraintManager.h
lang/GR/PathSensitive/CoreEngine.h
lang/GR/PathSensitive/Environment.h
lang/GR/PathSensitive/ExplodedGraph.h
lang/GR/PathSensitive/ExprEngine.h
lang/GR/PathSensitive/ExprEngineBuilders.h
lang/GR/PathSensitive/GRState.h
lang/GR/PathSensitive/GRStateTrait.h
lang/GR/PathSensitive/MemRegion.h
lang/GR/PathSensitive/SValBuilder.h
lang/GR/PathSensitive/SVals.h
lang/GR/PathSensitive/Store.h
lang/GR/PathSensitive/SubEngine.h
lang/GR/PathSensitive/SummaryManager.h
lang/GR/PathSensitive/SymbolManager.h
lang/GR/PathSensitive/TransferFuncs.h
lang/GR/PathSensitive/WorkList.h
c478a1425c055e517169220ea1c1efd857e65f52 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Add WIP prototype of a new buffer overflow
checker based on using raw (symbolic) byte offsets
from a base region.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
6bd8124f53d6694ef0de1713f06325893c0ea2ca 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Add 'getConditionType()' and 'getArrayIndexType()'
to SValBuilder. These two query methods are useful
for constructing SVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/GR/PathSensitive/SValBuilder.h
c6ed729f669044f5072a49d79041f455d971ece3 23-Dec-2010 Jeffrey Yasskin <jyasskin@google.com> Change all self assignments X=X to (void)X, so that we can turn on a
new gcc warning that complains on self-assignments and
self-initializations. Fix one bug found by the warning, in which one
clang::OverloadCandidate constructor failed to initialize its
FunctionTemplate member.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
0d80abc3b7fb0dca26fb6b272d2c3484f86fb7e7 23-Dec-2010 Douglas Gregor <dgregor@apple.com> Unify the consistency checking for deduced template arguments into a
single routine. Extend that routine to handle consistency
checking for template argument packs, so that we can compare the
deduced packs for template parameter packs across different pack
expansions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e02e26293cf8e3bad1059b39cea75c6582896da6 22-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement template argument deduction for pack expansions whose
pattern is a template argument, which involves repeatedly deducing
template arguments using the pattern of the pack expansion, then
bundling the resulting deductions into an argument pack.

We can now handle a variety of simple list-handling metaprograms using
variadic templates. See, e.g., the new "count" metaprogram.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/TemplateBase.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
99130e5a02e93282cb393d2cba0d3dffc10abc01 22-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Complain on missing property getter method only
if property-dot expression is decidedly
an rvalue. // rdar://8155806.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d2592a34a059e7cbb2b11dc53649ac4912422909 22-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Refactoring: Drop the 'GR' prefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/GR/BugReporter/BugReporter.h
lang/GR/BugReporter/BugType.h
lang/GR/Checkers/DereferenceChecker.h
lang/GR/Checkers/LocalCheckers.h
lang/GR/PathSensitive/BasicValueFactory.h
lang/GR/PathSensitive/BlockCounter.h
lang/GR/PathSensitive/Checker.h
lang/GR/PathSensitive/ConstraintManager.h
lang/GR/PathSensitive/CoreEngine.h
lang/GR/PathSensitive/ExplodedGraph.h
lang/GR/PathSensitive/ExprEngine.h
lang/GR/PathSensitive/ExprEngineBuilders.h
lang/GR/PathSensitive/GRBlockCounter.h
lang/GR/PathSensitive/GRCoreEngine.h
lang/GR/PathSensitive/GRExprEngine.h
lang/GR/PathSensitive/GRExprEngineBuilders.h
lang/GR/PathSensitive/GRState.h
lang/GR/PathSensitive/GRSubEngine.h
lang/GR/PathSensitive/GRTransferFuncs.h
lang/GR/PathSensitive/GRWorkList.h
lang/GR/PathSensitive/Store.h
lang/GR/PathSensitive/SubEngine.h
lang/GR/PathSensitive/SymbolManager.h
lang/GR/PathSensitive/TransferFuncs.h
lang/GR/PathSensitive/WorkList.h
5a4f98ff943e6a501b0fe47ade007c9bbf96cb88 22-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Refactoring: Move stuff into namespace 'GR'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
lang/GR/AnalysisConsumer.h
lang/GR/BugReporter/BugReporter.h
lang/GR/BugReporter/BugType.h
lang/GR/BugReporter/PathDiagnostic.h
lang/GR/Checkers/DereferenceChecker.h
lang/GR/Checkers/LocalCheckers.h
lang/GR/FrontendActions.h
lang/GR/ManagerRegistry.h
lang/GR/PathDiagnosticClients.h
lang/GR/PathSensitive/AnalysisManager.h
lang/GR/PathSensitive/BasicValueFactory.h
lang/GR/PathSensitive/Checker.h
lang/GR/PathSensitive/CheckerHelpers.h
lang/GR/PathSensitive/CheckerVisitor.h
lang/GR/PathSensitive/ConstraintManager.h
lang/GR/PathSensitive/Environment.h
lang/GR/PathSensitive/ExplodedGraph.h
lang/GR/PathSensitive/GRBlockCounter.h
lang/GR/PathSensitive/GRCoreEngine.h
lang/GR/PathSensitive/GRExprEngine.h
lang/GR/PathSensitive/GRExprEngineBuilders.h
lang/GR/PathSensitive/GRState.h
lang/GR/PathSensitive/GRStateTrait.h
lang/GR/PathSensitive/GRSubEngine.h
lang/GR/PathSensitive/GRTransferFuncs.h
lang/GR/PathSensitive/GRWorkList.h
lang/GR/PathSensitive/MemRegion.h
lang/GR/PathSensitive/SValBuilder.h
lang/GR/PathSensitive/SVals.h
lang/GR/PathSensitive/Store.h
lang/GR/PathSensitive/SummaryManager.h
lang/GR/PathSensitive/SymbolManager.h
98cabbad47a4d9db6b7e95c950d3302c110d1b02 22-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Refactoring: include/clang/Checker -> include/clang/GR

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/AnalysisConsumer.h
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Checker/Checkers/DereferenceChecker.h
lang/Checker/Checkers/LocalCheckers.h
lang/Checker/FrontendActions.h
lang/Checker/ManagerRegistry.h
lang/Checker/PathDiagnosticClients.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerHelpers.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRExprEngineBuilders.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRStateTrait.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SValBuilder.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SummaryManager.h
lang/Checker/PathSensitive/SymbolManager.h
lang/GR/AnalysisConsumer.h
lang/GR/BugReporter/BugReporter.h
lang/GR/BugReporter/BugType.h
lang/GR/BugReporter/PathDiagnostic.h
lang/GR/Checkers/DereferenceChecker.h
lang/GR/Checkers/LocalCheckers.h
lang/GR/FrontendActions.h
lang/GR/ManagerRegistry.h
lang/GR/PathDiagnosticClients.h
lang/GR/PathSensitive/AnalysisManager.h
lang/GR/PathSensitive/BasicValueFactory.h
lang/GR/PathSensitive/Checker.h
lang/GR/PathSensitive/CheckerHelpers.h
lang/GR/PathSensitive/CheckerVisitor.def
lang/GR/PathSensitive/CheckerVisitor.h
lang/GR/PathSensitive/ConstraintManager.h
lang/GR/PathSensitive/Environment.h
lang/GR/PathSensitive/ExplodedGraph.h
lang/GR/PathSensitive/GRBlockCounter.h
lang/GR/PathSensitive/GRCoreEngine.h
lang/GR/PathSensitive/GRExprEngine.h
lang/GR/PathSensitive/GRExprEngineBuilders.h
lang/GR/PathSensitive/GRState.h
lang/GR/PathSensitive/GRStateTrait.h
lang/GR/PathSensitive/GRSubEngine.h
lang/GR/PathSensitive/GRTransferFuncs.h
lang/GR/PathSensitive/GRWorkList.h
lang/GR/PathSensitive/MemRegion.h
lang/GR/PathSensitive/SValBuilder.h
lang/GR/PathSensitive/SVals.h
lang/GR/PathSensitive/Store.h
lang/GR/PathSensitive/SummaryManager.h
lang/GR/PathSensitive/SymbolManager.h
20a55e2515ce89ddf9993941f9b5d0f3a6c91b4f 22-Dec-2010 Douglas Gregor <dgregor@apple.com> Implicitly expand argument packs when performing template argument
deduction. Unify all of the looping over template arguments for
deduction purposes into a single place, where argument pack expansion
occurs; this is also the hook for deducing from pack expansions, which
itself is not yet implemented.

For now, at least we can handle a basic "count" metafunction written
with variadics. See the new test for the formulation that works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c4bf2b9afb7d47445a9dc6bc848657098a4e3851 22-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Introduced raw_identifier token kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/Preprocessor.h
lang/Lex/Token.h
a0e27f00158c9306d53b0003b94182e415380ea9 22-Dec-2010 Francois Pichet <pichet2000@gmail.com> Redesign the way anonymous fields are handled in designated-initializers.
Previously designated anonymous fields were found via name lookup. This redesign uses the fact that an IndirectFieldDecl declaration will always follow an anonymous implicit field to remove the special case of name lookup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/RecursiveASTVisitor.h
b68e39930d06ed81a2b431dc09e4cb97e5c0d57a 21-Dec-2010 Douglas Gregor <dgregor@apple.com> In C++, if the user redeclares a builtin function with a type that is
inconsistent with the type that the builtin *should* have, forget
about the builtin altogether: we don't want subsequence analyses,
CodeGen, etc., to think that we have a proper builtin function.

C is protected from errors here because it allows one to use a
library builtin without having a declaration, and detects inconsistent
(re-)declarations of builtins during declaration merging. C++ was
unprotected, and therefore would crash.

Fixes PR8839.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
bdb2d5056fd675c27307b34efd371bbba6839e92 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Fix a major inconsistency in the representation of Objective-C
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.

With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.

Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
2fcbceff97e065cff499e6cc563ca25c762bf547 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement BlockDecl::getSourceRange(). The bogus source-range
information caused token-annotation to fail in funny ways. Fixes
<rdar://problem/8595386>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b0ee93cf945744569b82b8a07361061f2963264a 21-Dec-2010 Douglas Gregor <dgregor@apple.com> A class template partial specialization cannot be a friend. Fixes PR8649.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122325 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3910cfd17fcd99ac80158e625fc63e4784d26435 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Teach clang_getCursorSemanticParent() and
clang_getCursorLexicalParent() to cope with class and function
templates, along with the parent of the translation unit. Fixes PR8761
and PR8766.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122324 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
786e61717c67b513ed43e6e057a5ff550287ca47 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Initialize LangOptions::MSCVersion. Thanks to Csaba Raduly for noting the omission

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
b99268b3083c882103bd1bd08bdcc9a76a2b4795 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement instantiation of pack expansions whose pattern is a type-id
in an exception specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
00ccbefcffeb88ea3e2e6323e594fa968753ad14 21-Dec-2010 John McCall <rjmccall@apple.com> Fix the noreturn conversion to only strip off a single level of indirection.
Apply the noreturn attribute while creating a builtin function's type.
Remove the getNoReturnType() API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8e5fc9be37c6828ad008f22730e3baac1bef1686 21-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Warn when message is sent to receiver of
unknown type and there is a possibility that
at runtime method is resolved to a deprecated or
unavailable method. Addreses // rdar://8769853


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
a40bc724849f9cdc6a7706bc5d230685c3bdf63c 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Give the RecursiveASTVisitor a configuration function
shouldWalkTypesOfTypeLocs() that determines whether it should walk the
Types within TypeLocs. This walk is redundant, but perhaps required
for some clients. Disabling this redundant walk in the unexpanded
parameter pack finder produces better results, because we get
parameter packs with source location info *unless* such source
location information isn't available.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
dace95b13e2ceb0c3ec8de6babd926dc5114e1e5 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Clean up the printing of template argument packs; previously, we were
getting extra "<>" delimiters around template argument packs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8491ffe86c50241b47c6d7ef8cd9ee00f5e675da 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement basic support for template instantiation of pack expansions
whose patterns are template arguments. We can now instantiate, e.g.,

typedef tuple<pair<OuterTypes, InnerTypes>...> type;

where OuterTypes and InnerTypes are template type parameter packs.

There is a horrible inefficiency in
TemplateArgumentLoc::getPackExpansionPattern(), where we need to
create copies of TypeLoc data because our interfaces traffic in
TypeSourceInfo pointers where they should traffic in TypeLocs
instead. I've isolated in efficiency in this one routine; once we
refactor our interfaces to traffic in TypeLocs, we can eliminate it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
lang/Sema/Template.h
342e907d72c1644ca294115dabd5ed8e852bc4ed 20-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename 'VisitLocation' to 'visitLocation'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
d048c6ef5b6cfaa0cecb8cc1d4bdace32ed21d07 20-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename 'Generate[Node,Sink]' to 'generate[Node,Sink]'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
87dd697dcc8ecb64df73ae64d61b8c80ff0c157c 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Clean up the handling of template argument packs, especially in the
area of printing template arguments. The functionality changes here
are limited to cases of variadic templates that aren't yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
913b7bf8c40454641588611b7bbad981dc53c882 20-Dec-2010 Francois Pichet <pichet2000@gmail.com> Emit an error if operator __uuidof() is called on a type with no associated GUID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7536dd5e6c99584481b7dab68b7e7d8df9c54054 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given

template<typename... Types> struct tuple;

template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};

the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.

This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
d3d3be9bc717b37366324e9711f1ea22dea42caa 20-Dec-2010 Francois Pichet <pichet2000@gmail.com> Validate Microsoft's uuid attribute string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
403ba3522d1b1c97ae5fad81c1a2c4b3a754e1c1 19-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Add missing standard includes. Patch by Joerg Sonnenberger!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Analysis/CFG.h
lang/Analysis/Support/BumpVector.h
lang/Basic/IdentifierTable.h
lang/Lex/LiteralSupport.h
276fdf408050d205f3a7f34c1e788224a67d2098 19-Dec-2010 Wesley Peck <peckw@wesleypeck.com> 1. Add some ABI information for the Microblaze.
2. Add attibutes "interrupt_handler" and "save_volatiles" for the Microblaze target.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
11542141e385859df6b4f1a8f1f01856ad193b5b 19-Dec-2010 Francois Pichet <pichet2000@gmail.com> Add support for the Microsoft uuid attribute:

example:
struct __declspec(uuid("6d5140c1-7436-11ce-8034-00aa006009fa"))
test { };


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
e6a365d772a6b455f1e23ac9ae5f40d65a55a18c 19-Dec-2010 John McCall <rjmccall@apple.com> Motions towards simplifying how we deal with attribute-qualified function types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
df344dfb663f99184e734f5d14b5fc9b2725aec2 17-Dec-2010 Eric Christopher <echristo@apple.com> Going back to the drawing board with these two awful hacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
lang/Driver/Options.td
dd4430e596fac34e9ce44228a249f71e73effd4a 17-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Warn when synthesizing a property which is
implicitly atomic under -Wimplicit-atomic-properties
flag. // rdar://8774580


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DeclSpec.h
854fc56c95845660fccb1cb165fbf33fb9ae09a8 17-Dec-2010 Bill Wendling <isanbard@gmail.com> Initialize variables in the correct order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
2bde8273eb5730324f823945d0c2389badf325e6 17-Dec-2010 Douglas Gregor <dgregor@apple.com> Encapsulate TemplateArgument::Kind

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
2c5c3135286a8cb27406dc6dcecfbd16e7c898fa 17-Dec-2010 Eric Christopher <echristo@apple.com> Horrible hack for systems that use -dumpversion with clang to expect versions
that match gcc versions. Eew.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
154f251c6f47c68ba7c19ed1d5fb873de9fdece2 17-Dec-2010 Eric Christopher <echristo@apple.com> Nom nom nom, tasty unused option with an argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
c7b5ed6da7410849b51ba9a9ea04d2cc7b720f48 17-Dec-2010 Douglas Gregor <dgregor@apple.com> Swap the order of the condition and body of a do-while statement in
the AST, so that we visit them in source order. Fixes <rdar://problem/8779113>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b321c0c0ba957d78475e72cebde4028fdaa00f8f 17-Dec-2010 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
bb8fef382ad89b4bc202a1dbd4cd52ced7734479 17-Dec-2010 Ted Kremenek <kremenek@apple.com> Move CocoaConventions.[h,cpp] from libChecker
to libAnalysis. Similar to Format (format string checking),
CocoaConventions has the
potential to serve clients other than the
static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DomainSpecific/CocoaConventions.h
lang/Checker/DomainSpecific/CocoaConventions.h
0a3ed3143b00f237decb1288c1ff574ae09eba4e 17-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename several methods/functions in the analyzer
to start with lowercase characters. No
functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
2e219b8d253dbb901206b14e5643cc9d0edd662b 17-Dec-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's __uuidof operator returns a lvalue. Part 2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a669c534cf414339060868d70d2348fea9ce6c7d 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Add tests checking for unexpanded parameter packs in declarations that
occur within statements. Teach Sema::ActOnExceptionDeclarator() to
check for unexpanded parameter packs in the exception type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
781def075d4a486a5b367c6730fe77cb1f721ac1 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in non-type template parameter types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
6f52675ec400a0ee89ec6214c4845b8ee274304a 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in default arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
892697dd2287caf7c29aaaa82909b0e90b8b63fe 16-Dec-2010 Ted Kremenek <kremenek@apple.com> Start migration of static analyzer to using the
implicit lvalue-to-rvalue casts that John McCall
recently introduced. This causes a whole bunch
of logic in the analyzer for handling lvalues
to vanish. It does, however, raise a few issues
in the analyzer w.r.t to modeling various constructs
(e.g., field accesses to compound literals).

The .c/.m analysis test cases that fail are
due to a missing lvalue-to-rvalue cast that
will get introduced into the AST. The .cpp
failures were more than I could investigate in
one go, and the patch was already getting huge.
I have XFAILED some of these tests, and they
should obviously be further investigated.

Some highlights of this patch include:

- CFG no longer requires an lvalue bit for
CFGElements
- StackFrameContext doesn't need an 'asLValue'
flag
- The "VisitLValue" path from GRExprEngine has
been eliminated.

Besides the test case failures (XFAILed), there
are surely other bugs that are fallout from
this change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/GRExprEngine.h
a31040f16604849b3b1dc36015056c81bae68ad1 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs within variable initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
6ccab97c17c17f38eb92c7fe02c766508875bd97 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in friend declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
8b1aba495744bea7093899a65f08c3987263061c 16-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics when property being looked up
in a forward @class object. // rdar://8774513


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
56c04588ef3cfa1bbc968fd68de2480a4e66971d 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in using declarations. As a
drive-by, make sure to check for unexpanded parameter packs within the
name of a declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
0c9e4799fd78d350a037498b2c797f2b2558791c 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in enumeration types and enumerators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
399ad970a25efcbfa7111e17f48285a70fba2731 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in static assertion expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
46e392ae6d09979b087d7b1aca3b816ba4199b89 16-Dec-2010 Bob Wilson <bob.wilson@apple.com> Implement builtins for Neon half-precision float conversions.
Also tweak the VCVT_F32_F16 entry in arm_neon.td to be more consistent with
the other floating-point conversion builtins. Radar 8068427.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
e186269a8a41dbff1ebea2c251048892979d1078 16-Dec-2010 Douglas Gregor <dgregor@apple.com> Check for unexpanded parameter packs in various kinds of
declarations. This is a work in progress, as I go through the C++
declaration grammar to identify where unexpanded parameter packs can
occur.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
c11e1d7f1eff113b8a4b2a6370975eb1dc7c9205 15-Dec-2010 Douglas Gregor <dgregor@apple.com> Teach the RecursiveASTVisitor to traverse the type-location
information for all of the explicit casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
9ef75899bae6dd9a4be1252ae9cadcb619c170ff 15-Dec-2010 Douglas Gregor <dgregor@apple.com> Introduce a RecursiveASTVisitor subclass that finds all unexpanded
parameter packs within a statement, type, etc. Use this visitor to
provide improved diagnostics for the presence of unexpanded parameter
packs in a full expression, base type, declaration type, etc., by
highlighting the unexpanded parameter packs and providing their names,
e.g.,

test/CXX/temp/temp.decls/temp.variadic/p5.cpp:28:85: error: declaration type
contains unexpanded parameter packs 'VeryInnerTypes',
'OuterTypes', ...
...VeryInnerTypes, OuterTypes>, pair<InnerTypes, OuterTypes> > types;
~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0827408865e32789e0ec4b8113a302ccdc531423 15-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix diagnostic pragmas.

Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state.
Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect
a lot of places, like C++ inline methods, template instantiations, the lexer, etc.

Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location.

Fixes rdar://8365684.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
lang/Basic/SourceLocation.h
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
dda0c0dd63bb1ff4a057f1275497e844f99b7909 15-Dec-2010 Nico Weber <nicolasweber@gmx.de> Fix gcc warning: 'clang::ASTStmtReader' is already a friend of 'clang::OverloadExpr'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
bfdcdc8e26097c9dbb4c40d78296f6ccc3e6684c 15-Dec-2010 John McCall <rjmccall@apple.com> Set the "implicitly inline" bit on a method as soon as we see a definition
within the class. Teach IR gen to look for function definitions in record
lexical contexts when deciding whether to emit a function whose address
was taken. Fixes PR8789.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
bebbe0d9b7568ce43a464286bee49429489ef483 15-Dec-2010 Douglas Gregor <dgregor@apple.com> Variadic templates: extend the Expr class with a bit that specifies
whether the expression contains an unexpanded parameter pack, in the
same vein as the changes to the Type hierarchy. Compute this bit
within all of the Expr subclasses.

This change required a bunch of reshuffling of dependency
calculations, mainly to consolidate them inside the constructors and
to fuse multiple loops that iterate over arguments to determine type
dependence, value dependence, and (now) containment of unexpanded
parameter packs.

Again, testing is painfully sparse, because all of the diagnostics
will change and it is more important to test the to-be-written visitor
that collects unexpanded parameter packs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Stmt.h
lang/AST/TemplateBase.h
723df245307a530da5433dfb43accf187dc3e243 14-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added missing IgnoreParens().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeLoc.h
373920bd733b1d28fe7bf209945a62eb9248d948 14-Dec-2010 John McCall <rjmccall@apple.com> Improve some comments, shrink FunctionType::ExtInfo, and fix a bug found
by valgrind where we were doing the wrong thing in the presence of invalid
exception specs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e23cf437fe76b1ed02d63c3f61b456fd48a915f5 14-Dec-2010 John McCall <rjmccall@apple.com> Restore r121752 without modification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/Type.h
lang/Sema/Sema.h
5bfe232d1f07a6fd160fcf82c277c055a412a1c0 14-Dec-2010 John McCall <rjmccall@apple.com> Pull out r121752 in case it's causing the selfhost breakage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/Type.h
lang/Sema/Sema.h
0e88aa7100da32acc63bc8a4dcb946ed517868f1 14-Dec-2010 John McCall <rjmccall@apple.com> Factor out most of the extra state in a FunctionProtoType into a separate
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/Type.h
lang/Sema/Sema.h
d0937224f383c7cc72c947119380f9713a070c73 13-Dec-2010 Douglas Gregor <dgregor@apple.com> Variadic templates: extend Type, NestedNameSpecifier, TemplateName,
and TemplateArgument with an operation that determines whether there
are any unexpanded parameter packs within that construct. Use this
information to diagnose the appearance of the names of parameter packs
that have not been expanded (C++ [temp.variadic]p5). Since this
property is checked often (every declaration, ever expression
statement, etc.), we extend Type and Expr with a bit storing the
result of this computation, rather than walking the AST each time to
determine whether any unexpanded parameter packs occur.

This commit is deficient in several ways, which will be remedied with
future commits:
- Expr has a bit to store the presence of an unexpanded parameter
pack, but it is never set.
- The error messages don't point out where the unexpanded parameter
packs were named in the type/expression, but they should.
- We don't check for unexpanded parameter packs in all of the places
where we should.
- Testing is sparse, pending the resolution of the above three
issues.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/NestedNameSpecifier.h
lang/AST/Stmt.h
lang/AST/TemplateBase.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
140a2bd77539b4537010d8cd6a0a3805ce724b3e 13-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Skip ParenType on function instantiations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
e7f85047d0dd5ebb03d851fab0afa9db07ec2925 13-Dec-2010 Chandler Carruth <chandlerc@gmail.com> Fix PR8774 by restricting when hasInit returns true. Previously, it
would return true if the initializer pointer union had *any* non-null
pointer in it, even if the pointer wasn't one that would actually be
returned via getInit(). This makes it more accurately model the logic of
'getInit() != NULL'.

This still isn't completely satisfying. From a principled stance,
I suspect we should make hasInit() and getInit() *always* return false
and NULL (resp.) for ParmVarDecl. We shouldn't at the API level treat
initializers and default arguments as the same thing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7b381985353304a7723acb05911ff91634fa1f27 13-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Basic, Sema: add support for CUDA launch_bounds attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
2c2c8dd0acb2a51067299bfcec9ff2145f2031c8 13-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Sema: diagnose kernel functions with non-void return type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e005d19456e6fb73ace33f25e02ac10e22dd063f 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ObjCMessageExpr::getReceiverRange() to get the source range of the receiver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
f40f0d5a382395e0301d7dcbeaa2b8e90b8973b1 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep the source location of the selector in ObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Sema/Sema.h
5e362102f8bac7a46cf8ff4394ea29548a4c1ab0 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make RecursiveASTVisitor traverse a ObjCMethodDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
5aea91b09bdb36fba4e36c2766f3d5f9127d1e61 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Silence a GCC unitialized-value warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DeclSpec.h
4472fc641ea3069463798fb56a04043c28ea2910 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Replace two QualType::getTypePtrOrNull() calls with
QualType::getTypePtr(). It turns out that
cast_or_null/dyn_cast_or_null don't actually use simplify_type, so
they're guaranteed to operator on non-NULL QualType or CanQualType
objects.

Good for a 0.6% win on 403.gcc's combine.c with -emit-llvm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
1ab55e9bb87d98bff1d42c7a0ee502c64755d9f5 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Eliminate the branching in QualType::getTypePtr() by providing a
common base for ExtQuals and Type that stores the underlying type
pointer. This results in a 2% performance win for -emit-llvm on a
typical C file, with 1% memory growth in the AST.

Note that there is an API change in this optimization:
QualType::getTypePtr() can no longer be invoked on a NULL
QualType. If the QualType might be NULL, use
QualType::getTypePtrOrNull(). I've audited all uses of getTypePtr() in
the code base and changed the appropriate uses over to
getTypePtrOrNull().

A future optimization opportunity would be to distinguish between
cast/dyn_cast and cast_or_null/dyn_cast_or_null; for the former, we
could use getTypePtr() rather than getTypePtrOrNull(), to take another
branch out of the cast/dyn_cast implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/Checker/PathSensitive/MemRegion.h
075f8f1b6bed4d1b224c74f87508534cc6392ce6 10-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added ParenType type node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Sema/DeclSpec.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
c3c0af36bac3d71f61dd758585ab307892545de4 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Silence GCC warning about comparisons between enumerators of different types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
49f4e1cbd839da27ff4814b4ea6d85a79f786cbd 10-Dec-2010 John McCall <rjmccall@apple.com> It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Checker/PathSensitive/MemRegion.h
55270e4bde91bd30d16086ae71f0f65caf3b8a51 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Update ExtQuals comment to reflect the expansion of the fast qualifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
34e80e94a21eb1ac2a9405d918e711e8b12256a9 10-Dec-2010 John McCall <rjmccall@apple.com> Optimize memory usage of FunctionProtoType on MSVC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f7616b9067790757f4e12e834b216c53c8c04ebe 10-Dec-2010 Douglas Gregor <dgregor@apple.com> Move the "volatile" bit into QualType's "fast" qualifier set,
increasing the required type alignment from 8 to 16. This provides a
2.5% speedup for -fsyntax-only on a token-cached Cocoa.h, while only
increasing memory consumption in the ASTContext by 0.8%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
90f1450c109fbbd333001165bbd986061f7c4513 10-Dec-2010 John McCall <rjmccall@apple.com> Treat visibility on an enclosing namespace as a non-explicit source of
visibility. Fixes PR8713.

I've disabled a test which was testing that you can #pragma pop visibility
to get out of a namespace's visibility attribute. We should probably just
diagnose that as an error unless it's instrumental to someone's system
headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
ad616eb3bc86fbeecae343cdd9b28fb3fd136fd0 10-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Added remaining objective-c library builtins (as in gcc) to
clang. // rdar://8735023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
c3dcdc1d5d2e9f33fd7f7209fe62e1e87193b3ac 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add Neon vreinterpret intrinsics for half-float (f16) types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
2427dbfa880a72fa3dcba700cf587fb5d8b3cf57 09-Dec-2010 Bob Wilson <bob.wilson@apple.com> Fix type of last vector operand of Neon quad-register multiple-lane intrinsics.
The sensible thing would be to have these intrinsics take all quad-register
vector operands, but that's not what ARM did. They made the last vector
operand always be a double-register type. Since the lane number
must be a constant, the user can know which half of a quad-register contains
that lane, extract the high or low half of the vector, and adjust the lane
number accordingly. The only advantage I can see for this is that it works
better when you want to multiply a quad-register value by a lane from a
double-register value, but I wouldn't have expected that to be the common
case. Oh well -- at this point we just need to follow the spec.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
c9ccad380f858c511756e2d8cd55058d8fc6fbcb 09-Dec-2010 Bob Wilson <bob.wilson@apple.com> Fix the names of the v[r]addhn and v[r]subhn Neon intrinsics.
Their suffixes are supposed to reflect the source operand element type,
not the destination element type. Radar 8746481.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
8f1509446fc51db0473ea1241910c06353a153b8 09-Dec-2010 Douglas Gregor <dgregor@apple.com> When an "inline" declaration was followed by a definition not marked
"inline", we weren't giving the definition weak linkage because the
"inline" bit wasn't propagated. This was a longstanding FIXME that,
somehow, hadn't triggered a bug in the wild. Fix this problem by
tracking whether any declaration was marked "inline", and clean up the
semantics of GNU's "extern inline" semantics calculation based on this
change.

Fixes <rdar://problem/8740363>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c66b516707a73b026cd34f3c0bfcaaf4409155c7 09-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add missing "s32" and "u32" variants of Neon vzip intrinsic.
Radar 8446277.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
327ce7064bed7e37ae9902ffbaf043463a914a82 09-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add missing "p16" type variants for the Neon VREV32 intrinsics.
Radar 8446277.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
d95450421ee3b7cebfb18ce1312310d6c703431c 09-Dec-2010 Douglas Gregor <dgregor@apple.com> A typename specifier can end up referring to a unresolved using
declaration that is a value in ill-formed code. Instead of crashing,
treat this as a dependent typename specifier and suggest that the
using add "typename" into the using declaration. Fixes <rdar://problem/8740998>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eca099bdb0178d408d4f717c2e9627e0d0e673c6 09-Dec-2010 Ted Kremenek <kremenek@apple.com> Add new libclang hooks for CXCursorSet, a
DenseMap-backed hashtable for doing client-side
management of CXCursors within a set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121318 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
db3d4d036037f379f12643e067b229862d61e932 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using builtins for the "_lane" variants of saturating multiply intrinsics.
Remove the "splat" parameter from the EmitNeonCall function, since it is no
longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
f187237d916afa97c491ac32fe98be7d335c5b63 08-Dec-2010 Francois Pichet <pichet2000@gmail.com> Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Basic/TypeTraits.h
lang/Frontend/StmtXML.def
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
259461d46a4f9505e1b609b0d4a25e1d54b39f79 08-Dec-2010 Douglas Gregor <dgregor@apple.com> Put the "'typename' occurs outside of a template" and "'template'
keyword occurs outside of a template" diagnostics under
-WC++0x-extensions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a4cc79994b2f12663143dc31ceaf198e703fb914 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vabdl and vabal intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
a8b988f6ec8e2355c7081b31578843be33027033 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vaba intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
c46233d7775469c25af186c386fedfa6982a69d1 08-Dec-2010 Douglas Gregor <dgregor@apple.com> Fix BinaryOperator dispatch for RecursiveASTVisitor, from Benoit Perrot!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
f203344728f604b7b95cbc093854d97da411dc6f 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vadd[lw] and vsub[lw] intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
4064127e722070967289d02f27ee6a6d42cdba63 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vmlal{_n,_lane} and vmlsl{_n,_lane}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
cf55652cf668c1402eee0b12edd2e5a1bc34d7a1 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using a clang builtin for Neon vdup_lane intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
c92b7721603484ddf337034c6f291d1b419a0528 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using a clang builtin for Neon vmull_lane intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
468acf9e29b8b9bcefd227d0a0e65356678b43cd 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Implement vmull and vmull_n intrinsics without using clang builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
954e0c75c42f321945aff8b9ee96da43cd90c752 07-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement AST import for Objective-C property implementations
(@synthesize and @dynamic).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
f5fe2925b87cf382f2f13983c81679e38067122b 07-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR8720 by printing an error message with a substring that the gcc testsuite searches for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9407444a159731b85b3d6d54f3a158d7341fc9f8 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add Neon vreinterpret intrinsics.
Radar 8681774.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
0d3f3ffe0b8567501c27ef6963d9335ecbc6e249 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Make whitespace more consistent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
6f18fca241bf060bccbea52e5e436e17562bc9b3 07-Dec-2010 John McCall <rjmccall@apple.com> Kill FullExpr, as it was not, in fact, used anywhere in the code base.
I'm not opposed to the idea in concept, but there's no point in preserving
abortive experiments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/FullExpr.h
lang/AST/Stmt.h
lang/Sema/Sema.h
7ee90d0d9ecd6010bb6c7ad252d04b32f07877d5 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Fix compile error: comma at end of enumerator list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TypeTraits.h
6ad6f2848d7652ab2991286eb48be440d3493b28 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Basic/TypeTraits.h
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
409fa9ab9579de04c5d68fb6a6a8d094545b1e77 06-Dec-2010 John McCall <rjmccall@apple.com> Split out a function to do lvalue conversion on objects; this is basically
FunctionArrayLvalueConversion but without the function/array decay. Generally
this is only appropriate for use sites that know the type of the expression
and thus that it can't be subject to the decays.

Also make sure we do lvalue-to-rvalue on the bases of ivar references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
381d34e0b205ca27bcc7e7c1652561941c437965 06-Dec-2010 Douglas Gregor <dgregor@apple.com> Re-implement caching for the linkage calculation of declarations.

My previous attempt at solving the compile-time problem with many
redeclarations of the same entity cached both linkage and visibility,
while this patch only tackles linkage. There are several reasons for
this difference:

- Linkage is a language concept, and is evaluated many times during
semantic analysis and codegen, while visibility is only a
code-generation concept that is evaluated only once per (unique)
declaration. Hence, we *must* optimize linkage calculations but
don't need to optimize visibility computation.
- Once we know the linkage of a declaration, subsequent
redeclarations can't change that linkage. Hence, cache
invalidation is far simpler than for visibility, where a later
redeclaration can completely change the visibility.
- We have 3 spare bits in Decl to store the linkage cache, so the
cache doesn't increase the size of declarations. With the
visibility+linkage cache, NamedDecl got larger.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Redeclarable.h
f0b0ccce127857e7e4fb829e017dbcb7487884c4 06-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the source location of the parameter, when it makes sense, for diagnostics in HandleCleanupAttr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AttributeList.h
b5f35bae05f1ce3ae62ca52b266a086fd019e89b 06-Dec-2010 Douglas Gregor <dgregor@apple.com> Revert r120808, my previous implementation of caching for the linkage
and visibility of declarations, because it was extremely messy and it
increased the size of NamedDecl.

An improved implementation is forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclTemplate.h
lang/AST/Redeclarable.h
894aed964fae942b62326881dc106801dabfd04c 06-Dec-2010 Chandler Carruth <chandlerc@gmail.com> Un-templatetize this method. It's definition is out of line in the .cpp file,
so that's not a valid thing to do at all. Instead, switch to a ValueDecl
argument, the template isn't really necessary here.

When handling the types explicitly in the code, it becomes awkward to cerate
the CXXBaseOrMemberInitializer object in so many places. Re-flow the code to
calculate the Init expression first, and then create the initializer. If this
is too gross, we can factor the init expression logic into helper functions,
but it's not past my threshold yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4765fa05b5652fcc4356371c2f481d0ea9a1b007 06-Dec-2010 John McCall <rjmccall@apple.com> Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
0074b48fb8ea5040de546c79be43916efe0c1f76 06-Dec-2010 Ted Kremenek <kremenek@apple.com> Mark SVal constructors 'explicit'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SVals.h
465846324f412055dd1ce270d757bfeead0811dc 06-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename Environment::LookupExpr() to
Environment::lookupExpr() and move its implementation
out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
d7365e103c3466792d05c046a8b1108178e41959 06-Dec-2010 Ted Kremenek <kremenek@apple.com> Remove unused method GRState::LookupExpr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
00eb3f9c5b33e3d99aee1f8b75dd9c9678fdd66b 04-Dec-2010 Francois Pichet <pichet2000@gmail.com> More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list:

struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};

clang will now deal with au_i1 explicitly as an IndirectFieldDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Initialization.h
lang/Sema/Sema.h
ec276bf91627058a61adc9ba9175dd10d4c1a5aa 04-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence "comparison between signed and unsigned integer expressions" warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
0e800c9c20d1a658a91096c756c4a4a9e90264fc 04-Dec-2010 John McCall <rjmccall@apple.com> Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn't
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f6a1648197562e0b133440d612d9af297d0a86cc 04-Dec-2010 John McCall <rjmccall@apple.com> Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.

In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.

This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.

Ted Kremenek kindly contributed the analyzer workarounds in this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/Sema/Sema.h
91252d115bdb6f937192a8dbc86c5abe00101436 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-std=

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
4400cb8c548a90c472444b57690117563f4be195 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-mad-enable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
f0840820b4e28fd0cc04d737382811d7372cb832 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-fast-relaxed-math

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
5f67e13fcdc3c33e9cd5d027bfbb677b726c6f6a 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-unsafe-math-optimizations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
5d729a3d8eeba59ed97119998f2135ad6d45e876 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-finite-math-only

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
0982136cb748f4a842141bf199d133126d6be882 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-single-precision-constant

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
61e07861dd3a70c31f658bad8c4b911994e4933b 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-opt-disable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
53c92be3b233cede6114702a5f86f146f55d6c6e 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Introduce CompilerInvocation::setLangDefaults function

This patch refactors the CompilerInvocation code to introduce a
CompilerInvocation::setLangDefaults function, which can set up a
LangOptions with the defaults for a given language and language
standard. This function is useful for non-command line based Clang
clients which need to set up a CompilerInvocation manually for a
specific language.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
640ccf071076e684713cc3c3276bb51982bff607 04-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Minor refactoring; have BugReport::getRanges return a pair of iterator, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
74b2756bc1f1f5f7c189996fe7e4cd3efef70263 04-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose when accessing property in a class method and
no property accessor class method to be found, instead of
crashing in IRGen. // rdar://8703553


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a88cefd266c428be33cc06f7e8b00ff8fc97c1ff 03-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added struct/class syntactic info for c++0x scoped enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Sema/Sema.h
4740dabd14c8660d641228d75ed91bf7e6753b77 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add missing vext_f32 and vextq_f32 Neon intrinsics (Radar 8592601).
For some reason these were not included in the list of Neon intrinsics in
ARM's documentation, so they didn't make it into Clang either.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
953d513c7ee79b3d9e37597e64317e75c0fbf7f6 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add support for vmul_p8 Neon intrinsic. Radar 8446141.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
2357207a5753547740c70a12c3b37f71afa93f8a 03-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement caching for the linkage and visibility calculations of
declarations.

The motivation for this patch is that linkage/visibility computations
are linear in the number of redeclarations of an entity, and we've run
into a case where a single translation unit has > 6500 redeclarations
of the same (unused!) external variable. Since each redeclaration
involves a linkage check, the resulting quadratic behavior makes Clang
slow to a crawl. With this change, a simple test with 512
redeclarations of a variable syntax-checks ~20x faster than
before.

That said, I hate this change, and will probably end up reverting it
in a few hours. Reasons to hate it:
- It makes NamedDecl larger, since we don't have enough free bits in
Decl to squeeze in the extra information about caching.
- There are way too many places where we need to invalidate this
cache, because the visibility of a declaration can change due to
redeclarations (!). Despite self-hosting and passing the testsuite,
I have no confidence that I've found all of places where this cache
needs to be invalidated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclTemplate.h
lang/AST/Redeclarable.h
96bfa6249fe65eaaaba795845c0f92f94d2b8a0d 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add a separate name field to the Neon intrinsic table.
This is currently the same as a lowercase version of the record name, but
it will allow us to have multiple records with the same name, which is
needed for intrinsics (e.g., vmul and vmull) that are implemented
differently depending on the type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
40406fe63df2b932d6e9fd021f77f097f9d33afb 03-Dec-2010 Ted Kremenek <kremenek@apple.com> Fix an insidious bug in BugReporter where
a node in the trimmed graph might not always
correctly map back to the original error node.
This could cause a crash in some cases when
flagging memory leaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
a427b49f99bd2416731de0d4f8bdec12b4807e7c 03-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Add a flag to control the "indirection of non-volatile null pointer will be
deleted, not trap" warning. Fixed PR8729. Patch by Elias Pipping!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
ebd4f52093b93fed57dcab6fa3a9033e3850ca4b 03-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce TextPathDiagnostics, a simple PathDiagnosticClient that outputs as diagnostic notes
the sequence of events; useful for testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathDiagnosticClients.h
lang/Frontend/Analyses.def
f928dca56542cf8f981a684f090d2c79bdcb2a10 03-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename Create[*]DiagnosticClient -> create[*]DiagnosticClient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathDiagnosticClients.h
lang/Frontend/Analyses.def
96c105c8c3f4a9f39fdd4f967226f14c8e3face8 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add support for "_lane" variants of VMUL, VMLA, and VMLS Neon intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
a9e9144f481111255c8a45731d3266ccd7660e95 02-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Improve on objc diagnostics. // rdar://8721692


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a44724d0d6d03568ec9acadc0781d612163008e1 02-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for MS asm statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
830937bc1100fba7682f7c32c40512085870f50c 02-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> IR Gen. part of API support for __block cxx
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fce5656f752199bb99a80fdff9184f9ddb470fc3 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Do not change the size of LookupResult::Filter based on the NDEBUG
macri; the extra bool fits into padding anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
6939fff69a3dfff2552261a1d7f1f609380fe6b0 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Remove NDEBUG-controlled extra data from
TemplateArgumentLocInfo. Unfortunately, this means that we lose some
internal consistency checking when building a debug Clang. However,
having data structures change size/layout depending on NDEBUG causes
pain for clients of the Clang API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
c8413fd03f73084a5c93028f8b4db619fc388087 02-Dec-2010 Ted Kremenek <kremenek@apple.com> Merge ValueManager into SValBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SValBuilder.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/ValueManager.h
a6cf1e709b96865210b81bd611d41e9a2d41500a 02-Dec-2010 Eric Christopher <echristo@apple.com> Add support for the common and nocommon attributes.

rdar://8560647


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
12f78a6741a4cb3d904340f8d3d2714568b50e7a 02-Dec-2010 John McCall <rjmccall@apple.com> Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Serialization/ASTBitCodes.h
3a1c36c099df4dcc94d1d24516a8a2c809c764d4 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Eliminate two uses of NDEBUG in headers that cause different symbols
to be available in debug vs. release builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
7e44e3fcd75147f229f42e6912898ce62d6b4d08 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Make TypeLocBuilder an implementation detail of Sema. Nobody else should be using it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLocBuilder.h
26ac3f30ecef21749c00a4b1a08dd15d772dd5aa 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Extend ExternalASTSource with the ability to lazily complete the
definition of an Objective-C class. Unlike with C/C++ classes, we
don't have a well-defined point in Sema where Objective-C classes are
checked for completeness, nor do we need to involve Sema when
completing a class. Therefore, we take the appropriate of having the
external AST source mark a particular Objective-C class as having an
external declaration; when using one of the accessors of an
Objective-C class that has an external declaration, we request that
the external AST source fill in the Objective-C class definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/ExternalASTSource.h
1ceee5c42d5c410217f67d384eecc6ea4a2bba9b 01-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Sema/AST work for capturing copy init expression
to be used in copy helper synthesis of __block
variables. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
28f47b92e760ccf641ac91cb0fe1c12d9ca89795 01-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename all 'AssumeXXX' methods in libChecker
to 'assumeXXX'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/GRState.h
9c14953d0c84f7cf5adfb4cd3c0f05a9b1723c1c 01-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename all 'EvalXXX' methods in libChecker to
'evalXXX'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/SValBuilder.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
846eabd187be4bfe992e8bca131166b734d86e0d 01-Dec-2010 Ted Kremenek <kremenek@apple.com> Rename 'SValuator' to 'SValBuilder'. The new name
reflects what the class actually does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/SValBuilder.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/ValueManager.h
7306ebfacfa51ba5270fd20f162f62d2ed813485 01-Dec-2010 Douglas Gregor <dgregor@apple.com> Not content to implement just "extern" explicit template
instantiations, GCC also supports "inline" and "static" explicit
template instantiations. Parse and warn about such constructs, but
don't implement the semantics of either "inline" or "static". They
don't seem to be widely used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
e343583370ba7465273645a300b9a829e3a95d82 01-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add some comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
08a53269b1f8241e2e6797e845abbe640fb18253 01-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Serialization: support for CUDA language extensions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
a61b3e7443056f8d05b24ca4cbea90fe66235d6b 01-Dec-2010 Douglas Gregor <dgregor@apple.com> After parsing a ':' in an enum-specifier within class context,
disambiguate between an expression (for a bit-field width) and a type
(for a fixed underlying type). Since the disambiguation can be
expensive (due to tentative parsing), we perform a simplistic
disambiguation based on one-token lookahead before going into the
full-blown tentative parsing. Based on a patch by Daniel Wallin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d11617f6e0622bbf843d6f8d60c441f844e46e9a 01-Dec-2010 Douglas Gregor <dgregor@apple.com> Improve the diagnostic when the fixed underlying type of a
redeclaration of an enum type differs from that of the original
declaration, from Daniel Wallin


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b7b2688bab0eac053d3e2938b329c8e523fd252b 01-Dec-2010 John McCall <rjmccall@apple.com> Eliminate vtables from the Type hierarchy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0ae287a498b8cec2086fe6b7e753cbb3df63e74a 01-Dec-2010 John McCall <rjmccall@apple.com> Restore the lvalue-to-rvalue conversion patch with a minimal fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
ced7671c18e115ac3c3f54abfaaafcc6d33edc4c 01-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Basic, Sema: add support for CUDA location attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
895fcca55a6d52a71639f2472a6623ab2dd9f628 01-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Driver, Frontend: add CUDA language support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
lang/Frontend/FrontendAction.h
lang/Frontend/LangStandards.def
e2dd6c8cca05494b27f2ad2a86dedf832ac4514f 01-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Basic: Add CUDA language option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
d5dc83a85c1b9aa32f8262126183df5d71c357ae 01-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement AST import support for class template specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
26e10bea3d2e9d2979194890e51b98ecea165a96 30-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Follow through references to catch returned stack addresses, local blocks, label addresses or references to temporaries, e.g:

const int& g2() {
int s1;
int &s2 = s1; // expected-note {{binding reference variable 's2' here}}
return s2; // expected-warning {{reference to stack memory associated with local variable 's1' returned}}
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
040afaeea2313dc69fd532995ac88cccdd62da56 30-Nov-2010 Douglas Gregor <dgregor@apple.com> Implement basic AST importing and merging support for class template
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
d7e40f02af203e44a46c95276b3e260bf20cf18f 30-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Add objc_getClass as an objc builtin function
(// rdar://8592641). Also rename LANGUAGEID to
LanguageID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
20fbe7c4772d537c1f779b1ff89cbb57d1d9afff 30-Nov-2010 John McCall <rjmccall@apple.com> L-value to r-value conversion is not ready for prime-time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
67aba816901503d9cf7ba699525fa62cc7f8e5e4 30-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Such function decls,as objc's objc_msgSend, builtins in
a specific language. We are adding such language info. by
extensing Builtins.def and via a language flag added
to LIBBUILTIN/BUILTIN and check for that when deciding
a name is builtin or not. Implements //rdar://8689273.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
7e4857931bfe27bb355275bc7ec1eaa44612dfff 30-Nov-2010 John McCall <rjmccall@apple.com> Introduce an r-value to l-value cast kind. I'm not promising anything
about the reliability of this yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
32b5fe77a6db48b0213901c4aaf55deb5ae5ce70 30-Nov-2010 Duncan Sands <baldrick@free.fr> System was renamed Support. Fix the build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTSerializationListener.h
bbc8175c39f85465475c9f96048d8107848e3e6f 30-Nov-2010 Douglas Gregor <dgregor@apple.com> Add missing file from last commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTSerializationListener.h
89d9980bbc2e4a4ac86673e6ec16fb9f5babb63b 30-Nov-2010 Douglas Gregor <dgregor@apple.com> When using a precompiled preamble with detailed preprocessing records,
trap the serialized preprocessing records (macro definitions, macro
instantiations, macro definitions) from the generation of the
precompiled preamble, then replay those when walking the list of
preprocessed entities. This eliminates a bug where clang_getCursor()
wasn't able to find preprocessed-entity cursors in the preamble.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Lex/PreprocessingRecord.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
414cb64f09ce48a36377458ce5e5a90c3ad41d00 30-Nov-2010 Douglas Gregor <dgregor@apple.com> When loading a precompiled preamble, use the file ID of the
precompiled preamble as the "main" source file's file ID within the
source manager. This makes compiling with a precompiled preamble
produce the same source locations as when compiling without the
precompiled preamble; prior to this change, we ended up with different
file IDs for source locations within the precompiled preamble
vs. those after the precompiled preamble, even for entities (e.g.,
preprocessing entities) in the same file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
d976ca4fcacdd965446bcfbe8cb03b4ee67cd827 30-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r120331 since it causes spurious warnings and a possible assertion hit when self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8b2f01b56209f4bb7331292225c5300753880044 29-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit warnings if we are returning a reference to a local temporary.
The issue was brought to our attention by Matthieu Monrocq.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
03013fa9a0bf1ef4b907f5fec006c8f4000fdd21 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
lang/AST/DeclGroup.h
lang/AST/RecordLayout.h
lang/AST/StmtIterator.h
lang/Analysis/ProgramPoint.h
lang/Basic/OnDiskHashTable.h
lang/Basic/PartialDiagnostic.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Driver/Driver.h
lang/Driver/ToolChain.h
lang/Frontend/ASTUnit.h
lang/Lex/LiteralSupport.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
e4fed47acee9e7ca9c9cfa77c3920eec4639d7d0 28-Nov-2010 Chris Lattner <sabre@nondot.org> tighten up operator= to ensure we don't get multiple owners with the same FD.
wouldn't move ctors be nice? :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
02fe28c8a6da29d4ad88d0900c133dcf22d24a75 26-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Rename CXXObjectRegion to CXXTempObjectRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
755f6bcfd7ee68b7d51589e9bb259ebbe60add72 26-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> fix a bug introduced in r120173.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
4fd56816e0925c04f2c92e75399f5c9018d5d6fb 26-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
f564289d3b117f2d268ca34e1e3b7d98857e1978 25-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> OpaquePtrs are POD-like.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Ownership.h
e1aeb13251a4858724d2b7ad1925d25076f23d08 25-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add dump method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
dae0cb52e4e3d46bbfc9a4510909522197a92e54 25-Nov-2010 Anders Carlsson <andersca@mac.com> Move isNearlyEmpty out into the ASTContext so it can be called from CodeGen as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
15441eb11e2f0e6dbaf9252ccfdf00dfe5d9e266 25-Nov-2010 Peter Collingbourne <peter@pcc.me.uk> Basic: add log2{,f,l}, round{,f,l} builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
2a5f99eb4e2af771faacfceb9f78e230129c5e5a 25-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Tie DefineVTablesUsed() in with recursive function instantiation so that we emit
a useful template instantiation stack. Fixes PR8640.

This also causes a slight change to where the "instantianted from" note shows up
in truly esoteric cases (see the change to test/SemaCXX/destructor.cpp), but
that isn't directly the fault of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0b9fb2f6b4845bfe5e25b576ae8f2ffa284f9cb1 25-Nov-2010 Anders Carlsson <andersca@mac.com> Remove the PrimaryBaseInfo class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
c9e814ba193f38a7b08268612248f63beb279bb3 25-Nov-2010 Anders Carlsson <andersca@mac.com> Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
46170f9c7d561d0f94af34a4b5da909d2584370a 24-Nov-2010 Anders Carlsson <andersca@mac.com> Add CXXRecordDecl::getIndirectPrimaryBases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/DeclCXX.h
32303020d0f1a21cbcab65ae0c69a4218dc8f0fb 24-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> When getting CXXThisRegion from CXXMethodDecl, use the qualifiers. This is
to be consistent with the type of 'this' expr in the method.
此行及以下内容将会被忽略--

M test/Analysis/method-call.cpp
M include/clang/Checker/PathSensitive/GRExprEngine.h
M lib/Checker/GRCXXExprEngine.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
d706434b0231c76fd9acf30060646a7aa8f69aef 24-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Let StackFrameContext represent if the call expr is evaluated as lvalue.
This is required for supporting const reference to temporary objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRExprEngine.h
f35142413974e9dfe2c5f202084db4bd1c2073e9 24-Nov-2010 John McCall <rjmccall@apple.com> Add -cc1 -ast-dump-xml, an excessively detailed XML dump of the internals
of the ASTs. Only available in assertions builds. No stability guarantee.

This is intended solely as a debugging tool. I'm not sure if the goals
are sufficiently aligned with the XML printer to allow a common
implementation.

Currently just falls back on the StmtDumper to display statements,
which means it doesn't produce valid XML in those cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
19b78d9e3dbbc27bbcbdd8c3017a00fe88849ecd 24-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 24-Nov-2010 John McCall <rjmccall@apple.com> Switch a lot of call-sites over to using the new value-kind calculations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
834f9de3d3d76986d09f41725a70ba45a3e2aecd 24-Nov-2010 Zhanyong Wan <wan@google.com> Improve comments in Clang static analyzer, based on kremenek's
explanation on how things work there. Reviewed by kremenek.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/Store.h
0d4739abf60372abdbafabd8ed59acc5d01729b5 24-Nov-2010 Francois Pichet <pichet2000@gmail.com> Fix 2 problems with Chris Lattner's FileManager redesign on Windows.

- FileEntry::operator= is needed on Win32.
- There was an error in the S_ISDIR() macro.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
3baf672378f105602d2b12f03f00277ae1936fe9 24-Nov-2010 Ted Kremenek <kremenek@apple.com> Adjust method calls to reflect name changes in
ImmutableSet/ImmtuableMap/ImmutableList APIs.

Along the way, clean up some method names in
the static analyzer so that they are more
descriptive and/or start with lowercase letters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRStateTrait.h
5cc1c738b0c51af55cbfe7672c284c19f8e30eb2 23-Nov-2010 Chris Lattner <sabre@nondot.org> The final result of all this refactoring: instead of doing stat immediately
followed by an open for every source file we open, probe the file system with
'open' and then do an fstat when it succeeds. open+fstat is faster than
stat+open because the kernel only has to perform the string->inode mapping
once. Presumably it gets faster the deeper in your filesystem a lookup
happens.

For -Eonly on cocoa.h, this reduces system time from 0.042s to 0.039s on
my machine, a 7.7% speedup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
898a061f69e1145bf89a987c08203132b9922a3c 23-Nov-2010 Chris Lattner <sabre@nondot.org> change the 'is directory' indicator to be a null-or-not
pointer that is passed down through the APIs, and make
FileSystemStatCache::get be the one that filters out
directory lookups that hit files. This also paves the
way to have stat queries be able to return opened files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Basic/FileSystemStatCache.h
f9f7766846a205bc900b578f944567e679b221aa 23-Nov-2010 Chris Lattner <sabre@nondot.org> pull "is directory" handling into FileManager::getStatValue
which simplifies clients and is important for future directions.
Add a FD member to FileEntry which isn't used but will be shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
dfa1edbebeda7ec3a7a9c45e4317de9241aa9883 23-Nov-2010 John McCall <rjmccall@apple.com> A few tweaks to the value-kind computation:
- Default argument expressions pick up the value kind of the incoming
expression, not the value kind of the parameter it initializes.
- When building a template argument for substitution, A::x is an rvalue
if x is an instance method.
- Anonymous struct/union paths pick up value kind the same way that
normal member accesses do; extract out a common code path for this.

Enable the value-kind assertion, now that it passes self-host.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d6f611198089b78e32d3a15fe8bc986204aee1aa 23-Nov-2010 Chris Lattner <sabre@nondot.org> simplify the cache miss handling code, eliminating CacheMissing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileSystemStatCache.h
11aa4b03b054cb9d3c201bba5632241145865e29 23-Nov-2010 Chris Lattner <sabre@nondot.org> factor the "cache miss" handling code out of FM into a static
method in FileSystemStatCache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileSystemStatCache.h
74e976ba4b0d407bb798ea26476f618e256fc8c7 23-Nov-2010 Chris Lattner <sabre@nondot.org> PCH files only cache successful stats. Remove the code that reads/writes
the result code of the stat to/from the PCH file since it is always 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileSystemStatCache.h
10e286aa8d39fb51a21412850265d9dae74613ee 23-Nov-2010 Chris Lattner <sabre@nondot.org> rework the stat cache, pulling it out of FileManager.h into
its own header and giving it some more structure. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Basic/FileSystemStatCache.h
lang/Lex/PTHManager.h
75dfb65c38d51772df9a00ce2d2feeefd55667ad 23-Nov-2010 Chris Lattner <sabre@nondot.org> tidy up. Split FileManager::getBufferForFile into
two copies, since they are fundamentally different
operations and the StringRef one should go away
(it shouldn't be part of FileManager at least).

Remove some dead arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/ASTUnit.h
681c74afe6a81161aa13291c6c114e5240b23865 23-Nov-2010 Chris Lattner <sabre@nondot.org> don't allow remapping PTH file paths with -fworking-directory, the
client should just pass in absolute paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
39b49bcaaddb1049234fca9500c0ac02c088e23d 23-Nov-2010 Chris Lattner <sabre@nondot.org> now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code.
This also fixes a latent bug in ASTUnit where it would invoke
methods on FileManager without creating one in some code paths
in cindextext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/FileManager.h
lang/Basic/SourceManager.h
lang/Frontend/CompilerInstance.h
lang/Frontend/Utils.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTReader.h
458b5e25052a1052eb873f9145298e0f0aa75cd1 23-Nov-2010 Chris Lattner <sabre@nondot.org> make this file be self contained.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileSystemOptions.h
7ad97ffa631af6ad678c79b38341ac995f347ce9 23-Nov-2010 Chris Lattner <sabre@nondot.org> give FileManager a 'FileSystemOptions' ivar, which will be used
to simplify a bunch of code in it. It should ultimately get inlined
into FileManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
cc7bd10c0de9449b795bda3c5dcc6d83cc48436b 23-Nov-2010 Zhanyong Wan <wan@google.com> Fix a typo in a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
151466a18671df9cfd9abd59ba53df35b1d687da 23-Nov-2010 Chris Lattner <sabre@nondot.org> Partially revert Doug's PCH validation patch (r98585).

This patch completely defeated the "passing in a prestat'd size
to MemoryBuffer" optimization, leading to an extra fstat call for
every buffer opened, in order to find out if the datestamp and size
of the file on disk matches what is in the stat cache.

I fully admit that I don't completely understand what is going on here:
why punish code when a stat cache isn't in use? what is the point of a
stat cache if you have to turn around and stat stuff to validate it?

To resolve both these issues, just drop the modtime check and check the
file size, which is the important thing anyway. This should also resolve
PR6812, because presumably windows is stable when it comes to file sizes.
If the modtime is actually important, we should get it and keep it on the
first stat.

This eliminates 833 fstat syscalls when processing Cocoa.h, speeding up
system time on -Eonly Cocoa.h from 0.041 to 0.038s.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/ASTUnit.h
8e161ed8e63bd9d3783a987d837b72b2b96c4512 23-Nov-2010 Francois Pichet <pichet2000@gmail.com> Microsoft C anonymous struct implementation.
Documentation: http://msdn.microsoft.com/en-us/library/z2cx9y4f.aspx

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
67452f51aec1ad8a3e4c6622c0c57c5d8dc1b6a3 23-Nov-2010 Chris Lattner <sabre@nondot.org> stringref'ize API


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
d98114647e16796a976b04af79975b4f0eacf22b 21-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix a bunch of IndirectFieldDecl-related warnings.

- Negative ChainingSize doesn't make sense, make it unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6538227d51df249b07c8ab80ae376f5c1d14403c 21-Nov-2010 Chris Lattner <sabre@nondot.org> remove old compatibility APIs, use StringRef versions instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
f69a1f319bd3c846c4a9ab84ea615e4e37dfd359 21-Nov-2010 Chris Lattner <sabre@nondot.org> change the various getFile routines to use StringRef as their implementation form.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
d18857d1ae40a661f5b92d7a7a46ba81e94d4a35 21-Nov-2010 Francois Pichet <pichet2000@gmail.com> Compilation error: remove extra comma.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
87c2e121cf0522fc266efe2922b58091cd2e0182 21-Nov-2010 Francois Pichet <pichet2000@gmail.com> Major anonymous union/struct redesign.
A new AST node is introduced:
def IndirectField : DDecl<Value>;
IndirectFields are injected into the anonymous's parent scope and chain back to
the original field. Name lookup for anonymous entities now result in an
IndirectFieldDecl instead of a FieldDecl.
There is no functionality change, the code generated should be the same.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DeclNodes.td
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Serialization/ASTBitCodes.h
a4c2475961184a4bad6f6f087eeb1038bb784cad 21-Nov-2010 Anders Carlsson <andersca@mac.com> Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b13453bd8a91f331d0910ca95ad52aa41b52f648 20-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Handle CFGAutomaticObjDtor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
44aa1f397855f130e88e62ffc1029f7f83bb5d2e 20-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r119838 "Don't warn for empty 'if' body if there is a macro that expands to nothing"
and use a better and more general approach, where NullStmt has a flag to indicate whether it was preceded by an empty macro.

Thanks to Abramo Bagnara for the hint!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Parse/Parser.h
lang/Sema/Sema.h
7663f396651716c82280f8fdcf97ad8e27c1ce5a 20-Nov-2010 Nick Lewycky <nicholas@mxc.ca> A bundle of whitespace changes, separated out from the functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
9ce5584553054d0cb934940586aca0186e87fa57 20-Nov-2010 Douglas Gregor <dgregor@apple.com> Implement a simple hash function for libclang cursors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119876 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1a9d0503b67a499797141af0fd6d315d5045f0ea 20-Nov-2010 Douglas Gregor <dgregor@apple.com> Implement clang_getCanonicalCursor() in libclang, which does the obvious thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119874 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2aa9267cf193e5eceb9fd24a51b51c031b606fe9 19-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Several PPCallbacks take an SourceLocation + IdentifierInfo, rather
than a Token that holds the same information all in one easy-to-use
package. There's no technical reason to prefer the former -- the
information comes from a Token originally -- and it's clumsier to use,
so I've changed the code to use tokens everywhere.

Approved by clattner


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
a25b6a4b43e8b9611f7506e5fe1b448833b10a46 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for empty 'if' body if there is a macro that expands to nothing, e.g:

if (condition)
CALL(0); // empty macro but don't warn for empty body.

Fixes rdar://8436021.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Sema.h
46f936e055d763437accd1e5a1bc49e7e5dbc0a3 19-Nov-2010 Douglas Gregor <dgregor@apple.com> When parsing something that looks like an ill-formed
protocol-qualifier list without a leading type (e.g., <#blah#>), don't
complain about it being an archaic protocol-qualifier list unless it
actually parses as one.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
aa5f135f8db82b5e5fb1640fd51f8078e0b2d82d 19-Nov-2010 Douglas Gregor <dgregor@apple.com> Extend the libclang diagnostic API to provide information about the
option name, category ID, and category name corresponding to a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119802 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Diagnostic.h
3ffe6293123b8fe59bd9d6ed8e3ec755d68e7fac 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove Diagnostic's get/setNumErrors() and getNumErrorsSuppressed().

Anyone wanting to use it should probably use DiagnosticClient's getNumErrors() instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
8fc32d272bd57b0a59f61c874cb7b56d9005e89e 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring. Get FunctionScopeInfo to use DiagnosticErrorTrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ScopeInfo.h
9c4eb1f3438370355f51dc8c62f2ca4803e3338d 19-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring.
Move ErrorTrap from clang/Sema to clang/Basic as DiagnosticErrorTrap and use it in Scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Sema/Scope.h
lang/Sema/Sema.h
bce8d4b0abc22c59d8a5d1537df22b0d13f25db8 18-Nov-2010 Bob Wilson <bob.wilson@apple.com> Use a signed vector type for the shift amount operand of unsigned shifts.
Neon shifts allow a mix of positive and negative shift amounts to shift
left or right, respectively, so the shift amount vector should always be
signed. PR8482 (Radar 8603521).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
ab41b97c3cddf1bcdd8bf82ab09ed3ceafcd05b1 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the hack where, to get the return status, we had special case for VerifyDiagnosticsClient
and just check the number of errors from the DiagnosticClient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/VerifyDiagnosticsClient.h
f2224d89a6ae65a3839529e26d0f6d025d83d6bb 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Since multiple diagnostics can share one diagnostic client, have the client keeping track
of the total number of warnings/errors reported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring of Diagnostic class.

-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticIDs.h
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
lang/Rewrite/FixItRewriter.h
9313aac61d425f14fa0b82c3dfe1eb2c3626d38c 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Copy the LangOptions in PrintingPolicy to avoid pointing to a LangOptions that is long gone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
0943168ac126b8047f30f6bd215fbe7db14d61ba 18-Nov-2010 John McCall <rjmccall@apple.com> Add an assertion, fix a whole bunch of bugs, comment the assertion
out because there are still bugs left.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Sema/Sema.h
45ab4b5f8961dadcef6545ed6956da5daf95c6cb 18-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> In some situations, TemplateArgumentLoc wasn't setting TypeSourceLoc (see
http://llvm.org/bugs/show_bug.cgi?id=8558). This patch fixes it. Thanks to
rjmccall for all the coaching!

Approved by rjmccall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Sema/Sema.h
f89e55ab1bfb3ea997f8b02997c611a02254eb2d 18-Nov-2010 John McCall <rjmccall@apple.com> Calculate the value kind of an expression when it's created and
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.

Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Stmt.h
lang/Basic/Specifiers.h
lang/Sema/Sema.h
6a02b609c2e23b28d24f9db4c8006137c6b55ae4 18-Nov-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added method for handling CXXOperatorCallExpr differently from CallExpr if CXXOperatorCallExpr represents method call.
Also fixed returning ExpolodedNodeSet from VisitCXXMethodCallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
cdba6595a61a7bd31f504260abf63c900a759d0f 18-Nov-2010 Ted Kremenek <kremenek@apple.com> CursorVisitor: switch remaining expressions over
to the data-recursion algorithm. CursorVisitor
now no longer subclasses StmtVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1380a147d4578b619c215b23aa79ce17036d3c46 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Rename -Wargument-larger-than -> -Wlarge-by-value-copy
-Improve the diagnostic message
-Add some comments

Suggestions by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Sema/Sema.h
0a90d32523bfe5fa63e11b648686c9699f786d15 18-Nov-2010 Ted Kremenek <kremenek@apple.com> Make definition of CXTranslationUnitImpl private
to libclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119585 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3532fdd1db8ff6f353f2a5b215cebe3e0e2ff3c2 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value
or return by-value any POD that is larger than some threshold (default is 64 bytes).

Implements rdar://8548050.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Sema/Sema.h
fdda17179047ff0b5e28cc777dc89ebc42f083cf 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement -pie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
82c63bfa0c5130e0cf274c1974b6157ebefc04fe 17-Nov-2010 Marcin Swiderski <marcin.sfider@gmail.com> In EvalArguments allow for evaluation of first argument always as a lvalue. Will be used for CXXOperatorCallExpr that represents method call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
de2676076ba218b5c09a88ac26dd86cc97a9d02e 17-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Warn if direct accessing synthesized ivar backing the property in
nonofragile-abi2. Fixes //rdar://8673791



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
75fd3f98d1b10fbd5bb996e08873e7c6995ce2f0 17-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Put warn_logical_and_in_logical_or warning in new warning group "logical-op-parentheses" member of "parentheses".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
4ffcb9974c6b7142c4a1483abfcb1f88b6371c45 17-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add skeleton for handling various cfg dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
08f92e3a5dead1f1ee656678a7f06e43279d6e50 17-Nov-2010 Chris Lattner <sabre@nondot.org> a metric ton of refactoring later, Sema::getLocationOfStringLiteralByte
no longer depends on Preprocessor, so we can move it out of Sema into
a nice new StringLiteral::getLocationOfByte method that can be used by
any AST client.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b0607279cb98bbf2bbfe0db170aed39ef91e86a2 17-Nov-2010 Chris Lattner <sabre@nondot.org> move getSpelling from Preprocessor to Lexer, which it is more conceptually related to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
0833dd0675c25cbb35671c7a2006d511d5c77ce3 17-Nov-2010 Chris Lattner <sabre@nondot.org> propagate preprocessor out of StringLiteralParser. It is now
possible to create one without a preprocessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
a95880d6513c617bb96634bcc1f16c6bdb80dedc 17-Nov-2010 Chris Lattner <sabre@nondot.org> push the preprocessor out of EncodeUCNEscape



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
7ef5c27eb6e8ebe58b52013246c06753c3613263 17-Nov-2010 Chris Lattner <sabre@nondot.org> move AdvanceToTokenCharacter and getLocForEndOfToken from
Preprocessor to Lexer where they make more sense.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
872a45e91778eb0b706ff57272fe547d4512eb19 17-Nov-2010 Chris Lattner <sabre@nondot.org> add a static version of PP::AdvanceToTokenCharacter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
6c66f07854c1334a1ce9eae1428d61d54182a6e1 17-Nov-2010 Chris Lattner <sabre@nondot.org> push use of Preprocessor out farther.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
ca1475ea0e76da6b852796610139ed9b49c8d4a6 17-Nov-2010 Chris Lattner <sabre@nondot.org> push use of Preprocessor out of getOffsetOfStringByte


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
48cf9824fbad42995f4d91d59d08d2620effd683 17-Nov-2010 Chris Lattner <sabre@nondot.org> add a static form of the efficient PP::getSpelling method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
91f54ce93bec136fb9e18740b895cf1c1339524b 17-Nov-2010 Chris Lattner <sabre@nondot.org> refactor the interface to StringLiteralParser::getOffsetOfStringByte,
pushing the dependency on the preprocessor out a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
a4ffd85a6684e42f900aad5459e58ad91bb88755 17-Nov-2010 Douglas Gregor <dgregor@apple.com> For an Objective-C @synthesize statement, e.g.,

@synthesize foo = _foo;

keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Sema/Sema.h
e3c60a7ce9e0f42c7ca2344b33203266aceca1db 17-Nov-2010 Douglas Gregor <dgregor@apple.com> Fix source-range information for Objective-C properties. Previously,
we were just getting a range covering only the property name, which is
certainly not correct (and broke token annotation, among other
things).

Also, teach libclang about the relationship between
@synthesize/@dynamic and @property, so we get property name and
cursor-reference information for @synthesize and @dynamic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
34c26300b384286c544e0b9fd45e7a3648ac79e3 17-Nov-2010 Dan Gohman <gohman@apple.com> Front-end support for __attribute__((may_alias)). This is not
yet hooked up to anything yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
bee77f75358a5aaf2e2e01ab9cfd37ffc514ed7a 16-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Warn about arg1 && arg2 || arg3, as GCC 4.3+ does. Fixes rdar://8659922

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e19df1839992d54d37624e617f410ac7dda87f07 16-Nov-2010 Anton Yartsev <anton.yartsev@gmail.com> turned pointers into pointers to const in function parameters in all functions/builtins accepting pointers to a const-qualified type according to PIM and "Language Extensions for CBEA"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsPPC.def
4383e18fc3d79fd536c6992432e180a11bcb657d 16-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit a specific diagnostic when typedefing C++ bool, mirroring gcc.
Fixes rdar://8365458

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
b756fdb0a7d17bff4a8bc1a7c18ecec343b70046 16-Nov-2010 Chandler Carruth <chandlerc@gmail.com> Re-work the handling of implicit 'this' arguments and silly GCC-style attribute
argument indexes. This handles the offsets in a consistent manner for all of
the attributes which I saw working with these concepts. I've also added tests
for the attribute that motivated this: nonnull.

I consolidated the tests for format attributes into one file, and fleshed them
out a bit to trigger more of the warning cases. Also improved the quality of
some of the diagnostics that occur with invalid argument indices.

The only really questionable change here is supporting the implicit this
argument for the ownership attribute. I'm not sure it's really a sensible
concept there, but implemented the logic for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
07d7e7a6b10f798459f350b792713db2fb3e9365 16-Nov-2010 Chandler Carruth <chandlerc@gmail.com> Re-work the handling of implicit 'this' arguments and silly GCC-style attribute
argument indexes. This handles the offsets in a consistent manner for all of
the attributes which I saw working with these concepts. I've also added tests
for the attribute that motivated this: nonnull.

I consolidated the tests for format attributes into one file, and fleshed them
out a bit to trigger more of the warning cases. Also improved the quality of
some of the diagnostics that occur with invalid argument indices.

The only really questionable change here is supporting the implicit this
argument for the ownership attribute. I'm not sure it's really a sensible
concept there, but implemented the logic for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5a7f9df08414423de6a859b989ceb3026907ccbe 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Change CXTranslationUnit to not directly cast to an ASTUnit*,
but to wrap both an ASTUnit and a "string pool"
that will be used for fast USR generation.

This requires a bunch of mechanical changes, as
there was a ton of code that assumed that CXTranslationUnit
and ASTUnit* were the same.

Along with this change, introduce CXStringBuf,
which provides an llvm::SmallVector<char> backing
for repeatedly generating CXStrings without a huge
amount of malloc() traffic. This requires making
some changes to the representation of CXString
by renaming a few fields (but keeping the size
of the object the same).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119337 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a60ed47da13393796d8552b9fdca12abbb3eea42 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Change CXTranslationUnit to not directly cast to an ASTUnit*,
but to wrap both an ASTUnit and a "string pool"
that will be used for fast USR generation.

This requires a bunch of mechanical changes, as
there was a ton of code that assumed that CXTranslationUnit
and ASTUnit* were the same.

Along with this change, introduce CXStringBuf,
which provides an llvm::SmallVector<char> backing
for repeatedly generating CXStrings without a huge
amount of malloc() traffic. This requires making
some changes to the representation of CXString
by renaming a few fields (but keeping the size
of the object the same).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119337 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
87f3cbf94b22286fcfdf0df502e9174d5fa781e3 16-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Improve diagnostic for calling non-const method on const object. Fixes rdar://7743000

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
64ccf2480609f4b5c27b31f6beaa157e6ec4f065 16-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve diagnostic for calling non-const method on const object. Fixes rdar://7743000

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b7afb38c3b7aa5700f76817994066aaa379c2731 16-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Handle member initializer in C++ ctor.
- Add a new Kind of ProgramPoint: PostInitializer.
- Still use GRStmtNodeBuilder. But special handling PostInitializer in
GRStmtNodeBuilder::GenerateAutoTransition().
- Someday we should clean up the interface of GRStmtNodeBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
9dc84c9455df2a77195147d0210c915dc1775a88 16-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Handle member initializer in C++ ctor.
- Add a new Kind of ProgramPoint: PostInitializer.
- Still use GRStmtNodeBuilder. But special handling PostInitializer in
GRStmtNodeBuilder::GenerateAutoTransition().
- Someday we should clean up the interface of GRStmtNodeBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
ee970edb9d20980454c749019f46ef9573e26c5c 16-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Have CXXDeleteExpr::getDestroyedType return the actual destroyed type
in more situations. In particular, for code like

template<class T> void Fn() { T* x; delete x; }

getDestroyedType() will now return T rather than T*, as it would
before this change. On the other hand, for code like this:

template<class T> void Fn() { T x; delete x; }

getDestroyedType() will return an empty QualType(), since it doesn't
know what the actual destroyed type would be. Previously, it would
return T.

OKed by rjmccall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a437ad3ec5b407ede394d74e6f9f463fa3657dbe 16-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Have CXXDeleteExpr::getDestroyedType return the actual destroyed type
in more situations. In particular, for code like

template<class T> void Fn() { T* x; delete x; }

getDestroyedType() will now return T rather than T*, as it would
before this change. On the other hand, for code like this:

template<class T> void Fn() { T x; delete x; }

getDestroyedType() will return an empty QualType(), since it doesn't
know what the actual destroyed type would be. Previously, it would
return T.

OKed by rjmccall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a4ffbd8c8f55681d39dd2be1efa60b9870f6ae34 16-Nov-2010 John McCall <rjmccall@apple.com> Kill CK_Unknown and flesh out the documentation for the existing CastKinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
e2b768877b77fa4e00171ee6e6443722e0f3d111 16-Nov-2010 John McCall <rjmccall@apple.com> Kill CK_Unknown and flesh out the documentation for the existing CastKinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
24ad73d3f087b316dffa4f2076bd4910b057b99d 16-Nov-2010 John McCall <rjmccall@apple.com> Kill off the remaining places which generate CK_Unknown casts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1c23e91ef66688d20868b6bab3b5589a119eb603 16-Nov-2010 John McCall <rjmccall@apple.com> Kill off the remaining places which generate CK_Unknown casts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
03123e74dc63ba611b4bdb3c6ef991025a8ccd2f 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Move CXString creation/management routines into
their own .cpp file and make the interpretation
of its flags private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119319 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ed122735639d83c10f18c28c7fd117bfcd0f62cb 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Move CXString creation/management routines into
their own .cpp file and make the interpretation
of its flags private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119319 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5599487add6698c95a8d9b53531045805c3c26b6 16-Nov-2010 John McCall <rjmccall@apple.com> Add an ExternalASTSource hook to complete a type on demand.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
916c870442978db40404d51348cdf5524e506faa 16-Nov-2010 John McCall <rjmccall@apple.com> Add an ExternalASTSource hook to complete a type on demand.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
597073dafeab044fd295ea021d341b5f31357c2b 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add support for "neon_vector_type" and "neon_polyvector_type" attributes
to create the special Neon vector types. These are intended to be used in
Clang's version of <arm_neon.h> to define special Neon vector types that will
be mangled according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
4211bb68cff1f310be280f66a59520548ef99d8f 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add support for "neon_vector_type" and "neon_polyvector_type" attributes
to create the special Neon vector types. These are intended to be used in
Clang's version of <arm_neon.h> to define special Neon vector types that will
be mangled according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/AttributeList.h
f8d6c4b289bdf14d7206e8394f9ca1ef589804b0 16-Nov-2010 John McCall <rjmccall@apple.com> Add another case to the whitelist of cast kinds that can convert to bool.
Fixes PR8608.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5082d34e4107a44ac7f07b62f7a6c917e0e6e71e 16-Nov-2010 John McCall <rjmccall@apple.com> Add another case to the whitelist of cast kinds that can convert to bool.
Fixes PR8608.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1ebdd533402ce4e115e3a588754032ced20855a3 16-Nov-2010 John McCall <rjmccall@apple.com> Add a new expression kind, OpaqueValueExpr, which is useful for
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations. Uses to follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Serialization/ASTBitCodes.h
7cd7d1ad33fdf49eef83942e8855fe20d95aa1b9 16-Nov-2010 John McCall <rjmccall@apple.com> Add a new expression kind, OpaqueValueExpr, which is useful for
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations. Uses to follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Serialization/ASTBitCodes.h
92e8526fdbca4eeecc924f7ce667d00551098f9e 15-Nov-2010 Ted Kremenek <kremenek@apple.com> Add method ParentMap::addStmt().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
d6543f8bbac18cdb678a67da2a676c30c2941eca 15-Nov-2010 Ted Kremenek <kremenek@apple.com> Add method ParentMap::addStmt().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
6b4052d120c3ef414a822b3cff063432a1df3186 15-Nov-2010 John McCall <rjmccall@apple.com> Assorted work leading towards the elimination of CK_Unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/AST/Type.h
lang/Sema/Sema.h
daa8e4e888758d55a7a759dd4a91b83921cef222 15-Nov-2010 John McCall <rjmccall@apple.com> Assorted work leading towards the elimination of CK_Unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/AST/Type.h
lang/Sema/Sema.h
e5a28f467bb8d1a92e7368419be21c2f464b8a7b 15-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add skeleton for handling other kinds of CFGElements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
9c6cd67ea416bace666d614c84d5531124287653 15-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add skeleton for handling other kinds of CFGElements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
121b18599331ac542a936764a9966343475afb82 14-Nov-2010 Ted Kremenek <kremenek@apple.com> Revert r119045. It was failing on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
1b27ab31526b91b165f153a8ca3928c59e1b13c9 14-Nov-2010 Ted Kremenek <kremenek@apple.com> Revert r119045. It was failing on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
0aa218740d54e8e65c06558a09066c97290ecd19 14-Nov-2010 Ted Kremenek <kremenek@apple.com> Clean up initialization of LangOptions object by splitting part of it into a parent class
'LangOptionsBase' that default initializes all flags to 0. Now the ctor of LangOptions
only initializes the flags that might be non-zero (significantly simplifying things).

This also appeases Valgrind on Mac OS X, which no longer reports that one of the flags
may be uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
b9ce6567580e950898b8c2834468178e30805a73 14-Nov-2010 Ted Kremenek <kremenek@apple.com> Clean up initialization of LangOptions object by splitting part of it into a parent class
'LangOptionsBase' that default initializes all flags to 0. Now the ctor of LangOptions
only initializes the flags that might be non-zero (significantly simplifying things).

This also appeases Valgrind on Mac OS X, which no longer reports that one of the flags
may be uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
c948dee3af99fe58d4f94a6727b2a7c9f98434fc 14-Nov-2010 John McCall <rjmccall@apple.com> Add a few more complex-related cast kinds that arise due to arbitrary
implicit conversions; the last batch was specific to promotions.
I think this is the full set we need. I do think dividing the cast
kinds into floating and integral is probably a good idea.

Annotate a *lot* more C casts with useful cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
f3ea8cfe6b1c2ef0702efe130561e9e66708d799 14-Nov-2010 John McCall <rjmccall@apple.com> Add a few more complex-related cast kinds that arise due to arbitrary
implicit conversions; the last batch was specific to promotions.
I think this is the full set we need. I do think dividing the cast
kinds into floating and integral is probably a good idea.

Annotate a *lot* more C casts with useful cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
9be0a77e91cbfa4ef6af18680fb81fe9574adab3 13-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> When complaining about ambiguous overload resolution for a unary or
binary operator, provide the types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ae2cf767de457df939d07c44b162de5fe0b5e607 13-Nov-2010 Douglas Gregor <dgregor@apple.com> When complaining about ambiguous overload resolution for a unary or
binary operator, provide the types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0bf22e6c0c3413f491ea179db51a45bcf2381391 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce five new cast kinds for various conversions into and
between complex types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/AST/Stmt.h
2bb5d00fcf71a7b4d478d478be778fff0494aff6 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce five new cast kinds for various conversions into and
between complex types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/AST/Stmt.h
0e4ca01531c7c2a854c10e8dc47b857125513f67 13-Nov-2010 John McCall <rjmccall@apple.com> Bring UsualArithmeticConversionsType back into Sema and cast the
operands appropriately. There are a lot of missing complex-related
cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
cf33b24441798f538fb5ab089edbba2ac3ba819c 13-Nov-2010 John McCall <rjmccall@apple.com> Bring UsualArithmeticConversionsType back into Sema and cast the
operands appropriately. There are a lot of missing complex-related
cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
001e040b55064721c4decd8d7e1be3b566b2693d 13-Nov-2010 Ted Kremenek <kremenek@apple.com> Add GRWorkList::VisitItemsInWorkList() to allow a client to introspect the contents of a worklist.
This API required changing the BFS worklist to use a deque instead of a queue, but that is better
for performance reasons anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRWorkList.h
3e47b486f200d2b4cfb069c6f0d20fe5cf189fcd 13-Nov-2010 Ted Kremenek <kremenek@apple.com> Add GRWorkList::VisitItemsInWorkList() to allow a client to introspect the contents of a worklist.
This API required changing the BFS worklist to use a deque instead of a queue, but that is better
for performance reasons anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRWorkList.h
4f6199189cdc8acb40d76c24122f57672485baec 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce a null-to-pointer implicit cast kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
404cd1669c3ba138a9ae0a619bd689cce5aae271 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce a null-to-pointer implicit cast kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
2fea9955b4496cdcc4356b103236f7b93a261f70 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Generalize ASTContext::areCompatibleVectorTypes to handle new Neon vector types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f69eb7cf8e616b5aad7911ec6f79b24b0a009227 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Generalize ASTContext::areCompatibleVectorTypes to handle new Neon vector types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
87fa7564c1e8b7894c1a9f646cb1294c8c2a7f9d 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Increase VectorTypeBitfields::VecKind field from 2 to 3 bits.
With the addition of 2 enum values for Neon vectors, this field must now
hold 6 different values and so requires 3 bits. Make the NumElements field
one bit smaller to compensate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
cc3b946c35c4372272034e6f0663089477a9a5bd 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Increase VectorTypeBitfields::VecKind field from 2 to 3 bits.
With the addition of 2 enum values for Neon vectors, this field must now
hold 6 different values and so requires 3 bits. Make the NumElements field
one bit smaller to compensate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1ab6481f698c0995cb294ac1a29d21bfb970c41c 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a separate NeonPolyVector kind to distinguish polynomial vector types.
Add support for mangling those types according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
491328c90c00ecad6ad27fa0ab3cdf9195a4a820 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a separate NeonPolyVector kind to distinguish polynomial vector types.
Add support for mangling those types according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b0390a66dec06795d64924b4410753cc97ce0659 12-Nov-2010 John McCall <rjmccall@apple.com> API enhancements to TypeLocBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLocBuilder.h
41bafb1b62dfb2577c5aa7ba7fbd6ba5bebdbfee 12-Nov-2010 John McCall <rjmccall@apple.com> API enhancements to TypeLocBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLocBuilder.h
70eddbfa09174de7d44b6a5cf7ecd55c4b97bee0 12-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Make sure to always check the result of
SourceManager::getPresumedLoc(), so that we don't try to make use of
an invalid presumed location. Doing so can cause crashes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
cb7b1e17b63967317ab5cc55682168cf0380519a 12-Nov-2010 Douglas Gregor <dgregor@apple.com> Make sure to always check the result of
SourceManager::getPresumedLoc(), so that we don't try to make use of
an invalid presumed location. Doing so can cause crashes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
1aec9552fd13c5a289c41e217e849e29ed2e56b5 12-Nov-2010 Ted Kremenek <kremenek@apple.com> Fix use of an uninitialized SourceLocation because DeclarationNameLoc failed to completely zero-initialize itself.
Now we explicitly memset all of its values.

This bug was uncovered by the 'Index/recursive-cxx-member-calls.cpp', which exhibited an assertion
on an i386 darwin build of clang. Adding this test case back since the assertion is now resolved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
8f0889ce457db51d3af1eb1245bceee272d4dc7d 12-Nov-2010 Ted Kremenek <kremenek@apple.com> Fix use of an uninitialized SourceLocation because DeclarationNameLoc failed to completely zero-initialize itself.
Now we explicitly memset all of its values.

This bug was uncovered by the 'Index/recursive-cxx-member-calls.cpp', which exhibited an assertion
on an i386 darwin build of clang. Adding this test case back since the assertion is now resolved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
8afa31096d44da0b862406fbcf6e9ef10fce5c2c 11-Nov-2010 Francois Pichet <pichet2000@gmail.com> Remove some unnecessary reinterpret_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
606f65665421d594458e1409b4413005fb521c25 11-Nov-2010 Francois Pichet <pichet2000@gmail.com> Remove some unnecessary reinterpret_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
cf9507fcdc135c2be831d9e6e8a8bb051af763a2 11-Nov-2010 John McCall <rjmccall@apple.com> Extend the bitfield-truncation warning to initializations.
rdar://problem/8652606



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
15d7d12226f83de24f96f4bf4e27ebba30fef51e 11-Nov-2010 John McCall <rjmccall@apple.com> Extend the bitfield-truncation warning to initializations.
rdar://problem/8652606



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
8b9e7cba1096fe0c447828dd55688e824b3a80ac 11-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Improve ASTUnit's capture of diagnostics so that the
diagnostic-capturing client lives as long as the ASTUnit itself
does. Otherwise, we can end up with crashes when we get a diagnostic
outside of parsing/code completion. The circumstances under which this
happen are really hard to reproduce, because a file needs to change
from under us.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
e47be3e9682e82da15059006f43c7f3c021e4fff 11-Nov-2010 Douglas Gregor <dgregor@apple.com> Improve ASTUnit's capture of diagnostics so that the
diagnostic-capturing client lives as long as the ASTUnit itself
does. Otherwise, we can end up with crashes when we get a diagnostic
outside of parsing/code completion. The circumstances under which this
happen are really hard to reproduce, because a file needs to change
from under us.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
b3e547db227afec80fd921b4dbff66bd91da992f 10-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a variant of GCC-style vector types for ARM NEON.
NEON vector types need to be mangled in a special way to comply with ARM's ABI,
similar to some of the AltiVec-specific vector types. This patch is mostly
just renaming a bunch of "AltiVecSpecific" things, since they will no longer
be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
e86d78cf4754a6aef2cf9a33d847aa15338e276f 10-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a variant of GCC-style vector types for ARM NEON.
NEON vector types need to be mangled in a special way to comply with ARM's ABI,
similar to some of the AltiVec-specific vector types. This patch is mostly
just renaming a bunch of "AltiVecSpecific" things, since they will no longer
be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
5e2891651c53c2a313b7d6f6321c405ed5a7d1e3 10-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Instantiate class member template partial specialization declarations
in the order they occur within the class template, delaying
out-of-line member template partial specializations until after the
class has been fully instantiated. This fixes a regression introduced
by r118454 (itself a fix for PR8001).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Template.h
d65587f7a6d38965fa37158d3f57990a7faf3836 10-Nov-2010 Douglas Gregor <dgregor@apple.com> Instantiate class member template partial specialization declarations
in the order they occur within the class template, delaying
out-of-line member template partial specializations until after the
class has been fully instantiated. This fixes a regression introduced
by r118454 (itself a fix for PR8001).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Template.h
34dd352b2835602dafce70491f02c66a40fefb06 10-Nov-2010 Ted Kremenek <kremenek@apple.com> Region-allocate all AttributeList objects from a factory object instead of manually managing them
using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these
objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up.

This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList
objects and then blows them away all at once. While conceptually simple, most of the changes in
this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications.

This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser
object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList
objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its
underlying allocator as we enter/leave key methods in the Parser. This means that we get
simple memory management while still having the ability to finely control memory use if necessary.

Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic
in many large files with attributes.

This fixes the leak reported in: <rdar://problem/8650003>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
8113ecfa4e41e2c888b1794389dfe3bce6386493 10-Nov-2010 Ted Kremenek <kremenek@apple.com> Region-allocate all AttributeList objects from a factory object instead of manually managing them
using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these
objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up.

This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList
objects and then blows them away all at once. While conceptually simple, most of the changes in
this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications.

This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser
object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList
objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its
underlying allocator as we enter/leave key methods in the Parser. This means that we get
simple memory management while still having the ability to finely control memory use if necessary.

Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic
in many large files with attributes.

This fixes the leak reported in: <rdar://problem/8650003>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
929f496b833d84f048809a496cd3449401047628 10-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Replace UsingDecl's SmallPtrSet of UsingShadowDecls with a linked list to avoid leaking memory.
Fixes rdar://8649963.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
826faa22bae112e01293a58534a40711043cce65 10-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Replace UsingDecl's SmallPtrSet of UsingShadowDecls with a linked list to avoid leaking memory.
Fixes rdar://8649963.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
a84a8537fe56300cc3b9a9edb2244518c587cab0 10-Nov-2010 John McCall <rjmccall@apple.com> Diagnose attempst to template using declarations and using directives.
Recover from the latter and fail early for the former. Fixes PR8022.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/ParsedTemplate.h
78b810559d89e996e00684335407443936ce34a1 10-Nov-2010 John McCall <rjmccall@apple.com> Diagnose attempst to template using declarations and using directives.
Recover from the latter and fail early for the former. Fixes PR8022.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/ParsedTemplate.h
7d12dec762127522e05edded420b88079e6da6d3 10-Nov-2010 John McCall <rjmccall@apple.com> Add a warning for implicit truncation of constant values due to
bitfield assignment.

Implements rdar://problem/7809123



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
beb22aaa22e255241d6a81e8b0a9239f5fa584f3 10-Nov-2010 John McCall <rjmccall@apple.com> Add a warning for implicit truncation of constant values due to
bitfield assignment.

Implements rdar://problem/7809123



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8f015ffc4e7f0af60ed699737565beae79599b43 09-Nov-2010 John McCall <rjmccall@apple.com> Split out -Wconversion warnings about constant precision into their
own subcategory, -Wconstant-conversion, which is on by default.

Tweak the constant folder to give better results in the invalid
case of a negative shift amount.

Implements rdar://problem/6792488



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
091f23f1d6d4bcffd6641cda72a6831e08c02ea7 09-Nov-2010 John McCall <rjmccall@apple.com> Split out -Wconversion warnings about constant precision into their
own subcategory, -Wconstant-conversion, which is on by default.

Tweak the constant folder to give better results in the invalid
case of a negative shift amount.

Implements rdar://problem/6792488



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
28a226b02fd749c9b6d6cf43aac0e32c7c7da449 09-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Restore patch reversed in r118475. Fixes
// rdar://8632525


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
ba8bda05fefd3bb2f1ef201784b685f715bdde29 09-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Restore patch reversed in r118475. Fixes
// rdar://8632525


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
d22d23d26ea72e9f68804cce92133ce3a4e61adc 09-Nov-2010 Charles Davis <cdavis@mines.edu> Use the right calling convention when mangling names in the Microsoft C++
mangler. Now member functions and pointers thereof have their calling
convention mangled as __thiscall if they have the default CC (even though,
they technically still have the __cdecl CC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ee743f903858e337434ac0335f147f4de4ecae05 09-Nov-2010 Charles Davis <cdavis@mines.edu> Use the right calling convention when mangling names in the Microsoft C++
mangler. Now member functions and pointers thereof have their calling
convention mangled as __thiscall if they have the default CC (even though,
they technically still have the __cdecl CC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a7bdfdd3b9d77383ec221dd48a169d088f88e81c 09-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Include System/DataTypes.h in Diagnostic.h to get intptr_t.
Set Haiku's UserLabelPrefix to "".
Patch by Paul Davey.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
19ddda83f9c3a7f1029740047b06035bda5fbb81 09-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Include System/DataTypes.h in Diagnostic.h to get intptr_t.
Set Haiku's UserLabelPrefix to "".
Patch by Paul Davey.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
64f76fea7d4f7a2fc84743822c92f0bf7eaec8b0 09-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> ntroduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.

Take 2: this time, adjusted tests appropriately and used a "simple"
approach to the spelling location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118495 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a9b06d4c246d6c301e3dd1844f5dba669ed9c631 09-Nov-2010 Douglas Gregor <dgregor@apple.com> ntroduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.

Take 2: this time, adjusted tests appropriately and used a "simple"
approach to the spelling location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118495 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6b263ce76a9dff933cc7bd3bc67aaf678dce61a7 09-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r118492, which didn't update all of its tests accordingly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118494 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
27a31fe6fac7eb98ece172bf83af93a3a103f5b4 09-Nov-2010 Douglas Gregor <dgregor@apple.com> Revert r118492, which didn't update all of its tests accordingly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118494 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4ed3dcde44b808a012d55ea5e8a9d7e9b80f46cd 09-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118492 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b6278715de9530aea42ff3f9d4064fb5bed13343 09-Nov-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118492 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f6a1611ca5f04de4116a2ecae3e2c3cd451c4cb7 09-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Add __nullptr as a C++0x nullptr literal, available in C++98

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
b2d57ae3086bb87216c76f89400f5935c3b47f86 09-Nov-2010 Douglas Gregor <dgregor@apple.com> Add __nullptr as a C++0x nullptr literal, available in C++98

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
81d3ee953415297592892daee8ad1381706875d8 09-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Reverse patch for // rdar://8632525. It might
has broken a build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
c8c62c4075688b206dc9ac2c5b24a362018b718b 09-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Reverse patch for // rdar://8632525. It might
has broken a build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
012a8e0d85b51fa90c3d2efba7fc6f2a197a132d 09-Nov-2010 Ted Kremenek <kremenek@apple.com> Fix InitListExpr::getSourceRange() to work in the case of no locations for '(' and ')'. This can happen
in the case of transparent unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c4ba51f365a3cd3374b3ef87272a9b3e517cd5d3 09-Nov-2010 Ted Kremenek <kremenek@apple.com> Fix InitListExpr::getSourceRange() to work in the case of no locations for '(' and ')'. This can happen
in the case of transparent unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ec49003352e31056fd5edabc9bad0b18d20029a5 08-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Provide a precise builtin declaration for objc_msgSend
to avoid a bogus warning. Fixes //rdar: //8632525


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
ed171b80e49c1ef3dcb9c2aa238cc50340ac6e90 08-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Provide a precise builtin declaration for objc_msgSend
to avoid a bogus warning. Fixes //rdar: //8632525


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
f640c64c62d3883121b8da0502ce75aecc6ba524 08-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> 1) Fix a typo in PPCallbacks: It's elif, not elfif. :-) This is
contentful, since the typo was in the method-name...

2) Clarify some comments in RecursiveASTVisitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/Lex/PPCallbacks.h
b5b38adbe29cd82711595bd184d6123125bd9a9b 08-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> 1) Fix a typo in PPCallbacks: It's elif, not elfif. :-) This is
contentful, since the typo was in the method-name...

2) Clarify some comments in RecursiveASTVisitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/Lex/PPCallbacks.h
49faccdf4e9532c5c1e80581aab8ee622cf26a07 08-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Improve our handling of C++ [class.copy]p3, which specifies that a
constructor template will not be used to copy a class object to a
value of its own type. We were eliminating all constructor templates
whose specializations look like a copy constructor, which eliminated
important candidates. Fixes PR8182.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6493cc50b66c2d097b3e22514bbe303048c4a8ff 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Improve our handling of C++ [class.copy]p3, which specifies that a
constructor template will not be used to copy a class object to a
value of its own type. We were eliminating all constructor templates
whose specializations look like a copy constructor, which eliminated
important candidates. Fixes PR8182.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
884cd978411aafaa3251acbc9d2dc74549a71a44 08-Nov-2010 Ted Kremenek <kremenek@apple.com> Clean up some of the comments in Index.h (e.g., misnamed or extra parameters in comments).

Patch by Chris Pick!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118403 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1ddb02cabd4374bcbe9afdff5123be0be8e32d12 08-Nov-2010 Ted Kremenek <kremenek@apple.com> Clean up some of the comments in Index.h (e.g., misnamed or extra parameters in comments).

Patch by Chris Pick!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118403 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5754a0ff32686682ab664ffdc5dcc6074086c1aa 08-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Properly diagnose invalid casts to function references. Patch by
Faisal Vali, tweaked by me. Fixes PR8230.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8e960435696b4ccf6a8ad0ed0530e3280b77af8b 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Properly diagnose invalid casts to function references. Patch by
Faisal Vali, tweaked by me. Fixes PR8230.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
99cb76d06906fd6c126da9c22f7af15c8658457b 08-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/TemplateBase.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
lang/Sema/Template.h
910f8008fea79120489a53593fe971b0b8a4a740 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/TemplateBase.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
lang/Sema/Template.h
26afabc95023782c267a8ba59e29efc666bec3c7 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -rdynamic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
dc1b76ddfc687c713a55cc9e3e054e9a0de1aa74 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -rdynamic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
4857d6c6b44999ee9951a649c2a021b605f798c4 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Use ld directly on linux. Changes from the previous try:
*) Try to detect as much as possible from the system itself, not the distro.
This should make it easier to port to a new distro and more likely to
work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
host detection support in LLVM.
*) Correctly handle --sysroot.

A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.

It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
c1da981bba867681004004b2d54ec2fdf3c08913 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Use ld directly on linux. Changes from the previous try:
*) Try to detect as much as possible from the system itself, not the distro.
This should make it easier to port to a new distro and more likely to
work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
host detection support in LLVM.
*) Correctly handle --sysroot.

A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.

It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
dcdac090356c2408cae49942db7e71bf97149bca 07-Nov-2010 Anders Carlsson <andersca@mac.com> A union cannot contain static data members or data members of reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
dfdfc584f2a8d9f1eebd6e6eaa9b1bbff519d8f9 07-Nov-2010 Anders Carlsson <andersca@mac.com> A union cannot contain static data members or data members of reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
799cb2237c0fa5c7627d333d8eca8ff0c02e9c0d 06-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
bdacf3c64867a132917386ac1c8df77e617d41fc 06-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
f44cc6d7d3cf92c195a4fa306b22042d66530395 06-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix a bug where we were recursing on friend decls for friend
functions, but not for friend types.

Reviewed by wan


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
bb6afcb7f5f9c2e9121a548726d6d03283cb52bc 06-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix a bug where we were recursing on friend decls for friend
functions, but not for friend types.

Reviewed by wan


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
1b542fb4ebf416727dd699351e8e5a040fbd8286 06-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Add PPCallbacks for #if/#ifdef/etc.

The callback info for #if/#elif is not great -- ideally it would give
us a list of tokens in the #if, or even better, a little parse tree.
But that's a lot more work. Instead, clients can retokenize using
Lexer::LexFromRawLexer().

Reviewed by nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
08985b91e5a87e7731ba24c675f2dc9f9cb645d4 06-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Add PPCallbacks for #if/#ifdef/etc.

The callback info for #if/#elif is not great -- ideally it would give
us a list of tokens in the #if, or even better, a little parse tree.
But that's a lot more work. Instead, clients can retokenize using
Lexer::LexFromRawLexer().

Reviewed by nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
db58b96bf23e4be2fd194fe1d4576df68b92b86d 05-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write from/to PCH the diagnostic mappings that the user set so that e.g. #pragma clang diagnostic can be used in a PCH.
Fixes rdar://8435969.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
f41d3be39980d40849850d3fb90403623cc8459e 05-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write from/to PCH the diagnostic mappings that the user set so that e.g. #pragma clang diagnostic can be used in a PCH.
Fixes rdar://8435969.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
1a698fc2dbd5988d1d143ce54e2b4a22532cad39 05-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Initialize the array with the "C++ way".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
2e57494445747c911f48b853015b784e292fefe4 05-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Initialize the array with the "C++ way".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
07efa563d8e702d8746f42e8341373f505f1190b 04-Nov-2010 Daniel Dunbar <daniel@zuster.org> libclang: Add clang_executeOnThread, for use in c-index-test (and only there,
preferably). Good thing c-index-test is written in C!!!!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118223 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
995aaf9c8f0131bef0215a9a0bc794b83a49e0b7 04-Nov-2010 Daniel Dunbar <daniel@zuster.org> libclang: Add clang_executeOnThread, for use in c-index-test (and only there,
preferably). Good thing c-index-test is written in C!!!!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118223 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6dbcbbcfcdcc44c8f7641dc788d2523cf1a09b5b 03-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Implement -working-directory.

When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.

--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.

FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.

Addresses rdar://8583824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/FileManager.h
lang/Basic/FileSystemOptions.h
lang/Basic/SourceManager.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/Utils.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTReader.h
389db16c63eec6ecfa9b235155252d8da766e94e 03-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -working-directory.

When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.

--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.

FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.

Addresses rdar://8583824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/FileManager.h
lang/Basic/FileSystemOptions.h
lang/Basic/SourceManager.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/Utils.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTReader.h
1ecda74bf22dbfbdf7c7c62b9b13c9011464d11a 03-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
f1410802d1c9e7ff72b2818ad91fd85283abc6bf 03-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
c844b586a2dc182b3012400216bdae6cdcc07a3b 03-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Make this error less specific but also less likely to cause confusion. Fixes
PR7702.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
9fa8e569407e02148888136609431a3fe083096d 03-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Make this error less specific but also less likely to cause confusion. Fixes
PR7702.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
383e6b1b4882d6d821b45010aff0f01260625e33 03-Nov-2010 David Chisnall <csdavec@swan.ac.uk> Added cursor visitor that takes a block as an argument. Tested compiling
libclang with both clang -fblocks and gcc (no blocks support). Only exposed in
the header to compilers that do have blocks support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118170 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3387c65a094a02b2a94c05111d035a97d3d5c794 03-Nov-2010 David Chisnall <csdavec@swan.ac.uk> Added cursor visitor that takes a block as an argument. Tested compiling
libclang with both clang -fblocks and gcc (no blocks support). Only exposed in
the header to compilers that do have blocks support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118170 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e762d6951d6f6fd21f38acdb47c83b8cfe67ef70 03-Nov-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added generating destructors for temporary objects. Two cases I know of, that are not handled properly:
1. For statement: const C& c = C(0) ?: C(1) destructors generated for condition will not differ from those generated for case without prolonged lifetime of temporary,
2. There will be no destructor for constant reference member bound to temporary at the exit from constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
8599e7677e067fd01d3b2ee4c0875747d367fd8e 03-Nov-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added generating destructors for temporary objects. Two cases I know of, that are not handled properly:
1. For statement: const C& c = C(0) ?: C(1) destructors generated for condition will not differ from those generated for case without prolonged lifetime of temporary,
2. There will be no destructor for constant reference member bound to temporary at the exit from constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
eccf1109ec2ebd80d3a2f8b89749f3302ed4de71 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert while I debug test failures :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
138e66ffa8008b95121580f5459af45487df9803 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert while I debug test failures :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b3cca134f96969a4325fb633c26fa328b69530f2 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Switch clang to run ld directly on linux. I tested this on all the linux
distros listed by running

gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared

and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.

While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
29a88f441fb9d82cfa898774cf6711e54bcba2ff 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Switch clang to run ld directly on linux. I tested this on all the linux
distros listed by running

gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared

and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.

While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
098bd2b151e9d566b66af2b069e006e41338716d 03-Nov-2010 Sean Hunt <rideau3@gmail.com> Provide an error when a non-identifier name (such as an operator) is used as a
parameter name.

Fixes PR8012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7533a5b65f81a4eed1e0f0afeb859e26bc0c056b 03-Nov-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Provide an error when a non-identifier name (such as an operator) is used as a
parameter name.

Fixes PR8012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4d14fa6708bd93e3c177cddd267fc440a85d2aeb 02-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes an assertion violation when bind to temporary
expression is a dependent expression.
// rdar: // 8620524 and PR7851


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
b8e39236f05b2f71fb2632673948499fd54e2a34 02-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes an assertion violation when bind to temporary
expression is a dependent expression.
// rdar: // 8620524 and PR7851


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
42d2b2fd1ce4d109872b86213dbe45192f62c1bc 02-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Teach code completion to provide property results when the property
can be used to automatically synthesize an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
ca45da0c6da20d9c0c903370f99af5e9a186e0da 02-Nov-2010 Douglas Gregor <dgregor@apple.com> Teach code completion to provide property results when the property
can be used to automatically synthesize an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
35bed2aa27b645a1a39efeff3256c4c4148c73dd 02-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Properly handle temporaries that are created in a AsmStmt.

Previously the temporaries would get destroyed before the asm call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
bf8cafadb9d4e0d7a90fe78fc175efb80ae34d42 02-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Properly handle temporaries that are created in a AsmStmt.

Previously the temporaries would get destroyed before the asm call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
908200b4754e1544a13c602c412e66ce32d74635 01-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Emit error when using a bound member function for something other than calling it.

Also avoids IRGen crashes due to accepting invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
11ab79030938209f50691acae0ddb65e72a58ca9 01-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit error when using a bound member function for something other than calling it.

Also avoids IRGen crashes due to accepting invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
d1f3fdb1fbed5e91c55cea66ec7c4edd9b805fdc 01-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Require that the types of the parameters of a block literal are complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
82aa713bcda99f388836c2a30bb868d9c9974817 01-Nov-2010 Douglas Gregor <dgregor@apple.com> Require that the types of the parameters of a block literal are complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
651b3b119eebb05415f83678e32dc782e11146f6 01-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Plug a leak in the preprocessing record's handling of inclusion
directives. We had a std::string in an object that was allocated via a
BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
4ab829c2a229dc20ecb9f35e7337bbfa95bf4026 01-Nov-2010 Douglas Gregor <dgregor@apple.com> Plug a leak in the preprocessing record's handling of inclusion
directives. We had a std::string in an object that was allocated via a
BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
a217be5986b12cf3a923cb1a3cc9269682e9dee8 01-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Now initializer of C++ record type is visited as block-level expr.
Let the destination of AggExprVisitor be an explicit MemRegion.
Reenable the test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
7ce351db56fbce162a3b650518ce05b5c61ebf36 01-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Now initializer of C++ record type is visited as block-level expr.
Let the destination of AggExprVisitor be an explicit MemRegion.
Reenable the test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
aa82a0ca2a1b5376ba2301990e284249e6b57dd7 01-Nov-2010 Anders Carlsson <andersca@mac.com> Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
a14f5979572aa25c03d24750ee4724d2031d4ede 01-Nov-2010 Anders Carlsson <andersca@mac.com> Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
fc502c1b203e67b1f9a9e364425b6dc89a0a49e9 31-Oct-2010 Anders Carlsson <andersca@mac.com> EmptyObjectMap now uses CharUnits wherever possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
a3d4380d6662a373bc78f915947e5bc06e985e91 31-Oct-2010 Anders Carlsson <andersca@mac.com> EmptyObjectMap now uses CharUnits wherever possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
70d7531c1bcf9740dc2a19dd722eae3860ad5fcc 31-Oct-2010 Anders Carlsson <andersca@mac.com> Add a DenseMapInfo specializaiton for CharUnits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
94ac122610ec875760c4b41e7376b79223a0de20 31-Oct-2010 Anders Carlsson <andersca@mac.com> Add a DenseMapInfo specializaiton for CharUnits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
f643e555af0aca6ee353bb39e39a92860ea4155c 31-Oct-2010 Nick Lewycky <nicholas@mxc.ca> Fix typo spotted by Nico Weber.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/ASTConsumers.h
aa81908f7a649ade93036b5f30b91307e20cb464 31-Oct-2010 Nick Lewycky <nicholas@mxc.ca> Fix typo spotted by Nico Weber.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/ASTConsumers.h
ba90dab5280f08052d52c0aea7fa06b5e91f324f 31-Oct-2010 Anders Carlsson <andersca@mac.com> Baby steps towards using only CharUnits for base class offsets in ASTRecordLayout. Start by storing the offsets in CharUnits in the ASTRecordLayout object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
376bda924ac92462a22d6a22ea65d8c1bb8f26f3 31-Oct-2010 Anders Carlsson <andersca@mac.com> Baby steps towards using only CharUnits for base class offsets in ASTRecordLayout. Start by storing the offsets in CharUnits in the ASTRecordLayout object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
e15d2ab3c0ff08d09527eb9cb8da54c0e3832c25 31-Oct-2010 Anders Carlsson <andersca@mac.com> Teach the constant expr evaluator about derived-to-base casts when no virtual bases are involved. Fixes PR5974.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
5c5a764fcd256df6f6cfbce5cdd2a2dfb2c45e95 31-Oct-2010 Anders Carlsson <andersca@mac.com> Teach the constant expr evaluator about derived-to-base casts when no virtual bases are involved. Fixes PR5974.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
2de759ee4804419e8a58cf81eb4d4fd256f7635d 30-Oct-2010 John McCall <rjmccall@apple.com> Better solution: calculate the visibility of functions and variables
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.

More of rdar://problem/8613093



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
af14603ca61757cf4361b583b45639a04c57e651 30-Oct-2010 John McCall <rjmccall@apple.com> Better solution: calculate the visibility of functions and variables
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.

More of rdar://problem/8613093



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3b8ff1bdfb85628ed3bdf870f911811432114316 30-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Make the deserialization of macro definitions lazy, so that we can
load identifiers without loading their corresponding macro
definitions. This is likely to improve PCH performance slightly, and
reduces deserialization stack depth considerably when using
preprocessor metaprogramming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTReader.h
295a2a617ac335f590e430ab7fcd98f8ce109251 30-Oct-2010 Douglas Gregor <dgregor@apple.com> Make the deserialization of macro definitions lazy, so that we can
load identifiers without loading their corresponding macro
definitions. This is likely to improve PCH performance slightly, and
reduces deserialization stack depth considerably when using
preprocessor metaprogramming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTReader.h
8fa024cad01e38f1b16477c838ad7400ea1b1756 30-Oct-2010 Dale Johannesen <dalej@apple.com> Handle Type.h a better way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1e592cba6bc1930e7a01dde8370e5345cef05723 30-Oct-2010 Dale Johannesen <dalej@apple.com> Handle Type.h a better way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1bfa059effa6b3cf3cf4b2f377a8f8e2f7d2cd12 30-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics reporting of un-implemented
methods in protocols when protocols are in system
headers and thus ignored. //rdar: //8227199


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
61c8d3ecac8d565136ac82e9ea06c351227c9c5a 30-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics reporting of un-implemented
methods in protocols when protocols are in system
headers and thus ignored. //rdar: //8227199


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3a161e5ca07ca0c35ad2b0f73e21ed3b1ea43171 30-Oct-2010 Dale Johannesen <dalej@apple.com> Generate bitcasts going in and out of MMX parameters
in asm's. PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f6e2c2039f76fa58799f6d155892d54fc95755e1 30-Oct-2010 Dale Johannesen <dalej@apple.com> Generate bitcasts going in and out of MMX parameters
in asm's. PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c4c06ff08b812b1149b45c766e052b33688aa58f 30-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Make the deserialization of C++ base class specifiers lazy, improving
the performance of C++ PCH and reducing stack depth in the reader.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
7c789c1a3f77f24032aa0bed2afacdb9e094e952 30-Oct-2010 Douglas Gregor <dgregor@apple.com> Make the deserialization of C++ base class specifiers lazy, improving
the performance of C++ PCH and reducing stack depth in the reader.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
555a1dc275adafe74fd7606617cea0270b242d94 30-Oct-2010 John McCall <rjmccall@apple.com> Restore r117644, this time properly ignoring -fvisibility and type visibility
for namespace-scope variable declarations.

Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
110e8e56af30363072c140285961592b0107f789 30-Oct-2010 John McCall <rjmccall@apple.com> Restore r117644, this time properly ignoring -fvisibility and type visibility
for namespace-scope variable declarations.

Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2acc42b71d70979dd16122d5636d3660da5f0856 29-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added CFGTerminator class, that holds information about CFGBlock terminator statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
4ba72a0b28135209c435630682febe1f854ccfa6 29-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added CFGTerminator class, that holds information about CFGBlock terminator statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
126848ffc24253763e84cb10e82b64717d7f1f7f 28-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
b14eed0ed44ed3af881219dab7dc6464cad5303b 28-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
c7a1e90f74d23e3eef15a83fd845a683973816ac 28-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Simplify ASTUnit's internal timers, by not trying to keep a pile of
timers to be dumped whenever the ASTUnit is destroyed. Instead, just
print the time elapsed for each operation after we perform the
operation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
213f18b3d654de7d1c7cf4a329ea9d3db1c50b6a 28-Oct-2010 Douglas Gregor <dgregor@apple.com> Simplify ASTUnit's internal timers, by not trying to keep a pile of
timers to be dumped whenever the ASTUnit is destroyed. Instead, just
print the time elapsed for each operation after we perform the
operation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
eb16fce12cc2e47a537f6e39fb6d953c2b4ca7a6 28-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Switch case IDs conflict between chained PCHs; since there is no need to be global, make them local to a decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
e09a275444576deb2c8d9e2255554242f65d7c00 28-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Switch case IDs conflict between chained PCHs; since there is no need to be global, make them local to a decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
ed022b71b0e1d96d924ad681fd591f65f669503e 28-Oct-2010 John McCall <rjmccall@apple.com> Implement an indirect-goto optimization for goto *&&lbl and respect this
in the scope checker. With that done, turn an indirect goto into a
protected scope into a hard error; otherwise IR generation has to start
worrying about declarations not dominating their scopes, as exemplified
in PR8473.

If this really affects anyone, I can probably adjust this to only hard-error
on possible indirect gotos into VLA scopes rather than arbitrary scopes.
But we'll see how people cope with the aggressive change on the marginal
feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
95c225de9fa3d79f70ef5008c0279580a7d9dcad 28-Oct-2010 John McCall <rjmccall@apple.com> Implement an indirect-goto optimization for goto *&&lbl and respect this
in the scope checker. With that done, turn an indirect goto into a
protected scope into a hard error; otherwise IR generation has to start
worrying about declarations not dominating their scopes, as exemplified
in PR8473.

If this really affects anyone, I can probably adjust this to only hard-error
on possible indirect gotos into VLA scopes rather than arbitrary scopes.
But we'll see how people cope with the aggressive change on the marginal
feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
e25e6d31745f808a600c5c5b20ef7511f27cd28e 28-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Use the ASTMutationListener to track when a named decl gets added to a DeclContext,
meaning we need to rewrite its name lookup table in a chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTWriter.h
100050bf643bcfe2d06bdcef491e387171249260 28-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the ASTMutationListener to track when a named decl gets added to a DeclContext,
meaning we need to rewrite its name lookup table in a chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTWriter.h
feef73b988c81f1a5572125a55890580b14c1e3e 28-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix the re-serializing decls in a chained PCH mechanism.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
d3d0755a4220d3fa6c125eb3f8ce29fc1424eac3 28-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix the re-serializing decls in a chained PCH mechanism.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
162ab3200fb02522f07c2b51f8d87b7fd473b72d 28-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Use the ASTMutationListener to track added template specializations in a chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/AST/DeclTemplate.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
bef1a7b9c175d37e4a727e6ce68bd05232fa6970 28-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the ASTMutationListener to track added template specializations in a chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/AST/DeclTemplate.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
18cadfc6c150f2a41c0a0282daa970c4acbc6e2e 28-Oct-2010 John McCall <rjmccall@apple.com> Implement the newest status quo for method override checking. The idea now
is that we need more information to decide the exact conditions for whether
one ObjCObjectPointer is an acceptable return/parameter override for another,
so we're going to disable that entire class of warning for now. The
"forward developement" warning category, -Wmethod-signatures, can receive
unrestricted feature work, and when we're happy with how it acts, we'll
turn it on by default.

This is a pretty conservative change, and nobody's totally content with it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
10302c01e8ceffd86c1a2b1bb15466e852ca8898 28-Oct-2010 John McCall <rjmccall@apple.com> Implement the newest status quo for method override checking. The idea now
is that we need more information to decide the exact conditions for whether
one ObjCObjectPointer is an acceptable return/parameter override for another,
so we're going to disable that entire class of warning for now. The
"forward developement" warning category, -Wmethod-signatures, can receive
unrestricted feature work, and when we're happy with how it acts, we'll
turn it on by default.

This is a pretty conservative change, and nobody's totally content with it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6a708e29f59d5c3c60ad3c707ed7d8deac19da7d 28-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Make AST deserialization for class template specializations lazier, by
not loading the specializations of a class template until some AST
consumer needs them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
c8e5cf8f725e111965debb7130ef7466c0c73884 28-Oct-2010 Douglas Gregor <dgregor@apple.com> Make AST deserialization for class template specializations lazier, by
not loading the specializations of a class template until some AST
consumer needs them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
45ecd0d8067ed9723d5ad996da74641026fd15de 27-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Lazily load the next friend in the chain of FriendDecls, to eliminate
some excessive recursion and deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
69aecc6252bf4a5ee59f9b51c3728ea07b6342bf 27-Oct-2010 Douglas Gregor <dgregor@apple.com> Lazily load the next friend in the chain of FriendDecls, to eliminate
some excessive recursion and deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
5c893f7845f175b6a7b00483595f7db9e8d16852 27-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Lazily load the "next" namespace in the chain of NamespaceDecls, to
eliminate some excessive recursion and deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
06c919300ce39e50ed7f6dff5025c8ed96dcf221 27-Oct-2010 Douglas Gregor <dgregor@apple.com> Lazily load the "next" namespace in the chain of NamespaceDecls, to
eliminate some excessive recursion and deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
875ce536a468f0a958f8667d29acf8da433c69ff 27-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce libclang-level options for C++ precompiled preambles,
separating out chaining precompiled preambles from non-chaining ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117457 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
99ba202f659e1885fa5ee114f97c97cf6a857491 27-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce libclang-level options for C++ precompiled preambles,
separating out chaining precompiled preambles from non-chaining ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117457 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
8d333e150526172be006c30636c568e582d5e4f3 27-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Add helper for extracting the CXXRecordDecl for the implicit argument to
a member call expression. This has proved to be a common pattern for users of
RecursiveASTVisitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
007a9b1c632bfaac20e41c60cbe07fdc6d0e647c 27-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Add helper for extracting the CXXRecordDecl for the implicit argument to
a member call expression. This has proved to be a common pattern for users of
RecursiveASTVisitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
675414e4f7c3431aa0c68409d879297805865173 27-Oct-2010 Dan Gohman <gohman@apple.com> Add support for code completion on stdin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
90d9081cacb4b0163f2c7527f666d6515257067c 27-Oct-2010 Dan Gohman <gohman@apple.com> Add support for code completion on stdin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
1ee1609094e240771c62e9d6b85103f37b7a6270 26-Oct-2010 Dan Gohman <gohman@apple.com> getOrCreateContentCache never returns null, so overrideFileContents
doesn't need its return value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
0d06e998910934e5ef070f53f4c272e7c6b846c6 26-Oct-2010 Dan Gohman <gohman@apple.com> getOrCreateContentCache never returns null, so overrideFileContents
doesn't need its return value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c6a530df661d6811cbb10897fb88bdaa60d4478e 26-Oct-2010 John McCall <rjmccall@apple.com> Optimize field space usage in CompoundStmt, LabelStmt, Expr, and CastExpr.
There's probably still significant padding waste on x86-64 UNIXen, but
the difference in 32-bit compiles should be significant.

There are a lot of Expr nodes left that could lose a word this way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
8e6285af719adc6f86d6faa235d22a08eb68ee3a 26-Oct-2010 John McCall <rjmccall@apple.com> Optimize field space usage in CompoundStmt, LabelStmt, Expr, and CastExpr.
There's probably still significant padding waste on x86-64 UNIXen, but
the difference in 32-bit compiles should be significant.

There are a lot of Expr nodes left that could lose a word this way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
c8149b0df721d5ec08cb73021aa69e0b429d9a3f 26-Oct-2010 John McCall <rjmccall@apple.com> No really, we don't have a retain/release system for statements/expressions
anymore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
3fa5cae9b3812cab9fab6c042c3329bb70a3d046 26-Oct-2010 John McCall <rjmccall@apple.com> No really, we don't have a retain/release system for statements/expressions
anymore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
2243560c1b13d7746210c710dd8b39c0b9867981 26-Oct-2010 John McCall <rjmccall@apple.com> A couple of tweaks to the visibility rules:
- tags with C linkage should ignore visibility=hidden
- functions and variables with explicit visibility attributes should
ignore the linkage of their types
Either of these should be sufficient to fix PR8457.

Also, FileCheck-ize a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ac65c6208d48b0f9b4661c30c28997a280ac5ba6 26-Oct-2010 John McCall <rjmccall@apple.com> A couple of tweaks to the visibility rules:
- tags with C linkage should ignore visibility=hidden
- functions and variables with explicit visibility attributes should
ignore the linkage of their types
Either of these should be sufficient to fix PR8457.

Also, FileCheck-ize a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
3e4a1e889180a2f6c33ee083bd42b614b39430fa 26-Oct-2010 John McCall <rjmccall@apple.com> Pending further discussion, re-enable warnings for Objective C
covariant/contravariant overrides and implementations, but do so under
control of a new flag (-Wno-objc-covariant-overrides, which yes does cover
contravariance too).

*At least* the covariance cases will probably be enabled by default shortly,
but that's not totally uncontroversial.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1235b0ebb16618bf41a9e7234d5e2690faf97d37 26-Oct-2010 John McCall <rjmccall@apple.com> Pending further discussion, re-enable warnings for Objective C
covariant/contravariant overrides and implementations, but do so under
control of a new flag (-Wno-objc-covariant-overrides, which yes does cover
contravariance too).

*At least* the covariance cases will probably be enabled by default shortly,
but that's not totally uncontroversial.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
626161ecc7e10b432e2b293fe806ba314c1f4aa7 26-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch for mis-compile of statement expressions with
non-trivial copy constructors. // rdar: //8540501.
A test will be added to llvm nightly tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e946fc833d8592aa2890bfd9839f1ad839b3d284 26-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch for mis-compile of statement expressions with
non-trivial copy constructors. // rdar: //8540501.
A test will be added to llvm nightly tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
fe1419904bce9fcd0423c0735ccee25445fecd61 25-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Improve the tracking of source locations for parentheses in constructor calls.
This adds them where missing, and traces them through PCH. We fix at least one
bug in the extents found by the Index library, and make a lot of refactoring
tools which care about the exact formulation of a constructor call easier to
write. Also some minor cleanups to more consistently follow the friend pattern
instead of the setter pattern when rebuilding a serialized AST.

Patch originally by Samuel Benzaquen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Sema/Sema.h
428edafa9eb80e01dd40aab31d4166a787a741e1 25-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Improve the tracking of source locations for parentheses in constructor calls.
This adds them where missing, and traces them through PCH. We fix at least one
bug in the extents found by the Index library, and make a lot of refactoring
tools which care about the exact formulation of a constructor call easier to
write. Also some minor cleanups to more consistently follow the friend pattern
instead of the setter pattern when rebuilding a serialized AST.

Patch originally by Samuel Benzaquen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Sema/Sema.h
83bf722acb37fcbd0468a782dcc219575ed48dd8 24-Oct-2010 Peter Collingbourne <peter@pcc.me.uk> Implement GNU C extension: two types are compatible if they appear
as a function argument, one of the types is a transparent union type
and the other type is compatible with a union member

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4846675e0e42d1802b0ffd8972a45e72aeb3758d 24-Oct-2010 Peter Collingbourne <peter@pcc.me.uk> Implement GNU C extension: two types are compatible if they appear
as a function argument, one of the types is a transparent union type
and the other type is compatible with a union member

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
094028ba7d3fd22d7d186f68b8c0b470f74260cb 24-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Keep track in chained PCH of implicit members that were added after the definition was completed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTWriter.h
b6cc0e1a789c3f33e3f4b1ee768e679a9beab941 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track in chained PCH of implicit members that were added after the definition was completed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTWriter.h
60eadb6557fb19d5e83521a4834e56b2b849e164 24-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Start fleshing out ASTMutationListener; notify when a tag definition is completed.

In that case a chained PCH will record the updates to the DefinitionData pointer of forward references.
If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTWriter.h
565bf30bf5607b9740d288d8d9c45cf38ea75298 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Start fleshing out ASTMutationListener; notify when a tag definition is completed.

In that case a chained PCH will record the updates to the DefinitionData pointer of forward references.
If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTMutationListener.h
lang/Serialization/ASTWriter.h
597fb383b3bacbf98e34a6127acfa5a5805f8c10 24-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce a DeclsToRewrite field in ASTWrite, used for collecting the decls that will be replaced in the chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
ba901b507fc36408fe6f8478e8ac90b554f1d230 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a DeclsToRewrite field in ASTWrite, used for collecting the decls that will be replaced in the chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
29d3a8eea971c7ce0b6d56ff5c9cfbf9d54ea3e5 24-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Some method renaming, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
aacdd02e5865aa410c1418d7ef77f445b5bb5cba 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Some method renaming, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
66038abe0b53d93378f014e0306f1b3c2af07177 24-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Refactoring.
- Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used.
- Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Serialization/ASTWriter.h
89eaf3af92c72c0c1aae807644e39cabc461d685 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring.
- Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used.
- Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Serialization/ASTWriter.h
d9f2c76d28b9f8b2c58282666fc18f592c722496 24-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Put the mechanism in place to track modifications in an AST entity that were committed after
its initial creation/deserialization and store the changes in a chained PCH.

The idea is that the AST entities call methods on the ASTMutationListener to give notifications
of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes
of the updated entity. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/ASTMutationListener.h
lang/AST/DeclBase.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
7b90340c9c7d07aef4e301e72b5e8a30d5f4f0c8 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Put the mechanism in place to track modifications in an AST entity that were committed after
its initial creation/deserialization and store the changes in a chained PCH.

The idea is that the AST entities call methods on the ASTMutationListener to give notifications
of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes
of the updated entity. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/ASTMutationListener.h
lang/AST/DeclBase.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
9a38d95650238c0f09437da901230d0b0803fc04 24-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Simplify and "robust-ify" the way that CXXRecord references point to the definition data when loaded from PCH.

Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
134db1fff5653c164ef41c898943521c49f6ebab 24-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify and "robust-ify" the way that CXXRecord references point to the definition data when loaded from PCH.

Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
dd3f519c82a8e53c1f223c5721785608e3c36f42 24-Oct-2010 Anders Carlsson <andersca@mac.com> Fix tyop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
951455d14e8b0a733a05fff2f42841d0d3d14bf7 24-Oct-2010 Anders Carlsson <andersca@mac.com> Fix tyop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
4f956031c1f13fcceb5f49e09d16be040ef83f1b 24-Oct-2010 Anders Carlsson <andersca@mac.com> Move the "used but marked unused" warning behind a special warning flag for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
cd1af3d68b00aa729e382fe2cde186f237630804 24-Oct-2010 Anders Carlsson <andersca@mac.com> Move the "used but marked unused" warning behind a special warning flag for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
fd22f9db9eb1ca89fd30a994c4771220b52dd3e8 23-Oct-2010 Anders Carlsson <andersca@mac.com> Warn if a variable marked with the "unused" attribute is used. Patch by Darin Adler!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2127eccbe15fd3b1b29aa53ccedd2e0f55ad27f9 23-Oct-2010 Anders Carlsson <andersca@mac.com> Warn if a variable marked with the "unused" attribute is used. Patch by Darin Adler!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc9bc4e9207eea7bd59beacb95c73f2d3cfbe77b 23-Oct-2010 John McCall <rjmccall@apple.com> Parse attributes on enumerators and instantiate attributes on enum decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5b629aa86c987f276d00453b6c9ab8424f7903fe 23-Oct-2010 John McCall <rjmccall@apple.com> Parse attributes on enumerators and instantiate attributes on enum decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
e1cbd4a33bdc4000b9274d49d06f83c9a3bc9b48 23-Oct-2010 Ted Kremenek <kremenek@apple.com> Fix a horrible bug in all dataflow analyses that use CFGRecStmtVisitor (including live variables analysis).
We shouldn't recurse into CompoundStmts since they are already inlined in the CFG. This could result in
bogus dead stores warnings (among other things).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
f50595df931bde89e3acd3ec18e4c7e41aa80852 23-Oct-2010 Ted Kremenek <kremenek@apple.com> Fix a horrible bug in all dataflow analyses that use CFGRecStmtVisitor (including live variables analysis).
We shouldn't recurse into CompoundStmts since they are already inlined in the CFG. This could result in
bogus dead stores warnings (among other things).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
a49254ea13f795120b78c810f98e5977bdafc9b0 22-Oct-2010 Dale Johannesen <dalej@apple.com> Change handling of inline asm 'p' constraint to match llvm-gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
cee55018570c0c46262c6e4ef7beaa707c93fc86 22-Oct-2010 Dale Johannesen <dalej@apple.com> Change handling of inline asm 'p' constraint to match llvm-gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
82254439b368de855d1e66440071017a1f2d4f0a 22-Oct-2010 John McCall <rjmccall@apple.com> Substantially revise how clang computes the visibility of a declaration to
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/LangOptions.h
lang/Basic/Visibility.h
1fb0caaa7bef765b85972274e3b434af2572c141 22-Oct-2010 John McCall <rjmccall@apple.com> Substantially revise how clang computes the visibility of a declaration to
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/LangOptions.h
lang/Basic/Visibility.h
50a1e03fa8e7f6c9dc4e2371675ac85126fce0ab 22-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> When we perform name lookup for a template, we may end up finding an
ambiguous name where none of the declarations found are actually
templates. In this case, make sure we clear out the ambiguous-path
data when recomputing the lookup result kind. Fixes PR8439.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
dd8c10fbd87f171e361a53c5835800369170123b 22-Oct-2010 Douglas Gregor <dgregor@apple.com> When we perform name lookup for a template, we may end up finding an
ambiguous name where none of the declarations found are actually
templates. In this case, make sure we clear out the ambiguous-path
data when recomputing the lookup result kind. Fixes PR8439.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
01c6e7fc0e480253e92e0ef4c292b5e5191d955b 22-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Teach the C++ simple-type-specifier parser and tentative parses about
protocol-qualified types such as id<Protocol>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9bd1d8d174a9d15ae343246c8322299248b9e92a 22-Oct-2010 Douglas Gregor <dgregor@apple.com> Teach the C++ simple-type-specifier parser and tentative parses about
protocol-qualified types such as id<Protocol>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9da3fb28306b09ca9a6f2cafc46fd45612b69549 21-Oct-2010 Ted Kremenek <kremenek@apple.com> Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and original
declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic.

Fixes <rdar://problem/7629420>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
788f489a37bf1150deb9378cec6a6eb902d0d1b2 21-Oct-2010 Ted Kremenek <kremenek@apple.com> Tweak diagnostics for redeclaration of a @property in a class extension where the redelcaration and original
declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic.

Fixes <rdar://problem/7629420>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f9cd9b022cc53a706f3da31f4b7c8a0702477c80 21-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose the declaration of template template parameters that
themselves have no template parameters. This is actually a restriction
due to the grammar of template template parameters, but we choose to
diagnose it in Sema to provide better recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
369ea27b56b89379023366ff1b8ab362b5709e4e 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Diagnose the declaration of template template parameters that
themselves have no template parameters. This is actually a restriction
due to the grammar of template template parameters, but we choose to
diagnose it in Sema to provide better recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
91d4578cba8b8bba891056b8b96583ec71023aac 21-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Always treat 'main' as an extern "C" function, so that we detect
redeclarations of main appropriately rather than allowing it to be
overloaded. Also, disallowing declaring main as a template.

Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
0bab54cf82cd679152197c7a2eb938f8aa9f07dd 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Always treat 'main' as an extern "C" function, so that we detect
redeclarations of main appropriately rather than allowing it to be
overloaded. Also, disallowing declaring main as a template.

Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
01e70084f5d9ddfbb09dcecb498ddce71a5c70ae 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Reorganize predefined macros for all Windows targets.

This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.

-fmsc-version=<version> (defaults to VS2003 (1300))

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
dae4ac4fe56ec60fc93b3e3c9f51e79e682084b9 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Reorganize predefined macros for all Windows targets.

This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.

-fmsc-version=<version> (defaults to VS2003 (1300))

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
d5513a31553eeb274a7dd16500a01a440297e7a5 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
20249a1af2e462dcafdd6a350f1c7967b264ff25 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
0fc35a77b2a5843fd536a5ad566e5f7779e9bb8c 21-Oct-2010 Craig Silverstein <csilvers2000@yahoo.com> Pass TInfo to CXXDestructorDecl::Create(), just like we do for other
function decls.

Reviewed by rjmccall and nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b41d899a6023385c00a61eb9dd3e44db9dc7994e 21-Oct-2010 Craig Silverstein <csilvers2000@yahoo.com> Pass TInfo to CXXDestructorDecl::Create(), just like we do for other
function decls.

Reviewed by rjmccall and nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
02674d29f57fddd07f4d6c987402d06b3697ddfa 21-Oct-2010 Ted Kremenek <kremenek@apple.com> Remove obsolete GRAuditor and GRSimpleAPICheck, which have been completely subsumed by the Checker interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRAuditor.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
f093350f76320909a015c82de60a500fdcaf5b8f 21-Oct-2010 Ted Kremenek <kremenek@apple.com> Remove obsolete GRAuditor and GRSimpleAPICheck, which have been completely subsumed by the Checker interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRAuditor.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
50ba139cfa4be3440baab636eca4a0c23c909ef3 21-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Extend the preprocessing record and libclang with support for
inclusion directives, keeping track of every #include, #import,
etc. in the translation unit. We keep track of the source location and
kind of the inclusion, how the file name was spelled, and the
underlying file to which the inclusion resolved.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116952 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
ecdcb883cbc6bb4a2445dc6f02d58d9bdb54a0ed 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Extend the preprocessing record and libclang with support for
inclusion directives, keeping track of every #include, #import,
etc. in the translation unit. We keep track of the source location and
kind of the inclusion, how the file name was spelled, and the
underlying file to which the inclusion resolved.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116952 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
f88466fb54e64d00906b04ab603c29ab02330551 20-Oct-2010 Craig Silverstein <csilvers2000@yahoo.com> Get FunctionDecl to recurse on FunctionTypeLoc rather than
FunctionType! I didn't realize it was available, until rjmccall
pointed out that DeclaratorDecl made the typeloc available. This
makes FunctionDecl recursion *much* easier, because the typeloc can
take care of default parameters, so we no longer have to do that
separately, which means we can just do a normal type traversal instead
of this special-case WalkUp stuff we did before.

The only downside -- and it's minor -- is that because the TypeLoc
handles both the return type and the argument types, we can't recurse
on the explicit template args in the right place (which would be
between them). I do it beforehand instead. So for
int MyFunc<float>(char x);
we get callbacks in the order: float, int, char.

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
536bab452fa38692834233187ed3d49b83722cb3 20-Oct-2010 Craig Silverstein <csilvers2000@yahoo.com> Get FunctionDecl to recurse on FunctionTypeLoc rather than
FunctionType! I didn't realize it was available, until rjmccall
pointed out that DeclaratorDecl made the typeloc available. This
makes FunctionDecl recursion *much* easier, because the typeloc can
take care of default parameters, so we no longer have to do that
separately, which means we can just do a normal type traversal instead
of this special-case WalkUp stuff we did before.

The only downside -- and it's minor -- is that because the TypeLoc
handles both the return type and the argument types, we can't recurse
on the explicit template args in the right place (which would be
between them). I do it beforehand instead. So for
int MyFunc<float>(char x);
we get callbacks in the order: float, int, char.

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
99b6f9ef71b7c888dabb5b0f0669e5ca2c70ddc3 20-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Fix handling of property and ivar lookup in typo correction; the two
kinds of lookup into Objective-C classes were tangled together, a
situation that was compounded by automatically synthesized ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
9a632eaa0ee73e4db701a8df74e92909d1fa350e 20-Oct-2010 Douglas Gregor <dgregor@apple.com> Fix handling of property and ivar lookup in typo correction; the two
kinds of lookup into Objective-C classes were tangled together, a
situation that was compounded by automatically synthesized ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
37ab30b1f7b9bf082b18d682753c2a549f9d99b5 20-Oct-2010 Anders Carlsson <andersca@mac.com> Add a __has_attribute macro that works much like __has_feature and __has_builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CMakeLists.txt
lang/Lex/CMakeLists.txt
lang/Lex/Makefile
lang/Lex/Preprocessor.h
lang/Makefile
cae5095c116c29a4e52c91fa0ad88df09dd2b45f 20-Oct-2010 Anders Carlsson <andersca@mac.com> Add a __has_attribute macro that works much like __has_feature and __has_builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CMakeLists.txt
lang/Lex/CMakeLists.txt
lang/Lex/Makefile
lang/Lex/Preprocessor.h
lang/Makefile
8c6a3fd44ea5d50dd977323a6f36da1d4d12515a 20-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a simple cache for unqualified typo corrections, so that we
don't repeatedly loop through identifiers, correcting the same typo'd
identifier over and over again.

We still bail out after 20 typo corrections, but this should help
improve performance in the common case where we're typo-correcting
because the user forgot to include a header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3eedbb06dd35b021bb614250585d4a6a5b7936e7 20-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce a simple cache for unqualified typo corrections, so that we
don't repeatedly loop through identifiers, correcting the same typo'd
identifier over and over again.

We still bail out after 20 typo corrections, but this should help
improve performance in the common case where we're typo-correcting
because the user forgot to include a header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
2f4f836275f21a0ad8b3bc0419acd1b3c3eedadb 20-Oct-2010 Ted Kremenek <kremenek@apple.com> Really^2 fix <rdar://problem/8361834>, this time without crashing.

Now MICache is a linked list (per the FIXME), where we tradeoff between MacroInfo objects being in MICache
and MIChainHead. MacroInfo objects in the MICache chain are already "Destroy()'ed", so they can be reused. When
inserting into MICache, we need to remove them from the regular linked list so that they aren't destroyed more than
once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
9714a2385cb66b6efa373fc668641de602dd9adb 20-Oct-2010 Ted Kremenek <kremenek@apple.com> Really^2 fix <rdar://problem/8361834>, this time without crashing.

Now MICache is a linked list (per the FIXME), where we tradeoff between MacroInfo objects being in MICache
and MIChainHead. MacroInfo objects in the MICache chain are already "Destroy()'ed", so they can be reused. When
inserting into MICache, we need to remove them from the regular linked list so that they aren't destroyed more than
once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
5735d6cabe1ecd06c0e4c220b37c7e955b9131c7 19-Oct-2010 Ted Kremenek <kremenek@apple.com> Simplify lifetime management of MacroInfo objects in Preprocessor by having the Preprocessor maintain them in a linked
list of allocated MacroInfos. This requires only 1 extra pointer per MacroInfo object, and allows us to blow them
away in one place. This fixes an elusive memory leak with MacroInfos (whose exact location I couldn't still figure
out despite substantial digging).

Fixes <rdar://problem/8361834>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
af8fa25c0d4e0540952a50bbd06dc1558954ccd9 19-Oct-2010 Ted Kremenek <kremenek@apple.com> Simplify lifetime management of MacroInfo objects in Preprocessor by having the Preprocessor maintain them in a linked
list of allocated MacroInfos. This requires only 1 extra pointer per MacroInfo object, and allows us to blow them
away in one place. This fixes an elusive memory leak with MacroInfos (whose exact location I couldn't still figure
out despite substantial digging).

Fixes <rdar://problem/8361834>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
87546e52faba58df3b4cf9f206ba7087371f4a9f 19-Oct-2010 John McCall <rjmccall@apple.com> MSVC space optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
35043e56150dc4eda882acd5ddfe0f8e3c0a8cb1 19-Oct-2010 John McCall <rjmccall@apple.com> MSVC space optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1e75edda2f03c9416845f86c8f69dfaff6eb262b 19-Oct-2010 John McCall <rjmccall@apple.com> Petty space optimizations in ElaboratedType and DependentNameType.
Petty time optimization in TemplateTypeParmType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
77be2b485f65ad134b3804a6930d5df9d0d974ce 19-Oct-2010 John McCall <rjmccall@apple.com> Petty space optimizations in ElaboratedType and DependentNameType.
Petty time optimization in TemplateTypeParmType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c31bd773bd43aa091aaf00e58e787deca354583f 19-Oct-2010 John McCall <rjmccall@apple.com> Redirect templated friend class decls to a new Sema callback and
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
9a34edb710917798aa30263374f624f13b594605 19-Oct-2010 John McCall <rjmccall@apple.com> Redirect templated friend class decls to a new Sema callback and
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
503fd9a22ff1fa9467e05f023fe4085671ed3204 19-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Tweak code-completion result priorities, so that exact and similar
type matches have a bigger impact. The impetus for this change was
that, when initializing an enumeration value, we want enumerators of
that enumeration type to have a higher priority than, e.g., unrelated
local variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
8ec904c151abf7ed0dc911258574a904ed97ff15 19-Oct-2010 Douglas Gregor <dgregor@apple.com> Tweak code-completion result priorities, so that exact and similar
type matches have a bigger impact. The impetus for this change was
that, when initializing an enumeration value, we want enumerators of
that enumeration type to have a higher priority than, e.g., unrelated
local variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
64303d028a514f286f44d9712cd15da96fd73538 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Reject -fasm-blocks except on X86 (where we just ignore it, since
passing it is very prevalent in some circles).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
25b26ebdebe46bb4576247e0c64d1c11410a8e9d 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Reject -fasm-blocks except on X86 (where we just ignore it, since
passing it is very prevalent in some circles).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
7bfeddd7b9c9426aa431e3b95b33a2d9ca4c6b85 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -c
-Wa,-force_cpusubtype_ALL t.c'.
- Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of
arguments and give an obvious unsupported error on others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
fcec10bded7b9b9268af5232fa17617db0df68ed 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -c
-Wa,-force_cpusubtype_ALL t.c'.
- Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of
arguments and give an obvious unsupported error on others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
7860004b4236a74a77ad6accf007dcaf96f3e325 18-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write declaration attributes from/to PCH properly. Embed them in the declaration block instead of trying to create another block.

The new block was messing with the assumption that after decls block comes the stmts block.
Fixes http://llvm.org/PR8406

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
4eb9fc0449ddbd5239ddc3ae6b6e52880f47dcf7 18-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write declaration attributes from/to PCH properly. Embed them in the declaration block instead of trying to create another block.

The new block was messing with the assumption that after decls block comes the stmts block.
Fixes http://llvm.org/PR8406

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
c7ac90f6529e272e5f9c76d6f8d5697edbadcf04 18-Oct-2010 Anders Carlsson <andersca@mac.com> Implement the first half of [dcl.attr.override]p6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
693d467ed44ecb754762aff129accce30c306422 18-Oct-2010 Anders Carlsson <andersca@mac.com> Implement the first half of [dcl.attr.override]p6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
32977822e1dd3ca3c74a9b93c58058f013138dd1 18-Oct-2010 Francois Pichet <pichet2000@gmail.com> Microsoft enum extensions. 2 things will change on -fms-extensions:
1. enum underlying type is int by default.
2. Error "enumerator value is not representable in the underlying type"is a ExtWarning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
842e7a22c6a0fbf0ccdb4bb9308d92ca9e9621f6 18-Oct-2010 Francois Pichet <pichet2000@gmail.com> Microsoft enum extensions. 2 things will change on -fms-extensions:
1. enum underlying type is int by default.
2. Error "enumerator value is not representable in the underlying type"is a ExtWarning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
794f42061ab1c80ddda685139040110d8f7f234b 18-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Add iteration over the preprocessor conditional stack to PreprocessorLexer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
6f2d1b111ed6d3c686303746e3949e3cbc9f3870 18-Oct-2010 Douglas Gregor <dgregor@apple.com> Add iteration over the preprocessor conditional stack to PreprocessorLexer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
1cb88d1b71caeca401d8412bc21e70adcaa4f6bb 18-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Add declarations nested in a linkage specification to the output of
-ast-print-xml, from Martin Vejnar!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
cf1123b648403f159aeb705e2b8b088258a277ff 18-Oct-2010 Douglas Gregor <dgregor@apple.com> Add declarations nested in a linkage specification to the output of
-ast-print-xml, from Martin Vejnar!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
3d796930a1057d682dd5f9b719f9f1a42c0d1377 18-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116699 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
237cf582b89bbcc22640cea15426ddc7ada8412b 18-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116699 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f3b5f4c9d263179521c3a87af3c595dcac078928 18-Oct-2010 Anders Carlsson <andersca@mac.com> Implement [dcl.attr.override]p2 and add tests for p1 and p2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4d09e84fbb0305372efc778a6770f0c3a5b5b2ae 18-Oct-2010 Anders Carlsson <andersca@mac.com> Implement [dcl.attr.override]p2 and add tests for p1 and p2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0a3d65c147e28d6d96bd64d454f8f0cfaf20c9c6 16-Oct-2010 John McCall <rjmccall@apple.com> White-listing templated-scope friend decls is a good idea, but doing it
by marking the decl invalid isn't. Make some steps towards supporting these
and then hastily shut them down at the last second by marking them as
unsupported.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
6102ca1d490836096678d7d934f0b2b78f9293ec 16-Oct-2010 John McCall <rjmccall@apple.com> White-listing templated-scope friend decls is a good idea, but doing it
by marking the decl invalid isn't. Make some steps towards supporting these
and then hastily shut them down at the last second by marking them as
unsupported.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
cb51bfe16c8176f9be54ea71eb294913306f81a6 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Error on -fno-for-scope, which we have no intention of supporting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
06205ca78ca2fd4384b237f120ec66614df0d9fc 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Error on -fno-for-scope, which we have no intention of supporting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b366986ba90b62e13a9562822179f488c1febcc5 15-Oct-2010 Francois Pichet <pichet2000@gmail.com> bool bit fields are causing problems with MSVC. Replace them with unsigned bit fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
bdb5b0e8ad8ed297ad01eb2ccd0d6d5ed6058033 15-Oct-2010 Francois Pichet <pichet2000@gmail.com> bool bit fields are causing problems with MSVC. Replace them with unsigned bit fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7ff72d413fc56a322f731667dc84608d2654f335 15-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Again, add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
2a8fe339fbcd92993a0e9568696ba165c2519fba 15-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Again, add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
fc2f8a26879d9748cfc1b8dc91677786bed35faa 15-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Revert r116605, a lot more were committed by mistake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
63d907bc55ccb6abfc57b409cab3cfa7c0d1f38a 15-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r116605, a lot more were committed by mistake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
736ecd779eeb123a1371ad43e4158896adbefccb 15-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
721f38c7f866259e1472af775239a83d8f06f6a8 15-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
c5507c6d7ca95f7668c8fedaa405b7a51693335a 15-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eradicate IsSuper field from ObjCImplicitSetterGetterRefExprClass
AST node. (finishing off radar 8525788).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
c44d91c446f6d59722da53dba9d686560e81b762 15-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eradicate IsSuper field from ObjCImplicitSetterGetterRefExprClass
AST node. (finishing off radar 8525788).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
e269fb9a54077307f5f07171eaafe55749770e4e 15-Oct-2010 Devang Patel <dpatel@apple.com> TBAA = Type Based Alias Analysis


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
be570121a6da523020c3b11eb15aba97becb5d2f 15-Oct-2010 Devang Patel <dpatel@apple.com> TBAA = Type Based Alias Analysis


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
7c7c1621dac8ca1e33a61e34084718f7bba146d9 15-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos (rdar://8513756).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
4045107b7384fd68eed5e3e2f06fc2a47e7be0a6 15-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos (rdar://8513756).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
ec07bdb2953f7b8e285270f0e1f1f1adc75f6961 15-Oct-2010 David Chisnall <csdavec@swan.ac.uk> Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116587 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
83889a7f1f338e343ef72aeeef9c27f7b62c0f0f 15-Oct-2010 David Chisnall <csdavec@swan.ac.uk> Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116587 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c2141810fbe4f332b6f4627216cdd268c5b90ee2 15-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose C++ [class.mem]p13-14, where a class member has the same name
as the class itself. Fixes PR7082.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a6e937ce32474934778346f4d51c3beec40e77ec 15-Oct-2010 Douglas Gregor <dgregor@apple.com> Diagnose C++ [class.mem]p13-14, where a class member has the same name
as the class itself. Fixes PR7082.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c0b7e94662d5aa0a2628940f9c43fbac84f7b008 15-Oct-2010 Craig Silverstein <csilvers2000@yahoo.com> Recurse on a TypeLoc rather than a Type for TypedefDecl, now that the
typloc information is available (I don't think it was, originally).
Submitted as a 'trivial' change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
84a8e0a846d658d784090c4f378cc1c6c6b0ef3f 15-Oct-2010 Craig Silverstein <csilvers2000@yahoo.com> Recurse on a TypeLoc rather than a Type for TypedefDecl, now that the
typloc information is available (I don't think it was, originally).
Submitted as a 'trivial' change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
68790944c3bb21baf8d3d28c9d4da5027f1bd229 15-Oct-2010 John McCall <rjmccall@apple.com> Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b6bbcc9995186799a60ce17d0c1acff31601653a 15-Oct-2010 John McCall <rjmccall@apple.com> Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
279a5508dec94431facaacc94ca54f44a04cdaf7 15-Oct-2010 Dan Gohman <gohman@apple.com> Wire up the -fstrict-aliasing and -fno-strict-aliasing options
to CodeGenOption flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
4d5625e15bb215c2241c022df8dc7b04438970c6 15-Oct-2010 Dan Gohman <gohman@apple.com> Wire up the -fstrict-aliasing and -fno-strict-aliasing options
to CodeGenOption flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
b9d1dba5986d9b5cd4e1a5ff93759b3704593829 15-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> When performing typo correction, look through the set of known
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results.

This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.

There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Basic/OnDiskHashTable.h
lang/Serialization/ASTReader.h
95f4292cc526c629fead321c7fcfd4fe0f3bc66e 15-Oct-2010 Douglas Gregor <dgregor@apple.com> When performing typo correction, look through the set of known
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results.

This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.

There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Basic/OnDiskHashTable.h
lang/Serialization/ASTReader.h
084ff0118a8a97513e725202a9ee4b35ed78a36c 14-Oct-2010 John McCall <rjmccall@apple.com> At Fariborz's request, a somewhat cleaner bit-combining hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b870b88df784c2940efce448ebfaf54dece14666 14-Oct-2010 John McCall <rjmccall@apple.com> At Fariborz's request, a somewhat cleaner bit-combining hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2d0ea41b33bb439ce5abcb1fcf7f217558b03644 14-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix compiler error that clang didn't report (probably same problem as rdar://8552377).

It's more stress-free without access checking though..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0f96abb17e21846fcd309a8002c6c91f95762b48 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix compiler error that clang didn't report (probably same problem as rdar://8552377).

It's more stress-free without access checking though..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b43819e11870c7e1f9fb8572c2b62a1c446c66ae 14-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Store in PCH the key function of C++ class to avoid deserializing the complete declaration context in order to compute it.
Progress for rdar://7260160.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
36d2fd44bfeec417bbd7465218353abb8bf7e95d 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Store in PCH the key function of C++ class to avoid deserializing the complete declaration context in order to compute it.
Progress for rdar://7260160.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
eba7248ef9edc233d7e1ed89347c4cf2d5c2b89b 14-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Allow deserialization of just the fields of a record, when we want to iterate over them,
instead of deserializing the complete declaration context of the record.

Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
eb5e9986e577b1e2bff3cca5973a2494fb593fbb 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow deserialization of just the fields of a record, when we want to iterate over them,
instead of deserializing the complete declaration context of the record.

Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
1d30f193b7bbcd697a26d68697fae3585453317a 14-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Give a default implementation for ASTDeserializationListener's methods, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
336d43a368cee30549dc21a94e25fb03f887a27e 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Give a default implementation for ASTDeserializationListener's methods, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
2d602ab01fe1ee87df29961b7b1bde328c8ef6a0 14-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce command line option -error-on-deserialized-decl that is accompanied by a name
and emits an error if a declaration with this name is deserialized from PCH.

This is for testing, to make sure that we don't deserialize stuff needlessly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/PreprocessorOptions.h
3e78593b1ced32b7e0a97da044213014ee0f6f7c 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce command line option -error-on-deserialized-decl that is accompanied by a name
and emits an error if a declaration with this name is deserialized from PCH.

This is for testing, to make sure that we don't deserialize stuff needlessly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/PreprocessorOptions.h
d5af1962ea1a1d9856e69ade6e1351180fce2719 14-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/PreprocessorOptions.h
b972858068d2ea77f72a1e7b1812b196afd6be2e 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/PreprocessorOptions.h
7241e85cb216e6d122511c74cd96d98d0fd77e30 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
8ac2d449820fd0df00fcbde5bf82165c1f49854d 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
f11e7f7a1d04438e9bacdcfb04a110ea01dcadee 14-Oct-2010 John McCall <rjmccall@apple.com> Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
ObjCObjectType into Type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
71c3673d1e3756d8ef3cbc559fcad1d0b2f18a1f 14-Oct-2010 John McCall <rjmccall@apple.com> Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
ObjCObjectType into Type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
8e6f2f55803397d4336538bed6f3f0972336ac9f 14-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose when a 'static' member function overrides a virtual function
in a base class. Fixes PR8168.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
a6c1e3a56afb76876cd06e3646fd7ca57a38d4bb 14-Oct-2010 Douglas Gregor <dgregor@apple.com> Diagnose when a 'static' member function overrides a virtual function
in a base class. Fixes PR8168.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
b8362891592542e17e04c727e5a3a8a0dd02a493 14-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Generalize the checking for qualification of (non-friend) class
members. Provide a hard error when the qualification doesn't match the
current class type, or a warning + Fix-it if it does match the current
class type. Fixes PR8159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
922fff2c9ef458fc04839e45a79552513f41ec7e 14-Oct-2010 Douglas Gregor <dgregor@apple.com> Generalize the checking for qualification of (non-friend) class
members. Provide a hard error when the qualification doesn't match the
current class type, or a warning + Fix-it if it does match the current
class type. Fixes PR8159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b7a3be5b188370142ec5ee75bb69bfa5b2f87f3c 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the use of ObjCSuperExpr in code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
6b0656a7c386662e1bec5f23a3bd0bf2687a9635 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate the use of ObjCSuperExpr in code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
435c73e3d72449bd1d8c791f14550caf38a393aa 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Update Type::BitsRemainingInType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
43c0a4cae05cf78225d5996cf7d62d7a133d665c 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Update Type::BitsRemainingInType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
581d2676f51f135e8a5c259cf3552f65cf321163 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> _Bool is not a keyword in C++. Fixes PR7388 and PR8349.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
3a43d8df596a0af13379c3d2a78e2f7e7b156f30 13-Oct-2010 Douglas Gregor <dgregor@apple.com> _Bool is not a keyword in C++. Fixes PR7388 and PR8349.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
db8039cddb29011414bee8cb01266e221262abf5 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Place conversion warnings for non-type template arguments under the
control of -Wconversion, and ignore them by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
171dcdb092232e5561152c334ce6d2836be33f0c 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Place conversion warnings for non-type template arguments under the
control of -Wconversion, and ignore them by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b0efb27f8928c8cdfd4b94b547ec9d87e31066cd 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a bit into Type that keeps track of whether there are any
unnamed or local types within that type. This bit is cached along with
the linkage of a type, so that it can be recomputed (e.g., when we see
that a typedef has given a name to an anonymous declaration).

Use this bit when checking C++03 [temp.arg.type]p2, so that we don't
walk template argument types repeatedly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
db4d4bb03df52920cf379797a7ff5c9900f938a6 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce a bit into Type that keeps track of whether there are any
unnamed or local types within that type. This bit is cached along with
the linkage of a type, so that it can be recomputed (e.g., when we see
that a typedef has given a name to an anonymous declaration).

Use this bit when checking C++03 [temp.arg.type]p2, so that we don't
walk template argument types repeatedly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7ad91b430acfc5360cf8dad23763b69f25855ff9 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a silly bug in the suppression of non-error diagnostics in a
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b535041ee33c5eff255832bc5541c8d52aae8254 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Fix a silly bug in the suppression of non-error diagnostics in a
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
e5ab6f7366103282ac9d851bd66b4a0d5e8e6819 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Compute whether a type is variably modified as we build the type,
rather than walking the type's structure every time we request this
information. Performance optimization; no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/Sema.h
35495eb14f22c4e96956912e23ca2a433227ad8c 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Compute whether a type is variably modified as we build the type,
rather than walking the type's structure every time we request this
information. Performance optimization; no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Sema/Sema.h
f69637ac15ea0a34a1e7df28d6f7b6e908eccbce 13-Oct-2010 John McCall <rjmccall@apple.com> Support friend function declarations in local classes correctly.
Fixes a crash and diagnoses the error condition of an unqualified
friend which doesn't resolve to something. I'm still not certain how
this is useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
29ae6e5fb001deddd831e66faf143ecd9e50f67c 13-Oct-2010 John McCall <rjmccall@apple.com> Support friend function declarations in local classes correctly.
Fixes a crash and diagnoses the error condition of an unqualified
friend which doesn't resolve to something. I'm still not certain how
this is useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5e513042ca50f0c19e8fa66ced95d8043415b31c 13-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce support for emitting diagnostics (warnings + their notes)
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point.

This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Sema/Sema.h
lang/Sema/TemplateDeduction.h
9b623639378d53a675921ddfa7316034d571881e 13-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce support for emitting diagnostics (warnings + their notes)
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point.

This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Sema/Sema.h
lang/Sema/TemplateDeduction.h
3012d21880276c87377e9cee335f5c6a15e0000d 12-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> If we end up instantiating a function parameter whose default argument
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
8cfb7a39caa44797522773cf417ad9c1a6ffbc6f 12-Oct-2010 Douglas Gregor <dgregor@apple.com> If we end up instantiating a function parameter whose default argument
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
d86fe478c3784909989d0a26ed7cb7f40e8168d1 12-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Parse default arguments within member functions in source order, from
Manuel Klimek! Fixes PR7715.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d54eb4410330383f48d3cc22b2ad8d23f120836b 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Parse default arguments within member functions in source order, from
Manuel Klimek! Fixes PR7715.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bbe88fcc15e071148c2a56d554d4f1f0ddcf0a53 12-Oct-2010 Chris Lattner <sabre@nondot.org> fix the definition of __builtin_constant_p, the first arg isn't a short.
Patch by the "pax team"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
12e9c6db87d58bfe23197e358864218624e27f41 12-Oct-2010 Chris Lattner <sabre@nondot.org> fix the definition of __builtin_constant_p, the first arg isn't a short.
Patch by the "pax team"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
e623a9ee0ecf0983949e4b627d4221e303dce876 12-Oct-2010 John McCall <rjmccall@apple.com> Progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2cd11fefb62c580651e4269e1488381c2d6d07ad 12-Oct-2010 John McCall <rjmccall@apple.com> Progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
708b5b01a614e256fb0a9c50d0b1d31f138cf2d4 12-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> When we load an ASTUnit from command-line arguments, hold on to the
diagnostics produced by the driver itself. Previously, we were
allowing these to either be dropped or to slip through to stderr.

Fixes <rdar://problem/7595339>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116285 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
4cd912aa94656697a44c3ebb159f05060300524e 12-Oct-2010 Douglas Gregor <dgregor@apple.com> When we load an ASTUnit from command-line arguments, hold on to the
diagnostics produced by the driver itself. Previously, we were
allowing these to either be dropped or to slip through to stderr.

Fixes <rdar://problem/7595339>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116285 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
13e47eecb1470d59e399952280e68c16e302c75d 12-Oct-2010 John McCall <rjmccall@apple.com> Add some infrastructure for dealing with expressions of 'placeholder' type,
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
2a984cad5ac3fdceeff2bd99daa7b90979313475 12-Oct-2010 John McCall <rjmccall@apple.com> Add some infrastructure for dealing with expressions of 'placeholder' type,
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
98002be420a4fe9548d7dcc48527ce76716d7021 12-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Remove a useless warning about missing runtime libraries. These
are almost never needed, so the warning isn't very useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
362ed7052071245c6c1b15d59c1973f8c80b0b2a 12-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Remove a useless warning about missing runtime libraries. These
are almost never needed, so the warning isn't very useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
2c3a26e07309d71be7686e744191fa77fb1fe468 12-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the (de-)serialization of code completion results, now that
libclang does not support out-of-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendOptions.h
lang/Sema/CodeCompleteConsumer.h
a9f4f620daf073805b89e893afcdc5eb7a9bdc50 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate the (de-)serialization of code completion results, now that
libclang does not support out-of-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendOptions.h
lang/Sema/CodeCompleteConsumer.h
4b8b94dd61d94ab477667c57b4e5222a09336f08 12-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate -fdiagnostics-binary and all of the infrastructure for
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
d3ab63e0f66429abf2a3e4cde889e420e41e8790 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate -fdiagnostics-binary and all of the infrastructure for
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
a77b023f5787779c899a1d686212d2814e74963a 11-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate clang_codeComplete(). libclang clients should be using the
faster, in-process, more-configurable clang_codeCompleteAt().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116245 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e0cc52ef8afc8d1cba9c534191b5f0ddaff1d694 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate clang_codeComplete(). libclang clients should be using the
faster, in-process, more-configurable clang_codeCompleteAt().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116245 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0c9397b58fe69d34f3111c8ffdd450b061eab8f6 11-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Switch c-index-test from clang_codeComplete() over to
clang_codeCompleteAt(). This uncovered a few issues with the latter:

- ASTUnit wasn't saving/restoring diagnostic state appropriately between
reparses and code completions.
- "Overload" completions weren't being passed through to the client



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
32be4a588fbb87d0d163ead49c42f5438bf0b2b7 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Switch c-index-test from clang_codeComplete() over to
clang_codeCompleteAt(). This uncovered a few issues with the latter:

- ASTUnit wasn't saving/restoring diagnostic state appropriately between
reparses and code completions.
- "Overload" completions weren't being passed through to the client



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
27f31e3268de8ab7c796f75b1255c7988d7a3b5d 11-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate clang_setUseExternalASTGeneration() from libclang. Between
improvements to the compiler and the introduction of crash recovery,
it no longer makes sense to allow this mode. Moreover, this eliminates
one use of the "clang" executable from within libclang; we'd like them
all to go away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116207 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b10daedb8fc4c6f70a66dbc1a6eea01684bb4e77 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate clang_setUseExternalASTGeneration() from libclang. Between
improvements to the compiler and the introduction of crash recovery,
it no longer makes sense to allow this mode. Moreover, this eliminates
one use of the "clang" executable from within libclang; we'd like them
all to go away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116207 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
dd312b31f9f1cc912df819cba0dd2b11d3f87879 11-Oct-2010 Francois Pichet <pichet2000@gmail.com> Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
334d47e92e9f241576fdeb7477b69a03136ba854 11-Oct-2010 Francois Pichet <pichet2000@gmail.com> Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bfc3e4cea94b98fd5b05a63f1d8ea4eb4ff99197 11-Oct-2010 Francois Pichet <pichet2000@gmail.com> Add 2 Microsoft compiler intrinsics that don't require prototypes:
__assume
__noop

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
b2419466892e5445fec6ce30f97784ae8b99f134 11-Oct-2010 Francois Pichet <pichet2000@gmail.com> Add 2 Microsoft compiler intrinsics that don't require prototypes:
__assume
__noop

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
75e0b8e039854095621567470b9c847b27cd9b51 11-Oct-2010 Axel Naumann <Axel.Naumann@cern.ch> Declare argv parameters as const char* const* instead of to char** to clarify that they are not modified, and to allow for string literals as arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptTable.h
lang/Frontend/CompilerInvocation.h
9d520c5ae802fc175c61032b289ddd6968e6ddd2 11-Oct-2010 Axel Naumann <Axel.Naumann@cern.ch> Declare argv parameters as const char* const* instead of to char** to clarify that they are not modified, and to allow for string literals as arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptTable.h
lang/Frontend/CompilerInvocation.h
fdb96458f6712b119e3d2a92df7a8e6221f5c012 11-Oct-2010 Axel Naumann <Axel.Naumann@cern.ch> Tighten up constness of argv parameters to allow for string literals as argumants and to reflect actual (non-modifying) use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
7d0c4ccd65b4549283c55e4923602e234f3811c5 11-Oct-2010 Axel Naumann <Axel.Naumann@cern.ch> Tighten up constness of argv parameters to allow for string literals as argumants and to reflect actual (non-modifying) use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
f6d9c70dad1e3e2f68bc39a496ff18c5fa82229d 10-Oct-2010 Chris Lattner <sabre@nondot.org> fix PR8217, a silent miscompilation of invalid code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
16c5dea6c2d3e4cf529de9d9b37f6a40441acb2c 10-Oct-2010 Chris Lattner <sabre@nondot.org> fix PR8217, a silent miscompilation of invalid code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
542fd21af294934cdc7135f0ef4e57c4b554f460 09-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Don't rely on a StringRef being null-terminated (it's not) for deprecation messages.
Store pointer and length of the message in DelayedDiagnostic and hide the gory union details.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
ce2d186a421526e94d9e417ced141ae6c891cf48 09-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Don't rely on a StringRef being null-terminated (it's not) for deprecation messages.
Store pointer and length of the message in DelayedDiagnostic and hide the gory union details.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
90205eb6e89e394165077b3b11a28b5939b571dc 09-Oct-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed __builtin_constant_p return type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
83a1c5c8996a68d9be4e54de27565ce037785df1 09-Oct-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed __builtin_constant_p return type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
df8e391abb083ea901108528cbd505980dccf695 09-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
bit by me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
1274ccd90aec0b205fc838c3d504821ccfb55482 09-Oct-2010 Douglas Gregor <dgregor@apple.com> Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
bit by me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
6479c5ffc1243ff87b9eeaf4b76f74ca9837e15e 08-Oct-2010 Zonr Chang <zonr@google.com> Include files in include/clang/Basic/Attr.td don't need to be modified from now on.
lang/Basic/Attr.td
da6e31859c8cf689235f63a2a5d71a2c62be8e53 08-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> When we encounter a '==' in a context expecting a '=', assume the user made a typo:

t.c:1:7: error: invalid '==' at end of declaration; did you mean '='?
int x == 0;
^~
=

Implements rdar://8488464.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
a6eb5f81d13bacac01faff70a947047725b4413f 08-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> When we encounter a '==' in a context expecting a '=', assume the user made a typo:

t.c:1:7: error: invalid '==' at end of declaration; did you mean '='?
int x == 0;
^~
=

Implements rdar://8488464.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
5a037ddb6945de3984afe3d0b14ae7cd71c75430 08-Oct-2010 John McCall <rjmccall@apple.com> Track the location of the context requiring an implicit conversion and use it
to white-list conversions required by system headers. rdar://problem/8232669



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
b4eb64d8426c0eaa58d398961e0e74ff85063d7c 08-Oct-2010 John McCall <rjmccall@apple.com> Track the location of the context requiring an implicit conversion and use it
to white-list conversions required by system headers. rdar://problem/8232669



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5775b4da486d47faac404597c46705ad007a3fb3 08-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Implement -fshort-enums (rdar://8490496).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
9a2b9d794bdf349b517ff799170f4409f45d147c 08-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -fshort-enums (rdar://8490496).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
6505cf576a0c7d347a60758420d8d0e341a30086 07-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch for adding message to unavailable attribute.
And its documentation.
Finishes off // rdar: // 6734520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
c784dc1caf0df288a383700f7b57772103b3adab 07-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch for adding message to unavailable attribute.
And its documentation.
Finishes off // rdar: // 6734520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
d3f30b30e27d2e7ec55aa9c9127a90d41434feaf 06-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Add message to attribute(deprecated).
attribute(unavailable) to do next.
// rdar:// 6734520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
c4b35cfdb977f6427fe0d5725bf104e1b425d72e 06-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Add message to attribute(deprecated).
attribute(unavailable) to do next.
// rdar:// 6734520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
df45c23a0a56459d8953de0602a36286abc182aa 06-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Reject the allocation of variably-modified types in C++ 'new'
expressions. Fixes PR8209 in the narrowest way possible. I'm still
considering whether I want to implement the extension that permits the
use of VLA types in a 'new' expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a0750768718bb5d05150641b5bba74847a21bc09 06-Oct-2010 Douglas Gregor <dgregor@apple.com> Reject the allocation of variably-modified types in C++ 'new'
expressions. Fixes PR8209 in the narrowest way possible. I'm still
considering whether I want to implement the extension that permits the
use of VLA types in a 'new' expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3ddf19e02a3c785afd01b517ca5a6be5ef875b88 06-Oct-2010 Francois Pichet <pichet2000@gmail.com> _inline is an alias for inline in MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
229ca4a04cd1f94ca5ce907638c699fd024a6347 06-Oct-2010 Francois Pichet <pichet2000@gmail.com> _inline is an alias for inline in MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
78cbead8031bc1e01a6734468e58dff1733159b7 06-Oct-2010 Nico Weber <nicolasweber@gmx.de> Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
a0f15b0848405ae16d63bd5d78c862a6526b338a 06-Oct-2010 Nico Weber <nicolasweber@gmx.de> Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
d4ec6719c325f215119826a8770b2459bb8e828f 06-Oct-2010 John McCall <rjmccall@apple.com> Provide a slightly specialized diagnostic for tautological comparisons
of an enum value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
372e103dab4239ec52b65b9eda69fd43c0b348d4 06-Oct-2010 John McCall <rjmccall@apple.com> Provide a slightly specialized diagnostic for tautological comparisons
of an enum value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
14b135ed28e79e44f1e3237209d24cac3af9e91b 06-Oct-2010 John McCall <rjmccall@apple.com> Use a more conventional/efficient implementation for isEnumeralType()
and isBuiltinType().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3ff83dd534ccc828203670ce3f5125a4eb4199f8 06-Oct-2010 John McCall <rjmccall@apple.com> Use a more conventional/efficient implementation for isEnumeralType()
and isBuiltinType().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ede69352f84b6dcbd643be99c036ed1df1827333 05-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Give every file that ASTReader loads a type: module, PCH, precompiled preamble or main file. Base Decls' PCHLevel on this to make it more sane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
lang/Serialization/ASTReader.h
1d9f1fe7173e3084325f43c78af812a36d8a2a7c 05-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Give every file that ASTReader loads a type: module, PCH, precompiled preamble or main file. Base Decls' PCHLevel on this to make it more sane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
lang/Serialization/ASTReader.h
c4b6d1b78d5bd753e4fb252354462299fe6cd7d7 05-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Thread PerFileData through the ASTReader again, this time with the LLVM changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
c3632730cc83ed7b51f0ab5c38997ae5a9439b0c 05-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Thread PerFileData through the ASTReader again, this time with the LLVM changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
5155f7f9b875f422a7cc25d9d66b12c3492a22df 05-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Register the __builtin_va_list_type node when we parse it, rather than
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
lang/Sema/Sema.h
4a1bb8c4d708d5594e62c9ec7e25e273cae8a1ed 05-Oct-2010 Douglas Gregor <dgregor@apple.com> Register the __builtin_va_list_type node when we parse it, rather than
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
lang/Sema/Sema.h
f2132ecf6389e72d23742103303e8f89bfd7dc4c 05-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added support for base and member destructors in destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
7c625d8ffc20b92fff9e1690cd2484fcb6498183 05-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added support for base and member destructors in destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
0c96a062ccfa67c646bb7d19d90fe43670aaec5c 04-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added support for C++ initializers in CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
82bc3fd823d85ee3ef9a641c0975b6ad25f55047 04-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added support for C++ initializers in CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
1297519aa63b7bd545c0561304aaf54b3648b14e 03-Oct-2010 Chris Lattner <sabre@nondot.org> Change to match 115473.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
374677ce3f4b09678c711b8ce4e7722a0898f048 03-Oct-2010 Chris Lattner <sabre@nondot.org> Change to match 115473.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
df8995765161a347c52ddf7b8dfb541ce6365586 03-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new libclang function, clang_getCursorDisplayName(), which
produces a simple "display" name that captures the
arguments/parameters for a function, function template, class
template, or class template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115428 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
358559d8d7b458c5f64941842383a16e61f0828d 03-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang function, clang_getCursorDisplayName(), which
produces a simple "display" name that captures the
arguments/parameters for a function, function template, class
template, or class template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115428 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8a5f0a71d1ed5488a15dfdd0b3e06f317cc151bb 02-Oct-2010 Chris Lattner <sabre@nondot.org> the mmx intrinsic for pshufw should map to the IR intrinsic, not
to a shufflevector. Otherwise it doesn't turn into a pshufw.
This bug was introduced in the mmx rewrite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
69993392d2e9e0560a184e65bdbe64527de3046f 02-Oct-2010 Chris Lattner <sabre@nondot.org> the mmx intrinsic for pshufw should map to the IR intrinsic, not
to a shufflevector. Otherwise it doesn't turn into a pshufw.
This bug was introduced in the mmx rewrite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
883e084ba4d2e295b8ee514da32de0b6fc214599 02-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> When we insert a category (or class extension) into an interface, mark
the interface as having changed since it was originally
serialized. This ensures that we see class extensions/categories in
chained PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5e9888c2786bfffa6879a08ff40f5a11545eec23 02-Oct-2010 Douglas Gregor <dgregor@apple.com> When we insert a category (or class extension) into an interface, mark
the interface as having changed since it was originally
serialized. This ensures that we see class extensions/categories in
chained PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a7ec0ba3eb635ca4d3ab134e974304e2eef0ce02 02-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Implement chained PCH support for the macro definitions stored within
the "detailed" preprocessing record.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
77424bc3794f569816dba52e423b57486a98e5ba 02-Oct-2010 Douglas Gregor <dgregor@apple.com> Implement chained PCH support for the macro definitions stored within
the "detailed" preprocessing record.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
7fc77a62f0ce5557946ef7bb552297571c26dcf3 02-Oct-2010 Anders Carlsson <andersca@mac.com> Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
42499be29b620d2eae34beb0f4d0f9da5a9584da 02-Oct-2010 Anders Carlsson <andersca@mac.com> Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
dac1e18dbd52db48af6a22074eaaccb91e640582 02-Oct-2010 Chris Lattner <sabre@nondot.org> kill off CheckX86BuiltinFunctionCall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
57a4087b349702062cd7c93735106270964be0d5 02-Oct-2010 Chris Lattner <sabre@nondot.org> kill off CheckX86BuiltinFunctionCall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c23313b4f417481cb24fc5286841bb8e62f82b0d 02-Oct-2010 Chris Lattner <sabre@nondot.org> move imperative code to declarative definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
b803c66ae4deedfdc62ad63c1d2ed9e2616529b5 02-Oct-2010 Chris Lattner <sabre@nondot.org> move imperative code to declarative definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
22d14e8ce25f73ad06931bbff0213882249829a3 02-Oct-2010 Chris Lattner <sabre@nondot.org> enhance ASTContext::GetBuiltinType to return a bitmask indicating which arguments
are required to be ICE's. No clients of this new functionality yet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
14e0e7436cf6650a72052baea1f8ebe644cef489 02-Oct-2010 Chris Lattner <sabre@nondot.org> enhance ASTContext::GetBuiltinType to return a bitmask indicating which arguments
are required to be ICE's. No clients of this new functionality yet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
aa36ba1eced17c88538ecd7aa24ed7b984f24330 01-Oct-2010 Francois Pichet <pichet2000@gmail.com> Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit.

Example:
class A {
void A::foo(); //warning: extra qualification on member 'foo'
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c71d8eb6592ae3ef498fc57db3563d1dfae48dff 01-Oct-2010 Francois Pichet <pichet2000@gmail.com> Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit.

Example:
class A {
void A::foo(); //warning: extra qualification on member 'foo'
};


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ee01aab5a30071b665fdb540a15010d5fc412fbe 01-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r115336 ("Thread PerFileData through everything."), because
we're missing the corresponding changes in the LLVM repository.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
b1a7d9a21bcfc295d1d899a42c0d14d617058c29 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Revert r115336 ("Thread PerFileData through everything."), because
we're missing the corresponding changes in the LLVM repository.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
35c0e1fe3629989863e862ec363acdf31060105d 01-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Extend libclang with an API that determines, given a C++ virtual
member function or an Objective-C method, which other member
functions/methods it overrides.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115338 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9f59234a91d057cee7c5e3cee91da8696858c692 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Extend libclang with an API that determines, given a C++ virtual
member function or an Objective-C method, which other member
functions/methods it overrides.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115338 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
527da7f067bb9cda02778ca440812859e1ca2ae7 01-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Thread PerFileData through everything. This allows us to remap stuff later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
dc928191a33be17f3b921c0616e6463312f439db 01-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Thread PerFileData through everything. This allows us to remap stuff later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
b136efcba2d5dc7fbe0bd0b334b5bc2c689eaf89 01-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Record module loaders and module source order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
a866e652875c61f09ac29c2f44009ce9f2a25cf2 01-Oct-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Record module loaders and module source order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
0c44dc7b280e169e50be910abc1b2c44fc8d035b 01-Oct-2010 Chris Lattner <sabre@nondot.org> fix a bogus "I" that I added to the per-function attribute list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
ae8f9fa5337236e7882bce0bba09bddc521b658c 01-Oct-2010 Chris Lattner <sabre@nondot.org> fix a bogus "I" that I added to the per-function attribute list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
b5288692a4e585568459261b8aa1ab5aa1aff524 01-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Implement the C++0x "trailing return type" feature, e.g.,

auto f(int) -> int

from Daniel Wallin!

(With a few minor bug fixes from me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
dab60ad68a3a98d687305941a3852e793705f945 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Implement the C++0x "trailing return type" feature, e.g.,

auto f(int) -> int

from Daniel Wallin!

(With a few minor bug fixes from me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/DeclSpec.h
968488bc2b43e040122e0a074daf1e078d9b8f8a 01-Oct-2010 Chris Lattner <sabre@nondot.org> Various builtins a require an integer constant. Not providing
one results in an obscure error from the backend that doesn't make
sense. Capture this information in the .def files for builtins with
a new "I" modifier letter indicating the an argument needs to be an ICE.

Nothing uses this yet, but sema will eventually enforce this (eliminating
some special cases from semachecking.cpp) and codegen will use this to
force an ICE value, preventing backend error messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/BuiltinsX86.def
393bd8e185692a451b2ba16bdfc9e7d3543b4217 01-Oct-2010 Chris Lattner <sabre@nondot.org> Various builtins a require an integer constant. Not providing
one results in an obscure error from the backend that doesn't make
sense. Capture this information in the .def files for builtins with
a new "I" modifier letter indicating the an argument needs to be an ICE.

Nothing uses this yet, but sema will eventually enforce this (eliminating
some special cases from semachecking.cpp) and codegen will use this to
force an ICE value, preventing backend error messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/BuiltinsX86.def
971b75de8647f4bbce6b7580899eb0e222453409 01-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added methods for inserting CFGAutomaticObjDtors to CFGBlocks,
Fixed some misspells in comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
53de134e7b4686eed40bc031438d8a4560a2cda4 01-Oct-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added methods for inserting CFGAutomaticObjDtors to CFGBlocks,
Fixed some misspells in comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
20bbddf97ff0fbaa171310567b9bee78155d50f9 30-Sep-2010 Devang Patel <dpatel@apple.com> Introduce -flimit-debug-info.
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
c69e1cf04323f2e786d40e8a5ba84e77ee1c6827 30-Sep-2010 Devang Patel <dpatel@apple.com> Introduce -flimit-debug-info.
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
cc2be05b3c5d4e654fb9e3fe67625f46c6da9480 30-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Driver: Ignore the found PCH file if its '-include' is not the first one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
990142a23e41392ef7c0f14db4c0fcac67311cdf 30-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Driver: Ignore the found PCH file if its '-include' is not the first one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
6629b7e6af6beb90d8838d8af24cccb02f67aa56 30-Sep-2010 Gabor Greif <ggreif@gmail.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
138d6a6890c171068ac60430431eaadb3fcef9ab 30-Sep-2010 Gabor Greif <ggreif@gmail.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
809f4dbe78085c5fbebd490877ac17d7dc8316f5 30-Sep-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added two new command line arguments:
-cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true,
-cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
9121ba232903ebe61e7bbe14ca294cf0f07dfa96 30-Sep-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added two new command line arguments:
-cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true,
-cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
8940a8478f514a24fcf480a4c52f5886e545c0c3 30-Sep-2010 Ted Kremenek <kremenek@apple.com> Change CheckerVisitor so that [Pre,Post]VisitCallExpr only handles CallExprs for simple C functions, not
all CallExprs (including CXXMemberCallExpr, etc.). Now the generic handler for all CallExprs is [Pre,Post]VisitGenericCallExpr.

Also add [Pre,Post]Visit hooks for CXXMemberCallExpr.

Change GRExprEngine::VisitCXXMemberCallExpr() to do pre/post checker visits of the call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
3fc1f8239ea0671fcf707a80473de05b4392a58e 30-Sep-2010 Ted Kremenek <kremenek@apple.com> Change CheckerVisitor so that [Pre,Post]VisitCallExpr only handles CallExprs for simple C functions, not
all CallExprs (including CXXMemberCallExpr, etc.). Now the generic handler for all CallExprs is [Pre,Post]VisitGenericCallExpr.

Also add [Pre,Post]Visit hooks for CXXMemberCallExpr.

Change GRExprEngine::VisitCXXMemberCallExpr() to do pre/post checker visits of the call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
70331cc565257d7959a68e168e2b820c15b690ef 30-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make the FileID import map key on FileID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
535a3e20104461c136654d59fb833ae80644ae79 30-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make the FileID import map key on FileID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
c4d9baf786a56fe3340f6a6e24d8b944efb06662 30-Sep-2010 Tom Care <tcare@apple.com> Change -analyzer-max-nodes to allow 0 as a parameter. This allows the analyzer to completely analyze a worklist regardless of time taken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
cf9ce13774dad86f780d84cd41e6bd64c039324a 30-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Change -analyzer-max-nodes to allow 0 as a parameter. This allows the analyzer to completely analyze a worklist regardless of time taken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
11945cdd26880b4a5d32137f1e1deda568583414 30-Sep-2010 Devang Patel <dpatel@apple.com> ImplicitParamDecl is always implicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
638bb114199590534d684585155807f0a4cfcd3d 30-Sep-2010 Devang Patel <dpatel@apple.com> ImplicitParamDecl is always implicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
129d24edef6c3a5e873bdf4c4def760f97426549 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Basic: Simplify getClangRepositoryPath and getClangRevision.

- I don't like returning StringRef's ever, unless it is actually important for
performance, which it isn't here.

- Also, stop validating getClangRevision to be an integer, I don't see a good
reason to do this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
16a8fb7e9dd4a0347f7ed676e2d9bd254e1ea5b0 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Basic: Simplify getClangRepositoryPath and getClangRevision.

- I don't like returning StringRef's ever, unless it is actually important for
performance, which it isn't here.

- Also, stop validating getClangRevision to be an integer, I don't see a good
reason to do this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
27933bf89fd147c770a03315b7ceeceaf6e5b76f 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Add support for attribute((naked)), patch by Zoxc on cfe-commits!
- Minor style tweaks by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
dd0cb22bd62e1e835327f478a2dbf0b8fa439713 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Add support for attribute((naked)), patch by Zoxc on cfe-commits!
- Minor style tweaks by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Sema/AttributeList.h
4044c38752efedec8ecd749b059b693c894a39e2 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Basic: Add support for git svn to get the repo version in clang executable,
patch by Jonathan Mulder!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
640cf37c9432031412a9d3b8c2abcdff4f7f0e97 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Basic: Add support for git svn to get the repo version in clang executable,
patch by Jonathan Mulder!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
1c0131e5b7914bfd65abf07004f07c5881591fdc 29-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Move the management of the set of conversion functions in a C++ class
into CXXRecordDecl. The only part that we do not handle this way are
using declarations, since that would require extra name lookup that we
don't currently want to pay for. This fixes <rdar://problem/8459981>,
so that LLDB can build a CXXRecordDecl and magically get all of the
right bits set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e80622fd48261b6e5c7e6629dcfee2f76b124487 29-Sep-2010 Douglas Gregor <dgregor@apple.com> Move the management of the set of conversion functions in a C++ class
into CXXRecordDecl. The only part that we do not handle this way are
using declarations, since that would require extra name lookup that we
don't currently want to pay for. This fixes <rdar://problem/8459981>,
so that LLDB can build a CXXRecordDecl and magically get all of the
right bits set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
423636009aa13579999ea436e48e0f04ec77338b 29-Sep-2010 Craig Silverstein <csilvers2000@yahoo.com> Visit the type information for CXXUnresolvedConstructExpr, just like
we do for the similar CXXTemporaryObjectExpr. OKed by chandlerc and
wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
ac45ad57f0641b0d556ca27d19a59930925d6add 29-Sep-2010 Craig Silverstein <csilvers2000@yahoo.com> Visit the type information for CXXUnresolvedConstructExpr, just like
we do for the similar CXXTemporaryObjectExpr. OKed by chandlerc and
wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
62ad8842288762f483eba3af9e9956e3444b281e 29-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Move the maintenance of CXXRecordDecl::DefinitionData's Abstract bit
completely into CXXRecordDecl, by adding a new completeDefinition()
function. This required a little reshuffling of the final-overrider
checking code, since the "abstract" calculation in the presence of
abstract base classes needs to occur in
CXXRecordDecl::completeDefinition() but we don't want to compute final
overriders more than one in the common case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
7a39dd01edc43aa5f058e7259a39737fc1f43792 29-Sep-2010 Douglas Gregor <dgregor@apple.com> Move the maintenance of CXXRecordDecl::DefinitionData's Abstract bit
completely into CXXRecordDecl, by adding a new completeDefinition()
function. This required a little reshuffling of the final-overrider
checking code, since the "abstract" calculation in the presence of
abstract base classes needs to occur in
CXXRecordDecl::completeDefinition() but we don't want to compute final
overriders more than one in the common case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
f48dc0e6de265a849c4ef938ba6666b679c9e0b6 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Teach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in
CXXRecordDecl::DefinitionData, rather than having Sema mark the bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
2138664dd2cff39de52ff11ca35f653c20b2e4b0 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in
CXXRecordDecl::DefinitionData, rather than having Sema mark the bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
88a8e683b56be0b9629d7c58d0d5423058132a57 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate r114925 and r114929, both steps toward
<rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
85606ebf3dd1b5dd81a59ef25b5ad47627664774 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Reinstate r114925 and r114929, both steps toward
<rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
322b648bf29f1f9f92be9bb00a5570fd3a3649b5 28-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> vla expressions used in __typeof__ must be evaluated.
Fixes rdar://8476159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
c5be7b0fc804d8e6f87298ec03c94d8cccd74f29 28-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> vla expressions used in __typeof__ must be evaluated.
Fixes rdar://8476159.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Sema.h
13a6750d53b50870295e599cee062c3c299e5b55 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Centralize the management of CXXRecordDecl::DefinitionData's Empty bit
in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>.

This reinstates r114924, with one crucial bug fix: we were ignoring
the implicit fields created by anonymous structs/unions when updating
the bits in CXXRecordDecl, which means that a class/struct containing
only an anonymous class/struct would be considered "empty". Hilarity
follows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
2cf9d656f6283f2a8be0549da110d7cfbb1ea4b2 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's Empty bit
in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>.

This reinstates r114924, with one crucial bug fix: we were ignoring
the implicit fields created by anonymous structs/unions when updating
the bits in CXXRecordDecl, which means that a class/struct containing
only an anonymous class/struct would be considered "empty". Hilarity
follows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e2651962fb1cd59f2f63e5757b409a46a34b304b 28-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Follow-up to r114978, used wrong tag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
b3737e4fcddbf1c3126eb853c0e3b366b35ceaba 28-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Follow-up to r114978, used wrong tag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
a96b2852af2b6c4bdf696d890401673c7d503771 28-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Move ExternalSemaSource::ReadMethodPool's implementation to Sema.cpp so that the header can get away with forward declarations only for ObjCMethodList and Selector. Fixes <rdar://8467631>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
8c84571f3e262569ba51d107db7ab31a23de79b3 28-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Move ExternalSemaSource::ReadMethodPool's implementation to Sema.cpp so that the header can get away with forward declarations only for ObjCMethodList and Selector. Fixes <rdar://8467631>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ExternalSemaSource.h
a420ef387d84290854387e4735a3ca3ab13aa562 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate r114921, which I've exonerated via a self-host build.

Centralize the management of CXXRecordDecl::DefinitionData's Aggregate
and PlainOldData bits in CXXRecordDecl itself. Another milepost on the
road toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9fe183ae1ec568716501f861235afecebee8cd45 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Reinstate r114921, which I've exonerated via a self-host build.

Centralize the management of CXXRecordDecl::DefinitionData's Aggregate
and PlainOldData bits in CXXRecordDecl itself. Another milepost on the
road toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8cfc0311e19291b2d33a434fb1ce78ce7e69974c 28-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
1a18600b85aaa691122983dd8dcf4225cfc9ef68 28-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
99c210e3c34130c08b1ce86ffc2b594a087cb354 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert 114929 114925 114924 114921. It looked like they (or at least
one of them) was causing a series of failures:

http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518

svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114929 into '.':
U include/clang/Sema/Sema.h
U include/clang/AST/DeclCXX.h
U lib/Sema/SemaDeclCXX.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaDecl.cpp
U lib/Sema/SemaTemplateInstantiate.cpp
U lib/AST/DeclCXX.cpp
svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114925 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/AST/DeclCXX.cpp
svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114924 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp
U lib/AST/ASTContext.cpp
svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114921 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
2a674e8e443b7a3e77957078248fb52b3b1ec321 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert 114929 114925 114924 114921. It looked like they (or at least
one of them) was causing a series of failures:

http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518

svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114929 into '.':
U include/clang/Sema/Sema.h
U include/clang/AST/DeclCXX.h
U lib/Sema/SemaDeclCXX.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaDecl.cpp
U lib/Sema/SemaTemplateInstantiate.cpp
U lib/AST/DeclCXX.cpp
svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114925 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/AST/DeclCXX.cpp
svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114924 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp
U lib/AST/ASTContext.cpp
svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114921 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
36da5c4ee51506f0c0a95008872e281a373498e1 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Centralize the management of CXXRecordDecl::DefinitionData's
HasTrivialConstructor, HasTrivialCopyConstructor,
HasTrivialCopyAssignment, and HasTrivialDestructor bits in
CXXRecordDecl's methods. This completes all but the Abstract bit and
the set of conversion functions, both of which will require a bit of
extra work. The majority of <rdar://problem/8459981> is now
implemented (but not all of it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
e10288c1e9e06dbd715f47bfaa22ce5d65fdf096 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's
HasTrivialConstructor, HasTrivialCopyConstructor,
HasTrivialCopyAssignment, and HasTrivialDestructor bits in
CXXRecordDecl's methods. This completes all but the Abstract bit and
the set of conversion functions, both of which will require a bit of
extra work. The majority of <rdar://problem/8459981> is now
implemented (but not all of it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Sema/Sema.h
cbd60a6b8b2a296e3a68b92a8398a4dedcfc950d 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Centralize the management of CXXRecordDecl::DefinitionData's
Polymorphic bit in CXXRecordDecl itself. Yes, this is also part of
<rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
4a74df5901330c577d0a30d052338d06bbf9e279 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's
Polymorphic bit in CXXRecordDecl itself. Yes, this is also part of
<rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
921255c54a74568ce4cf22e2ad0be6f2d8a40efc 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Centralize the management of CXXRecordDecl::DefinitionData's Empty bit
in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
cdbfa6c4113411debfed9ffec2a45bd50b13e10f 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's Empty bit
in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
af80314a085ba7ee3ca18ca97e75806c87adef02 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Centralize the management of CXXRecordDecl::DefinitionData's Aggregate
and PlainOldData bits in CXXRecordDecl itself. Another milepost on the
road toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6e3c7713ca126c76053cc092670a949a5e15ddaf 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the management of CXXRecordDecl::DefinitionData's Aggregate
and PlainOldData bits in CXXRecordDecl itself. Another milepost on the
road toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
cb807137848e8b6585f1d58ebfe53729131d9afa 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Centralize the handling of CXXRecordDecl::DefinitionData's
DeclaredDestructor and UserDeclaredDestructor bits in CXXRecordDecl
itself. Another step on the road to <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0ed2e0823cc7b727abd9307db4cd887f293eebe2 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the handling of CXXRecordDecl::DefinitionData's
DeclaredDestructor and UserDeclaredDestructor bits in CXXRecordDecl
itself. Another step on the road to <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d01c4c7e227fce7200b84349859b8c50ee0a35bb 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Kill FunctionDecl's IsCopyAssignment bit; it duplicated what could
already be determined by isCopyAssignmentOperator(), and was set too
late in the process for all clients to see the appropriate
value. Cleanup only; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3e9438b5251a547253d64169863c2909b9b2772a 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Kill FunctionDecl's IsCopyAssignment bit; it duplicated what could
already be determined by isCopyAssignmentOperator(), and was set too
late in the process for all clients to see the appropriate
value. Cleanup only; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e6899d6429bf0d3a7b63c5b63b1b5e5e0aff71ae 28-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When chaining PCHs, only write PPRecords that don't come from PCH, and give them the correct IDs. Fixes a crash in XCode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
b57a624f22b1efa873e0abac78128b69fba3d486 28-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When chaining PCHs, only write PPRecords that don't come from PCH, and give them the correct IDs. Fixes a crash in XCode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
5889acf37f03a14ba7eb3406572f10d95f785e6b 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Centralize the handling of
CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for
copy-assignment operators. Another step toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
27c08ab4859d071efa158a256f7e47e13d924443 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Centralize the handling of
CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for
copy-assignment operators. Another step toward <rdar://problem/8459981>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
28abaf338c3165a1b14bb91b1e649b4ece22e02e 27-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Clean up the handling of the DeclaredDefaultConstructor and
DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData
structure. Rather than having Sema call addedConstructor or set the
bits directly at semi-random places, move all of the logic for
managing these bits into CXXRecordDecl itself and tie the
addedConstructor call into DeclContext::addDecl().

This makes it easier for AST-building clients to get the right bits
set in DefinitionData, and is one small part of <rdar://problem/8459981>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5c0646b98b203d105c10ad8cc11be11cc99a4218 27-Sep-2010 Douglas Gregor <dgregor@apple.com> Clean up the handling of the DeclaredDefaultConstructor and
DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData
structure. Rather than having Sema call addedConstructor or set the
bits directly at semi-random places, move all of the logic for
managing these bits into CXXRecordDecl itself and tie the
addedConstructor call into DeclContext::addDecl().

This makes it easier for AST-building clients to get the right bits
set in DefinitionData, and is one small part of <rdar://problem/8459981>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
775f78c28e75bff16228284ca48b9016fd676b5c 27-Sep-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Teach clang -cc1as to respond to -v.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
e830a36053282aadb9603cb8af14a9f5b9c32968 27-Sep-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Teach clang -cc1as to respond to -v.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
217957c33d3f897d5130da13c0d3d860e53c5b4e 27-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Issue warning for trivial cases of nonnull attributes
(on functions with no pointer arguments) but only when
the attribute has not been coming from a macro
instantiation in a header file. Fixes first part
of radar 6857843.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
60acea49c1343e5494edb6da20cac6f9d0b6cfb0 27-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Issue warning for trivial cases of nonnull attributes
(on functions with no pointer arguments) but only when
the attribute has not been coming from a macro
instantiation in a header file. Fixes first part
of radar 6857843.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1e0b09960fbaa8391cc9f662cd1cfc9ba7f5f03f 24-Sep-2010 Anders Carlsson <andersca@mac.com> Allow the use of C++0x deleted functions as an extension in C++98.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
37bf9d2bb74944c9d9a52522412bc077629977f1 24-Sep-2010 Anders Carlsson <andersca@mac.com> Allow the use of C++0x deleted functions as an extension in C++98.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
634b52e0ce0aa85678730fefb0d95958d8ad4c94 24-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -fallow-unsupported which disables some of the eager error'ing we do
to prevent users from trying unsupported stuff. Useful for testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
e94db4771856659c12e1f269141cbbc4e55b1c47 24-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -fallow-unsupported which disables some of the eager error'ing we do
to prevent users from trying unsupported stuff. Useful for testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
0f881c3735a8f5962943d799105adb63a873a2c2 24-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements passing arrays to functions expecting
vla. Implements pr7827.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Sema/Initialization.h
745da3a5bb4ea35f93f50301e7fbbb7d78d3b6bb 24-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements passing arrays to functions expecting
vla. Implements pr7827.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Sema/Initialization.h
a9b976bc0d468dc6183fae093193ccb992999e33 24-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Synchronize globally-cached code completion results with the results
provided when the optimization is disabled. In particular, split
the completion context CCC_Other into two contexts: CCC_Other, which
means that it's an undisclosed context for which any other results are
unwelcome, and CCC_Recovery, which is used in recovery cases.

Since we're now using the completion context within the completion
results builder, make sure that it's always set to something.

Fixes <rdar://problem/8470644>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
52779fb71795534d0447f6f4d4a6f6a7b09c4639 24-Sep-2010 Douglas Gregor <dgregor@apple.com> Synchronize globally-cached code completion results with the results
provided when the optimization is disabled. In particular, split
the completion context CCC_Other into two contexts: CCC_Other, which
means that it's an undisclosed context for which any other results are
unwelcome, and CCC_Recovery, which is used in recovery cases.

Since we're now using the completion context within the completion
results builder, make sure that it's always set to something.

Fixes <rdar://problem/8470644>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
32ddc13725ed12b277cfbac78e76587173f259f4 23-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DependencyOutputOptions.h
b17cc9e904c277b97cc4d57227122acd8d46ed36 23-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DependencyOutputOptions.h
7d947fe10b56e799604199fb20a6684a0d002218 23-Sep-2010 Ted Kremenek <kremenek@apple.com> For properties declared in a @protocol and redeclared in a class extension, use the class extension
as the lexical DeclContext for the @property declaration that gets auto-created for the @interface.

Fixes: <rdar://problem/8467189>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4a2e9ea0c191176ebe996516a9cf4f93b7e932cc 23-Sep-2010 Ted Kremenek <kremenek@apple.com> For properties declared in a @protocol and redeclared in a class extension, use the class extension
as the lexical DeclContext for the @property declaration that gets auto-created for the @interface.

Fixes: <rdar://problem/8467189>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
7d8a0be163216dba2a67d7f9e169f3ca7bb5373c 23-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Don't crash on _Imaginary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
47423bdaa06a3b9c2a859b57c17fc570094dad1c 23-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't crash on _Imaginary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cf86eeaeb1a02cdb8b9a136e7cee4e222b71535d 23-Sep-2010 Ted Kremenek <kremenek@apple.com> Refactor GRExprEngine::VisitCall() to use EvalArguments(), just like VisitCXXMemberCallExpr(). Ideally we should unify these code paths as much as possible, since they only differ by a few details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
c69c43845aa3ede95af837b8be52868eca55d64d 23-Sep-2010 Ted Kremenek <kremenek@apple.com> Refactor GRExprEngine::VisitCall() to use EvalArguments(), just like VisitCXXMemberCallExpr(). Ideally we should unify these code paths as much as possible, since they only differ by a few details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
30e05339179a01878a39959321f33d14fd4086eb 22-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Implement libclang API functions for retrieving the lexical and
semantic parents of the given cursor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114587 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2be5bc9ad3981347a000742f81b91ab3080f1214 22-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang API functions for retrieving the lexical and
semantic parents of the given cursor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114587 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
bb9395de808c1353acedd6966bad95ca064b0cbc 22-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Change source manager serialization to be less tied to the PCH model.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
8db9faed418ea743f55c31e1ccecadbb23bd55b7 22-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Change source manager serialization to be less tied to the PCH model.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
003a582e6b61ab0c76db684c90147f8aab723681 22-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Implement -Wpadded and -Wpacked.

-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)
-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect
on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.

The warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.
To avoid calculating the layouts of all structs regardless of whether they are needed or not,
I let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings
will be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:

$ cat t.c
struct S {
char c;
int i;
};
void f(struct S* s) {}

$ clang -fsyntax-only -Wpadded t.c
$ clang -c -Wpadded t.c -o t.o
t.c:3:7: warning: padding struct 'struct S' with 3 bytes to align 'i' [-Wpadded]
int i;
^
1 warning generated.

This is a good tradeoff between providing the warnings and not calculating layouts for all
structs in case the user has enabled a couple of rarely used warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/SourceManager.h
78a916ec5ff5b66adec3c499e1b9af7b87668309 22-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -Wpadded and -Wpacked.

-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)
-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect
on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.

The warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.
To avoid calculating the layouts of all structs regardless of whether they are needed or not,
I let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings
will be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:

$ cat t.c
struct S {
char c;
int i;
};
void f(struct S* s) {}

$ clang -fsyntax-only -Wpadded t.c
$ clang -c -Wpadded t.c -o t.o
t.c:3:7: warning: padding struct 'struct S' with 3 bytes to align 'i' [-Wpadded]
int i;
^
1 warning generated.

This is a good tradeoff between providing the warnings and not calculating layouts for all
structs in case the user has enabled a couple of rarely used warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/SourceManager.h
4552516100493debb4763258ae417e69a856b8b9 22-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Only preload SLocEntries after the entire PCH chain was loaded.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
4ee5a6f9bd82ab3c1a4bdacc0caefe7d5f8bd37a 22-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Only preload SLocEntries after the entire PCH chain was loaded.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
dd7df08432a8db9dfa9934468fab3b82823f377a 22-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reshuffle PerFileData's members to make more sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
301c9b0b6722293f1b9d870815ae11e1ffc3245d 22-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reshuffle PerFileData's members to make more sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
54ee9141a7eb8f7805d261770ff9b9fbe0b3d518 21-Sep-2010 Ted Kremenek <kremenek@apple.com> For ObjCPropertyDecls in class extensions, use the class extension as the lexical DeclContext for newly created
ObjCMethodDecls. Further, use the location of the new property declaration as the location of new ObjCMethodDecls
(if they didn't previously exist).

This fixes more of the issues reported in <rdar://problem/7410145>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
8254aa62d9189395be1eed61194cd4b5ee6cb4a2 21-Sep-2010 Ted Kremenek <kremenek@apple.com> For ObjCPropertyDecls in class extensions, use the class extension as the lexical DeclContext for newly created
ObjCMethodDecls. Further, use the location of the new property declaration as the location of new ObjCMethodDecls
(if they didn't previously exist).

This fixes more of the issues reported in <rdar://problem/7410145>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
103d7132048e0d9c515247a3f4c8173b264283bf 21-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add code completion for C++ constructors wherever we see the class (or
class template) and are in a context where we can have a value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
6f942b2cabf32b96f9901b889d8e44a34e0e7c62 21-Sep-2010 Douglas Gregor <dgregor@apple.com> Add code completion for C++ constructors wherever we see the class (or
class template) and are in a context where we can have a value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
5914bd8ab19c1e7bc190c6bc916436e5a8f64c10 21-Sep-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added:
- definitions of interfaces for CFGInitializer and CFGAutomaticObjDtor,
- support for above classes to print_elem function (renamed print_stmt),
- support for VarDecls in StmtPrinterHelper.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
1cff132e48e0ccc253c34e5a2fb12718bd4e7d2e 21-Sep-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added:
- definitions of interfaces for CFGInitializer and CFGAutomaticObjDtor,
- support for above classes to print_elem function (renamed print_stmt),
- support for VarDecls in StmtPrinterHelper.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
be517a144c068af2f843b24c8882f63c31b8bd9b 21-Sep-2010 Bill Wendling <isanbard@gmail.com> Add a comment explaining why the MMX builtins are segregated and what we plan on
doing with them. It's a "FIXME" right now because this change hasn't been
implemented yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
2e81caa14337cfa8973a1a073ef4dbbb8273238c 21-Sep-2010 Bill Wendling <isanbard@gmail.com> Add a comment explaining why the MMX builtins are segregated and what we plan on
doing with them. It's a "FIXME" right now because this change hasn't been
implemented yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
6f5f1ab70eb0ec5831d86bea8cdde46f938b3e15 21-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Refactor code completion for expressions that occur as arguments in
Objective-C message sends. There is no functionality change here; this
is prep work for using the parameter types to help guide the
expression results when code-completing the argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
70c5ac70ace21b011dc2d4001bae26cdcf62ff8d 21-Sep-2010 Douglas Gregor <dgregor@apple.com> Refactor code completion for expressions that occur as arguments in
Objective-C message sends. There is no functionality change here; this
is prep work for using the parameter types to help guide the
expression results when code-completing the argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f0939c45579e3a6e35fde072ddd3428bb5972e37 21-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Code completion has no reason to prefer values over types, especially
at the statement level or in Objective-C message receivers. Therefore,
just give types and declarations the same basic priority, and adjust
from there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
08f43cd5d966fd31b32bd5c76c0645ebbf08b2f1 21-Sep-2010 Douglas Gregor <dgregor@apple.com> Code completion has no reason to prefer values over types, especially
at the statement level or in Objective-C message receivers. Therefore,
just give types and declarations the same basic priority, and adjust
from there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
0e23bda3536664f90b13194f48e5d16910e713f8 21-Sep-2010 Nate Begeman <natebegeman@mac.com> Check in support for OpenCL conditional operator on vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6155d73ad1668be5335b1a060f6c49c03d4dca05 21-Sep-2010 Nate Begeman <natebegeman@mac.com> Check in support for OpenCL conditional operator on vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a345dc8c0c1905b13f4a18cf7643b63cfb51acd8 20-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Get rid of the lame attempt to prioritize "void" functions at
statement context; it really isn't helpful in practice (remember
printf!) and we'll be doing other adjustments for statements very soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
d475aad02da03c31c0e07f7ce0e26ef22bc039da 20-Sep-2010 Douglas Gregor <dgregor@apple.com> Get rid of the lame attempt to prioritize "void" functions at
statement context; it really isn't helpful in practice (remember
printf!) and we'll be doing other adjustments for statements very soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
cb37467b4a0e56739b6f60e4f2609bd53bc47286 20-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Tweak priorities for some types and macros:
- In Objective-C, we prefer BOOL to bool for historic reasons;
slightly penalize "bool".
- Treat Nil macro as a NULL pointer constant.
- Treat YES, NO, true, and false macros as constants.
- Treat the bool macro as a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
b05496dbd63f03bf474dae2c4d1e2142608780cc 20-Sep-2010 Douglas Gregor <dgregor@apple.com> Tweak priorities for some types and macros:
- In Objective-C, we prefer BOOL to bool for historic reasons;
slightly penalize "bool".
- Treat Nil macro as a NULL pointer constant.
- Treat YES, NO, true, and false macros as constants.
- Treat the bool macro as a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
a1be99184b49a8c393cc88e063d67d46db3f0129 20-Sep-2010 Bill Wendling <isanbard@gmail.com> The builtins __builtin_ia32_paddq and __builtin_ia32_psubq were missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
957b03be80ee712344bc0ff67c5ab7d768e88005 20-Sep-2010 Bill Wendling <isanbard@gmail.com> The builtins __builtin_ia32_paddq and __builtin_ia32_psubq were missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
cc421a21cd903fc70de54000ec9948ef4b8c539f 20-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actually
document behavior. Will wonders never cease.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
dea63134a51d463cf32f3eec3c359d9215359d69 20-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actually
document behavior. Will wonders never cease.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
bf83e007f7646370ac813e81d67086ee78c71dc4 20-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Revert r114316, -Wunused-value enabled by default was intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1b2ad2fd9e2d5352144481aa1fd995d333d9adc9 20-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r114316, -Wunused-value enabled by default was intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f1eb8240ba85e73db7a8d82a749ef46eb2a48a88 19-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6dff2288a8054bdbc97217568e5831bcce809db8 19-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ede2675976fd9f70a9a7ccd4b9114281d795d24a 19-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Implement -Wunused-label.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
355a9fe26a6dec89680ddf713dd5bc7a671b298a 19-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -Wunused-label.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
fe921683933ba702385bd8932926aa9c57e09cd5 18-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Problem with gnu conditional extension with missing
LHS and when conditional expression is an array. Since
it will be decayed, saved expression must be saved with
decayed expression. This is necessary to preserve semantics
of this extension (and prevent an IRGen crash which expects
an array to always be decayed). I am sure there will be other
cases in c++ (aggregate conditionals for example) when saving of the
expression must happen after some transformation on conditional
expression has happened.
Doug, please review. Fixes // rdar://8446940


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
1fb019bf42f5757c027edb56e5bb70233787a39c 18-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Problem with gnu conditional extension with missing
LHS and when conditional expression is an array. Since
it will be decayed, saved expression must be saved with
decayed expression. This is necessary to preserve semantics
of this extension (and prevent an IRGen crash which expects
an array to always be decayed). I am sure there will be other
cases in c++ (aggregate conditionals for example) when saving of the
expression must happen after some transformation on conditional
expression has happened.
Doug, please review. Fixes // rdar://8446940


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
08cbcf8fbe083678843261d5613273ed0f0a230a 18-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Give the Objective-C _cmd an "unlikely" code completion priority; it's
very rarely used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
97fe61ca1749110c28eb4570a710c8983711c7b3 18-Sep-2010 Douglas Gregor <dgregor@apple.com> Give the Objective-C _cmd an "unlikely" code completion priority; it's
very rarely used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
7d756cb07d278ce98104b55c2a4c152ec38c4e38 18-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Continue parsing more postfix expressions, even after semantic
errors. Improves code completion in yet another case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
ac5fd8404fa8ecfae28be76f98fd0d926350354c 18-Sep-2010 Douglas Gregor <dgregor@apple.com> Continue parsing more postfix expressions, even after semantic
errors. Improves code completion in yet another case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
eea07e58340513fb69233bfaec43ab511f94dad3 18-Sep-2010 John Thompson <john.thompson.jtsoftware@gmail.com> Add more error checking to attribute vecreturn

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
01add59bc8fd178960ad61169bc01566b0d6614c 18-Sep-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Add more error checking to attribute vecreturn

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9393f1fb985b37cc222f9d4619bd8970cfa32885 18-Sep-2010 Bill Wendling <isanbard@gmail.com> Remove FIXME. The type is correct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
315a2f207900745f6ef6e599f795edb2fe81e24f 18-Sep-2010 Bill Wendling <isanbard@gmail.com> Remove FIXME. The type is correct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
cd6465007c683f263436d7b225316d3d6ec03ba2 17-Sep-2010 Shantonu Sen <ssen@apple.com> Driver: implement driver automagic support for -lcc_kext

Rewrite linker arguments to use libclang_rt.cc_kext.a
instead of gcc-specific libcc_kext.a

Resolves Radar 7808495


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
lang/Driver/ToolChain.h
7433fedce98a58341d0f30c2e12e8d53f3bba575 17-Sep-2010 Shantonu Sen <ssen@apple.com> Driver: implement driver automagic support for -lcc_kext

Rewrite linker arguments to use libclang_rt.cc_kext.a
instead of gcc-specific libcc_kext.a

Resolves Radar 7808495


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
lang/Driver/ToolChain.h
a38c11f3fb24329bddb1e6ac720b82216642e8bc 17-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
7f18e67e1b577a50402e8b43508ab2311a5c45b5 17-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
674f03f991d458b2d4d692ef022cadb3e040d792 17-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Use a temporary file for output which gets renamed after all the writing is finished.

This mainly prevents failures and/or crashes when multiple processes try to read/write the same PCH file. (rdar://8392711&8294781); suggestion & review by Daniel!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/CompilerInstance.h
dc24572a44575e07a5d8bb6de52641a69f1bab27 17-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use a temporary file for output which gets renamed after all the writing is finished.

This mainly prevents failures and/or crashes when multiple processes try to read/write the same PCH file. (rdar://8392711&8294781); suggestion & review by Daniel!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/CompilerInstance.h
95ba42ce79fd65004de5aabe5e49f885c2a44190 17-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add IRgen support for Gnu's conditional operator
extension when missing LHS. This patch covers scalar
conditionals only. Others are wip.
(pr7726, radar 8353567).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
af9b96828f9126d993c3e155b8453be62013b735 17-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add IRgen support for Gnu's conditional operator
extension when missing LHS. This patch covers scalar
conditionals only. Others are wip.
(pr7726, radar 8353567).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0834b8e58b7ab2cc6cbdf0b93ef41bc15174203b 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -dumpmachine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
d829950b2b75d50fca2772a20129323a186993a5 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -dumpmachine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
da8ef4d001cdcac042eadf228e21e22015f56ffe 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
132e35d2f87895d20e7ea146c8c00404b80221a1 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
b3ba2873b296940f73f035e3f28bdc4f8b64e10b 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add magic handling for "reserved library names", starting with
-lstdc++. This is the best gross solution for a gross problem.

This issue is that historically, GCC has add -L options to its internally
library directories. This has allowed users and platforms to end up depending on
the layout of GCC's internal library directories.

We want to correct this mistake by eliminating that -L, but this means that
existing libraries which are in the GCC lib dir won't be found. We are going to
handle this by treating those -l names as "reserved", and requiring toolchains
to know how to add the right full path to the reserved library.

The immediately side effect of this is that users trying to use -L to find their
own -lstdc++ will need to start using -nostdlib (which is a good idea
anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the
"right" thing, for curious definitions of right.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
e5a37f48388c7e4cc081f44d13a4910bfa56cd35 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add magic handling for "reserved library names", starting with
-lstdc++. This is the best gross solution for a gross problem.

This issue is that historically, GCC has add -L options to its internally
library directories. This has allowed users and platforms to end up depending on
the layout of GCC's internal library directories.

We want to correct this mistake by eliminating that -L, but this means that
existing libraries which are in the GCC lib dir won't be found. We are going to
handle this by treating those -l names as "reserved", and requiring toolchains
to know how to add the right full path to the reserved library.

The immediately side effect of this is that users trying to use -L to find their
own -lstdc++ will need to start using -nostdlib (which is a good idea
anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the
"right" thing, for curious definitions of right.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
e910deab1f8c61e430feab32b1c1552b5ff59a2b 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a toolchain hook for whether the system has native LLVM support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
b993f5d93b994b9b0aac6aebae669621744bbed7 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a toolchain hook for whether the system has native LLVM support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
118dde1cdfb29a7c66520071711edf1728720ce2 16-Sep-2010 Chris Lattner <sabre@nondot.org> improve the "enumeration value 'g' not handled in switch"
warning to handle multiple enumerators with one warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ce78461303f45fecb3460d1c49c9b71f27ad19c3 16-Sep-2010 Chris Lattner <sabre@nondot.org> improve the "enumeration value 'g' not handled in switch"
warning to handle multiple enumerators with one warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5384cce621cffd0b87159e328097608dba4de883 16-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Swap the priorities of constants and types, so that we prefer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
d754d5546ef1faa4216298fd95bc6a7f15808fd2 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Swap the priorities of constants and types, so that we prefer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
ca96311d57ab1ab489c9c49d29feea05540c2245 16-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Don't add two code-completion results for the same selector; it
doesn't add any value. Instead, we'll just take the first method with
that selector that we find and create a completion for it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
d36adf553cd71df96fe869204482e0f0d68c6bbf 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Don't add two code-completion results for the same selector; it
doesn't add any value. Instead, we'll just take the first method with
that selector that we find and create a completion for it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
e1ee27b77d892300f3c16e289e6ac1fcd1329027 16-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Implement code completion for Objective-C class message sends that are
missing the opening bracket '[', e.g.,

NSArray <CC>

at function scope. Previously, we would only give trivial completions
(const, volatile, etc.), because we're in a "declaration name"
scope. Now, we also provide completions for class methods of NSArray,
e.g.,

alloc

Note that we already had support for this after the first argument,
e.g.,

NSArray method:x <CC>

would get code completion for class methods of NSArray whose selector
starts with "method:". This was already present because we recover
as if NSArray method:x were a class message send missing the opening
bracket (which was committed in r114057).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c7b6d883360092808b0ae81b7829fa8196ef42a1 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for Objective-C class message sends that are
missing the opening bracket '[', e.g.,

NSArray <CC>

at function scope. Previously, we would only give trivial completions
(const, volatile, etc.), because we're in a "declaration name"
scope. Now, we also provide completions for class methods of NSArray,
e.g.,

alloc

Note that we already had support for this after the first argument,
e.g.,

NSArray method:x <CC>

would get code completion for class methods of NSArray whose selector
starts with "method:". This was already present because we recover
as if NSArray method:x were a class message send missing the opening
bracket (which was committed in r114057).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
156ba9d0a4eece62fed50e70df2942eea5400417 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> Basic: Add f{dim,ma,max,min}[lf]? builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
f902153696d6b0e30651b33c6626ed757c5e95e3 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> Basic: Add f{dim,ma,max,min}[lf]? builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
51986d6b3f133c38e15dce9248279c4e440efe66 16-Sep-2010 Tom Care <tcare@apple.com> Refactored BugReporter to refer to EndNode as ErrorNode. We currently make the assumption that EndNode == ErrorNode, but upcoming changes will break this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
212f6d3b5fb3fa55ba1e40671cfc336430abc8dd 16-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Refactored BugReporter to refer to EndNode as ErrorNode. We currently make the assumption that EndNode == ErrorNode, but upcoming changes will break this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
c3fc92fa5ff5ded1ddf03ea82f5f7337ddc1e1ec 16-Sep-2010 John McCall <rjmccall@apple.com> Fix the clang build after Zhongxing Xu's commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
90392b21e3a0571af6db6ba58951723b8b570cb0 16-Sep-2010 John McCall <rjmccall@apple.com> Fix the clang build after Zhongxing Xu's commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
815434869c8af8ebe1d380b0272b0706af725ff0 16-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Implement automatic bracket insertion for Objective-C class message
sends. These are far trickier than instance messages, because we
typically have something like

NSArray alloc]

where it appears to be a declaration of a variable named "alloc" up
until we see the ']' (or a ':'), and at that point we can't backtrace.
So, we use a combination of syntactic and semantic disambiguation to
treat this as a message send only when the type is an Objective-C type
and it has the syntax of a class message send (which would otherwise
be ill-formed).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9497a73ad0d54859edbf48beb93ebb19a7ae50c9 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement automatic bracket insertion for Objective-C class message
sends. These are far trickier than instance messages, because we
typically have something like

NSArray alloc]

where it appears to be a declaration of a variable named "alloc" up
until we see the ']' (or a ':'), and at that point we can't backtrace.
So, we use a combination of syntactic and semantic disambiguation to
treat this as a message send only when the type is an Objective-C type
and it has the syntax of a class message send (which would otherwise
be ill-formed).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bcd067d551ea9eb7dc811620c0228fb424937909 16-Sep-2010 Zhongxing Xu <xuzhongxing@gmail.com> Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
and discussions with Ted and Jordy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/GRCoreEngine.h
b36cd3e1757fb4fcd9509f35558c847b04bef35f 16-Sep-2010 Zhongxing Xu <xuzhongxing@gmail.com> Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
and discussions with Ted and Jordy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/GRCoreEngine.h
9cb63965fc6327414c5af31276890b43c6236067 15-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Macro definitions in AST files have their own IDs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
f73c93fea0d4b447585bc7459499ba6b822e045c 15-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Macro definitions in AST files have their own IDs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
433e387dce023b97c15bebedca8fa62dd9338562 15-Sep-2010 Marcin Swiderski <marcin.sfider@gmail.com> Test commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
2a4cd498ff9b2b126de3e370b768ab307c221ab8 15-Sep-2010 Marcin Swiderski <marcin.sfider@gmail.com> Test commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
427a8c171ae0bf5c3ea2cab5b63d84a85fd8d505 15-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Improve code completion for Objective-C message sends when the opening
'[' is missing. Prior commits improving recovery also improved code
completion beyond the first selector, e.g., at or after the "to" in

calculator add:x to:y

but not after "calculator". We now provide the same completions for

calculator <CC>

that we would for

[calculator <CC>

if "calculator" is an expression whose type is something that can
receive Objective-C messages.

This code completion works for instance and super message sends, but not
class message sends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
78edf515544f0b9dddf69d6c1678fd83e94d8352 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve code completion for Objective-C message sends when the opening
'[' is missing. Prior commits improving recovery also improved code
completion beyond the first selector, e.g., at or after the "to" in

calculator add:x to:y

but not after "calculator". We now provide the same completions for

calculator <CC>

that we would for

[calculator <CC>

if "calculator" is an expression whose type is something that can
receive Objective-C messages.

This code completion works for instance and super message sends, but not
class message sends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
04611ee4c92c5c430a096a39ac5c6b5f4a3df7e4 15-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Implement bracket insertion for Objective-C instance message sends as
part of parser recovery. For example, given:

a method1:arg];

we detect after parsing the expression "a" that we have the start of a
message send expression. We pretend we've seen a '[' prior to the a,
then parse the remainder as a message send. We'll then give a
diagnostic+fix-it such as:

fixit-objc-message.m:17:3: error: missing '[' at start of message
send expression
a method1:arg];
^
[

The algorithm here is very simple, and always assumes that the open
bracket goes at the beginning of the message send. It also only works
for non-super instance message sends at this time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
0fbda68b50ce17d7ad36ef7a5ed77518a5cd272e 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement bracket insertion for Objective-C instance message sends as
part of parser recovery. For example, given:

a method1:arg];

we detect after parsing the expression "a" that we have the start of a
message send expression. We pretend we've seen a '[' prior to the a,
then parse the remainder as a message send. We'll then give a
diagnostic+fix-it such as:

fixit-objc-message.m:17:3: error: missing '[' at start of message
send expression
a method1:arg];
^
[

The algorithm here is very simple, and always assumes that the open
bracket goes at the beginning of the message send. It also only works
for non-super instance message sends at this time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
c1226787962c6550878b4e0df3c4bbb0fbf4b3a2 15-Sep-2010 John McCall <rjmccall@apple.com> one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.

I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
558d2abc7f9fd6801cc7677200992313ae90b5d8 15-Sep-2010 John McCall <rjmccall@apple.com> one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.

I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2cd0ad2a7be2f4d1d308cb91175b0eff601b4c7e 15-Sep-2010 Ted Kremenek <kremenek@apple.com> Disallow the use of UnknownVal as the index for ElementRegions. UnknownVals can be used as
the index when the value evaluation isn't powerful enough. By creating ElementRegions with
UnknownVals as the index, this gives the false impression that they are the same element, when
they really aren't. This becomes really problematic when deriving symbols from these regions
(e.g., those representing the initial value of the index), since two different indices will
get the same symbol for their binding.

This fixes an issue with the idempotent operations checker that would cause two indices that
are clearly not the same to make it appear as if they always had the same value.

Fixes <rdar://problem/8431728>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
02282acd7a42d06a3178e3102d34a585bd82dd9f 15-Sep-2010 Ted Kremenek <kremenek@apple.com> Disallow the use of UnknownVal as the index for ElementRegions. UnknownVals can be used as
the index when the value evaluation isn't powerful enough. By creating ElementRegions with
UnknownVals as the index, this gives the false impression that they are the same element, when
they really aren't. This becomes really problematic when deriving symbols from these regions
(e.g., those representing the initial value of the index), since two different indices will
get the same symbol for their binding.

This fixes an issue with the idempotent operations checker that would cause two indices that
are clearly not the same to make it appear as if they always had the same value.

Fixes <rdar://problem/8431728>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
d1733762531574bb9e979b78b578e358319944ad 15-Sep-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's flexible array rules relaxation:
- in union
- as the only element of a struct/class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
09246183715f4b0a8728a3827bfe894b6c6016b9 15-Sep-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's flexible array rules relaxation:
- in union
- as the only element of a struct/class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
810032993c6c0095c4d9399da1af2daccd0bec1e 15-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new code-completion context for a parenthesized
expression, e.g., after the '(' that could also be a type cast. Here,
we provide types as code-completion results in C/Objective-C (C++
already had them), although we wouldn't in a normal expression context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
0268810a46780144a2d5fb5a017c938d1199189c 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new code-completion context for a parenthesized
expression, e.g., after the '(' that could also be a type cast. Here,
we provide types as code-completion results in C/Objective-C (C++
already had them), although we wouldn't in a normal expression context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
be96b95ff811874dadb5cf0f9f17b3de91f5b574 15-Sep-2010 Ted Kremenek <kremenek@apple.com> Add CFG::BuildOptions class to pass in CFG builder options under on parameter. Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
6c52c7850bccb6991470668429a1e1edf01b0873 15-Sep-2010 Ted Kremenek <kremenek@apple.com> Add CFG::BuildOptions class to pass in CFG builder options under on parameter. Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
1fed452f1e5486e1c3e6204fb5e284189b19ea7f 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a -stdlib= argument which can be used to select the C++ standard
library to use.
- This is currently useful for testing libc++; you can now use 'clang++
-stdlib=libc++ t.cpp' to compile using it if installed.

- In the future could also be used to select other standard library choices if
alternatives become available (for example, to use an alternate C library).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
lang/Driver/ToolChain.h
3f16c959e30b7e7ba8e4b8d597c313fbe457206d 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a -stdlib= argument which can be used to select the C++ standard
library to use.
- This is currently useful for testing libc++; you can now use 'clang++
-stdlib=libc++ t.cpp' to compile using it if installed.

- In the future could also be used to select other standard library choices if
alternatives become available (for example, to use an alternate C library).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
lang/Driver/ToolChain.h
4e3f3d8a256a23d6cd9e614d1f2a629aa03274cd 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out some code for handling the C++ standard library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
641b98b7b52e0067beaf3978f2a8721e5d16c111 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out some code for handling the C++ standard library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
3b2c9345bf8cf5c5eace1cbca6329a8266a92c90 15-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> RHS of property expression assignment requires
copy initialization before passing it to
a setter. Fixes radar 8427922.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c4e1a6815235ade1a4affe3511ca5ce2dcc64467 15-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> RHS of property expression assignment requires
copy initialization before passing it to
a setter. Fixes radar 8427922.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
c00411820af08810fa952049c5ea1c9819cbfb60 15-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> When marking the declarations in a default argument expression as
"used", at the time that the default argument itself is used, also
mark destructors that will be called by this expression. This fixes a
regression that I introduced in r113700, which broke WebKit, and fixes
<rdar://problem/8427926>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
5833b0b831d6afae2885e6af420e2bda639652e6 15-Sep-2010 Douglas Gregor <dgregor@apple.com> When marking the declarations in a default argument expression as
"used", at the time that the default argument itself is used, also
mark destructors that will be called by this expression. This fixes a
regression that I introduced in r113700, which broke WebKit, and fixes
<rdar://problem/8427926>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
3049ec9961d1a1f0570a24dc601e6a362129b35d 10-Sep-2010 Shih-wei Liao <sliao@google.com> Merge changes from upstream repository (r112367)

Change-Id: Ib88c8fd890e7c8c5597ea2b86cfa934438965c08
8712db0ce4d3d944c9f5b080b5fe2ea077e50206 14-Sep-2010 Tom Care <tcare@apple.com> Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect that we aborted analysis may not necessarily be due to a loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
68625cf3eef2a6948fe42134aeeda91ed15e63d3 14-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect that we aborted analysis may not necessarily be due to a loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
8e55935e9bad21cc94f08ae6aa1ae51a45c8a503 14-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add __char16_t and __char32_t as aliases for the C++0x char16_t and
char32_t, respectively, but which can also be used in C++98/03
mode. Fixes <rdar://problem/8418510>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
877649045da2bb56ac52a536dbedf5ca7fa13fae 14-Sep-2010 Douglas Gregor <dgregor@apple.com> Add __char16_t and __char32_t as aliases for the C++0x char16_t and
char32_t, respectively, but which can also be used in C++98/03
mode. Fixes <rdar://problem/8418510>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
949208ba3be2ef5653154fb1ba9c310f75399cda 14-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new kind of cursor into libclang, which covers a reference
to an "overloaded" set of declarations. This cursor kind works for
unresolved references to functions/templates (e.g., a call within a
template), using declarations, and Objective-C class and protocol
forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113805 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1f60d9ea523fc321d811fe880ba9a1ec74fa8f9b 14-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new kind of cursor into libclang, which covers a reference
to an "overloaded" set of declarations. This cursor kind works for
unresolved references to functions/templates (e.g., a call within a
template), using declarations, and Objective-C class and protocol
forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113805 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2decc92fcbbae70a752537940f9c784f1b885a02 14-Sep-2010 Ted Kremenek <kremenek@apple.com> Add reverse iterator for initializers in constructor. Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
dacd24775d9654c3fe5dc2a01640c2b2aab2bead 14-Sep-2010 Ted Kremenek <kremenek@apple.com> Add reverse iterator for initializers in constructor. Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
005a8ec698c25d71890cb31a45f8cd0cbed61b30 14-Sep-2010 Ted Kremenek <kremenek@apple.com> Add 'insert()' to BumpVector. Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
58eb45baff08fd27aeef65fc4e6ae35a4b3a1d90 14-Sep-2010 Ted Kremenek <kremenek@apple.com> Add 'insert()' to BumpVector. Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
9febb6c1221f60f0037eb3e4b6ed3f84adfde41d 14-Sep-2010 Ted Kremenek <kremenek@apple.com> Remove from the CFG the half-implemented support for scoping information. We decided that scope information doesn't belong in the CFG at all, since it is a lexical construct.

Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
fe255bc6dfddade15644aecead970791e96ddedc 14-Sep-2010 Ted Kremenek <kremenek@apple.com> Remove from the CFG the half-implemented support for scoping information. We decided that scope information doesn't belong in the CFG at all, since it is a lexical construct.

Patch by Marcin Świderski!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
be19ac06518581e1080abb13cb6eafff431b2585 14-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
751025d5d174ab75dc3788211581d9fbe6224841 14-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove CXXRecordDecl::getDefaultConstructor(), an inherently unsafe function due to lazy declaration of default constructors. Now that __has_nothrow_constructor doesn't use it anymore, part of PR8101 is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8510a307c69112f0df8805501c0682e28513b527 13-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Sema/Sema.h
0dfd848fa4c9664852ba8c929a8bd3fce93ddca2 13-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Sema/Sema.h
a03c2a265003f10407486c516fe20807910860ce 13-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> When applying 'delete' on a pointer-to-array type match GCC and EDG behavior and treat it as 'delete[]'.
Also offer a fix-it hint adding '[]'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
4076dacf1497fb95cb298b9d964fbdbdaf9bde6c 13-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> When applying 'delete' on a pointer-to-array type match GCC and EDG behavior and treat it as 'delete[]'.
Also offer a fix-it hint adding '[]'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
ff3e8ae562ae6eab487393a19affa08d103ba7c7 13-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the trivial setters from CXXDeleteExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f1b8911d35bb2830a13267581d3cbde4b6b85db6 13-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the trivial setters from CXXDeleteExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d829ec2516b47e194273d95093f629464737c84f 13-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Avoid setters in ASTDeclReader::VisitClassTemplatePartialSpecializationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
8fed4b4bc93cce4d15bdb79f9e30cc25a93c8143 13-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Avoid setters in ASTDeclReader::VisitClassTemplatePartialSpecializationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
c28b0ec7176b5acd9eb8cd771aec751d58ba9bc0 13-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Avoid setters in ASTDeclReader::VisitClassTemplateSpecializationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113742 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
586c7156d51039290f100c80d2d8bd263c99addc 13-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Avoid setters in ASTDeclReader::VisitClassTemplateSpecializationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113742 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
8d8eadaae4b509b0a422a8204a9f44a8e6ac120a 13-Sep-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Parentheses around address non-type template argument is demoted to an extension warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2c5399f99c95b831fa90fd3a3c1d9719c1dd9441 13-Sep-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Parentheses around address non-type template argument is demoted to an extension warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9371c2b92dc4fc359da131db9be5c6dcd5f2fcf4 12-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> When performing overload resolution, only compare the final conversion
sequences for two conversion functions when in fact we are in the text
of initialization by a user-defined conversion sequences. Fixes PR8034.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
8fcc516a5d5b2fec0023a9dced29285a38b95355 12-Sep-2010 Douglas Gregor <dgregor@apple.com> When performing overload resolution, only compare the final conversion
sequences for two conversion functions when in fact we are in the text
of initialization by a user-defined conversion sequences. Fixes PR8034.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Overload.h
91305bf1b2e75937fb60db03cca766ad983fffdb 12-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose the instantiation of variables (including static data
members) with function type. Fixes PR8047.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c6dbc3fa467e2355b678a6b717534928048efcb2 12-Sep-2010 Douglas Gregor <dgregor@apple.com> Diagnose the instantiation of variables (including static data
members) with function type. Fixes PR8047.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bfc2eaa077e7f914cfbf35ffdf53da889847838c 12-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> When diagnosing C++ [temp.expl.spec]p3 in C++98/03 mode, downgrade the
error to a warning if we're in a case that would be allowed in
C++0x. This "fixes" PR8084 by making Clang accept more code than GCC
and (non-strict) EDG do.

Also, add the missing test case for the C++0x semantics, which should
have been in r113717.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a4d5de539bc2f0cd25d6292e84eaa067591ff792 12-Sep-2010 Douglas Gregor <dgregor@apple.com> When diagnosing C++ [temp.expl.spec]p3 in C++98/03 mode, downgrade the
error to a warning if we're in a case that would be allowed in
C++0x. This "fixes" PR8084 by making Clang accept more code than GCC
and (non-strict) EDG do.

Also, add the missing test case for the C++0x semantics, which should
have been in r113717.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9296aebfac203d1bcce33df85ea14a0c84d7cedb 12-Sep-2010 Francois Pichet <pichet2000@gmail.com> Add basic support for Microsoft enum forward declaration.
Assigning an underlying integral type to an enum forward declaration will come in a next patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8dc3abcc36df883324461daad0c05364158f3cf0 12-Sep-2010 Francois Pichet <pichet2000@gmail.com> Add basic support for Microsoft enum forward declaration.
Assigning an underlying integral type to an enum forward declaration will come in a next patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
88481cf45755ee5d34b66fcfee6143e0e0674f4b 12-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Teach the EvaluatedExprVisitor and its client, which marks
declarations in potentially-evaluated subexpressions, about
recursion. Fixes the release-mode self-host failure I introduced in
r113700.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
4fcf5b2f816347ba7a3f16557d5e2b293634d4d6 12-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach the EvaluatedExprVisitor and its client, which marks
declarations in potentially-evaluated subexpressions, about
recursion. Fixes the release-mode self-host failure I introduced in
r113700.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
583205c985b5d7a5c69c74f48d1f91429a642816 11-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add a completely unnecessary "template" keyword to appease GCC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
d9a8bbcf8db776de126aa6dc15d66e2ce666d70d 11-Sep-2010 Douglas Gregor <dgregor@apple.com> Add a completely unnecessary "template" keyword to appease GCC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
1c1f0344bbef6a0abc0f203def5639554f465407 11-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> When parsing default function arguments, do not mark any declarations
used in the default function argument as "used". Instead, when we
actually use the default argument, make another pass over the
expression to mark any used declarations as "used" at that point. This
addresses two kinds of related problems:

1) We were marking some declarations "used" that shouldn't be,
because we were marking them too eagerly.
2) We were failing to mark some declarations as "used" when we
should, if the first time it was instantiated happened to be an
unevaluated context, we wouldn't mark them again at a later point.

I've also added a potentially-handy visitor class template
EvaluatedExprVisitor, which only visits the potentially-evaluated
subexpressions of an expression. I bet this would have been useful for
noexcept...

Fixes PR5810 and PR8127.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
lang/Sema/Sema.h
be0f7bd61c7b2879d02ae75aad7a91d92f819d94 11-Sep-2010 Douglas Gregor <dgregor@apple.com> When parsing default function arguments, do not mark any declarations
used in the default function argument as "used". Instead, when we
actually use the default argument, make another pass over the
expression to mark any used declarations as "used" at that point. This
addresses two kinds of related problems:

1) We were marking some declarations "used" that shouldn't be,
because we were marking them too eagerly.
2) We were failing to mark some declarations as "used" when we
should, if the first time it was instantiated happened to be an
unevaluated context, we wouldn't mark them again at a later point.

I've also added a potentially-handy visitor class template
EvaluatedExprVisitor, which only visits the potentially-evaluated
subexpressions of an expression. I bet this would have been useful for
noexcept...

Fixes PR5810 and PR8127.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/EvaluatedExprVisitor.h
lang/Sema/Sema.h
21e859fbce9f84f37413af6d48aeb36c4186b371 11-Sep-2010 John McCall <rjmccall@apple.com> Support in-class initialization of static const floating-point data members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4e6356426fcfef84e2484820814a8eaaaf547eda 11-Sep-2010 John McCall <rjmccall@apple.com> Support in-class initialization of static const floating-point data members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
52f52b04cb07144eba019ccd7dae0ce4f18cec84 11-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Address Doug's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
5221d8f2da008689f7ff9476e6522bb2b63ec1a3 11-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Address Doug's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
b26365af5989ecc04c5c93dc70b6f8154dae02c2 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Follow Ted's example and hide CXXNoexceptExpr's setters from all but serialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
c8aecc2dfb2e393d9eeaedeca22ff8cd7149af81 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Follow Ted's example and hide CXXNoexceptExpr's setters from all but serialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
255d1b0f3801c698f592ae716669603b5443ce2c 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Serialization support for CXXNoexceptExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Serialization/ASTBitCodes.h
6b219d082434394c1ac401390ec1d1967727815a 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Serialization support for CXXNoexceptExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Serialization/ASTBitCodes.h
bacc1e1354313633349786b2b5837cd69cd22286 10-Sep-2010 Ted Kremenek <kremenek@apple.com> Make 'setProperty()', 'setBase()', and 'setLocation()' private in ObjCPropertyRefExpr, and friend ASTStmtReader so that it is the only class that can use them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
f8730d7c313c421d5d7a2b9d97541fc89d5a52d4 10-Sep-2010 Ted Kremenek <kremenek@apple.com> Make 'setProperty()', 'setBase()', and 'setLocation()' private in ObjCPropertyRefExpr, and friend ASTStmtReader so that it is the only class that can use them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
287e188b96e61b218be777ade96ff894e8c01a99 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Define and implement CXXNoexceptExpr. Create it in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
2e156225a29407a50dd19041aa5750171ad44ea3 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Define and implement CXXNoexceptExpr. Create it in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Sema/Sema.h
796ba8e4a7106869535101c9e5b30167a78b11e1 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Parse the noexcept operator and stub out sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Sema/Sema.h
02bc21a88ecbdf49b2e674c210a4cbf8c48c6e58 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Parse the noexcept operator and stub out sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Sema/Sema.h
f0cc32bb48ba5a6e06393f8fa32c91f432579bc8 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Expr::CanThrow, a function that applies the noexcept operator rules to expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
369e51fa400aeb5835bb9af4634ea516c11429a7 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Expr::CanThrow, a function that applies the noexcept operator rules to expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8e6989c6fcf9a6fcb410641fbda783e560d40bb4 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make CallExpr::getCalleeDecl look through pointer derefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
200121569dc6cff10a1fb6ed7500098770b9dd25 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make CallExpr::getCalleeDecl look through pointer derefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7be3c849b2a0dd1201767f4d0097157608eb45da 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/OperationKinds.h
68d114dc3e1d9ef0c0b073edcb824d4d7f37d416 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/OperationKinds.h
22d2e20bc350a45d28bdc436b901a13eeb25bb8c 10-Sep-2010 Chandler Carruth <chandlerc@gmail.com> Re-devirtualize this. A new virtual method snuck in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3c0a78d2d028cdec935a7902728b0e2cf2b78eb5 10-Sep-2010 Chandler Carruth <chandlerc@gmail.com> Re-devirtualize this. A new virtual method snuck in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
3311f5e196908b166da7dbb06567e1d2c15268e2 10-Sep-2010 Ted Kremenek <kremenek@apple.com> Add ObjCAtSynchronizedStmt to the CFG and add GRExprEngine support (PreVisit for checkers).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/GRExprEngine.h
4beaa9f51b2da57c64740cef2bd1c2fdb0c325d5 10-Sep-2010 Ted Kremenek <kremenek@apple.com> Add ObjCAtSynchronizedStmt to the CFG and add GRExprEngine support (PreVisit for checkers).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/GRExprEngine.h
996a1a87865785d4f872248ffd2b25d09dc9e2a7 10-Sep-2010 Tom Care <tcare@apple.com> Added AnalyzerStatsChecker, a path sensitive check that reports visitation statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
52d861ce41ce84d8389495ea78d97bcc962ac5ba 10-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Added AnalyzerStatsChecker, a path sensitive check that reports visitation statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
69d18f9439f93bcd5009d4fafd660711ae1ac7b0 10-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add libclang support for label statements, gotos, and taking the
address of a label (GNU extension).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113564 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
36897b05ca2886e287f01802614bc10cbadcec22 10-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang support for label statements, gotos, and taking the
address of a label (GNU extension).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113564 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8ea9a768ef739f6f6613b795348f963ad5d05850 10-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> When we parse a pragma, keep track of how that pragma was originally
spelled (#pragma, _Pragma, __pragma). In -E mode, use that information
to add appropriate newlines when translating _Pragma and __pragma into
#pragma, like GCC does. Fixes <rdar://problem/8412013>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
80c60f72848896f867f6b7e664e7060d9e78f019 10-Sep-2010 Douglas Gregor <dgregor@apple.com> When we parse a pragma, keep track of how that pragma was originally
spelled (#pragma, _Pragma, __pragma). In -E mode, use that information
to add appropriate newlines when translating _Pragma and __pragma into
#pragma, like GCC does. Fixes <rdar://problem/8412013>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
27e15718d55fcd5dc481e69bc1bf3a8e3c349bbb 09-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Teach libclang to walk the base and member initializers of a
constructor, in source order. Also introduces a new reference kind for
class members, which is used here (for member initializers) and will
also be used for designated initializers and offsetof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113545 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a67e03fdf1ae8a1f92463a307d0b6281f1161f40 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Teach libclang to walk the base and member initializers of a
constructor, in source order. Also introduces a new reference kind for
class members, which is used here (for member initializers) and will
also be used for designated initializers and offsetof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113545 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c28bede87980d16ff7d8b61eeef9193cc37a1307 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Fix typo in diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
a4eca03f035ebeb7a655a60017ed36b0b6b5c859 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Fix typo in diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
1176748c5d51a991864092eec940b5621a200422 09-Sep-2010 Bill Wendling <isanbard@gmail.com> Remove the 'rc' suffix. It indicates a "release candidate" during LLVM release
qualification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
461ed44afac0aa56810e9f870d51692ee4ab235b 09-Sep-2010 Bill Wendling <isanbard@gmail.com> Remove the 'rc' suffix. It indicates a "release candidate" during LLVM release
qualification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
c5ec4b4b2a57456745d9c6882b7dd7680e5ffd40 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Use FindReportInEquivalenceClass to identify all the nodes used for the trimmed graph (in BugReporter). This fixes a problem where a leak that happened to occur on both an exit() path and a non-exit() path was getting reported with the exit() path (which users don't care about).

This fixes:

<rdar://problem/8331641> leak reports should not show paths that end with exit() (but ones that don't end with exit())

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
61f52bd3c524268e25b48a1ed3730aedd6cc8374 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Use FindReportInEquivalenceClass to identify all the nodes used for the trimmed graph (in BugReporter). This fixes a problem where a leak that happened to occur on both an exit() path and a non-exit() path was getting reported with the exit() path (which users don't care about).

This fixes:

<rdar://problem/8331641> leak reports should not show paths that end with exit() (but ones that don't end with exit())

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
db9e273557e708b67967606cced6ac21b01919a6 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add -cxx-system-include option which can be used to specify an
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/HeaderSearchOptions.h
80c26f44a6f8d859a2a3babb06bd3ca8d86f2623 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add -cxx-system-include option which can be used to specify an
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/HeaderSearchOptions.h
e5928fceca0ad454c0d654e0bf75e0664c53f4af 09-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Simplify template instantiation for C++ exception declarations,
eliminating an unnecessary use of TemporaryBase in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
83cb94269015bf2770ade71e616c5322ea7e76e1 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Simplify template instantiation for C++ exception declarations,
eliminating an unnecessary use of TemporaryBase in the process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5c32acaf1056b166e6308af9304aa8e553f37305 09-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the comma locations from all of the Sema routines that deal
with comma-separated lists. We never actually used the comma
locations, nor did we store them in the AST, but we did manage to
waste time during template instantiation to produce fake locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
a1a04786cea2445759026edacd096abd1fbf4a05 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate the comma locations from all of the Sema routines that deal
with comma-separated lists. We never actually used the comma
locations, nor did we store them in the AST, but we did manage to
waste time during template instantiation to produce fake locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
7c19c19eac2eb4815dd086173ee6d990478264b1 09-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add proper type-source information to UnaryTypeTraitExpr, including
libclang visitation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Sema/Sema.h
3d37c0ada0e46b87be0a10e8d52d990a97d3907a 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Add proper type-source information to UnaryTypeTraitExpr, including
libclang visitation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Sema/Sema.h
38a9425a248a9479dbbc245b4a4dd03be3c06c8a 09-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix C++ PCH issue.

Another beating by boost in this test case: http://llvm.org/PR8117
A function specialization wasn't properly initialized if it wasn't canonical.

I wish there was a nice little test case but this was boost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
a626a3d0fb74455651f742c0938902a42e6e71c8 09-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix C++ PCH issue.

Another beating by boost in this test case: http://llvm.org/PR8117
A function specialization wasn't properly initialized if it wasn't canonical.

I wish there was a nice little test case but this was boost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
e7f5d445df75d5f0602673b8c9dc6208776aa33c 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Rename GRState::getSVal() -> getRawSVal() and getSimplifiedSVal() -> getSVal().

The end result is now we eagarly constant-fold symbols in the analyzer that are perfectly constrained
to be a constant value. This allows us to recover some path-sensitivity in some cases by lowering
the required level of reasoning power needed to evaluate some expressions.

The net win from this change is that the false positive in PR 8015 is fixed, and we also
find more idempotent operations bugs.

We do, however, regress with the BugReporterVisitors, which need to be modified to understand
this constant folding (and look past it). This causes some diagnostic regressions in plist-output.m
which will get addressed in a future patch. plist-output.m is now marked XFAIL, while
plist-output-alternate.m now tests that the plist output is working, but with the suboptimal
diagnostics. This second test file will eventually be removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
96ebad66c451d79c9f57b1edb31efaeeb23b9a01 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Rename GRState::getSVal() -> getRawSVal() and getSimplifiedSVal() -> getSVal().

The end result is now we eagarly constant-fold symbols in the analyzer that are perfectly constrained
to be a constant value. This allows us to recover some path-sensitivity in some cases by lowering
the required level of reasoning power needed to evaluate some expressions.

The net win from this change is that the false positive in PR 8015 is fixed, and we also
find more idempotent operations bugs.

We do, however, regress with the BugReporterVisitors, which need to be modified to understand
this constant folding (and look past it). This causes some diagnostic regressions in plist-output.m
which will get addressed in a future patch. plist-output.m is now marked XFAIL, while
plist-output-alternate.m now tests that the plist output is working, but with the suboptimal
diagnostics. This second test file will eventually be removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
bf2b28c150c9c539175221926d6b84dc06f87d1a 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Remove stray ';' and convert tabs to spaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
be39a566a914df8561d7a1e9654708297f0908c1 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Remove stray ';' and convert tabs to spaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
1fe3c055f22b3bce0f89977b84a5b65d7cc92789 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Relax __attribute_((nonnull)) checking to allow the attribute on functions with no pointer arguments. GCC doesn't warn
in this case, and the attribute is trivially satisfied (and benign). Fixes <rdar://problem/8364828>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1db5d140b24bd181644135446fdaca75d8396aa4 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Relax __attribute_((nonnull)) checking to allow the attribute on functions with no pointer arguments. GCC doesn't warn
in this case, and the attribute is trivially satisfied (and benign). Fixes <rdar://problem/8364828>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dd5ca81b3ab667707101647c80ca500e2ac0cc5c 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Static analyzer fix: <rdar://problem/5880430> Switch on enum should not consider default case live if all enum values are covered

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113457 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Checker/PathSensitive/GRCoreEngine.h
4d3175c1e5a44251ea97b0c81e80f060629d9c08 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Static analyzer fix: <rdar://problem/5880430> Switch on enum should not consider default case live if all enum values are covered

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113457 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Checker/PathSensitive/GRCoreEngine.h
bc056ea8365d7d3f527ab9f8c26ca7c9d20a27b1 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Add 'filtered_pred_iterator' and 'filtered_succ_iterator' to CFGBlock. This allows a client
to selectively walk successors/predecessors based on commonly used filters. For starters, add
a filter to ignore 'default:' cases for SwitchStmts when all enum values are covered by CaseStmts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
ee7f84d509c6382491673883598eb9ed2d3a6a8b 09-Sep-2010 Ted Kremenek <kremenek@apple.com> Add 'filtered_pred_iterator' and 'filtered_succ_iterator' to CFGBlock. This allows a client
to selectively walk successors/predecessors based on commonly used filters. For starters, add
a filter to ignore 'default:' cases for SwitchStmts when all enum values are covered by CaseStmts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
aa90dfae5914fb934c315fae3ff8a9bab9e64a95 09-Sep-2010 Ted Kremenek <kremenek@apple.com> When building SwitchStmts in Sema, record whether all the enum values of a switch(enum) where
covered by individual case statements. Flow-based analyses may wish to consult this information,
and recording this in the AST allows us to obviate reconstructing this information later when
we build the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
559fb554602bedb57dbbf3cc14ac8a38264b4547 09-Sep-2010 Ted Kremenek <kremenek@apple.com> When building SwitchStmts in Sema, record whether all the enum values of a switch(enum) where
covered by individual case statements. Flow-based analyses may wish to consult this information,
and recording this in the AST allows us to obviate reconstructing this information later when
we build the CFG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
435c92801ea81d61e0210c9b94716ba01c7a5355 09-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a few minor issues with parsing and semantic analysis of C++
typeid expressions:
- make sure we have a proper source location for the closing ')'
- cache the declaration of std::type_info once we've found it



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
4eb4f0f96289cbece50c1270e02af3caf8779705 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix a few minor issues with parsing and semantic analysis of C++
typeid expressions:
- make sure we have a proper source location for the closing ')'
- cache the declaration of std::type_info once we've found it



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
77a9553d3becb559aaca684557c0fbb406b28f54 09-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for a few MS extensions supported by the Borland compiler
(__uuidof, _fastcall, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
8df7622c65f13f95e6e1f4cf6f51592fddae3afb 09-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for a few MS extensions supported by the Borland compiler
(__uuidof, _fastcall, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
545f1ccf514d62d9ad5bb1c1e1063c945d2cf897 08-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Reverse r113397 until we decide what to do with
use of 'struct objc_object*' for 'is' (and others)
in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
56a965c0f77c9e6bffd65cc8f8796442a8527381 08-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Reverse r113397 until we decide what to do with
use of 'struct objc_object*' for 'is' (and others)
in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1b8b1fd85b12180523a12cf2841806f5cfab1fd6 08-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Re-enable CheckAccessDeclContext and make sure it doesn't trigger assertions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
65b63ec1410f09e1f3cdb847018d678b8f8fc3f7 08-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Re-enable CheckAccessDeclContext and make sure it doesn't trigger assertions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6fa68948f7d604946617deb5de14ce3d7905b21c 08-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a crash when overloading id with objc_object*.
Radar 8400356.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d1877953f06df6df9b2cd5fc04b49e80eec66019 08-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a crash when overloading id with objc_object*.
Radar 8400356.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8474ba33ad986765ec3664b38478846b4dfa5e77 08-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix C++ PCH issues.

PCH got a severe beating by the boost-using test case reported here: http://llvm.org/PR8099
Fix issues like:

-When PCH reading, make sure Decl's getASTContext() doesn't get called since a Decl in the parent hierarchy may be initializing.
-In ASTDeclReader::VisitFunctionDecl VisitRedeclarable should be called before using FunctionDecl's isCanonicalDecl()
-In ASTDeclReader::VisitRedeclarableTemplateDecl CommonOrPrev must be initialized before anything else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
6b5415196327fa8ef00f028ba175fafef1738ae1 08-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix C++ PCH issues.

PCH got a severe beating by the boost-using test case reported here: http://llvm.org/PR8099
Fix issues like:

-When PCH reading, make sure Decl's getASTContext() doesn't get called since a Decl in the parent hierarchy may be initializing.
-In ASTDeclReader::VisitFunctionDecl VisitRedeclarable should be called before using FunctionDecl's isCanonicalDecl()
-In ASTDeclReader::VisitRedeclarableTemplateDecl CommonOrPrev must be initialized before anything else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
4d58b6820c0a78959a00e45dd77a55178e8c6d94 08-Sep-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's __uuidof operator implementation part 1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
01b7c3028da5bbcb9f8e52ba67e4613070de0e60 08-Sep-2010 Francois Pichet <pichet2000@gmail.com> Microsoft's __uuidof operator implementation part 1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/Sema.h
lang/Serialization/ASTBitCodes.h
792c9aabbdf38bd3c1d5279355ea99d94a023603 08-Sep-2010 Francois Pichet <pichet2000@gmail.com> Allow type definitions inside anonymous struct/union in Microsoft mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
538e0d0292cab16198a4fce5c388ff06adc74d0c 08-Sep-2010 Francois Pichet <pichet2000@gmail.com> Allow type definitions inside anonymous struct/union in Microsoft mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c3b6d5790e3202c0cd3639d4b1923b122cd4c077 08-Sep-2010 John McCall <rjmccall@apple.com> Put the tautological-comparison-of-unsigned-against-zero warnings in
-Wtautological-compare instead of -Wsign-compare, which also implies turning
them on by default.

Restoration of r112877.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8205c1a5c623a418f06789f222183ed5040ff4c9 08-Sep-2010 John McCall <rjmccall@apple.com> Put the tautological-comparison-of-unsigned-against-zero warnings in
-Wtautological-compare instead of -Wsign-compare, which also implies turning
them on by default.

Restoration of r112877.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
95bea5fdd03b244075607f1d3e94754e2d95ddf7 08-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Sema/Initialization.h
lang/Sema/Sema.h
ab6677ec401cfd2c82b34e4cdfebd55a9dc25778 08-Sep-2010 Douglas Gregor <dgregor@apple.com> Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Sema/Initialization.h
lang/Sema/Sema.h
28bda05d7764746b6d1957871d8dac580ab1b4fb 08-Sep-2010 Gabor Greif <ggreif@gmail.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
489f7131d0f7746525de3b26204c8eb523d84505 08-Sep-2010 Gabor Greif <ggreif@gmail.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
5b8552c7a4a4db82b98b490bdb67a1a07a794345 07-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Sema/Sema.h
1bb2a93ab7b1499dda6f6b58865bd0dce1864228 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Sema/Sema.h
a903833cf2127aa808996caa98cc117d3dd5ada5 07-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add function attributes to the output of -ast-print-xml, from Martin Vejnar!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
lang/Frontend/TypeXML.def
3aa2146552fafac2b5ba24a42d28861d22fe3175 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Add function attributes to the output of -ast-print-xml, from Martin Vejnar!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
lang/Frontend/TypeXML.def
8fee33e7925d771f4b410744735a52122ce5b315 07-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7da71020b97c69b95831bd03d35e8e8404bfdea0 07-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1cd45d3521e568f5d60d2311273ba34533bff478 07-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Provide a specific diagnostic when trying to redefine an "extern
inline" function outside of GNU89 mode. Fixes
<rdar://problem/6880464>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fbc5b49322577e03ed780dcdf5be514871ec381d 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Provide a specific diagnostic when trying to redefine an "extern
inline" function outside of GNU89 mode. Fixes
<rdar://problem/6880464>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
da8071e5e6c5a88a289a6e3a9baf87ed20bdac06 07-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Improve recovery when there is a stray ']' or ')' before the ';' at
the end of a statement. Fixes <rdar://problem/6896493>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
9ba23b4ceacd77cd264501690a7a9e94184ef71b 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve recovery when there is a stray ']' or ')' before the ';' at
the end of a statement. Fixes <rdar://problem/6896493>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
ccb4dffc5d5d652779cf2b421da35a4086dd1c03 07-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Improve recovery when a comma is missing between enumerators in an
enumeration definition. Fixes <rdar://problem/7159693>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
751f6922376dfe9432795b65a3649179e4ef5cf5 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve recovery when a comma is missing between enumerators in an
enumeration definition. Fixes <rdar://problem/7159693>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
06283c946c623e085550ac0645475d2ea906f860 07-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostic and recovery when missing a comma between base or
member initializers in a C++ constructor. Fixes <rdar://problem/7796492>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
b1f6fa48960eae269a3931d1fc545ed468d9a4d2 07-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostic and recovery when missing a comma between base or
member initializers in a C++ constructor. Fixes <rdar://problem/7796492>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
648096e9f61bcc33edcbcfc508f98656911d95fc 06-Sep-2010 Chris Lattner <sabre@nondot.org> remove curly quotes, patch by Dimitry Andric!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
32212f9d000e6bb631499afce43cd13fc0387413 06-Sep-2010 Chris Lattner <sabre@nondot.org> remove curly quotes, patch by Dimitry Andric!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
871351562c321476001bb2e4db5b505941762d38 06-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Make "-ccc-cxx" option work on Linux.
Patch by nobled.

I also took the opportunity to make the field private since now it is only ready from the
outside.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
79e9e9dd533de9609ef141449bf50e705fa68fd0 06-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Make "-ccc-cxx" option work on Linux.
Patch by nobled.

I also took the opportunity to make the field private since now it is only ready from the
outside.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
c9ea513ccc6142913013ffb9a3f97c2914ce8cc6 04-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
e8d7bebc0dd037516dd695ee1ac2eb0923753b46 04-Sep-2010 Douglas Gregor <dgregor@apple.com> Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
5eb667af08d8619c455d6f53e7d59aab8831c187 03-Sep-2010 Chandler Carruth <chandlerc@gmail.com> Allow anonymous and local types. The support was already in place for these,
but this makes them work even as an extension in C++98. This resolves PR8077.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
17fb855280be411389361f1c79753e0013c4187c 03-Sep-2010 Chandler Carruth <chandlerc@gmail.com> Allow anonymous and local types. The support was already in place for these,
but this makes them work even as an extension in C++98. This resolves PR8077.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
02bd1d3c498a7eff790fd426afdb97751fa556a1 03-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Use getSpelling to get original text of the
c++ operator token. (radar 8328250).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
afbc68177cc11b8bfa47464b20e15d5f8fb21d4e 03-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Use getSpelling to get original text of the
c++ operator token. (radar 8328250).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
aa3d61c48e65e5f705a2c7e8d34e73032f66d76c 03-Sep-2010 John McCall <rjmccall@apple.com> Add a quick-and-dirty hack to give a better diagnostic for [class.protected]
restrictions. The note's not really on the right place given its wording,
but putting a second note on the call site (or muddying the wording) doesn't
appeal.

There are corner cases where this can be wrong, but I'm not concerned.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fe24e05a87e48fa3318b65d1a92c542107639fd9 03-Sep-2010 John McCall <rjmccall@apple.com> Add a quick-and-dirty hack to give a better diagnostic for [class.protected]
restrictions. The note's not really on the right place given its wording,
but putting a second note on the call site (or muddying the wording) doesn't
appeal.

There are corner cases where this can be wrong, but I'm not concerned.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
660da6b0e9d9e4fb118e93610c64b17af6578e02 03-Sep-2010 John McCall <rjmccall@apple.com> Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
8c465e6494d16a19127873dc9bdc55177ac6b6fd 03-Sep-2010 John McCall <rjmccall@apple.com> Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
23cf1f9d0f258b16fb5c07a14ceb7aba4562903e 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/Attr.td
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/AttributeList.h
52fc314e1b5e1baee6305067cf831763d02bd243 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/Attr.td
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
lang/Sema/AttributeList.h
3ad59d2bf26f624b5b3967ea220ab2dda17bc099 03-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to allow alternative representation of c++
operators (and, or, etc.) to be used as selectors
to match g++'s behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
be74740cc246ce08d42804a684385a42eb814edb 03-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to allow alternative representation of c++
operators (and, or, etc.) to be used as selectors
to match g++'s behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
dd6349b0ac0d2987ff5e10fcb3dcb40d3eb4b44c 03-Sep-2010 Ted Kremenek <kremenek@apple.com> Add optional record of "location" SVals in the environment. When we analyzing loads/stores, we lose the location SVal, which makes it difficult to recover in some cases (e.g., for post diagnostics). This is prep for pending changes to GRExprEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
6d4c022695c2d780ccb63ce43a50588412b80813 03-Sep-2010 Ted Kremenek <kremenek@apple.com> Add optional record of "location" SVals in the environment. When we analyzing loads/stores, we lose the location SVal, which makes it difficult to recover in some cases (e.g., for post diagnostics). This is prep for pending changes to GRExprEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
122ff727d033bfa7a2e11a5c88aa150a5c0622a9 03-Sep-2010 Ted Kremenek <kremenek@apple.com> Add GRState::getSimplifiedSVal(), which provides an API hook for doing symbol -> constant folding. This isn't used yet, but
is prep for some pending optimizations in GRExprEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
124f5d5fa4c6b348b4ca5876762fc5eb3864a39b 03-Sep-2010 Ted Kremenek <kremenek@apple.com> Add GRState::getSimplifiedSVal(), which provides an API hook for doing symbol -> constant folding. This isn't used yet, but
is prep for some pending optimizations in GRExprEngine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
7bc7eac4bafd314134d33c51a91854efdf2f1e89 03-Sep-2010 Ted Kremenek <kremenek@apple.com> Fix enum: CallEnter/CallExit are StmtPoints

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
4462ee2f0000e6cb966e3fff4516c84292f0cce8 03-Sep-2010 Ted Kremenek <kremenek@apple.com> Fix enum: CallEnter/CallExit are StmtPoints

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
a7754dfa32338bae703c0d943cb5624fab6e5053 03-Sep-2010 Anders Carlsson <andersca@mac.com> Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning.

The rationale behind this is that it is normal for callback functions to have a non-void return type
and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5d1d7ae120c2c8e6cba5d2a712b33500a5aecc10 03-Sep-2010 Anders Carlsson <andersca@mac.com> Get rid of the "functions declared 'noreturn' should have a 'void' result type" warning.

The rationale behind this is that it is normal for callback functions to have a non-void return type
and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a0c4d36c100b81356d3cd749c2adfef1d4f61868 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for Borland extensions via option -fborland-extensions
(original patch r112791 was reverted due to a bug).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
400b607546a8dbfcee3b690f3d0a2fee0ea6480b 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for Borland extensions via option -fborland-extensions
(original patch r112791 was reverted due to a bug).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
c16c7232396e03ebc4e9e52f54db1128fb10b11e 03-Sep-2010 Tom Care <tcare@apple.com> Reapply 112850 and 112839 with a constructor for the BinaryOperatorData struct. Clang would zero out the enum and pointer in the struct in some conditions, but GCC would never zero out the values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
2bbbe50dbaa0bf231c16333b335304655deeb26b 03-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Reapply 112850 and 112839 with a constructor for the BinaryOperatorData struct. Clang would zero out the enum and pointer in the struct in some conditions, but GCC would never zero out the values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
9056bd2b3fd221a8f33faab05df0dafebc895fb7 03-Sep-2010 Bill Wendling <isanbard@gmail.com> Add a couple of FIXMEs. The types of palignr are different here than in GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
798ad97198bfa4a227916d2ca65ee2c7f91d60b3 03-Sep-2010 Bill Wendling <isanbard@gmail.com> Add a couple of FIXMEs. The types of palignr are different here than in GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
6e632983d8ce978437b8c6144dfdbccd7f316ced 03-Sep-2010 John McCall <rjmccall@apple.com> sabre points out that the timing here is pretty pessimal; I'll retry the
experiment in a few days.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
40bfbbc8a56bb1cff136c8cd44ced7e673f21a5e 03-Sep-2010 John McCall <rjmccall@apple.com> sabre points out that the timing here is pretty pessimal; I'll retry the
experiment in a few days.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c6d4a8ee9916dcf446bd6db5b44f694311c46438 03-Sep-2010 John McCall <rjmccall@apple.com> Experimentally move the tautological comparison warnings from -Wsign-compare
to -Wtautological-compare. This implies that they're now on by default.
If this causes chaos, I'll figure something else out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
51b0a52cc42d5c76ad96cde924c2130e36b46dca 03-Sep-2010 John McCall <rjmccall@apple.com> Experimentally move the tautological comparison warnings from -Wsign-compare
to -Wtautological-compare. This implies that they're now on by default.
If this causes chaos, I'll figure something else out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
5cd6231b9b167f170e1994abb82279f64e38180c 03-Sep-2010 Bill Wendling <isanbard@gmail.com> Reorder the MMX builtins to be in their own ostracized group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
1c4345e1066bc8de27d027bccd193dec13d40bf2 03-Sep-2010 Bill Wendling <isanbard@gmail.com> Reorder the MMX builtins to be in their own ostracized group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
499d0f4b4f76328812ed192cb9800791dc333170 02-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Serialization/ASTBitCodes.h
e2ca6d4a2f41876930fbd304caa706452d2569d8 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Serialization/ASTBitCodes.h
b36f1104e7ac8203a95d7d5c4b00eece24811900 02-Sep-2010 Tom Care <tcare@apple.com> Reverting 112850 and 112839 due to test failures on some systems

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
066d66096520c015036ef20bbbfe100b88e2a2d1 02-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Reverting 112850 and 112839 due to test failures on some systems

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
48ce58bba7d612551685c7ebdfa9884354e29462 02-Sep-2010 John McCall <rjmccall@apple.com> Teach RecursiveASTVisitor to optionally visit bodies of instantiations.
Based on a patch by Francois Pichet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
760c8af273d9871d063250ae626fb6df94c121f2 02-Sep-2010 John McCall <rjmccall@apple.com> Teach RecursiveASTVisitor to optionally visit bodies of instantiations.
Based on a patch by Francois Pichet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
33e584b41a604cda6b5dc4a1c545e7d6bb7db9b3 02-Sep-2010 Tom Care <tcare@apple.com> Improved error reporting in IdempotentOperationChecker
- SourceRange highlighting is only given for the relevant side of the operator (assignments give both)
- Added PostVisitBinaryOperator hook to retrieve the ExplodedNode for an operator
- Added a BugReporterVisitor to display the last store to every VarDecl in a Stmt
- Changed bug reporting to use the new BugReporterVisitor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
3f0ce9c3ab04d0edb8d28145a8feb4abaa8fb8e6 02-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Improved error reporting in IdempotentOperationChecker
- SourceRange highlighting is only given for the relevant side of the operator (assignments give both)
- Added PostVisitBinaryOperator hook to retrieve the ExplodedNode for an operator
- Added a BugReporterVisitor to display the last store to every VarDecl in a Stmt
- Changed bug reporting to use the new BugReporterVisitor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
7b4fd830cd885fa6ce90a1cf9182d4ed16091918 02-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid implicit string construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
1d6107c30194f10cb2c634e9d8f8740d660b1644 02-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid implicit string construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
5930ab8acac5864b91f7fc1a2091fda9d7df99d7 02-Sep-2010 Dawn Perchik <dawn@burble.org> Reverting rev 112791 - apparently -fborland-extensions is on all the time?!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
d0b4e7c8723c031cd8d743b2ff63943a3d0563ff 02-Sep-2010 Dawn Perchik <dawn@burble.org> Reverting rev 112791 - apparently -fborland-extensions is on all the time?!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
a4202c183705c285d7639e9fbc347c6d2173263e 02-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for Borland extensions via option -fborland-extensions


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
621a2f36af707747d70b8103bda6f65237fce899 02-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for Borland extensions via option -fborland-extensions


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
8dfddc363dfbcd9ca65d53822a2b736b4eef7dad 02-Sep-2010 Ted Kremenek <kremenek@apple.com> For GRExprEngine::EvalBind() (and called visitors), unifiy StoreE and AssignE. Now StoreE (const Stmt*) represents the expression where the store took place, which is the assignment expression if it takes place in an assignment. This removes some conceptual dissidence as well as removes an extra parameter from the Checker::PreVisitBind() visitor. It also improves ranges and source location information in analyzer diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
79d73044b7d0adfbd18ee34285395e1d5135f662 02-Sep-2010 Ted Kremenek <kremenek@apple.com> For GRExprEngine::EvalBind() (and called visitors), unifiy StoreE and AssignE. Now StoreE (const Stmt*) represents the expression where the store took place, which is the assignment expression if it takes place in an assignment. This removes some conceptual dissidence as well as removes an extra parameter from the Checker::PreVisitBind() visitor. It also improves ranges and source location information in analyzer diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
c61f29cb33e9150d16be36830a6c265e1842e77d 02-Sep-2010 Zhanyong Wan <wan@google.com> Fixes a warning when compiling Clang (Sema has virtual methods but a non-virtual dtor). Reviewed by chandlerc and nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
85dd015707143f763617098ec9458bf61db420f1 02-Sep-2010 Zhanyong Wan <wan@google.com> Fixes a warning when compiling Clang (Sema has virtual methods but a non-virtual dtor). Reviewed by chandlerc and nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
e019df2d54944bf55f4b8916fb9dbed0e7656368 02-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new libclang function,
clang_getSpecializedCursorTemplate(), which determines the template
(or member thereof) that the given cursor specializes or from which it
was instantiated. This routine can be used to establish a link between
templates and their instantiations/specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112780 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclTemplate.h
e0329acf5c9437e2086a2fb2bf7a95ae2ac96505 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang function,
clang_getSpecializedCursorTemplate(), which determines the template
(or member thereof) that the given cursor specializes or from which it
was instantiated. This routine can be used to establish a link between
templates and their instantiations/specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112780 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclTemplate.h
047c86597b922afa6dd16dcc086002bd7a91ffab 02-Sep-2010 Zhanyong Wan <wan@google.com> Make RecursiveASTVisitor not crash when a TemplateArgumentLoc object has a NULL TypeSourceInfo*. This fixes the symptom of http://llvm.org/PR8043. Reviewed by csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
fcf431609769a9600c24618d1a33135caec4fef2 02-Sep-2010 Zhanyong Wan <wan@google.com> Make RecursiveASTVisitor not crash when a TemplateArgumentLoc object has a NULL TypeSourceInfo*. This fixes the symptom of http://llvm.org/PR8043. Reviewed by csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
bec660d7bfcc2abadae6b1dfa009f06677ea011f 02-Sep-2010 Bill Wendling <isanbard@gmail.com> Add some MMX builtins to correspond with the intrinsics now accepted by
LLVM. This will be used by the mmintrin.h header, but that bit still needs to be
worked out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
65206c552ae5215c2225502686b5e164ebe2c2da 02-Sep-2010 Bill Wendling <isanbard@gmail.com> Add some MMX builtins to correspond with the intrinsics now accepted by
LLVM. This will be used by the mmintrin.h header, but that bit still needs to be
worked out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
c1e532a79c0d206e79645d96dc01f8a2f2f26ed8 02-Sep-2010 Craig Silverstein <csilvers2000@yahoo.com> Update the docstring to say FriendTemplateDecl is not actually used.
Based on discussion with rjmccall and dgregor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
c6a518a7271bbd6d0f606ba5c1b1b9c668bbdcb0 02-Sep-2010 Craig Silverstein <csilvers2000@yahoo.com> Update the docstring to say FriendTemplateDecl is not actually used.
Based on discussion with rjmccall and dgregor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
9c4aae941a9efd293d591f1fd4ead53ee326fd4d 02-Sep-2010 Craig Silverstein <csilvers2000@yahoo.com> Make some docstring clarifications, after discussion with dgregor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
710672485039d3dd355748876299fff88e8ad84c 02-Sep-2010 Craig Silverstein <csilvers2000@yahoo.com> Make some docstring clarifications, after discussion with dgregor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
4ac972be29df254eb6b299e305bb9ae5e54db7a0 01-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Fix the source-range information for an EnumConstantDecl; previously,
it did not include the initializer expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8e7139c9554230df64325f70fe202c83491ba7f5 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix the source-range information for an EnumConstantDecl; previously,
it did not include the initializer expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e4456a335ff2190b23bf1463249d288f962c1f22 01-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations:
UsingDecl, UnresolvedUsingValueDecl, and
UnresolvedUsingTypenameDecl. These three are collapsed into a single
cursor kind for using declarations, since libclang clients don't need
the distinction.

Several related changes here:
- Cursor visitation of the three AST nodes for using declarations
- Proper source-range computation for these AST nodes
- Using declarations have no USRs, since they don't actually declare
any entities.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112730 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclCXX.h
7e24256c95afb64b4d5abf201a0f9f0527cb4cf3 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations:
UsingDecl, UnresolvedUsingValueDecl, and
UnresolvedUsingTypenameDecl. These three are collapsed into a single
cursor kind for using declarations, since libclang clients don't need
the distinction.

Several related changes here:
- Cursor visitation of the three AST nodes for using declarations
- Proper source-range computation for these AST nodes
- Using declarations have no USRs, since they don't actually declare
any entities.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112730 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclCXX.h
0b08c44cf681f07873855bcbf388a7d5f35a3951 01-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Make it clear that libclang does not modify the command-line arguments
it is given.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112717 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2ef6944d529c94824f5bf96f65665f5bee30f5a2 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Make it clear that libclang does not modify the command-line arguments
it is given.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112717 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8b4221f4e362f2263bb87550fd4c58ee32fa4366 01-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Implement libclang support for using directives (cursor + visitation +
suppressing USRs). Also, fix up the source location information for
using directives so that the declaration location refers to the
namespace name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112693 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclCXX.h
0a35bceb7768fc0be62cb644a4e31d8bfd9fb44a 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement libclang support for using directives (cursor + visitation +
suppressing USRs). Also, fix up the source location information for
using directives so that the declaration location refers to the
namespace name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112693 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclCXX.h
51e8eea95cb6886b76e9d72eadce34aba72dd35a 01-Sep-2010 Ted Kremenek <kremenek@apple.com> Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.

Fixes <rdar://problem/8380046>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
53b9441b5a81a24fa1f66f3f6416f1e36baa9c2f 01-Sep-2010 Ted Kremenek <kremenek@apple.com> Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.

Fixes <rdar://problem/8380046>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
aa04570cabaf59669d8eafc0bedb357722d9fbc5 01-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Improve location information in the representation of namespace
aliases. Previously, the location of the alias was at the "namespace"
keyword. Now, it's on the identifier being declared (as is the custom
for Clang), and we keep a separate source location for the "namespace"
keyword.

Also, added a getSourceRange() member function to NamespaceAliasDecl
to correctly compute the source range.

Finally, removed a bunch of setters from NamespaceAliasDecl and gave
ASTReaderDecl friendship so that it could set the corresponding fields
directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8ea5b9d832455247a15925398fb663d299d33238 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Improve location information in the representation of namespace
aliases. Previously, the location of the alias was at the "namespace"
keyword. Now, it's on the identifier being declared (as is the custom
for Clang), and we keep a separate source location for the "namespace"
keyword.

Also, added a getSourceRange() member function to NamespaceAliasDecl
to correctly compute the source range.

Finally, removed a bunch of setters from NamespaceAliasDecl and gave
ASTReaderDecl friendship so that it could set the corresponding fields
directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
7f90a8e0bfdcf34952140b515410fc1eedcbb52e 01-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add libclang support for namespace aliases (visitation + USRs) along
with a new cursor kind for a reference to a namespace.

There's still some oddities in the source location information for
NamespaceAliasDecl that I'll address with a separate commit, so the
source locations displayed in the load-namespaces.cpp test will
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112676 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6931900f43cea558c6974075256c07728dbfecc6 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Add libclang support for namespace aliases (visitation + USRs) along
with a new cursor kind for a reference to a namespace.

There's still some oddities in the source location information for
NamespaceAliasDecl that I'll address with a separate commit, so the
source locations displayed in the load-namespaces.cpp test will
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112676 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
47798f2285bca17e2c8f85030e5df7884c862f10 01-Sep-2010 John McCall <rjmccall@apple.com> Add convenience accessors for determining whether template declarations are definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
13fda8afe2ddd06c12bfb93a054e6b0d6d0d99f1 01-Sep-2010 John McCall <rjmccall@apple.com> Add convenience accessors for determining whether template declarations are definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
2724587a80b69eea2473b4018e173ddb0c621490 01-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add a new libclang function clang_getTemplateCursorKind(), which
determines the kind of declaration that would be generated if the
given template were instantiated. This allows a client to distinguish
among class/struct/union templates and function/member function/static
member function templates.

Also, teach clang_CXXMethod_isStatic() about function templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112655 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
49f6f5489483beaffc7ce48dfc000af4e65b9216 01-Sep-2010 Douglas Gregor <dgregor@apple.com> Add a new libclang function clang_getTemplateCursorKind(), which
determines the kind of declaration that would be generated if the
given template were instantiated. This allows a client to distinguish
among class/struct/union templates and function/member function/static
member function templates.

Also, teach clang_CXXMethod_isStatic() about function templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112655 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
458da213564aae23c42bd0ff6e906de7fd73b8cd 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
410c4f2eb5e6a8c2318cacb9a6751f1b4fcff166 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
c6bf3b918ad19b09e31fabf5a109d33f9f034b9e 31-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Extend libclang with a new cursor kind that indicates a reference to a
template. Such cursors occur, for example, in template specialization
types such as vector<int>. Note that we do not handle the
super-interesting case where the template name is unresolved, e.g.,
within a template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112636 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0b36e614aa19df72885d5e0de996f7fbb9874ec3 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Extend libclang with a new cursor kind that indicates a reference to a
template. Such cursors occur, for example, in template specialization
types such as vector<int>. Note that we do not handle the
super-interesting case where the template name is unresolved, e.g.,
within a template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112636 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b341f4eeddee53d8f47bf8acf12398b3a3c1c0b6 31-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add libclang support for class template partial specializations,
including a cursor kind, visitation, and USRs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112629 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
74dbe640021d96a8dbb85c592471c04449ade81c 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Add libclang support for class template partial specializations,
including a cursor kind, visitation, and USRs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112629 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d8e4df59e56d7422df0751cf15f919c28e0f9c30 31-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add a libclang cursor kind, visitation support and USR support for C++
class templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112627 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
39d6f07b056c31e1e6b5946165ed4b23e7887f22 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a libclang cursor kind, visitation support and USR support for C++
class templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112627 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5e1fe4d264f3777fbd3afd3301e0e515d88425d8 31-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> AST work to support [C++] [IRgen] for ?: with missing LHS
This is also pr7726 and wip. No change in functionality
at this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f9b949fecf339a2c9bd97dd11a272c4878f85ce4 31-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> AST work to support [C++] [IRgen] for ?: with missing LHS
This is also pr7726 and wip. No change in functionality
at this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b88eafd94faee5cebd0b8bb27803e61cd92d7d56 31-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement basic support for indexing function templates in
libclang. This includes:
- Cursor kind for function templates, with visitation logic
- Cursor kinds for template parameters, with visitation logic
- Visitation logic for template specialization types, qualified type
locations
- USR generation for function templates, template specialization
types, template parameter types.

Also happens to fix PR7804, which I tripped across while testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112604 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclTemplate.h
fe72e9ceeae6cc8669cd8bb722425300190638ea 31-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement basic support for indexing function templates in
libclang. This includes:
- Cursor kind for function templates, with visitation logic
- Cursor kinds for template parameters, with visitation logic
- Visitation logic for template specialization types, qualified type
locations
- USR generation for function templates, template specialization
types, template parameter types.

Also happens to fix PR7804, which I tripped across while testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112604 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclTemplate.h
91b65beaa130ee458107096a826d3c17b39f1664 31-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> libclang indexing support for C++ constructors, destructors, and
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112600 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
01829d3afafdfd355cbe93537bc408aeeed964c6 31-Aug-2010 Douglas Gregor <dgregor@apple.com> libclang indexing support for C++ constructors, destructors, and
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112600 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6da49ce1c4e3b671d30ba7fbb80d27e011124d35 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Enable inline namespaces in C++03 as an extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
88e64ca96d6c00c6f3bd43772cd325bede795d2a 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Enable inline namespaces in C++03 as an extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
6bd5085ed4a787ab6a534719505b0a84f6606164 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Enable inline namespaces in the AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
4e4d57069cf9402728e05f7fc856295a86e4801f 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Enable inline namespaces in the AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
92ae2b40f721121f8944a1bb3c69b23d96bcff31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
7a126a474fdde06382b315b4e3d8ef0a21d4dc31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
28a209c7deee1ce5b6f101fabbedf74fa626e557 30-Aug-2010 Sean Hunt <rideau3@gmail.com> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Sema/Sema.h
6cf750298d3621d8a10a6dd07fcee8e274b9d94d 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Sema/Sema.h
7e248dedc344f47e2a4e91fc81da0542677c2934 30-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Heap-allocate the attribute vectors in
ASTContext::DeclAttrs. Otherwise, iterators will go stale when the
DenseMap reallocates, which can cause crashes when, e.g., looping over
the attributes in a template to instantiate them and add the results
to the instantiation of that template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6320064d0c60fa8683f5623881c9394fd4aa7689 30-Aug-2010 Douglas Gregor <dgregor@apple.com> Heap-allocate the attribute vectors in
ASTContext::DeclAttrs. Otherwise, iterators will go stale when the
DenseMap reallocates, which can cause crashes when, e.g., looping over
the attributes in a template to instantiate them and add the results
to the instantiation of that template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4a581fcc7f529093de2c64cebf88533973847bbd 30-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Now that GCC will have #pragma push/pop (in GCC 4.6), allow the
#pragma without requiring it to be in the "clang" namespace, from
Louis Gerbarg!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
6493a4d7129673f7878da2382dedf4f9abc57e4c 30-Aug-2010 Douglas Gregor <dgregor@apple.com> Now that GCC will have #pragma push/pop (in GCC 4.6), allow the
#pragma without requiring it to be in the "clang" namespace, from
Louis Gerbarg!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
67c0315750719a35e43b1d174b7128a8ab53efbf 30-Aug-2010 Sean Hunt <rideau3@gmail.com> Two minor fixes to user-defined literals:

- Zero-initialize UDLData so that crashes stop
- Stop complaining that we can't emit them (we most certainly can)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
75b8508380e6d44276a8fafe5cafcedb9cf532d3 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Two minor fixes to user-defined literals:

- Zero-initialize UDLData so that crashes stop
- Stop complaining that we can't emit them (we most certainly can)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
6eab8186a0b68571e1b4059fc0f25188647da2d4 30-Aug-2010 Sean Hunt <rideau3@gmail.com> Fix some test-breaking that snuck into my previous commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
e425368eb59687b66620a2c6adc3e426c997d796 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fix some test-breaking that snuck into my previous commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
0fd5a8586deed8910d4e62ef0df12f0e6f48f24b 29-Aug-2010 Sean Hunt <rideau3@gmail.com> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Sema/Sema.h
0016d519b831859526b79405cdae4c64c73731c8 29-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Sema/Sema.h
9c0d53a9932c135e3fb28b757e03f7424d98c840 29-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Improve code completion for initializer lists in constructors. Instead
of prioritizing just by initialization order, we bump the priority of
just the *next* initializer in the list, and leave everything else at
the normal priority. That way, if one intentionally skips the
initialization of a base or member (to get default initialization),
we'll still get ordered completion for the rest.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
0c431c8c001e4c1f7488663d98700a8ce1e89e2a 29-Aug-2010 Douglas Gregor <dgregor@apple.com> Improve code completion for initializer lists in constructors. Instead
of prioritizing just by initialization order, we bump the priority of
just the *next* initializer in the list, and leave everything else at
the normal priority. That way, if one intentionally skips the
initialization of a base or member (to get default initialization),
we'll still get ordered completion for the rest.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
4d3664e00b3fbe4ca4de4431414941e0bec06b44 29-Aug-2010 John McCall <rjmccall@apple.com> Complain if a __pragma isn't terminated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
3da92a9d21f707c164797dd967ba894b2282b343 29-Aug-2010 John McCall <rjmccall@apple.com> Complain if a __pragma isn't terminated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
bbf55a19bd1b4975ff46c15323fd112d60f5c43f 29-Aug-2010 John McCall <rjmccall@apple.com> Add support for Microsoft's __pragma in the preprocessor.
Patch by Francois Pichet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
1ef8a2e7675f3d8b6e8d9963b00378086e1dcdc7 29-Aug-2010 John McCall <rjmccall@apple.com> Add support for Microsoft's __pragma in the preprocessor.
Patch by Francois Pichet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
023aeab93de64d6d079ceba7e870bd32c4662444 28-Aug-2010 John McCall <rjmccall@apple.com> If filtering a lookup result leaves it ambiguous, keep the ambiguity
kind. Fixes PR7252.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
67d22fb57ecccd29ea9c8ec004f63dc356cd477d 28-Aug-2010 John McCall <rjmccall@apple.com> If filtering a lookup result leaves it ambiguous, keep the ambiguity
kind. Fixes PR7252.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
11dd7550044ec6b3ca84842acaae2eb69f5f1d3f 28-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Fix copy+paste error in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ae2777cfe7d21f73e5a4155082fe20197cec62bd 28-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Fix copy+paste error in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a53d7f2521cfe49435fb52d4bd62110a7fbe5a27 28-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix the memory leak of FloatingLiteral/IntegerLiteral.

For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers.
Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
the APFloat/APInt values will never get freed.
I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral.

Fixes rdar://7637185

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9996a7f06a3c5b4554692e7177930cf4e8ef09af 28-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix the memory leak of FloatingLiteral/IntegerLiteral.

For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers.
Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with
the APFloat/APInt values will never get freed.
I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral.

Fixes rdar://7637185

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e337c01165ec82f3c592c55885f11a75f4862631 28-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Ignore this flag too, Clang doesn't seem to use random numbers internally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
944c42feb4f40735f3767bae59a0547a7b803e1e 28-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Ignore this flag too, Clang doesn't seem to use random numbers internally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
5d25327ee94eb07d81ff8aa0ee726ee8a2c3bac0 28-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Basic code completion support for the base and member initializers in
a constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0133f525a23e18dd444880f7554f25fbcbd834e5 28-Aug-2010 Douglas Gregor <dgregor@apple.com> Basic code completion support for the base and member initializers in
a constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
0edeb683d4242d94f32543a325d2a8c651398a2c 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for inline namespaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
d078e641450bbc5a20df8d3b54f87b27e398acb3 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for inline namespaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
18052092ca5d9f2833b8da3247a354ccd50482f5 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Comment and move another ASTReader member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
e41f985c15d15fce8390ebffb49dc75447c8f0f6 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Comment and move another ASTReader member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
bb5e1ba27200495ccd2ef6525e522c154f861334 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update comment after Chandler's change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
e361c63e5306df4df9aa780c60c658046a69d38d 28-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update comment after Chandler's change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
f83845030dfc2499d1e92ceebef3c82151c1a45c 28-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Miscellaneous found by inspection with John and Sebastian

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
757c600d696f016fea6b086d0349bcd7a4d06bd1 28-Aug-2010 Douglas Gregor <dgregor@apple.com> Miscellaneous found by inspection with John and Sebastian

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ae25559e95e45ec9b5ee58d4ebb76e1f5455b7ce 28-Aug-2010 Tom Care <tcare@apple.com> Add alternate version of LiveVariables analysis that does not kill liveness at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs.
- Added killAtAssign flag to LiveVariables
- Added relaxed LiveVariables to AnalysisContext with an accessor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/AnalysisContext.h
ec49bf464c91a52b3a463940da6589d03bf40248 28-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Add alternate version of LiveVariables analysis that does not kill liveness at assignments. This 'relaxed' liveness is useful in path sensitive analysis for situations where the resulting extended liveness allows us to find some bugs.
- Added killAtAssign flag to LiveVariables
- Added relaxed LiveVariables to AnalysisContext with an accessor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/AnalysisContext.h
7f46812ee61463a100f2f26571c9b42832910f6d 27-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Improve wording of diagnostic complaining about a non-void* pointer as the first parameter of operator delete

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
520441eb82202702688750860fd98148421ea0ed 27-Aug-2010 Douglas Gregor <dgregor@apple.com> Improve wording of diagnostic complaining about a non-void* pointer as the first parameter of operator delete

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cd24d84311dcb47e1c1c25f73b8502b4f27f9566 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.

Implements <rdar://problem/8274883>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112296 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3064ef9e604d19a0cfd0d8e3ed3055bfd83f88fd 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.

Implements <rdar://problem/8274883>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112296 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
333a9a6e916f6c9b23f7d4e184f74ff6e21eaf1b 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix copy-paste in doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112295 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ad72f4dad4cf0fd2b71eb8f4704d2fe7ac58fb44 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix copy-paste in doxygen comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112295 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9862d9eaf9393e2ccaaf28901d794dd1c771f080 27-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Suggest "const" and "volatile" code completions after a function
declarator, the very definition of "low-hanging fruit".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
1a480c403a3b141ab89c9c59cf7b681102a1bfab 27-Aug-2010 Douglas Gregor <dgregor@apple.com> Suggest "const" and "volatile" code completions after a function
declarator, the very definition of "low-hanging fruit".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
fd844a2662de6fd5d6ddf2bb6f155f536bb93c6b 27-Aug-2010 Dan Gohman <gohman@apple.com> createMainFileID doesn't need its IncludePos argument, since
the main file isn't an included file, and the IncludePos is
always SourceLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
f155dfa4e284be7dca8f1abf002476b2aaee8546 27-Aug-2010 Dan Gohman <gohman@apple.com> createMainFileID doesn't need its IncludePos argument, since
the main file isn't an included file, and the IncludePos is
always SourceLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
ee273b5e73a8c866da7b4c9fcfb0af48c7973ed2 27-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When code-completing inside an Objective-C method, give a slight
priority boost to methods with the same selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
265f749edb28a80db517cc9051bd21092720d0f0 27-Aug-2010 Douglas Gregor <dgregor@apple.com> When code-completing inside an Objective-C method, give a slight
priority boost to methods with the same selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
e6e047ff2c8a8cb07162e8fe3b5ae5b7bda89dae 27-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add a super-cool code completion for send-to-super. When we're typing
a message send to "super" from a method that appears to be meant to
override a superclass method (same kind, same selector, same argument
types), provide a "super" completion that fills in the selector along
with forwarding the method's arguments (as placeholders).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
03d8aec611380d30ddb0659bb61be9289c3871b3 27-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a super-cool code completion for send-to-super. When we're typing
a message send to "super" from a method that appears to be meant to
override a superclass method (same kind, same selector, same argument
types), provide a "super" completion that fills in the selector along
with forwarding the method's arguments (as placeholders).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
580dec2c9965112b0c9854467aa7ae1463c4ea94 27-Aug-2010 John McCall <rjmccall@apple.com> Propagate whether an id-expression is the immediate argument of
an '&' expression from the second caller of ActOnIdExpression.

Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.

Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.

Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
9c72c6088d591ace8503b842d39448c2040f3033 27-Aug-2010 John McCall <rjmccall@apple.com> Propagate whether an id-expression is the immediate argument of
an '&' expression from the second caller of ActOnIdExpression.

Teach template argument deduction that an overloaded id-expression
doesn't give a valid type for deduction purposes to a non-static
member function unless the expression has the correct syntactic
form.

Teach ActOnIdExpression that it shouldn't try to create implicit
member expressions for '&function', because this isn't a
permitted form of use for member functions.

Teach CheckAddressOfOperand to diagnose these more carefully.
Some of these cases aren't reachable right now because earlier
diagnostics interrupt them.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
lang/Sema/Sema.h
5058ef6c7ab13f285da81c787ea7a5ffe464e8a4 27-Aug-2010 John McCall <rjmccall@apple.com> One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/Designator.h
lang/Sema/Ownership.h
lang/Sema/PrettyDeclStackTrace.h
lang/Sema/Sema.h
f312b1ea179f1c44371f9ee0cd0bc006f612de11 27-Aug-2010 John McCall <rjmccall@apple.com> One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/Designator.h
lang/Sema/Ownership.h
lang/Sema/PrettyDeclStackTrace.h
lang/Sema/Sema.h
cb127c99bf0083a8afbe5e546345172680715d8c 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix horrible GRExprEngine bug where switch statements with no 'case:' statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
34feff654c6304e0a59ceb1376989d28dbc956ff 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix horrible GRExprEngine bug where switch statements with no 'case:' statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
6b5f410f4ef7d4e2300df3cec8ef30810e10dfc7 26-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When code-completing a potential call to a C++ non-static member
function, take into account the qualifiers on the object argument
(e.g., what will become "this"), filtering around uncallable member
functions and giving a slight priority boost to those with
exactly-matching qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Sema/CodeCompleteConsumer.h
3cdee121daa13403335094ce0e181b9911c2124c 26-Aug-2010 Douglas Gregor <dgregor@apple.com> When code-completing a potential call to a C++ non-static member
function, take into account the qualifiers on the object argument
(e.g., what will become "this"), filtering around uncallable member
functions and giving a slight priority boost to those with
exactly-matching qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Sema/CodeCompleteConsumer.h
45a85e0c449024f48a113c336e73d4458e81c72b 26-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement code completion for @selector expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
458433d2f0f5c96a9e0d21decdd44bebccf20b11 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for @selector expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
6a611fd3a13f7e773427f2fbde993354ca269f54 26-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.

3rd try. How embarrassing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112180 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1e5e6684b0f27701e6f7c65f8c6a32a10cbcc3ed 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.

3rd try. How embarrassing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112180 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0723ac686c322d77cd0e7e514e620fca5b2fd8f0 26-Aug-2010 John McCall <rjmccall@apple.com> Missed a couple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f29815affe5d28c499d21c0be9bb078c52025ae6 26-Aug-2010 John McCall <rjmccall@apple.com> Missed a couple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f3e302acf4259cf4cd9bc62b58fd2d517e817ab4 26-Aug-2010 John McCall <rjmccall@apple.com> Apparently gcc doesn't always get injected class names right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
6d9496d2d22817aeb286dd7007923e14f10fa8a6 26-Aug-2010 John McCall <rjmccall@apple.com> Apparently gcc doesn't always get injected class names right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
0942e31e6c3725b57c5093ab339dd86031454cfc 26-Aug-2010 John McCall <rjmccall@apple.com> Move things around so that Sema.h no longer depends on even DeclBase.h.
It still depends on Type because DeclarationName.h does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Sema/Sema.h
ea318642072d3d94b5c3cff0fa6f4b33d2db0768 26-Aug-2010 John McCall <rjmccall@apple.com> Move things around so that Sema.h no longer depends on even DeclBase.h.
It still depends on Type because DeclarationName.h does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Sema/Sema.h
0fcb42021cd2e1bf18acae23907f8dc24ea6bd8c 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112149, "Move the sorting of code-completion results out of the main
path and ...", it is failing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1cb237fbf9e52e17f1e03b6f80c1114f47f93781 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112149, "Move the sorting of code-completion results out of the main
path and ...", it is failing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f680d9ef70e596ada56e0fc91a3f17dad2a81e5a 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Basic/Specifiers.h
lang/Frontend/DeclXML.def
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
d931b086984257de68868a64a235c2b4b34003fb 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Basic/Specifiers.h
lang/Frontend/DeclXML.def
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
c84ff1dac7861413da5f9ac6cba4dd0e1256a33c 26-Aug-2010 Dan Gohman <gohman@apple.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
afbf5f810652f04c0bba235c0fa079885fb3caa8 26-Aug-2010 Dan Gohman <gohman@apple.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
5437fa02575af032848585514761237d247306df 26-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112149 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
be13afea6d9a5dc8877d5553552bd07c733a99bf 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112149 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d3a91a6b4123d8b9b6f55d6d08a5943de9bb8aba 26-Aug-2010 John McCall <rjmccall@apple.com> Restore r112114 now that SmallVector<...,0> is safe.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
9c3087b0b0bea2fd782205c1274ebfc4290265e0 26-Aug-2010 John McCall <rjmccall@apple.com> Restore r112114 now that SmallVector<...,0> is safe.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
d450a08f5d127ded015100683e5ec5df0542bfde 26-Aug-2010 Ted Kremenek <kremenek@apple.com> Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112139 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
95f33555a6d51b6537a9ed3968c3d1c2e4991b51 26-Aug-2010 Ted Kremenek <kremenek@apple.com> Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112139 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
df1075a9d307ce6c8b32d2e5d73a982592acdfa5 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own
header.", it is teh broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
0ad106fec9dd188e20026c80d814f836e15780e3 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112114, "Pull DelayedDiagnostic and AccessedEntity out into their own
header.", it is teh broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
dc40696d6237160746ebc1993b4db085d7f13c24 26-Aug-2010 Eric Christopher <echristo@apple.com> Fix typo in error message and testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0f937581842cbb093ba9abdf7d7b4f522be95e59 26-Aug-2010 Eric Christopher <echristo@apple.com> Fix typo in error message and testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7033227c7749e2b50d5a8625b2be7c3d7bbd5f26 26-Aug-2010 John McCall <rjmccall@apple.com> Pull DelayedDiagnostic and AccessedEntity out into their own header.
This works courtesy of the new SmallVector<..., 0> specialization that
doesn't require a complete type. Note that you'll need to pull at least
SmallVector.h from LLVM to compile successfully.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
679063472244a6cb6d4b52894ac020022690620d 26-Aug-2010 John McCall <rjmccall@apple.com> Pull DelayedDiagnostic and AccessedEntity out into their own header.
This works courtesy of the new SmallVector<..., 0> specialization that
doesn't require a complete type. Note that you'll need to pull at least
SmallVector.h from LLVM to compile successfully.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/DelayedDiagnostic.h
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
ed1384c6f884541eafc852f97deac5e81412b7e1 26-Aug-2010 Tom Care <tcare@apple.com> Improved the handling of blocks and block variables in PseudoConstantAnalysis
- Removed the assumption that __block vars are all non-constant
- Simplified some repetitive code in RunAnalysis
- Added block walking support
- Code/comments cleanup
- Separated out test for block pseudoconstants

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PseudoConstantAnalysis.h
967fea6cd9ae60ea31d27d440967990d2c705729 26-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Improved the handling of blocks and block variables in PseudoConstantAnalysis
- Removed the assumption that __block vars are all non-constant
- Simplified some repetitive code in RunAnalysis
- Added block walking support
- Code/comments cleanup
- Separated out test for block pseudoconstants

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PseudoConstantAnalysis.h
078c44e99a11522150708025c15678d2cafb3072 26-Aug-2010 John McCall <rjmccall@apple.com> Split out a header to hold APIs meant for the Sema implementation from Sema.h.
Clients of Sema don't need to know (for example) the list of diagnostics we
support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
2d88708cbe4e4ec5e04e4acb6bd7f5be68557379 26-Aug-2010 John McCall <rjmccall@apple.com> Split out a header to hold APIs meant for the Sema implementation from Sema.h.
Clients of Sema don't need to know (for example) the list of diagnostics we
support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
lang/Sema/SemaInternal.h
b3f6694747c522adcf61a7ba4a1c652cc3ffea1b 25-Aug-2010 Dan Gohman <gohman@apple.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
4710a8ea766b45079bf1c1dd36e29b59bb90829d 25-Aug-2010 Dan Gohman <gohman@apple.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
264c06db04c1167a291971ffc26e35d54df69dfd 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When combining the code-completion results from Sema long with the
code-completion results cached by ASTUnit, sort the resulting result
set. This makes testing far, far easier, so this commit also includes
tests for the previous few fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
721f359a350059a81945baa08f63b2e5feceb044 25-Aug-2010 Douglas Gregor <dgregor@apple.com> When combining the code-completion results from Sema long with the
code-completion results cached by ASTUnit, sort the resulting result
set. This makes testing far, far easier, so this commit also includes
tests for the previous few fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
752f9ef6d27d72ba166d6b8f1855b720fa6bbab9 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Initialize the translation-unit scope before lexing the first
token. The first token might be something that ends up triggering code
completion, which in turn requires a valid Scope. Test case forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/Sema.h
c1a3e5e73859ece9f106ae9d84c78bef4111956a 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Initialize the translation-unit scope before lexing the first
token. The first token might be something that ends up triggering code
completion, which in turn requires a valid Scope. Test case forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/Sema.h
84525f7472c58d7e59da52c5ecefdc09e57ae820 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add a code-completion context for "natural language" completions, so
that ASTUnit knows not to try to provide completions there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
af1c6b532e6e1e944db987f29062e5efce71a573 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a code-completion context for "natural language" completions, so
that ASTUnit knows not to try to provide completions there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
6db78b69f4b9adb18df3f5c53272cc44b9bb1a06 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a preprocessor code-completion hook for contexts where we
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Sema.h
55817afdf9d453a443262a733f6caf6692dca118 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a preprocessor code-completion hook for contexts where we
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Sema.h
5a42619c8734ddbedaca58566c07fa43dbbcc028 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement __builtin_printf, __builtin_fprintf. Fixes <rdar://problem/8336581>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
1e32ca6e3007e09073ddafb3cb5e0adc1f83293c 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement __builtin_printf, __builtin_fprintf. Fixes <rdar://problem/8336581>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
84e75263e69fc67b68abfd3ef13d12b4533e6fd0 25-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence a GCC warning saying that unsigned >= UO_PostInc is always true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
993cdca0fed7deb646e4654dfb2607227a497faa 25-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence a GCC warning saying that unsigned >= UO_PostInc is always true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
aeb70b12ab1af1ba7e5e48cee3903d1a768bca90 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/AST/StmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Frontend/StmtXML.def
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/AST/StmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Frontend/StmtXML.def
cacf30de20eac454cdea8b536b30272be476dcb9 25-Aug-2010 John McCall <rjmccall@apple.com> Random space optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0799c53fc2bb7acf937c8a8e165033dba1a5aba3 25-Aug-2010 John McCall <rjmccall@apple.com> Random space optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6f072329e9c9b7d44f0fa2a34528193a6f478414 25-Aug-2010 John McCall <rjmccall@apple.com> More incremental progress towards not including Expr.h in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/Basic/Specifiers.h
lang/Sema/Initialization.h
lang/Sema/Sema.h
5baba9d98364a3525d6afa15a04cdad82fd6dd30 25-Aug-2010 John McCall <rjmccall@apple.com> More incremental progress towards not including Expr.h in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/OperationKinds.h
lang/Basic/Specifiers.h
lang/Sema/Initialization.h
lang/Sema/Sema.h
179258586662abdf86817652deb89287cee47cf9 25-Aug-2010 Chandler Carruth <chandlerc@gmail.com> Rename *PendingImplicitInstantiations to *PendingInstantiations. No
functionality changed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
62c78d54bee499dd87f768f48b21c9b5ec15e516 25-Aug-2010 Chandler Carruth <chandlerc@gmail.com> Rename *PendingImplicitInstantiations to *PendingInstantiations. No
functionality changed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
lang/Serialization/ASTReader.h
88138de2bd70bdd408d8c1e307e212a6459a6a2c 25-Aug-2010 John McCall <rjmccall@apple.com> Split FunctionScopeInfo and BlockScopeInfo into their own header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ScopeInfo.h
lang/Sema/Sema.h
781472fe99a120098c631b0cbe33c89f8cef5e70 25-Aug-2010 John McCall <rjmccall@apple.com> Split FunctionScopeInfo and BlockScopeInfo into their own header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ScopeInfo.h
lang/Sema/Sema.h
d9b8fd0d8decfb9469397cd734d8ea90a62e8df9 25-Aug-2010 John McCall <rjmccall@apple.com> Remove Sema.h's dependency on DeclCXX.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
lang/Sema/Sema.h
384aff8b94bb0d1ad6c5667b90621e5699815bb2 25-Aug-2010 John McCall <rjmccall@apple.com> Remove Sema.h's dependency on DeclCXX.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
lang/Sema/Sema.h
3c229031bb964a748d27a38cf556f713da32c002 25-Aug-2010 John McCall <rjmccall@apple.com> Remove the DenseSet dependency from Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
50df6ae41f232612e5e88b19e0db9900d08d2f6c 25-Aug-2010 John McCall <rjmccall@apple.com> Remove the DenseSet dependency from Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
231359e094850dbfe8004082a68c92df1dcd4c2a 25-Aug-2010 John McCall <rjmccall@apple.com> Teach Sema to live without CodeCompleteConsumer.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
0a2c5e256abb4dc031c21fe4dc92c4f3afe9947c 25-Aug-2010 John McCall <rjmccall@apple.com> Teach Sema to live without CodeCompleteConsumer.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
6a42ee9c92db87ccad2b90ed11a5aa4d13481f4b 25-Aug-2010 John McCall <rjmccall@apple.com> Remove AnalysisBasedWarnings.h's dependency on Type.h



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
e0054f61fd84133eb0d19c19ae9afaf117933274 25-Aug-2010 John McCall <rjmccall@apple.com> Remove AnalysisBasedWarnings.h's dependency on Type.h



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
d3aecc01e33e2d0d9646779deb4527a4883679e1 25-Aug-2010 John McCall <rjmccall@apple.com> Move more stuff out of Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
lang/Sema/Lookup.h
lang/Sema/Overload.h
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Sema/TemplateDeduction.h
2a7fb27913999d132cf9e10e03dc5271faa2e9d3 25-Aug-2010 John McCall <rjmccall@apple.com> Move more stuff out of Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
lang/Sema/Lookup.h
lang/Sema/Overload.h
lang/Sema/Sema.h
lang/Sema/Template.h
lang/Sema/TemplateDeduction.h
b3f2ff9a92ee324846e22acc5bfa41ec9da60948 25-Aug-2010 John McCall <rjmccall@apple.com> Sort the forward declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
30ecc0ac0e90fed2670cefc8b67f1b3f53f2701b 25-Aug-2010 John McCall <rjmccall@apple.com> Sort the forward declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
08b401fd43b445dba3bb6f6a5612d4ebdf276561 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reorganize and verbosely document some of ASTReader's fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
892ac04155aad22f8172d06a929e09cf51e8bc68 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reorganize and verbosely document some of ASTReader's fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
d19f48fd14920f76d558e58c204cc0c238aff4bf 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove an unused field in ASTReader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
cd9e339014b5f38e626735893010930605e9c232 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove an unused field in ASTReader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
03e1de283b5dc6b97ae8adec530e81568850587b 25-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Make sure CXXABI is destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ff75dfde6a351c57f41366d309c0bd11aba69bce 25-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make sure CXXABI is destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b569db2332ce8acb8ef77b8e71375c7df7268999 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Give a slight preference to functions returning "void" when we're
performing code completion at the statement level (rather than in an
arbitrary expression).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
eb0d0145910f3024d9bdefe279a1e9b95495f2fd 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Give a slight preference to functions returning "void" when we're
performing code completion at the statement level (rather than in an
arbitrary expression).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
48461915d3f5a3653d5740645b4a6dbeb8ed2ab4 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> In code-completion contexts where both types and other values are
present, prefer values to types, since it's more common to compute
with values than it is to declare new entities or perform type
casts. So, tweak the ranking of types vs. other declarations and
constants accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
d43dd83a973c585c39a9a5e5e904282bc2371986 25-Aug-2010 Douglas Gregor <dgregor@apple.com> In code-completion contexts where both types and other values are
present, prefer values to types, since it's more common to compute
with values than it is to declare new entities or perform type
casts. So, tweak the ranking of types vs. other declarations and
constants accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
e1852335a6dc17b81193f63b1056745f35c5f661 25-Aug-2010 John McCall <rjmccall@apple.com> When trying to resolve the address of an overloaded expression,
only form pointers-to-member if the expression has the appropriate
form. This avoids assertions later on on invalid code, but also
allows us to properly resolve mixed-staticity overloads.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fb97e75e627599aaa7a613778134e290f9de663b 25-Aug-2010 John McCall <rjmccall@apple.com> When trying to resolve the address of an overloaded expression,
only form pointers-to-member if the expression has the appropriate
form. This avoids assertions later on on invalid code, but also
allows us to properly resolve mixed-staticity overloads.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5f147be80b5cb2a73f32b020ebd6135b3b04bef0 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> AST writer support for having specializations of templates from earlier in the chain. This ought to finish C++ chained PCH support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
4153a060f4cd03e9db1349328a158e9d898a2610 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> AST writer support for having specializations of templates from earlier in the chain. This ought to finish C++ chained PCH support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
2a6156f215482d8f4c0ce10de64dd680672cd07f 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> AST reader support for having specializations of templates from earlier in the chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
6e50e00c2fe6a04b2c35592588a4b10a2c269416 25-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> AST reader support for having specializations of templates from earlier in the chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
62a6d22982dfe5e4b392d19cd3fff33faea9c8b8 25-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add basic -H support.
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/PreprocessorOutputOptions.h
f7c16d903f11814e2d6780e2a2e189b7a7afc4ed 25-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add basic -H support.
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/PreprocessorOutputOptions.h
bb44022c369641f5140992eaf3d30eaf9baaf25c 25-Aug-2010 Chris Lattner <sabre@nondot.org> correct the -isystem option to not add the -isysroot path. Only the weird
-iwithsysroot flag should do that. This fixes rdar://8345942


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
23637beead1fce7dac755890c9482bcdce538b87 25-Aug-2010 Chris Lattner <sabre@nondot.org> correct the -isystem option to not add the -isysroot path. Only the weird
-iwithsysroot flag should do that. This fixes rdar://8345942


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
2353bc83ebc42dd79c1ab563d487c237d845bf03 25-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix printf format string checking for '%lc' (which expects a wint_t or compatible argument). Fixes PR 7981.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
9325eaf08fcccbc0d038e703f570c64daacdaa31 25-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix printf format string checking for '%lc' (which expects a wint_t or compatible argument). Fixes PR 7981.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
e731c90a1e65ea98d8e8bd78129559b3c6cfc0ab 25-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement code completion for preprocessor expressions and in macro
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
f29c5233085a5af795c3c01b94d319e5b3235d56 25-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for preprocessor expressions and in macro
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
667a23a6e818bba7d3744897dc4f49a5e6aed9c2 24-Aug-2010 Chris Lattner <sabre@nondot.org> Implement -iwithsysroot, an apple extension which is a close cousin of -isystem.
Instead of implementing -isystem, I accidentally implemented this cousin. Next
up is to implement -isystem right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
9db9ad3f084d3c70cff01a10d4fd90901982b37b 24-Aug-2010 Chris Lattner <sabre@nondot.org> Implement -iwithsysroot, an apple extension which is a close cousin of -isystem.
Instead of implementing -isystem, I accidentally implemented this cousin. Next
up is to implement -isystem right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
42428f550b3d34c61a9549593eaaa063083ee4fd 24-Aug-2010 Tom Care <tcare@apple.com> Improvements to IdempotentOperationChecker and its use of PseudoConstantAnalysis
- Added wasReferenced function to PseudoConstantAnalysis to determine if a variable was ever referenced in a function (outside of a self-assignment)
- BlockDeclRefExpr referenced variables are now explicitly added to the non-constant list
- Remove unnecessary ignore of implicit casts
- Generalized parameter self-assign detection to detect deliberate self-assigns of variables to avoid unused variable warnings
- Updated test cases with deliberate self-assignments
- Fixed bug with C++ references and pseudoconstants
- Added test case for C++ references and pseudoconstants

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PseudoConstantAnalysis.h
ef52bcb606c73950139a775af61495f63fbc3603 24-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Improvements to IdempotentOperationChecker and its use of PseudoConstantAnalysis
- Added wasReferenced function to PseudoConstantAnalysis to determine if a variable was ever referenced in a function (outside of a self-assignment)
- BlockDeclRefExpr referenced variables are now explicitly added to the non-constant list
- Remove unnecessary ignore of implicit casts
- Generalized parameter self-assign detection to detect deliberate self-assigns of variables to avoid unused variable warnings
- Updated test cases with deliberate self-assignments
- Fixed bug with C++ references and pseudoconstants
- Added test case for C++ references and pseudoconstants

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PseudoConstantAnalysis.h
ff25319858bc246fc0732fb8ee2939739a245d05 24-Aug-2010 John McCall <rjmccall@apple.com> Move some of SemaOverload's API to various places in Overload.h, and kill
some of it off completely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
lang/Sema/Overload.h
lang/Sema/Sema.h
120d63cd4465230c2cd56508c7cd8e0ad00848e7 24-Aug-2010 John McCall <rjmccall@apple.com> Move some of SemaOverload's API to various places in Overload.h, and kill
some of it off completely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Initialization.h
lang/Sema/Overload.h
lang/Sema/Sema.h
f3739ad6499abeda23f00c56dc350e58432b9ce5 24-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement preprocessor code completion where a macro name is expected,
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
1fbb447e9d43c2c676e94081fbfee7eb6cbe933b 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement preprocessor code completion where a macro name is expected,
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
4f9145a1ecb1f0f7caa61d24b0ba5e5ca9977d45 24-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce basic code-completion support for preprocessor directives,
e.g., after a "#" we'll suggest #if, #ifdef, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Sema.h
f44e854ed1e3aa86d2ed6d615ccd109d50ddcff9 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce basic code-completion support for preprocessor directives,
e.g., after a "#" we'll suggest #if, #ifdef, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/CodeCompletionHandler.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Sema.h
4b923c3085b58bd1cdf8362296305682fc4ef9db 24-Aug-2010 John McCall <rjmccall@apple.com> Sema doesn't need these STL headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
aab0132698c7550d0095986fb1fb4887bf18c3e8 24-Aug-2010 John McCall <rjmccall@apple.com> Sema doesn't need these STL headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f808bbd31f1ae2d81d7f0a2a69a6e60d1833f024 24-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
713da40fb093cb6ab50ddc57e1697fddf9802104 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
7942acb692dd5b351d79efdb8475b433383b6248 24-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Parse all kinds of declarations as part of a linkage-specification,
from Francois Pichet! Fixes PR7754.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
09a63c97b95eb4dc6fd6b2323929e8cf12af03ff 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Parse all kinds of declarations as part of a linkage-specification,
from Francois Pichet! Fixes PR7754.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
11b75a0d6059fb5354175a348bea9e0d639b31b5 24-Aug-2010 John McCall <rjmccall@apple.com> It turns out that this template is only instantiated at one type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
fbce0e1d582f10d890111d8d27f6e88055be6422 24-Aug-2010 John McCall <rjmccall@apple.com> It turns out that this template is only instantiated at one type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
fa4a3ef515f4ec17548169389050e36a2ad65c30 24-Aug-2010 John McCall <rjmccall@apple.com> More header elimination. The goal of all this is to allow Parser to
#include Sema.h while keeping all the AST declarations opaque. That may
not be reasonably attainable, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
5f1e0942a32657b625702aa52f82430d0120f424 24-Aug-2010 John McCall <rjmccall@apple.com> More header elimination. The goal of all this is to allow Parser to
#include Sema.h while keeping all the AST declarations opaque. That may
not be reasonably attainable, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
064a5209d8bfb036e836a718b69fcd79b9f42408 24-Aug-2010 John McCall <rjmccall@apple.com> Remove a header dependency from Sema.h at the cost of some type safety.
If someone wants to fix this some other way....



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
7a1fad38256eb4c5129359be85ba1ea1678eb5c9 24-Aug-2010 John McCall <rjmccall@apple.com> Remove a header dependency from Sema.h at the cost of some type safety.
If someone wants to fix this some other way....



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
89ee65fb6f6218b45c46537690ae4691b489cf05 24-Aug-2010 John McCall <rjmccall@apple.com> Struggle mightily against header inclusion in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/ExternalASTSource.h
lang/Sema/ExternalSemaSource.h
lang/Sema/IdentifierResolver.h
lang/Sema/ObjCMethodList.h
lang/Sema/Sema.h
lang/Sema/Template.h
7cd088e519d7e6caa4c4c12db52e0e4ae35d25c2 24-Aug-2010 John McCall <rjmccall@apple.com> Struggle mightily against header inclusion in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/ExternalASTSource.h
lang/Sema/ExternalSemaSource.h
lang/Sema/IdentifierResolver.h
lang/Sema/ObjCMethodList.h
lang/Sema/Sema.h
lang/Sema/Template.h
a2b55e58c780488ea9fb752c71fba2973aa7c9f5 24-Aug-2010 John McCall <rjmccall@apple.com> OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Initialization.h
lang/Sema/Ownership.h
lang/Sema/Sema.h
60d7b3a319d84d688752be3870615ac0f111fb16 24-Aug-2010 John McCall <rjmccall@apple.com> OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Initialization.h
lang/Sema/Ownership.h
lang/Sema/Sema.h
1f52c3afbf8f06b781e03640b11a41e6d712b72e 24-Aug-2010 John McCall <rjmccall@apple.com> Fold ASTOwningResult back into ActionResult.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Ownership.h
182f7093dd9dabbcf6df44b4ae004ead38804b48 24-Aug-2010 John McCall <rjmccall@apple.com> Fold ASTOwningResult back into ActionResult.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Ownership.h
e5e113a803072ec06d440c882c4f2f67f45c93f1 24-Aug-2010 John McCall <rjmccall@apple.com> Abstract out passing around types and kill off ActionBase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/Designator.h
lang/Sema/Ownership.h
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
b3d8748e797c6c2f1dc01186c8eeb3b1b5fe970c 24-Aug-2010 John McCall <rjmccall@apple.com> Abstract out passing around types and kill off ActionBase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/Designator.h
lang/Sema/Ownership.h
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
a25d1573d00e14c47a5c72867dae8d9ebe34c631 24-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Provide code completion results for the context-sensitive Objective-C
keywords "in", "out", "inout", "byref", "bycopy", and "oneway".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Sema.h
d32b0225e29fcafb2b2b2a4b1c51dcb1518af9c6 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Provide code completion results for the context-sensitive Objective-C
keywords "in", "out", "inout", "byref", "bycopy", and "oneway".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Sema.h
631ce9a590f4feccf052e31e621f1bfdeb5380fc 24-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Write visible update blocks. No regressions in normal PCH functionality, but no tests for the chain yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
1d1e42b17da6a53391d50b08068ecde04311e368 24-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Write visible update blocks. No regressions in normal PCH functionality, but no tests for the chain yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
725cfbdfdd03ec70f1369d91e48fc4c11c22105d 24-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Read the UPDATE_VISIBLE record, and add its visible decls to the lookup tables. Also, free the lookup tables when destructing the ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
e1dde811b38e779894150cb1093d57f8411a84f7 24-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Read the UPDATE_VISIBLE record, and add its visible decls to the lookup tables. Also, free the lookup tables when destructing the ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
a3f8d44bbb39bc7ecc43a5d99cac74e0923d2457 24-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Baby step towards supporting namespaces in chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
8b12273c86ede439edf52d35b170fd32b2ed49d4 24-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Baby step towards supporting namespaces in chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
56bcf3640c0e21f9b7f30b6faf3a9899ec929d14 24-Aug-2010 Peter Collingbourne <peter@pcc.me.uk> Silence warning about C++-style comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111875 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
076c22a99ed82e11b59e8fbf57d8467ceb3fec77 24-Aug-2010 Peter Collingbourne <peter@pcc.me.uk> Silence warning about C++-style comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111875 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a7befb4924e868ae850ff7d664fca7037dca751c 24-Aug-2010 Peter Collingbourne <peter@pcc.me.uk> Move ExecuteCompilerInvocation to a new library FrontendTool

r110903 introduced a dependency from Frontend to every library that
declared an Action by introducing Action references that previously
resided in the driver in the file ExecuteCompilerInvocation.cpp.
This patch moves ExecuteCompilerInvocation to a new library named
FrontendTool which is intended to bear these dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
lang/FrontendTool/Utils.h
1b7255de78c99ef2b8a06bb5261a3c776ac1db36 24-Aug-2010 Peter Collingbourne <peter@pcc.me.uk> Move ExecuteCompilerInvocation to a new library FrontendTool

r110903 introduced a dependency from Frontend to every library that
declared an Action by introducing Action references that previously
resided in the driver in the file ExecuteCompilerInvocation.cpp.
This patch moves ExecuteCompilerInvocation to a new library named
FrontendTool which is intended to bear these dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
lang/FrontendTool/Utils.h
1e740ba7b0f39c8ce1ec8e7b26afa1d676116ef8 24-Aug-2010 John McCall <rjmccall@apple.com> Don't call this field 'Expr', it changes lookup in illegal ways that
GCC diagnoses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
b556db435fb1ad2a15580aada1cba0ae6da1c4cb 24-Aug-2010 John McCall <rjmccall@apple.com> Don't call this field 'Expr', it changes lookup in illegal ways that
GCC diagnoses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
a7fe81a25309c4a9d62a288eb0a46a279e83765b 24-Aug-2010 John McCall <rjmccall@apple.com> Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Ownership.h
lang/Sema/Sema.h
9ae2f076ca5ab1feb3ba95629099ec2319833701 24-Aug-2010 John McCall <rjmccall@apple.com> Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/Ownership.h
lang/Sema/Sema.h
0722c716f747c52573dd1914d30acf539dd3f50c 24-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
58ddb60f409125eda5436c4a1f070f7fa4744295 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
6f5e7298dcb517eaac5091c38410b2146e98f94a 24-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Handling remaining rule for synthesize bitfields in
class extensions (nonfragile-abi2).For every class @interface and class
extension @interface, if the last ivar is a bitfield of any type,
then add an implicit `char :0` ivar to the end of that interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/Sema.h
d097be8f81fbf4ed96ac10bae18562dd8202666b 24-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Handling remaining rule for synthesize bitfields in
class extensions (nonfragile-abi2).For every class @interface and class
extension @interface, if the last ivar is a bitfield of any type,
then add an implicit `char :0` ivar to the end of that interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/Sema.h
6d500913f14a95a3e077c8cec97fff2bd0a3e1db 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
- This introduces some gross code duplication, but the right fix for it is to
just move the Driver to start depending on the targets in libBasic, so I am
not planning on fixing it immediately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
00577ada44c889fbe311d61c51a8da89e65c7c9a 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
- This introduces some gross code duplication, but the right fix for it is to
just move the Driver to start depending on the targets in libBasic, so I am
not planning on fixing it immediately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
c4f00a350a77c0898bab84bc16a10610e76099d9 23-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a code-completion hook for the Objective-C collection
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/Sema.h
fb6294123b9de1605adae69d85cb4fddf81a9bc5 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a code-completion hook for the Objective-C collection
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/Sema.h
2c497ccd842431b6d143be0fefb45821ad1940a7 23-Aug-2010 Tom Care <tcare@apple.com> Several small changes to PseudoConstantAnalysis and the way IdempotentOperationChecker uses it.
- Psuedo -> Pseudo (doh...)
- C++ reference support
- Added pseudoconstant test case for __block vars
- Separated out static local checking from pseudoconstant analysis and generalized to non-local checking
- Added missing test cases for storage false positives

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PseudoConstantAnalysis.h
lang/Analysis/Analyses/PsuedoConstantAnalysis.h
lang/Analysis/AnalysisContext.h
db34ab70961ca4b24b600eb47053d7af304659f5 23-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Several small changes to PseudoConstantAnalysis and the way IdempotentOperationChecker uses it.
- Psuedo -> Pseudo (doh...)
- C++ reference support
- Added pseudoconstant test case for __block vars
- Separated out static local checking from pseudoconstant analysis and generalized to non-local checking
- Added missing test cases for storage false positives

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PseudoConstantAnalysis.h
lang/Analysis/Analyses/PsuedoConstantAnalysis.h
lang/Analysis/AnalysisContext.h
693a734a0661bb432d95442fd9b459e6e37293e2 23-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
000835d0b04345c0014c603fe6339b3bc154050e 23-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
9283ece07ecfa7c92c89fff2750ec0023344437f 23-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new code-completion point when we're parsing a
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
2ccccb3ff40c64927817a7e1ddf1da8c188ed224 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce a new code-completion point when we're parsing a
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
39aabbe41c2605571ddaff333e2a84e2933aa59b 23-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add XML for CXXConstructExpr, from Benoit Belley!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/StmtXML.def
11add9b2e915e5da4a9da25a89e3fb0a4b7f0173 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Add XML for CXXConstructExpr, from Benoit Belley!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/StmtXML.def
1375393206b22b6079c2b0bbf86327dd65c04e6d 23-Aug-2010 John McCall <rjmccall@apple.com> Push DeclGroupRefs and TemplateNames in an opaque but type-safe way
through the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Ownership.h
lang/Sema/ParsedTemplate.h
2b5289b6fd7e3d9899868410a498c081c9595662 23-Aug-2010 John McCall <rjmccall@apple.com> Push DeclGroupRefs and TemplateNames in an opaque but type-safe way
through the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Ownership.h
lang/Sema/ParsedTemplate.h
6c41042b1fddc6bf845cb2f7fc64940e75b55889 23-Aug-2010 John McCall <rjmccall@apple.com> Kill off Parser::TemplateParameterList to avoid misparses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1f58816e6589ef15d1509c6c99bb8fabf2a4cda9 23-Aug-2010 John McCall <rjmccall@apple.com> Kill off Parser::TemplateParameterList to avoid misparses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f1714433f14eb45a413a9db7e29ffab23f75dbaf 23-Aug-2010 John McCall <rjmccall@apple.com> Sundry incremental steps towards killing off Action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/Ownership.h
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
ca0408fb49c1370430672acf2d770b7151cf71de 23-Aug-2010 John McCall <rjmccall@apple.com> Sundry incremental steps towards killing off Action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/Ownership.h
lang/Sema/ParsedTemplate.h
lang/Sema/Sema.h
6ae2325ec3b27aae178267de58fe35acf2027b91 23-Aug-2010 John McCall <rjmccall@apple.com> Abstract out everything having to do with member pointers into the ABI
class; they should just be completely opaque throughout IR gen now,
although I haven't really audited that.

Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0bab0cdab751248ca389a5592bcb70eac5d39260 23-Aug-2010 John McCall <rjmccall@apple.com> Abstract out everything having to do with member pointers into the ABI
class; they should just be completely opaque throughout IR gen now,
although I haven't really audited that.

Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d401c08eaebd14b9fa6440513c764a7342d0adea 22-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate a stale assertion. Fixes Clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
db68e28c05a67735211e688009890cf834c22e75 22-Aug-2010 Douglas Gregor <dgregor@apple.com> Eliminate a stale assertion. Fixes Clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
68086b9ad26c471322449ea1c030c2ac8397fd07 22-Aug-2010 John McCall <rjmccall@apple.com> The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator. Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
ee79a4c30e5d1c5285551c9a25b8ec6d45d46aa7 22-Aug-2010 John McCall <rjmccall@apple.com> The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator. Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
367213bcd822d77d3c24e3607b4ce3b1127dd5af 21-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Visual Studio tools used on win32 hosts when targeting win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
ff58e3610f4e12094def69eb2d6dcb4330378d8f 21-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Visual Studio tools used on win32 hosts when targeting win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
f4bae14c1c2cb086d42aecf84c6779787c6c7d89 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/DeclSpec.h
lang/Sema/Ownership.h
lang/Sema/Scope.h
lang/Sema/Sema.h
d226f65006733ed7f709c3174f22ce33391cb58f 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
lang/Sema/Action.h
lang/Sema/DeclSpec.h
lang/Sema/Ownership.h
lang/Sema/Scope.h
lang/Sema/Sema.h
a812f2ff9e4b765646d8432357dc81388e6574d7 21-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix an issue with writing to PCH another included PCH, introduced by the "using an AST on-disk hash table for name lookup" commit.

When including a PCH and later re-emitting to another PCH, the name lookup tables of DeclContexts
may be incomplete, since we now lazily deserialize the visible decls of a particular name.
Fix the issue by iterating over the un-deserialized visible decls and completing the lookup tables
of DeclContexts before writing them out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTReader.h
a60786b46eaa4766bb57fb3ca4e0191b3f73e42a 21-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix an issue with writing to PCH another included PCH, introduced by the "using an AST on-disk hash table for name lookup" commit.

When including a PCH and later re-emitting to another PCH, the name lookup tables of DeclContexts
may be incomplete, since we now lazily deserialize the visible decls of a particular name.
Fix the issue by iterating over the un-deserialized visible decls and completing the lookup tables
of DeclContexts before writing them out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTReader.h
d5ad6700859b4d8eb29e9f1b36f574451174c84c 21-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add an iterator to OnDiskChainedHashTable to allow iterating over all the key/data pairs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
f08b1bb341fde5c755ec3dbe7e1b3114fb7438db 21-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add an iterator to OnDiskChainedHashTable to allow iterating over all the key/data pairs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
d74787f07ed2c35f61f437960b9182f256f6b45a 20-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Sema/Sema.h
2c18bb7c9fca66c30b6eabbdcbc6399d24a54fa9 20-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Sema/Sema.h
161f47b721242aa98301da22da5c7274b5644112 20-Aug-2010 Dan Gohman <gohman@apple.com> Add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fa78c91c54dd99ec61a9e27e6b74a549f5c9fa9c 20-Aug-2010 Dan Gohman <gohman@apple.com> Add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e20fbc00b00b6a10c2d54afbd4a5ecd92a981b00 20-Aug-2010 John McCall <rjmccall@apple.com> Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
lang/Parse/ParseAST.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Parse/Template.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/Designator.h
lang/Sema/IdentifierResolver.h
lang/Sema/Initialization.h
lang/Sema/Ownership.h
lang/Sema/ParseAST.h
lang/Sema/ParsedTemplate.h
lang/Sema/Scope.h
lang/Sema/Sema.h
19510856727e0e14a3696b2a72c35163bff2a71f 20-Aug-2010 John McCall <rjmccall@apple.com> Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
lang/Parse/ParseAST.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Parse/Template.h
lang/Sema/Action.h
lang/Sema/AttributeList.h
lang/Sema/DeclSpec.h
lang/Sema/Designator.h
lang/Sema/IdentifierResolver.h
lang/Sema/Initialization.h
lang/Sema/Ownership.h
lang/Sema/ParseAST.h
lang/Sema/ParsedTemplate.h
lang/Sema/Scope.h
lang/Sema/Sema.h
5da76f97ef7e8602f2dbca62056bbc28dea61cce 20-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Use the AST on-disk hash table for name lookup inside a DeclContext.

*Huge* improvement over the amount of deserializing that we do for C++ lookup.
e.g, if he have the Carbon header precompiled and include it on a file containing this:

int x;

these are the before/after stats:

BEFORE:

*** AST File Statistics:
578 stat cache hits
4 stat cache misses
548/30654 source location entries read (1.787695%)
15907/16501 types read (96.400223%)
53525/59955 declarations read (89.275291%)
33993/43525 identifiers read (78.099945%)
41516/51891 statements read (80.006165%)
77/5317 macros read (1.448185%)
0/6335 lexical declcontexts read (0.000000%)
1/5424 visible declcontexts read (0.018437%)

AFTER using the on-disk table:

*** AST File Statistics:
578 stat cache hits
4 stat cache misses
548/30654 source location entries read (1.787695%)
10/16501 types read (0.060602%)
9/59955 declarations read (0.015011%)
161/43525 identifiers read (0.369902%)
20/51891 statements read (0.038542%)
6/5317 macros read (0.112846%)
0/6335 lexical declcontexts read (0.000000%)
2/5424 visible declcontexts read (0.036873%)

There's only one issue affecting mostly the precompiled preambles which I will address soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
074dcc8ef8c5df7a155c85648e8eae786bee6cab 20-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the AST on-disk hash table for name lookup inside a DeclContext.

*Huge* improvement over the amount of deserializing that we do for C++ lookup.
e.g, if he have the Carbon header precompiled and include it on a file containing this:

int x;

these are the before/after stats:

BEFORE:

*** AST File Statistics:
578 stat cache hits
4 stat cache misses
548/30654 source location entries read (1.787695%)
15907/16501 types read (96.400223%)
53525/59955 declarations read (89.275291%)
33993/43525 identifiers read (78.099945%)
41516/51891 statements read (80.006165%)
77/5317 macros read (1.448185%)
0/6335 lexical declcontexts read (0.000000%)
1/5424 visible declcontexts read (0.018437%)

AFTER using the on-disk table:

*** AST File Statistics:
578 stat cache hits
4 stat cache misses
548/30654 source location entries read (1.787695%)
10/16501 types read (0.060602%)
9/59955 declarations read (0.015011%)
161/43525 identifiers read (0.369902%)
20/51891 statements read (0.038542%)
6/5317 macros read (0.112846%)
0/6335 lexical declcontexts read (0.000000%)
2/5424 visible declcontexts read (0.036873%)

There's only one issue affecting mostly the precompiled preambles which I will address soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/AST/ExternalASTSource.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
2e254756d2406f4860abd44ef7567633f5f4ab36 20-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the mechanism for building an AST on-disk hash table for name lookup inside a DeclContext but don't use it yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
5d26768e2661faa7ce0b55ffff4be8b3969fbbf5 20-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the mechanism for building an AST on-disk hash table for name lookup inside a DeclContext but don't use it yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
e35faadb68f8da45b7d39b90caf03d16d9afa75b 20-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Refactoring; move the functionality of ASTWriter::GetOrCreateTypeID to the more generic
MakeTypeID template function which accepts a type and a function object that returns a TypeIdx.

MakeTypeID is in PCHCommon.h so that it can be used by ASTReader too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
eb3f04e60fa17dba27344ed89fd1b9134bb6839c 20-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring; move the functionality of ASTWriter::GetOrCreateTypeID to the more generic
MakeTypeID template function which accepts a type and a function object that returns a TypeIdx.

MakeTypeID is in PCHCommon.h so that it can be used by ASTReader too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
b1c3d00643b2580a365f745c393e7b3d1a04728f 20-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce ASTWriter::GetOrCreateTypeID and move most of the functionality of AddTypeRef there.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
7fb35182f43392cea4517c203bbabb22364a19fc 20-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTWriter::GetOrCreateTypeID and move most of the functionality of AddTypeRef there.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
6b0e7a99188266de6327bbb5bcc02e4484f15405 20-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> A bit of refactoring; Introduce ASTWriter::GetOrCreateTypeIdx and move the emission of types there.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
26fca90786af17f97e1a5ecc310d4bf39b831595 20-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> A bit of refactoring; Introduce ASTWriter::GetOrCreateTypeIdx and move the emission of types there.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
ab366ab4ad4f445a714335907299f93ec8713a61 20-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Rename TypeIDs -> TypeIdxs. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
01b81c4d074bba9c18372d521405dfe32fc4f552 20-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename TypeIDs -> TypeIdxs. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
cbc1e5e08a341b874f58341030e4974898586da9 20-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> serialization::TypeID is used with or without qualifiers, both as index and as index + qualifiers.
Disambiguate and provide some type safety by using a new class TypeIdx for the "TypeID as index" semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
c8e5d51f51e46c6f7717761537c6609ef9daf57c 20-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> serialization::TypeID is used with or without qualifiers, both as index and as index + qualifiers.
Disambiguate and provide some type safety by using a new class TypeIdx for the "TypeID as index" semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
fe8f766bea43e157cad054a3109e3be4ee609ada 20-Aug-2010 Ted Kremenek <kremenek@apple.com> Update help text for -cc1 -unoptimized-cfg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
c9c6b904f3fb4f515f7f041b7c49f5e3b7c53bd3 20-Aug-2010 Ted Kremenek <kremenek@apple.com> Update help text for -cc1 -unoptimized-cfg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
936b38da144dacc0ec064733fa7087005934ed90 20-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When performing code-completion in the presence of a preamble, make
sure to (1) actually use the remapped files we were given rather
than old data, and (2) keep the remapped files alive until the
code-completion results are destroyed. Big thanks to Daniel for the
test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
2283d79155a3e82442fce124ce5fd704ca138801 20-Aug-2010 Douglas Gregor <dgregor@apple.com> When performing code-completion in the presence of a preamble, make
sure to (1) actually use the remapped files we were given rather
than old data, and (2) keep the remapped files alive until the
code-completion results are destroyed. Big thanks to Daniel for the
test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
e120d10fc804b77c6830f4f4c32e7095603cc071 20-Aug-2010 John McCall <rjmccall@apple.com> Regularize the API for accessing explicit template arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
096832c5ed5b9106fa177ebc148489760c3bc496 20-Aug-2010 John McCall <rjmccall@apple.com> Regularize the API for accessing explicit template arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
c49c4fa3f550df2750d8ecd7250f25bd1bcdb455 19-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Intialize all of the code-generation options

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenOptions.h
41a621d00e974829b75ff95cdff556755116dea1 19-Aug-2010 Douglas Gregor <dgregor@apple.com> Intialize all of the code-generation options

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenOptions.h
bf4c70994c4cdf4a5f753f26a60a583bf148f2f4 19-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add machine-parseable Fix-It output as part of diagnostics, under the
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111557 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
4786c15f4977c7cee98fde3ebdee213dba23848b 19-Aug-2010 Douglas Gregor <dgregor@apple.com> Add machine-parseable Fix-It output as part of diagnostics, under the
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111557 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
8cf107ec3f8ebb84287d07beb91881924f978e6a 19-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Remove default argument from operator delete; per report on cfe-dev, fixes
compilation with MSVC. Note that on other platforms, the operator delete in
question is never used because we compile with -fno-exceptions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
a87cdc03f4014545a8440110c1f4f68701100576 19-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Remove default argument from operator delete; per report on cfe-dev, fixes
compilation with MSVC. Note that on other platforms, the operator delete in
question is never used because we compile with -fno-exceptions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
4732d4f526b6fde3646d615a52c9ee40e627d117 19-Aug-2010 Sean Hunt <rideau3@gmail.com> Add a missing initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
1bf8d6f3a9dc636c3d1217d6fff11acf358e44be 19-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Add a missing initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
c63a11dd0d93a5e86b8bc7fdac107e2d706c76c6 19-Aug-2010 Charles Davis <cdavis@mines.edu> Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.

And yes, this time, I started from a clean build directory, and
all the tests passed. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
20cf717034ba1f20fc47c025ecb72ed9b631ad13 19-Aug-2010 Charles Davis <cdavis@mines.edu> Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.

And yes, this time, I started from a clean build directory, and
all the tests passed. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
cae4686e6b3c3e989fcbc91bc929f4ca932dc9c2 19-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Plug a leak when precompiling the preamble in ASTUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
671947b18dba342f9aba022ee992babef325a833 19-Aug-2010 Douglas Gregor <dgregor@apple.com> Plug a leak when precompiling the preamble in ASTUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
bb903c15ec2ff9eb6c289858d8839aa29489f553 19-Aug-2010 Ted Kremenek <kremenek@apple.com> Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
58f281f7d54976f23ed4fa23a10ff1ab9c7037fe 19-Aug-2010 Ted Kremenek <kremenek@apple.com> Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/7562925>)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
853ffa03cd59e18acfa6552537e82b4e105a41b3 19-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Make sure to deallocate the identifier lookup tables and selector tables
when destroying an ASTReader. Plugs a leak that shows up in libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
501c1036560bb407f9be6834931253f0929cca86 19-Aug-2010 Douglas Gregor <dgregor@apple.com> Make sure to deallocate the identifier lookup tables and selector tables
when destroying an ASTReader. Plugs a leak that shows up in libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTReader.h
1515f5d624d9a8d3da8c284fc6548423bd5915c5 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename pch namespace to serialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
8538e8d43a3a9bd439c987c0de37bcbf035dd391 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename pch namespace to serialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
579e2b9800d8e1f03c5145691537a3e4f8b83606 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHBitCodes.h -> ASTBitCodes.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHBitCodes.h
05a07605322dfef2b017781042043a261c5a89cd 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHBitCodes.h -> ASTBitCodes.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Serialization/ASTBitCodes.h
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHBitCodes.h
a3c1fef757614e58265bb2e2e526f8dfd0dce09c 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename stuff in PCHBitCodes.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/PCHBitCodes.h
f29f0a28c4d9599b389bbb6d186e14af753dc5a3 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename stuff in PCHBitCodes.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/PCHBitCodes.h
47e65e63326505b86ac2e0dfb20c13b6c71db714 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename the ASTReader header files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
6ab7cd853e9c15cf986a8a7c3db1f8d20e275409 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename the ASTReader header files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTDeserializationListener.h
lang/Serialization/ASTReader.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
461310d47dfb77ed4b176cfa19358bddeb732a35 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> More PCH -> AST renaming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/DeclBase.h
lang/AST/Type.h
lang/Basic/IdentifierTable.h
lang/Basic/Linkage.h
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendOptions.h
lang/Lex/MacroInfo.h
lang/Sema/IdentifierResolver.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
3c7f4134603d04b44f997b43c0a9def270f25386 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> More PCH -> AST renaming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/DeclBase.h
lang/AST/Type.h
lang/Basic/IdentifierTable.h
lang/Basic/Linkage.h
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendOptions.h
lang/Lex/MacroInfo.h
lang/Sema/IdentifierResolver.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
6bdcfea8ff12cd4079b3653e5cd7d638c7d74ed1 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename various classes from PCH to AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
571db7f0cb31789737be92fce1c1b738e6dbe795 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename various classes from PCH to AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
b3be32d54baecf077e7813b25c9f37e103a44d3b 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHStmtReader -> ASTStmtReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtCXX.h
60adf4acf40b72227740bf966fb87eebddff3f37 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHStmtReader -> ASTStmtReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtCXX.h
d114374d2e6a4cc7a93091f0475f7a133dc1f499 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHDeclReader -> ASTDeclReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Redeclarable.h
lang/Serialization/PCHReader.h
d527cc06d78fe5afa5f20105b51697637eb02c56 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHDeclReader -> ASTDeclReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Redeclarable.h
lang/Serialization/PCHReader.h
7b39a2cadf9d62647f3aa572c52b77ea4114a599 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHReader to ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Frontend/CompilerInstance.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/HeaderSearch.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
c43b54cbc10654ed59de797898042e1a05265246 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHReader to ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Frontend/CompilerInstance.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/HeaderSearch.h
lang/Serialization/ASTWriter.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
2b04aa75877c5fd8a9f679930c923b44ca8eef08 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHWriter.h to ASTWriter.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
7faa2ec03a7ef120ac165bb45b6c70a8b20c9f1c 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHWriter.h to ASTWriter.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Serialization/ASTWriter.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
c582b76f225a52634fedfe774896439876263c15 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Do the PCH->AST rename for ASTWriter's implementation parts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Redeclarable.h
lang/Serialization/PCHWriter.h
3397c5570369f19b2d6c52e898f708d75ceede1f 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Do the PCH->AST rename for ASTWriter's implementation parts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Redeclarable.h
lang/Serialization/PCHWriter.h
c9b42df920d69f0a2e4779bfbea6234cf355539d 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHWriter to ASTWriter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Serialization/PCHWriter.h
a4232eb646d89e7d52424bb42eb87d9061f39e63 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHWriter to ASTWriter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Serialization/PCHWriter.h
c8a316e75b46cbfaa7303b3b0e749e666ea4b3a9 19-Aug-2010 Sean Hunt <rideau3@gmail.com> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/AST/CMakeLists.txt
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/Makefile
lang/Basic/Attr.td
lang/CMakeLists.txt
lang/Makefile
lang/Sema/Sema.h
lang/Serialization/CMakeLists.txt
lang/Serialization/Makefile
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
cf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 19-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/AST/CMakeLists.txt
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/Makefile
lang/Basic/Attr.td
lang/CMakeLists.txt
lang/Makefile
lang/Sema/Sema.h
lang/Serialization/CMakeLists.txt
lang/Serialization/Makefile
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
c7b0f18cf8630218a6f91678710a09fb06f2f116 19-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang: Put clang_reparseTranslationUnit inside a crash recovery context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
ea94bbc4769697143e717df9b0310f874102b6c1 19-Aug-2010 Daniel Dunbar <daniel@zuster.org> libclang: Put clang_reparseTranslationUnit inside a crash recovery context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
f1614cb6e4f1056850a71f1a0e3372aaee2cedb4 19-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
bdbb004f38978da0c4a75af3294d1c7b5ff84af1 19-Aug-2010 Douglas Gregor <dgregor@apple.com> Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
6e81bc87f575f058305248882b6396db38814816 18-Aug-2010 Tom Care <tcare@apple.com> Added psuedo-constant analysis and integrated it into the false positive reduction stage in IdempotentOperationChecker.
- Renamed IdempotentOperationChecker::isConstant to isConstantOrPseudoConstant to better reflect the function
- Changed IdempotentOperationChecker::PreVisitBinaryOperator to only run 'CanVary' once on undefined assumptions
- Created new PsuedoConstantAnalysis class and added it to AnalysisContext
- Changed IdempotentOperationChecker to exploit the new analysis
- Updated tests with psuedo-constants
- Added check to IdempotentOperationChecker to see if a Decl is const qualified

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PsuedoConstantAnalysis.h
lang/Analysis/AnalysisContext.h
245adabd97c8c770c13935a9075f2243cc6f1d57 18-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Added psuedo-constant analysis and integrated it into the false positive reduction stage in IdempotentOperationChecker.
- Renamed IdempotentOperationChecker::isConstant to isConstantOrPseudoConstant to better reflect the function
- Changed IdempotentOperationChecker::PreVisitBinaryOperator to only run 'CanVary' once on undefined assumptions
- Created new PsuedoConstantAnalysis class and added it to AnalysisContext
- Changed IdempotentOperationChecker to exploit the new analysis
- Updated tests with psuedo-constants
- Added check to IdempotentOperationChecker to see if a Decl is const qualified

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PsuedoConstantAnalysis.h
lang/Analysis/AnalysisContext.h
36d67d8e178a6fd81322ab565c5900ee5df1109d 18-Aug-2010 Chris Lattner <sabre@nondot.org> no need to pass bumppointer allocator into macroinfo::destroy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
2c1ab9079cb117dc0470ab423fe0bc5177546339 18-Aug-2010 Chris Lattner <sabre@nondot.org> no need to pass bumppointer allocator into macroinfo::destroy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
cb6c24a9e86453b63863ce1eb8645e1690c9b542 18-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
783c56f47745f719590b17afd7ed937bf2407b53 18-Aug-2010 Douglas Gregor <dgregor@apple.com> Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
68c0ef034930d84a63cab17c8bd84a4eb75e8d8d 18-Aug-2010 John McCall <rjmccall@apple.com> Rip out the existing retroactive abstract-class usage checker,
which in a fit of zeal wanted to walk the entire translation unit,
and replace it with a new checker that walks the types of declarations
nested within the class. Also, look into templates when doing this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
94c3b561a4f24c5c44a1e2ee6f28f530e6a041ba 18-Aug-2010 John McCall <rjmccall@apple.com> Rip out the existing retroactive abstract-class usage checker,
which in a fit of zeal wanted to walk the entire translation unit,
and replace it with a new checker that walks the types of declarations
nested within the class. Also, look into templates when doing this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
e85c9b7e9304b53acf082aa0ed379cf5de2007da 18-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Remove -Wunused-member-function from the 'Extra' diagnostic group too; llvm uses it.

This effectively disables -Wunused-member-function for building llvm/clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
272264c7a7b29647045413a25fca15d38fca40b5 18-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove -Wunused-member-function from the 'Extra' diagnostic group too; llvm uses it.

This effectively disables -Wunused-member-function for building llvm/clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
64a5f6f7034808988c3596cf340a879c0c501869 18-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Emit an error if an array is too large. We're slightly more strict
than GCC 4.2 here when building 32-bit (where GCC will allow
allocation of an array for which we can't get a valid past-the-end
pointer), and emulate its odd behavior in 64-bit where it only allows
63 bits worth of storage in the array. The former is a correctness
issue; the latter is harmless in practice (you wouldn't be able to use
such an array anyway) and helps us pass a GCC DejaGNU test.

Fixes <rdar://problem/8212293>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
2767ce2e21d8bc17869b8436220bce719b3369e4 18-Aug-2010 Douglas Gregor <dgregor@apple.com> Emit an error if an array is too large. We're slightly more strict
than GCC 4.2 here when building 32-bit (where GCC will allow
allocation of an array for which we can't get a valid past-the-end
pointer), and emulate its odd behavior in 64-bit where it only allows
63 bits worth of storage in the array. The former is a correctness
issue; the latter is harmless in practice (you wouldn't be able to use
such an array anyway) and helps us pass a GCC DejaGNU test.

Fixes <rdar://problem/8212293>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
20875e80f726001056d4e86dce695d90c37ff70e 18-Aug-2010 Ted Kremenek <kremenek@apple.com> TypedRegion::isBoundable() should return true by default. Since there is no TypedViewRegion anyore, it is not possible that the subclass (which doesn't override isBoundable) could return a null value type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
cced08e13c9fba9381e39a27c70abe6978adee37 18-Aug-2010 Ted Kremenek <kremenek@apple.com> TypedRegion::isBoundable() should return true by default. Since there is no TypedViewRegion anyore, it is not possible that the subclass (which doesn't override isBoundable) could return a null value type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
9f59ab7369ac420686d1539aad77cace3738808f 18-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose if type of iboutletcollection attribute is a builtin type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
1b72fa7222abb1a53e063f0805c759993d445471 18-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose if type of iboutletcollection attribute is a builtin type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
184fbd446d81db7e83904b2f98757abcb6c95a6b 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> StringRef'ication of lots stuff, patch by Peter Davies!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
4087f27e5416c799bcb6be072f905be752acb61c 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> StringRef'ication of lots stuff, patch by Peter Davies!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
20c6e6ee2a457c03cfd09c0253ff3a23b425a8c7 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing
those crash paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
5505413ee8e4e2924f52ba81181071f3a492e7d9 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing
those crash paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
345fb7fbbd9e774f88879746be7b375ec774a0c2 18-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Rename -Wunused-method -> -Wunused-member-function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
42cbd782cf17223076e5b6c0607414d9d68aae19 18-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename -Wunused-method -> -Wunused-member-function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
2937fd9d48279ce1c9d44a6b8243aeafe1cb0ce1 17-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce -Wunused-method option for warning on unused class methods in anonymous namespace.

This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed
and we are ready to turn it on. Suggestion by Daniel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
3d27b107c515ab1a8fd47b33c41adcf5a65f465b 17-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce -Wunused-method option for warning on unused class methods in anonymous namespace.

This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed
and we are ready to turn it on. Suggestion by Daniel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c7da607d9a4d48ca5917b4aca5b4abedd1893964 17-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose use of iboutletcollection on ivar/property
of non-object types. Radar 8308053.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3a3400b4fdf73887e9d8b4372334bc24a858702f 17-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose use of iboutletcollection on ivar/property
of non-object types. Radar 8308053.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4f7121ffc46611335a36c15ea42d6591b8c288ab 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the serialization library, with fixed dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Serialization/PCHBitCodes.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
857281328fa824782bdd979c3bfdd97ecdbc1609 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the serialization library, with fixed dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Serialization/PCHBitCodes.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
3c414771dd09faf7277d629451f9e43bfc3dc4bf 17-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add type parameter support for attribute iboutletcollection.
Radar 8308053.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
a8fb24fa3151567056f6125999cea69e39604f35 17-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add type parameter support for attribute iboutletcollection.
Radar 8308053.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
74aa4b52a2fc66418a5a92bb7bdbb1723dab7b95 17-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Revert Sebastian's build-breaking patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Serialization/PCHBitCodes.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
4557e473c9e673e7e6f7063478f63a5b3c6c10b2 17-Aug-2010 Douglas Gregor <dgregor@apple.com> Revert Sebastian's build-breaking patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Serialization/PCHBitCodes.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
872b3d65f022356f3a636c05506960639b5550db 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Create a new Serialization module that contains all the PCH code, and will contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Serialization/PCHBitCodes.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
93c972945bccd1a966b0445f9ed45db433b77bc1 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Create a new Serialization module that contains all the PCH code, and will contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Serialization/PCHBitCodes.h
lang/Serialization/PCHDeserializationListener.h
lang/Serialization/PCHReader.h
lang/Serialization/PCHWriter.h
74eb8a54dbbd107d42e78dd297f011cf7f8e7f31 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a typo in a diag name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
11c3dc45a89f632b5fb52610d5cb217bfc062e9a 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a typo in a diag name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
7f0ac49c3a0c730e607b45ee8eed664cb4b6745b 17-Aug-2010 Chris Lattner <sabre@nondot.org> Implement #pragma push_macro, patch by Francois Pichet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
f47724bf78299c7a50f008e0443c5f9f9f279ddc 17-Aug-2010 Chris Lattner <sabre@nondot.org> Implement #pragma push_macro, patch by Francois Pichet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
07f1c636bc60ee0c863003e37257f59d4fa978f4 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2f4eaef37476ae6891ede8ba215d0f6fd093629b 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6f19bd8cb2e5b8d98c26078ab462866b2ce6fce9 17-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When the # of top-level declarations changes after reparsing a
translation unit, refresh code-completion results because they've
probably changed. However, enforce a cooldown period between
refreshes, to avoid thrashing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
727d93ef49e18147149354fadd10e86b13bc4ab0 17-Aug-2010 Douglas Gregor <dgregor@apple.com> When the # of top-level declarations changes after reparsing a
translation unit, refresh code-completion results because they've
probably changed. However, enforce a cooldown period between
refreshes, to avoid thrashing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
0e4e4d37c1309007566f8892aa97b1e03d1dc9ef 17-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Move include to the proper place. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
349d38cef04ddf8938047c1b542a799aa82dfe84 17-Aug-2010 Douglas Gregor <dgregor@apple.com> Move include to the proper place. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
5a29d4cffad3aa4f1dff971782c09aceb0afd0ce 16-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose assiging to an interface object in
non-fragile abi mode as sizes are not statically known.
Fixes radar 8315734.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
57dae1a312e3f7591e957adc89776ef4bca6a097 16-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose assiging to an interface object in
non-fragile abi mode as sizes are not statically known.
Fixes radar 8315734.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6bfb73328826b5cf1a418587bbda9f2cacc2b5bd 16-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement name hiding of cached global code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
5f808c2bfe2f95c984029d76deb4aaebcad30cbc 16-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement name hiding of cached global code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
dc3454bbbc5a8021c9ec7310283b851f237a91d1 16-Aug-2010 Jordy Rose <jediknil@belkadan.com> Move GRState::AssumeInBound out of its header file -- it's not really inline-friendly anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
1802eebad8ebbd0b771b0776dbc53d2208af46d1 16-Aug-2010 Jordy Rose <jediknil@belkadan.com> Move GRState::AssumeInBound out of its header file -- it's not really inline-friendly anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
6dd2f47245158616b9670b2f620223143b28ee30 16-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add two options for playing with modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
e55fd871b0cf3e4ebc708cf46831908d74eab40a 16-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add two options for playing with modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
51bc53eb6a607d6da76ab71891ee2060929e2411 16-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When caching code completions for global declarations, keep track of
the usage type of each declaration result, then compare those types to
the preferred type of the completion. This provides parity in the
priority calculation between the code-completion results produced
directly from Sema and those cached by ASTUnit.

For the standard Cocoa.h (+ others) example, there's a penalty of 3-4
hundredeths of a second when caching the global results (for ~31,000
results), because we need an ASTContext-agnostic representation of
types for the comparison, and therefore we use... strings. Eventually,
we'd like to implement a more efficient ASTContext-agnostic encoding
of types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/TypeOrdering.h
lang/Frontend/ASTUnit.h
f5586f6b311c98e1022a8fe0609053849b70d323 16-Aug-2010 Douglas Gregor <dgregor@apple.com> When caching code completions for global declarations, keep track of
the usage type of each declaration result, then compare those types to
the preferred type of the completion. This provides parity in the
priority calculation between the code-completion results produced
directly from Sema and those cached by ASTUnit.

For the standard Cocoa.h (+ others) example, there's a penalty of 3-4
hundredeths of a second when caching the global results (for ~31,000
results), because we need an ASTContext-agnostic representation of
types for the comparison, and therefore we use... strings. Eventually,
we'd like to implement a more efficient ASTContext-agnostic encoding
of types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/TypeOrdering.h
lang/Frontend/ASTUnit.h
4d5dc10bd027901dac14d305dcdc3f26bcf0029d 16-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Emit diagnostic error when the field of an anonymous struct is non trivial.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
dd7744d01e513e941f47893b16dfebae2c1c9911 16-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit diagnostic error when the field of an anonymous struct is non trivial.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
de68a1e2d5a3ca09420aaba4a9614c619b0cc920 16-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Dereferencing NULL pointers is such poor form.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
c4421e966d77a18f815284175b3fcbb46f36fa39 16-Aug-2010 Douglas Gregor <dgregor@apple.com> Dereferencing NULL pointers is such poor form.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
9cf955365328fd5615ede5512c0e6a3647c33e79 16-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When caching global completion results, keep track of the simplified
type class, so that we can adjust priorities appropriately when the
preferred type for the context and the actual type of the completion
are similar.

This gets us one step closer to parity of the cached completion
results with the non-cached completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
1827e10051638770ad9ccf3e285caf95f995afd1 16-Aug-2010 Douglas Gregor <dgregor@apple.com> When caching global completion results, keep track of the simplified
type class, so that we can adjust priorities appropriately when the
preferred type for the context and the actual type of the completion
are similar.

This gets us one step closer to parity of the cached completion
results with the non-cached completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
adba46ffdb1a922c65b8518defeebdced2ecbd6a 16-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed typo in conj, conjf, conjl signature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
6f1bd6674823697516fc169a44adf974123377e2 16-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed typo in conj, conjf, conjl signature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
71734dbcecf25f58df4575cea422e5a7d07c8efa 16-Aug-2010 Charles Davis <cdavis@mines.edu> Error out if reinterpret_casting between member pointers of two different
sizes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f231df318d8d937adb24f3db23c23c31ab378a82 16-Aug-2010 Charles Davis <cdavis@mines.edu> Error out if reinterpret_casting between member pointers of two different
sizes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2e71feebc8f0b3a5a168e9bb79e5ea92f931f9b3 16-Aug-2010 Charles Davis <cdavis@mines.edu> Implement support for member pointers under the Microsoft C++ ABI in the
AST library.

This also adds infrastructure for supporting multiple C++ ABIs in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
071cc7deffad608165b1ddd5263e8bf181861520 16-Aug-2010 Charles Davis <cdavis@mines.edu> Implement support for member pointers under the Microsoft C++ ABI in the
AST library.

This also adds infrastructure for supporting multiple C++ ABIs in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
21cd11ca31b9168279e0513c7bb02dae24e41910 16-Aug-2010 Jordy Rose <jediknil@belkadan.com> - Allow making ElementRegions with complex offsets (expressions or symbols) for the purpose of bounds-checking.
- Rewrite GRState::AssumeInBound to actually do that checking, and to use the normal constraint path.
- Remove ConstraintManager::AssumeInBound.
- Teach RegionStore and FlatStore to ignore those regions for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/GRState.h
e701117b21356d3c60133315b5bdd50232ec6cca 16-Aug-2010 Jordy Rose <jediknil@belkadan.com> - Allow making ElementRegions with complex offsets (expressions or symbols) for the purpose of bounds-checking.
- Rewrite GRState::AssumeInBound to actually do that checking, and to use the normal constraint path.
- Remove ConstraintManager::AssumeInBound.
- Teach RegionStore and FlatStore to ignore those regions for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/GRState.h
0acf8f4cd2f719f0dc402acc19cf8e10fd174243 16-Aug-2010 Jordy Rose <jediknil@belkadan.com> Move GRState's bind* methods out of its header file -- they're too big for inlining now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
52082aff1ce4377761d4eb720689567719ccea22 16-Aug-2010 Jordy Rose <jediknil@belkadan.com> Move GRState's bind* methods out of its header file -- they're too big for inlining now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
b5ad08b05fc126114e3200ca2a2999be550781a6 15-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> StoreManager::RemoveDeadBindings() can take a Store instead of an entire GRState now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
5e4cb347cbf12c292b80386c872e5eaef21b5c23 15-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> StoreManager::RemoveDeadBindings() can take a Store instead of an entire GRState now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
caea399c474ff56d8f379772bff1ebef78570717 15-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.

There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.

Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendOptions.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
8071e4212ae08f8014e0c3ae6d18b7388003a5cc 15-Aug-2010 Douglas Gregor <dgregor@apple.com> Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.

There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.

Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendOptions.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
a256f5f41fbc9723df79ce52bf6c0855df786f06 15-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Remove dead code, caught by unused function warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
ba6f816d633e3b88c38c6896c2d78d19489650f2 15-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove dead code, caught by unused function warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
5f5cca5b0d0f9b890351134f8dd20d10706ac349 15-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> DependentTypeOfExprType and DependentDecltypeType are not seen by client code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TypeXML.def
469865cf50f5d11951cc13a935f0fe52cbf17360 15-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> DependentTypeOfExprType and DependentDecltypeType are not seen by client code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TypeXML.def
36deee56466fd493211464cbcfef3dd4543a376c 15-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Commit improved version of 111026 & 111027.

Unused warnings for functions:
-static functions
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace

Unused warnings for variables:
-static variables
-variables in anonymous namespace
-static data members in anonymous namespace
-static data members specializations in anonymous namespace

Reveals lots of opportunities for dead code removal in llvm codebase that will
interest my esteemed colleagues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
bbc6454bb98d6a6ecbaafa715222c5db834307f2 15-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Commit improved version of 111026 & 111027.

Unused warnings for functions:
-static functions
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace

Unused warnings for variables:
-static variables
-variables in anonymous namespace
-static data members in anonymous namespace
-static data members specializations in anonymous namespace

Reveals lots of opportunities for dead code removal in llvm codebase that will
interest my esteemed colleagues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
52cea12af0e273cf8f68dc7fb51caf5b4cc6a165 14-Aug-2010 Jordy Rose <jediknil@belkadan.com> Add a callback for when region changes occur. Still somewhat of a work-in-progress, but working! Effect on clients: all changes to a store now go through GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/Store.h
c2b7dfaad674587cfd220ff447b3710d252130c3 14-Aug-2010 Jordy Rose <jediknil@belkadan.com> Add a callback for when region changes occur. Still somewhat of a work-in-progress, but working! Effect on clients: all changes to a store now go through GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/Store.h
b2675e71e23ec36f999b3771d6ed8e30ac44f4d1 14-Aug-2010 Jordy Rose <jediknil@belkadan.com> Add a new metadata symbol type for checkers to use. Metadata symbols must be associated with a region and will be collected if the region dies or its checker fails to mark it as in use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
bd533aa4ff8895c676d4634d0d3de254962569d0 14-Aug-2010 Jordy Rose <jediknil@belkadan.com> Add a new metadata symbol type for checkers to use. Metadata symbols must be associated with a region and will be collected if the region dies or its checker fails to mark it as in use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
fb803c306f342996367fe1facaa35851330473c2 14-Aug-2010 Eli Friedman <eli.friedman@gmail.com> PR3344: Downgrade "too many braces around scalar initializer" to a warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
09865a903affa9c08687859d8de65470064c7bc2 14-Aug-2010 Eli Friedman <eli.friedman@gmail.com> PR3344: Downgrade "too many braces around scalar initializer" to a warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a9c78dd619063d11d0a5c7f2154c54b7d78a0fcf 14-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Increase flags to hold all necessary bits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptTable.h
e6674b369070cc9bef0a9e6fcab6aabd9b7924dc 14-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Increase flags to hold all necessary bits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptTable.h
b5e64b39ff15ccc53e83c452425ac31f172ed7f6 14-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement caching of code-completion results for macro definitions
when the CXTranslationUnit_CacheCompletionResults option is given to
clang_parseTranslationUnit(). Essentially, we compute code-completion
results for macro definitions after we have parsed the file, then
store an ASTContext-agnostic version of those results (completion
string, cursor kind, priority, and active contexts) in the
ASTUnit. When performing code completion in that ASTUnit, we splice
the macro definition results into the results provided by the actual
code-completion (which has had macros turned off) before libclang gets
those results. We use completion context information to only splice in
those results that make sense for that context.

With a completion involving all of the macros from Cocoa.h and a few other
system libraries (totally ~8500 macro definitions) living in a
precompiled header, we get about a 9% performance improvement from
code completion, since we no longer have to deserialize all of the
macro definitions from the precompiled header.

Note that macro definitions are merely the canary; the cache is
designed to also support other top-level declarations, which should be
a bigger performance win. That optimization will be next.

Note also that there is no mechanism for determining when to throw
away the cache and recompute its contents.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
87c08a5d6b9e1e44ae6f554df40139d3a6f60b33 14-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement caching of code-completion results for macro definitions
when the CXTranslationUnit_CacheCompletionResults option is given to
clang_parseTranslationUnit(). Essentially, we compute code-completion
results for macro definitions after we have parsed the file, then
store an ASTContext-agnostic version of those results (completion
string, cursor kind, priority, and active contexts) in the
ASTUnit. When performing code completion in that ASTUnit, we splice
the macro definition results into the results provided by the actual
code-completion (which has had macros turned off) before libclang gets
those results. We use completion context information to only splice in
those results that make sense for that context.

With a completion involving all of the macros from Cocoa.h and a few other
system libraries (totally ~8500 macro definitions) living in a
precompiled header, we get about a 9% performance improvement from
code completion, since we no longer have to deserialize all of the
macro definitions from the precompiled header.

Note that macro definitions are merely the canary; the cache is
designed to also support other top-level declarations, which should be
a bigger performance win. That optimization will be next.

Note also that there is no mechanism for determining when to throw
away the cache and recompute its contents.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/Sema.h
c01a9412aa2701d5582f2c3c6e4787bb0a0c37e6 13-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Revert 111026 & 111027, build breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
05eac86d547892847ca95b5350e28d681150fa68 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert 111026 & 111027, build breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
39e856609b8b56c5e120b48bf53d489b46dffdb2 13-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> The unused warnings extravaganza continues. Warn for:

-static variables
-variables in anonymous namespace (fixes rdar://7794535)
-static data members in anonymous namespace
-static data members specializations in anonymous namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
30c0dd86f0dc3c1a1fba29581d04e8ed0bdb659d 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> The unused warnings extravaganza continues. Warn for:

-static variables
-variables in anonymous namespace (fixes rdar://7794535)
-static data members in anonymous namespace
-static data members specializations in anonymous namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
04d50da8b699861aa7c631e1dd6b40376bd36690 13-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Expand the unused warnings for functions. Warn for:

-static function declarations
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
f6d1d43d68016e975f22264343631a55b9701495 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Expand the unused warnings for functions. Warn for:

-static function declarations
-functions in anonymous namespace
-class methods in anonymous namespace
-class method specializations in anonymous namespace
-function specializations in anonymous namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
85d6a41b8f1a0d389d1cacd48a838485e68b3013 13-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also keeping track of unused file scoped variables.

This is only preparation, currently only static function definitions are tracked, as before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Sema/Sema.h
49b96d1a382ae9f31456166f1a734d3f7f30b992 13-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change Sema's UnusedStaticFuncs to UnusedFileScopedDecls to allow also keeping track of unused file scoped variables.

This is only preparation, currently only static function definitions are tracked, as before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Sema/Sema.h
7f987ac63fb3a284c1282b62de07d7bfdd995ea5 13-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> When issuing warning for future conflict resolution,
(nonfragile-abi2), do not consider 'ivar' access
in class methods. Also, improve on diagnostics.
Radar 8304561.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f759b4dc74fe8b0cc6e1350b860676ac9b853371 13-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> When issuing warning for future conflict resolution,
(nonfragile-abi2), do not consider 'ivar' access
in class methods. Also, improve on diagnostics.
Radar 8304561.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
85fbb33344df0c86fc29baa47a50e28f91f5ed1f 13-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Add a new cc1 option -fix-what-you-can which when combined with the fix-it mode
will apply all fixes even when there were other errors in the file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
lang/Rewrite/FixItRewriter.h
lang/Rewrite/FrontendActions.h
1450f265fcc84a7ca64dd9f3b8d4492c5bd55e23 13-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Add a new cc1 option -fix-what-you-can which when combined with the fix-it mode
will apply all fixes even when there were other errors in the file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
lang/Rewrite/FixItRewriter.h
lang/Rewrite/FrontendActions.h
5c5e734c2e76ebb3bb790feb1fbb180d7bfe6e7f 13-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add an options parameter to clang_saveTranslationUnit, because we'll want it later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111016 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1999844e7a18786e61e619e1dc6c789827541863 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Add an options parameter to clang_saveTranslationUnit, because we'll want it later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111016 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6a5e66b03e9ab0f3b434530b286da1ae8497d816 13-Aug-2010 John McCall <rjmccall@apple.com> Fix the help text on -Wwrite-strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
a61e5a2679d8e40de8d98fb96d051df8094f6e99 13-Aug-2010 John McCall <rjmccall@apple.com> Fix the help text on -Wwrite-strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
191829473d215228fe1fdd5f3d26ba8409b4c534 13-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Implement clang_saveTranslationUnit(), which saves a translation unit
into a PCH/AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111006 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
7ae2faafd30524ef5f863bb3b8701977888839bb 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement clang_saveTranslationUnit(), which saves a translation unit
into a PCH/AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111006 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
0fc30d4b6f569ff829430b7881b485462990c9fb 13-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
GCC.
- Mark -Xclang and -mlinker-version= with it for now, although I am sure there
are more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
lang/Driver/OptTable.h
lang/Driver/Option.h
lang/Driver/Options.td
caeed1d3a5b366ae8fda5dda9bddc7bbb859c41f 13-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
GCC.
- Mark -Xclang and -mlinker-version= with it for now, although I am sure there
are more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
lang/Driver/OptTable.h
lang/Driver/Option.h
lang/Driver/Options.td
3b4b03ffddbcdc9be55c8eb54c6b490b4722b1cd 13-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Teach ASTUnit to hold on to the Sema object and ASTConsumer that are
used when parsing (or re-parsing) a file. Also, when loading a
precompiled header into ASTUnit, create a Sema object that holds onto
semantic-analysis information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
914ed9d30e9abf829a62aa996b083b1e47c19ff6 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Teach ASTUnit to hold on to the Sema object and ASTConsumer that are
used when parsing (or re-parsing) a file. Also, when loading a
precompiled header into ASTUnit, create a Sema object that holds onto
semantic-analysis information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
c067319e8bbb6cc37614a0b7ae5709c0ebccb5ea 13-Aug-2010 John McCall <rjmccall@apple.com> Make two methods have compatible signatures with the methods they override.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
40db2991d746a2901d6441cee261552a20a4a48a 13-Aug-2010 John McCall <rjmccall@apple.com> Make two methods have compatible signatures with the methods they override.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Sema.h
054f0821dff26979423ccdfd09846d579af24781 13-Aug-2010 John McCall <rjmccall@apple.com> Perform access control when template lookup finds a class template.
This is *really* hacky.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
b8592063413d277f6583715c9a890bd58440c1d1 13-Aug-2010 John McCall <rjmccall@apple.com> Perform access control when template lookup finds a class template.
This is *really* hacky.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/Lookup.h
1b21c5748eeb17fbe28d96c73e96f70001495043 13-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Zap unused UnaryOperator::OffsetOf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/AST/StmtVisitor.h
lang/Frontend/StmtXML.def
de7e66256b1bdfcf6526994825a8c8fced52a31c 13-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Zap unused UnaryOperator::OffsetOf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
lang/AST/StmtVisitor.h
lang/Frontend/StmtXML.def
735b542c2c94910a3d522283864f85c27ff602cf 13-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0b17c61e8f143901ce11b4a6e5129ac63aaeee04 13-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
ea10e49a098ef488e8341bae88112449d3f74233 13-Aug-2010 John McCall <rjmccall@apple.com> Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option. The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable. Platforms with less ornery linkers can feel free to enable this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
279b5eb6910d64a293e9c0e2887a05c65d8737d7 13-Aug-2010 John McCall <rjmccall@apple.com> Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option. The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable. Platforms with less ornery linkers can feel free to enable this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenOptions.h
9419e93fc798a72419e44677651eef9772cde858 13-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Teach CompilerInstance to create and hold on to the Sema object used
for parsing, so that it can persist beyond the lifetime of the parsing
call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
f18d0d8b39e891460d50f8a8b85029885b264986 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Teach CompilerInstance to create and hold on to the Sema object used
for parsing, so that it can persist beyond the lifetime of the parsing
call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
ba91143029e953e8e813d3f4d2bafef96ba52770 13-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
lang/Sema/Sema.h
46ea32a4b54481b7575499cb9f8d275f1d4cdd54 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
lang/Sema/Sema.h
68d9db1f0d901b561b11cecd8a4a53a1af21b780 13-Aug-2010 Tom Care <tcare@apple.com> Improved IdempotentOperationChecker false positives and false negatives.
- Unfinished analysis may still report valid warnings if the path was completely analyzed
- New 'CanVary' heuristic to recursively determine if a subexpression has a varying element
- Updated test cases, including one known bug
- Exposed GRCoreEngine through GRExprEngine

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
a7a8a450d908b34fa5f569f2e694ebd4b61aae2f 13-Aug-2010 Tom Care <tom.care@uqconnect.edu.au> Improved IdempotentOperationChecker false positives and false negatives.
- Unfinished analysis may still report valid warnings if the path was completely analyzed
- New 'CanVary' heuristic to recursively determine if a subexpression has a varying element
- Updated test cases, including one known bug
- Exposed GRCoreEngine through GRExprEngine

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
75a87ecc0bd54e9daf185a2814d902fa347a4c4e 13-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to issue warning when colllection expresion's type
does not implement 'countByEnumeratingWithState' API.
Implements radar 7634669.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ea16110ce3a4fbb205735f0a55050bc11292e82c 13-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to issue warning when colllection expresion's type
does not implement 'countByEnumeratingWithState' API.
Implements radar 7634669.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2340ba00f3e312e9df014e474531270d3263550d 12-Aug-2010 John McCall <rjmccall@apple.com> Implement -Wcast-align. The initial design of this diagnostic diverges
from GCC's in that we warn on *any* increase in alignment requirements, not
just those that are enforced by hardware. Please let us know if this causes
major problems for you (which it shouldn't, since it's an optional warning).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
b7f4ffe073fa419613946461a2583ba2fcb72280 12-Aug-2010 John McCall <rjmccall@apple.com> Implement -Wcast-align. The initial design of this diagnostic diverges
from GCC's in that we warn on *any* increase in alignment requirements, not
just those that are enforced by hardware. Please let us know if this causes
major problems for you (which it shouldn't, since it's an optional warning).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Sema/Sema.h
f4053ff5bff552d63919155e5f429cead6c391e1 12-Aug-2010 John McCall <rjmccall@apple.com> Fixing the build isn't good enough; back out r110956 and r110953.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
lang/Sema/Sema.h
d69fd7f34fd2de35845e834e987009efec09b937 12-Aug-2010 John McCall <rjmccall@apple.com> Fixing the build isn't good enough; back out r110956 and r110953.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
lang/Sema/Sema.h
2417511680a15c64abb232b984f1082d36fe3bfe 12-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
lang/Sema/Sema.h
0eeb81baac6e82b065c0b03ad28ad1e580e78790 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a ParseAST overload that takes a Sema object, so that the caller
can create (and hold on to) the Sema object. Also, move Sema-related
initialization/finalization with its various consumers and external
sources into the Sema constructor and destructor, rather than placing
it in ParseAST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
lang/Sema/Sema.h
c0e51be6ec0f57f9caaf16bdd3ef20a8b37466c9 12-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Move Sema's headers into include/clang/Sema, renaming a few along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
lang/Sema/CXXFieldCollector.h
lang/Sema/IdentifierResolver.h
lang/Sema/Initialization.h
lang/Sema/Lookup.h
lang/Sema/Overload.h
lang/Sema/Sema.h
lang/Sema/Template.h
e737f5041a36d0befb39ffeed8d50ba15916d3da 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Move Sema's headers into include/clang/Sema, renaming a few along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/AnalysisBasedWarnings.h
lang/Sema/CXXFieldCollector.h
lang/Sema/IdentifierResolver.h
lang/Sema/Initialization.h
lang/Sema/Lookup.h
lang/Sema/Overload.h
lang/Sema/Sema.h
lang/Sema/Template.h
4b95a9589ccec1a4715823cc0a6cced5b354cc0c 12-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Downgrade error about nonnull attribute bbeing applied to a function without point arguments to a warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c9ef405559c90fc98b016d00aeae8afbc31c6bf6 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Downgrade error about nonnull attribute bbeing applied to a function without point arguments to a warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3c17089a228845aaee81c147c949d8b8b95abcd9 12-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
f573084db5807f6003282bdf53ca9d58bab1ddc4 12-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
e58479760ac3cc56f8f59ddf7e25982298581bf2 12-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added locations and type source info for DeclarationName inside UsingDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
ef3dce817d43faadbf21ce9102d33a9d84b02e09 12-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added locations and type source info for DeclarationName inside UsingDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
c86cc5ddd65451de8551a9978664afe16646690f 12-Aug-2010 Jordy Rose <jediknil@belkadan.com> Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
2a479929f70d32f626778ef6e70ef46d3a37f74e 12-Aug-2010 Jordy Rose <jediknil@belkadan.com> Remove OwnershipAttr::Kind, since it's essentially redundant with attr::Kind the way it's being used. Also fix isa<OwnershipAttr> support, break more-than-80-char lines, and other miscellaneous ownership attr cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
2dff8200f405aac350f70fb311eead277759f99e 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Move the bulk of the cc1_main() processing into
ExecuteCompilerInvocation in libFrontend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
8eb2b0141d81d7d1026fad2d1a631f40eb3747a6 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Move the bulk of the cc1_main() processing into
ExecuteCompilerInvocation in libFrontend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
07b8e22f84fc71f0baaf244109ccb81e1ef814b5 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Use the compile time linker version as the default for -mlinker-version,
if detected.
- This is a hack, we really want the linker version at execution time, but we
don't have any infrastructure for getting that. Yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
a77a723489b0cff63bf90f23416e10b8b6fc1f55 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Use the compile time linker version as the default for -mlinker-version,
if detected.
- This is a hack, we really want the linker version at execution time, but we
don't have any infrastructure for getting that. Yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f4f7745b58bdde35c435f0a1244a855a8c242fca 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -mlinker-version=, which forwards to -target-linker-version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
c176bc6be6f1407e7c6bd062f05a8636ea9a08e3 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -mlinker-version=, which forwards to -target-linker-version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
6a774b93f00e617be48c091a95becdec6ceff849 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add -target-linker-version, for specifying the version string of the
linker in use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetOptions.h
lang/Driver/CC1Options.td
39065a5494613952b4810d1d6b28348cef155e12 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add -target-linker-version, for specifying the version string of the
linker in use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetOptions.h
lang/Driver/CC1Options.td
14f796cba920ce6012f5248a3f6e94b45579abd6 12-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> -Make TokenID of IdentifierInfo read-only, remove setTokenID().
-There are 2 instances that change the TokenID for GNU libstdc++ 4.2 compatibility.
To handler those cases introduce a RevertedTokenID bitfield, RevertTokenIDToIdentifier() and hasRevertedTokenIDToIdentifier() methods.
Store the bitfield in PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
646395bbcaa849c94bc2a3246c71d809ca719f01 12-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Make TokenID of IdentifierInfo read-only, remove setTokenID().
-There are 2 instances that change the TokenID for GNU libstdc++ 4.2 compatibility.
To handler those cases introduce a RevertedTokenID bitfield, RevertTokenIDToIdentifier() and hasRevertedTokenIDToIdentifier() methods.
Store the bitfield in PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
f7401424f9b5b4648e180a80a6552e6e93c802ae 12-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added locations and type source info for DeclarationName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
2577743c5650c646fb705df01403707e94f2df04 12-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added locations and type source info for DeclarationName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
142156997e12aa4eb334ce40cd75214a827854a5 11-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
e6b1bb6e7fe906d164637ca33503b8fafdbc99e5 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
f7142f1a9c73aafc9b09b13c6ab02a10c2f67f6b 11-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Change text of diagnostics on user request.
radar 7948654.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
741c362a1cb4f3644d5a4e6b8eb9244799e4ade6 11-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Change text of diagnostics on user request.
radar 7948654.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3dec9ba34b784cf889aef47c38978eb5f45b3689 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove rsqrtps_nr256 and sqrtps_nr256 builtins, at least until we need them

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
4fbe7aad307dba8d668b7878cd5e833c9467d1d8 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove rsqrtps_nr256 and sqrtps_nr256 builtins, at least until we need them

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
07d87b418a9899b382796c698ebab186067d61ee 11-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the ASTConsumer/ASTUnit fix from r110610, it has nothing to do with the breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
27372b4f1f402e95dd479ecf40c39ca71c15619f 11-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the ASTConsumer/ASTUnit fix from r110610, it has nothing to do with the breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
0d293e62d2bb4a71d44b30a739030f46f961d63c 11-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add a (currently unused) "options" parameter to
clang_reparseTranslationUnit(), along with a function to retrieve the
default recommended reparsing options for a translation unit.

Also, add the CXTranslationUnit_CacheCompletionResults flag, which is
also currently unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110811 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e1e13bf568a7e37c95eda6fcfa626659a06e67b1 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a (currently unused) "options" parameter to
clang_reparseTranslationUnit(), along with a function to retrieve the
default recommended reparsing options for a translation unit.

Also, add the CXTranslationUnit_CacheCompletionResults flag, which is
also currently unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110811 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5a24acfed51d1233e325f43af5b2147ad9c31e04 11-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/AST/Type.h
deacbdca554298ccdf636f19c6094a8825ec6b34 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/AST/Type.h
c0a8d2bb0b15eeeef8e4074b5223b66ebeae0d87 11-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> MemRegion can refer to ASTContext without external help.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
018220c343c103b7dfaa117a7a474c7a7fd6d068 11-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> MemRegion can refer to ASTContext without external help.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
7aec899c576f2c168b8cd8f68324ec4493960cee 11-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Improve our handling of user-defined conversions when computing
implicit conversion sequences. In particular, model the "standard
conversion" from a class to its own type (or a base type) directly as
a standard conversion in the normal path *without* trying to determine
if there is a valid copy constructor. This appears to match the intent
of C++ [over.best.ics]p6 and more closely matches GCC and EDG.

As part of this, model non-lvalue reference initialization via
user-defined conversion in overloading the same way we handle it in
InitializationSequence, separating the "general user-defined
conversion" and "conversion to compatible class type" cases.

The churn in the overload-call-copycon.cpp test case is because the
test case was originally wrong; it assumed that we should do more
checking for copy constructors that we actually should, which affected
overload resolution.

Fixes PR7055. Bootstrapped okay.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
604eb65686590f73551d4ea608b174d2244cdd0f 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Improve our handling of user-defined conversions when computing
implicit conversion sequences. In particular, model the "standard
conversion" from a class to its own type (or a base type) directly as
a standard conversion in the normal path *without* trying to determine
if there is a valid copy constructor. This appears to match the intent
of C++ [over.best.ics]p6 and more closely matches GCC and EDG.

As part of this, model non-lvalue reference initialization via
user-defined conversion in overloading the same way we handle it in
InitializationSequence, separating the "general user-defined
conversion" and "conversion to compatible class type" cases.

The churn in the overload-call-copycon.cpp test case is because the
test case was originally wrong; it assumed that we should do more
checking for copy constructors that we actually should, which affected
overload resolution.

Fixes PR7055. Bootstrapped okay.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
28189cbc520c81934dc5b5dec334dafb0da37bff 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove 256-bit cast built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
7fc3702694996d7d373e3280812a4172cf451aac 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove 256-bit cast built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
32103f13c62ebb075514335093702f5ff553360a 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove 256-bit unpack built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
f0e96c925858a513c275f0aec89f049e065c78db 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove 256-bit unpack built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
4f6e1968109fc4e160ade918919a6c906274d6e2 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove 256-bit shuffle built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
b33aa0f7dfa3a6cadc8ac1ac910f36680cbf7a76 11-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Remove 256-bit shuffle built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
c798adf347c9873ab28dfe84f77a99b815c98b49 11-Aug-2010 Ted Kremenek <kremenek@apple.com> Have GRCoreEngine record the blocks where analysis was aborted because we visited a block too many times along a given path. This is to support the unreachable code analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
f598087b4adfea164acdd5b53ea2951bde740a2d 11-Aug-2010 Ted Kremenek <kremenek@apple.com> Have GRCoreEngine record the blocks where analysis was aborted because we visited a block too many times along a given path. This is to support the unreachable code analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
53b1f07486423ff3b40eae2530ab805fae553e82 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TypeLocs to VAArgExpr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
2cad900202561cdda18ea6cc51ddbf3e20e3c23a 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TypeLocs to VAArgExpr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
8b2ab3d4c434dcd30cb229b0dfdbe35a0679d5d5 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TypeLocs to TypesCompatibleExpr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
3fcb73dae91be42b071cf0dde9222b7ec362146d 10-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TypeLocs to TypesCompatibleExpr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/RecursiveASTVisitor.h
44775a800979c0a2fbb0695c637221f36cc47f78 10-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Make replicate intrinsics use shufflevector instead of dup builtins, also remove the dup builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
4a5496bdd50f6cec5f8eb252665503e5431708d9 10-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Make replicate intrinsics use shufflevector instead of dup builtins, also remove the dup builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
1b9c3ec340bf818092af6a9f63f4ce70b6020e91 10-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Use i32 instead of i8 for AVX dot product intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
c2350b20d4cd98b0d2680ed45a65f4e97eba3663 10-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Use i32 instead of i8 for AVX dot product intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
0019324fe31c13a9df7b262a92a627e81367a348 10-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Run the assembler instead of gcc on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
ba30bbe4e36a30a274da809a11a42f9cdc168e92 10-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Run the assembler instead of gcc on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
a63ed77399a52f538a687825696cf7760f9b632c 10-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Consider the last argument of vblend builtin to be i32 instead of i8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
368b76ee98535eec93c487ae4b213fa0598a9eff 10-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Consider the last argument of vblend builtin to be i32 instead of i8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
2a28e0e5425568c7d7c936281c25fa65ece9e524 10-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Implements gcc's -Wstrict-selector-match.
(radar 8127244).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
6b308f6dc7d8f1581c52095f435c0e1284b111d8 10-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Implements gcc's -Wstrict-selector-match.
(radar 8127244).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
28fe01a7b9e70607e703c0f6876b2effab56bb41 10-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Instead of having a specific CXTranslationUnit_* option flag for
"editing" mode, introduce a separate function
clang_defaultEditingTranslationUnitOptions() that retrieves the set of
options. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110613 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b1c031be513705d924038f497279b9b599868ba1 10-Aug-2010 Douglas Gregor <dgregor@apple.com> Instead of having a specific CXTranslationUnit_* option flag for
"editing" mode, introduce a separate function
clang_defaultEditingTranslationUnitOptions() that retrieves the set of
options. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110613 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9d202272883096751921e0860f9df659d4ab66b6 09-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> - Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another.
- Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/AST/Type.h
74c730ad1f6818b676b0bad46d806a9176950328 09-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> - Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another.
- Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/AST/Type.h
f14c94246a3e098aee463411b90da4f0f2eacaaf 09-Aug-2010 John Thompson <john.thompson.jtsoftware@gmail.com> Added vecreturn attribute parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Parse/AttributeList.h
35cc9627340b15232139b3c43fcde5973e7fad30 09-Aug-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Added vecreturn attribute parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
lang/Parse/AttributeList.h
e1e90090d94a1f96ba58d3a2f25315ccf352998c 09-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Change warning about incomplete parsing of C++ default arg to error and provide a test case; thanks Doug!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
219cffcad343aef5939ca34d5abb59fbc7da1c36 09-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change warning about incomplete parsing of C++ default arg to error and provide a test case; thanks Doug!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
fc7d1f5af026e40e9f2b4b27149287259ba44128 09-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Use precompiled preambles for in-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110596 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Lex/Lexer.h
df95a13ec73d2cdaea79555cb412d767f4963120 09-Aug-2010 Douglas Gregor <dgregor@apple.com> Use precompiled preambles for in-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110596 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Lex/Lexer.h
30a171f86dc5a68d525781d64dfa651f3413b1ad 09-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Revert the dump functions to send output to llvm::errs(), matching the LLVM convention; suggestion by Daniel.

'-ast-print' / '-ast-dump' command line options still send output to llvm::outs().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9668033ee4c25efd019e6c7e6dd96aa2e6364a46 09-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert the dump functions to send output to llvm::errs(), matching the LLVM convention; suggestion by Daniel.

'-ast-print' / '-ast-dump' command line options still send output to llvm::outs().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9ffffb03bd9365746a5994a37e862b9bb2f17162 09-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Replace a parser assertion with a warning, suggestion by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f315fd6ebb9dbc47619315284c9af1ce5ec5f834 09-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Replace a parser assertion with a warning, suggestion by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
b38704938e9fea65d2754b16fb8af4642e9b010f 09-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support ObjC implementation decls for PCH.

Strictly speaking, implementations don't go in headers but there's no law against it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9d50c0635fb213b2a1857e3f8488580f0dab2f98 09-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support ObjC implementation decls for PCH.

Strictly speaking, implementations don't go in headers but there's no law against it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
50ed01d948df5b72a80feefa99499ea770f57a3e 09-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor into functions PCH reading/writing the CXXBaseOrMemberInitializers. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
8e706f4b8da141612861e127610141b8d17a9667 09-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor into functions PCH reading/writing the CXXBaseOrMemberInitializers. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
dd2787d773eff909eac4c1f7d09b21ecb98ef3cc 08-Aug-2010 Sean Hunt <rideau3@gmail.com> Remove C++0x concept keyword tokens since concepts were removed from C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
42b879ad1a708b16a6daab3c50c044bb2c0cf767 08-Aug-2010 Sean Hunt <rideau3@gmail.com> Remove C++0x concept keyword tokens since concepts were removed from C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
f10967c3961ad97c3c1b80d0964c5faebefbc4c7 08-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r110440, the fix for PR4897. Chris claims to have a better way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
10fe93d57c11f068aa4d78eb4ca7f60329818306 08-Aug-2010 Douglas Gregor <dgregor@apple.com> Revert r110440, the fix for PR4897. Chris claims to have a better way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
da89be4d508f5ce9fabb8972d3c1859904971ceb 08-Aug-2010 Eric Christopher <echristo@apple.com> Make -funroll-loops turn on loop unrolling in the optimizer instead
of just ignoring it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
f84d409903dd4107c8cef5a08fcfce6e5c21d4de 08-Aug-2010 Eric Christopher <echristo@apple.com> Make -funroll-loops turn on loop unrolling in the optimizer instead
of just ignoring it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
fd312ab07bcfd032c1b23f91281d20cff0ac9278 08-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Push location through the MacroUndefined PPCallback and use it to print #undefs in -dD mode. (PR7818)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
2f05449fa1c9015a84b74c3308b856fc704662be 08-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Push location through the MacroUndefined PPCallback and use it to print #undefs in -dD mode. (PR7818)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/PreprocessingRecord.h
e004547e55aa2e69d1a7ee3d037605c5b1e9f6c3 07-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Allow reference binding of a reference of Objective-C object type to
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/Type.h
569c3166874324c24011f8ade6978421f0d39b3c 07-Aug-2010 Douglas Gregor <dgregor@apple.com> Allow reference binding of a reference of Objective-C object type to
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/Type.h
0cf5885d618c1de7806e691c328c1540fa040a19 07-Aug-2010 John McCall <rjmccall@apple.com> Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
f871d0cc377a1367b519a6cce26be74607566eba 07-Aug-2010 John McCall <rjmccall@apple.com> Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
00347577a8dfbe4a887692877d4b6f1b40ccf0ea 07-Aug-2010 Tom Care <tcare@apple.com> Removed IdempotentOperationChecker from default analysis and returned back to a flag (-analyzer-check-idempotent-operations)
- Added IdempotentOperationChecker to experimental analyses for testing purposes
- Updated test cases to explictly call the checker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
1fafd1d96419f587763d1b81332d8f476aeace2e 07-Aug-2010 Tom Care <tcare@apple.com> Removed IdempotentOperationChecker from default analysis and returned back to a flag (-analyzer-check-idempotent-operations)
- Added IdempotentOperationChecker to experimental analyses for testing purposes
- Updated test cases to explictly call the checker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
2f987862673a11de5d8dce726ceef66f82b6bf32 06-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix leaks of ExplicitSpecializationInfo objects by allocating them with 'new (ASTContext)' instead of 'new'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
db1423008b6185fc570558cff77d92f94e55b386 06-Aug-2010 Ted Kremenek <kremenek@apple.com> Fix leaks of ExplicitSpecializationInfo objects by allocating them with 'new (ASTContext)' instead of 'new'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
3f9e851a291c4747d085f5d1390299381ffcf42d 06-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Template keyword should not be ignored building a QualifiedTemplateName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7c15353ccaed24f2df932571166bf305c1b98b6d 06-Aug-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Template keyword should not be ignored building a QualifiedTemplateName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
76a6b8172f206b8bd18584c02cfd5093f7c10fb9 06-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Fix the #include search path when reading from stdin, from Jon Simons!
Fixes PR4897.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110440 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
91db30ad4a7bad37b57748c31f8b592b7bf7cbeb 06-Aug-2010 Douglas Gregor <dgregor@apple.com> Fix the #include search path when reading from stdin, from Jon Simons!
Fixes PR4897.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110440 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
a58644c271d16285cc9e46593a7a66e2367e9a08 06-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose the use of "inline" on block-scope function declarations in
C++, from Andrea Nall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ed328c6129152f66771c3bed338a2e6e13e4e230 06-Aug-2010 Douglas Gregor <dgregor@apple.com> Diagnose the use of "inline" on block-scope function declarations in
C++, from Andrea Nall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
78e544db7a28b16601365de08d4a352459b11071 06-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce implicit conversions between AltiVec vectors and GCC
vectors, from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
255210ef415b9893f0e3794e8d9a704194c12f3c 06-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce implicit conversions between AltiVec vectors and GCC
vectors, from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d81673ac7aeab829338a57c161fb28879fcf11b3 06-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce a new token kind 'cxx_defaultarg_end' to mark the end of C++ default arguments that were part of
lexed method declarations.

This avoid interference with tokens coming after the point where the default arg tokens were 'injected', e.g. for

typedef struct Inst {
void m(int x=0);
} *InstPtr;

when parsing '0' the next token would be '*' and things would be messed up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
2b602adf9798eaf13850efaf8ed41c69d3cf7da6 06-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a new token kind 'cxx_defaultarg_end' to mark the end of C++ default arguments that were part of
lexed method declarations.

This avoid interference with tokens coming after the point where the default arg tokens were 'injected', e.g. for

typedef struct Inst {
void m(int x=0);
} *InstPtr;

when parsing '0' the next token would be '*' and things would be messed up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
a0c0ed6974b2707bce74bc036978ee25fb3bdeca 06-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Remove ElseScope which is also dead code now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
fcecd3cc07ad395e05db864bc21f7790f7878156 06-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Remove ElseScope which is also dead code now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
794c6eb2e42c58ba28b94e413956d60371789345 06-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Remove the DeclaredInCondition bit now that it's no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a834888ecc3ea36ea78a585209f422c7730d437a 06-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Remove the DeclaredInCondition bit now that it's no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d6927d5e9b4394c74a43a5d7561d910d9be2cc6d 06-Aug-2010 Nate Begeman <natebegeman@mac.com> vdup_lane was missing
<rdar://problem/8278732>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
cd480ad90ff4c144084805761d2dfa52ee9e1c92 06-Aug-2010 Nate Begeman <natebegeman@mac.com> vdup_lane was missing
<rdar://problem/8278732>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
6714422aefc10807d32400f424e40df84d0dc912 06-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> We don't want to support built-ins which aren't needed by the intrinsics. Remove them

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110399 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
f8c6db4cacaa733cf335deb03a9ccd0c9c488b3e 06-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> We don't want to support built-ins which aren't needed by the intrinsics. Remove them

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110399 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
e96911b46b92e26170d9186ae780f0bb98a322fc 05-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Collect namespaces that need updating in a PCH chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHWriter.h
a7be5065edc93ab52a25b2588a23a41a4beba21e 05-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Collect namespaces that need updating in a PCH chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHWriter.h
6fc3bc2ccf703d75a821a6883dbc0f235c123f08 05-Aug-2010 John McCall <rjmccall@apple.com> It turns out that linkers (at least, the Darwin linker) don't necessarily
do the right thing with mixed-visibility symbols, so disable the visibility
optimization where that's possible, i.e. with template classes (since it's
possible that an arbitrary template might be subject to an explicit
instantiation elsewhere). 447.dealII actually does this.

I've put the code under an option that's currently not hooked up to anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenOptions.h
7a536907da776bdc47a704e7cafd641e8150e653 05-Aug-2010 John McCall <rjmccall@apple.com> It turns out that linkers (at least, the Darwin linker) don't necessarily
do the right thing with mixed-visibility symbols, so disable the visibility
optimization where that's possible, i.e. with template classes (since it's
possible that an arbitrary template might be subject to an explicit
instantiation elsewhere). 447.dealII actually does this.

I've put the code under an option that's currently not hooked up to anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenOptions.h
89cc2c329f847a0130e07320136ebd80003076be 05-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that
included the PCH, as God intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
0e0363866792b309d70e9c8e92b4c239773af89c 05-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that
included the PCH, as God intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
eace58812aa8b0d5c0d21acb5d4f796579306528 05-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support #pragma weak for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
72b90571b1783b17c3f2204cec5ca440edc38bee 05-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support #pragma weak for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
5c951e24438098b51b8f63ee847fe742ca043b24 05-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Give clang_codeCompleteAt() an "options" parameter, and add a new
flags enumeration + default-generating function that allows
code-completion to be customized via the libclang API.

Plus, turn on spell-checking when performing code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110319 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
cee235cdf0b8047761ffac598c4c3a32ab7411a2 05-Aug-2010 Douglas Gregor <dgregor@apple.com> Give clang_codeCompleteAt() an "options" parameter, and add a new
flags enumeration + default-generating function that allows
code-completion to be customized via the libclang API.

Plus, turn on spell-checking when performing code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110319 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
ca106a69001c59799e84703ddc619d4ecf6d84b1 05-Aug-2010 John McCall <rjmccall@apple.com> TDK_InconsistentQuals is really totally different from TDK_Inconsistent.
Rename it to TDK_Underqualified to avoid this sort of confusion and give it
its own diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
57e97786433e70197a089360228d8f0d82e3ad4c 05-Aug-2010 John McCall <rjmccall@apple.com> TDK_InconsistentQuals is really totally different from TDK_Inconsistent.
Rename it to TDK_Underqualified to avoid this sort of confusion and give it
its own diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0629e6403126369d15585aeed9a7f6faf7f5cf17 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Implement #pragma GCC visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
aa8b0d19244a6e7e8e5798fcc6aef003c274d3e0 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Implement #pragma GCC visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
d3ce05fd7c50d631742c866e62da87fa2bd32dc9 05-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Remove the warning for variables declared in the if-expression being used in
the else clause. The problem is that it's overly zealous and will respond to
uses in assignments, or after assignments. We should bring this back once we
can do it right. Fixes PR7100.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c133e9ea17d61062bcfb3bd6009c300c9a78161f 05-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Remove the warning for variables declared in the if-expression being used in
the else clause. The problem is that it's overly zealous and will respond to
uses in assignments, or after assignments. We should bring this back once we
can do it right. Fixes PR7100.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
78a3c420e8ae857b2846b4db8f0d5ca81f47885d 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Add support for -Woverlength-strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
14bc105073b20c197512e1054866653304cfc42d 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Add support for -Woverlength-strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
2fd2f7e034165b23a762bf9221adaee5c0599786 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Get rid of isObjectType; when C++ says "object type", it generally
just means "not a function type", not "not a function type or void". This
changes behavior slightly, but generally in a way which accepts more code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1357869bc5983cdfbc986db1f3d18265bb34cb0e 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Get rid of isObjectType; when C++ says "object type", it generally
just means "not a function type", not "not a function type or void". This
changes behavior slightly, but generally in a way which accepts more code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8a93f510715475e7b4eb66023ab9597c4c367188 05-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add -mavx and -mno-avx command line support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
7377ed985bb2a529d1abb4ebea88586e5d195d1b 05-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add -mavx and -mno-avx command line support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
da6088235d224960c0550d773ccf52ec0f30c100 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Bring stats for the method pool back.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
fa78dec572259aca763457b435744f79d822c5d4 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Bring stats for the method pool back.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
1ee3a7bdf44744b4054a264b2624196454011d5d 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement per-file reading of the selector table. This disables statistics about method pool hits for the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
725cd9686a0f5bb6c994cb3e43f58b63567c6860 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement per-file reading of the selector table. This disables statistics about method pool hits for the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
66c1eaa34103a89e127f5759755cab0c1937ce35 04-Aug-2010 Ted Kremenek <kremenek@apple.com> Add CFGStmtMap, which defines a mapping from Stmt* to CFGBlock*. The immediate intended use is in the unreachable code analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGStmtMap.h
a6d69302d7c86b1c71b9c18493bb811f7d152075 04-Aug-2010 Ted Kremenek <kremenek@apple.com> Add CFGStmtMap, which defines a mapping from Stmt* to CFGBlock*. The immediate intended use is in the unreachable code analysis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGStmtMap.h
cc6cf891751fb70255436b252b16a52ef03f1738 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When chaining, only write interesting selectors to the PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
e58aa890e8de55bb3146e6ea9fbbba3a58ce30c6 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When chaining, only write interesting selectors to the PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
c91e4df8ec4e2ede28b49167cdf6257fe29798e4 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Store the IDs of selectors in the PCH file explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHWriter.h
5d05007b7a7883159154e3f65f338a2542d53913 04-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Store the IDs of selectors in the PCH file explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHWriter.h
032a73441a64b80e3afb55c58cd3690acc990357 04-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Add code-completion support directly to ASTUnit, which performs code
completion within the translation unit using the same command-line
arguments for parsing the translation unit. Eventually, we'll reuse
the precompiled preamble to improve code-completion performance, and
this also gives us a place to cache results.

Expose this function via the new libclang function
clang_codeCompleteAt(), which performs the code completion within a
CXTranslationUnit. The completion occurs in-process
(clang_codeCompletion() runs code completion out-of-process).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110210 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
1abc6bca3d7fb0e7b1e40fbcad6cfb5e10594548 04-Aug-2010 Douglas Gregor <dgregor@apple.com> Add code-completion support directly to ASTUnit, which performs code
completion within the translation unit using the same command-line
arguments for parsing the translation unit. Eventually, we'll reuse
the precompiled preamble to improve code-completion performance, and
this also gives us a place to cache results.

Expose this function via the new libclang function
clang_codeCompleteAt(), which performs the code completion within a
CXTranslationUnit. The completion occurs in-process
(clang_codeCompletion() runs code completion out-of-process).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110210 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Sema/CodeCompleteConsumer.h
27909cc5664dcb0d0dddc57d1557a0c50219921f 04-Aug-2010 Jordy Rose <jediknil@belkadan.com> Change the checker callback cache in GRExprEngine to be more compact (and IMHO a little easier to understand), and add the same sort of caching for EvalAssume (tied for least-used callback), mostly as proof-of-concept.

Before we go further with these, we should figure out a way to reuse the visit-and-cache code in CheckerVisit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
72905cfa81cfd126f322c4173f56d332aac5539e 04-Aug-2010 Jordy Rose <jediknil@belkadan.com> Change the checker callback cache in GRExprEngine to be more compact (and IMHO a little easier to understand), and add the same sort of caching for EvalAssume (tied for least-used callback), mostly as proof-of-concept.

Before we go further with these, we should figure out a way to reuse the visit-and-cache code in CheckerVisit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
dd3f873eb8e2a651ca775f2dbc72944bb5e55003 04-Aug-2010 Eric Christopher <echristo@apple.com> Accept and ignore (for now) -funroll-loops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
5fcefd965990899b9093656a5242be5a273d7135 04-Aug-2010 Eric Christopher <echristo@apple.com> Accept and ignore (for now) -funroll-loops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
01ccd68608704022514f7d2d138351dbc34677a0 04-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When we try (but fail) to build a precompiled preamble, wait for a
short "cooling off" period (defaulting to 5 reparses) before trying to
build a precompiled preamble again. Previously, if we failed to build
the precompiled preamble at any time, we just gave up the whole
charade any never tried again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
eababfbddb74d186f78783a9731a78ad371c9800 04-Aug-2010 Douglas Gregor <dgregor@apple.com> When we try (but fail) to build a precompiled preamble, wait for a
short "cooling off" period (defaulting to 5 reparses) before trying to
build a precompiled preamble again. Previously, if we failed to build
the precompiled preamble at any time, we just gave up the whole
charade any never tried again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
b73e6417560059c49cf5c5018a5606063661251c 04-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add more AVX 256-bit intrinsics and test cases for them

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
e898ed5f165e0e8cdc6b52115b41ecc3df63168c 04-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add more AVX 256-bit intrinsics and test cases for them

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
7ac0d594faf06d021ec6cf817ffa3c0903776167 04-Aug-2010 John McCall <rjmccall@apple.com> Look through using declarations when deciding whether to use an operator
delete for a virtual destructor. Diagnose ambiguities.

Fixes PR7803.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
046a7466f23107bd752d9a8106aada85061699bc 04-Aug-2010 John McCall <rjmccall@apple.com> Look through using declarations when deciding whether to use an operator
delete for a virtual destructor. Diagnose ambiguities.

Fixes PR7803.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7bf5f75ae18799018157d0c4bc3a48015e8a00f8 03-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Incomplete promotion of selector info to per-file data.
Store all selectors in the selector hash table instead of only those from the method pool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
059612dd3429cef2d61f11950f3d93a40182bf69 03-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Incomplete promotion of selector info to per-file data.
Store all selectors in the selector hash table instead of only those from the method pool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
eaf2382b16f01a328174d92be05a2e084895533a 03-Aug-2010 Nate Begeman <natebegeman@mac.com> Add support for VFP status & control operations for ARM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
99c40bb13b523d58d7aeb6446e4f486d6918ca58 03-Aug-2010 Nate Begeman <natebegeman@mac.com> Add support for VFP status & control operations for ARM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
589141c9b4e1217a56637085ed268f3304a0a148 03-Aug-2010 Jordy Rose <jediknil@belkadan.com> Remove DoneEvaluating field (unused since r90296)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
ac63193c3d8f0d56213978d4fe953ff902bbb48d 03-Aug-2010 Jordy Rose <jediknil@belkadan.com> Remove DoneEvaluating field (unused since r90296)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
f37bf35901ea20e399b85e721dbef0f6dd50b20c 03-Aug-2010 Jordy Rose <jediknil@belkadan.com> Makes GRState::makeWithStore private, to encourage clients to make store changes through GRState instead of directly accessing the StoreManager. Also adds cover methods for InvalidateRegion(s) and EnterStackFrame to GRState.

This is in preparation for proposed region change notifications. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
ff59efd65bb1f2f8d005079597f814a3c8381f95 03-Aug-2010 Jordy Rose <jediknil@belkadan.com> Makes GRState::makeWithStore private, to encourage clients to make store changes through GRState instead of directly accessing the StoreManager. Also adds cover methods for InvalidateRegion(s) and EnterStackFrame to GRState.

This is in preparation for proposed region change notifications. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
5f27c69b53e8789ea0094a2dae81c52ae3233823 03-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When using a precompiled preamble, keep track of the top-level
declarations that we saw when creating the precompiled preamble, and
provide those declarations in addition to the declarations parsed in
the main source file when traversing top-level declarations. This
makes the use of precompiled preambles a pure optimization, rather
than changing the semantics of the parsed translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHWriter.h
eb8837b88c18631c69ac75f64ab1853762063180 03-Aug-2010 Douglas Gregor <dgregor@apple.com> When using a precompiled preamble, keep track of the top-level
declarations that we saw when creating the precompiled preamble, and
provide those declarations in addition to the declarations parsed in
the main source file when traversing top-level declarations. This
makes the use of precompiled preambles a pure optimization, rather
than changing the semantics of the parsed translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHWriter.h
8562f1694038d5e0cc63fe2b2a7254ae1c1e7d1f 03-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Apart from storing/retrieving the previous redeclaration from PCH, also store/retrieve the most recent
redeclaration. That way we are sure that the full redeclarations chain is loaded.

When using chained PCHs, first declarations point to the most recent redeclarations in the same PCH.
To address this use a REDECLS_UPDATE_LATEST record block to keep track of which first declarations need
to point to a most recent redeclaration in another PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
a865005c74019184e04f7fcdd4d61c31c095a4ff 03-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Apart from storing/retrieving the previous redeclaration from PCH, also store/retrieve the most recent
redeclaration. That way we are sure that the full redeclarations chain is loaded.

When using chained PCHs, first declarations point to the most recent redeclarations in the same PCH.
To address this use a REDECLS_UPDATE_LATEST record block to keep track of which first declarations need
to point to a most recent redeclaration in another PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
12dbccb155e8caff5a983f7eb05f98a56214fecb 03-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce getMostRecentDeclaration() and getFirstDeclaration() for RedeclarableTemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
ba5ff8ccf3f2a4d8fa3e91b58733707fb1caed6b 03-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce getMostRecentDeclaration() and getFirstDeclaration() for RedeclarableTemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
1458cf7089a51cdadbf843725671a677d5fc73e5 03-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Reshuffle the PCH generator action and consumer, so that we can re-use
it while generating precompiled preambles. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/PCHWriter.h
1d715ac14bf440664fb0d1425ea882274f994f57 03-Aug-2010 Douglas Gregor <dgregor@apple.com> Reshuffle the PCH generator action and consumer, so that we can re-use
it while generating precompiled preambles. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/PCHWriter.h
e9009b7b0e056df027b5070d24122204cd9b8ce2 03-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> Allow offsets to be negative. Out-of-bound cases are checked elsewhere. We
shouldn't put restrictions in store manager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
e3273e78da4716f9c999ae207f6898f376a6e1a4 03-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> Allow offsets to be negative. Out-of-bound cases are checked elsewhere. We
shouldn't put restrictions in store manager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
c30d2caefb6e6a3da7e831dcafa2eaf1dbccfa96 03-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> Pull the region offset computation logic into a single method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
e888233f6b115d3b0dd73bcb5f35e93794408542 03-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> Pull the region offset computation logic into a single method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
34248a11276d5ad16106ee74c674120f4fe99000 03-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Support x86 AVX 256-bit instructions built-ins. Right now support all of them, but
as soon as we properly codegen the simple vector operations, remove the
unnecessary built-ins/intrinsics from clang and llvm. Also add tests for the new
built-ins



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
5ce946291c2c23ed71b112b2ba13acf11807e319 03-Aug-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Support x86 AVX 256-bit instructions built-ins. Right now support all of them, but
as soon as we properly codegen the simple vector operations, remove the
unnecessary built-ins/intrinsics from clang and llvm. Also add tests for the new
built-ins



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
055c7307763b1bd6122fffe1f8ab1437e05eda1b 03-Aug-2010 Tom Care <tcare@apple.com> Changed GRExprEngine to pass down a reference to itself when checkers are doing postanalysis. This allows the checker to gather information about the state of the engine when it has finished.
- Exposed the worklist and BlockAborted flag in GRCoreEngine
- Changed postanalysis checkers to use the new infrastructure


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
bc42c533e7d3d946704a49e242939dd232f33072 03-Aug-2010 Tom Care <tcare@apple.com> Changed GRExprEngine to pass down a reference to itself when checkers are doing postanalysis. This allows the checker to gather information about the state of the engine when it has finished.
- Exposed the worklist and BlockAborted flag in GRCoreEngine
- Changed postanalysis checkers to use the new infrastructure


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
cf96172b257a1c4ed57cc7d0c03dd5c247413214 03-Aug-2010 Ted Kremenek <kremenek@apple.com> Add -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static analysis) that doesn't prune CFG edges.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
9b823e8e1ccb8a2cb49923bad22a80ca96f41f92 03-Aug-2010 Ted Kremenek <kremenek@apple.com> Add -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static analysis) that doesn't prune CFG edges.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
1a433044ac870a2d9fc6d8d6979276a59be702cb 03-Aug-2010 Ted Kremenek <kremenek@apple.com> Add 'AnalysisContext::getUnoptimizedCFG()' to allow clients to get access to the original
CFG without any edges pruned out because of trivially solvable conditions (e.g., 'if (0)').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110085 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
ad5a894df1841698c824381b414630799adc26ca 03-Aug-2010 Ted Kremenek <kremenek@apple.com> Add 'AnalysisContext::getUnoptimizedCFG()' to allow clients to get access to the original
CFG without any edges pruned out because of trivially solvable conditions (e.g., 'if (0)').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110085 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/CFG.h
e92e36c8a596ce3805b94bbbeb2daf50a8209380 03-Aug-2010 John McCall <rjmccall@apple.com> Labels (and case statement) don't create independent scope parents for the
purposes of the jump checker. Also extend Ted's iteration fix to labels.

Fixes PR7789.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
97ba481f3f45e5b63b4a354bfb471ce146b7de57 03-Aug-2010 John McCall <rjmccall@apple.com> Labels (and case statement) don't create independent scope parents for the
purposes of the jump checker. Also extend Ted's iteration fix to labels.

Fixes PR7789.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d1fbcf83ba134e32a48362e4e8349ba86bf6409c 02-Aug-2010 John McCall <rjmccall@apple.com> Further adjustments to -Wglobal-constructors; works for references and direct
initializations now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4204f07fc8bffe6d320b2de95fea274ccf37a17b 02-Aug-2010 John McCall <rjmccall@apple.com> Further adjustments to -Wglobal-constructors; works for references and direct
initializations now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
751e91df279f335bb382e5e21b289cbe5eb9df7b 02-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When using a precompiled preamble, save the diagnostics produced when
creating the preamble and "replay" them when reusing the
preamble. Also, fix a thinko in the copying of the preamble when
building the precompiled preamble.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
c0659ec614c428c7d15746fcad15d50a2703751d 02-Aug-2010 Douglas Gregor <dgregor@apple.com> When using a precompiled preamble, save the diagnostics produced when
creating the preamble and "replay" them when reusing the
preamble. Also, fix a thinko in the copying of the preamble when
building the precompiled preamble.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
a5437a650cfeee303355437565b3f5e280b9e967 02-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Query only the latest version of an identifier in the PCH chain. Make sure this version holds the entire declaration chain. This is a much saner solution than trying to merge the info from all elements, and makes redeclarations work properly. Expand the declarations test case to cover more compliated cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
d8c5abb096a5f6babb3709180fe304be5462bcc1 02-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Query only the latest version of an identifier in the PCH chain. Make sure this version holds the entire declaration chain. This is a much saner solution than trying to merge the info from all elements, and makes redeclarations work properly. Expand the declarations test case to cover more compliated cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
295dcb357afc5f6215405709cba1498f14bd673d 02-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove mutable data on TagType and InjectedClassNameType, by instead walking the declaration chain in search of a definition. This is necessary for a sane chained PCH implementation. No observable performance change on Carbon.h syntax-only, and bootstraps cleanly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
ed48a8faa10b6750f334540711c7b3949bbfb3ae 02-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove mutable data on TagType and InjectedClassNameType, by instead walking the declaration chain in search of a definition. This is necessary for a sane chained PCH implementation. No observable performance change on Carbon.h syntax-only, and bootstraps cleanly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
f0c7ceae445cd42b10973203f299d38284139c47 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object
for use in reporting diagnostics.
- We don't want to use the Action's own CompilerInstance, because that is only
initialized during file processing and I like that invariant.

Also, if ParseArgs returns false then abandon execution.

Also, remove unused PluginASTAction::PrintHelp virtual method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
f56a488a6bdfe56ca814f37d384afa67c67f9dd5 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object
for use in reporting diagnostics.
- We don't want to use the Action's own CompilerInstance, because that is only
initialized during file processing and I like that invariant.

Also, if ParseArgs returns false then abandon execution.

Also, remove unused PluginASTAction::PrintHelp virtual method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
50d6091de574a80b79c48e832c5b072d1b0a1a88 02-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> You actually have to include a header in order to use a symbol, it's so 90s..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
9c1845dbed9817520f5a7db8bd80a560c6c6ae6b 02-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> You actually have to include a header in order to use a symbol, it's so 90s..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
9b41b7ba65c97b6f6e0d4c0edfaab5d260c69aaa 02-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Use llvm_unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
b81645fd2b34c8c1025854cb81546f4e14a34341 02-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use llvm_unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
88a69a56b7263754987811ddcebe9d456466dcc6 02-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Shut up warnings in Release build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
62db8889da980d899d99e4ece701f150563b70ed 02-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Shut up warnings in Release build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
738e778a32a604d13a3c9decbe36f7015bd41763 02-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr for them that will deserialize them when needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
76c38d385447b7acdff2d7e6b13fa8580e7174a7 02-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr for them that will deserialize them when needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
d8407fabf72c1067042ac595a5178d87dbe46379 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move HostInfo::lookupTypeForExtension to ToolChain::LookupTypeForExtension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
lang/Driver/ToolChain.h
4180011fb8cef06adec04d30486b1bf3b99aa8b8 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move HostInfo::lookupTypeForExtension to ToolChain::LookupTypeForExtension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
lang/Driver/ToolChain.h
785d916965baecbe9688fe047225d8e36608bdbe 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Give Build{Universal,}Actions access to the default host tool chain. I
avoided this originally to enforce that the driver actions aren't toolchain
dependent, but it isn't worth the cumbersone additional hostinfo split.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
74edcea3db1f85ba73ad0fede2ed5e2f096cac4b 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Give Build{Universal,}Actions access to the default host tool chain. I
avoided this originally to enforce that the driver actions aren't toolchain
dependent, but it isn't worth the cumbersone additional hostinfo split.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
bf8d5fdbb4d3d87051c8a414e367de410d111889 02-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> Improve flat store: MemRegion::getAsOffset() computes a region's offset within
the top-level object. FlatStore now can bind and retrieve element and field
regions.
PR7297 is fixed by flat store.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
7caf9b369cba6edaf6eac25121cbc65ee938f14d 02-Aug-2010 Zhongxing Xu <xuzhongxing@gmail.com> Improve flat store: MemRegion::getAsOffset() computes a region's offset within
the top-level object. FlatStore now can bind and retrieve element and field
regions.
PR7297 is fixed by flat store.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
75787c36bd9642688510f3e90193a617f4046135 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Compilation::addCommand and switch tools to using it, now that we
don't have to deal with nested jobs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Tool.h
2fe238ed293bd4bc27af9beb9fa151fad2146fa8 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Compilation::addCommand and switch tools to using it, now that we
don't have to deal with nested jobs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Tool.h
1be423ebf2e9213b96da34755de6583c35784119 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate PipedJob, which is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
d0b77e1a47580dd9fd621433e9ac41258837a17a 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate PipedJob, which is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
18d00e40b94ea02ba06011d79e8f8057dec7d066 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unnecessary tool hooks for whether they accept piped input/output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Tool.h
8c631e3b6fb4d838809852e85ba4145be45a221f 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unnecessary tool hooks for whether they accept piped input/output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Tool.h
113d7be6858755a3abf6c33c1089cf2bae7fe4e3 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
e4341253cc5d9c05c256b90eb3f816d256264ceb 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
75019278d0b4ad63b6be0f8775c7e6099cf99acc 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep track of a separate "install dir", which is the path where clang
was invoked from (which may not be where the executable itself is).
- This allows having e.g., /Developer/usr/bin/clang be a symlink to some other
location, while still making sure the Driver finds 'as', 'ld', etc. relative
to itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
edf29b00bc1641034b38be92146e15f0625a45d2 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep track of a separate "install dir", which is the path where clang
was invoked from (which may not be where the executable itself is).
- This allows having e.g., /Developer/usr/bin/clang be a symlink to some other
location, while still making sure the Driver finds 'as', 'ld', etc. relative
to itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
b59a623ae9a1f22cfa30a92c2cca645face971d8 01-Aug-2010 John McCall <rjmccall@apple.com> Kill off RequiresGlobalConstructor in favor of isConstantInitializer.
Note some obvious false positives in the test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b4b9b15c597a923a03ad0a33cdc49b67e5cc4450 01-Aug-2010 John McCall <rjmccall@apple.com> Kill off RequiresGlobalConstructor in favor of isConstantInitializer.
Note some obvious false positives in the test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6309a12671a1416f621a9162892836c2bb4cd981 01-Aug-2010 John McCall <rjmccall@apple.com> Make a first pass at implementing -Wglobal-constructors. I'm worried that this
will end up bizarrely mirroring CGExprConstant, but that might be the hazard of
this feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
626e96e2874698a6736fd33672fa9c28da91d77e 01-Aug-2010 John McCall <rjmccall@apple.com> Make a first pass at implementing -Wglobal-constructors. I'm worried that this
will end up bizarrely mirroring CGExprConstant, but that might be the hazard of
this feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
9861c3f20000ae518b9befc9e1ec7f3d1b89285e 01-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Iterate typeloc's for class bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
64a15230a9e0e030bd761c6848a5876354653ded 01-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Iterate typeloc's for class bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
9c78992b1cb237a37af66d2e6dc5c06d56c26793 31-Jul-2010 Daniel Dunbar <daniel@zuster.org> Parser: Add support for #pragma align, which is just another spelling of #pragma
options align.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
cbb98edd530787c2ac019e437e7c599df8004ba7 31-Jul-2010 Daniel Dunbar <daniel@zuster.org> Parser: Add support for #pragma align, which is just another spelling of #pragma
options align.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
49ce9b642327c1a3f94c38c0b5211daa14a54f48 31-Jul-2010 Ted Kremenek <kremenek@apple.com> After a lengthy design discussion, add support for "ownership attributes" for malloc/free checking. Patch by Andrew McGregor!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
dd0e490c24aeade2c59ca4cae171199f6af9f02e 31-Jul-2010 Ted Kremenek <kremenek@apple.com> After a lengthy design discussion, add support for "ownership attributes" for malloc/free checking. Patch by Andrew McGregor!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
6ccdbb83af9f43824191783b6842a9628f048e43 31-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Implement dependency analysis for the precompiled preamble. If any of
the files in the precompiled preamble have changed since it was build,
force the preamble to be rebuilt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
cc5888d833caf90ebda37f24da40d2cd06b4d820 31-Jul-2010 Douglas Gregor <dgregor@apple.com> Implement dependency analysis for the precompiled preamble. If any of
the files in the precompiled preamble have changed since it was build,
force the preamble to be rebuilt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
115479f12e541be79b31aaddefda8406d020d3e2 30-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Add some timers to ASTUnit that are only enabled when the LIBCLANG_TIMING environment variable is set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
385103b79c5338a2be5da0ca70652400bc267371 30-Jul-2010 Douglas Gregor <dgregor@apple.com> Add some timers to ASTUnit that are only enabled when the LIBCLANG_TIMING environment variable is set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
336780662f91ad9972776de6cd89775ecb0cabd9 30-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Add specialisation iterators for {Class,Function}TemplateDecl

This patch introduces the ClassTemplateDecl::spec_{begin,end}()
and FunctionTemplateDecl::{,partial_}spec_{begin,end}() member
functions as a public interface for iterating over the declarations'
specialisation sets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
9f339ba5b00256588d0d78786fff6d48ef073015 30-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Add specialisation iterators for {Class,Function}TemplateDecl

This patch introduces the ClassTemplateDecl::spec_{begin,end}()
and FunctionTemplateDecl::{,partial_}spec_{begin,end}() member
functions as a public interface for iterating over the declarations'
specialisation sets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
9f3208d05927f010d791201e0dc3224c16d1258f 30-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Refactor find*Specialization functions using SpecEntryTraits

This patch reimplements the find*Specialization family of member
functions of {Class,Function}TemplateDecl in terms of a common
implementation that uses SpecEntryTraits to obtain the most recent
declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
4048590d5774fd4b08661b5cf59b6f90b62f283a 30-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Refactor find*Specialization functions using SpecEntryTraits

This patch reimplements the find*Specialization family of member
functions of {Class,Function}TemplateDecl in terms of a common
implementation that uses SpecEntryTraits to obtain the most recent
declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
7fe3b516da063390ee7004ee6dbeeb553d519f5f 30-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Introduce RedeclarableTemplateDecl::SpecEntryTraits

SpecEntryTraits describes how to obtain the most recent declaration
of a specialisation from an entry in a specialisation FoldingSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
44dd0b440efdb37ff4c6e49f243faa3b0580b120 30-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Introduce RedeclarableTemplateDecl::SpecEntryTraits

SpecEntryTraits describes how to obtain the most recent declaration
of a specialisation from an entry in a specialisation FoldingSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
fc0b423215072e968754c113f1bb34ba4e08c6a4 30-Jul-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed typedef inside extern "C".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
35f9a196ef897b9559de25aaecd957208f0b4f59 30-Jul-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed typedef inside extern "C".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e836e2ffc74196e0bd61526cb2959092c291e3a2 30-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor the way PCHReader tracks whether we are in recursive loading.

-Replace CurrentlyLoadingTypeOrDecl with a counting scheme (NumCurrentElementsDeserializing)
-Provide outside access to the mechanism by adding methods StartedDeserializing/FinishedDeserializing
to ExternalASTSource.

These are preparation for the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
29ee3a273f58e16df7f2c524ab62a869e44fc9b1 30-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor the way PCHReader tracks whether we are in recursive loading.

-Replace CurrentlyLoadingTypeOrDecl with a counting scheme (NumCurrentElementsDeserializing)
-Provide outside access to the mechanism by adding methods StartedDeserializing/FinishedDeserializing
to ExternalASTSource.

These are preparation for the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
6227b1e56f35a4dae53d631d392a83ab8a75feef 30-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make macro weirdness in chained PCH work. This required changing the way PCHReader and PCHWriter are initialized to correctly pick up all initializer. On the upside, this means that there is far less repetition in the dependent PCH now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Basic/IdentifierTable.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
ffaab3e2bb13991bb3357e80f14bcae3745b2347 30-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make macro weirdness in chained PCH work. This required changing the way PCHReader and PCHWriter are initialized to correctly pick up all initializer. On the upside, this means that there is far less repetition in the dependent PCH now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Basic/IdentifierTable.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
9cf5f4e1f84f30c9d30a259516e22e60ce3738c7 30-Jul-2010 Ted Kremenek <kremenek@apple.com> Add clang_isPODType() for querying if the CXType is POD. Implements <rdar://problem/8250669>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109822 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3ce9e7d270e7df86c09c8126b4412d55be7c123b 30-Jul-2010 Ted Kremenek <kremenek@apple.com> Add clang_isPODType() for querying if the CXType is POD. Implements <rdar://problem/8250669>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109822 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
25242a5ea93028688a80ecd5981815efa349e9cb 30-Jul-2010 Nate Begeman <natebegeman@mac.com> Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
bb37f50c2d0d72e1fa5b349d5f6a11fdc5acb86e 30-Jul-2010 Nate Begeman <natebegeman@mac.com> Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
8fac2eb1ee050aaf6cab1fb5e944c2b20c5a8b7b 29-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Change the name to something less terrible; suggestion by Doug. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4ac7c0bb39696e92fd220118fedc484c09a69870 29-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change the name to something less terrible; suggestion by Doug. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1ac53087c7b810990070ff80e5953669d339c55d 29-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl
needs to be deserialized during PCH loading for codegen purposes.
Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext,
thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen.

This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Linkage.h
90e99a84ddd020e8fda79643748243725a2ed071 29-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl
needs to be deserialized during PCH loading for codegen purposes.
Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext,
thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen.

This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Linkage.h
2270043a9757abb52da0231d64d2914b51b3ca92 29-Jul-2010 Nate Begeman <natebegeman@mac.com> Add codegen support for ARM qadd & qsub intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
f6404774069a4759cab095b389ce007e74c9c9ee 29-Jul-2010 Nate Begeman <natebegeman@mac.com> Add codegen support for ARM qadd & qsub intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
057077941512583a3ca7ab136c4e1100295b666f 29-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Implement RedeclarableTemplateDecl::getNextRedeclaration

This patch uses the newly added Latest field of CommonBase to provide
a getNextRedeclaration() implementation for RedeclarableTemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
f88718ea0ca0d64b7fd31d109f1d9ec769a9c45f 29-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Implement RedeclarableTemplateDecl::getNextRedeclaration

This patch uses the newly added Latest field of CommonBase to provide
a getNextRedeclaration() implementation for RedeclarableTemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
48a788b3337f2e9299486bb1edb4dc1fe7dadd16 29-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Store latest redeclaration for each redeclarable template declaration

This patch adds a Latest field to RedeclarableTemplateDecl's CommonBase
class which is used to store the latest redeclaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
8a798a7f7d88dc9865fad7da648e5cef8580c65a 29-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Store latest redeclaration for each redeclarable template declaration

This patch adds a Latest field to RedeclarableTemplateDecl's CommonBase
class which is used to store the latest redeclaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
3a0ba0efc321d7b1ab3ab2b970b5645fd226a4e2 29-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Refactor redeclarable template declarations

This patch refactors much of the common code in ClassTemplateDecl and
FunctionTemplateDecl into a common base class RedeclarableTemplateDecl
together with support functions in a template class RedeclarableTemplate.

The patch also includes similar refactoring for these classes' PCH
reader and writer implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DeclNodes.td
9eabebafc165a67812eacc184806e7bf34c5f0a5 29-Jul-2010 Peter Collingbourne <peter@pcc.me.uk> Refactor redeclarable template declarations

This patch refactors much of the common code in ClassTemplateDecl and
FunctionTemplateDecl into a common base class RedeclarableTemplateDecl
together with support functions in a template class RedeclarableTemplate.

The patch also includes similar refactoring for these classes' PCH
reader and writer implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DeclNodes.td
5e8bf80a15e1d16cfb67c9776f743aabba28060e 29-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Allow a looser form of compatibility checking (which ignores
qualifiers) when checking a K&R function definition against a previous
prototype. Fixes <rdar://problem/8193107>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
447234dd459a00a5ed9b7c3e066162cd7a75bf2d 29-Jul-2010 Douglas Gregor <dgregor@apple.com> Allow a looser form of compatibility checking (which ignores
qualifiers) when checking a K&R function definition against a previous
prototype. Fixes <rdar://problem/8193107>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
76315f394707cf7a1f1627a36da37ae49458afa5 29-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> When deleting a value of class type, make sure that type is complete
before looking for conversions to pointer type. Fixes <rdar://problem/8248780>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
254a9427ff84d694724fdecd0642dad8ceaa0645 29-Jul-2010 Douglas Gregor <dgregor@apple.com> When deleting a value of class type, make sure that type is complete
before looking for conversions to pointer type. Fixes <rdar://problem/8248780>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
76ec5f7460d509249f67a2db99c6c1c8fea24654 29-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, size 1 in C++. Put this warning under -Wc++-compat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
0333296d142d45bf2723635848928815b7491f91 29-Jul-2010 Douglas Gregor <dgregor@apple.com> Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, size 1 in C++. Put this warning under -Wc++-compat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
aee48ed6b70faff5891bd004601e274ac5b1947b 29-Jul-2010 Eli Friedman <eli.friedman@gmail.com> PR7736: Make sure to mark &Class::Member correctly as being type-dependent
inside a template class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e8a126ba9a8a2f53098d388d04ec555b758f0c67 29-Jul-2010 Eli Friedman <eli.friedman@gmail.com> PR7736: Make sure to mark &Class::Member correctly as being type-dependent
inside a template class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2355b6819dee8b58c49131295f0560c8be59ccf7 28-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Make the pointer arguments to the __sync_* builtins pointers to
volatile-qualified types. Fixes <rdar://problem/8228293>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
c46111e821664fcdf54d07325a384570972e9cae 28-Jul-2010 Douglas Gregor <dgregor@apple.com> Make the pointer arguments to the __sync_* builtins pointers to
volatile-qualified types. Fixes <rdar://problem/8228293>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
d7765fb1c6f859e8d16f2fbce1055d52cb61fcf1 28-Jul-2010 Chris Lattner <sabre@nondot.org> accept and ignore a few more gcc warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
c3acb917e2a5fad73925e5371b4d831015cce2c3 28-Jul-2010 Chris Lattner <sabre@nondot.org> accept and ignore a few more gcc warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
e6e0ce5777de47a854d2723056c735dd00e32902 28-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Add proper callbacks for DeclStmt -- we weren't recursing on
the decls. This was just an oversight before; one we didn't
catch because lots of information in a DeclStmt was also being
traversed (redundantly) elsewhere.

Once DeclStmt was cleaned up, I could clean up some of the
redundant traversals found elswhere as well -- in particular,
traversing the declarations inside a function as part of the
function callback (instead of as part of the CompoundExpr
callback that constitutes the body of the function). The old
way was really weird, and led to some parts of local variable
declarations (but not all) being visited twice. That is now
resolved. I also was able to simplify the traversers for
IfStmt/WhileStmt/etc, which used to have redundant calls to
work around the fact DeclStmt wasn't working properly.

While in the area, I fixed up a few more recursion-ordering
issues. I try to hold to the principle that
RecursiveASTVisitor visits objects in the source code in the
same order they're typed. So the return-type of a variable
comes before the variable-name. This still isn't perfect, but
we're closer to that.

Reviewed by chandlerc and wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
be9aa9614f0f15f2182c9ac5c571a868263131ad 28-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Add proper callbacks for DeclStmt -- we weren't recursing on
the decls. This was just an oversight before; one we didn't
catch because lots of information in a DeclStmt was also being
traversed (redundantly) elsewhere.

Once DeclStmt was cleaned up, I could clean up some of the
redundant traversals found elswhere as well -- in particular,
traversing the declarations inside a function as part of the
function callback (instead of as part of the CompoundExpr
callback that constitutes the body of the function). The old
way was really weird, and led to some parts of local variable
declarations (but not all) being visited twice. That is now
resolved. I also was able to simplify the traversers for
IfStmt/WhileStmt/etc, which used to have redundant calls to
work around the fact DeclStmt wasn't working properly.

While in the area, I fixed up a few more recursion-ordering
issues. I try to hold to the principle that
RecursiveASTVisitor visits objects in the source code in the
same order they're typed. So the return-type of a variable
comes before the variable-name. This still isn't perfect, but
we're closer to that.

Reviewed by chandlerc and wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
1f989ddbd00c5f52b139304666e80176cc5e5819 28-Jul-2010 Daniel Dunbar <daniel@zuster.org> Rename -Wlogical-bitwise-confusion to -Wconstant-logical-operand, which strikes
me as more consistent and less pejorative.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5ec85c6db6f7ea98a32c3c588fd2beda72424198 28-Jul-2010 Daniel Dunbar <daniel@zuster.org> Rename -Wlogical-bitwise-confusion to -Wconstant-logical-operand, which strikes
me as more consistent and less pejorative.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b353ab6bba65e4fe90db593ff2fa6744182465a7 28-Jul-2010 Tom Care <tcare@apple.com> Extracted out some useful common functions in IdempotentOperationChecker to their own CheckerHelpers file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/CheckerHelpers.h
a9fbf5ba297d77a34d564055f1f05414e0224bf9 28-Jul-2010 Tom Care <tcare@apple.com> Extracted out some useful common functions in IdempotentOperationChecker to their own CheckerHelpers file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/CheckerHelpers.h
e442ccca49e07ee0bc13f1c3869a3e14a84792b4 28-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Record macros in dependent PCHs. Also add various info tables to dependent PCHs; tests for this to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
083abdf67f157e9d2ab5a8c9d5e71240479d3c99 28-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Record macros in dependent PCHs. Also add various info tables to dependent PCHs; tests for this to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
a915993c76603465b3def06980568a439b01be57 28-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Revert r109546, it broke linux build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/BackendUtil.h
a6d6af308bfc9b72467b432a045a9fc6673e3821 28-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r109546, it broke linux build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/BackendUtil.h
2720313679e66d9ef60cef891cedce6423348ac5 28-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also
needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes.
This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/BackendUtil.h
ee94e2d10728d1b6a87a11aeee122e8759f58c63 28-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also
needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes.
This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/BackendUtil.h
1aa70da577b47869abc66bc1b89b8b34ca7fd335 27-Jul-2010 Eric Christopher <echristo@apple.com> APIs that take different sized arguments than the instruction
should be taken out and shot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
60a52575782d8391c31ac0b0bde7df69ba2670a5 27-Jul-2010 Eric Christopher <echristo@apple.com> APIs that take different sized arguments than the instruction
should be taken out and shot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
3d3c84c1b7784df717859fd1b9524ab75de69b28 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Add non-static version of BinaryOperator::getOpcodeStr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a84c02d0f4d63975a1c52b9bb8308d88e9d79352 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Add non-static version of BinaryOperator::getOpcodeStr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9c1ce01fea4f9ad7401f4ba8ad6cc07960e8b71e 27-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update the list of lexical decls in the TU for chained PCHs. This makes -ast-print show the decls from the dependent PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
d692af71226d2fb537d86c670af96114ddd485c3 27-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update the list of lexical decls in the TU for chained PCHs. This makes -ast-print show the decls from the dependent PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
8765b545071328c6752d14cc000404fb86a4949c 27-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Fix use-after-free with precompiled preambles

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
28233428da1ebec20c893d6297ae3191318940dd 27-Jul-2010 Douglas Gregor <dgregor@apple.com> Fix use-after-free with precompiled preambles

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
017b4f655ede9fe69febc14fae4353f746ecb0cb 27-Jul-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert r109428 "Hoist argument type checking into CheckFormatHandler. This is prep for scanf format"

Got errors about ASTContext being undefined with Visual Studio 2010.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
96827eb52405a71c65c200949f3e644368e86454 27-Jul-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert r109428 "Hoist argument type checking into CheckFormatHandler. This is prep for scanf format"

Got errors about ASTContext being undefined with Visual Studio 2010.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
edc9f31f600f1798fd323450888a14ed7a82d6e4 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Add PTHLexer::LexEndOfFile() to emit diagnostics at end-of-file similar to those by Lexer::LexEndOfFile().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
94e3d1f0349634235606be77c08b3a48a6d563d6 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Add PTHLexer::LexEndOfFile() to emit diagnostics at end-of-file similar to those by Lexer::LexEndOfFile().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
a2910e54933557d063150c1871cb919d77ddc8e1 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Fix predicate in 'InCachingLexMode' to include 'CurPTHLexer'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
56eb1ec6e54080e47bbc62412737c25afb5211ed 27-Jul-2010 Ted Kremenek <kremenek@apple.com> Fix predicate in 'InCachingLexMode' to include 'CurPTHLexer'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0c0f4c87e5846ea10c13074b7cd298df0246a8e9 27-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Implement -fno-validate-pch at the -cc1 level, which suppresses most
of the usual consistency checks used to determine when a precompiled
header is incompatible with the translation unit it's being loaded
into.

Enable this option when loading a precompiled preamble, because the
preamble loader will be performing all of this checking itself. Enable
the preamble-based test now that it's working.

This option is also useful for debugging Clang's PCH
(<rdar://problem/7532213>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/PCHReader.h
lang/Frontend/PreprocessorOptions.h
fae3b2f4743dad616623c4df2fdb0f5128bd36d9 27-Jul-2010 Douglas Gregor <dgregor@apple.com> Implement -fno-validate-pch at the -cc1 level, which suppresses most
of the usual consistency checks used to determine when a precompiled
header is incompatible with the translation unit it's being loaded
into.

Enable this option when loading a precompiled preamble, because the
preamble loader will be performing all of this checking itself. Enable
the preamble-based test now that it's working.

This option is also useful for debugging Clang's PCH
(<rdar://problem/7532213>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/PCHReader.h
lang/Frontend/PreprocessorOptions.h
9ccff7c5d83a7c5465439c70de8543f13e72cdfd 27-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> - Fix recording of offsets of types in dependent PCHs.
- Stop reading in (and thus deserializing) every declaration in the TU when creating a dependent PCH.
- Switch the storage of a decl context's lexical declarations to a blob containing the IDs instead of a record. This is the only sane way of supporting update records later on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
681d7237e1014bf64dd5ead6bf74ae55cdd19e61 27-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> - Fix recording of offsets of types in dependent PCHs.
- Stop reading in (and thus deserializing) every declaration in the TU when creating a dependent PCH.
- Switch the storage of a decl context's lexical declarations to a blob containing the IDs instead of a record. This is the only sane way of supporting update records later on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
5a9d7455deb8580a2622feb92b31e9ff7297ed16 27-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Mark __builtin_eh_return as noreturn. Patch by Dimitry Andric.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
dee832c8958ca100c671881b6541fbb857a33592 27-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Mark __builtin_eh_return as noreturn. Patch by Dimitry Andric.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
923d0beb91543df63b166abaad9288a74dda8795 26-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce basic support for loading a precompiled preamble while
reparsing an ASTUnit. When saving a preamble, create a buffer larger
than the actual file we're working with but fill everything from the
end of the preamble to the end of the file with spaces (so the lexer
will quickly skip them). When we load the file, create a buffer of the
same size, filling it with the file and then spaces. Then, instruct
the lexer to start lexing after the preamble, therefore continuing the
parse from the spot where the preamble left off.

It's now possible to perform a simple preamble build + parse (+
reparse) with ASTUnit. However, one has to disable a bunch of checking
in the PCH reader to do so. That part isn't committed; it will likely
be handled with some other kind of flag (e.g., -fno-validate-pch).

As part of this, fix some issues with null termination of the memory
buffers created for the preamble; we were trying to explicitly
NULL-terminate them, even though they were also getting implicitly
NULL terminated, leading to excess warnings about NULL characters in
source files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/SourceManager.h
lang/Driver/CC1Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
f4f6c9db68465b886ec2e596feaa6ecc782395a4 26-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce basic support for loading a precompiled preamble while
reparsing an ASTUnit. When saving a preamble, create a buffer larger
than the actual file we're working with but fill everything from the
end of the preamble to the end of the file with spaces (so the lexer
will quickly skip them). When we load the file, create a buffer of the
same size, filling it with the file and then spaces. Then, instruct
the lexer to start lexing after the preamble, therefore continuing the
parse from the spot where the preamble left off.

It's now possible to perform a simple preamble build + parse (+
reparse) with ASTUnit. However, one has to disable a bunch of checking
in the PCH reader to do so. That part isn't committed; it will likely
be handled with some other kind of flag (e.g., -fno-validate-pch).

As part of this, fix some issues with null termination of the memory
buffers created for the preamble; we were trying to explicitly
NULL-terminate them, even though they were also getting implicitly
NULL terminated, leading to excess warnings about NULL characters in
source files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/SourceManager.h
lang/Driver/CC1Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
5089d4a591bffa4b39ee39080762dfb74578f878 26-Jul-2010 Dan Gohman <gohman@apple.com> It's not necessary to call flush() on a raw_ostream immediately prior
to deleting it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DocumentXML.h
55c6570bf6f4342203eb0ff0816fe28e6c55964a 26-Jul-2010 Dan Gohman <gohman@apple.com> It's not necessary to call flush() on a raw_ostream immediately prior
to deleting it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DocumentXML.h
5c5576bc9d26fc929291975b93761cfe978b31f1 26-Jul-2010 Ted Kremenek <kremenek@apple.com> Hoist argument type checking into CheckFormatHandler. This is prep for scanf format
string argument type checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
f762905bdefad77f91c7c6782a9c17e6b274d393 26-Jul-2010 Ted Kremenek <kremenek@apple.com> Hoist argument type checking into CheckFormatHandler. This is prep for scanf format
string argument type checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
b2e3e246d5d736b72f0bd1190324a1029b09ffba 26-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Add source location information to C++ base specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Frontend/PCHReader.h
5606220447c7901ba8d80147ddab893bb7949dd5 26-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Add source location information to C++ base specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Frontend/PCHReader.h
6986a7d4f77349849648a3a469cab4968c8271a3 26-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> When LIBCLANG_CODE_COMPLETION_LOGGING is set in the environment, log code-completion command lines to stderr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
3d398aa5c2be8919bbc0144bce611c48119bc861 26-Jul-2010 Douglas Gregor <dgregor@apple.com> When LIBCLANG_CODE_COMPLETION_LOGGING is set in the environment, log code-completion command lines to stderr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
ec0411dcec95d71321fd94a2c43124ba484ffb22 26-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the "minimal" and printing parser actions, which only ever
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
lang/Frontend/Utils.h
lang/Parse/Action.h
lang/Parse/Parser.h
87c300738174924453648c3b2d6f366c8284fac4 26-Jul-2010 Douglas Gregor <dgregor@apple.com> Eliminate the "minimal" and printing parser actions, which only ever
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
lang/Frontend/Utils.h
lang/Parse/Action.h
lang/Parse/Parser.h
df5e9452ddfbb6931fb474a70d658937fad749d3 25-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Wrap bit mangling logic for DiagMappings in its own class so it doesn't leak
into other code. Make it an array instead of a constant-length vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
3c2d3016adec79c81c4efff64e208fd3ecdd92ae 25-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Wrap bit mangling logic for DiagMappings in its own class so it doesn't leak
into other code. Make it an array instead of a constant-length vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
9176528dc9ca6e2be1e7c2f848989c1701ff854e 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Remove a bunch of trivial destructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
7cb6bd70f9436f630a508ba017414ca2466eeb35 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove a bunch of trivial destructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
d01fbaddde95f6c229661bf31c4532acbb22e945 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Move Type destructor out-of-line

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
afb6416bf7f04a00c44092e802f335bb3636489c 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Move Type destructor out-of-line

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
30f3bc42d4b61a386e52675b9c9af6c912aa1cd9 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Remove destructors from declaration nodes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
a2da780b325e78c6c6bbbb766459a73243c3cf9e 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove destructors from declaration nodes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
e0a25e956e2fbbaf666b975fd3947cd250c53285 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> I lied. Kill off a few more Destroy methods

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/DeclGroup.h
1de22a26c0e126b08edb2eda9d9091c021d96dc6 25-Jul-2010 Douglas Gregor <dgregor@apple.com> I lied. Kill off a few more Destroy methods

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/DeclGroup.h
4359888554d723e2c91fa470c0651044f771cc06 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Kill off the last Destroy method in the AST library

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
37db4db11b95e32d4ba205d9246c940025666f97 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Kill off the last Destroy method in the AST library

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
1994615488b9c729eb7c3c854a6d5e1c1ca78bde 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/FullExpr.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/Type.h
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/FullExpr.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/Type.h
dc44f37a59e789997989d105bd99501f3670f56f 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Make ASTContext always use the BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
63fe86bee66fc145942c56b2cc564ea0b9b9ea12 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Make ASTContext always use the BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b30280c7dd5af500e100e6e7418463ef03ba1a7d 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Start removing the use of smart pointers from the Parse/Sema
interaction, by effectively defaulting to
DISABLE_SMART_POINTERS. We're embracing the model where all AST nodes
are ASTContext-allocated and live as long as the ASTContext lives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Template.h
45ba9a1b31110568d0d362c8d31c6133cf9011b7 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Start removing the use of smart pointers from the Parse/Sema
interaction, by effectively defaulting to
DISABLE_SMART_POINTERS. We're embracing the model where all AST nodes
are ASTContext-allocated and live as long as the ASTContext lives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Template.h
ea9ab1c07f4256c8e7d6934edccb837070a3b61b 24-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Fix sort order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
5818f2280c145696cdb87afe7754c4ac9e4fb821 24-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Fix sort order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
9b6d8026553e199a41b41914960219b68872c7f7 24-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Once we've built (or reused) a precompiled preamble, create the
appropriately-padded main file buffer (that has spaces in the extra
"reserved" space) and thread that buffer through to the parsing
function. This still does nothing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
754f3490c5b0f5d83361f001bc87944f23644abb 24-Jul-2010 Douglas Gregor <dgregor@apple.com> Once we've built (or reused) a precompiled preamble, create the
appropriately-padded main file buffer (that has spaces in the extra
"reserved" space) and thread that buffer through to the parsing
function. This still does nothing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
b4a5c049da5e66d6f9214520fb5c00fe68b7289b 24-Jul-2010 John McCall <rjmccall@apple.com> Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.
Diagnose attempts to do this under the GNU or fragile NeXT runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5a180397870944548aaadeaebf58e415885b9489 24-Jul-2010 John McCall <rjmccall@apple.com> Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.
Diagnose attempts to do this under the GNU or fragile NeXT runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d1a8fdcbf69a8d6412b2afe5a796f871ab1fe7d 24-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Once we've built a precompiled preamble, keep track of the details of
that preamble (the preamble text, preamble file, reserved main file
size). Check these details when we try to rebuild the precompiled
preamble, and when nothing has changed, re-use the precompiled
preamble.

This code is still very much a WIP, and can't even properly be tested
because we have no way to use the precompiled preamble yet. "Trust me"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
175c4a9aa61f4449f27b729737e4438684ac6d92 24-Jul-2010 Douglas Gregor <dgregor@apple.com> Once we've built a precompiled preamble, keep track of the details of
that preamble (the preamble text, preamble file, reserved main file
size). Check these details when we try to rebuild the precompiled
preamble, and when nothing has changed, re-use the precompiled
preamble.

This code is still very much a WIP, and can't even properly be tested
because we have no way to use the precompiled preamble yet. "Trust me"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
8a7147e794521b8646609a08f4eb09949196e2af 24-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make declarations in the dependent PCH visible, for C at least.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
f2f0f03d08c6143137a79a8edffc7d41823bc3c7 24-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make declarations in the dependent PCH visible, for C at least.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
be2ba10d823d15fba129f64cfa8eafa3b25d9989 23-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> PCH read/write for selector reference pool.
Finishes off radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
320198303df7c16950d83ae79c3f702b84badcf7 23-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> PCH read/write for selector reference pool.
Finishes off radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
cf2ac95a17c32b792e6277b877100065312dd236 23-Jul-2010 Ted Kremenek <kremenek@apple.com> Dataflow solver: Don't overrwite the initial value of a block with top unless new values are available. Patch by Simone Pellegrini!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
cdd209dd9eb22a33cc9017f6605375fd17c9e809 23-Jul-2010 Ted Kremenek <kremenek@apple.com> Dataflow solver: Don't overrwite the initial value of a block with top unless new values are available. Patch by Simone Pellegrini!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
57cff32124cd5b95f3e1a5da12d3fff7e8892943 23-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.

Patch from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
f60946222721d9ba3c059563935c17b84703187a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.

Patch from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
0c0e5b95dcaecef99a208c18ba60179a819d682d 23-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Change arg type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
d5ef7b26f7e17bc147a549353decebed14797f83 23-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Change arg type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
0945d48d23a2bd41e0d02827b66d4d537df89aa4 23-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> AnalysisContext is not const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/GRCoreEngine.h
b73279120d67817156717a1625207ee1bbf41477 23-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> AnalysisContext is not const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/GRCoreEngine.h
05deb583e203ac91118d09b5adbbafef964ca566 23-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Basic plumbing for generating a precompiled preamble for an
ASTUnit/CXTranslationUnit. We can't actually use this preamble yet,
however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109202 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
44c181aec37789f25f6c15543c164416f72e562a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Basic plumbing for generating a precompiled preamble for an
ASTUnit/CXTranslationUnit. We can't actually use this preamble yet,
however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109202 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
f72c738a4eec22b6942d111856715a8f08a729e4 23-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Warn when property ivar lookup finds a global variable
of same name. In nonfragile-abi2, lookup accesses a synthesized
ivar. This is a transition warning. Radar 8225011.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
69d5624644dad6b5117f8fee8fc4b09427861367 23-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Warn when property ivar lookup finds a global variable
of same name. In nonfragile-abi2, lookup accesses a synthesized
ivar. This is a transition warning. Radar 8225011.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
6a150dcbcaa6edce3fe2f1f88b0ba039c9cfac03 23-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Thread bitstream cursors all the way through the AST reading stuff. This way, reading a trivial 2-element chained file actually works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
577d4796d358c0e72ebaa023113505226ab51b4f 23-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Thread bitstream cursors all the way through the AST reading stuff. This way, reading a trivial 2-element chained file actually works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
274ce276e7aecf25cdbca07c854422b237e38973 22-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Improve performance during cursor traversal when a region of interest
is present.

Rather than using clang_getCursorExtent(), which requires
us to lex the token at the ending position to determine its
length. Then, we'd be comparing [a, b) source ranges that cover the
characters in the range rather than the normal behavior for Clang's
source ranges, which covers the tokens in the range. However, relexing
causes us to read the source file (which may come from a precompiled
header), which is rather unfortunate and affects performance.

In the new scheme, we only use Clang-style source ranges that cover
the tokens in the range. At the entry points where this matters
(clang_annotateTokens, clang_getCursor), we make sure to move source
locations to the start of the token.

Addresses most of <rdar://problem/8049381>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
a8e5c5bdbe387b2552c1c23b828f54abcf085a40 22-Jul-2010 Douglas Gregor <dgregor@apple.com> Improve performance during cursor traversal when a region of interest
is present.

Rather than using clang_getCursorExtent(), which requires
us to lex the token at the ending position to determine its
length. Then, we'd be comparing [a, b) source ranges that cover the
characters in the range rather than the normal behavior for Clang's
source ranges, which covers the tokens in the range. However, relexing
causes us to read the source file (which may come from a precompiled
header), which is rather unfortunate and affects performance.

In the new scheme, we only use Clang-style source ranges that cover
the tokens in the range. At the entry points where this matters
(clang_annotateTokens, clang_getCursor), we make sure to move source
locations to the start of the token.

Addresses most of <rdar://problem/8049381>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
c3024bdaee612382a1eee67b77aff7a6450feaa6 22-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> atch for implementation of objective-c's -Wselector
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
3fe104154dd2e8ffb351142d74f308938b5c99bf 22-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> atch for implementation of objective-c's -Wselector
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
42eeeafedb7d13065b65773730813a81629e3e40 22-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Don't crash when an explicit template instantiation has no user-written
arguments. This happens in clang itself where template:

template <typename T> T const *getAs();

gets specialized with:

template<> inline clang::TypedefType const *getAs() { ... }

and there's no TemplateArgumentList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
44db3251aec7c0e6edaf1c70d7d53a272686791a 22-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Don't crash when an explicit template instantiation has no user-written
arguments. This happens in clang itself where template:

template <typename T> T const *getAs();

gets specialized with:

template<> inline clang::TypedefType const *getAs() { ... }

and there's no TemplateArgumentList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
00e0d42a069844ff6ef0afdfe25c29d31177057f 22-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Serialization is implemented, fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
5f3dbf5bbc5cb6e3d9273e5b6e82baa14cbd999c 22-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Serialization is implemented, fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
fe518bd1efb8e68767c0d55220996f6b325ee42f 22-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write C++0x static_assert for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0d396896998685809bda7444d772bbeb5bbe9b46 22-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write C++0x static_assert for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8e781090dd2d0dd492b7a0a1b2dc75e645bb3a65 22-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading declcontext information from any file in the chain. Properly write source locations to dependent files. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
0fa7d0b15ea2a224bfe43ac745d411f915da87dd 22-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading declcontext information from any file in the chain. Properly write source locations to dependent files. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
994e5a2fd3895964e9d2109dac1318c0afbdb490 22-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write FriendTemplateDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
554e6aa2da082575514607c3639c246c04b3232a 22-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write FriendTemplateDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
33a4d62010b996b75c4a7f2f8dff9acbdf258cc5 22-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support C++ try/catch statements for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
lang/Frontend/PCHBitCodes.h
7cb45e37b6f924d9ddbc53ac023bbaadb4ca3534 22-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support C++ try/catch statements for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
lang/Frontend/PCHBitCodes.h
d939d138f427a814bd102e1383429e19795d1cc9 22-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Make a bunch of new data structures for the new analysis
engine of the new translation unit. State marshal is there but no real
work is done. End nodes are passed back.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Index/TranslationUnit.h
2ce43c8f43254a9edea53a20dc0e69195bc82ae0 22-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Make a bunch of new data structures for the new analysis
engine of the new translation unit. State marshal is there but no real
work is done. End nodes are passed back.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Index/TranslationUnit.h
95afc56e2c030dbee39a8823fe2f0848b0968638 22-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading macros from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
d27d3fc2f1c02e77f43e1af43ed5386474e3d56e 22-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading macros from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
175234c1d796055b82668672bc957efd252558a3 21-Jul-2010 Ted Kremenek <kremenek@apple.com> Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's behavior. Note that
GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now
Clang's behavior is more strict in this case, but more consistent. We will need to see how much
this fires on real code and determine whether this case should be downgraded to a warning.

Fixes <rdar://problem/8213093>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
042411cc447f9b120086a6e4650583044f66fd12 21-Jul-2010 Ted Kremenek <kremenek@apple.com> Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's behavior. Note that
GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now
Clang's behavior is more strict in this case, but more consistent. We will need to see how much
this fires on real code and determine whether this case should be downgraded to a warning.

Fixes <rdar://problem/8213093>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
33a9fdd3e6ab60906e036d79a659956bce5fd24f 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote some macro-related stuff to per-file data. Fix a cache-inefficient nested loop by inverting the nesting. Store the size of each file in the chain; will need this later for statement offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
04e6fd4a5ceded0a442a6b3e6b87057b9d643fe3 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote some macro-related stuff to per-file data. Fix a cache-inefficient nested loop by inverting the nesting. Store the size of each file in the chain; will need this later for statement offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
562ce1ccc44b99fd47da5093e9d9f4b3bf9318c6 21-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new C API function, clang_parseTranslationUnit(), which
will eventually replace
clang_createTranslationUnitFromSourceFile(). The only addition in
clang_parseTranslationUnit() is a set of flags that can control how
the translation unit is loaded. More interesting flags will be coming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109027 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5a43021ac491bf091494167127772a20d9a9bb48 21-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new C API function, clang_parseTranslationUnit(), which
will eventually replace
clang_createTranslationUnitFromSourceFile(). The only addition in
clang_parseTranslationUnit() is a set of flags that can control how
the translation unit is loaded. More interesting flags will be coming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109027 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4d2ea1261c54aceac468c4ce23c13372c8659a72 21-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move some methods inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
e492340cc90eb92fc40e9e99645f19ed64640333 21-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move some methods inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
fd422e6372ed50a66cb48278622015b2be7fa3cc 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Apparently not every system thinks that references in pairs are as cool as I think.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
971dd4498f1118abd12e001add0df06e97669b61 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Apparently not every system thinks that references in pairs are as cool as I think.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
0486cef036a7ab29b46ada65da13e80f348813e1 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading declarations from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
cb526aa1184d2aa19bbfdfb1080f1fc87d9bb711 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading declarations from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
bfc599b2a8a8c5ece3f41a0b14281bb9e12d93fd 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading types from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
aaec0aa844781dc7c3462ba140e004e589ccd355 21-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading types from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
9a959363391bcd367004cfae81d293f31ec68b9e 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading source locations from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/PCHReader.h
190faf7c30890479925193b074571e5dc30c3f53 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Allow loading source locations from any file in the chain. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/PCHReader.h
34d8fd40385964a903e1a311dd8956f46944b9e5 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> More work on getting PCHReader to handle multiple files. Promote SLocOffsets to per-file data. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
518d8cb31d26ea098eba79274abbfae1b4976853 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> More work on getting PCHReader to handle multiple files. Promote SLocOffsets to per-file data. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
24cd40c4d68f72d4c2d96358cc3d0e6833b2c1ee 20-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new lexer function to compute the "preamble" of a file,
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
lang/Lex/Lexer.h
f033f1da4a34f8df6e95e9929dc04ff54bb8fb01 20-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new lexer function to compute the "preamble" of a file,
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
lang/Lex/Lexer.h
519fdb3b0eaca62058326f846d2e61be89c7dc67 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Move 'hasValidLengthModifier' from PrintfFormatSpecifier to FormatSpecifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
a412a499162c46211c10ad92045b9b5fd2298ede 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Move 'hasValidLengthModifier' from PrintfFormatSpecifier to FormatSpecifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
31a6a431c2c92e42328bd2dcfa0153f324b316a1 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Refactor ScanfConversionSpecifier to subclass ConversionSpecifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
cfdcd3066521ee0fa9f303f3863c726943db37e5 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Refactor ScanfConversionSpecifier to subclass ConversionSpecifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
f00ee7a76eb78ada4a0654e029f750c2baf5475b 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Add 'ConversionSpecifier' root class in 'analyze_format_string' namespace and
derived 'PrintfConversionSpecifier' from this class. We will do the same for
'ScanfConversionSpecifier'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
6ecb950c65329f8d6ce9ad0514632df35a5ab61f 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Add 'ConversionSpecifier' root class in 'analyze_format_string' namespace and
derived 'PrintfConversionSpecifier' from this class. We will do the same for
'ScanfConversionSpecifier'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
dae90b3a3896ba3bd8fa035381f1ae34770f0c56 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Tidy up analyze_printf::ConversionSpecifier::Kind declaration, prepping it to be merged
with analyze_scanf::ConversionSpecifier::Kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
2da5036adaef57395270ef2dd82358fc513d8616 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Tidy up analyze_printf::ConversionSpecifier::Kind declaration, prepping it to be merged
with analyze_scanf::ConversionSpecifier::Kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
241ab84357731064d6e05b7f4354d3daa6895b5f 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'UnicodeStrArg' to 'SArg'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
de183a48dd8fcff5e0343e84c8a6b563088447ce 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'UnicodeStrArg' to 'SArg'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
2723632e84df3e0fb87ef1bac6b2a7473198d3a2 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'ConsumedSoFarArg' -> 'nArg' and 'OutIntPtrArg' to 'nArg' (scanf and printf checking).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
35d353b47bce29200b910371dd9b8ba7f3058ab8 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'ConsumedSoFarArg' -> 'nArg' and 'OutIntPtrArg' to 'nArg' (scanf and printf checking).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
4cdb4a77223d5c955a0e654040748b365d35da34 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'VoidPtrArg' to 'pArg' in printf/scanf checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
66932056da99d2441e27c10b27c82706671e1dbf 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'VoidPtrArg' to 'pArg' in printf/scanf checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
c57babfe0db30eae833eeaf134596834c692c55a 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'CStrArg' to 'sArg' for printf checking to match with the analagous enum for scanf checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
99196b1031d37d37f395a3291ccdd12a3fc01242 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename 'CStrArg' to 'sArg' for printf checking to match with the analagous enum for scanf checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
d913dcc0b884633d7c0a205e6c7eeb633dc9d2fc 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename analyze_printf::ConversionSpecifier::IntAsCharArg to 'cArg' to match
analagous enum in analyze_scanf. This is prep for refactoring the logic for handling
ConversionSpecifiers for both scanf and printf.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
92a6febe130dd9ad726983835297e11b2fa3b93f 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename analyze_printf::ConversionSpecifier::IntAsCharArg to 'cArg' to match
analagous enum in analyze_scanf. This is prep for refactoring the logic for handling
ConversionSpecifiers for both scanf and printf.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
6edf7abf47fecf9caa524da33bb19eb0c3d6cebb 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename diagnostic so that it can be reused with scanf checking. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
649aecf55670682efb2a04a85810eef4d038c527 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Rename diagnostic so that it can be reused with scanf checking. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4f7082e6b3397ab8daac60d858e856380a02e9b0 20-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Complain when string literals are too long for the active language
standard's minimum requirements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
427c492d368d6ecf409fa8053eecb5cd0e779c5b 20-Jul-2010 Douglas Gregor <dgregor@apple.com> Complain when string literals are too long for the active language
standard's minimum requirements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
5416a2ad2fd6ad18846b9c2f6122ae0d417e24dd 20-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce
FunctionTemplateDecl::findSpecialization.

Redeclarations of specializations will not cause the previous decl to be removed from the set,
the set will keep the canonical decl. findSpecialization will return the most recent redeclaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
2c853e401ca406d417eb916e867226050e7be06b 20-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Hide FunctionTemplateDecl's specializations folding set as implementation detail and introduce
FunctionTemplateDecl::findSpecialization.

Redeclarations of specializations will not cause the previous decl to be removed from the set,
the set will keep the canonical decl. findSpecialization will return the most recent redeclaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
7b659e613e7fe157ad5202cab1c972e64b4f357e 20-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Hide the specializations folding sets of ClassTemplateDecl as an implementation detail (InsertPos
leaks though) and add methods to its interface for adding/finding specializations.

Simplifies its users a bit and we no longer need to replace specializations in the folding set with
their redeclarations. We just return the most recent redeclarations.

As a bonus, it fixes http://llvm.org/PR7670.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
cc0b1bc979b650a8a8b34b2032a074fd7724a90d 20-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Hide the specializations folding sets of ClassTemplateDecl as an implementation detail (InsertPos
leaks though) and add methods to its interface for adding/finding specializations.

Simplifies its users a bit and we no longer need to replace specializations in the folding set with
their redeclarations. We just return the most recent redeclarations.

As a bonus, it fixes http://llvm.org/PR7670.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
b6a63d985f95bf8ae60f50b2f21fcdb0a08918dc 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Constify all references to Stmt* and CFGBlock* in libChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/SVals.h
03509aea098772644bf4662dc1c88634818ceecc 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Constify all references to Stmt* and CFGBlock* in libChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/SVals.h
0ef2f3e3224799d511aa896b329e4aba2c528bf8 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add const iterator to InitListExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8111a6150cb68a238d55a31f9f4f90869a43f988 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add const iterator to InitListExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a7a77ab274626a371e240b9e49c9231bdb7df092 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update ImplicitCastExpr to be able to represent an XValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
906082edf2aea1c6de2926f93a8d7121e49d2a54 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update ImplicitCastExpr to be able to represent an XValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bf8aa8ae94ea69c22cc14c5a4036c7efca07b79b 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Constify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
3992a50eea030a2913f1d267554f55ecd00d694c 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Constify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
3a54c8a4bfd5c44a11ca530e2183d89ea47628a1 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
a02d893f15d4663bdba3bd92ade10070bf0510e4 20-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
dea602e97a01fd130399c3a750dc53a79d205591 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove PCHReader::getStream(), it was unused. Inline PCHReader::getDelsCursor() into its sole caller and remove it. This reduces the attack surface of multiple PCH files towards code outside the PCH implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
2f82c5855eb93bc8467cefdb87a39167f4f53575 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Remove PCHReader::getStream(), it was unused. Inline PCHReader::getDelsCursor() into its sole caller and remove it. This reduces the attack surface of multiple PCH files towards code outside the PCH implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
b2a6c4f5c08ad62942bcb0a644965e5e12af086e 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote IdentifierOffsets to per-file data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
2da08f9d8dff5f2a0ffb0cef72db80f03900a2cf 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote IdentifierOffsets to per-file data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
cbe067facaa11ed67cd63550729f8962bf4cd751 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote DeclOffsets and TypeOffsets to per-file data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
12d6da0675fa7df09e3f078995774b350e3a4652 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote DeclOffsets and TypeOffsets to per-file data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
20d9229f0e4c4f374f1ef39c1076f35525f79bbb 20-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to type match comparing Objective-C Classes which implement
protocols (Radar 8191774).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a8f8dac6a29f6d33474a38a32ce9dd859b696da9 20-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to type match comparing Objective-C Classes which implement
protocols (Radar 8191774).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a7ad0ee1f662489139e26ac9680a50dbb42b6ea7 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Don't warn when a '%%' or '%*d' (scanf) is used in a format string with positional arguments, since
these don't actually consume an argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
baa400654bd6f8396f9a07188445ae7955b060a3 20-Jul-2010 Ted Kremenek <kremenek@apple.com> Don't warn when a '%%' or '%*d' (scanf) is used in a format string with positional arguments, since
these don't actually consume an argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
c8ce3346d45378ed47546672a86c1bf47e87802e 19-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new libclang API, clang_reparseTranslationUnit(), which
reparses an already-parsed translation unit. At the moment it's just a
convenience function, but we hope to use it for performance
optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108756 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
abc563f554951259bbe0315055cad92ee14d87e4 19-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API, clang_reparseTranslationUnit(), which
reparses an already-parsed translation unit. At the moment it's just a
convenience function, but we hope to use it for performance
optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108756 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
6692735282aa26ce46e96d61ce61f27a0f43507f 19-Jul-2010 Ted Kremenek <kremenek@apple.com> Hook up 'invalid conversion' warning for scanf format strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c09b6a59e02ae265fce51b8c11e2a045bcdaa888 19-Jul-2010 Ted Kremenek <kremenek@apple.com> Hook up 'invalid conversion' warning for scanf format strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
012d398f3b451e075acb13a766a44c4ce52aee68 19-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote the identifier table to per-file data. Also, if a CHAINED_METADATA record exists, it has to be the first thing in the PCH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
93fb9ed05655512cb14022c667058c078ca90b3c 19-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Promote the identifier table to per-file data. Also, if a CHAINED_METADATA record exists, it has to be the first thing in the PCH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
79383c05cad20dc19a2a514082fd63f2f247cf52 19-Jul-2010 Ted Kremenek <kremenek@apple.com> Put warnings in the 'Deprecated' group into a 'Deprecations' DiagCategory. Fixes <rdar://problem/8203182>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
1348af6b06aff25a25b42d7dcc9b8438d975cca9 19-Jul-2010 Ted Kremenek <kremenek@apple.com> Put warnings in the 'Deprecated' group into a 'Deprecations' DiagCategory. Fixes <rdar://problem/8203182>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
9dc93a8313ed7ce078999fde2eae684bbaafb31d 19-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Remove unused location-to-AST-node resolver. libclang's implementation supercedes it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Utils.h
9a90d79eb496d9549e22104b2b006dfd43918183 19-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove unused location-to-AST-node resolver. libclang's implementation supercedes it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Utils.h
0791d5ddfa5092cfaca6abe0f58d0b8ad50c4de9 19-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix http://llvm.org/PR7660

A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext,
in which case isStaticDataMember() will erroneously return true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e3041be307d4c133605544a74f40c42c7531b5bb 19-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix http://llvm.org/PR7660

A ParmVarDecl instantiated from a FunctionProtoType may have Record as DeclContext,
in which case isStaticDataMember() will erroneously return true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
659445f0024e1aa1967a042a493e14da3ef31fd0 19-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Reapply r108617.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
c6238d2786cfd961b94580b3d3675a1b3ff0721c 19-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Reapply r108617.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
219f777d069dc9f1da85dd831ddc4e90f4de72fa 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change the driver to take the path to the main executable, instead of
taking it in pieces.
- Fixes a problem where the Clang executable path was not initialized properly
on Win32, because sys::Path::getBasename() doesn't do what I always think it
does. Imagine that, a sys::Path interface that is confusing!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
0bbad519aa068206f1e158d5073f72a39fbe83c5 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change the driver to take the path to the main executable, instead of
taking it in pieces.
- Fixes a problem where the Clang executable path was not initialized properly
on Win32, because sys::Path::getBasename() doesn't do what I always think it
does. Imagine that, a sys::Path interface that is confusing!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
8eef82cc37356a4ce63614fc252722981cd0aba8 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix a possible use after free.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
a001c1ce5fcb669624a5b8e50d0a629d673da901 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix a possible use after free.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
c83beaf6cf4f71981e326fb93d702dfbf4cf0777 18-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Revert -Wdiscard-qual typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
59f1ed2836ae0dbdade5579323c58ec229bb9453 18-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert -Wdiscard-qual typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
b05de1e40a134b5f47a224577e189dca3872f423 17-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Check for casts to an incomplete type in C. Improves diagnostics for cast to
incomplete union (PR5692) and incomplete enum, and fixes obscure
accepts-invalid on cast to incomplete struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d438087bd7120990663e4df78a9c9fdb02c5209 17-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Check for casts to an incomplete type in C. Improves diagnostics for cast to
incomplete union (PR5692) and incomplete enum, and fixes obscure
accepts-invalid on cast to incomplete struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f80e489a72ca033e1ac2774d2632cdeb23e36ece 17-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Added PCH/ASTImporter code for ObjCIvarDecl's field.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ac0021ba802e193e0f9f8207768c7862c7603bc0 17-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Added PCH/ASTImporter code for ObjCIvarDecl's field.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
67cdc7bd9a53d7fd7d72310e2b169eba5f89fb6f 17-Jul-2010 Chris Lattner <sabre@nondot.org> Add another terrible VC++ compatibility hack: allow users to
allow invalid token pastes (when in -fms-extensions mode)
with -Wno-invalid-token-paste


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
920bf45bd739334c25633ec9a29d903cab50be23 17-Jul-2010 Chris Lattner <sabre@nondot.org> Add another terrible VC++ compatibility hack: allow users to
allow invalid token pastes (when in -fms-extensions mode)
with -Wno-invalid-token-paste


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
388ee29bc6adf36fc7ee5ca14061aa482e896d29 17-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Revert r108617, it broke the build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
ee30965ce96e0a7b04b1aa16df60e9ba8b0a33c9 17-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Revert r108617, it broke the build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
924234001ccf7b7d50f80519301596935c74aaaf 17-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Prepare the analyzer for the callee in another translation unit:
Let AnalysisContext contain a TranslationUnit.
Let CallEnter refer to an AnalysisContext instead of a FunctionDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
69b81941aa4211ba6b8eaa89093f9e45aff81392 17-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Prepare the analyzer for the callee in another translation unit:
Let AnalysisContext contain a TranslationUnit.
Let CallEnter refer to an AnalysisContext instead of a FunctionDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/GRCoreEngine.h
630a33b8918966620dfc5ced0f9ef17eab76ec94 17-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to synthesize property ivars on demand as
part of the new property synthesis by default.
wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ad51e74030a59a8aa4ef0ebca1d7a701602ef53b 17-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to synthesize property ivars on demand as
part of the new property synthesis by default.
wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
c3bf73de9094c00b7b1f5c02f5b275f151ce7ef2 17-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Teach the PCH reader to load the dependency when encountering a chain metadata record. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
fbd4bf16341c1b23181c829ef2630d9a643e793c 17-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Teach the PCH reader to load the dependency when encountering a chain metadata record. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
cce0a02c5880fe916df1e05883bef2deee5e4f03 16-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix typeid the same way I fixed sizeof. Sad I had missed it before.

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108557 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
27de0f2cb3e8c26c37f31e61929b0e442c809ca5 16-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix typeid the same way I fixed sizeof. Sad I had missed it before.

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108557 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
1d8377095938b3b28253f093ace5b14b1a04626c 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Remove unicode quotes characters that somehow made it into a recent commit of mine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bb09d1e7b2ce1d59e571397e8300d9e18cba8456 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Remove unicode quotes characters that somehow made it into a recent commit of mine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e6a0e5758438f5c53d9385967995845e91537401 16-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Separate out the initial loading of a PCH so that loading chained PCHs can reuse it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
cdf3b83617a3e2471d592795622561506af9109e 16-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Separate out the initial loading of a PCH so that loading chained PCHs can reuse it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
2ef327113881d21ba9dfe6fa4dea0d560015a553 16-Jul-2010 Tom Care <tcare@apple.com> Improved false positive rate for the idempotent operations checker and moved it into the default path-sensitive analysis options.
- Added checks for static local variables, self assigned parameters, and truncating/extending self assignments
- Removed command line option (now default with --analyze)
- Updated test cases to pass with idempotent operation warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
df4ca423ec7d9b62842e112d1b824faa08b64810 16-Jul-2010 Tom Care <tcare@apple.com> Improved false positive rate for the idempotent operations checker and moved it into the default path-sensitive analysis options.
- Added checks for static local variables, self assigned parameters, and truncating/extending self assignments
- Removed command line option (now default with --analyze)
- Updated test cases to pass with idempotent operation warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
77337113e1dc8f07088c3bbbd89c58707afbed38 16-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Give the 'self/array-comparison is always true/false' warning a new flag,
"-Wtautological-compare".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
35dda71933d2e71b7a865b6ba41cf703e8b99c56 16-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Give the 'self/array-comparison is always true/false' warning a new flag,
"-Wtautological-compare".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
71b86be7f07080a3f6acd8e08647813bde2d2a3b 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Hook up warning for an incomplete scanlist in scanf format strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b7c21018ec1049580cf6df88db09e606550a7baa 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Hook up warning for an incomplete scanlist in scanf format strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
40fed7bbc2d79cb2acb6bcfeea290d94b7902f9d 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Tweak zero-field width in scanf format string diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
32d0900b21505284287864267332dbff1f646868 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Tweak zero-field width in scanf format string diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
79468dc5067ac2f8f762224af0984c45ad8c5ce9 16-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> First baby steps towards PCHReader being able to keep track of multiple PCH files. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
9137a5230d3164b96beb14ffb87863234b7d240f 16-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> First baby steps towards PCHReader being able to keep track of multiple PCH files. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
2f4309942a437b2d7f4e25c0276c699ac2a327fa 16-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Make this destructor virtual to placate GCC's warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
1cbb50a8a9a4fe09ff43479236e89cab9ac3df17 16-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Make this destructor virtual to placate GCC's warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
3c0adc6f057f341a2ec784f63487dcf5bb324347 16-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix up some of the visiting for array types -- we weren't good about
getting array indices before -- and for some of the builtin operators:
sizeof, offsetof, unaryops like __is_enum.

Also fix the function visitor to visit exception types in function
parameters.

Reviewed by wan and chandlerc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
cf4679e60a5c5fa13e4bfe69f8186658c828af49 16-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix up some of the visiting for array types -- we weren't good about
getting array indices before -- and for some of the builtin operators:
sizeof, offsetof, unaryops like __is_enum.

Also fix the function visitor to visit exception types in function
parameters.

Reviewed by wan and chandlerc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
11b4daa8a1511ec6bc209a56de19750d2b316ce0 16-Jul-2010 John McCall <rjmccall@apple.com> Initialize a couple of fields inherited for our private use.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
31eb18c11d9dacdc0a500a35b269a81134207b84 16-Jul-2010 John McCall <rjmccall@apple.com> Initialize a couple of fields inherited for our private use.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4dfaa12aafc5b7cea1f53ecfcb28c1d6bb278645 16-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add a little more data to chained PCHs. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHWriter.h
1476ed40ef6ef144937821da888c7e4d9ea0acd7 16-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add a little more data to chained PCHs. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHWriter.h
d5004ca6ba5e3d2b2c9f8e22a89e1c32bdc884c0 16-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Revert Microsoft-specific override of the "typedef requires a name"
diagnostic. Instead, put it and the "declaration does not declare
anything" warning into -Wmissing-declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
a0ebd60bfda56c161a87adb01f1b9a1d0e7ae32f 16-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert Microsoft-specific override of the "typedef requires a name"
diagnostic. Instead, put it and the "declaration does not declare
anything" warning into -Wmissing-declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
770088a007f7aeb684a17e6cc8295f13c4a18a7c 16-Jul-2010 John McCall <rjmccall@apple.com> Treat template parameters as part of the declaration-specifiers for the
purpose of access control. Fixes PR7644.

I can't actually find anything directly justifying this, but it seems obvious.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
c9068d7dd94d439cec66c421115d15303e481025 16-Jul-2010 John McCall <rjmccall@apple.com> Treat template parameters as part of the declaration-specifiers for the
purpose of access control. Fixes PR7644.

I can't actually find anything directly justifying this, but it seems obvious.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a8d6a84b244ddf886c093237ccd07424afbbdb80 16-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Make this grossness default to the error it should always be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
34fa29485d6e0b22f1f32852f34e483db0f90b0d 16-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Make this grossness default to the error it should always be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
da8cb2a9f4d91af40f09a967e73a6e5769fb938a 16-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
b21fc4a4c17fdf7d3de4fd3cd36a1ad4d8af6f55 16-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
ffd394a182427b2727f0a4002da939e629e12006 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Add most of the boilerplate support for scanf format string checking. This includes
handling the parsing of scanf format strings and hooking the checking into Sema.
Most of this checking logic piggybacks on what was already there for checking printf format
strings, but the checking logic has been refactored to support both.

What is left to be done is to support argument type checking in format strings and of course
fix the usual tail of bugs that will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
826a3457f737f1fc45a22954fd1bfde38160c165 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Add most of the boilerplate support for scanf format string checking. This includes
handling the parsing of scanf format strings and hooking the checking into Sema.
Most of this checking logic piggybacks on what was already there for checking printf format
strings, but the checking logic has been refactored to support both.

What is left to be done is to support argument type checking in format strings and of course
fix the usual tail of bugs that will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/FormatString.h
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
3e57483debad96ec894bb53d856df066f89089a3 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Add builtin definition for scanf, including extending the builtin encoding to
represent builtins that have the "scanf" attribution (via the format attribute) just
like we do with printf functions. Follow-up work is needed to add similar support
for fscanf et al.

This is to support format-string checking for scanf functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
bee05c1206dcd525e0a1f066d166ad3e972a500e 16-Jul-2010 Ted Kremenek <kremenek@apple.com> Add builtin definition for scanf, including extending the builtin encoding to
represent builtins that have the "scanf" attribution (via the format attribute) just
like we do with printf functions. Follow-up work is needed to add similar support
for fscanf et al.

This is to support format-string checking for scanf functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
7c97cb1f4b8513cccdfaf50dc864fbd17b2efdf8 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> Builtins/ARM: __clear_cache doesn't seem to have a consistent prototype, declare
the builtin as void __clear_cache(...) to workaround this, which appears to
match what GCC does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
1058253c364b2c98e6cecfe15d18d3562db245f4 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> Builtins/ARM: __clear_cache doesn't seem to have a consistent prototype, declare
the builtin as void __clear_cache(...) to workaround this, which appears to
match what GCC does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
8357c18d1d4678cbb892d0af5f774ff9de8309ca 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Support user defined attributes on block runtime functions.
- This issue here is that /usr/include/Blocks.h wants to define some of the
block runtime globals as weak, depending on the target. This doesn't work in
Clang because we aren't using the AST decl for these globals.

- The fix is a pretty gross hack which just watches all the decls for the
specific blocks globals we need to know about; if we see one we use it,
otherwise we use the hand coded type.

In time, I would like to clean this up by changing IRgen to ask Sema/AST for
the decl, which would then be lazily loaded from the builtin table if
necessary. This could be used in a whole host of places in IRgen and would
get rid of a lot of grotty hand coding of LLVM IR; however, we need some
extra Sema support for this as well as support for builtin global variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
754b9fbaa13749c61393cc613eec7c79efe60ddf 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Support user defined attributes on block runtime functions.
- This issue here is that /usr/include/Blocks.h wants to define some of the
block runtime globals as weak, depending on the target. This doesn't work in
Clang because we aren't using the AST decl for these globals.

- The fix is a pretty gross hack which just watches all the decls for the
specific blocks globals we need to know about; if we see one we use it,
otherwise we use the hand coded type.

In time, I would like to clean this up by changing IRgen to ask Sema/AST for
the decl, which would then be lazily loaded from the builtin table if
necessary. This could be used in a whole host of places in IRgen and would
get rid of a lot of grotty hand coding of LLVM IR; however, we need some
extra Sema support for this as well as support for builtin global variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
b3a213cd69712b93fe2ca247184c136c30265c68 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Allow -m{ios,macosx}-version-min= to be passed with -Xarch.
- This should be safe, because the driver itself shouldn't need to make
decisions that depend on the deployment target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
d55519bf1df142246537640b0a7011db81db2b94 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Allow -m{ios,macosx}-version-min= to be passed with -Xarch.
- This should be safe, because the driver itself shouldn't need to make
decisions that depend on the deployment target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
ef7f51550ea5f38328b0c37683d0229da7feca1a 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support 'clang -x ir ...'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
40228c109e5516c0d3c65832271ee2cca931f102 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support 'clang -x ir ...'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
e55ffc39c073e8d63f41950bdf9549ecea8931e3 15-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add a callback interface that allows interested parties to get notified whenever PCHReader deserializes a type or decl (and possibly other things in the future). Have PCHWriter implement these callbacks as noops and register to receive them if we're chaining PCHs. This will allow PCHWriter to track the IDs of these things, which it needs to write the dependent files. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
30c514c225342844700ed4640ec6d90ddf0e12b2 15-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add a callback interface that allows interested parties to get notified whenever PCHReader deserializes a type or decl (and possibly other things in the future). Have PCHWriter implement these callbacks as noops and register to receive them if we're chaining PCHs. This will allow PCHWriter to track the IDs of these things, which it needs to write the dependent files. WIP

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/PCHDeserializationListener.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
6f94dbb24b4bda547bf7492cf707aeadef311ddf 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosing
whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI
dependent.
- <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
dacf9dda17346c628fdd8c5df53c681738db0dc5 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosing
whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI
dependent.
- <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
8254d63f615f04f3b27894c9e0a355e20f43a6f7 15-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Pass StringRefs by value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Rewrite/Rewriter.h
ec1b1cc006cef19e0a95d0ea6fbfd37d0d615066 15-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Pass StringRefs by value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Rewrite/Rewriter.h
11594551693b1db92840bf1640d087ce1062609f 14-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Increase the max PCH level for declarations to 7. Add a FromPCH flag to types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/Type.h
07a353c2af3a3c557205466d4f4ed2513462ebfe 14-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Increase the max PCH level for declarations to 7. Add a FromPCH flag to types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/Type.h
0432654153303b62cdb1a17dc6daba4de82de018 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: When re'execing clang, use path to the main executable instead of
looking up Clang in the normal search paths (which may end up finding the wrong
clang).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
b9a822639c570b1853c75c235e9d6bad485f9e01 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: When re'execing clang, use path to the main executable instead of
looking up Clang in the normal search paths (which may end up finding the wrong
clang).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
9062faa75699366cda7cdb9fc68aa70f280ee82f 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Remove some unused arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
4a7e88978cf646ad10d654020cb00b3877069210 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Remove some unused arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
0cd8d6184b6aebaf1137b99b19c027a418830f86 14-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make PCHReader cope with PCH files containing more than one predefines buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
7e9ad8b4fd446ca7cc0e630edee56d8fcc4553de 14-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make PCHReader cope with PCH files containing more than one predefines buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
793c5a5bc238be6d5ad7b4499630646033f0c4ac 14-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Wire up '-Wignored-qualifiers' to the warning on 'const' in 'const int f()'.
This flag and warning match GCC semantics. Also, move it to -Wextra as this is
a largely cosmetic issue and doesn't seem to mask problems. Subsequent fixes to
the tests which no longer by default emit the warning. Added explicit test
cases for both C and C++ behavior with the warning turned on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108325 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
5495f37302f7c82192dab1ce8d9c9fe76ed0ee37 14-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Wire up '-Wignored-qualifiers' to the warning on 'const' in 'const int f()'.
This flag and warning match GCC semantics. Also, move it to -Wextra as this is
a largely cosmetic issue and doesn't seem to mask problems. Subsequent fixes to
the tests which no longer by default emit the warning. Added explicit test
cases for both C and C++ behavior with the warning turned on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108325 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
d878cad4bf70fbf187309add23ccf88fd0d5b193 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
are explicitly given.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Options.td
47e879dfa735f81472a51b1bd69cc4eb9159db39 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
are explicitly given.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Options.td
8c90b02120e2f49bf695e6013049ab9d3caac2e7 14-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new cast kind for an "lvalue bitcast", which handles
reinterpret_casts (possibly indirectly via C-style/functional casts)
on values, e.g.,

int i;
reinterpret_cast<short&>(i);

The IR generated for this is essentially the same as for

*reinterpret_cast<short*>(&i).

Fixes PR6437, PR7593, and PR7344.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e39a3894513349908cdb3beba2614e53cb288e6c 14-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new cast kind for an "lvalue bitcast", which handles
reinterpret_casts (possibly indirectly via C-style/functional casts)
on values, e.g.,

int i;
reinterpret_cast<short&>(i);

The IR generated for this is essentially the same as for

*reinterpret_cast<short*>(&i).

Fixes PR6437, PR7593, and PR7344.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
84ae91e42e622293b7952e4ec6e6670c1d508857 14-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Add __builtin_snprintf.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
99f2680e1fdd36777df05ef8a6d50aac07bd4b50 14-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Add __builtin_snprintf.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
7d4b17fcbd7821ff065c4aec6899fe4de8cbe201 13-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add two small utility functions to PCHReader that the writer will use. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
77a3c9ede5cdb26b5eb3001e82bb0a36ca997e1f 13-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add two small utility functions to PCHReader that the writer will use. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
d5082e3268e45d1390738306c0675a0e1fd77c53 13-Jul-2010 Chris Lattner <sabre@nondot.org> Add a warning to catch a bug recently caught by code review, like this:
t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise &
or remove constant [-Wlogical-bitwise-confusion]
return x && 4;
^ ~

wording improvement suggestions are welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
90a8f27f144233b53cac0c88a1595f7f05105b7e 13-Jul-2010 Chris Lattner <sabre@nondot.org> Add a warning to catch a bug recently caught by code review, like this:
t2.c:2:12: warning: use of logical && with constant operand; switch to bitwise &
or remove constant [-Wlogical-bitwise-confusion]
return x && 4;
^ ~

wording improvement suggestions are welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2350fb26d59692c6006ec5d33b8215e96055bdb6 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Whenever we're creating an expression that is typically an rvalue
(e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary.

Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Type.h
6398235d7890a81b785ea5af3b6e66d86bf184cc 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Whenever we're creating an expression that is typically an rvalue
(e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary.

Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Type.h
8439ceb39ea07e65ea1156c3a2e674d402c1cbed 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Properly add to 32

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e4b8f1171d699c56ba2b39aabf1d7cb4c38ce4f8 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Properly add to 32

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
13767543229d759e3c51dea5fa1cc531effb08ce 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Downgrade the "when type is in parentheses, array cannot have dynamic
size" error for code like

new (int [size])

to a warning, add a Fix-It to remove the parentheses, and make this
diagnostic work properly when it occurs in a template
instantiation. <rdar://problem/8018245>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
4bd40318cbea15310a37343db46de96c4fcc15e6 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Downgrade the "when type is in parentheses, array cannot have dynamic
size" error for code like

new (int [size])

to a warning, add a Fix-It to remove the parentheses, and make this
diagnostic work properly when it occurs in a template
instantiation. <rdar://problem/8018245>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
441770637fa1297a3bd9af909de9d22ad5ff518e 13-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Modify the pragma handlers to accept and use StringRefs instead of IdentifierInfos.

When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded).
We can avoid this if we just use StringRefs for the pragmas.

As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
9b36c3f0de0105e903130bbda3c4aea7d792c0af 13-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modify the pragma handlers to accept and use StringRefs instead of IdentifierInfos.

When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded).
We can avoid this if we just use StringRefs for the pragmas.

As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
9c12aaaac057518b52015e01a569741643d5c8f9 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics for the "type qualifier on return type has no
effect warning" by printing the qualifiers we saw and correctly
pluralizing the message, e.g.,

test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type
qualifiers on return type have no effect
const volatile Enum g2() {
^~~~~ ~~~~~~~~





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
de80ec1fa947855d2e53722a8cd71367ff513481 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics for the "type qualifier on return type has no
effect warning" by printing the qualifiers we saw and correctly
pluralizing the message, e.g.,

test/SemaCXX/conditional-expr.cpp:295:3: warning: 'const volatile' type
qualifiers on return type have no effect
const volatile Enum g2() {
^~~~~ ~~~~~~~~





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8079eee9128444d02bebf24410126f9d55399f84 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types.

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
5291c3cec0dbe8ad1d8e7e67e93af2b1586d5400 13-Jul-2010 Douglas Gregor <dgregor@apple.com> When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types.

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
240b977ca72a3a4a0c5b364373d2f19559c5942f 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose typedef of an operator name. Fixes PR7462

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
aef01998af5bbfc1cdfac091248ff7d30ec31456 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Diagnose typedef of an operator name. Fixes PR7462

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a351bf90f109c26fe7d943cd09dcee711dc387d9 13-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Instantiate attributes when first building an instantiated
VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
8dd0c5626455cdf94280783e85e413eed6cbf3d9 13-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Instantiate attributes when first building an instantiated
VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ac8737c6cd9d627e9f36e287d6f6d3aa1062b55f 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Provide a special diagnostic for attempts to explicitly specialize
class templates within class scope (which is ill-formed), and recover
by dropping the explicit specialization entirely. Fixes the infinite
loop in PR7622.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
669eed8d676458c701f45f7fd686f01de2dee53b 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Provide a special diagnostic for attempts to explicitly specialize
class templates within class scope (which is ill-formed), and recover
by dropping the explicit specialization entirely. Fixes the infinite
loop in PR7622.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bf00306c12102e6443ae9092468957ffbb78bb74 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a documentation paste-o and eliminate a useless function parameter, both found by Sebastian

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
dd41ed59cf7aefabd40bf766d8fcc7ebd759c8e5 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Fix a documentation paste-o and eliminate a useless function parameter, both found by Sebastian

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
74cacf47b46752b0f40460d164a7c43f33b04ed7 13-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> We should not be recursing over the shadow definitions in UsingDecl --
they're not something the user typed (at least, not here).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
cdbcad09c806aba04fab15c91a9ff537fa38a2f5 13-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> We should not be recursing over the shadow definitions in UsingDecl --
they're not something the user typed (at least, not here).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
853aafec0694b69b5533be7066b4aea9cb34bf67 13-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Produce an error on encountering a pointer or reference to a qualified function type. Fixes PR7470.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f9ea1f392ab8946f7bfc3f98802a8e5e6fe073f3 13-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Produce an error on encountering a pointer or reference to a qualified function type. Fixes PR7470.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b963de31cf8e86bbd3c31cc7cf390c841fd38031 13-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Split the normal and chained PCH writing paths and add a tiny bit of implementation to the latter. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
1dc13a15e789a174e5e5855efe27036dd7a9d252 13-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Split the normal and chained PCH writing paths and add a tiny bit of implementation to the latter. WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
bd9046ee7f084d316e5d2e92bdb9c266529767ef 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Copy over attributes to instantiated variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
cad8d31117800f804ee4f313134162edac8f8813 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Copy over attributes to instantiated variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
db238ec51ca050d0ecb71a6bbd04402d3fd145d4 12-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> If we are past tok::eof and in caching lex mode, avoid caching repeated tok::eofs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
03569eaabceb14a20e23d043135fdccbc7309a96 12-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> If we are past tok::eof and in caching lex mode, avoid caching repeated tok::eofs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
24e6b6992a0b022e02aa2510703c2a94184e3c7d 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Compute Type dependent-ness of BlockDeclRefExpr
on the fly when constructing it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
84ca008a462b515f63871253f494d53c9190363c 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Compute Type dependent-ness of BlockDeclRefExpr
on the fly when constructing it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cfff00f10ba49c4fdb902824378f72ab62fcd759 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Move setting of Dependent Type to BlockDeclRefExpr's
constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108157 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
52bc56a296b11b4fc6bf5ddf4ded5262f6484bdb 12-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Move setting of Dependent Type to BlockDeclRefExpr's
constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108157 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
91146ed4a2651b8b77ddbfa33f172589163aee48 12-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7280 by making the warning on code like this:

int test1() {
return;
}

default to an error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
184aa4e6ded190bfb3bbe207040467f8d7e28a04 12-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7280 by making the warning on code like this:

int test1() {
return;
}

default to an error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f93ade3b00ac28866fc44072fae3c3daaaa75d61 12-Jul-2010 Chris Lattner <sabre@nondot.org> change the 'invalid token after top level declarator' message to be
'expected ';' after top level declarator' which is much less vague.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
9b3215d5aba6c687a3ee46b0f36367f416ac34cc 12-Jul-2010 Chris Lattner <sabre@nondot.org> change the 'invalid token after top level declarator' message to be
'expected ';' after top level declarator' which is much less vague.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
caeb5603066581b06d0cc5c0b7b6816a900bb2f7 12-Jul-2010 Chris Lattner <sabre@nondot.org> Fix PR7617 by not entering ParseFunctionDefinition when
a function prototype is followed by a declarator if we
aren't parsing a K&R style identifier list.

Also, avoid skipping randomly after a declaration if a
semicolon is missing. Before we'd get:

t.c:3:1: error: expected function body after function declarator
void bar();
^

Now we get:

t.c:1:11: error: invalid token after top level declarator
void foo()
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
004659a56916f2f81ede507c12516c146d6c0df3 12-Jul-2010 Chris Lattner <sabre@nondot.org> Fix PR7617 by not entering ParseFunctionDefinition when
a function prototype is followed by a declarator if we
aren't parsing a K&R style identifier list.

Also, avoid skipping randomly after a declaration if a
semicolon is missing. Before we'd get:

t.c:3:1: error: expected function body after function declarator
void bar();
^

Now we get:

t.c:1:11: error: invalid token after top level declarator
void foo()
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
01c3c651fdf9784ddf57d8dbdd597a58792239bd 12-Jul-2010 Chris Lattner <sabre@nondot.org> add a const qualifier, refactor some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
c82daefa3062721e98947e08193cd81b4e9df915 12-Jul-2010 Chris Lattner <sabre@nondot.org> add a const qualifier, refactor some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
343bc4ac3ca28ee5f51fb8c03f2145c3c20e44b0 10-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add PCH support for the remaining C++ exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
6d00c1365dd3601f6d93bbda9162913c57ae788f 10-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add PCH support for the remaining C++ exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
95d551400c4605ccbab8a59965aa7d1b09b14389 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Slightly improve the diagnostic when using a qualified function typedef to declare nonmember or static member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c61bb2056148891375bfa591fa2859b9b6ec2734 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Slightly improve the diagnostic when using a qualified function typedef to declare nonmember or static member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
70b3e1446cbd99e41a4ebe2fd9aecb0be3157904 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When given the -chained-pch option and a previous PCH file, have the PCHWriter emit a CHAINED_METADATA record instead of METADATA, and write a link to the previous file there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
77f4603c8b142e642300959a601ecec2b7c8e288 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When given the -chained-pch option and a previous PCH file, have the PCHWriter emit a CHAINED_METADATA record instead of METADATA, and write a link to the previous file there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
94cb3d0aedbb6e52d492ed61d685463f351eded2 09-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Ignore -Wno-main, per PR7269.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
04821c7e901d57a2aca09f89167d78dd038af9e4 09-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Ignore -Wno-main, per PR7269.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
7fc6dca2c847b8bff9a76455e7c1c150e035dc57 09-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Refer to implicit "conversions" rather than implicit "casts", which
don't technically exist in the language. <rdar://problem/8085982>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
27f46ee38d9a6a28cf0438218a198a9da1cee5d6 09-Jul-2010 Douglas Gregor <dgregor@apple.com> Refer to implicit "conversions" rather than implicit "casts", which
don't technically exist in the language. <rdar://problem/8085982>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b615eefeb4419b77f5ce726813aaa3a5cf352536 09-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce -f{no-}spell-checking options to enable/disable
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
a0068fc64351db9c47916566e3b85ab733cd8d6d 09-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce -f{no-}spell-checking options to enable/disable
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
53834c8d44a55123c3df40422d018171538e7376 09-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Move traverseunqualifiedtypeloc over to the 'main' typeloc tree.
Note that this is a move -- we pretend that we were really looking
at the unqualified typeloc all along -- rather than a recursion, so
we don't follow the normal CRTP plan of going through
getDerived().TraverseTypeLoc. If we did, we'd be traversing twice
for the same type (once as a QualifiedTypeLoc version of the type,
once as an UnqualifiedTypeLoc version of the type), which in effect
means we'd call VisitTypeLoc twice with the 'same' type. This
solves that problem, at the cost of never seeing the qualified
version of the type (unless the client subclasses
TraverseQualifiedTypeLoc themselves). It's not a perfect solution.
A perfect solution probably requires making QualifiedTypeLoc a
wrapper around TypeLoc -- like QualType is a wrapper around Type*
-- rather than being its own class in the type hierarchy.

Reviewed by wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
6b3f1ebce775499aff03845193de78128671262f 09-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Move traverseunqualifiedtypeloc over to the 'main' typeloc tree.
Note that this is a move -- we pretend that we were really looking
at the unqualified typeloc all along -- rather than a recursion, so
we don't follow the normal CRTP plan of going through
getDerived().TraverseTypeLoc. If we did, we'd be traversing twice
for the same type (once as a QualifiedTypeLoc version of the type,
once as an UnqualifiedTypeLoc version of the type), which in effect
means we'd call VisitTypeLoc twice with the 'same' type. This
solves that problem, at the cost of never seeing the qualified
version of the type (unless the client subclasses
TraverseQualifiedTypeLoc themselves). It's not a perfect solution.
A perfect solution probably requires making QualifiedTypeLoc a
wrapper around TypeLoc -- like QualType is a wrapper around Type*
-- rather than being its own class in the type hierarchy.

Reviewed by wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
4d800b41a27e7e5d94b365878b30034539a0d3b7 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add a frontend option -chained-pch and don't pass an active PCH reader to the PCH writer if it is not set, preventing creation of chained PCH files. Since the reader is so far unused, effectively no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
d6ac4524cd441808f152f7e10900a8315ea31c08 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add a frontend option -chained-pch and don't pass an active PCH reader to the PCH writer if it is not set, preventing creation of chained PCH files. Since the reader is so far unused, effectively no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
f34557fb0a31a136c2d32897735e58a1aea64466 09-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Support code completion for parameter names in Objective-C method
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
40ed9a13f5b67b2941f5a9521616e57e9e31ba97 09-Jul-2010 Douglas Gregor <dgregor@apple.com> Support code completion for parameter names in Objective-C method
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6c48f6dad23720c01edca5ae407dcfdf3ada76fb 09-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new code-completion point prior to an identifier in the
selector of an Objective-C method declaration, e.g., given

- (int)first:(int)x second:(int)y;

this code completion point triggers at the location of "second". It
will provide completions that fill out the method declaration for any
known method, anywhere in the translation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
1f5537aaac1e775aff1d523f2cc59a9a3bd6c946 09-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new code-completion point prior to an identifier in the
selector of an Objective-C method declaration, e.g., given

- (int)first:(int)x second:(int)y;

this code completion point triggers at the location of "second". It
will provide completions that fill out the method declaration for any
known method, anywhere in the translation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
aeee5b8269a59ef2e1a65ed73458b26b2b56ec2a 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Some preparatory work for chained PCH. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
a93e3b5bde9f0a7b59215f19f176f7d69881b81c 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Some preparatory work for chained PCH. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
b9ef1aefe3fbeda4c939c9c954ec18390b2864da 08-Jul-2010 Zhanyong Wan <wan@google.com> Makes RecursiveASTVisitor traverse the type of a temporary object
created via T() where T is a class type. Reviewed by chandlerc and
csilvers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
80db8cbff5afc047a23dbfe11f7ef787d891feec 08-Jul-2010 Zhanyong Wan <wan@google.com> Makes RecursiveASTVisitor traverse the type of a temporary object
created via T() where T is a class type. Reviewed by chandlerc and
csilvers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
2d562147b4d12f5ca3f1d3265c4703244182603b 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> When performing substitution of template arguments within the body of
a template, be sure to include the template arguments from the
injected-class-name. Fixes PR7587.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
24bae92f08ae098cc50a602d8cf1273b423e14da 08-Jul-2010 Douglas Gregor <dgregor@apple.com> When performing substitution of template arguments within the body of
a template, be sure to include the template arguments from the
injected-class-name. Fixes PR7587.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
5f44093649015a532b5b78ad95584f469469d668 08-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce PCHReader::GetTranslationUnitDecl() and use it instead of ReadDeclRecord when initializing.

ReadDeclRecord would hit assertion if the translation unit declaration was already loaded during
IdentifierInfo initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
8871a44ae61cf97ff6fff4c640fadce9ba4cf1b0 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce PCHReader::GetTranslationUnitDecl() and use it instead of ReadDeclRecord when initializing.

ReadDeclRecord would hit assertion if the translation unit declaration was already loaded during
IdentifierInfo initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
a17bffb76acc003b51a88f817a23071877f7c539 08-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support TemplateTemplateParmDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
bfcc92c3476ada55ceeea49e43e6d2e083252830 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support TemplateTemplateParmDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
2738164cfcf5b4d8a109adfb37d4e28da60a05a2 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Bowing to popular demand, reduce the "comma at end of enumerator list"
ExtWarn to an Extension. Let the broken code propagate!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
6d82ef45d624da4fc88a2fbf7dd1dc144aeb05b0 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Bowing to popular demand, reduce the "comma at end of enumerator list"
ExtWarn to an Extension. Let the broken code propagate!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
b69c35fbf8635a267215a83b4e9fd980019f003a 08-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> For TagType and TemplateSpecializationType, isDependent calculation may be invalid because some decls that the
calculation is using may still be initializing.
Thus, store the isDependent flag to PCH and restore directly to Type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
be191100e034b23a3e13053757a57b7f5068c24a 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> For TagType and TemplateSpecializationType, isDependent calculation may be invalid because some decls that the
calculation is using may still be initializing.
Thus, store the isDependent flag to PCH and restore directly to Type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7b1d67a3a0fd7ca693a5633b00b44341f09af5b9 08-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write the C++ parts of DeclRefExpr and MemberExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
663e380d7b2de2bbf20e886e05371195bea9adc4 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write the C++ parts of DeclRefExpr and MemberExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e8f2e77a0856219a9a733aaba4b7ec1edcdeab0b 08-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix reading of UsingDecl from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
82f8e796d6ffce1d63729a2df87c1060edf6593a 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix reading of UsingDecl from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8cdb61460293fafb23170b5734cec6cb30f55c6a 08-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Remove unused protected constructor of DeclRefExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9705752be3a52d72e9ad1c7c8d8e59082e40a4f1 08-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove unused protected constructor of DeclRefExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dd822a5e69158e49bfd64e112ab1e5a0829a979d 08-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Wrap the new ext-warn on extraneous comma on the last entry of an enumerator
list in a diagnostic group so it can be turned on and off. A terrifying amount
of code, including large chunks of open source code, still do this so it's
important to be able to suppress it when necessary.

Doug, is this a reasonable compromise? I'd lean toward making it a normal
extension, but I don't feel strongly as long as we can turn the warnings off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
fbc94213f38c48154ddc448b527f667182abe954 08-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Wrap the new ext-warn on extraneous comma on the last entry of an enumerator
list in a diagnostic group so it can be turned on and off. A terrifying amount
of code, including large chunks of open source code, still do this so it's
important to be able to suppress it when necessary.

Doug, is this a reasonable compromise? I'd lean toward making it a normal
extension, but I don't feel strongly as long as we can turn the warnings off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
09d0c1016307a83bb023584d6ce40d2949a13a41 08-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Add support for differentiating between attributes ignored when handled and
unknown attributes that we discard. Add a diagnostic group for unknown
attribute warnings to allow turning these off when we don't care. Also
consolidates the tests for this case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
7d5c45ed9dc2842ce8e65ea26ced0957be36a569 08-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Add support for differentiating between attributes ignored when handled and
unknown attributes that we discard. Add a diagnostic group for unknown
attribute warnings to allow turning these off when we don't care. Also
consolidates the tests for this case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
0ec494632efdc9cd55608bc98d175a68084acbad 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
fa0b6fca56fc75c359c07a5fb1a6f328c93e61ca 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
84745677f64863e025a6733cb29d0b94bc3a6ae2 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
38c8fe9cdead9e73d84548a6e3c8a9fb680bcb98 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
newly-narrowed scope. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
016a4a90c8e75d59de731fa3aa98f0a55656e66c 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
newly-narrowed scope. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/RecursiveASTVisitor.h
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
9448d6386902e18259ccbf440e0d3787fc340b0f 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Do not use CXXZeroValueInitExpr for class types. Instead, use
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
63ef464c3fad1e8b9f9360baa6c81f974b712e90 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Do not use CXXZeroValueInitExpr for class types. Instead, use
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
d15e19a1379672150a83eaf7f90c9330ed9da339 07-Jul-2010 Zhanyong Wan <wan@google.com> Changes how the TypeLoc traverser invokes the Type traverser: before,
VisitFooTypeLoc() calls VisitFooType(); now, TraverseFooTypeLoc()
calls WalkUpFromFooType(). This allows clients that override
WalkUpFromFooType() to continue to work. It also preserves the
property that Visit*() in the base visitor class is a no-op (s.t. a
subclass doesn't have to call Base::Visit*() when overriding
Visit*()).

Also fixes some typos in comments.

Also added a missing getDerived() inside
TraverseQualifiedTypeLoc(). The call is needed in case a subclass
overrides TraverseTypeLoc().

Reviewed by nlewycky and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
717cc00c16eabf0eefd3cc69394e97f7229af0c8 07-Jul-2010 Zhanyong Wan <wan@google.com> Changes how the TypeLoc traverser invokes the Type traverser: before,
VisitFooTypeLoc() calls VisitFooType(); now, TraverseFooTypeLoc()
calls WalkUpFromFooType(). This allows clients that override
WalkUpFromFooType() to continue to work. It also preserves the
property that Visit*() in the base visitor class is a no-op (s.t. a
subclass doesn't have to call Base::Visit*() when overriding
Visit*()).

Also fixes some typos in comments.

Also added a missing getDerived() inside
TraverseQualifiedTypeLoc(). The call is needed in case a subclass
overrides TraverseTypeLoc().

Reviewed by nlewycky and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
6f4bed50c076d7c8dd115c4c8af150d44bb6b379 07-Jul-2010 Chris Lattner <sabre@nondot.org> add driver support for minix, patch by Kees van Reeuwijk
from PR7583


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
38e317d6dce161b249508686cc67eb7176958762 07-Jul-2010 Chris Lattner <sabre@nondot.org> add driver support for minix, patch by Kees van Reeuwijk
from PR7583


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
94123548cbd76ff3947606562988fdcb26a047d1 07-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Delay passing InterestingDecls to the Consumer until when we know we are not in recursive loading and the
declarations are fully initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
bb80a8e8887c1ec74ee135d4ad9455eafedf1508 07-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Delay passing InterestingDecls to the Consumer until when we know we are not in recursive loading and the
declarations are fully initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
820de0b2042ef6628452262da6d5ec5ff2a7588d 07-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Remove Decl::getCompoundBody().

This has 2 (slight) advantages:
-Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt.
-Better tracking of Decl::getBody()'s callsites.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
5f1bfc10a12d9759444eb433f52a85d2e0058967 07-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove Decl::getCompoundBody().

This has 2 (slight) advantages:
-Make explicit at getBody()'s callsite that we expect/handle only CompoundStmt and not CXXTryStmt.
-Better tracking of Decl::getBody()'s callsites.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
327727783bbdf4a7f2bc08b6aa7d3a58a5ee412c 07-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.

Makes de-serialization of the function body even more "lazier".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
06a54a38be5054c910ffc92db60edab23f9ea105 07-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.

Makes de-serialization of the function body even more "lazier".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
424e7f0c61c2c8e4c76087880abf279d1872c661 07-Jul-2010 Chris Lattner <sabre@nondot.org> implement PR7569, warning about assignment to null, which
people seem to write when they want a deterministic trap.
Suggest instead that they use a volatile pointer or
__builtin_trap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8b5dec3002bd3e17061a8bf1fc35ba82912ec768 07-Jul-2010 Chris Lattner <sabre@nondot.org> implement PR7569, warning about assignment to null, which
people seem to write when they want a deterministic trap.
Suggest instead that they use a volatile pointer or
__builtin_trap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
767c192122581041b3ff579ddefbb2dd389445c5 07-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Avoid double-traversing for QualifiedTypeLoc -- we were calling
VisitTypeLoc twice for qualified types, once for the qualified form
and once for the unqualified (though they looked the same by the time
we got to visittypeloc). Now only visit once, which matches previous
behavior.

Reviewed by nlewycky


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
c34c2116346a29869b47b190f6dea589823d6947 07-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Avoid double-traversing for QualifiedTypeLoc -- we were calling
VisitTypeLoc twice for qualified types, once for the qualified form
and once for the unqualified (though they looked the same by the time
we got to visittypeloc). Now only visit once, which matches previous
behavior.

Reviewed by nlewycky


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
c762367d52191a7e2a64cf623ba300df9ffb7209 07-Jul-2010 John McCall <rjmccall@apple.com> Provide a hook for the benefit of clients using clang IR gen as a subroutine:
emit metadata associating allocas and global values with a Decl*. This feature
is controlled by an option that (intentionally) cannot be enabled on the command
line.

To use this feature, simply set
CodeGenOptions.EmitDeclMetadata = true;
and then interpret the completely underspecified metadata. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenOptions.h
744016dde06fcffd50931e94a98c850f8b12cd87 07-Jul-2010 John McCall <rjmccall@apple.com> Provide a hook for the benefit of clients using clang IR gen as a subroutine:
emit metadata associating allocas and global values with a Decl*. This feature
is controlled by an option that (intentionally) cannot be enabled on the command
line.

To use this feature, simply set
CodeGenOptions.EmitDeclMetadata = true;
and then interpret the completely underspecified metadata. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenOptions.h
076f4df01e0467fac58fcfb5d9425dc854d6d56e 07-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Add a const version of a method, to be consistent with other methods
of the same type. I think this was just an oversight before.

Reviewed by chandlerc. Submitted as an "obvious" fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
dd5faf05dfe0163bdde939937d4fb0270086178a 07-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Add a const version of a method, to be consistent with other methods
of the same type. I think this was just an oversight before.

Reviewed by chandlerc. Submitted as an "obvious" fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
b3a787ea303728ad97e3e9226f41116ad799f048 07-Jul-2010 Ted Kremenek <kremenek@apple.com> Implement dumpToStream() for NonStaticGlobalSpaceRegion and StaticGlobalSpaceRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
fa87d812d7c78d7f0cd1c5636e21e07c23c85341 07-Jul-2010 Ted Kremenek <kremenek@apple.com> Implement dumpToStream() for NonStaticGlobalSpaceRegion and StaticGlobalSpaceRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
385b4d574901c8b01c0f9fa4c86a9eb5e6ca9461 06-Jul-2010 Tom Care <tcare@apple.com> Added a path-sensitive idempotent operation checker (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.

Example:
{
int a = 1;
int b = 5;
int c = b / a; // a is 1 on all paths
}

- New IdempotentOperationChecker class
- Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
- Minor refactoring of SVal to allow checking for any integer
- Added command line option for check
- Added basic test cases

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Checker/PathSensitive/SVals.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
db2fa8a7eb67b1e8f32a590b8e000e1259cff91a 06-Jul-2010 Tom Care <tcare@apple.com> Added a path-sensitive idempotent operation checker (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.

Example:
{
int a = 1;
int b = 5;
int c = b / a; // a is 1 on all paths
}

- New IdempotentOperationChecker class
- Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
- Minor refactoring of SVal to allow checking for any integer
- Added command line option for check
- Added basic test cases

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Checker/PathSensitive/SVals.h
lang/Driver/CC1Options.td
lang/Frontend/AnalyzerOptions.h
fb699f1e2cec64761b2347afb56dff378cb2bbb9 06-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Improve the accuracy of getSourceRange() for DeclaratorDecl and
TagDecl subclasses when out-of-line template declaration information
is available, from Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
1693e154bef16ca060b5e3786d8528ddc11f5637 06-Jul-2010 Douglas Gregor <dgregor@apple.com> Improve the accuracy of getSourceRange() for DeclaratorDecl and
TagDecl subclasses when out-of-line template declaration information
is available, from Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
6d1a96df21e510082d22c002ad87e8c01016aee4 06-Jul-2010 Tom Care <tcare@apple.com> Added several helper functions to Stmt to recursively check for different elements (macros, enum constants, etc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7d6228fc77baf405c6554bb47904fc197e33b488 06-Jul-2010 Tom Care <tcare@apple.com> Added several helper functions to Stmt to recursively check for different elements (macros, enum constants, etc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
a4d872ad267282e1d826162dcb75eaa296e5ec65 06-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add to PCH missing Sema information about VTable uses and dynamic classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
d455add086f1dfa16ae87dc310e49493bbc2b0a6 06-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add to PCH missing Sema information about VTable uses and dynamic classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
398edba498bb062c78c6e35b2e3e6b72b334d455 06-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add skeleton code to make wpa call the analysis engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/TranslationUnit.h
65d336b6b9ec96a12e2f165188f80c5e813ff4ec 06-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add skeleton code to make wpa call the analysis engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/TranslationUnit.h
1ab53389887f4a85a11e025c5d7a5c019fea18fd 06-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Collect function definitions in the Indexer when indexing through the ASTs.
Add an API to get an Entity associated with a name in the global namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
lang/Index/Indexer.h
dc01a153f20be7121c4d3fdc17bb28ff4442231c 06-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Collect function definitions in the Indexer when indexing through the ASTs.
Add an API to get an Entity associated with a name in the global namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
lang/Index/Indexer.h
53ab9da0b00b905da975c4b3f62f5e0a944a57b6 06-Jul-2010 Jordy Rose <jediknil@belkadan.com> Remove the now-unused GRState::isEqual method. Instead of asking if an expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
5dd3af78a12d049d4591505570fcde79c2cc7bb0 06-Jul-2010 Jordy Rose <jediknil@belkadan.com> Remove the now-unused GRState::isEqual method. Instead of asking if an expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
9af53812d5977e79d0330e7c38c2ce9eb0791eda 05-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write the identifier namespace in PCH for decls that may modify it.

We can now use a PCH'ed <map>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
c8f9af2943699ff623ca08f2e5ed4d72e0351189 05-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write the identifier namespace in PCH for decls that may modify it.

We can now use a PCH'ed <map>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
10bfc5813682c82c3e0329ed8582e8d92f8f4f1f 05-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write some source location for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7b081c8604efd33bc7f7e5c1e9427a031eedb2b4 05-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write some source location for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e0dabf9cc0f323ab90e963233fd9a7aafd1c4b5a 04-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix a regression of a previous commit of mine (rdar://8158953).

Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading.
Introduce more suitable ASTContext::getRecordType() and getEnumType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
400f5125e2432d648f2c8a31b36a7f318a880c47 04-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a regression of a previous commit of mine (rdar://8158953).

Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading.
Introduce more suitable ASTContext::getRecordType() and getEnumType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
e4c9c5400738b7bfb9a477049993f16696ce32b1 04-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write more information of ASTContext for PCH. Overriden methods and instantiated-from information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
c91e9f439ae85d5f79a6b65672f1d7d1b55ccda0 04-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write more information of ASTContext for PCH. Overriden methods and instantiated-from information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
a0b52cc3c2161509acf2c0b9470cb8db105d2ff8 04-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Don't try to install the __[u]int128_t identifier if it is already installed by PCHReader.

Currently, adding it to visible decls of a PCH'ed translation unit has no effect because
adding visible decls before deserialization has no effect (the decls won't be visible).
This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
006113841bdae1edb77aef75ba1ffdf2e55a3094 04-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't try to install the __[u]int128_t identifier if it is already installed by PCHReader.

Currently, adding it to visible decls of a PCH'ed translation unit has no effect because
adding visible decls before deserialization has no effect (the decls won't be visible).
This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
5e881aacf6176c20270f664a85761351158f9c78 04-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write specialization info of static data members for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
9421adc43891e272156fab640e5d5ee5054b779c 04-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write specialization info of static data members for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
54c532eca864cecdf41cd22250d29c587d9e00e1 04-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Add TypeLoc traversal to the RecursiveASTVisitor! Because the TypeLocs don't
contain all the same information that their Types do, we will fall back to
traversing the Types instead. The default TypeLoc visitor calls the matching
Type visitor so that existing clients should continue to work with no change.

Also adds element traversal to the ExtVectorType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
4d2229c7a9514ee2b960aa9e59f7259cebbaa421 04-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Add TypeLoc traversal to the RecursiveASTVisitor! Because the TypeLocs don't
contain all the same information that their Types do, we will fall back to
traversing the Types instead. The default TypeLoc visitor calls the matching
Type visitor so that existing clients should continue to work with no change.

Also adds element traversal to the ExtVectorType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
7ea909b3620ae1e6f52907c7b47ea6f2ba63a87d 04-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Fix ObjCInterfaceTypeLoc to inherit from ObjCObjectTypeLoc so as to match the
Type hierarchy. Without this, TypeLocNodes.def will give you wrong type
hierarchy information (claiming that ObjCObjectTypeLoc is the base of
ObjCInterfaceTypeLoc, which it wasn't).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
a8bef693d8761e31845a26e136f8d3a0983d2f46 04-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Fix ObjCInterfaceTypeLoc to inherit from ObjCObjectTypeLoc so as to match the
Type hierarchy. Without this, TypeLocNodes.def will give you wrong type
hierarchy information (claiming that ObjCObjectTypeLoc is the base of
ObjCInterfaceTypeLoc, which it wasn't).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
d871e5d4810e3f60ba803c5948e100e3355423a2 04-Jul-2010 Jordy Rose <jediknil@belkadan.com> Add a new symbol type, SymbolExtent, to represent the extents of memory regions that may not be known at compile-time (such as those created by malloc). This replaces the old setExtent/getExtent API on Store, which used the GRState's GDM to store SVals.

Also adds a getKnownValue() method to SValuator, which gets the integer value of an SVal if it is known to only have one possible value. There are more places in the code that could be using this, but in general we want to be dealing entirely in SVals, so its usefulness is limited.

The only visible functionality change is that extents are now honored for any DeclRegion, such as fields and Objective-C ivars, rather than just variables. This shows up in bounds-checking and cast-size-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
32f2656b90900ac04c4b50e87c16749d0ceb9ef2 04-Jul-2010 Jordy Rose <jediknil@belkadan.com> Add a new symbol type, SymbolExtent, to represent the extents of memory regions that may not be known at compile-time (such as those created by malloc). This replaces the old setExtent/getExtent API on Store, which used the GRState's GDM to store SVals.

Also adds a getKnownValue() method to SValuator, which gets the integer value of an SVal if it is known to only have one possible value. There are more places in the code that could be using this, but in general we want to be dealing entirely in SVals, so its usefulness is limited.

The only visible functionality change is that extents are now honored for any DeclRegion, such as fields and Objective-C ivars, rather than just variables. This shows up in bounds-checking and cast-size-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
bb7bf9bbd7e455154fd2d481f3c3c5446b871135 03-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> When setting the anonymous namespace at PCH reading, it may still be initializing so avoid
the invariant checks at NamespaceDecl::setAnonymousNamespace().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a038c1dcface5a404d540a0d0688962cbe656af9 03-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> When setting the anonymous namespace at PCH reading, it may still be initializing so avoid
the invariant checks at NamespaceDecl::setAnonymousNamespace().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8894af18af4f933e99fef9641fc225b9823a385c 03-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Lazily declare default constructors. We now delay the construction of
declarations for implicit default constructors, copy constructors,
copy assignment operators, and destructors. On a "simple" translation
unit that includes a bunch of C++ standard library headers, we
generate relatively few of these implicit declarations now:

4/159 implicit default constructors created
18/236 implicit copy constructors created
70/241 implicit copy assignment operators created
0/173 implicit destructors created

And, on this translation unit, this optimization doesn't really
provide any benefit. I'll do some more performance measurements soon,
but this completes the implementation work for <rdar://problem/8151045>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
1827403a7138946305c0058f262e02b595cf882f 03-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare default constructors. We now delay the construction of
declarations for implicit default constructors, copy constructors,
copy assignment operators, and destructors. On a "simple" translation
unit that includes a bunch of C++ standard library headers, we
generate relatively few of these implicit declarations now:

4/159 implicit default constructors created
18/236 implicit copy constructors created
70/241 implicit copy assignment operators created
0/173 implicit destructors created

And, on this translation unit, this optimization doesn't really
provide any benefit. I'll do some more performance measurements soon,
but this completes the implementation work for <rdar://problem/8151045>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
1cdf4d0686667b7f80c37cdc87679d824819bb5a 03-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Lazily declare implicit copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
225843186e3972ce798d3de00f86da9008b15a0e 03-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare implicit copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
040dd7f2bf53b5ad1e95f385bfe2201f73ebf7c4 03-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write CastExpr's CXXBaseSpecifierArray for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/UsuallyTinyPtrVector.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0745d0a648b75bd304045309276c70a755adaafb 03-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write CastExpr's CXXBaseSpecifierArray for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/UsuallyTinyPtrVector.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
644868591f60eec090c00a4fe6a92fcb9b4abf8b 03-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix broken PCH support for CXXDefaultArgExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
8a50733034edd6a349b34e2b9f0c8d0a874846d3 03-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix broken PCH support for CXXDefaultArgExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
cbc2ab01c76cc7dea081cd23071514d88bc9fae9 02-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Lazily declare copy-assignment operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
a376d10acfacf19d6dfa41069f7929739a18dd7a 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare copy-assignment operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
dc651872990269d88f4160a991e7db3439aaf82e 02-Jul-2010 Zhanyong Wan <wan@google.com> Make RecursiveASTVisitor traverse function parameter types in a function
prototype declaration. Reviewed by chandlerc and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
234faa72224a038e3259ad82d4214174850b8b75 02-Jul-2010 Zhanyong Wan <wan@google.com> Make RecursiveASTVisitor traverse function parameter types in a function
prototype declaration. Reviewed by chandlerc and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
b9aa39a0fad9109684a960bf91e13ceeeb2425e3 02-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Lazily declare the implicitly-declared destructor in a C++ class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
4923aa25eb39d64106a5817c02d560a3aecf8b2c 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Lazily declare the implicitly-declared destructor in a C++ class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
449e309c09db77d8be2280cd12c8b3bda1276efe 02-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Don't visit implicitly defined functions (default constructors and the
like). Our goal with this visitor is to visit exactly what people type.

Reviewed by chandlerc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
d0b982ca5cf685af08d5015e8c2dfae3ecab1a0b 02-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Don't visit implicitly defined functions (default constructors and the
like). Our goal with this visitor is to visit exactly what people type.

Reviewed by chandlerc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
be7344921919edd8955b2d2f43563d89bf012aee 02-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Move the "current scope" state from the Parser into Action. This
allows Sema some limited access to the current scope, which we only
use in one way: when Sema is performing some kind of declaration that
is not directly driven by the parser (e.g., due to template
instantiatio or lazy declaration of a member), we can find the Scope
associated with a DeclContext, if that DeclContext is still in the
process of being parsed.

Use this to make the implicit declaration of special member functions
in a C++ class more "scope-less", rather than using the NULL Scope hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
23c94dbb6631fecdb55ba401aa93722803d980c6 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Move the "current scope" state from the Parser into Action. This
allows Sema some limited access to the current scope, which we only
use in one way: when Sema is performing some kind of declaration that
is not directly driven by the parser (e.g., due to template
instantiatio or lazy declaration of a member), we can find the Scope
associated with a DeclContext, if that DeclContext is still in the
process of being parsed.

Use this to make the implicit declaration of special member functions
in a C++ class more "scope-less", rather than using the NULL Scope hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
cf4aa88e5658b547453524d5f15d5793b064291a 02-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> By default, warn about commas at the end of an enumerator list in C++/C89.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
fe2dd6ceeeb31a7c681b2873a8459c5de5d1a3e9 02-Jul-2010 Douglas Gregor <dgregor@apple.com> By default, warn about commas at the end of an enumerator list in C++/C89.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
fae7b154d0b498ac5775692a2b37bfb3deb1ab9e 02-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.

<vector> header can be used correctly through PCH now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
91468328268f8be076c399e8482ec3cf98fe90cc 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle CXXConstructorDecl, CXXDestructorDecl, and CXXConversionDecl for PCH.

<vector> header can be used correctly through PCH now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3a3d08e839c78fe8dda69c3706825826dce92b3e 02-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fully read/write CXXRecordDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Redeclarable.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
37ffed3b7f229844cae2463ff82b527506c86c74 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fully read/write CXXRecordDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Redeclarable.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
f2606db18b5d64f241d74dc4e967347ad3da4792 02-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Allow reading of InjectedClassNameType from PCH even when its decl is currently initializing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
43921b53b582145f0d1b7c48223bd4d9f0a9d1be 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow reading of InjectedClassNameType from PCH even when its decl is currently initializing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8e3a4439cca2392c63451037ca97eb7037574c91 02-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> - Allow a typedef type to be read from PCH even if its decl is currently initializing.
- Fix creation of TemplateSpecializationType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9763e221e16026ddf487d2564ed349d2c874a1a1 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> - Allow a typedef type to be read from PCH even if its decl is currently initializing.
- Fix creation of TemplateSpecializationType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b69c228c5fc1240fbc72e8f9ac48f5d58a77581c 02-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
b8b03e6df1cc89e701a809c6a47c41f31b7a9e50 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add some side-effect free Create methods for TypeDecl subclasses and use them for PCH reading.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
5e81e7fa36fd575b145ac4f367cab13f9a9dafc3 02-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Change CallGraph::Prog to be a reference. idx::Program means to be a global object to the Index library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/CallGraph.h
6d956dfcc79159808f46493dc5754971c76593aa 02-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> Change CallGraph::Prog to be a reference. idx::Program means to be a global object to the Index library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/CallGraph.h
29d82da2bf4304927c5302adc7c55fa209a1239f 02-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Handle typedef function declarations correctly, such as
typedef int (*Myfunc)(int);
Myfunc func;

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
f650a624f7219be057d8f4e1a3174092297816f5 02-Jul-2010 Craig Silverstein <csilvers2000@yahoo.com> Handle typedef function declarations correctly, such as
typedef int (*Myfunc)(int);
Myfunc func;

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
eb04f8714fcf4b01aa74718a54a058186babeb10 02-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Provide exception specifications for implicitly-declared default constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
eb8c670d2949eb62005eca36c64c9461f2a2173e 02-Jul-2010 Douglas Gregor <dgregor@apple.com> Provide exception specifications for implicitly-declared default constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
a5de7fddeccde0ab6f5a804632944e943c1c478b 01-Jul-2010 Ted Kremenek <kremenek@apple.com> Fix PR 7475 by enhancing the static analyzer to also invalidate bindings for non-static global variables
when calling a function/method whose impact on global variables we cannot accurately estimate.
This change introduces two new MemSpaceRegions that divide up the memory space of globals, and causes
RegionStore and BasicStore to consult a binding to the NonStaticGlobalsMemSpaceRegion when lazily
determining the value of a global.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
dcee3ce97fc76f20ce8f5a7451071e3dec537073 01-Jul-2010 Ted Kremenek <kremenek@apple.com> Fix PR 7475 by enhancing the static analyzer to also invalidate bindings for non-static global variables
when calling a function/method whose impact on global variables we cannot accurately estimate.
This change introduces two new MemSpaceRegions that divide up the memory space of globals, and causes
RegionStore and BasicStore to consult a binding to the NonStaticGlobalsMemSpaceRegion when lazily
determining the value of a global.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
d0854d5cac31ab26b461a3ae274ee233f47067c6 01-Jul-2010 Jordy Rose <jediknil@belkadan.com> Add an ivar to SymbolReaper for the current statement, and then stop passing the current statement around everywhere. Preparation for symbolic extents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
7dadf79bd809cc01fe275f9a7243593bc2af5c10 01-Jul-2010 Jordy Rose <jediknil@belkadan.com> Add an ivar to SymbolReaper for the current statement, and then stop passing the current statement around everywhere. Preparation for symbolic extents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
45c5e7c236f638b5a783dd5843c7a52b3d279a89 01-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Provide an exception-specification for an implicitly-declared
copy-assignment operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
b87786f045d798b070980c108c922e1475d27b15 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Provide an exception-specification for an implicitly-declared
copy-assignment operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
5ece84ce202e7747e58ccacf24f1a7b85f9a2335 01-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
1d110e05e0ff48c1c7a483d6b7fd094cdf28316a 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
28c0b28ea81dacb0e7470f521993798fb4ba019c 01-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> ExplodedGraph never uses ASTContext, remove it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
c77a55126fcad66fb086f8e100a494caa2496a2d 01-Jul-2010 Zhongxing Xu <xuzhongxing@gmail.com> ExplodedGraph never uses ASTContext, remove it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
82a2ae24f51d2821d6caef1cf4d9374b4948959d 01-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Extend the "cannot convert from base class pointer to derived class
pointer" diagnostic to handle references, too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2f9d8740f557bc1f8746a2d5c4498b324b63eeb9 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Extend the "cannot convert from base class pointer to derived class
pointer" diagnostic to handle references, too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
432db7bb741389b2d35b7b5b2639e51afb383459 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: .dSYM suffix should be appended, not replace the existing suffix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
63cbbeecba87b00913c8dfca170f62ec24473365 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: .dSYM suffix should be appended, not replace the existing suffix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
a0173ee552a235c935e2df51cb90f44298f9e385 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/IRgen: Add support for -momit-leaf-frame-pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
1ad6648cce57bd187f1853f58fef26cd9bf4934f 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/IRgen: Add support for -momit-leaf-frame-pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
c384faf30bfffe88697bf36e765ecbdd531a0bfc 01-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Implement C++ DR481, which clarifies that the scope of template
parameters starts at the end of the template-parameter rather than at
the point where the template parameter name is encounted. For example,
given:

typedef unsigned char T;
template<typename T = T> struct X0 { };

The "T" in the default argument refers to the typedef of "unsigned
char", rather than referring to the newly-introduced template type
parameter 'T'.

Addresses <rdar://problem/8122812>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Template.h
bb3310a5fd9c08741b5272ed2665bdeab76a99a6 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Implement C++ DR481, which clarifies that the scope of template
parameters starts at the end of the template-parameter rather than at
the point where the template parameter name is encounted. For example,
given:

typedef unsigned char T;
template<typename T = T> struct X0 { };

The "T" in the default argument refers to the typedef of "unsigned
char", rather than referring to the newly-introduced template type
parameter 'T'.

Addresses <rdar://problem/8122812>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Template.h
cd14694e765ad9c5f664d476e6c8b8a68579c772 01-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostic when we fail to pick an overload because it would
require a base-to-derived pointer conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8578981ada66dae44a5a0752f949a5e65b477588 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostic when we fail to pick an overload because it would
require a base-to-derived pointer conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ff79c3ba4e23a829b68e2f242db785573fecadf9 30-Jun-2010 Zhanyong Wan <wan@google.com> Fix RecursiveASTVisitor to traverse the ctor initializer list before
traversing the ctor body when traversing a CXXConstructorDecl.
Reviewed by chandlerc and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
6beaf938c0a2587ac4b2b60a51fbb9a80f72b766 30-Jun-2010 Zhanyong Wan <wan@google.com> Fix RecursiveASTVisitor to traverse the ctor initializer list before
traversing the ctor body when traversing a CXXConstructorDecl.
Reviewed by chandlerc and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
6f2529e6ea82828110cd9c85d7565d8913ddc620 30-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Clean up the diagnostic complaining about the element type of a vector
type so that it actually complains about the element type itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
27cac990649d9c1217f018921749683464a28e6b 30-Jun-2010 Douglas Gregor <dgregor@apple.com> Clean up the diagnostic complaining about the element type of a vector
type so that it actually complains about the element type itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3cb6ec521c6f86ecae206bdf68edaf6b9ba7654d 30-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Complain about the application of a transparent_union attribute to a
union whose first field has integral vector type. Also, clean up this
diagnostic a bit. Thanks to Eli for spotting this change in semantics
last week.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
90cd672ed107d5986936c577ce47ad7374096bd2 30-Jun-2010 Douglas Gregor <dgregor@apple.com> Complain about the application of a transparent_union attribute to a
union whose first field has integral vector type. Also, clean up this
diagnostic a bit. Thanks to Eli for spotting this change in semantics
last week.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
43e5ca66e8d124cc8c97a644de90f79c64d86afd 30-Jun-2010 Duncan Sands <baldrick@free.fr> Add header file needed to compile with g++-4.6, which has undergone some more
header trimming (needed for std::uninitialized_copy).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
68f774dc9f4ad823dff4195821ba789e4e61a3a6 30-Jun-2010 Duncan Sands <baldrick@free.fr> Add header file needed to compile with g++-4.6, which has undergone some more
header trimming (needed for std::uninitialized_copy).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
26f9c6bc93729a39f21a24cf3e3088c04b2f6a5f 30-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support DependentSizedArrayType for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
ae8b17f1d5d303af53db5a4f4a375ea6b9356566 30-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support DependentSizedArrayType for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
3924a168ffe6ebbe459db98208b195266f0ae147 30-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support ParenListExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
37bdfe284ad365f753741d1d89c078c148b3f4af 30-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support ParenListExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
c90cb427494ddb34dad06f18497ee136e688b5f2 30-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Make the constructor explicit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
0ab5de16a47d64ba7cc8ca2e31b679daeae963fe 30-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make the constructor explicit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
b9b01751b9f0468f1833f85505dbd48473baaf6f 30-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Implement C++ DR299, which allows an implicit conversion from a class
type to an integral or enumeration type in the size of an array new
expression, e.g.,

new int[ConvertibleToInt(10)];

This is a GNU and C++0x extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6bc574daab3d3571d888cc4a21df67f2e2a14792 30-Jun-2010 Douglas Gregor <dgregor@apple.com> Implement C++ DR299, which allows an implicit conversion from a class
type to an integral or enumeration type in the size of an array new
expression, e.g.,

new int[ConvertibleToInt(10)];

This is a GNU and C++0x extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f5b2e4e507e7014d09331fda4e7f0d5682d13660 30-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support C++ friend declarations for PCH.

This commit 'introduces' a slightly different way to restore the state of the AST object.
It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object.
The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to:

-Avoid complications with objects that have side-effects during creation or when using some setters.
-Not 'pollute' the AST interface with methods only used by the PCH reader/writer
-Allow AST objects to be read-only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
6764334dfa73d67cbbb1b1fc8fe00440aad00f2a 30-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support C++ friend declarations for PCH.

This commit 'introduces' a slightly different way to restore the state of the AST object.
It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object.
The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to:

-Avoid complications with objects that have side-effects during creation or when using some setters.
-Not 'pollute' the AST interface with methods only used by the PCH reader/writer
-Allow AST objects to be read-only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
418c103ccdfb96ce21b9e8e7a7caf63149fa93c0 30-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> When we know that we are at sub-statement reading (which is all of PCHStmtReader) use the "faster" ReadSubStmt. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
d98a2ab9275f896df49e42ea4e4b8871610e0f45 30-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> When we know that we are at sub-statement reading (which is all of PCHStmtReader) use the "faster" ReadSubStmt. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
1a4de2b12474679b6224f2398f3875d2887f1b63 29-Jun-2010 Ted Kremenek <kremenek@apple.com> Tweaker Checker::VisitEndAnalysis to have 'hasWorkRemaining' also
be true if some paths were aborted because they exceeded
the maximum loop unrolling count.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
e49f2adebee758e5ef0d7ef1acc90c059d442f4f 29-Jun-2010 Ted Kremenek <kremenek@apple.com> Tweaker Checker::VisitEndAnalysis to have 'hasWorkRemaining' also
be true if some paths were aborted because they exceeded
the maximum loop unrolling count.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
6c80d32157032a7f66dc587e74ae36ac11d7f5b4 29-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Allow a using directive to refer to the implicitly-defined namespace
"std", with a warning, to improve GCC compatibility. Fixes PR7517.

As a drive-by, add typo correction for using directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6699220f73f11e471b5e5aa42eaf064afeaa079e 29-Jun-2010 Douglas Gregor <dgregor@apple.com> Allow a using directive to refer to the implicitly-defined namespace
"std", with a warning, to improve GCC compatibility. Fixes PR7517.

As a drive-by, add typo correction for using directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8dccf0ab1ae2c845fc3b61cb042046ab21f79ac3 29-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Delete assert in ComputeKeyFunction. The function runs fine without it, since
there's an explicit guard on isPolymorphic, and virtual bases don't affect the
key function calculation. This allows people to call
ASTContext::getKeyFunction on arbitrary classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fe8ec01bba74f6841576a2ee93d2c62cdfa4eff2 29-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Delete assert in ComputeKeyFunction. The function runs fine without it, since
there's an explicit guard on isPolymorphic, and virtual bases don't affect the
key function calculation. This allows people to call
ASTContext::getKeyFunction on arbitrary classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bf3b1a277831b6e1869efdd9ab531ac604687d6e 29-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> A few prettifications. Also renamed TraverseInitializer to
TraverseConstructorInitializer, to be a bit clearer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
4d072932287eb074a4168804cac1acb18a51d5e8 29-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> A few prettifications. Also renamed TraverseInitializer to
TraverseConstructorInitializer, to be a bit clearer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
594cb37993facf069cc0fd16f674c8fb46b1578a 29-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix up ClassTemplateSpecializationDecl: For implicit instantiations
("set<int> x;"), we don't want to recurse at all, since the
instatiated class isn't written in the source code anywhere. (Note
the instatiated *type* -- set<int> -- is written, and will still get a
callback of TemplateSpecializationType). For explicit instantiations
("template set<int>;"), we do need a callback, since this is the only
callback that's made for this instantiation. We use
getTypeAsWritten() to distinguish.

We will still need to figure out how to handle template
specializations, which probably are still not quite correct.

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
bc55618eb97c519b8c186c350cb419f89021b073 29-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Fix up ClassTemplateSpecializationDecl: For implicit instantiations
("set<int> x;"), we don't want to recurse at all, since the
instatiated class isn't written in the source code anywhere. (Note
the instatiated *type* -- set<int> -- is written, and will still get a
callback of TemplateSpecializationType). For explicit instantiations
("template set<int>;"), we do need a callback, since this is the only
callback that's made for this instantiation. We use
getTypeAsWritten() to distinguish.

We will still need to figure out how to handle template
specializations, which probably are still not quite correct.

Reviewed by chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
0c80347b98aef998afb205199b74c5050d63556c 29-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Modify the way sub-statements are stored and retrieved from PCH.

Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index
each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g.

x = sizeof(int[1]);

would crash PCH.

Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just
need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and
PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
919e693e80632d214c1f3110f6ee5d1c0b61f06b 29-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modify the way sub-statements are stored and retrieved from PCH.

Before this commit, sub-stmts were stored as encountered and when they were placed in the Stmts stack we had to know what index
each stmt operand has. This complicated supporting variable sub-stmts and sub-stmts that were contained in TypeSourceInfos, e.g.

x = sizeof(int[1]);

would crash PCH.

Now, sub-stmts are stored in reverse order, from last to first, so that when reading them, in order to get the next sub-stmt we just
need to pop the last stmt from the stack. This greatly simplified the way stmts are written and read (just use PCHWriter::AddStmt and
PCHReader::ReadStmt accordingly) and allowed variable stmt operands and TypeSourceInfo exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0b653af867de91f191d1a42d50f556705a8a2974 28-Jun-2010 Chris Lattner <sabre@nondot.org> fix a silly fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
1ea9c3d2855de75ee89768696af3eda6aa3de723 28-Jun-2010 Chris Lattner <sabre@nondot.org> fix a silly fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
61203ea721a4ef67b7c157d172605486f60c8670 28-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Add support for traversing initializer lists (in constructors), which
we ignoring before. To give access to the names on the initializer,
which aren't a type or an expr or a decl, I've introduced a new
TraverseInitializer. By default, it just traverses on the expr that
the name is being initialized to.

Reviewed by chandlerc. Tested via clang's 'make test'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
0f8c08843fc6c8abe03654f609e1e03fcc557855 28-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Add support for traversing initializer lists (in constructors), which
we ignoring before. To give access to the names on the initializer,
which aren't a type or an expr or a decl, I've introduced a new
TraverseInitializer. By default, it just traverses on the expr that
the name is being initialized to.

Reviewed by chandlerc. Tested via clang's 'make test'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
fdf2127ed0a1b3e966b2f640ff7b03baf7106aed 28-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce Expr::Classify and Expr::ClassifyModifiable, which determine the classification of an expression under the C++0x taxology (value category). Reimplement isLvalue and isModifiableLvalue using these functions. No regressions in the test suite from this, and my rough performance check doesn't show any regressions either.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2111c855343a0530e236bf0862358ec8d67b28f3 28-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce Expr::Classify and Expr::ClassifyModifiable, which determine the classification of an expression under the C++0x taxology (value category). Reimplement isLvalue and isModifiableLvalue using these functions. No regressions in the test suite from this, and my rough performance check doesn't show any regressions either.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1dafad294043b0c3960a1515e7fcc675930a3e31 28-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support CXXPseudoDestructorExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
de4bd18bb45a1db68996cfb949db3015fc25d10d 28-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support CXXPseudoDestructorExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
55e641cf56260e9213e724a3fff7cebd2adbf890 28-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support DependentScopeDeclRefExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
12dffcddb60380c5bed4f085a1f51534afda3b87 28-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support DependentScopeDeclRefExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
b616e6b9e75231db0a1859cb27db96186c789b94 28-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor PCH reading/writing of template arguments passed to expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
36c76f0bea0d3595a25a5362225c642019cc3176 28-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor PCH reading/writing of template arguments passed to expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
3482f19f4c5f7de444c38951620262bfb2951319 28-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix PCH emitting/reading for template arguments that contain expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
17cfdeda476aa8899f0ccedd9cb9cdb76e89b6b4 28-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix PCH emitting/reading for template arguments that contain expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0161c3c6f1882f87a61266cb7fc20fcc2b83ea5f 28-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Partial fix for PR7267 based on comments by John McCall on an earlier patch.
This is more targeted, as it simply provides toggle actions for the parser to
turn access checking on and off. We then use these to suppress access checking
only while we parse the template-id (included scope specifier) of an explicit
instantiation and explicit specialization of a class template. The
specialization behavior is an extension, as it seems likely a defect that the
standard did not exempt them as it does explicit instantiations.

This allows the very common practice of specializing trait classes to work for
private, internal types. This doesn't address instantiating or specializing
function templates, although those apparently already partially work.

The naming and style for the Action layer isn't my favorite, comments and
suggestions would be appreciated there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
926c4b486a08f698cd3a367fd6f1a3a07604358d 28-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Partial fix for PR7267 based on comments by John McCall on an earlier patch.
This is more targeted, as it simply provides toggle actions for the parser to
turn access checking on and off. We then use these to suppress access checking
only while we parse the template-id (included scope specifier) of an explicit
instantiation and explicit specialization of a class template. The
specialization behavior is an extension, as it seems likely a defect that the
standard did not exempt them as it does explicit instantiations.

This allows the very common practice of specializing trait classes to work for
private, internal types. This doesn't address instantiating or specializing
function templates, although those apparently already partially work.

The naming and style for the Action layer isn't my favorite, comments and
suggestions would be appreciated there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
5f9bc72c9fd4b073c48fc7dd8c8554b7c57efe80 28-Jun-2010 Jordy Rose <jediknil@belkadan.com> Pointer comparisons (and pointer-pointer subtraction). Basically filling in SimpleSValuator::EvalBinOpLL().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SValuator.h
eac4a00e1d93aa963903031ed76425c231f0f0b9 28-Jun-2010 Jordy Rose <jediknil@belkadan.com> Pointer comparisons (and pointer-pointer subtraction). Basically filling in SimpleSValuator::EvalBinOpLL().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SValuator.h
3d897ad92331e29821c049ff0eaae548fd17a3b4 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for -fwrapv, rdar://7221421

As part of this, pull together trapv handling into the same enum.

This also add support for NSW multiplies.

This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
a4d71455f0d418e16cc0c5c5aa55a3bad3494aee 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for -fwrapv, rdar://7221421

As part of this, pull together trapv handling into the same enum.

This also add support for NSW multiplies.

This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
44fad217d390a45a6e927140bfcbd59c5f4fbab5 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for #pragma message, patch by Michael Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/PPCallbacks.h
lang/Lex/Preprocessor.h
abfe094ce71c42656dcb84a3bdc3e79cb3c16fc3 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for #pragma message, patch by Michael Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/PPCallbacks.h
lang/Lex/Preprocessor.h
886613199c8321a42ba3250aa02e0bce7ba2552b 26-Jun-2010 Ted Kremenek <kremenek@apple.com> Add support for CXXRecordDecl in CFGRecStmtDeclVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
f683976830768f207ad70150d14e08b04fe532be 26-Jun-2010 Ted Kremenek <kremenek@apple.com> Add support for CXXRecordDecl in CFGRecStmtDeclVisitor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
8273ec2f5703915cd67d2e84af06617741bfed40 26-Jun-2010 Daniel Dunbar <daniel@zuster.org> clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
c4b8e923a18ba56ecd76de5dfd7edf7f307123e3 26-Jun-2010 Daniel Dunbar <daniel@zuster.org> clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
10b6a8a312b73c2c57c4b00cf906297c5a408979 25-Jun-2010 Ted Kremenek <kremenek@apple.com> Add "checker caching" to GRExprEngine::CheckerVisit to progressively build
a winowed list of checkers that actually do something for a given StmtClass.
As the number of checkers grows, this may potentially significantly reduce
the number of checkers called at any one time. My own measurements show that
for the ~20 registered Checker objects, only ~5 of them respond at any one time
to a give statement. While this isn't a net performance win right now (there
is a minor slowdown on sqlite.3) this improvement does greatly improve debugging
when stepping through the checkers used to evaluate a given statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/GRExprEngine.h
9e9595b12e9b55586c4d50d370f429c7a3c92a90 25-Jun-2010 Ted Kremenek <kremenek@apple.com> Add "checker caching" to GRExprEngine::CheckerVisit to progressively build
a winowed list of checkers that actually do something for a given StmtClass.
As the number of checkers grows, this may potentially significantly reduce
the number of checkers called at any one time. My own measurements show that
for the ~20 registered Checker objects, only ~5 of them respond at any one time
to a give statement. While this isn't a net performance win right now (there
is a minor slowdown on sqlite.3) this improvement does greatly improve debugging
when stepping through the checkers used to evaluate a given statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/GRExprEngine.h
6eff16e9521f4df69b3b64ddb018f961071086a8 25-Jun-2010 Daniel Dunbar <daniel@zuster.org> build: Add a generated Version.inc file instead of duplicating information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
lang/Basic/Version.h
lang/Basic/Version.inc.in
a510767963e6bf04f0bc15de057f6bafa0aedab5 25-Jun-2010 Daniel Dunbar <daniel@zuster.org> build: Add a generated Version.inc file instead of duplicating information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
lang/Basic/Version.h
lang/Basic/Version.inc.in
a31bec64c1fc6fcd43f7e93085022a97cb1f43b9 25-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support NonTypeTemplateParmDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
b24e199fbd17af780ab000c5862d191e4daffc0f 25-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support NonTypeTemplateParmDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
cda37f2f04caa0b1544b6ee8cbe37924fc48e04f 25-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support DependentTemplateSpecializationType and ElaboratedType for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
3acad62a239448bef0f5848b2a0d5f7dfefd3d14 25-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support DependentTemplateSpecializationType and ElaboratedType for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
36633ae1d4e6cff08557e7dcfaaad355015f7306 25-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support UnresolvedLookupExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
bd65bb511c26549c96b829c1282e4c877588564a 25-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support UnresolvedLookupExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
48d8d808b7f109f33eeda88192874b0708684892 25-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support UnresolvedMemberExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
a77eb0862507b900a10fa352af1568e639ed10b1 25-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support UnresolvedMemberExpr for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/StmtNodes.td
lang/Frontend/PCHBitCodes.h
39683dcf7e2465bdab8bd33c8b39f096be7dcf38 25-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Implement dependent alignment attribute support. This is a bit gross given the
current attribute system, but it is enough to handle class templates which
specify parts of their alignment in terms of their template parameters.

This also replaces the attributes test in SemaTemplate with one that actually
tests working attributes instead of broken ones. I plan to add more tests here
for non-dependent attributes in a subsequent patch.

Thanks to John for walking me through some of this. =D


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
4ced79f0971592e6e7122037de69ee9ae534ce72 25-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Implement dependent alignment attribute support. This is a bit gross given the
current attribute system, but it is enough to handle class templates which
specify parts of their alignment in terms of their template parameters.

This also replaces the attributes test in SemaTemplate with one that actually
tests working attributes instead of broken ones. I plan to add more tests here
for non-dependent attributes in a subsequent patch.

Thanks to John for walking me through some of this. =D


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
93f872664c3a7ed49491f9ca37ccb00d581dd5eb 24-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support a couple more C++ Exprs for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106727 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
8dfbd8b252ba4e6cf4b7a3422f6ef0ca21312dfe 24-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support a couple more C++ Exprs for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106727 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
451602570c13a8524eaa2f42bc7114dfa48d9677 24-Jun-2010 Ted Kremenek <kremenek@apple.com> Add 'VisitEndAnalysis' callback to Checker class. This callback is called by GRExprEngine
when the worklist algorithm has terminated. This allows some checkers to do a post-analysis
phase after all paths have been analyzed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
ccc263b44c62ce3a02f797a3ddb3d6017cf0e5e4 24-Jun-2010 Ted Kremenek <kremenek@apple.com> Add 'VisitEndAnalysis' callback to Checker class. This callback is called by GRExprEngine
when the worklist algorithm has terminated. This allows some checkers to do a post-analysis
phase after all paths have been analyzed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
f19e9c4a68ff60c399edbdba8051fd5dc7f6d17e 23-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add isArrayType() to CanProxy's forwarders.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
f4c46193637631fc993d926ff31c7cb18c090d21 23-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add isArrayType() to CanProxy's forwarders.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
391ab4776eb37da646a7597c3fd4f1f19167daaa 23-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support C++ class template specializations and partial specializations for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
dd41c14bfd7686b556de2acf6952e21a4f80b7aa 23-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support C++ class template specializations and partial specializations for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0a5ea76d1c951cab7c6dbf3b52ce2dcce1c9dbb2 23-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Modify ClassTemplateSpecializationDecl and ClassTemplatePartialSpecializationDecl to allow PCH read/write.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
94d228d3454a3f6436526d15b2ad7fc90246fe54 23-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modify ClassTemplateSpecializationDecl and ClassTemplatePartialSpecializationDecl to allow PCH read/write.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
9484f8eade39f9d22deb26abdd6c1c804b820eac 23-Jun-2010 Chris Lattner <sabre@nondot.org> improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
788b0fd67e1992f23555454efcdb16a19dfefac3 23-Jun-2010 Chris Lattner <sabre@nondot.org> improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
a20e00282c792f039b1abecec2b00fb392a19dae 23-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to provide separate ASTs for multiple ObjC class extension
declarations (implements radar 7928731).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
80aa1cd7973561889e51c1c152c8990a8de9c953 23-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to provide separate ASTs for multiple ObjC class extension
declarations (implements radar 7928731).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
972c24b2303bfe52efe3049d7ff75a15abcab6f0 23-Jun-2010 Daniel Dunbar <daniel@zuster.org> Support -mios-version-min= as an alias for -miphoneos-version-min=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
e4eae6a5768357edbed80034cbc4670dde313b4d 23-Jun-2010 Daniel Dunbar <daniel@zuster.org> Support -mios-version-min= as an alias for -miphoneos-version-min=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
1a7c1b12a61ed17f914c9d557dd6666e0253c133 23-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Change Type::isFloatingType() to reflect the actual definition of a
"floating type" in C, which does not include vector types. Introduce
Type::hasFloatingRepresentation() for the places where we want to know
whether the underlying representation is one or more floating-point
values. Remove some hacks we had where the former behavior of
Type::isFloatingType() was at odds with the language definition of the
term.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
8eee119bf4f1693dde17b8552c1f9f81bf2b681e 23-Jun-2010 Douglas Gregor <dgregor@apple.com> Change Type::isFloatingType() to reflect the actual definition of a
"floating type" in C, which does not include vector types. Introduce
Type::hasFloatingRepresentation() for the places where we want to know
whether the underlying representation is one or more floating-point
values. Remove some hacks we had where the former behavior of
Type::isFloatingType() was at odds with the language definition of the
term.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
93ee72fccf528c96e49532cc03b120a715477488 22-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write CXXDeleteExpr from/to PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
95fc98ce95d4faa4f1bb2783384150530404ea6f 22-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write CXXDeleteExpr from/to PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
35ebf7648592408db2ae6fde66038239f79351ac 22-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> When we ask for the enumerators of an EnumDecl, make sure we get them even if we have a EnumDecl that is not the definition of the enumeration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0e5abbe065ab7fb9e3b03b4d25fac3f2dd4b2389 22-Jun-2010 Douglas Gregor <dgregor@apple.com> When we ask for the enumerators of an EnumDecl, make sure we get them even if we have a EnumDecl that is not the definition of the enumeration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
978e59a58b8f241c5767939a68cfd272b4b98686 22-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> In C++, allow a declaration of an enum to follow a definition of that
enum as a GNU extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f3a7b7cfacf802db5458874842b71a74845f0023 22-Jun-2010 Douglas Gregor <dgregor@apple.com> In C++, allow a declaration of an enum to follow a definition of that
enum as a GNU extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c3a55600fa04db93b614d29f665b284fd5bb409e 22-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> -Introduce PCHReader::ReadTemplateArgumentLoc()
-Introduce PCHWriter::AddTemplateArgumentLocInfo()
-Modify PCHWriter::AddTemplateArgumentLoc() to also write TemplateArgumentLoc's TemplateArgument
and move the existing calls of AddTemplateArgumentLoc() to AddTemplateArgumentLocInfo().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
44f8c37e378f716e8cbb600e3800f437cf58f9e5 22-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Introduce PCHReader::ReadTemplateArgumentLoc()
-Introduce PCHWriter::AddTemplateArgumentLocInfo()
-Modify PCHWriter::AddTemplateArgumentLoc() to also write TemplateArgumentLoc's TemplateArgument
and move the existing calls of AddTemplateArgumentLoc() to AddTemplateArgumentLocInfo().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
27af33596d39eebc6a70af17022e09237fba96a8 22-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Make it easier to read/write the template part of FunctionDecl.

Introduce:
-FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated
FunctionDecl it is.
-An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of
TemplateArguments and TemplateArgumentLocs
-A constructor to TemplateArgumentList which accepts an array of TemplateArguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
d0913557c800c8a712fb554032a833619f23bc56 22-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make it easier to read/write the template part of FunctionDecl.

Introduce:
-FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated
FunctionDecl it is.
-An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of
TemplateArguments and TemplateArgumentLocs
-A constructor to TemplateArgumentList which accepts an array of TemplateArguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
ec29bc0265b0a67e7e47947fd5e0707f46c15d4a 22-Jun-2010 Victor Hsieh <victorhsieh@google.com> Support foo.{r,g,b,a}, where foo is a float4.

Change-Id: I68e9c36406db77bd0025c33cdbfc55324fa40568
lang/AST/Type.h
b377aed9fc0a90a0788af717c5a37c871061b7ce 22-Jun-2010 Chris Lattner <sabre@nondot.org> implement support for -finstrument-functions, patch by Nelson
Elhage!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
7255a2d997b15beae82e627052fdb1b2474495c2 22-Jun-2010 Chris Lattner <sabre@nondot.org> implement support for -finstrument-functions, patch by Nelson
Elhage!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/CodeGenOptions.h
880e7654b8ac173f0275d947ccd0d328efc2926b 22-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Alter the internal representation of the condition variable in
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.

In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children.

Fixes the remainder of <rdar://problem/8104754>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
43dec6bbde2d0a16c35978983761c8b7030c8e18 22-Jun-2010 Douglas Gregor <dgregor@apple.com> Alter the internal representation of the condition variable in
if/while/switch/for statements to ensure that walking the children of
these statements actually works. Previously, we stored the condition
variable as a VarDecl. However, StmtIterator isn't able to walk from a
VarDecl to a set of statements, and would (in some circumstances) walk
beyond the end of the list of statements, cause Bad Behavior.

In this change, we've gone back to representing the condition
variables as DeclStmts. While not as memory-efficient as VarDecls, it
greatly simplifies iteration over the children.

Fixes the remainder of <rdar://problem/8104754>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
21f341354d60678be3d60659f72578a8df1611e4 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for querying the return type of Objective-C methods. This is done by
adding a clang_getCursorResultType() function (which complements clang_getResultType()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106473 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9a140845438c2fc31e7d48a6dedbc695f4c83c68 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for querying the return type of Objective-C methods. This is done by
adding a clang_getCursorResultType() function (which complements clang_getResultType()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106473 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9db3a9116284cfe539efbc5b67022456c06a5e39 21-Jun-2010 Chris Lattner <sabre@nondot.org> accept and ignore two more gcc warning flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
dbc4c465a0eabd42b3cb16edc610aceb48ac7823 21-Jun-2010 Chris Lattner <sabre@nondot.org> accept and ignore two more gcc warning flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
790ad0dd6501813eb72dd06f16c70f4058558a26 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for FunctionNoProto and FunctionProto types. This includes adding a new
function, clang_getResultType(), which returns the result type of the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106459 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
04c3cf35a80c09ab78e519f2e71ecccd5c5d8da0 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for FunctionNoProto and FunctionProto types. This includes adding a new
function, clang_getResultType(), which returns the result type of the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106459 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e7c0620f661ae13977dd84808a6272d8b256e4ff 21-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Combine ClassTemplateDecl's PreviousDeclaration with CommonPtr, as in FunctionTemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
5bf1bdc2fedb0c29b5fcdb4abc852aa85b4fe26a 21-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Combine ClassTemplateDecl's PreviousDeclaration with CommonPtr, as in FunctionTemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
d790bfc3139f59f1cc8ac82d807faad23a6fd7d7 21-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement remaining codegen for NEON, all operations should now work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
4be54302da40d3e7cba3d93115f312d2fcca1879 21-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement remaining codegen for NEON, all operations should now work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/arm_neon.td
c347f6656222239271e001ee9cb969b5bea560a5 20-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support PCH emitting/reading of using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b01a552d7bafb889305affe83018563620aab326 20-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support PCH emitting/reading of using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
7d389db9973da96f2d8d1c6b883b870982cb29ec 19-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Initial support for reading templates from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Frontend/PCHReader.h
8731ca76acf81826df7048bffd0c44c7c0f96c7f 19-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Initial support for reading templates from PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Frontend/PCHReader.h
8afa992603cad8847139aafd3de333f80f757cd5 19-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Initial support for writing templates to PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
90b715e0df34eae2b50b9b43ec60828ed31dcf94 19-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Initial support for writing templates to PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
4b41460c165e06b7c5edec8e436c3f58be3376a5 19-Jun-2010 Anton Korobeynikov <asl@math.spbu.ru> More AltiVec support.
Patch by Anton Yartsev!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsPPC.def
4d3a7b0a0608febe3cdac68f6121546672ca875e 19-Jun-2010 Anton Korobeynikov <asl@math.spbu.ru> More AltiVec support.
Patch by Anton Yartsev!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsPPC.def
83d9019aa4da071f1ac5be3f59bde623a702108f 19-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> More Sema Check and a test case for init_priority attr.
(radar 8076356).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b9d5c22529c3f2bf3b03348021c0fd1c723d8516 19-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> More Sema Check and a test case for init_priority attr.
(radar 8076356).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d7bdd8d477e70fc3424777c5fed590d2ea6f38bd 19-Jun-2010 Jordy Rose <jediknil@belkadan.com> Fold additive constants, and support comparsions of the form $sym+const1 <> const2


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ba0f61cf5363f80e3241dc754235dfb246afe320 19-Jun-2010 Jordy Rose <jediknil@belkadan.com> Fold additive constants, and support comparsions of the form $sym+const1 <> const2


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
78eef07e2d081112922d5c5de20af6780c2a1f91 19-Jun-2010 Chris Lattner <sabre@nondot.org> introduce a new CharSourceRange class, and enhance the diagnostics routines
to use them instead of SourceRange. CharSourceRange is just a SourceRange
plus a bool that indicates whether the range has the end character resolved
or whether the end location is the start of the end token. While most of
the compiler wants to think of ranges that have ends that are the start of
the end token, the printf diagnostic stuff wants to highlight ranges within
tokens.

This is transparent to the diagnostic stuff. To start taking advantage of
the new capabilities, you can do something like this:
Diag(..) << CharSourceRange::getCharRange(Begin,End)





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Basic/SourceLocation.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Rewrite/Rewriter.h
0a76aae8c03cb7dd7bdbe683485560afaf695959 19-Jun-2010 Chris Lattner <sabre@nondot.org> introduce a new CharSourceRange class, and enhance the diagnostics routines
to use them instead of SourceRange. CharSourceRange is just a SourceRange
plus a bool that indicates whether the range has the end character resolved
or whether the end location is the start of the end token. While most of
the compiler wants to think of ranges that have ends that are the start of
the end token, the printf diagnostic stuff wants to highlight ranges within
tokens.

This is transparent to the diagnostic stuff. To start taking advantage of
the new capabilities, you can do something like this:
Diag(..) << CharSourceRange::getCharRange(Begin,End)





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Basic/SourceLocation.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Rewrite/Rewriter.h
2f08858b0aa8e90be4e3682aac0797582624f7cd 18-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Implements Sema part of init_priority(priority) attribute
(radar 8076356) - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
521f12d3dfdbb0e93d1bcb503d074e67acdc489c 18-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Implements Sema part of init_priority(priority) attribute
(radar 8076356) - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/Attr.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
fbe5d221177a87d2d30c17586a09ca7c0218d475 18-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Merge the "regparm" attribute from a previous declaration of a
function to redeclarations of that function. Fixes PR7025.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d2c6490385555eaabfaf611d1cf6e89544163c4a 18-Jun-2010 Douglas Gregor <dgregor@apple.com> Merge the "regparm" attribute from a previous declaration of a
function to redeclarations of that function. Fixes PR7025.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0ed75c0ee848bb8e27f97672f2522607288b26a6 18-Jun-2010 Gabor Greif <ggreif@gmail.com> John called for a less surprising cast

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
4ab92891a53adda8c52c1947351371da58e33f64 18-Jun-2010 Gabor Greif <ggreif@gmail.com> John called for a less surprising cast

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
2be7e0dc9029352174ae6aa1eccf773e034d40bc 18-Jun-2010 Tom Care <tcare@apple.com> Printf format strings: Added some more tests and fixed some minor bugs.
- Precision toStrings shouldn't print a dot when they have no value.
- Length of char length modifier is now returned correctly.
- Added several fixit tests.

Note: fixit tests are currently broken due to a bug in HighlightRange. Marking as XFAIL for now.

M test/Sema/format-strings-fixit.c
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
4c6021995032a898fb0502d5d1fd2df37638e57b 18-Jun-2010 Tom Care <tcare@apple.com> Printf format strings: Added some more tests and fixed some minor bugs.
- Precision toStrings shouldn't print a dot when they have no value.
- Length of char length modifier is now returned correctly.
- Added several fixit tests.

Note: fixit tests are currently broken due to a bug in HighlightRange. Marking as XFAIL for now.

M test/Sema/format-strings-fixit.c
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
1dbefeb8227ecc65dce94223ddd86d249a78b6cb 18-Jun-2010 Sean Hunt <rideau3@gmail.com> Rewrite comment to make my intentions slightly more clear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
568e598bf8e89b09a4ebc8c21430e1bd1ba6d11d 18-Jun-2010 Sean Hunt <rideau3@gmail.com> Rewrite comment to make my intentions slightly more clear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
e11f2e1ba3a82176eff14f21ba1ea9e15207fe04 18-Jun-2010 Ted Kremenek <kremenek@apple.com> Change two static variables into instance variables of ASTContext. This allows us to have multiple copies
of ASTContext at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f057bf78a69d37ee511430c88852a85eea19ad15 18-Jun-2010 Ted Kremenek <kremenek@apple.com> Change two static variables into instance variables of ASTContext. This allows us to have multiple copies
of ASTContext at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b2f395069145e9853bfc33a63dd0aa0efb5ff1e2 18-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Given Decl::isUsed() a flag indicating when to consider the "used"
attribute as part of the calculation. Sema::MarkDeclReferenced(), and
a few other places, want only to consider the "used" bit to determine,
e.g, whether to perform template instantiation. Fixes a linkage issue
with Boost.Serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
c070cc602d6eefea881f71a60de09e05b54c3fdd 18-Jun-2010 Douglas Gregor <dgregor@apple.com> Given Decl::isUsed() a flag indicating when to consider the "used"
attribute as part of the calculation. Sema::MarkDeclReferenced(), and
a few other places, want only to consider the "used" bit to determine,
e.g, whether to perform template instantiation. Fixes a linkage issue
with Boost.Serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
aa20f645e13e6eb8c3854a2d19421f2cc36e2ec0 18-Jun-2010 Tom Care <tcare@apple.com> Bug 7394 - Fixed toString representation of Precisions in format strings.

M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
f521d6e151e0cf443bb767c6a83c06ea411530f8 18-Jun-2010 Tom Care <tcare@apple.com> Bug 7394 - Fixed toString representation of Precisions in format strings.

M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
b8e13e65f4d92ca1487167a88bd56b7f17558df7 17-Jun-2010 Zhanyong Wan <wan@google.com> Improves RecursiveASTVisitor:

* refactors code in DEF_TRAVERSE_DECL() into
TraverseDeclContextHelper() to reduce code bloat and facilitate
reuse.
* makes the order of traversing a FunctionDecl (including its
subclasses)'s children more natural: before the function parameters
are visited after the function body; now they are visited after the
function type and before the function body.
* fixes a double count for function return type and arguments.

Reviewed by chandlerc and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
0c05a1bae9e8a57f56663991d0442a69df34a003 17-Jun-2010 Zhanyong Wan <wan@google.com> Improves RecursiveASTVisitor:

* refactors code in DEF_TRAVERSE_DECL() into
TraverseDeclContextHelper() to reduce code bloat and facilitate
reuse.
* makes the order of traversing a FunctionDecl (including its
subclasses)'s children more natural: before the function parameters
are visited after the function body; now they are visited after the
function type and before the function body.
* fixes a double count for function return type and arguments.

Reviewed by chandlerc and csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
cc9aa159c15c524f4a5fc73ac90e02a8578e9d29 17-Jun-2010 Tom Care <tcare@apple.com> Bug 7377: Fixed several bad printf format string bugs.
- Added warning for undefined behavior when using field specifier
- Added warning for undefined behavior when using length modifier
- Fixed warnings for invalid flags
- Added warning for ignored flags
- Added fixits for the above warnings
- Fixed accuracy of detecting several undefined behavior conditions
- Receive normal warnings in addition to security warnings when using %n
- Fix bug where '+' flag would remain on unsigned conversion suggestions

Summary of changes:
- Added expanded tests
- Added/expanded warnings
- Added position info to OptionalAmounts for fixits
- Extracted optional flags to a wrapper class with position info for fixits
- Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior
- Fixed conversion specifier checking to conform to C99 standard
- Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier

Note: warnings involving the ' ' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly.

M test/Sema/format-strings.c
M include/clang/Basic/DiagnosticSemaKinds.td
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
M lib/Sema/SemaChecking.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
e4ee9663168dfb2b4122c768091e30217328c9fa 17-Jun-2010 Tom Care <tcare@apple.com> Bug 7377: Fixed several bad printf format string bugs.
- Added warning for undefined behavior when using field specifier
- Added warning for undefined behavior when using length modifier
- Fixed warnings for invalid flags
- Added warning for ignored flags
- Added fixits for the above warnings
- Fixed accuracy of detecting several undefined behavior conditions
- Receive normal warnings in addition to security warnings when using %n
- Fix bug where '+' flag would remain on unsigned conversion suggestions

Summary of changes:
- Added expanded tests
- Added/expanded warnings
- Added position info to OptionalAmounts for fixits
- Extracted optional flags to a wrapper class with position info for fixits
- Added several methods to validate a FormatSpecifier by component, each checking for undefined behavior
- Fixed conversion specifier checking to conform to C99 standard
- Added hooks to detect the invalid states in CheckPrintfHandler::HandleFormatSpecifier

Note: warnings involving the ' ' (space) flag are temporarily disabled until whitespace highlighting no longer triggers assertions. I will make a post about this on cfe-dev shortly.

M test/Sema/format-strings.c
M include/clang/Basic/DiagnosticSemaKinds.td
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
M lib/Sema/SemaChecking.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
976d174ca7df21123db7901c5d8d0af328bc1568 17-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Update CMake build system for ARM NEON generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
2390b62f3afd9cc83d03a1972d4533eb52c246a4 17-Jun-2010 Douglas Gregor <dgregor@apple.com> Update CMake build system for ARM NEON generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
05b090c139038551a2d34c572242eefa9aa0ee46 17-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Some fixes to type-visiting -- a few places where the type-name was
explicitly typed in the source, but we weren't recursing on it. One
is new <type>, the other is <type>() (eg int()).

I also fixed the initializer parsing to parse on the syntactic
initializer list, not the semantic. Usually they'll be identical, so
this won't affect much in practice, but keeps the AST as a syntax-tree
visitor.

Reviewed by chandlerc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
ea245e0ba48caf7e7acf870880c030d7ddc76667 17-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Some fixes to type-visiting -- a few places where the type-name was
explicitly typed in the source, but we weren't recursing on it. One
is new <type>, the other is <type>() (eg int()).

I also fixed the initializer parsing to parse on the syntactic
initializer list, not the semantic. Usually they'll be identical, so
this won't affect much in practice, but keeps the AST as a syntax-tree
visitor.

Reviewed by chandlerc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
18b01bd5d2e05de5e6789f153d160dbb86f465c9 17-Jun-2010 Gabor Greif <ggreif@gmail.com> fix some more gcc3.4 constness warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Lex/Token.h
170e5080011acc60e33ec9b53f96c569a1078aa9 17-Jun-2010 Gabor Greif <ggreif@gmail.com> fix some more gcc3.4 constness warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Lex/Token.h
55e30215018a5ba4942c9bc42f67fc84f3f12a8f 17-Jun-2010 Gabor Greif <ggreif@gmail.com> use typedef to make hack more transparent and also appease gcc3.4 constness warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
40844a8b5a89676fb61898d61ea4a7fa98eb9b6b 17-Jun-2010 Gabor Greif <ggreif@gmail.com> use typedef to make hack more transparent and also appease gcc3.4 constness warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
0764180a80beca031068b74e9916790e3d230b17 17-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Make sure parens/braces/brackets are correctly balanced.

In a line like:

(;

the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren).
This may affect later parsing and result in bad recovery for parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
36d36806f1972f7ec1d2a3f59155187278c56508 17-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make sure parens/braces/brackets are correctly balanced.

In a line like:

(;

the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren).
This may affect later parsing and result in bad recovery for parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
82993fb53c6c2dece1c227398e9a27b85c014e32 17-Jun-2010 Ted Kremenek <kremenek@apple.com> Include the bug description in the report hash so that we can emit multiple bugs of the same
type at the same location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
1a0c8b9183fde84982aea9190a55fde1541c432d 17-Jun-2010 Ted Kremenek <kremenek@apple.com> Include the bug description in the report hash so that we can emit multiple bugs of the same
type at the same location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
8e68334c94fee2c342d0279077399313b3b14a67 17-Jun-2010 Nate Begeman <natebegeman@mac.com> Generate arm_neon.inc in include/clang/Basic, which provides:
1. builtins definitions for BuiltinsARM.def
2. intrinsic validation code for SemaChecking

Unsure as to whether this is the best way to handle the make dependencies or not.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
lang/Basic/Makefile
lang/Basic/arm_neon.td
a23326b5c244a03bf61ebb86db60a777ea26f926 17-Jun-2010 Nate Begeman <natebegeman@mac.com> Generate arm_neon.inc in include/clang/Basic, which provides:
1. builtins definitions for BuiltinsARM.def
2. intrinsic validation code for SemaChecking

Unsure as to whether this is the best way to handle the make dependencies or not.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
lang/Basic/Makefile
lang/Basic/arm_neon.td
b29183de8a86ac86ad770db9cba35bee7cef3ee1 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Comment Attr.td so people have a better understanding of what goes on.

Also removed the unused Aliases member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
9c3e84ffe0938cd6a73dd16d9a8b54b498863fef 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Comment Attr.td so people have a better understanding of what goes on.

Also removed the unused Aliases member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Attr.td
a4b3ffccfca26b28cfaadbceb5dc74eac46804b5 17-Jun-2010 Ted Kremenek <kremenek@apple.com> Fix format string checking of '%c' by treating it as an integer conversion. Fixes PR 7391.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
01cb1aa458516b9061a65ea4b8a2ca55f71cb34f 17-Jun-2010 Ted Kremenek <kremenek@apple.com> Fix format string checking of '%c' by treating it as an integer conversion. Fixes PR 7391.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
fceaf738583911b13064c8360343576ec2a777cd 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Fix yet another CMake typo. I'm not quite sure how this succeeded locally now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
6ec9debb2ae0755168974dc52e9e9122724ddbf4 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Fix yet another CMake typo. I'm not quite sure how this succeeded locally now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
90772c5cec039c7dfdd19697aa68f4c48fcb2cf9 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Fix a typo in the previous commit I thought I'd fixed, but apparently didn't.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
7028a17d30e27d1c1383421b39374426a7c63656 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Fix a typo in the previous commit I thought I'd fixed, but apparently didn't.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
00f90b974369ccd699c3d29e4edef8526d78083c 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Update CMake build for new attribute changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
lang/Basic/CMakeLists.txt
ee6e4b4baa1acd85ba8b142862ac5986621aaffd 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Update CMake build for new attribute changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
lang/Basic/CMakeLists.txt
cac02dc2db388820b0353c8b6509b3b709274344 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Implement first TD-based usage of attributes.

Currently, there are two effective changes:

- Attr::Kind has been changed to attr::Kind, in a separate namespace
rather than the Attr class. This is because the enumerator needs to
be visible to parse.
- The class definitions for the C++0x attributes other than aligned are
generated by TableGen.

The specific classes generated by TableGen are controlled by an array in
TableGen (see the accompanying commit to the LLVM repository). I will be
expanding the amount of code generated as I develop the new attributes system
while initially keeping it confined to these attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Makefile
lang/Basic/Attr.td
lang/Basic/AttrKinds.h
lang/Basic/DeclNodes.td
lang/Basic/Makefile
lang/Basic/StmtNodes.td
387475d0c18aaeb022108de9d33b6c9fb7998843 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Implement first TD-based usage of attributes.

Currently, there are two effective changes:

- Attr::Kind has been changed to attr::Kind, in a separate namespace
rather than the Attr class. This is because the enumerator needs to
be visible to parse.
- The class definitions for the C++0x attributes other than aligned are
generated by TableGen.

The specific classes generated by TableGen are controlled by an array in
TableGen (see the accompanying commit to the LLVM repository). I will be
expanding the amount of code generated as I develop the new attributes system
while initially keeping it confined to these attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Makefile
lang/Basic/Attr.td
lang/Basic/AttrKinds.h
lang/Basic/DeclNodes.td
lang/Basic/Makefile
lang/Basic/StmtNodes.td
6be486f7d07c261eedd4c8fda028741a08a39066 17-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Make the "extra ';' inside a struct or union" diagnostic more
precise. Fixes PR7336.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f13ca06e57ac094ed05ea08c26a499af1ba0ce88 17-Jun-2010 Douglas Gregor <dgregor@apple.com> Make the "extra ';' inside a struct or union" diagnostic more
precise. Fixes PR7336.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
16b009cf11f3c61b871d2f25b1f521225ba86f3c 17-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> When we see a 'template' disambiguator that marks the next identifier
(or operator-function-id) as a template, but the context is actually
non-dependent or the current instantiation, allow us to use knowledge
of what kind of template it is, e.g., type template vs. function
template, for further syntactic disambiguation. This allows us to
parse properly in the presence of stray "template" keywords, which is
necessary in C++0x and it's good recovery in C++98/03.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d6ab232bb3ec9847de5af06249afb63078b5f2ee 17-Jun-2010 Douglas Gregor <dgregor@apple.com> When we see a 'template' disambiguator that marks the next identifier
(or operator-function-id) as a template, but the context is actually
non-dependent or the current instantiation, allow us to use knowledge
of what kind of template it is, e.g., type template vs. function
template, for further syntactic disambiguation. This allows us to
parse properly in the presence of stray "template" keywords, which is
necessary in C++0x and it's good recovery in C++98/03.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2a5941c3fbd9b1601c64959295c47f13a14bf7c0 17-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Fix the recently-added warning about 'typename' and 'template'
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
1a15dae8be2b28e02b6639aa92b832465c5be420 17-Jun-2010 Douglas Gregor <dgregor@apple.com> Fix the recently-added warning about 'typename' and 'template'
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
36be1a672ff7f0d7c8e4ab725e9e084ab52b048a 16-Jun-2010 Ted Kremenek <kremenek@apple.com> Extend format string type-checking to include '%p'. Fixes remaining cases PR 4468.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
13927a431dd733336cfd664bf0840747a71b0a43 16-Jun-2010 Ted Kremenek <kremenek@apple.com> Extend format string type-checking to include '%p'. Fixes remaining cases PR 4468.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
9951415a2b9daf6bfc6711c5f267289764e5a5f9 16-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Canonicalize template template parameters when canonicalizing a
template name that refers to such a parameter. It's amazing that this
problem didn't surface earlier. Fixes PR7387.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3e1274f2b99cb99c03cc8e2c6517c37d330b597a 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Canonicalize template template parameters when canonicalizing a
template name that refers to such a parameter. It's amazing that this
problem didn't surface earlier. Fixes PR7387.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1e1c7b4b83b25babcc6c6685a201721288b1341e 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Make sure result type of objc++ message expression is
complete before attempting to bind it to a temporary.
Fixes PR7386.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d4266629ed62e3a0de5e2cb2dfb8e806f9bdc5f6 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Make sure result type of objc++ message expression is
complete before attempting to bind it to a temporary.
Fixes PR7386.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5f4a5f69d7a81187c9219254bbfd5685e4bd23cb 16-Jun-2010 Zhanyong Wan <wan@google.com> Test commit by adding a blank comment line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
2ac54ec0a8ad305fdd76847c2fd6631cfb7baa82 16-Jun-2010 Zhanyong Wan <wan@google.com> Test commit by adding a blank comment line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
9388e882c413cd3d9720f708bfcd275fd69c2be0 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendOptions.h
lang/Frontend/FrontendPluginRegistry.h
3177aae51a21f61ab483c52f97124bdb707da7f1 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendOptions.h
lang/Frontend/FrontendPluginRegistry.h
c31f784cea540af7e41affbde170d60e47a21315 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Ignore -ffast-math and -f[no-]finite-math-only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
7ccecb72cb8e0a77139526bd090cf8c68ba178cd 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Ignore -ffast-math and -f[no-]finite-math-only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f3445fac2dbed94a87389bab434a2fefe5d419c2 16-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Downgrade the error when using a typedef in the nested-name-specifier
of an explicit instantiation to an ExtWarn, since nobody else seems to
diagnose this problem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a2dd828ce66a67bc21c3a553e2d99ca4f182d923 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Downgrade the error when using a typedef in the nested-name-specifier
of an explicit instantiation to an ExtWarn, since nobody else seems to
diagnose this problem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0f030642dd0f7a166feefb692626e2527a49909d 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixed conflict between objc_memmove_collectable builtin
decl. and one ddefined in darwin header file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
8e2eab27056a78bf1db50ee09929438ed5ea9d93 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixed conflict between objc_memmove_collectable builtin
decl. and one ddefined in darwin header file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
25560122fbc4a39c864695b170e4ff9009e1f273 16-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r106099; it broke self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
efed5c832de630715dd42211dd3b2aab5dd97a1b 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Revert r106099; it broke self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
a7bf34440df135029859cedd15a83072dc08ae66 16-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TemplateTypeParmType::getDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
6cd8087e66d706f2317865f86c865fd9bc6969c9 16-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TemplateTypeParmType::getDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
f9d3b7cebcd83f5a0d8bc07b7d46f1c6cce082fd 16-Jun-2010 Zhongxing Xu <xuzhongxing@gmail.com> We return Loc where we know.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
bd409d040bffef3e7ba862941dd706b1f7021141 16-Jun-2010 Zhongxing Xu <xuzhongxing@gmail.com> We return Loc where we know.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
12b4f77d61b42f2728e457dc7dce2fe60880a1c2 16-Jun-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add StreamChecker. This checker models and checks stream manipulation functions.
This is the start.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
c196095fa0b83d10b2c20fccfcb8198ee66451aa 16-Jun-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add StreamChecker. This checker models and checks stream manipulation functions.
This is the start.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
7fcbab0d9ed96afbdcc3dd4ad876bcbf452fd25f 16-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Give Type::isIntegralType() an ASTContext parameter, so that it
provides C "integer type" semantics in C and C++ "integral type"
semantics in C++.

Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9d3347a5887d2d25afe8b0bd35783a72ec86cce2 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Give Type::isIntegralType() an ASTContext parameter, so that it
provides C "integer type" semantics in C and C++ "integral type"
semantics in C++.

Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
59327f06fa557d652e0560e6895c93db70ea5ec7 16-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce Type::isIntegralOrEnumerationType(), to cover those places
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
2ade35e2cfd554e49d35a52047cea98a82787af9 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Introduce Type::isIntegralOrEnumerationType(), to cover those places
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
cd76ed8d5422128fddeb7d0bd0aed6274d43c9c2 16-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Move CodeGenOptions.h *back* into Frontend. This should have been done when the
dependency edge was reversed such that CodeGen depends on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Frontend/CodeGenOptions.h
lang/Frontend/CompilerInvocation.h
06057cef0bcd7804e80f3ce2bbe352178396c715 16-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Move CodeGenOptions.h *back* into Frontend. This should have been done when the
dependency edge was reversed such that CodeGen depends on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Frontend/CodeGenOptions.h
lang/Frontend/CompilerInvocation.h
3c4b2d89607c852447bc632b4962add54d321fa7 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch adds support for copying of those
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
55bcace250e1ff366e4482714b344b8cbc8be5f3 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch adds support for copying of those
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
07022fe28c83b67459b518649842c570dc4eda42 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Update equality and relationship comparisons of pointers to reflect
C++ semantics, eliminating an extension diagnostic that doesn't match
C++ semantics (ordered comparison with NULL) and tightening some
extwarns to errors in C++ to match GCC and maintain conformance in
SFINAE contexts. Fixes <rdar://problem/7941392>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6e5122c8ce152e19355b707d952ab53fe58bd7ad 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Update equality and relationship comparisons of pointers to reflect
C++ semantics, eliminating an extension diagnostic that doesn't match
C++ semantics (ordered comparison with NULL) and tightening some
extwarns to errors in C++ to match GCC and maintain conformance in
SFINAE contexts. Fixes <rdar://problem/7941392>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
83b724f3af834f993bf0162ced6a67045622cc18 15-Jun-2010 Chris Lattner <sabre@nondot.org> fix the various buildbot failures by ensuring that tokens are really completely initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
c54539cd173e20d8b179b9488fabfc5eb4cf5ee6 15-Jun-2010 Chris Lattner <sabre@nondot.org> fix the various buildbot failures by ensuring that tokens are really completely initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
fba74842b08b8c1cd5ea9d1c4968cde0db848703 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration

Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/AnalysisConsumer.h
lang/Checker/FrontendActions.h
lang/Checker/PathDiagnosticClients.h
lang/CodeGen/BackendUtil.h
lang/CodeGen/CodeGenAction.h
lang/Frontend/ASTConsumers.h
lang/Frontend/AnalysisConsumer.h
lang/Frontend/AnalyzerOptions.h
lang/Frontend/BackendUtil.h
lang/Frontend/CodeGenAction.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendActions.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/Utils.h
lang/Rewrite/ASTConsumers.h
lang/Rewrite/FixItRewriter.h
lang/Rewrite/FrontendActions.h
lang/Rewrite/Rewriters.h
9b414d3e2d0cb84512b55a3275a98490b090162a 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration

Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/AnalysisConsumer.h
lang/Checker/FrontendActions.h
lang/Checker/PathDiagnosticClients.h
lang/CodeGen/BackendUtil.h
lang/CodeGen/CodeGenAction.h
lang/Frontend/ASTConsumers.h
lang/Frontend/AnalysisConsumer.h
lang/Frontend/AnalyzerOptions.h
lang/Frontend/BackendUtil.h
lang/Frontend/CodeGenAction.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendActions.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/Utils.h
lang/Rewrite/ASTConsumers.h
lang/Rewrite/FixItRewriter.h
lang/Rewrite/FrontendActions.h
lang/Rewrite/Rewriters.h
e20fe742fcb704d5ba9dcafa1bb47488053e6652 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Allocate template parameter lists for out-of-line definitions via the
ASTContext rather than via the normal heap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c722ea4fbf886d6460b256b5e819a4ee751d5fff 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Allocate template parameter lists for out-of-line definitions via the
ASTContext rather than via the normal heap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2951755e71ff826af2b7ab12b34b5c6e4d662222 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
7cf84d66965a7706004d8590b5af5fe54b85f525 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
310bbc1dc656701f812a5eaa9f5ef52efe7dc769 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
lang/Rewrite/RewriteRope.h
ea3fe7c72b73ae09070ced4dc12ddbfbd29c0b1a 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Add <cstddef> include to get ptrdiff_t, for gcc-4.6; patch by Dimitry Andric.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
lang/Rewrite/RewriteRope.h
6cc15814fa9598e449ef5c8cccd5ba8158aacb69 15-Jun-2010 Chris Lattner <sabre@nondot.org> fix the inline asm diagnostics to emit the error on the primary
source code location instead of on the note. Previously we generated:

<inline asm>:1:2: error: unrecognized instruction
barf
^
t.c:4:8: note: generated from here
asm ("barf");
^

Now we generate:

t.c:4:8: error: unrecognized instruction
asm ("barf");
^
<inline asm>:1:2: note: instantated into assembly here
barf
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
99e14a04887570b11df90daf2e8a7adf84599b01 15-Jun-2010 Chris Lattner <sabre@nondot.org> fix the inline asm diagnostics to emit the error on the primary
source code location instead of on the note. Previously we generated:

<inline asm>:1:2: error: unrecognized instruction
barf
^
t.c:4:8: note: generated from here
asm ("barf");
^

Now we generate:

t.c:4:8: error: unrecognized instruction
asm ("barf");
^
<inline asm>:1:2: note: instantated into assembly here
barf
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
113737e3e3516a0196de4665041736046aefb73e 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Warn when a 'typename' or a 'template' keyword refers to a
non-dependent type or template name, respectively, in C++98/03. Fixes
PR7111 and <rdar://problem/8002682>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
732281de5d518fca96c449ae185ee56bde422c4f 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Warn when a 'typename' or a 'template' keyword refers to a
non-dependent type or template name, respectively, in C++98/03. Fixes
PR7111 and <rdar://problem/8002682>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
93a89ae3ec17c53cf32fe05c956eb2145e35f530 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
collect2 option that is passed by some projects (notably WebKit).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Options.td
f78925f633e949f06521d9ffd937019e59f35efc 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
collect2 option that is passed by some projects (notably WebKit).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Options.td
23b33f2e28ea00cb7b0651882ef60953a15d1dd3 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate uses of Arg::getIndex.

Also, fix a memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
0e10031ba5d0f9b3e5bc5570f39382d288779ab8 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate uses of Arg::getIndex.

Also, fix a memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
c31587c41bcd8d5daae14c8317380cd10884a839 14-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Put warnings about designated initializations overridding prior
initializations into their own warning group, initializer-overrides,
which is part of -Wextra. Patch by william@25thandClement.com, fixes
PR6934!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
57dc2fc543e4cd3def9d27f22349f5b3c6513f4c 14-Jun-2010 Douglas Gregor <dgregor@apple.com> Put warnings about designated initializations overridding prior
initializations into their own warning group, initializer-overrides,
which is part of -Wextra. Patch by william@25thandClement.com, fixes
PR6934!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
bb6d52040bc4a5a090c22a9e2645577d7e9dad93 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
9d0863b22faef1678eb191bbab7268809be60a96 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
53da3a4c313c1e716170cc0be6612d733daad2a5 14-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Teach TemplateDecl::getSourceRange() to cover the entire declaration,
from Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
80484d0de0dccee66d9f1760127c3e6e218987da 14-Jun-2010 Douglas Gregor <dgregor@apple.com> Teach TemplateDecl::getSourceRange() to cover the entire declaration,
from Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
486c883ca29f6b50bb8ded372ad5bb2970fd4101 13-Jun-2010 John McCall <rjmccall@apple.com> TemplateSpecializationType's isCurrentInstantiation bit can be derived
from its canonical type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
71d74bc0d6e522ce7c21a599db8e19d3883b518f 13-Jun-2010 John McCall <rjmccall@apple.com> TemplateSpecializationType's isCurrentInstantiation bit can be derived
from its canonical type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
5dd8130f302adfcefee70419418748c5d9853cae 13-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of NEON sema checking & fix to polynomial type detection


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0d15c5321a11a5fee53b17ca8e9e0d72d6192b23 13-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of NEON sema checking & fix to polynomial type detection


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
82ef66d98dea0c892d84553cf24ef55efb9a6c31 12-Jun-2010 Charles Davis <cdavis@mines.edu> Really make the Itanium C++ ABI the default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetOptions.h
b661eed4d9ee7a8213e7c79afb8675ab92c1c878 12-Jun-2010 Charles Davis <cdavis@mines.edu> Really make the Itanium C++ ABI the default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetOptions.h
e126f73aaca758b4076d26ab25ef02ed99e9240b 12-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added template parameters info for out-of-line definitions of class template methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9b9348889d85fc9daf943c64e3ac3fb021a4f028 12-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added template parameters info for out-of-line definitions of class template methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f6ac61987ba4f5b95eb97817253664121c69cab5 12-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Don't omit class explicit instantiation from AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
c98971d5c994caed9452aeadd0122c855e0f4de1 12-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Don't omit class explicit instantiation from AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
6e2e474cd2f1310c6c951a3d94df28704b7f1a88 12-Jun-2010 Nate Begeman <natebegeman@mac.com> vbsl, vrev* is implemented via arm_neon.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
cba9421f5c9f784bd32fcddf55b6af4b6e024904 12-Jun-2010 Nate Begeman <natebegeman@mac.com> vbsl, vrev* is implemented via arm_neon.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
3b566498b52227123af5d3fc1baef3e75f886f15 12-Jun-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix PCH issue. Attributes of a declaration were truncated to just one when the decl was read from a PCH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1715bf5ed87c792c63278e739bc492921d512a88 12-Jun-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix PCH issue. Attributes of a declaration were truncated to just one when the decl was read from a PCH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
fb23a09db7bd093cdbe04189530e8c2fe3e644af 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Switch Compilation to return the translated arguments by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
be21cd0f07726045367861d3882d18ef30f6a30c 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Switch Compilation to return the translated arguments by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
cd12027b8da28e40b275cfe92a12cee83ded7763 12-Jun-2010 Chris Lattner <sabre@nondot.org> add a -W flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6370a1b1f22e407fc71d3975a6c96b0234b5688d 12-Jun-2010 Chris Lattner <sabre@nondot.org> add a -W flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
16b4767bacedd8847437aa280cfefae6b75ea352 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/ToolChain.h
279c1dbebf37cd128f3c73c70741a6b8c35ad025 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/ToolChain.h
50547ce57e1b8081ba7e711554b5ba5aa98cb61c 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Get rid of the proxy support in DerivedArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
3612bc80fabcdd337f6d1df06e69b38c2c5f5a32 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Get rid of the proxy support in DerivedArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
7f3ffed4dc34e302c96d6ebc2792de362552d105 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change OptTable::ParseArg to take any ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptTable.h
lang/Driver/Option.h
785e7963343c91c16e6d7c8f301eee145d06da5b 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change OptTable::ParseArg to take any ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptTable.h
lang/Driver/Option.h
93917b47ee01d6d44dd5e735ec9275be58af79e3 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
7e4953e5c60409007545288f14b430bd23d68570 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
a43550aaf54e10207fc8e05c90ab03c8eb83e510 11-Jun-2010 Daniel Dunbar <daniel@zuster.org> Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
c72cc5072cdc1a1a6e05f9d0f962f293a69248c4 11-Jun-2010 Daniel Dunbar <daniel@zuster.org> Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
08652dede341124aa0bd6a1045321277f3ee09d2 11-Jun-2010 Chris Lattner <sabre@nondot.org> preprocessor directives in macro arguments aren't standard,
hopefully this unbreaks msvc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
ae6de57e6c823471f04a15dbfbbb39449d4d1e56 11-Jun-2010 Chris Lattner <sabre@nondot.org> preprocessor directives in macro arguments aren't standard,
hopefully this unbreaks msvc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
7b44111a5cc88212fa9111c6fabdbfc5bc1989fc 11-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Add a few FIXMEs: recursing over shadow decls, and semantics vs
syntactic iterating over initializer exprs. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
40498cdfe09f6dfa939ca98cb9507aebaae3436f 11-Jun-2010 Craig Silverstein <csilvers2000@yahoo.com> Add a few FIXMEs: recursing over shadow decls, and semantics vs
syntactic iterating over initializer exprs. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
02cd8e64ab4b62f88c62f63320ddd17466764022 11-Jun-2010 John McCall <rjmccall@apple.com> Don't store ASTContext references in the TST nodes just to support profiling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
ef99001908e799c388f1363b1e607dad5f5b57d3 11-Jun-2010 John McCall <rjmccall@apple.com> Don't store ASTContext references in the TST nodes just to support profiling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
4bf99130178f92af4eb958837bff9d6266f06227 11-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Add an option -fshow-overloads=best|all to limit the number of overload
candidates printed. We default to 'all'. At the moment, 'best' prints only
the first 4 overloads, but we'll improve that over time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
5edbdcc62098e305cd55654814dcf783a3f3c477 11-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Add an option -fshow-overloads=best|all to limit the number of overload
candidates printed. We default to 'all'. At the moment, 'best' prints only
the first 4 overloads, but we'll improve that over time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
fed3a2b1dfd4e96b8bf74851e80e2f162f81b4ec 11-Jun-2010 Charles Davis <cdavis@mines.edu> Add an option to specify the target C++ ABI to the frontend. Use it to
select either the default Itanium ABI or the new, experimental Microsoft ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
lang/Driver/CC1Options.td
98b7c5c496dfccb39287b8f7d8f1444594936d10 11-Jun-2010 Charles Davis <cdavis@mines.edu> Add an option to specify the target C++ ABI to the frontend. Use it to
select either the default Itanium ABI or the new, experimental Microsoft ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
lang/Driver/CC1Options.td
08fa3b16948564b664aeefb40002acf8811f67c0 11-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Improve readability with TRY_TO, remove a redundant comment, and fix one aspect
of the recursion on VarDecls. Patch by Craig Silverstein.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
6c321e35008f2c99eeb1409b43859a04c48e5ce5 11-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Improve readability with TRY_TO, remove a redundant comment, and fix one aspect
of the recursion on VarDecls. Patch by Craig Silverstein.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
52b136ace347ee82e11145927e37980157bacb35 11-Jun-2010 John McCall <rjmccall@apple.com> Split DependentNameType into two types. DependentNameType represents the
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.

Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateBase.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/TypeXML.def
33500955d731c73717af52088b7fc0e7a85681e7 11-Jun-2010 John McCall <rjmccall@apple.com> Split DependentNameType into two types. DependentNameType represents the
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.

Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateBase.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/TypeXML.def
444706b435979b277818610a1367d1e550a1680c 11-Jun-2010 John McCall <rjmccall@apple.com> Provide a method to clear the current state of a TypeLocBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLocBuilder.h
480076c3defdcaf07e8a87c81930da467a702425 11-Jun-2010 John McCall <rjmccall@apple.com> Provide a method to clear the current state of a TypeLocBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLocBuilder.h
da473eaa999f79b7ca5b1ec431e091b3cc81294a 11-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Avoid repeating the list of operators twice in RecursiveASTVisitor through
a set of preprocessor macros. Patch by Zhanyong Wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
7d66f8cafd807e551efb4739cdb37fc272cf5345 11-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Avoid repeating the list of operators twice in RecursiveASTVisitor through
a set of preprocessor macros. Patch by Zhanyong Wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
7681f51e310d4c27eece9ee710e69d7eabda984e 11-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Tweak a comment on the visitor to clarify one order of visit issue. Patch from
Zhanyong Wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
b5c202f9e4f6d0f230d5cb8848779259ebf95b7f 11-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Tweak a comment on the visitor to clarify one order of visit issue. Patch from
Zhanyong Wan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
ac8901a2f1a5ec1a9a0ae985eb4cec3aafc0fcd2 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Also mark -F as RenderJoined, the linker doesn't like "-F FOO" either.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
ed5d5eea46a6fe7ed22ed97f00a60c16d1f7e7a5 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Also mark -F as RenderJoined, the linker doesn't like "-F FOO" either.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
a91bdaf5ba082ab564e6833ce3c0bff95bcc0d3c 10-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Another chunk of the new RecursiveASTVisitor implementation: switch the return
value semantics such that we recurse while the visitors return true, and halt
as soon as one returns false. Patch by csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
e3e210c3aa3c1b289eee669a1d235fc16df384a0 10-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Another chunk of the new RecursiveASTVisitor implementation: switch the return
value semantics such that we recurse while the visitors return true, and halt
as soon as one returns false. Patch by csilvers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
b6a209378b5c6340bf2f8a91964f83689def886e 10-Jun-2010 Nate Begeman <natebegeman@mac.com> support _lane ops, and multiplies by scalar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
d075c01c359b9cc120c3accc7166990f9f4ac423 10-Jun-2010 Nate Begeman <natebegeman@mac.com> support _lane ops, and multiplies by scalar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
8554f0970464b6d37df4dc6cda23de26dbe33b2f 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: -L should be marked as RenderJoined, the linker doesn't like "-L FOO".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
482f1c8c4dd6e4a85ecc6f791ad377c58f8632bf 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: -L should be marked as RenderJoined, the linker doesn't like "-L FOO".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
84a759d7367d6840c24fe3433197c306159b5ccd 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate flags on aliases, they are unnecessary (and unused).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
8a9b18c04ccfb2abcec831f41c6e05f399c48406 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate flags on aliases, they are unnecessary (and unused).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
01824fd0db4ec4b725b2503eda64adf834f5be46 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
3856ab3502676efabceb91fc5ca978810a35aeca 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
7f7a407f4b95e46125e51b2a11665545a526de00 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate Arg subclasses, which are now unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
532c1ec307b8689e95896a11ce5ae4661fa9e5d3 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate Arg subclasses, which are now unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
04a157dccba420d25b9b1847dfb553c93f935e88 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep the rendering style in the option, instead of as part of the Arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Option.h
e375c4a02ac6e18b166a067b8226e15a1ab009e7 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep the rendering style in the option, instead of as part of the Arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Option.h
410c23d634c4215f04c6623f73e07e682255ccf3 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Arg to just hold the values directly, instead of implicitly
deriving them from the Arg type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
4465a776a56de81211ae4672e5782c6bef075135 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Arg to just hold the values directly, instead of implicitly
deriving them from the Arg type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
c121a01d04475a5e6b36de7e30adc67914c86c4c 09-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Fix two typos in comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
515ddd8f7a36fc2684492c13665642153fc690c0 09-Jun-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Fix two typos in comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
f6fd1f35a7115cb9e39f6d3b4abfe772e7ecb608 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Revert "Driver: Change Option parsing to always create arguments referring to
unaliased", this isn't quite right yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
e5af3b3eef8dd3b2b9516f89825d0f0b4d09c0cf 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Revert "Driver: Change Option parsing to always create arguments referring to
unaliased", this isn't quite right yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
2d4fb135115d5a972326871e446af705cc6ae05e 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
22685f40dbb458c0ef18f5fec35f4f7cdb0886c9 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
c8e5d5a1c815da662f5835d678ea6cee428ec174 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
they can be independent of the exact option that created them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
312a8b726e24078d3bd3b2328f9f895d1407cdb7 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
they can be independent of the exact option that created them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
ea990df18be44b10eccf8c70f7d55a000083cbc7 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement codegen for hadd, hsub, max, min, mlal, movl, movn, padal, mov_n
Make note about how to handle the dozen or so multiply by scalar ops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
df98e1d1da5ab1ca7c325378fc1c2eaa90a6476d 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement codegen for hadd, hsub, max, min, mlal, movl, movn, padal, mov_n
Make note about how to handle the dozen or so multiply by scalar ops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
e6a9c1e8077cbcd71419141a50c5637294ad98a5 09-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added inherited info to template and non-type arguments of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
d92f7a297c0ed3f7d0ebcbb557e1d4c1925b8c72 09-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added inherited info to template and non-type arguments of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
8b88f6aaa408a4b026615a2fb474e5fe6032c0f7 09-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Major redesign of the RecursiveASTVisitor. This implements the majority of the
new design discussed on cfe-dev, with further steps in that direction to come.
It is already much more complete than the previous visitor.

Patch by Zhanyong and Craig with 80 column wraps and one missing declaration
added by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
dfc35e33177a433b56454f1d2b5e53734f65b288 09-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Major redesign of the RecursiveASTVisitor. This implements the majority of the
new design discussed on cfe-dev, with further steps in that direction to come.
It is already much more complete than the previous visitor.

Patch by Zhanyong and Craig with 80 column wraps and one missing declaration
added by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
58b3a5326e3288553b266acfb9e59be0549e8351 09-Jun-2010 Nate Begeman <natebegeman@mac.com> More accurate BuiltinsARM.def
vget_lane support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
95450f6ffc89ee218faa550433265f80930469c4 09-Jun-2010 Nate Begeman <natebegeman@mac.com> More accurate BuiltinsARM.def
vget_lane support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
c040236caae574e37816ac38f8b48b8fbeab0d41 09-Jun-2010 Tom Care <tcare@apple.com> Added FixIt support to printf format string checking.
- Refactored LengthModifier to be a class.
- Added toString methods in all member classes of FormatSpecifier.
- FixIt suggestions keep user specified flags unless incorrect.

Limitations:
- The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation.

A test/Sema/format-strings-fixit.c
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
M lib/Sema/SemaChecking.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
3bfc5f49e0e37e235bb0d33bcbcb36af9d1f84ab 09-Jun-2010 Tom Care <tcare@apple.com> Added FixIt support to printf format string checking.
- Refactored LengthModifier to be a class.
- Added toString methods in all member classes of FormatSpecifier.
- FixIt suggestions keep user specified flags unless incorrect.

Limitations:
- The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation.

A test/Sema/format-strings-fixit.c
M include/clang/Analysis/Analyses/PrintfFormatString.h
M lib/Analysis/PrintfFormatString.cpp
M lib/Sema/SemaChecking.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
68d94c7f72d49fad4aaf3eaaf472f9047934fd4a 09-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Tweak our handling of the notion of a standard conversion sequence
being a subsequence of another standard conversion sequence. Instead
of requiring exact type equality for the second conversion step,
require type *similarity*, which is type equality with cv-qualifiers
removed at all levels. This appears to match the behavior of EDG and
VC++ (albeit not GCC), and feels more intuitive. Big thanks to John
for the line of reasoning that supports this change: since
cv-qualifiers are orthogonal to the second conversion step, we should
ignore them in the type comparison.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5a57efd7bf88a4a13018e0471ded8063a4abe8af 09-Jun-2010 Douglas Gregor <dgregor@apple.com> Tweak our handling of the notion of a standard conversion sequence
being a subsequence of another standard conversion sequence. Instead
of requiring exact type equality for the second conversion step,
require type *similarity*, which is type equality with cv-qualifiers
removed at all levels. This appears to match the behavior of EDG and
VC++ (albeit not GCC), and feels more intuitive. Big thanks to John
for the line of reasoning that supports this change: since
cv-qualifiers are orthogonal to the second conversion step, we should
ignore them in the type comparison.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
453bb15609d94a406796543f4b9421c97f8f40b6 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement transpose/zip/unzip & table lookup.
Test out some basic constant-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
1c2a88cfaeb11227d3a6bf7204207e0c8cf6de6f 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement transpose/zip/unzip & table lookup.
Test out some basic constant-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
522fb671290dd5462bfd819401768686fa53e925 09-Jun-2010 Tom Care <tcare@apple.com> Added helper function to Type class to determine if a type is a builtin type. This complements the existing function that determines if a type is a specific builtin type.

Modified:
include/clang/AST/Type.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9b065ddabf572772991a4aadad5bf4921fac5069 09-Jun-2010 Tom Care <tcare@apple.com> Added helper function to Type class to determine if a type is a builtin type. This complements the existing function that determines if a type is a specific builtin type.

Modified:
include/clang/AST/Type.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
608b5793179e667766022a3710204a676f3e350f 09-Jun-2010 Anders Carlsson <andersca@mac.com> On Darwin, initialization and destruction functions should go into the __StaticInit section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
18af368c080b9d60e34e670cd01f7d2d3ad2ba48 09-Jun-2010 Anders Carlsson <andersca@mac.com> On Darwin, initialization and destruction functions should go into the __StaticInit section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e55e5e35d511ea62e635374aeca1c09ba7ce6d88 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
lang-c/Makefile
lang/AST/Makefile
lang/Basic/Makefile
lang/Driver/Makefile
lang/Makefile
afed099bd2e759efd4bb63fdc525d3445f94cc13 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
lang-c/Makefile
lang/AST/Makefile
lang/Basic/Makefile
lang/Driver/Makefile
lang/Makefile
5d8e67ed117c2e0a19acaa8d8f7c7dd900011b60 08-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Warn about comparisons between arrays and improve self-comparison
warnings, from Troy Straszheim! Fixes PR6163.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d64fdd0c056f1e50488519254f852fa8050f0470 08-Jun-2010 Douglas Gregor <dgregor@apple.com> Warn about comparisons between arrays and improve self-comparison
warnings, from Troy Straszheim! Fixes PR6163.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6b9f87087f4df474a5d3daee287f01618644150c 08-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Implement a warning when converting the literal 'false' to a
pointer. Original patch by Troy D. Straszheim; fixes PR7283.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
d7a95971bd91b21922e5e878ba05bbe42b585cc9 08-Jun-2010 Douglas Gregor <dgregor@apple.com> Implement a warning when converting the literal 'false' to a
pointer. Original patch by Troy D. Straszheim; fixes PR7283.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c728d2433415d2830287af76b9be46d6b81e4f7a 08-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> Token is POD-like.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
1c573cb0e06bac4e557123703069da7dd45d3dc0 08-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> Token is POD-like.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
702405a46f56c2ca05f951085fb5aeff1272f108 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
30d91718a676177f0d0d0210ce4fdb4f616df6e5 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
240a452b42fddbd14afc7f6949703f9df9fdb537 08-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
0ea22fdfda0558393950cef5db50d050e3eb1e60 08-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
ca9d6c02dfacc19957841cbe0bf50730a85443c4 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement ARM NEON up through vcvt, alphabetically.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
9eb65a56e18bee1e5392bf2dff01cbd7b895f685 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement ARM NEON up through vcvt, alphabetically.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
6da157d078ddaf5126a4011d182ab66294924c61 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
lang/Driver/Types.h
6c6424bc0d3b5f080a97b5f6ef4a8d70c38e38f5 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
lang/Driver/Types.h
3ba00f979a2385769bc39cfb2252bad422ed5cc4 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add CodeGenAction support for handling LLVM IR.
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.

For example, 'llvm-as' is:
$ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
$ clang -cc1 -emit-llvm FOO.bc -o -
and 'opt' is, e.g.:
$ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
$ clang -cc1 -S -o - FOO.ll

The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenAction.h
lang/Frontend/FrontendAction.h
4cbbd94d0abeec2d7e7438d098527aa340d82389 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add CodeGenAction support for handling LLVM IR.
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.

The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/ $ clang -cc1 -S -o - FOO.ll
/external/clang/ $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
/external/clang/ and 'llc' is, e.g.:
/external/clang/ and 'llvm-dis' is:
/external/clang/ and 'opt' is, e.g.:
/external/clang/ $ clang -cc1 -emit-llvm FOO.bc -o -
/external/clang/ $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
/external/clang/For example, 'llvm-as' is:
lang/Frontend/CodeGenAction.h
lang/Frontend/FrontendAction.h
b2f19d93581316bbc24232d5cb21e2456b0174cd 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add FrontendAction support for handling LLVM IR inputs.
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
faddc3e53a95c68f2c3a966e0f1e6eba110dafd6 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add FrontendAction support for handling LLVM IR inputs.
- These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
31872aeb4b269da230e208919b62f969b6074bdd 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> FrontendAction: Track active file kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
685ac6665a3f91f9a66a9f44b6bf755a0cd929ea 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> FrontendAction: Track active file kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
567dd6d28eb19059b7320dcd22dd1b1bdad51a9c 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
eb58d831b283a9fa030a2eccc6e23480108d2fa1 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Rename hasASTSupport to hasASTFileSupport, which is more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
7bc60e6bbf3053b1c09889a69518c41400425e8a 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
d3598a65716e120aef45aa2841d730e03f7101fe 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Change FrontendAction::BeginSourceFile to take the input kind instead of an IsAST bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
0327e4d2889dff7be09081612d739050c28cfd9d 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Lift InputKind enumeration to top level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendOptions.h
c34ce3fa613d5e4a283e53615fceafd17390445b 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Lift InputKind enumeration to top level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendOptions.h
1775ce89bfb6e4e2e12ab90fd14d79f6c1b790ae 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
create modules which have target data strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/BackendUtil.h
05a7f3ddce9a88249b05b896e70f66e9ed381743 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Drop unnecessary TargetData argument to EmitBackendOutput, we always
create modules which have target data strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/BackendUtil.h
7e57b403c3b116ac039e8c7d9779912d73af8216 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/BackendUtil.h
897c6768db8e09c692009280d9f1d71fb17023bf 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Factor clang::EmitBackendOutput out of CodeGenAction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/BackendUtil.h
d9cfd944264c27b84b837f39d57ed00f4f6a5b36 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
6b0cf67ae72a9ebb90e94cc9a14e09364a2b3466 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
6cd738cba242add05c6deafe2c0bdad7d12b55ce 07-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement __clear_cache on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
79ba509b0106fd0a1ff832baeb1fdb5430527efe 07-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement __clear_cache on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
e75208a31edf92f979fc2a75bf4887ae0b599357 07-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> PR7245: Make binding a reference to a temporary without a usable copy
constructor into an extension warning into the error that C++98 requires.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
57d12fd4a2bc739c4a4d62a364b7f08cd483c59e 07-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> PR7245: Make binding a reference to a temporary without a usable copy
constructor into an extension warning into the error that C++98 requires.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
b9805b6ffe18062027f2150f0b701d2873617fc5 05-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added AccessSpecDecl node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DeclNodes.td
lang/Frontend/PCHBitCodes.h
lang/Parse/Action.h
6206d53f67613958ae1b023aba337ebb46f11a8b 05-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added AccessSpecDecl node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DeclNodes.td
lang/Frontend/PCHBitCodes.h
lang/Parse/Action.h
6dd301e90d114d029f51f8e2eff3328b8bf21a8c 05-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Add an extension to avoid an error when a global template has the same name as
a member template, and you try to call the member template with an explicit
template argument. See PR7247

For example, this downgrades the error to a warning in:

template<typename T> struct set{};
struct Value {
template<typename T>
void set(T value) {
}
};
void foo() {
Value v;
v.set<double>(3.2); // Warning here.
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
21d07e499e108752c9d63d7418f7d9b485f4e0e6 05-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Add an extension to avoid an error when a global template has the same name as
a member template, and you try to call the member template with an explicit
template argument. See PR7247

For example, this downgrades the error to a warning in:

template<typename T> struct set{};
struct Value {
template<typename T>
void set(T value) {
}
};
void foo() {
Value v;
v.set<double>(3.2); // Warning here.
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
dd7031f9abb330acaca44755b499988cba487f00 05-Jun-2010 John McCall <rjmccall@apple.com> Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
This is never null, but the associated type might be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bf1a028246d884a540aeafa38e89be59a269b072 05-Jun-2010 John McCall <rjmccall@apple.com> Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
This is never null, but the associated type might be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bfa7c00b14aea814fdbfc693bba43cbd25878775 05-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Correctly align large arrays in x86-64. This fixes PR5599.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
6deecb0d46bcfd048e651d2db7c4fb0d6407da96 05-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Correctly align large arrays in x86-64. This fixes PR5599.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
163cfab63f3da7e756de7db0ef8e139597df6261 04-Jun-2010 Nate Begeman <natebegeman@mac.com> Initial support for ARM NEON builtins, codegen up next


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
aa1381ba9b5251a40975e262b36e6a98ec19c3b4 04-Jun-2010 Nate Begeman <natebegeman@mac.com> Initial support for ARM NEON builtins, codegen up next


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
c3b388c3d05f654a6c8e2effe6025ba53df5b7f2 04-Jun-2010 John McCall <rjmccall@apple.com> Remember type source information for Objective C property declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
83a230c83a54190366138c1a4f4310ef838b88fc 04-Jun-2010 John McCall <rjmccall@apple.com> Remember type source information for Objective C property declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ea285162342df160e7860e26528bc7110bc6c0cd 04-Jun-2010 Shih-wei Liao <sliao@google.com> Initial slang.

Change-Id: I4f84a741e5fbc440cd4c251406d2b611a237f713
MakeLists.txt
akefile
lang-c/Index.h
lang/AST/APValue.h
lang/AST/AST.h
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/ASTDiagnostic.h
lang/AST/ASTImporter.h
lang/AST/ASTVector.h
lang/AST/Attr.h
lang/AST/CXXInheritance.h
lang/AST/CanonicalType.h
lang/AST/CharUnits.h
lang/AST/Decl.h
lang/AST/DeclAccessPair.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclContextInternals.h
lang/AST/DeclFriend.h
lang/AST/DeclGroup.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/DeclVisitor.h
lang/AST/DeclarationName.h
lang/AST/DependentDiagnostic.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/ExternalASTSource.h
lang/AST/FullExpr.h
lang/AST/NestedNameSpecifier.h
lang/AST/ParentMap.h
lang/AST/PrettyPrinter.h
lang/AST/RecordLayout.h
lang/AST/Redeclarable.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
lang/AST/StmtNodes.def
lang/AST/StmtObjC.h
lang/AST/StmtVisitor.h
lang/AST/TemplateBase.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/AST/TypeLocNodes.def
lang/AST/TypeLocVisitor.h
lang/AST/TypeNodes.def
lang/AST/TypeOrdering.h
lang/AST/TypeVisitor.h
lang/AST/UnresolvedSet.h
lang/AST/UsuallyTinyPtrVector.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/PrintfFormatString.h
lang/Analysis/Analyses/ReachableCode.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/AnalysisContext.h
lang/Analysis/AnalysisDiagnostic.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Support/BumpVector.h
lang/Analysis/Support/SaveAndRestore.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Basic/Builtins.def
lang/Basic/Builtins.h
lang/Basic/BuiltinsARM.def
lang/Basic/BuiltinsPPC.def
lang/Basic/BuiltinsX86.def
lang/Basic/CMakeLists.txt
lang/Basic/ConvertUTF.h
lang/Basic/Diagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticAnalysisKinds.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/Linkage.h
lang/Basic/MacroBuilder.h
lang/Basic/Makefile
lang/Basic/OnDiskHashTable.h
lang/Basic/OperatorKinds.def
lang/Basic/OperatorKinds.h
lang/Basic/PartialDiagnostic.h
lang/Basic/PrettyStackTrace.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Basic/Specifiers.h
lang/Basic/TargetBuiltins.h
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
lang/Basic/TemplateKinds.h
lang/Basic/TokenKinds.def
lang/Basic/TokenKinds.h
lang/Basic/TypeTraits.h
lang/Basic/Version.h
lang/CMakeLists.txt
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Checker/Checkers/DereferenceChecker.h
lang/Checker/Checkers/LocalCheckers.h
lang/Checker/DomainSpecific/CocoaConventions.h
lang/Checker/ManagerRegistry.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRAuditor.h
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRExprEngineBuilders.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRStateTrait.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SummaryManager.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
lang/CodeGen/CodeGenOptions.h
lang/CodeGen/ModuleBuilder.h
lang/Driver/Action.h
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/CC1Options.h
lang/Driver/CC1Options.td
lang/Driver/CMakeLists.txt
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/DriverDiagnostic.h
lang/Driver/HostInfo.h
lang/Driver/Job.h
lang/Driver/Makefile
lang/Driver/OptParser.td
lang/Driver/OptSpecifier.h
lang/Driver/OptTable.h
lang/Driver/Option.h
lang/Driver/Options.h
lang/Driver/Options.td
lang/Driver/Phases.h
lang/Driver/Tool.h
lang/Driver/ToolChain.h
lang/Driver/Types.def
lang/Driver/Types.h
lang/Driver/Util.h
lang/Frontend/ASTConsumers.h
lang/Frontend/ASTUnit.h
lang/Frontend/Analyses.def
lang/Frontend/AnalysisConsumer.h
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/CodeGenAction.h
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/DeclContextXML.def
lang/Frontend/DeclXML.def
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/DiagnosticOptions.h
lang/Frontend/DocumentXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendDiagnostic.h
lang/Frontend/FrontendOptions.h
lang/Frontend/FrontendPluginRegistry.h
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/LangStandard.h
lang/Frontend/LangStandards.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/PreprocessorOptions.h
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/StmtXML.def
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/TypeXML.def
lang/Frontend/Utils.h
lang/Frontend/VerifyDiagnosticsClient.h
lang/Index/ASTLocation.h
lang/Index/Analyzer.h
lang/Index/CallGraph.h
lang/Index/DeclReferenceMap.h
lang/Index/Entity.h
lang/Index/GlobalSelector.h
lang/Index/Handlers.h
lang/Index/IndexProvider.h
lang/Index/Indexer.h
lang/Index/Program.h
lang/Index/STLExtras.h
lang/Index/SelectorMap.h
lang/Index/TranslationUnit.h
lang/Index/Utils.h
lang/Lex/DirectoryLookup.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/LexDiagnostic.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Pragma.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Lex/TokenConcatenation.h
lang/Lex/TokenLexer.h
lang/Makefile
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
lang/Parse/ParseDiagnostic.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Parse/Template.h
lang/Rewrite/DeltaTree.h
lang/Rewrite/HTMLRewrite.h
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
lang/Rewrite/TokenRewriter.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/ExternalSemaSource.h
lang/Sema/ParseAST.h
lang/Sema/SemaConsumer.h
lang/Sema/SemaDiagnostic.h
40d63d2c8b4cedfec60ffcbb7a6b45bf38dcc993 04-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Added a field to BlockDeclRefExpr for future use.
No functionality change yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
89f9d3a7651d1225f3f56ae3387c83b98a26da00 04-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Added a field to BlockDeclRefExpr for future use.
No functionality change yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
72a13ef8379a9d8f017e2ff2a865a6ee97fd48be 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
be1cc3eec682ca73361edb4109a7969452d3dbeb 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
321ca092f1b9707d18951871de50b731ede84a9f 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit dsymutil action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
6e0f25483b1a801cd1155ea89c2b725feab16332 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit dsymutil action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
a43dea209d7c936286e7f1099fde4e9dae27f1a1 04-Jun-2010 John McCall <rjmccall@apple.com> Restructure how we interpret block-literal declarators. Correctly handle
the case where we pick up block arguments from a typedef. Save the block
signature as it was written, and preserve same through PCH.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
82dc00948fe7116edd31bfa07a728fda98648be1 04-Jun-2010 John McCall <rjmccall@apple.com> Restructure how we interpret block-literal declarators. Correctly handle
the case where we pick up block arguments from a typedef. Save the block
signature as it was written, and preserve same through PCH.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
67e508d3f226b9c1efd099b418fa44d6fa8f2414 04-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> When checking for equality of template parameter lists, a template
type parameter pack is distinct from a template type parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a417b87e5d0f0508c7b18824d89d489bb55b7bd1 04-Jun-2010 Douglas Gregor <dgregor@apple.com> When checking for equality of template parameter lists, a template
type parameter pack is distinct from a template type parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cccca6285dd16a8c7345667ca560b1787d384908 03-Jun-2010 Jordy Rose <jediknil@belkadan.com> Test commit: fix method summary comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SVals.h
d6db976dd4c48b556862d093fb564b9cbc09aae3 03-Jun-2010 Jordy Rose <jediknil@belkadan.com> Test commit: fix method summary comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SVals.h
60d14ff16083101abbc6348f09103f753473c090 01-Jun-2010 John McCall <rjmccall@apple.com> Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
bring in the entire lookup table at once.

Also, give ExternalSemaSource's vtable a home. This is important because otherwise
any reference to it will cause RTTI to be emitted, and since clang is compiled
with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's
RTTI). So this change makes it possible to subclass ExternalSemaSource from projects
compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
lang/Sema/ExternalSemaSource.h
76bd1f387e6a7b7abfe53f63b3bd429b97bb80f0 01-Jun-2010 John McCall <rjmccall@apple.com> Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
bring in the entire lookup table at once.

Also, give ExternalSemaSource's vtable a home. This is important because otherwise
any reference to it will cause RTTI to be emitted, and since clang is compiled
with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's
RTTI). So this change makes it possible to subclass ExternalSemaSource from projects
compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
lang/Sema/ExternalSemaSource.h
576182f65a694e4f3d9b156c81eafa39cc161999 01-Jun-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for calloc() in MallocChecker. Patch by Jordy Rose, with my
modification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
a5ce966d1a23d84aa5e849cf0ed62494e736ea6a 01-Jun-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for calloc() in MallocChecker. Patch by Jordy Rose, with my
modification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
c5eaffb5be9680aaf5907975f308756b869af603 31-May-2010 Douglas Gregor <doug.gregor@gmail.com> When we see the a '[' in a postfix expression in Objective-C, perform
a simple, quick check to determine whether the expression starting
with '[' can only be an Objective-C message send. If so, don't parse
it as an array subscript expression. This improves recovery for, e.g.,

[a method1]
[a method2]

so that we now produce

t.m:10:13: error: expected ';' after expression
[a method]
^

instead of some mess about expecting ']'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1b730e847ded503f2e615154035c083c4f94a067 31-May-2010 Douglas Gregor <dgregor@apple.com> When we see the a '[' in a postfix expression in Objective-C, perform
a simple, quick check to determine whether the expression starting
with '[' can only be an Objective-C message send. If so, don't parse
it as an array subscript expression. This improves recovery for, e.g.,

[a method1]
[a method2]

so that we now produce

t.m:10:13: error: expected ';' after expression
[a method]
^

instead of some mess about expecting ']'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1bbb7b72fd33f1af39a17ced293ef6cad4bb1f86 31-May-2010 Chris Lattner <sabre@nondot.org> make #warning warnings end up in their own diagnostic category.
rdar://8042673


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
672bbf249175f6ff7a150cfef1882eee7bc4bb0b 31-May-2010 Chris Lattner <sabre@nondot.org> make #warning warnings end up in their own diagnostic category.
rdar://8042673


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
69fbbc295019f5760c3a7c6d7da3927e97c5d560 31-May-2010 Sean Hunt <rideau3@gmail.com> Move .td files from AST to Basic.

Parse will need to see these files because it needs to know how to parse
attributes. The generated files are still placed in the appropriate directory so
as to preserve layering. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
lang/AST/DeclNodes.td
lang/AST/Makefile
lang/AST/StmtNodes.td
lang/Basic/DeclNodes.td
lang/Basic/StmtNodes.td
8b9b742ec13a210f5df7d0c9be37f185c1615a41 31-May-2010 Sean Hunt <rideau3@gmail.com> Move .td files from AST to Basic.

Parse will need to see these files because it needs to know how to parse
attributes. The generated files are still placed in the appropriate directory so
as to preserve layering. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
lang/AST/DeclNodes.td
lang/AST/Makefile
lang/AST/StmtNodes.td
lang/Basic/DeclNodes.td
lang/Basic/StmtNodes.td
b7be965ff561d784a5de8d794b56a442085c8760 30-May-2010 Sean Hunt <rideau3@gmail.com> Convert DeclNodes to use TableGen.

The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclNodes.td
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/DeclVisitor.h
lang/AST/Makefile
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
9a55591af3e5506b95a9718e15380129fbfc5ebc 30-May-2010 Sean Hunt <rideau3@gmail.com> Convert DeclNodes to use TableGen.

The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclNodes.td
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/DeclVisitor.h
lang/AST/Makefile
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
a147bc905efda975cc9ec691291e565efed7b8e5 30-May-2010 Douglas Gregor <doug.gregor@gmail.com> Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
5ac3bdb2cb0113b640c54f01468d21985c08b252 30-May-2010 Douglas Gregor <dgregor@apple.com> Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
9f4a48046015db5e98723bda6ad613ad00aa5678 29-May-2010 Fariborz Jahanian <fjahanian@apple.com> Changed text of 'empty enum' diagnostics to say so.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
2a480e356e45be74c3c3afe586b77cf923cd4181 29-May-2010 Fariborz Jahanian <fjahanian@apple.com> Changed text of 'empty enum' diagnostics to say so.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
fc32004b95ba1d6c6d2f95d6d05955f36409d947 29-May-2010 Fariborz Jahanian <fjahanian@apple.com> Empty enum in c is now error to match gcc's behavior.
(radar 8040068).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
0511552e20c79ec48638038b9a10a70a34654e5c 29-May-2010 Fariborz Jahanian <fjahanian@apple.com> Empty enum in c is now error to match gcc's behavior.
(radar 8040068).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
33bf24b6c409519bd3bff02fca66988e073d85e4 28-May-2010 John McCall <rjmccall@apple.com> Roll back r104941.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
2b7baf0816a40af3fde3a3e174192a549b785a50 28-May-2010 John McCall <rjmccall@apple.com> Roll back r104941.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
65c142e3f6681b65406f8c9f0ac7cf3de866e010 28-May-2010 John McCall <rjmccall@apple.com> Add a new attribute on records, __attribute__((adl_invisible)), and define
the x86-64 __va_list_tag with this attribute. The attribute causes the
affected type to behave like a fundamental type when considered by ADL.

(x86-64 is the only target we currently provide with a struct-based
__builtin_va_list)

Fixes PR6762.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
1d0a5856d066f9030efbe3e0d9bbbb50ea597b99 28-May-2010 John McCall <rjmccall@apple.com> Add a new attribute on records, __attribute__((adl_invisible)), and define
the x86-64 __va_list_tag with this attribute. The attribute causes the
affected type to behave like a fundamental type when considered by ADL.

(x86-64 is the only target we currently provide with a struct-based
__builtin_va_list)

Fixes PR6762.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
854ad9590e3487cce804481cbc05c5e186ef6289 28-May-2010 Douglas Gregor <doug.gregor@gmail.com> Implement a code-completion hook for the receiver of an Objective-C
message. This completion gives better results than just using the
"expression" completion, which is effectively what happened before.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
8e254cfe5a6ab4202c7fcc4b64bdd1ca0fe071ac 28-May-2010 Douglas Gregor <dgregor@apple.com> Implement a code-completion hook for the receiver of an Objective-C
message. This completion gives better results than just using the
"expression" completion, which is effectively what happened before.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e42dc4b23a7a5f9b7bbae6006e56b5efcaca4c52 27-May-2010 Dan Gohman <gohman@apple.com> Add a comment to mention the memory ownership situation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
690c2e22d48c37fa590e9e93595fc5c5ee0d1eab 27-May-2010 Dan Gohman <gohman@apple.com> Add a comment to mention the memory ownership situation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
4c48d4d3633e9da77c7707bc44ef6d476ef0ddc8 27-May-2010 Daniel Dunbar <daniel@zuster.org> Parse/Sema: Add support for '#pragma options align=packed', which, it should be
noted, is not the same as __attribute__((packed)). That would be ridiculous!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6f739145b94ede1ca98b5a5e0e179c817c405d7b 27-May-2010 Daniel Dunbar <daniel@zuster.org> Parse/Sema: Add support for '#pragma options align=packed', which, it should be
noted, is not the same as __attribute__((packed)). That would be ridiculous!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
245e2498f97ef68d19756afddef04763a949a026 27-May-2010 Daniel Dunbar <daniel@zuster.org> Parse/Sema: Add support for '#pragma options align=native'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
638e7cf3a09436dce7f3150ff8e4f27d190bd2ed 27-May-2010 Daniel Dunbar <daniel@zuster.org> Parse/Sema: Add support for '#pragma options align=native'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b7ce0efbecf5ae36f7d5fb11ba9213410123ec82 27-May-2010 Ted Kremenek <kremenek@apple.com> Remove clang_isFromMainFile(). It doesn't work correctly with CXDiagnostics, and we shouldn't
have an API around that cannot be implemented correctly yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104849 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a7f1c008d37927a2ffc55a95830b42762db24843 27-May-2010 Ted Kremenek <kremenek@apple.com> Remove clang_isFromMainFile(). It doesn't work correctly with CXDiagnostics, and we shouldn't
have an API around that cannot be implemented correctly yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104849 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
883cbd144b0009b90d242bd3029714a71b34bf72 27-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed missing initialization of member. Should we enable unused argument warning?.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
25a0fe2a99aaf2d1bf5bdfdae7ab11e2a5e7622f 27-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed missing initialization of member. Should we enable unused argument warning?.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
1220d1f789ef685f31253da0be018c5ee7390ed6 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -m[no-]relax-all, and make it the default at -O0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
9929800b8dfced61e9c97dc8d6e71e144ebf8acc 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -m[no-]relax-all, and make it the default at -O0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f1818a1b5d2e88240fd840caa0718fd044a34f85 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add clang -cc1 -mrelax-all option, which sets relaxes all instructions when using -integrated-as.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
4ecc9b73b3716775ed4e09091e300796a9a72378 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add clang -cc1 -mrelax-all option, which sets relaxes all instructions when using -integrated-as.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
2da5d143b02c2fdcfba7ba6ccc2976b8af46bb92 27-May-2010 Daniel Dunbar <daniel@zuster.org> AST: Add AlignMac68kAttr, not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
4e9255f4ad5f87217995eeb488a7c5b336bb732d 27-May-2010 Daniel Dunbar <daniel@zuster.org> AST: Add AlignMac68kAttr, not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
8df8ff1b1d982e97d323d354379234802b6b9b3d 27-May-2010 Daniel Dunbar <daniel@zuster.org> AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
8a2c92cab213bd7e28ff669577e815cd70bafbe3 27-May-2010 Daniel Dunbar <daniel@zuster.org> AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
9451c5428d52c675c93eb968c2fc3e595f8d2f01 27-May-2010 Daniel Dunbar <daniel@zuster.org> Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TargetInfo.h
613fd67e575ff1c038535b18dafebca070f3ed91 27-May-2010 Daniel Dunbar <daniel@zuster.org> Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TargetInfo.h
4b3e90d9c924862933f15b67d8550f3d579db99a 27-May-2010 Daniel Dunbar <daniel@zuster.org> Sema: Support for #pragma options align={reset,natural}. '#pragma options align'
shares the stack with '#pragma pack', who knew!?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ea75a8286fb87ce7549e08d9dcb597f91479f54d 27-May-2010 Daniel Dunbar <daniel@zuster.org> Sema: Support for #pragma options align={reset,natural}. '#pragma options align'
shares the stack with '#pragma pack', who knew!?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3332a0eed02457716aa9a6d11e3a2a7d0d9803d2 27-May-2010 Daniel Dunbar <daniel@zuster.org> Parse: Add support for '#pragma options align'.

Also, fix a source location bug with the rparen in #pragma pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
861800c676004eabed5927f0552620d06c80a40a 27-May-2010 Daniel Dunbar <daniel@zuster.org> Parse: Add support for '#pragma options align'.

Also, fix a source location bug with the rparen in #pragma pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
d914a9c586b15f09028624ee8815ee4e6f30aea9 27-May-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce priorities into the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
12e131385e892e3723483a1081a89bcad29c8a84 27-May-2010 Douglas Gregor <dgregor@apple.com> Introduce priorities into the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
5efd361ffeae941a9212f44fe3eecc9d501faeaa 26-May-2010 Fariborz Jahanian <fjahanian@apple.com> Improve on flexible array diagnostics (PR7029).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2c0a54031c98721460806e78e0e10da093d3fd72 26-May-2010 Fariborz Jahanian <fjahanian@apple.com> Improve on flexible array diagnostics (PR7029).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3abc1353833e0b2bb9f6dd2803daa49660939b9f 26-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes misc. flexible array bugs in c++ (PR7029).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4142cebf70fe6c3855570c98b8042431797a65fd 26-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes misc. flexible array bugs in c++ (PR7029).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
061dc86f5a198f4fe456c44d4108f15726c74f11 26-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e935fdb06d60398bef724fd50bba84c1b921b40e 26-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5dfbaf6afc3278ee7164daf8454712acbb83f086 26-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added source order to CXXBaseOrMemberInitializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
a0af3b453160fc4c67363c204da13820b0586909 26-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added source order to CXXBaseOrMemberInitializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
bd052e4fcb9d924fe5d2532039a84a1ae17a1282 26-May-2010 Anders Carlsson <andersca@mac.com> ASTRecordLayoutBuilder is no longer a friend of ASTRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
1a972998db7768bbdf59e283897c5b6446f58653 26-May-2010 Anders Carlsson <andersca@mac.com> ASTRecordLayoutBuilder is no longer a friend of ASTRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
07a3b1c020b491d5a59e7a991023df836073ce9d 26-May-2010 Douglas Gregor <doug.gregor@gmail.com> Tell the string literal parser when it's not permitted to emit
diagnostics. That would be while we're parsing string literals for the
sole purpose of producing a diagnostic about them. Fixes
<rdar://problem/8026030>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
b90f4b3fb94056609da9cca5eef7358d95a363b2 26-May-2010 Douglas Gregor <dgregor@apple.com> Tell the string literal parser when it's not permitted to emit
diagnostics. That would be while we're parsing string literals for the
sole purpose of producing a diagnostic about them. Fixes
<rdar://problem/8026030>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
28dbf3f71d0e5acf64263672f87a6645292772b9 26-May-2010 Anders Carlsson <andersca@mac.com> No need to use the PrimaryBaseInfo struct in the builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
28fdd0a8b450c1329b3303e5cf8e8a788a0ef85a 26-May-2010 Anders Carlsson <andersca@mac.com> No need to use the PrimaryBaseInfo struct in the builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
aebeba9254afa91c936d7e902e61b629eaca23c3 26-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove extents of dead symbolic regions when RemoveDeadBindings.
This requires creating new persistent states due to the nature of GDM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
95798981b4859f61c1a3d4df26cb033b3e91518a 26-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove extents of dead symbolic regions when RemoveDeadBindings.
This requires creating new persistent states due to the nature of GDM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
5c336528495f889677e7ab8b3297f290242cedd1 25-May-2010 Douglas Gregor <doug.gregor@gmail.com> Only enable code patterns (e.g., try { statements } catch (...) {
statements }) in the code-completion results if explicitly requested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendOptions.h
lang/Sema/CodeCompleteConsumer.h
d8e8a58ee35ab334ab9d0c2154dca029c1822e8a 25-May-2010 Douglas Gregor <dgregor@apple.com> Only enable code patterns (e.g., try { statements } catch (...) {
statements }) in the code-completion results if explicitly requested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendOptions.h
lang/Sema/CodeCompleteConsumer.h
56b90f8c7fc63125c4cb72b622b172b4cc8a7133 25-May-2010 Ted Kremenek <kremenek@apple.com> Allocate the contents of TemplateArgumentList using ASTContext's allocator. This fixes
a massive memory leak when using a BumpPtrAllocator in ASTContext.

Added a FIXME, as the Destroy method for TemplateArgumentList isn't getting called.
This means we will instead leak when using the MallocAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
3458d43b68cc2fd1cb2b2304614e1dc3419820d8 25-May-2010 Ted Kremenek <kremenek@apple.com> Allocate the contents of TemplateArgumentList using ASTContext's allocator. This fixes
a massive memory leak when using a BumpPtrAllocator in ASTContext.

Added a FIXME, as the Destroy method for TemplateArgumentList isn't getting called.
This means we will instead leak when using the MallocAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
446527d739618c599d4b1308ab3fc391c3c655eb 25-May-2010 Douglas Gregor <doug.gregor@gmail.com> Add Redeclarable boilerplate to TypedefDecl, from Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ff3dc395ba08b3a3cadc8d3121a4cb086ab287d6 25-May-2010 Douglas Gregor <dgregor@apple.com> Add Redeclarable boilerplate to TypedefDecl, from Peter Collingbourne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cddae629ede973537d1fce280ff1e9b156d03fb6 25-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Add -emit-codegen-only, for running irgen + codegen but not the
.s printer or .o writer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenAction.h
lang/Frontend/FrontendOptions.h
32148cef25570a4fbe3ad0ec497ce3ae2cf1b774 25-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Add -emit-codegen-only, for running irgen + codegen but not the
.s printer or .o writer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CodeGenAction.h
lang/Frontend/FrontendOptions.h
09e261c84e3521bcafcd86bda79196082f7b0aaf 25-May-2010 Douglas Gregor <doug.gregor@gmail.com> Put -Wvla into the -Wgnu warning group

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
b453c530647acda78e6dc56d086e99566e59e5b1 25-May-2010 Douglas Gregor <dgregor@apple.com> Put -Wvla into the -Wgnu warning group

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
d64251d5282af2290094048cd9c2c44b8b6f86b9 25-May-2010 Douglas Gregor <doug.gregor@gmail.com> Improve code completion in failure cases in two ways:
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
dc8453422bec3bbf70c03920e01498d75783d122 25-May-2010 Douglas Gregor <dgregor@apple.com> Improve code completion in failure cases in two ways:
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
b4824a2c97bce8d1f817b29b805b435b1d22cc69 25-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> CastSizeChecker checks when casting a malloc'ed symbolic region to type T,
whether the size of the symbolic region is a multiple of the size of T.
Fixes PR6123 and PR7217.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
ab28099e3bd4859585ccb316f9f571c8c6b035fd 25-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> CastSizeChecker checks when casting a malloc'ed symbolic region to type T,
whether the size of the symbolic region is a multiple of the size of T.
Fixes PR6123 and PR7217.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
5d5c9a64c3b1f550e10867bf6bd4c76f0aa35cac 25-May-2010 Nick Lewycky <nicholas@mxc.ca> Make this class useful as a base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
45806fe5b89de739af95bea2e0d1a5822d53ae9b 25-May-2010 Nick Lewycky <nicholas@mxc.ca> Make this class useful as a base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
915b210806ed1ca402bdc83fba9c4a1050795587 24-May-2010 Chris Lattner <sabre@nondot.org> add a few more categories.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
6a143ffd46a339b17ab5b0c9c20bfdb99c5cfee3 24-May-2010 Chris Lattner <sabre@nondot.org> add a few more categories.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
1e1db427b2a9015418e28285e2c564631a427c6a 24-May-2010 Chris Lattner <sabre@nondot.org> missed an svn add


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCategories.td
9ecb63646a15f0925b05ec954af1b803e4070ceb 24-May-2010 Chris Lattner <sabre@nondot.org> missed an svn add


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCategories.td
4abe43f86c1aba0e9753eead2d48056b3fb435fd 24-May-2010 Chris Lattner <sabre@nondot.org> push categories forward a bit more: document them, add some
major buckets to catch parser and sema issues, add inline asm
category, and make diag groups take precedence over the
sweeping categories just added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
3f14538ec2651b5a2e02fd5e80d0b8886f52eb46 24-May-2010 Chris Lattner <sabre@nondot.org> push categories forward a bit more: document them, add some
major buckets to catch parser and sema issues, add inline asm
category, and make diag groups take precedence over the
sweeping categories just added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
9cc1849b2f77272958824dc3e9663d5980a2c69d 24-May-2010 Douglas Gregor <doug.gregor@gmail.com> Downgrade deletion of a void* from an error (which is should be) to an
extension warning (which other compilers seem to use). Works around a
known bug in Xalan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
94a615718d06704816c6e31a811f823c05e39f52 24-May-2010 Douglas Gregor <dgregor@apple.com> Downgrade deletion of a void* from an error (which is should be) to an
extension warning (which other compilers seem to use). Works around a
known bug in Xalan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6e629b8ba96edc3ff60af670b32381843da8270d 23-May-2010 Douglas Gregor <doug.gregor@gmail.com> It turns out that people love using VLAs in templates, too. Weaken our
VLA restrictions so that one can use VLAs in templates (even
accidentally), but not as part of a non-type template parameter (which
would be very bad).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a481ec4150ad203440852a2bfee0883dd26f7530 23-May-2010 Douglas Gregor <dgregor@apple.com> It turns out that people love using VLAs in templates, too. Weaken our
VLA restrictions so that one can use VLAs in templates (even
accidentally), but not as part of a non-type template parameter (which
would be very bad).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bf157ea685aa3251115f4dddb8b8836e355e004a 23-May-2010 Douglas Gregor <doug.gregor@gmail.com> Complain about sizeof(overloaded function) rather than crashing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9ba6af8bedba28d10a6906c62c19d43f81c5d386 23-May-2010 Douglas Gregor <dgregor@apple.com> Complain about sizeof(overloaded function) rather than crashing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
76bda258ee7feb86f569666d95cc403b37f82555 23-May-2010 Douglas Gregor <doug.gregor@gmail.com> Move OverloadExpr over to a ASTContext-allocated pointer for its
storage, rather than an UnresolvedSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/UnresolvedSet.h
928e6fcf66fc4f342bcf7cc96bf56986c9c2a833 23-May-2010 Douglas Gregor <dgregor@apple.com> Move OverloadExpr over to a ASTContext-allocated pointer for its
storage, rather than an UnresolvedSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/UnresolvedSet.h
d6a9427b13d3f1d5762de2d683268821c7853fdd 23-May-2010 Douglas Gregor <doug.gregor@gmail.com> Provide the overloaded functions for UnresolvedLookupExpr and
UnresolvedMemberExpr in their constructors, rather than adding them
after the fact. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
5a84dec38cfa9e084377a3167b474c79283c82fa 23-May-2010 Douglas Gregor <dgregor@apple.com> Provide the overloaded functions for UnresolvedLookupExpr and
UnresolvedMemberExpr in their constructors, rather than adding them
after the fact. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
75a9505863ea5d3b903e8827830f5d3e00d0f9b4 23-May-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of all of the class and function template's "common"
pointers in the ASTContext, so that the folding sets stored inside
them will be deallocated when the ASTContext is destroyed (under
-disable-free). <rdar://problem/7998824>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
0054531488928a424666ac11fcdc6bcc5112de52 23-May-2010 Douglas Gregor <dgregor@apple.com> Keep track of all of the class and function template's "common"
pointers in the ASTContext, so that the folding sets stored inside
them will be deallocated when the ASTContext is destroyed (under
-disable-free). <rdar://problem/7998824>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
2ba99bfee8a9db7d8e80bba78f0dbeb3f9801989 23-May-2010 Douglas Gregor <doug.gregor@gmail.com> Put the VLA-is-an-extension warning into its own warning group (-Wvla)
so that it can be selectively enabled/disabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
db4da82e7248eb0eec249028506ed082c6807c2a 23-May-2010 Douglas Gregor <dgregor@apple.com> Put the VLA-is-an-extension warning into its own warning group (-Wvla)
so that it can be selectively enabled/disabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
603794e83eaaaf4230626b7fc27aa87499378f5b 22-May-2010 Douglas Gregor <doug.gregor@gmail.com> Implement support for variable length arrays in C++. VLAs are limited
in several important ways:

- VLAs of non-POD types are not permitted.
- VLAs cannot be used in conjunction with C++ templates.

These restrictions are intended to keep VLAs out of the parts of the
C++ type system where they cause the most trouble. Fixes PR5678 and
<rdar://problem/8013618>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0fddb97901dbe36a8253dee29961cba8e0a87cf6 22-May-2010 Douglas Gregor <dgregor@apple.com> Implement support for variable length arrays in C++. VLAs are limited
in several important ways:

- VLAs of non-POD types are not permitted.
- VLAs cannot be used in conjunction with C++ templates.

These restrictions are intended to keep VLAs out of the parts of the
C++ type system where they cause the most trouble. Fixes PR5678 and
<rdar://problem/8013618>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9eab9dbafb622beb6ad5bdb99b7a429c38e6e164 22-May-2010 Chandler Carruth <chandlerc@gmail.com> Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
c304ba341a7daa88da42faf8f86310b764dd7b6a 22-May-2010 Chandler Carruth <chandlerc@gmail.com> Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
2e04bb57a98d2892e80338a9d2f8720f99645e97 22-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Tool::ShortName, intended to be a human readable name for the tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
3038204fd8f6ff22082dd18e4b12ed252b75a5e4 22-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Tool::ShortName, intended to be a human readable name for the tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
fdc4c1323390741f6cd57a4fe2a667fe2fbb9633 22-May-2010 Douglas Gregor <doug.gregor@gmail.com> Improve recovery when we see a dependent template name that is missing
the required "template" keyword, using the same heuristics we do for
dependent template names in member access expressions, e.g.,

test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template'
keyword to treat 'getAs' as a dependent template name
T::getAs<U>();
^
template

Fixes PR5404.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d5ab9b0a0ae24f7d0f49f6f10fd1b247e64b3306 22-May-2010 Douglas Gregor <dgregor@apple.com> Improve recovery when we see a dependent template name that is missing
the required "template" keyword, using the same heuristics we do for
dependent template names in member access expressions, e.g.,

test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template'
keyword to treat 'getAs' as a dependent template name
T::getAs<U>();
^
template

Fixes PR5404.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e0e3fb07040d590422f63ece1bcac9b46ba8516f 22-May-2010 Fariborz Jahanian <fjahanian@apple.com> Clang missing warning about conflicting declaration vs. definition
for variable arguments list methods. (radar 8006060).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
561da7e046ea6b39f4e632c68128fd01c985b46b 22-May-2010 Fariborz Jahanian <fjahanian@apple.com> Clang missing warning about conflicting declaration vs. definition
for variable arguments list methods. (radar 8006060).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2f8de9c5c052392e2f10e7ac0a73e97c5a8b5a3a 22-May-2010 Douglas Gregor <doug.gregor@gmail.com> Improve parser recovery when we encounter a dependent template name
that is missing the 'template' keyword, e.g.,

t->getAs<T>()

where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.

This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:

test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
is required to treat 'getAs' as a dependent template name
t->getAs<T>();
^
template

This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
1fd6d44d7ca97631497551bbf98866263143d706 22-May-2010 Douglas Gregor <dgregor@apple.com> Improve parser recovery when we encounter a dependent template name
that is missing the 'template' keyword, e.g.,

t->getAs<T>()

where getAs is a member of an unknown specialization. C++ requires
that we treat "getAs" as a value, but that would fail to parse since T
is the name of a type. We would then fail at the '>', since a type
cannot be followed by a '>'.

This is a very common error for C++ programmers to make, especially
since GCC occasionally allows it when it shouldn't (as does Visual
C++). So, when we are in this case, we use tentative parsing to see if
the tokens starting at "<" can only be parsed as a template argument
list. If so, we produce a diagnostic with a fix-it that states that
the 'template' keyword is needed:

test/SemaTemplate/dependent-template-recover.cpp:5:8: error: 'template' keyword
is required to treat 'getAs' as a dependent template name
t->getAs<T>();
^
template

This is just a start of this patch; I'd like to apply the same
approach to everywhere that a template-id with dependent template name
can be parsed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
15135984ec91bb94ba742f5cba85b61d4fb41910 22-May-2010 Nick Lewycky <nicholas@mxc.ca> Outdent this file by 2 spaces per the coding standards, and also clean up
whitespace at the end of lines since I'm already touching the whole file
anyways.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
db3f847cb883fdb19d79c7223fa032e7266c0ee5 22-May-2010 Nick Lewycky <nicholas@mxc.ca> Outdent this file by 2 spaces per the coding standards, and also clean up
whitespace at the end of lines since I'm already touching the whole file
anyways.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
7dff079a1f312fd1db7376c8362f5e9a96c7fb48 21-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Improved TypeLoc::getSourceRange().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
e4aec0eae303e926643c7239cf7b0197ea9f63e2 21-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Improved TypeLoc::getSourceRange().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
973cacc0c894666f112192441f78e8eb3c27736b 21-May-2010 John McCall <rjmccall@apple.com> Propagate access specifiers to anonymous union members nested within classes.
Fixes <rdar://problem/7987650>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
aec0371e62be013a2e6466688ccf6a7460880262 21-May-2010 John McCall <rjmccall@apple.com> Propagate access specifiers to anonymous union members nested within classes.
Fixes <rdar://problem/7987650>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
90f2dca178e6c2076cd74dc78fb4b22128e0f048 21-May-2010 Douglas Gregor <doug.gregor@gmail.com> Use CanQualType to enforce the use of a canonical type argument to
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a
canonical type. Fixes PR7176.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
e0d5fe2a417b84ac8b51927ebeb8f1c9ae492760 21-May-2010 Douglas Gregor <dgregor@apple.com> Use CanQualType to enforce the use of a canonical type argument to
CXXBasePaths::isAmbiguous(), rather than just asserting that we have a
canonical type. Fixes PR7176.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
b4141fd89f03dedd8dbbbd1f6aa17db30a498584 21-May-2010 Chris Lattner <sabre@nondot.org> don't make _Bool be a keyword in -fms-extensions mode, patch by
Steven Watanabe!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
34d7c4d62863ca0d5bcf705da0e1001878386c26 21-May-2010 Chris Lattner <sabre@nondot.org> don't make _Bool be a keyword in -fms-extensions mode, patch by
Steven Watanabe!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
d72e7d2c73e5fce898efecafafb0a02c2eded3ce 21-May-2010 Nick Lewycky <nicholas@mxc.ca> TypeVisitor doesn't visit Stmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeVisitor.h
74d4031b9a7dbb6204c4f97062d44bd26e21b014 21-May-2010 Nick Lewycky <nicholas@mxc.ca> TypeVisitor doesn't visit Stmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeVisitor.h
9a5ba2e5d2637ed234e1ec0bf6ef9f4fdc3b3395 21-May-2010 Chandler Carruth <chandlerc@gmail.com> Teach the RecursiveASTVisitor to enter parts of the AST previously missed.
Factor its implementation to ease the addition of these custom edges to
traverse. With this patch we get initializer expressions, block bodies, type
source info, and function argument, result, and exception types. There are
probably still some more missed edges.

While we're here, clean up and flesh out a bunch of comments.

Patch by Zhanyong Wan; I've done a cursory review, but further review
appreciated. This is fast becoming one of the most important public APIs to the
AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
facfc77487a890bfb7b5eee7e21cd2b395a9faaf 21-May-2010 Chandler Carruth <chandlerc@gmail.com> Teach the RecursiveASTVisitor to enter parts of the AST previously missed.
Factor its implementation to ease the addition of these custom edges to
traverse. With this patch we get initializer expressions, block bodies, type
source info, and function argument, result, and exception types. There are
probably still some more missed edges.

While we're here, clean up and flesh out a bunch of comments.

Patch by Zhanyong Wan; I've done a cursory review, but further review
appreciated. This is fast becoming one of the most important public APIs to the
AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
b3f7ed710d899ec70a2aa0b65c82f37a04e4e340 21-May-2010 John McCall <rjmccall@apple.com> Introduce a method to get from an anonymous struct or union record declaration
to the associated object declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
bc365c53606ab90537576cb48d93a54ce3fb0cb5 21-May-2010 John McCall <rjmccall@apple.com> Introduce a method to get from an anonymous struct or union record declaration
to the associated object declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
95c7430958128b10df1ef4be8f4ec4479672cb74 21-May-2010 Chris Lattner <sabre@nondot.org> make -Wc++-hex-floats be a member of -Wc++0x-compat,
thanks to doug for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
63dfd58c14b6e7819a04620a183b16964fddee1d 21-May-2010 Chris Lattner <sabre@nondot.org> make -Wc++-hex-floats be a member of -Wc++0x-compat,
thanks to doug for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
9fcba431c12813ecb5c35c22ef0b67d7f2c3e2ad 21-May-2010 Chris Lattner <sabre@nondot.org> Don't warn about use of hex floats in c++ mode by default,
matching G++'s behavior.

Warn when -pedantic or -Wc++-hex-floats is passed, and
don't warn if -pedantic -Wno-c++-hex-floats are both passed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
ac0f5e5ed0a45ac96a5958e5832e4bdb45734324 21-May-2010 Chris Lattner <sabre@nondot.org> Don't warn about use of hex floats in c++ mode by default,
matching G++'s behavior.

Warn when -pedantic or -Wc++-hex-floats is passed, and
don't warn if -pedantic -Wno-c++-hex-floats are both passed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
72480e5292c1950721a8ab8483305037f08ae08c 21-May-2010 Douglas Gregor <doug.gregor@gmail.com> Add a new failure kind, FK_Incomplete, to InitializationSequence, to
capture failures when we try to initialize an incomplete
type. Previously, we would (ab)use FK_ConversionFailed, then
occasionally dereference a null pointer when trying to diagnose the
failure. Fixes <rdar://problem/7959007>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
72a43bbf6802c8fcfd04dcb2be8eafcb0b8fe29c 21-May-2010 Douglas Gregor <dgregor@apple.com> Add a new failure kind, FK_Incomplete, to InitializationSequence, to
capture failures when we try to initialize an incomplete
type. Previously, we would (ab)use FK_ConversionFailed, then
occasionally dereference a null pointer when trying to diagnose the
failure. Fixes <rdar://problem/7959007>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f3e34924d5da4f9898d4f9db8f8a195a3c5d5f91 20-May-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1as: Add -help, -version, and -mllvm support.

Also, fix output defaulting to match llvm-mc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
c673af7fe67e5db4d10dd414237df247d35dd9d9 20-May-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1as: Add -help, -version, and -mllvm support.

Also, fix output defaulting to match llvm-mc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.td
94021a23b85be096d2fbe3b46a7ccddc015bc703 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts approximately the same interface as 'llvm-mc'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.h
lang/Driver/CC1AsOptions.td
lang/Driver/CMakeLists.txt
lang/Driver/Makefile
41b5b17445ab3bdf957ebd4be6c8670f09a212a8 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts approximately the same interface as 'llvm-mc'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1AsOptions.h
lang/Driver/CC1AsOptions.td
lang/Driver/CMakeLists.txt
lang/Driver/Makefile
4041ec10a1f4467c0a13b60fa6bc8fd81ebcb9b4 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move some argument lookup utilities into driver::ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
03e8ab2947a848fb0ce723dcebb1c19697614307 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move some argument lookup utilities into driver::ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
ff92ad2e768122cf2adf1d4ac818bde68491c4c0 20-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TemplateArgumentListInfo to FunctionTemplateSpecializationInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
e03db98d67111ebf7622d9086951aacc24406b66 20-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added TemplateArgumentListInfo to FunctionTemplateSpecializationInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
77e8e18b02560741e07052f35f29894f0a787091 20-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
bd054dba8a3023821f2a0951b0fae05e3522a7c9 20-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
6dd9b48ded7a31363c775d87234fd73a9e299493 20-May-2010 Ted Kremenek <kremenek@apple.com> Add libclang function 'clang_isFromMainFile()' (which just wraps SourceManager::isFromMainFile()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104208 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
47e8e399d25a976345a7bf07dc6c5b5fcb811740 20-May-2010 Ted Kremenek <kremenek@apple.com> Add libclang function 'clang_isFromMainFile()' (which just wraps SourceManager::isFromMainFile()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104208 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0e9cf205e0a9094757d3b415a3c691e934161710 20-May-2010 Douglas Gregor <doug.gregor@gmail.com> Various small fixes for construction/destruction of Objective-C++
instance variables:
- Use isRecordType() rather than isa<RecordType>(), so that we see
through typedefs in ivar types.
- Mark the destructor as referenced
- Perform C++ access control on the destructor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
68dd3ee3b5ae5b7694b4a21e34b4355431ed0457 20-May-2010 Douglas Gregor <dgregor@apple.com> Various small fixes for construction/destruction of Objective-C++
instance variables:
- Use isRecordType() rather than isa<RecordType>(), so that we see
through typedefs in ivar types.
- Mark the destructor as referenced
- Perform C++ access control on the destructor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
357f3b377abe85dd33a59122c90a361ea4226353 20-May-2010 John McCall <rjmccall@apple.com> Support implicitly closing on 'this' in a block. Fixed PR7165.

(the codegen works here, too, but that's annoying to test without execution)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ea1471e0e967548c596a71469702f8846dbaf3c0 20-May-2010 John McCall <rjmccall@apple.com> Support implicitly closing on 'this' in a block. Fixed PR7165.

(the codegen works here, too, but that's annoying to test without execution)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
699e6bdb52ad5cc144a678dd80bc346b66a9e977 20-May-2010 Chris Lattner <sabre@nondot.org> switch TemplateArgumentListBuilder to hold its flat argument list in a smallvector
instead of new[]'d. This greatly reduces the number of new[]'s, and guess what,
they were all leaked.

This adds a fixme in this hunk:

unsigned NumPackArgs = NumFlatArgs - PackBeginIndex;
+ // FIXME: NumPackArgs shouldn't be negative here???
if (NumPackArgs)
- PackArgs = &FlatArgs[PackBeginIndex];
+ PackArgs = FlatArgs.data()+PackBeginIndex;

where test/SemaTemplate/variadic-class-template-2.cpp is accessing the vector
out of range and NumPackArgs is negative. I assume variadic template args are
completely hosed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
98d279ba8092186f606abaa8298f13a0816b9cf2 20-May-2010 Chris Lattner <sabre@nondot.org> switch TemplateArgumentListBuilder to hold its flat argument list in a smallvector
instead of new[]'d. This greatly reduces the number of new[]'s, and guess what,
they were all leaked.

This adds a fixme in this hunk:

unsigned NumPackArgs = NumFlatArgs - PackBeginIndex;
+ // FIXME: NumPackArgs shouldn't be negative here???
if (NumPackArgs)
- PackArgs = &FlatArgs[PackBeginIndex];
+ PackArgs = FlatArgs.data()+PackBeginIndex;

where test/SemaTemplate/variadic-class-template-2.cpp is accessing the vector
out of range and NumPackArgs is negative. I assume variadic template args are
completely hosed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
8f782aa0b75cff1481e87720af7c22aed21cb7ff 20-May-2010 Chris Lattner <sabre@nondot.org> fix the TemplateArgumentList copy constructor to not
be a copy constructor (since it isn't one semantically)
and fix the ownership bits it sets to be correct!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
885989109ade7cb4dc493e25da41456c64b3cf6a 20-May-2010 Chris Lattner <sabre@nondot.org> fix the TemplateArgumentList copy constructor to not
be a copy constructor (since it isn't one semantically)
and fix the ownership bits it sets to be correct!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
bc7412f5096d9329664f5a1119d09f75d035e13a 20-May-2010 Chris Lattner <sabre@nondot.org> Clarify TemplateArgumentList ownership over its "flat" and
"structure" arg lists, the first step to fixing some massive
memory leaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
56ef550c5eeea0714c635782776389df2a177584 20-May-2010 Chris Lattner <sabre@nondot.org> Clarify TemplateArgumentList ownership over its "flat" and
"structure" arg lists, the first step to fixing some massive
memory leaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
3591793644859f2d3cb821286c71cc72849a3fef 19-May-2010 Ted Kremenek <kremenek@apple.com> Move CXCursor_FirstDecl definition later to make the results more readable in the debugger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104171 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
50aa6acd0b8d40c8956372a69e0a73f0802a5494 19-May-2010 Ted Kremenek <kremenek@apple.com> Move CXCursor_FirstDecl definition later to make the results more readable in the debugger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104171 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
50be5101831a8e3679e18775b41816c9ddfc39ca 19-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
e4da7a034a2fcf4b14d0bcc28d05de0878159061 19-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
3fc091df2d07bc3b13e91d915050d5309cb83c11 19-May-2010 Fariborz Jahanian <fjahanian@apple.com> Adds support for ObjC++'s GC attribute on declaration of
object variables and functions returning such objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2390a72a3ebd37737fec5ba1385db9c3bb22fc59 19-May-2010 Fariborz Jahanian <fjahanian@apple.com> Adds support for ObjC++'s GC attribute on declaration of
object variables and functions returning such objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
949d2c031f173ec539d1aa667bba503fda7fb763 19-May-2010 Douglas Gregor <doug.gregor@gmail.com> Cache the linkage of a type within its canonical type, eliminating
some seriously non-linear performance with deeply nested template
instantiations, as shown in PR6998.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
60e7064d78f1a29cf969f255a19a9ae25e6bc128 19-May-2010 Douglas Gregor <dgregor@apple.com> Cache the linkage of a type within its canonical type, eliminating
some seriously non-linear performance with deeply nested template
instantiations, as shown in PR6998.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
bc4be079fe26bddb2bdd3e810adc14efb32360f1 19-May-2010 Ted Kremenek <kremenek@apple.com> Remove clang_isDeclarationADefinition() since its functionality is already provided by clang_isCursorDefinition().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104138 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2bb106eeba7def5364a0e6c4d99541370c4950a5 19-May-2010 Ted Kremenek <kremenek@apple.com> Remove clang_isDeclarationADefinition() since its functionality is already provided by clang_isCursorDefinition().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104138 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
dc4d6feb0c4f81110cef67e785e3e8374384ba5f 19-May-2010 Ted Kremenek <kremenek@apple.com> Add clang support for IBOutletCollection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
857e918a8a40deb128840308a318bf623d68295f 19-May-2010 Ted Kremenek <kremenek@apple.com> Add clang support for IBOutletCollection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104135 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
e59376484d322fc81c3ea5bdb0d7f449b64960e6 19-May-2010 Ted Kremenek <kremenek@apple.com> Add function 'clang_isTagDeclDefinition()' to allow clients of libclang to distinguish between
forward declarations and definitions of structs/classes/enums.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104075 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b12903e1a4b8d1b611b8c7e4f910665d628e68cd 19-May-2010 Ted Kremenek <kremenek@apple.com> Add function 'clang_isTagDeclDefinition()' to allow clients of libclang to distinguish between
forward declarations and definitions of structs/classes/enums.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104075 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
01890a8487ae3330abc501b455e2092545d54775 18-May-2010 Douglas Gregor <doug.gregor@gmail.com> Add support for Microsoft's __thiscall, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Parse/AttributeList.h
f813a2c03fcb05381b3252010435f557eb6b3cde 18-May-2010 Douglas Gregor <dgregor@apple.com> Add support for Microsoft's __thiscall, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Parse/AttributeList.h
f4d35912dc6a2f46a9ea2a4392aa29098af661be 18-May-2010 Sean Hunt <rideau3@gmail.com> Switch over the tablegen to use much prettier range technology
Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def
files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/AST/StmtVisitor.h
7381d5cfbd599fa2b9e215011ad7cbd449de231a 18-May-2010 Sean Hunt <rideau3@gmail.com> Switch over the tablegen to use much prettier range technology
Also rename ABSTRACT to ABSTRACT_STMT, in keeping with the other .def
files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
lang/AST/Stmt.h
lang/AST/StmtVisitor.h
623d389d3c6690af472c88aa6abce59135facce1 18-May-2010 John McCall <rjmccall@apple.com> If a switch condition is constant, don't warn about missing enum cases.
If a switch condition is constant, warn if there's no case for it.

Constant switch conditions do come up in reasonable template code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0fb97083cc0f8a82e404e22991ae80d2216e71d5 18-May-2010 John McCall <rjmccall@apple.com> If a switch condition is constant, don't warn about missing enum cases.
If a switch condition is constant, warn if there's no case for it.

Constant switch conditions do come up in reasonable template code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
62f0c356fe4509df60876dd69cc9a81e72206055 18-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add option '-analyzer-max-loop', which specifies the maximum
number of times the analyzer will go through a loop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
6362b893731ccf4480a96527db9e55e04b801503 18-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add option '-analyzer-max-loop', which specifies the maximum
number of times the analyzer will go through a loop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
1e94f8cb4678256a3438a69879b9e346038108d8 18-May-2010 Nick Lewycky <nicholas@mxc.ca> Add a 'Base' type to RecursiveASTVisitor to make recursing easier and document
how you're supposed to use it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
2fe0025a1300689b2d2517bb89ecadbab8b62ac5 18-May-2010 Nick Lewycky <nicholas@mxc.ca> Add a 'Base' type to RecursiveASTVisitor to make recursing easier and document
how you're supposed to use it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
cca3b567dafc1d3125f476ae19bf82d84b16e4c1 18-May-2010 John McCall <rjmccall@apple.com> Comments and assorted cleanups for the Objective C type AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e175a6f6ede0ae31165a18ac8bf4e8d2681b39f8 18-May-2010 John McCall <rjmccall@apple.com> Comments and assorted cleanups for the Objective C type AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
862e24e857a723815f3b92f74f5571fd0eecb432 17-May-2010 Ted Kremenek <kremenek@apple.com> Add libclang function 'clang_CXXMethod_isStatic' to query of a C++ method
is declared static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103963 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9ada39a4ac82ff5f5087b0a7fa9ed0d32be55a3b 17-May-2010 Ted Kremenek <kremenek@apple.com> Add libclang function 'clang_CXXMethod_isStatic' to query of a C++ method
is declared static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103963 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a0e80100a3079c3c2410fb48f3b14ef621c2a42d 16-May-2010 John McCall <rjmccall@apple.com> Be sure to initialize the "has base type as written" field of an
ObjCObjectTypeLoc. This should clear up some valgrind errors we've
been seeing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
ca6773808f8e75ffa86847e9d12885c69e9de53e 16-May-2010 John McCall <rjmccall@apple.com> Be sure to initialize the "has base type as written" field of an
ObjCObjectTypeLoc. This should clear up some valgrind errors we've
been seeing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
f4f254c60f644f08dea9cfbe0865016a5ef748a6 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/RecursiveASTVisitor.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
8b9ae4311f89abe3c417577a4e6e23a504f5d33f 15-May-2010 Douglas Gregor <doug.gregor@gmail.com> Implement semantic analysis and an AST representation for the named
return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.

I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Stmt.h
5077c3876beeaed32280af88244e8050078619a8 15-May-2010 Douglas Gregor <dgregor@apple.com> Implement semantic analysis and an AST representation for the named
return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.

I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Stmt.h
bc34e45429666fec96b31e42d8d06713b7eee334 15-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Make -fverbose-asm the default for platforms where the integrated
assembler defaults to on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
1b71848c5238747ede9650b7907172f8a7e088a5 15-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Make -fverbose-asm the default for platforms where the integrated
assembler defaults to on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
635e53c56e5a8089d3b081fde2c0169998cb51a6 14-May-2010 Ted Kremenek <kremenek@apple.com> Add CXType and an initial set of supporting functions to libclang. This exposes details of
Clang's representation of the C type system to clients. It is nowhere near complete, and will
be expanded on demand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103809 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8e0ac174c8c8c980927b3e1447f16f62fbe2a2e4 14-May-2010 Ted Kremenek <kremenek@apple.com> Add CXType and an initial set of supporting functions to libclang. This exposes details of
Clang's representation of the C type system to clients. It is nowhere near complete, and will
be expanded on demand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103809 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
25b91a5424ca030fc44be4c12811ca69c376ab99 14-May-2010 Chris Lattner <sabre@nondot.org> fit in 80 cols, remove prototypes for handling #assert since apparently noone cares.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
321c2688198f6f1a4086964e505f239683423cec 14-May-2010 Chris Lattner <sabre@nondot.org> fit in 80 cols, remove prototypes for handling #assert since apparently noone cares.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
f2a9db01ec058f46629814633b4a162ee877d6f6 14-May-2010 Chris Lattner <sabre@nondot.org> Refactor ParseFunctionDeclaratorIdentifierList to have the first
identifier in the identifier list consumed before it is called.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
83a944763b0948c608eb48f101ec10a1ae5da46a 14-May-2010 Chris Lattner <sabre@nondot.org> Refactor ParseFunctionDeclaratorIdentifierList to have the first
identifier in the identifier list consumed before it is called.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1fa068248824ae0e40c8120ed65406a13c859a74 14-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added Expr::EvaluateAsAnyLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e17a6436b429e4b18a5e157061fb13bbc677b3b0 14-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added Expr::EvaluateAsAnyLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4d7353a63e9957701befb8527d7d59de89d000e0 14-May-2010 Daniel Dunbar <daniel@zuster.org> Revert r103770, "Added basic source locations to Elaborated and DependentName
types.", it is breaking Clang bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
a63db84b164d3f1c987a3ea6251e3092db4f317b 14-May-2010 Daniel Dunbar <daniel@zuster.org> Revert r103770, "Added basic source locations to Elaborated and DependentName
types.", it is breaking Clang bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
ef012445d431eb51de6ce033e117106624a1dc73 14-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
5431299f6e1e1d14b39b924fe24bf04035f4ae42 14-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added basic source locations to Elaborated and DependentName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
e41da3379808d2abaed1219ffe9bbec2b5b025a4 14-May-2010 Douglas Gregor <doug.gregor@gmail.com> Namespaces can only be defined at global or namespace scope. Fixes PR6596.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
95f1b15ce1b281c8517d77792abe540753fbcc12 14-May-2010 Douglas Gregor <dgregor@apple.com> Namespaces can only be defined at global or namespace scope. Fixes PR6596.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
a78927d6476067d6c7a68d6bc21c93d66f265594 13-May-2010 Douglas Gregor <doug.gregor@gmail.com> Rework when and how vtables are emitted, by tracking where vtables are
"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions.

The new scheme:
- For every use of a vtable, Sema calls MarkVTableUsed() to indicate
the use. For example, this occurs when calling a virtual member
function of the class, defining a constructor of that class type,
dynamic_cast'ing from that type to a derived class, casting
to/through a virtual base class, etc.
- For every definition of a vtable, Sema calls MarkVTableUsed() to
indicate the definition. This happens at the end of the translation
unit for classes whose key function has been defined (so we can
delay computation of the key function; see PR6564), and will also
occur with explicit template instantiation definitions.
- For every vtable defined/used, we mark all of the virtual member
functions of that vtable as defined/used, unless we know that the key
function is in another translation unit. This instantiates virtual
member functions when needed.
- At the end of the translation unit, Sema tells CodeGen (via the
ASTConsumer) which vtables must be defined (CodeGen will define
them) and which may be used (for which CodeGen will define the
vtables lazily).

From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).

Notes:
(1) There's a ton of churn in the tests, because the order in which
vtables get emitted to IR has changed. I've tried to isolate some of
the larger tests from these issues.
(2) Some diagnostics related to
implicitly-instantiated/implicitly-defined virtual member functions
have moved to the point of first use/definition. It's better this
way.
(3) I could use a review of the places where we MarkVTableUsed, to
see if I missed any place where the language effectively requires a
vtable.

Fixes PR7114 and PR6564.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
6fb745bdf1ff1e32caf07e42093a7920726892c1 13-May-2010 Douglas Gregor <dgregor@apple.com> Rework when and how vtables are emitted, by tracking where vtables are
"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions.

The new scheme:
- For every use of a vtable, Sema calls MarkVTableUsed() to indicate
the use. For example, this occurs when calling a virtual member
function of the class, defining a constructor of that class type,
dynamic_cast'ing from that type to a derived class, casting
to/through a virtual base class, etc.
- For every definition of a vtable, Sema calls MarkVTableUsed() to
indicate the definition. This happens at the end of the translation
unit for classes whose key function has been defined (so we can
delay computation of the key function; see PR6564), and will also
occur with explicit template instantiation definitions.
- For every vtable defined/used, we mark all of the virtual member
functions of that vtable as defined/used, unless we know that the key
function is in another translation unit. This instantiates virtual
member functions when needed.
- At the end of the translation unit, Sema tells CodeGen (via the
ASTConsumer) which vtables must be defined (CodeGen will define
them) and which may be used (for which CodeGen will define the
vtables lazily).

From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).

Notes:
(1) There's a ton of churn in the tests, because the order in which
vtables get emitted to IR has changed. I've tried to isolate some of
the larger tests from these issues.
(2) Some diagnostics related to
implicitly-instantiated/implicitly-defined virtual member functions
have moved to the point of first use/definition. It's better this
way.
(3) I could use a review of the places where we MarkVTableUsed, to
see if I missed any place where the language effectively requires a
vtable.

Fixes PR7114 and PR6564.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
6f52e3c5663a669ec61379e933e0fe7ad2f1a566 13-May-2010 Chris Lattner <sabre@nondot.org> add a couple of key functions for classes without them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
bef0efd11bc4430a3ee437a3213cec5c18af855a 13-May-2010 Chris Lattner <sabre@nondot.org> add a couple of key functions for classes without them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
8f4b74e651450b38ef1b217fcf9b6c430424230a 13-May-2010 Chris Lattner <sabre@nondot.org> "this patch properly addresses escaping < and > which might appear
(e.g. for C++ operators) in the xml dump.

I also re-enabled the unit test for ast-print-xml (or so I think)
at least, make test didn't fail..."

patch by Sebastien Binet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DocumentXML.h
edd8df9cd260a74cfeea3c921a78d5f33c659573 13-May-2010 Chris Lattner <sabre@nondot.org> "this patch properly addresses escaping < and > which might appear
(e.g. for C++ operators) in the xml dump.

I also re-enabled the unit test for ast-print-xml (or so I think)
at least, make test didn't fail..."

patch by Sebastien Binet!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DocumentXML.h
0d225d54d4cfdccbaa0fb7e68f3b05b989e5c60e 12-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/i386: Don't allow compiling C++ with -fapple-kext, we don't support the necessary ABI yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
b30575c22f249c0697df0cd2aa872d14d4fa9c57 12-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/i386: Don't allow compiling C++ with -fapple-kext, we don't support the necessary ABI yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
b6a682e09b458a1e123b0bb6b7c415eb62fe2ecc 12-May-2010 John McCall <rjmccall@apple.com> When checking scopes for indirect goto, be more permissive (but still safe)
about the permitted scopes. Specifically:
1) Permit labels and gotos to appear after a prologue of variable initializations.
2) Permit indirect gotos to jump out of scopes that don't require cleanup.
3) Diagnose possible attempts to indirect-jump out of scopes that do require
cleanup.
This requires a substantial reinvention of the algorithm for checking indirect
goto. The current algorithm is Omega(M*N), with M = the number of unique
scopes being jumped from and N = the number of unique scopes being jumped to,
with an additional factor that is probably (worst-case) linear in the depth
of scopes. Thus the entire thing is likely cubic given some truly bizarre
ill-formed code; on well-formed code the additional factor collapses to
an amortized constant (when amortized over the entire function) and so
the algorithm is quadratic. Even this requires every label to appear in
its own scope, which would be very unusual for indirect-goto code (and
extremely unlikely for well-formed code); it is far more likely that
all labels will be in the same scope and so the algorithm becomes linear.
For such a marginal feature, I am fairly happy with this result.

(this is using JumpDiagnostic's definition of scope, where successive
variables in a block appear in their own scope)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ddb0b4d5391d3e6bc9dcf93dc42310b20c96b6fc 12-May-2010 John McCall <rjmccall@apple.com> When checking scopes for indirect goto, be more permissive (but still safe)
about the permitted scopes. Specifically:
1) Permit labels and gotos to appear after a prologue of variable initializations.
2) Permit indirect gotos to jump out of scopes that don't require cleanup.
3) Diagnose possible attempts to indirect-jump out of scopes that do require
cleanup.
This requires a substantial reinvention of the algorithm for checking indirect
goto. The current algorithm is Omega(M*N), with M = the number of unique
scopes being jumped from and N = the number of unique scopes being jumped to,
with an additional factor that is probably (worst-case) linear in the depth
of scopes. Thus the entire thing is likely cubic given some truly bizarre
ill-formed code; on well-formed code the additional factor collapses to
an amortized constant (when amortized over the entire function) and so
the algorithm is quadratic. Even this requires every label to appear in
its own scope, which would be very unusual for indirect-goto code (and
extremely unlikely for well-formed code); it is far more likely that
all labels will be in the same scope and so the algorithm becomes linear.
For such a marginal feature, I am fairly happy with this result.

(this is using JumpDiagnostic's definition of scope, where successive
variables in a block appear in their own scope)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ab1f1819386bd718899582eb6426b2619b11e2cf 11-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Merged Elaborated and QualifiedName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/TypeXML.def
465d41b92b2c862f3062c412a0538db65c6a2661 11-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Merged Elaborated and QualifiedName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/RecursiveASTVisitor.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/TypeXML.def
dec66e7d561ef6363f0cf77832b105c960e2a80a 11-May-2010 Douglas Gregor <doug.gregor@gmail.com> The C++98/03 standard is disturbingly silent about out-of-scope
explicit instantiations of template. C++0x clarifies the intent
(they're ill-formed in some cases; see [temp.explicit] for
details). However, one could squint at the C++98/03 standard and
conclude they are permitted, so reduce the error to a warning
(controlled by -Wc++0x-compat) in C++98/03 mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
2166beba8d939d2938c5401af2c8d3687afd5d8c 11-May-2010 Douglas Gregor <dgregor@apple.com> The C++98/03 standard is disturbingly silent about out-of-scope
explicit instantiations of template. C++0x clarifies the intent
(they're ill-formed in some cases; see [temp.explicit] for
details). However, one could squint at the C++98/03 standard and
conclude they are permitted, so reduce the error to a warning
(controlled by -Wc++0x-compat) in C++98/03 mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
f9c47f2d86e4cf90f50b2f2e44c48705f4c9bbde 11-May-2010 Douglas Gregor <doug.gregor@gmail.com> Fixes for compilation with Microsoft Visual Studio 2010, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103458 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/Analysis/ProgramPoint.h
lang/Parse/Ownership.h
a5fdd9ce694b1c2dbfd225cb6f55ef743d1ab562 11-May-2010 Douglas Gregor <dgregor@apple.com> Fixes for compilation with Microsoft Visual Studio 2010, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103458 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/Analysis/ProgramPoint.h
lang/Parse/Ownership.h
40cb1b8a4b306732502de20a60e3498fbcf0ed3f 11-May-2010 John McCall <rjmccall@apple.com> Refactor the constant-evaluator so that it only supports a single form
of constant-evaluation. Formerly you could control whether it accepted
local l-values or not; now it always evaluates local l-values in the core
routines, but filters them out where consumed by the top-level routines.
This will make it much easier to cache evaluability.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
42c8f87eb60958170c46767273bf93e6c96125bf 11-May-2010 John McCall <rjmccall@apple.com> Refactor the constant-evaluator so that it only supports a single form
of constant-evaluation. Formerly you could control whether it accepted
local l-values or not; now it always evaluates local l-values in the core
routines, but filters them out where consumed by the top-level routines.
This will make it much easier to cache evaluability.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9b5950a974c52c637cde314bc810e1d639aae6a5 10-May-2010 Ted Kremenek <kremenek@apple.com> Allocate most of DeclarationNamesTable using ASTContext's allcocator. The only things that
aren't allocated this way are the internal FoldingSets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
45d9c2d2b1b4ada29160edadc071db9779c0ec07 10-May-2010 Ted Kremenek <kremenek@apple.com> Allocate most of DeclarationNamesTable using ASTContext's allcocator. The only things that
aren't allocated this way are the internal FoldingSets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
d245d9a6a359e2e5c7b3d949bf8161e6412010e3 10-May-2010 Ted Kremenek <kremenek@apple.com> Start converting pieces of DeclarationNameTable to be allocated using ASTContext's allocator.
While DeclarationNameTable doesn't leak, it uses 'malloc' too often. Start with having
'CXXLiteralOperatorNames' allocated using ASTContext's allocator and add a 'DoDestroy()' method
to DeclarationNameTable that is called by ~ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclarationName.h
ac9590effa90406767a544005ed1de52e258306b 10-May-2010 Ted Kremenek <kremenek@apple.com> Start converting pieces of DeclarationNameTable to be allocated using ASTContext's allocator.
While DeclarationNameTable doesn't leak, it uses 'malloc' too often. Start with having
'CXXLiteralOperatorNames' allocated using ASTContext's allocator and add a 'DoDestroy()' method
to DeclarationNameTable that is called by ~ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclarationName.h
9b92799c22e4763de73b8143738963b518327a75 10-May-2010 Ted Kremenek <kremenek@apple.com> Convert CXXTempory[] in CXXExprWithTemporaries to be allocated using ASTContext's allocator. Fixes <rdar://problem/7961605>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d04ed416be7c55bddddab1fa3fd38a0113a6b3da 10-May-2010 Ted Kremenek <kremenek@apple.com> Convert CXXTempory[] in CXXExprWithTemporaries to be allocated using ASTContext's allocator. Fixes <rdar://problem/7961605>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f60cac43575e3fa97a7c405b0b4de60b760daf3b 10-May-2010 Douglas Gregor <doug.gregor@gmail.com> Improved -ast-print-xml for C++, from Sebastien Binet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/TypeXML.def
4bd98e886012817fcfd40aa4c8329fa48f69b0a9 10-May-2010 Douglas Gregor <dgregor@apple.com> Improved -ast-print-xml for C++, from Sebastien Binet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/TypeXML.def
ab97c573784cd225ac9c00fbe75ece29850f8580 10-May-2010 Douglas Gregor <doug.gregor@gmail.com> Alternative workaround for MSVC compilation failure, from Dimitry Andric

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c896ea80bb7289a3f7eef57d3acdcd445b6851db 10-May-2010 Douglas Gregor <dgregor@apple.com> Alternative workaround for MSVC compilation failure, from Dimitry Andric

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f4304a25d5df6f5a44db3b4d49a35fa55417ae4b 10-May-2010 Chris Lattner <sabre@nondot.org> pch'ify CXXNewExpr and CXXZeroInitValueExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
5921863d8f24084797863b5df37842113bac4352 10-May-2010 Chris Lattner <sabre@nondot.org> pch'ify CXXNewExpr and CXXZeroInitValueExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
8ac9cd508f6f74b94749b4e96163e863e842086c 10-May-2010 Chandler Carruth <chandlerc@gmail.com> Doxygen-ify a comment and add an example of when this AST node is required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
ddfe960d252a93525692b547945236d361d1929f 10-May-2010 Chandler Carruth <chandlerc@gmail.com> Doxygen-ify a comment and add an example of when this AST node is required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
2a29863f61f241641ffa8c7398233e4e5f32abe0 10-May-2010 Chris Lattner <sabre@nondot.org> pchify CXXTemporary, CXXBindTemporaryExpr, and
CXXExprWithTemporaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
d2598368876cfe40bc8465540033bc5b5e58d8af 10-May-2010 Chris Lattner <sabre@nondot.org> pchify CXXTemporary, CXXBindTemporaryExpr, and
CXXExprWithTemporaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
3569924fe651bd875a27a52fe5add823a17aa827 09-May-2010 Chandler Carruth <chandlerc@gmail.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
5ce667770652016e73dae991372effb5d6f6bb0f 09-May-2010 Chandler Carruth <chandlerc@gmail.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
31a064dad51d5659cd05a6ab87843e5cf00238b5 09-May-2010 Chris Lattner <sabre@nondot.org> pch'ify default argument definitions and uses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
030854b95f7bfd86aaa8afd9ae1aff9768a37e9a 09-May-2010 Chris Lattner <sabre@nondot.org> pch'ify default argument definitions and uses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
d5f99d18d76cc4f105361876e34c2a0f703efeb3 09-May-2010 Chris Lattner <sabre@nondot.org> pch'ify 'this' and 'throw'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
2fbdfcdf3bbf7b941853d38b123930755e837437 09-May-2010 Chris Lattner <sabre@nondot.org> pch'ify 'this' and 'throw'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
b6538bba80f90fb335518f7cc1f06b441db35702 09-May-2010 Chris Lattner <sabre@nondot.org> pch'ify typeid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
14ab24f01e36d495fce183aa67b41e45cdd54f39 09-May-2010 Chris Lattner <sabre@nondot.org> pch'ify typeid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
f7557522cd45846f3c017490748ed7b2b97bdd83 09-May-2010 Chris Lattner <sabre@nondot.org> pchify CXXMemberCallExpr correctly. Before it would serialize
and deserialize as a CallExpr which is close, but ends up
deserializing with the wrong stmt class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
1817bd483b538fd3f4530649f5cb900bad9e8a76 09-May-2010 Chris Lattner <sabre@nondot.org> pchify CXXMemberCallExpr correctly. Before it would serialize
and deserialize as a CallExpr which is close, but ends up
deserializing with the wrong stmt class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
070aaeac417cf0f715968b1f4974c651f1f147ad 09-May-2010 Anders Carlsson <andersca@mac.com> Actually compute the empty subobject sizes. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
836fc14e6cdad2362fc31f11bf7b14832cba34b9 09-May-2010 Anders Carlsson <andersca@mac.com> Actually compute the empty subobject sizes. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
f4be20c3c45287bb2971efcf6959e91620b15371 09-May-2010 Anders Carlsson <andersca@mac.com> Add a SizeOfLargestEmptySubobject member to ASTRecordLayout. For C++ classes this will hold the largest empty subobject or 0 if the class doesn't have any empty subobjects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
c3fddeb4384de2238ec03c77be6bee606725609e 09-May-2010 Anders Carlsson <andersca@mac.com> Add a SizeOfLargestEmptySubobject member to ASTRecordLayout. For C++ classes this will hold the largest empty subobject or 0 if the class doesn't have any empty subobjects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
bca935e66657a4eae5fa48c8d59d5e0592e5bd86 09-May-2010 Douglas Gregor <doug.gregor@gmail.com> Attempted workaround for MSVC compile error

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1f10962edd40e86c999f037c16137ada4d080b62 09-May-2010 Douglas Gregor <dgregor@apple.com> Attempted workaround for MSVC compile error

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e5ae4387a39699967565520bc4169dec43d7f147 08-May-2010 Douglas Gregor <doug.gregor@gmail.com> When printing an overload candidate that failed due to SFINAE, print a
specific message that includes the template arguments, e.g.,

test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template
ignored: substitution failure [with T = int *]
typename T::type get_type(const T&); // expected-note{{candidate ...
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ec20f46740a59758b12c22108002395bcf5b6f9b 08-May-2010 Douglas Gregor <dgregor@apple.com> When printing an overload candidate that failed due to SFINAE, print a
specific message that includes the template arguments, e.g.,

test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template
ignored: substitution failure [with T = int *]
typename T::type get_type(const T&); // expected-note{{candidate ...
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
afb1d517a6c0a9802685cbd6a93aeba7290a12cf 08-May-2010 Douglas Gregor <doug.gregor@gmail.com> Improve overload-candidate diagnostic for a function template that
failed because the explicitly-specified template arguments did not
match its template parameters, e.g.,

test/SemaTemplate/overload-candidates.cpp:18:8: note: candidate
template
ignored: invalid explicitly-specified argument for template
parameter 'I'
void get(const T&);
^
test/SemaTemplate/overload-candidates.cpp:20:8: note: candidate
template
ignored: invalid explicitly-specified argument for 1st template
parameter
void get(const T&);
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103344 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f1a8445036a2d047c7165d4170e3058cdeaba6eb 08-May-2010 Douglas Gregor <dgregor@apple.com> Improve overload-candidate diagnostic for a function template that
failed because the explicitly-specified template arguments did not
match its template parameters, e.g.,

test/SemaTemplate/overload-candidates.cpp:18:8: note: candidate
template
ignored: invalid explicitly-specified argument for template
parameter 'I'
void get(const T&);
^
test/SemaTemplate/overload-candidates.cpp:20:8: note: candidate
template
ignored: invalid explicitly-specified argument for 1st template
parameter
void get(const T&);
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103344 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ca8d79a0dc1b31a73626e366e17f0ddb95250b19 08-May-2010 Douglas Gregor <doug.gregor@gmail.com> When template argument deduction fails because the call had too
many/too few arguments, use the same diagnostic we use for arity
mismatches in non-templates (but note that it's a function template).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a18592ec62e898aed7ed71e1f09c314590ce9ec7 08-May-2010 Douglas Gregor <dgregor@apple.com> When template argument deduction fails because the call had too
many/too few arguments, use the same diagnostic we use for arity
mismatches in non-templates (but note that it's a function template).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a4f7ff4959c7a5a0ff5e093facad76671e176f28 08-May-2010 Douglas Gregor <doug.gregor@gmail.com> When printing a non-viable overload candidate that failed due to
conflicting deduced template argument values, give a more specific
reason along with those values, e.g.,

test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template
ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long')
const T& min(const T&, const T&);
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/Basic/DiagnosticSemaKinds.td
a933319ebf754396623165f9dc0a29c2a48879f5 08-May-2010 Douglas Gregor <dgregor@apple.com> When printing a non-viable overload candidate that failed due to
conflicting deduced template argument values, give a more specific
reason along with those values, e.g.,

test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template
ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long')
const T& min(const T&, const T&);
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/Basic/DiagnosticSemaKinds.td
15d6c2fb6d490811b41792b7d90331fb9c16694e 08-May-2010 Douglas Gregor <doug.gregor@gmail.com> When we encounter a non-dependent type during template instantiation,
mark any declarations we see inside of that type as
"referenced". Fixes PR7079.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
b4eeaff1595b7d0a8fbc2b3c8bec7dc63f48b7fd 08-May-2010 Douglas Gregor <dgregor@apple.com> When we encounter a non-dependent type during template instantiation,
mark any declarations we see inside of that type as
"referenced". Fixes PR7079.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
34554d5a66067c6aec5d0aa846c1ce041156c76d 08-May-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a recursive AST visitor that makes it trivial to recursively
walk an entire AST, including all of the types, declarations,
statements, and expressions, and allowing one to easily override the
behavior of the walk at any particular node kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
d30bf2eb6d6bbebd41236bf205d3a6dfc51a3659 08-May-2010 Douglas Gregor <dgregor@apple.com> Introduce a recursive AST visitor that makes it trivial to recursively
walk an entire AST, including all of the types, declarations,
statements, and expressions, and allowing one to easily override the
behavior of the walk at any particular node kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecursiveASTVisitor.h
b063d153c55d662ec34f4773387bc45d2289ff74 07-May-2010 Chris Lattner <sabre@nondot.org> add PCH support for a bunch of C++ Decls, patch by
Andrew Sutton!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
6ad9ac097918fbdeb443ea7b99d4db9e49b28534 07-May-2010 Chris Lattner <sabre@nondot.org> add PCH support for a bunch of C++ Decls, patch by
Andrew Sutton!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
33ca89e76b3797cc73c0e1540370614e7a7127c3 07-May-2010 Chris Lattner <sabre@nondot.org> add more types to -ast-print-xml, PR5006


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TypeXML.def
fde75965ced8f09b9136f6d9a0f2ec35309e1a35 07-May-2010 Chris Lattner <sabre@nondot.org> add more types to -ast-print-xml, PR5006


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TypeXML.def
11198d21ca469374ead88920b60b5bbbe89808f8 07-May-2010 Ted Kremenek <kremenek@apple.com> Add NamedDecl::printName() for clients that to use getNameAsString() but are already using a raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0b2227e1ca4eb7b2deaec3da963b7777f0bd7f7b 07-May-2010 Ted Kremenek <kremenek@apple.com> Add NamedDecl::printName() for clients that to use getNameAsString() but are already using a raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cf4d346eac81f9f25f32ed2a905eef44e41892fa 07-May-2010 Douglas Gregor <doug.gregor@gmail.com> Add a stub frontend action for BoostCon, for next week's workshop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
f78cc4360eb4284091d0d38f3055084360f8c753 07-May-2010 Douglas Gregor <dgregor@apple.com> Add a stub frontend action for BoostCon, for next week's workshop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
c70306e9aecfba0dbc325d9a9df3d8033a8a0d19 07-May-2010 Chris Lattner <sabre@nondot.org> reimplement the caching in the SourceManager::isBeforeInTranslationUnit()
method to be correct. Right now it correctly computes the cache, then
goes ahead and computes the result the hard way, then asserts that they
match. Next I'll actually turn it on.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
dcb1d68f6ffa183f3919aee6b554aec3793bf13e 07-May-2010 Chris Lattner <sabre@nondot.org> reimplement the caching in the SourceManager::isBeforeInTranslationUnit()
method to be correct. Right now it correctly computes the cache, then
goes ahead and computes the result the hard way, then asserts that they
match. Next I'll actually turn it on.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
946652c22665f29bce8806183f65c3d5c3490bec 07-May-2010 Ted Kremenek <kremenek@apple.com> Add CXCursor support for LinkageSpecDecl (e.g., 'extern "C"').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103224 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a0536d8dd900bb48ea886bd68d777b03b061c068 07-May-2010 Ted Kremenek <kremenek@apple.com> Add CXCursor support for LinkageSpecDecl (e.g., 'extern "C"').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103224 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
cc563119eaeba939ff305005a6ea1a5959911eed 07-May-2010 Ted Kremenek <kremenek@apple.com> Add CXCursor support for C++ namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103211 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8f06e0e9fec3ca501e5fb129f413adbfc88e82f8 07-May-2010 Ted Kremenek <kremenek@apple.com> Add CXCursor support for C++ namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103211 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4c29b9f0bd9a3b396eb233e5b0db0ea291bbcf4a 06-May-2010 Chris Lattner <sabre@nondot.org> ignore *.orig when installing, patch by Brooks Davis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Makefile
a3cb8ee5282193017af454cab0a54b810246ef66 06-May-2010 Chris Lattner <sabre@nondot.org> ignore *.orig when installing, patch by Brooks Davis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Makefile
da6871e83713cd3fe914a4c44fd4b03898c465e3 06-May-2010 Douglas Gregor <doug.gregor@gmail.com> Fixed DISABLE_SMART_POINTERS breakage

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
eecf38f821fe8e113722096b77da7d68b26d28d1 06-May-2010 Douglas Gregor <dgregor@apple.com> Fixed DISABLE_SMART_POINTERS breakage

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
dfe1a118ad79275e18f385f45d2860a93f122c41 06-May-2010 Rafael Espindola <rafael.espindola@gmail.com> Handle -ffunction-sections and -fdata-sections in the driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
9cf933a67e54bea5475c5027fee2c1cf7365ee05 06-May-2010 Rafael Espindola <rafael.espindola@gmail.com> Handle -ffunction-sections and -fdata-sections in the driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
04561e7b100727086be536206e1e411ae57f5e44 06-May-2010 Douglas Gregor <doug.gregor@gmail.com> Try to work around a Visual C++ bug with copy-assignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
64219a2aee02e98a978dbd60d863f488c3369880 06-May-2010 Douglas Gregor <dgregor@apple.com> Try to work around a Visual C++ bug with copy-assignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ceb8f0bff12c7c148c9e64c7d133d5ac0f01c653 06-May-2010 Douglas Gregor <doug.gregor@gmail.com> Rework our handling of temporary objects within the conditions of
if/switch/while/do/for statements. Previously, we would end up either:

(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).

We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.

Fixes PR7067.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
586596fd7f7a336a2847b300c80614dcf39ab6d5 06-May-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of temporary objects within the conditions of
if/switch/while/do/for statements. Previously, we would end up either:

(1) Forgetting to destroy temporaries created in the condition (!),
(2) Destroying the temporaries created in the condition *before*
converting the condition to a boolean value (or, in the case of a
switch statement, to an integral or enumeral value), or
(3) In a for statement, destroying the condition's temporaries at
the end of the increment expression (!).

We now destroy temporaries in conditions at the right times. This
required some tweaking of the Parse/Sema interaction, since the parser
was building full expressions too early in many places.

Fixes PR7067.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
dd757aeb8cc31d73e3c83044e438d429d0506945 06-May-2010 John McCall <rjmccall@apple.com> Push TypeSourceInfo::getTypeLoc() into a header file so that it's
inlineable. That header file has to be TypeLoc.h, which means that
TypeLoc.h needs to depend on Decl.h because TypeSourceInfo doesn't
have its own header. That could be remedied, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/TypeLoc.h
3c385c28cf1f27b193a620d2e51f814873362ceb 06-May-2010 John McCall <rjmccall@apple.com> Push TypeSourceInfo::getTypeLoc() into a header file so that it's
inlineable. That header file has to be TypeLoc.h, which means that
TypeLoc.h needs to depend on Decl.h because TypeSourceInfo doesn't
have its own header. That could be remedied, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/TypeLoc.h
d32e9f2752bcd182a1c3ced3039139a5b0dcee18 06-May-2010 John McCall <rjmccall@apple.com> Kill a never-defined, never-used member function. Thanks, Enea.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
04a025e9980a5d9ce4bebbeff53e76ffb8377fe0 06-May-2010 John McCall <rjmccall@apple.com> Kill a never-defined, never-used member function. Thanks, Enea.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
1060a03c4a8637ff3b7da7ad4c688201068cd4ac 06-May-2010 John McCall <rjmccall@apple.com> Rearchitect -Wconversion and -Wsign-compare. Instead of computing them
"bottom-up" when implicit casts and comparisons are inserted, compute them
"top-down" when the full expression is finished. Makes it easier to
coordinate warnings and thus implement -Wconversion for signedness
conversions without double-warning with -Wsign-compare. Also makes it possible
to realize that a signedness conversion is okay because the context is
performing the inverse conversion. Also simplifies some logic that was
trying to calculate the ultimate comparison/result type and getting it wrong.
Also fixes a problem with the C++ explicit casts which are often "implemented"
in the AST with a series of implicit cast expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
323ed74658bc8375278eabf074b4777458376540 06-May-2010 John McCall <rjmccall@apple.com> Rearchitect -Wconversion and -Wsign-compare. Instead of computing them
"bottom-up" when implicit casts and comparisons are inserted, compute them
"top-down" when the full expression is finished. Makes it easier to
coordinate warnings and thus implement -Wconversion for signedness
conversions without double-warning with -Wsign-compare. Also makes it possible
to realize that a signedness conversion is okay because the context is
performing the inverse conversion. Also simplifies some logic that was
trying to calculate the ultimate comparison/result type and getting it wrong.
Also fixes a problem with the C++ explicit casts which are often "implemented"
in the AST with a series of implicit cast expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e2ba5f6ed00499333dc72435d27c59a500d0f6ec 06-May-2010 John McCall <rjmccall@apple.com> Remember the number of positive and negative bits used by the enumerators of
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1b5a618c59025898806160ed5e7f0ff5bb79e482 06-May-2010 John McCall <rjmccall@apple.com> Remember the number of positive and negative bits used by the enumerators of
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5ed9818c4f1e9efae459a35b7d237616ceb52ce0 06-May-2010 Chandler Carruth <chandlerc@gmail.com> Remove a dependency on Frontend headers in the Driver library. Also saves
building and passing arguments to cc1 layer when setting values to their
defaults.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
c40f73c6e715044d327409564bf3656254101d46 06-May-2010 Chandler Carruth <chandlerc@gmail.com> Remove a dependency on Frontend headers in the Driver library. Also saves
building and passing arguments to cc1 layer when setting values to their
defaults.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
b27ccd3543e83a46978f71f20809cd2c79788ed1 06-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Turn -analyzer-inline-call on for C functions. This also fixed a bug that
after inlining post-call checking shouldn't be done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
1c625f25055331bf76ab5479a8060d2b0f61e8b8 06-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Turn -analyzer-inline-call on for C functions. This also fixed a bug that
after inlining post-call checking shouldn't be done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
73361dc73a0970d16bce096df7f15c202e416f74 06-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Make -analyzer-inline-call not a separate analysis. Instead it's a boolean
flag now, and can be used with other analyses. Only turned it on for C++
methods for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
7b99d12b4ca67fccdf5090761ba257732e954e75 06-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> Make -analyzer-inline-call not a separate analysis. Instead it's a boolean
flag now, and can be used with other analyses. Only turned it on for C++
methods for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
84e55065156b3e56d6997b97daf748c99953e9c4 06-May-2010 Douglas Gregor <doug.gregor@gmail.com> Partial and full specializations of a class template may have a
different tag kind ("struct" vs. "class") than the primary template,
which has an affect on access control.

Should fix the last remaining Boost.Accumulors failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
13c8577201e4fc0ddac5f09d05fd1778832137d1 06-May-2010 Douglas Gregor <dgregor@apple.com> Partial and full specializations of a class template may have a
different tag kind ("struct" vs. "class") than the primary template,
which has an affect on access control.

Should fix the last remaining Boost.Accumulors failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
20e7979ca05e7f33ed9b9ef1f071c392650f481f 06-May-2010 John McCall <rjmccall@apple.com> Add IgnoreParenImpCasts() to Expr, which is basically like IgnoreParenCasts
except it only skips implicit casts.

Also fix ObjCImplicitGetterSetterRefExpr's child_begin to skip the base expression
if it's actually a type reference (which you get with static property references).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2fc46bf1a9bc31d50f82de37c70ea257d3cded27 06-May-2010 John McCall <rjmccall@apple.com> Add IgnoreParenImpCasts() to Expr, which is basically like IgnoreParenCasts
except it only skips implicit casts.

Also fix ObjCImplicitGetterSetterRefExpr's child_begin to skip the base expression
if it's actually a type reference (which you get with static property references).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
10250b5323c9c3d19a405b6ff110092038e9a6f6 05-May-2010 Fariborz Jahanian <fjahanian@apple.com> This patch deals with Sema Part of Setter/Getter synthesis
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
17cb326cb62a59f53d92236394af40eaae4eddbd 05-May-2010 Fariborz Jahanian <fjahanian@apple.com> This patch deals with Sema Part of Setter/Getter synthesis
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
ef2008e92d1b320db947c63bc9e795d2ae39e2a2 05-May-2010 Sean Hunt <rideau3@gmail.com> Reapplying patch to change StmtNodes.def to StmtNodes.td, this time
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Makefile
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtNodes.td
lang/AST/StmtVisitor.h
lang/CMakeLists.txt
lang/Makefile
4bfe1968410ea8ffe3b4f629addd7c4bcf484765 05-May-2010 Sean Hunt <rideau3@gmail.com> Reapplying patch to change StmtNodes.def to StmtNodes.td, this time
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Makefile
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtNodes.td
lang/AST/StmtVisitor.h
lang/CMakeLists.txt
lang/Makefile
fa2ce27369f457c7a0c5ae5f682a793316cc587d 05-May-2010 Sean Hunt <rideau3@gmail.com> Revert r103072; I accidentally ended up deleting a bunch of trailing
whitespace which makes this patch unreadable. Will recommit without the
whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Makefile
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtNodes.td
lang/AST/StmtVisitor.h
lang/CMakeLists.txt
lang/Makefile
c302113179a1c2b1254224ea9b6f5316ceeb375c 05-May-2010 Sean Hunt <rideau3@gmail.com> Revert r103072; I accidentally ended up deleting a bunch of trailing
whitespace which makes this patch unreadable. Will recommit without the
whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Makefile
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtNodes.td
lang/AST/StmtVisitor.h
lang/CMakeLists.txt
lang/Makefile
420114dbe1c13c99e6246675e10ee916ad4d1cca 05-May-2010 Douglas Gregor <doug.gregor@gmail.com> Support for 'template' as a disambiguator (PR7030)

ParseOptionalCXXScopeSpecifier() only annotates the subset of
template-ids which are not subject to lexical ambiguity. Add support
for the more general case in ParseUnqualifiedId() to handle cases
such as A::template B().

Also improve some diagnostic locations.

Fixes PR7030, from Alp Toker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0278e123b4606ea15dbfa717e9c5a76a5ef2bc7d 05-May-2010 Douglas Gregor <dgregor@apple.com> Support for 'template' as a disambiguator (PR7030)

ParseOptionalCXXScopeSpecifier() only annotates the subset of
template-ids which are not subject to lexical ambiguity. Add support
for the more general case in ParseUnqualifiedId() to handle cases
such as A::template B().

Also improve some diagnostic locations.

Fixes PR7030, from Alp Toker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
654b71fa852b0cc963dc2748142fda6eb3991346 05-May-2010 Chris Lattner <sabre@nondot.org> add a new --print-diagnostic-categories option, which causes the driver to
print out all of the category numbers with their description. This is useful
for clients that want to map the numbers produced by
--fdiagnostics-show-category=id to their human readable string form. The
output is simple but utilitarian:

$ clang --print-diagnostic-categories
1,Format String
2,Something Else

This implements rdar://7928193


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
c3d26cc4eea5187ce13ed180b479ff8ef41015a7 05-May-2010 Chris Lattner <sabre@nondot.org> add a new --print-diagnostic-categories option, which causes the driver to
print out all of the category numbers with their description. This is useful
for clients that want to map the numbers produced by
--fdiagnostics-show-category=id to their human readable string form. The
output is simple but utilitarian:

$ clang --print-diagnostic-categories
1,Format String
2,Something Else

This implements rdar://7928193


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
d131290ee2068b996311073e68d5aba798632cb7 05-May-2010 Douglas Gregor <doug.gregor@gmail.com> Reimplement code generation for copying fields in the
implicitly-generated copy constructor. Previously, Sema would perform
some checking and instantiation to determine which copy constructors,
etc., would be called, then CodeGen would attempt to figure out which
copy constructor to call... but would get it wrong, or poke at an
uninstantiated default argument, or fail in other ways.

The new scheme is similar to what we now do for the implicit
copy-assignment operator, where Sema performs all of the semantic
analysis and builds specific ASTs that look similar to the ASTs we'd
get from explicitly writing the copy constructor, so that CodeGen need
only do a direct translation.

However, it's not quite that simple because one cannot explicit write
elementwise copy-construction of an array. So, I've extended
CXXBaseOrMemberInitializer to contain a list of indexing variables
used to copy-construct the elements. For example, if we have:

struct A { A(const A&); };

struct B {
A array[2][3];
};

then we generate an implicit copy assignment operator for B that looks
something like this:

B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }

CodeGen will loop over the invented variables i0 and i1 to visit all
elements in the array, so that each element in the destination array
will be copy-constructed from the corresponding element in the source
array. Of course, if we're dealing with arrays of scalars or class
types with trivial copy-assignment operators, we just generate a
memcpy rather than a loop.

Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
all of its regression tests.

Conspicuously missing from this patch is handling for the exceptional
case, where we need to destruct those objects that we have
constructed. I'll address that case separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
fb8cc253420e93cee33d29df5a2bdae6aaf16e39 05-May-2010 Douglas Gregor <dgregor@apple.com> Reimplement code generation for copying fields in the
implicitly-generated copy constructor. Previously, Sema would perform
some checking and instantiation to determine which copy constructors,
etc., would be called, then CodeGen would attempt to figure out which
copy constructor to call... but would get it wrong, or poke at an
uninstantiated default argument, or fail in other ways.

The new scheme is similar to what we now do for the implicit
copy-assignment operator, where Sema performs all of the semantic
analysis and builds specific ASTs that look similar to the ASTs we'd
get from explicitly writing the copy constructor, so that CodeGen need
only do a direct translation.

However, it's not quite that simple because one cannot explicit write
elementwise copy-construction of an array. So, I've extended
CXXBaseOrMemberInitializer to contain a list of indexing variables
used to copy-construct the elements. For example, if we have:

struct A { A(const A&); };

struct B {
A array[2][3];
};

then we generate an implicit copy assignment operator for B that looks
something like this:

B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }

CodeGen will loop over the invented variables i0 and i1 to visit all
elements in the array, so that each element in the destination array
will be copy-constructed from the corresponding element in the source
array. Of course, if we're dealing with arrays of scalars or class
types with trivial copy-assignment operators, we just generate a
memcpy rather than a loop.

Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
all of its regression tests.

Conspicuously missing from this patch is handling for the exceptional
case, where we need to destruct those objects that we have
constructed. I'll address that case separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
94e4b0ce66c64b61aa1a11a686f32e383c166219 05-May-2010 Sean Hunt <rideau3@gmail.com> Add forgotten CMakeFiles.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
391c40cdfbffa85f2404ba96b5faffdd9c9de3f2 05-May-2010 Sean Hunt <rideau3@gmail.com> Add forgotten CMakeFiles.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CMakeLists.txt
c418cd479d17c9f5ded9cb0f54b07d6bfe12ac73 05-May-2010 Sean Hunt <rideau3@gmail.com> Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Makefile
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtNodes.td
lang/AST/StmtVisitor.h
lang/CMakeLists.txt
lang/Makefile
9d90d62e1661720d9cf533290b4227c4fde780a4 05-May-2010 Sean Hunt <rideau3@gmail.com> Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Makefile
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtNodes.td
lang/AST/StmtVisitor.h
lang/CMakeLists.txt
lang/Makefile
d7b1b0252ec628aaa782bf0f9dc041f10b1a449b 04-May-2010 Chris Lattner <sabre@nondot.org> add a new -fdiagnostics-show-category=none/id/name option, giving control
over choice of:

t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,Format String]

dox to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
6fbe8398ba1680ffc5daa7395850ff8765b7905b 04-May-2010 Chris Lattner <sabre@nondot.org> add a new -fdiagnostics-show-category=none/id/name option, giving control
over choice of:

t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1]
t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,Format String]

dox to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
ff1c25eea3870b8220aa484b3b51e348c90d2566 04-May-2010 Chris Lattner <sabre@nondot.org> When -fdiagnostics-print-source-range-info is specified,
print the diagnostic category number in the [] at the end
of the line. For example:

$ cat t.c
#include <stdio.h>
void foo() {
printf("%s", 4);
}
$ clang t.c -fsyntax-only -fdiagnostics-print-source-range-info
t.c:3:11:{3:10-3:12}{3:15-3:16}: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1]
printf("%s", 4);
~^ ~
1 warning generated.

Clients that want category information can now pick the number
out of the output, rdar://7928231.

More coming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
c9b889044c8e1e2d6ab194e34e8b74f6998094fa 04-May-2010 Chris Lattner <sabre@nondot.org> When -fdiagnostics-print-source-range-info is specified,
print the diagnostic category number in the [] at the end
of the line. For example:

$ cat t.c
#include <stdio.h>
void foo() {
printf("%s", 4);
}
$ clang t.c -fsyntax-only -fdiagnostics-print-source-range-info
t.c:3:11:{3:10-3:12}{3:15-3:16}: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1]
printf("%s", 4);
~^ ~
1 warning generated.

Clients that want category information can now pick the number
out of the output, rdar://7928231.

More coming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
38d0f2ffd306c187fd862aabb22e01311b78468d 04-May-2010 Chris Lattner <sabre@nondot.org> add the ability to associate 'category' names with diagnostics
and diagnostic groups. This allows the compiler to group
diagnostics together (e.g. "Logic Warning",
"Format String Warning", etc) like the static analyzer does.
This is not exposed through anything in the compiler yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticGroups.td
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
27b0f510d1d4f9ed5668eec1195f04b4a74a4426 04-May-2010 Chris Lattner <sabre@nondot.org> add the ability to associate 'category' names with diagnostics
and diagnostic groups. This allows the compiler to group
diagnostics together (e.g. "Logic Warning",
"Format String Warning", etc) like the static analyzer does.
This is not exposed through anything in the compiler yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticGroups.td
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
9690fb779e330e800ecbe4af654426df396fb59a 04-May-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a limit on the depth of the macro instantiation backtrace
printed in a diagnostic, similar to the limit we already have on the
depth of the template instantiation backtrace. The macro instantiation
backtrace is limited to 10 "instantiated from:" diagnostics; when it's
longer than that, we'll show the first half, then say how many were
suppressed, then show the second half. The limit can be changed with
-fmacro-instantiation-limit=N, and turned off with N=0.

This eliminates a lot of note spew with libraries making use of the
Boost.Preprocess library.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
lang/Frontend/TextDiagnosticPrinter.h
6c1cb9916e9988dcdd65b9266dbe24afd173427a 04-May-2010 Douglas Gregor <dgregor@apple.com> Introduce a limit on the depth of the macro instantiation backtrace
printed in a diagnostic, similar to the limit we already have on the
depth of the template instantiation backtrace. The macro instantiation
backtrace is limited to 10 "instantiated from:" diagnostics; when it's
longer than that, we'll show the first half, then say how many were
suppressed, then show the second half. The limit can be changed with
-fmacro-instantiation-limit=N, and turned off with N=0.

This eliminates a lot of note spew with libraries making use of the
Boost.Preprocess library.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
lang/Frontend/TextDiagnosticPrinter.h
34381083e2621df53741e829d718f898cebb9fed 04-May-2010 Douglas Gregor <doug.gregor@gmail.com> When creating a call to a base subobject's operator= in an
implicitly-defined copy assignment operator, suppress the protected
access check. This eliminates the remaining failure in the
Boost.SmartPtr library (that was a product of the copy-assignment
generation rewrite) and, presumably, the Boost.TR1 library as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
6cdc161527a513f28dfc6f6ec27eb287f8268024 04-May-2010 Douglas Gregor <dgregor@apple.com> When creating a call to a base subobject's operator= in an
implicitly-defined copy assignment operator, suppress the protected
access check. This eliminates the remaining failure in the
Boost.SmartPtr library (that was a product of the copy-assignment
generation rewrite) and, presumably, the Boost.TR1 library as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
736558e2d2981e16f7d75a1000cf52d76090ed91 03-May-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose unused exception parameters under a different warning group
(-Wunused-exception-parameter) than normal variables, since it's more
common to name and then ignore an exception parameter. This warning is
neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
324b54d3f60d92a82815512119791ce1c285b63e 03-May-2010 Douglas Gregor <dgregor@apple.com> Diagnose unused exception parameters under a different warning group
(-Wunused-exception-parameter) than normal variables, since it's more
common to name and then ignore an exception parameter. This warning is
neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
3226ea3e3a18b9c7e1914d127ff554c70cf3347c 03-May-2010 Douglas Gregor <doug.gregor@gmail.com> Complain when we try to initialize an object of Objective-C class type
(which is ill-formed) with an initializer list. Also, change the
fallback from an assertion to a generic error message, which is far
friendlier. Fixes <rdar://problem/7730948>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4d9e7388ccdfdab97f92caac5db9b87a530742f4 03-May-2010 Douglas Gregor <dgregor@apple.com> Complain when we try to initialize an object of Objective-C class type
(which is ill-formed) with an initializer list. Also, change the
fallback from an assertion to a generic error message, which is far
friendlier. Fixes <rdar://problem/7730948>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9908c93616ef57e9278b825c735fdd4a3a86cba1 03-May-2010 Anders Carlsson <andersca@mac.com> The array form of 'new' can never have initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
48c950137e4318abb1080f438208fda8c14ca8b9 03-May-2010 Anders Carlsson <andersca@mac.com> The array form of 'new' can never have initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
128fc95d96572a0f2282acaab4dd77a74052ce17 03-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Replace a char*/size pair with stringref.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d56638180014e60538cd666cd11fde6d4698e051 03-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Replace a char*/size pair with stringref.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ae6d8b1e1d16d096c4cd5866f23606b47a8466b6 03-May-2010 Anders Carlsson <andersca@mac.com> Change CXXConstructExpr::Create to take a ConstructionKind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
fcaeef2ae00ec643eb024e0aca2c98701cf5627c 03-May-2010 Anders Carlsson <andersca@mac.com> Change CXXConstructExpr::Create to take a ConstructionKind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f7b163b082977c92c96e8c584fd50b4c4054e2d6 03-May-2010 Anders Carlsson <andersca@mac.com> Pass the construction kind down to EmitCXXConstructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
24eb78e38aba55c507bc3c05c37035a9ab2defa7 03-May-2010 Anders Carlsson <andersca@mac.com> Pass the construction kind down to EmitCXXConstructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f6920f6e926e81aa5e5815d011e8b85e3d252b89 03-May-2010 Anders Carlsson <andersca@mac.com> Add an enum to CXXConstructExpr so we can determine if the construction expression constructs a non-virtual or virtual base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
72e96fd181b19b8d01144a685cda6e955584c7ea 03-May-2010 Anders Carlsson <andersca@mac.com> Add an enum to CXXConstructExpr so we can determine if the construction expression constructs a non-virtual or virtual base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
82ffffd44d4de0ccb064b855cbcbe7916a693393 01-May-2010 Douglas Gregor <doug.gregor@gmail.com> Complete reimplementation of the synthesis for implicitly-defined copy
assignment operators.

Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.

This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:

- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.

This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.

Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
06a9f3680d22529a2fcf20c52d71cf221d99d910 01-May-2010 Douglas Gregor <dgregor@apple.com> Complete reimplementation of the synthesis for implicitly-defined copy
assignment operators.

Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.

This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:

- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.

This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.

Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b25932702102e3b4659dccf5ecca468d70b00876 01-May-2010 Douglas Gregor <doug.gregor@gmail.com> Bump default template instantiation depth to 1024, as required by C++0x

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
e2e69ef80ac09a489d00ce104e2e87867dc3dd26 01-May-2010 Douglas Gregor <dgregor@apple.com> Bump default template instantiation depth to 1024, as required by C++0x

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
42660bea99e13a24ad7ff4a34195c2c0d0d67a21 30-Apr-2010 Daniel Dunbar <daniel@zuster.org> Move include installation steps to better location, inside each include dir instead of at the top-level.

Also, don't set NO_INSTALL=1 for c-index-test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102724 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
lang-c/Makefile
lang/Makefile
25cf7b4e9198026c8872203874d04b36831af969 30-Apr-2010 Daniel Dunbar <daniel@zuster.org> Move include installation steps to better location, inside each include dir instead of at the top-level.

Also, don't set NO_INSTALL=1 for c-index-test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102724 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
lang-c/Makefile
lang/Makefile
36f4117b6022697e305ecfda8ddfe135e982274c 30-Apr-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Add calling convention related attributes to related declaration. Mark attributes invalid on type related checking so to add them to declarations only when everything is ok.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
e215f7232dd4aa65ebf2a1ecd07cd95fe1ce3481 30-Apr-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Add calling convention related attributes to related declaration. Mark attributes invalid on type related checking so to add them to declarations only when everything is ok.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
8375c580a7e7511e13d2ffdacfc9da7e2dd48af1 30-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a sequence number into class template partial
specializations, which keeps track of the order in which they were
originally declared. We use this number so that we can always walk the
list of partial specializations in a predictable order during matching
or template instantiation. This also fixes a failure in Boost.Proto,
where SourceManager::isBeforeInTranslationUnit was behaving
poorly in inconsistent ways.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
dc60c1eb4acbde6edcec9760de92f9098593d915 30-Apr-2010 Douglas Gregor <dgregor@apple.com> Introduce a sequence number into class template partial
specializations, which keeps track of the order in which they were
originally declared. We use this number so that we can always walk the
list of partial specializations in a predictable order during matching
or template instantiation. This also fixes a failure in Boost.Proto,
where SourceManager::isBeforeInTranslationUnit was behaving
poorly in inconsistent ways.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
a8d7ca6e37fb2aba356c16ca9c31cafa7ae68584 30-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> When we start the definition of a class template, set the
InjectedClassNameType's Decl to point at the definition. It's a little
messy, but we do the same thing with classes and their record types,
since much of Clang expects that the TagDecl* one gets out of a type
is the definition. Fixes several Boost.Proto failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9ffce2182e4fe72052d620698d272207f494b1cf 30-Apr-2010 Douglas Gregor <dgregor@apple.com> When we start the definition of a class template, set the
InjectedClassNameType's Decl to point at the definition. It's a little
messy, but we do the same thing with classes and their record types,
since much of Clang expects that the TagDecl* one gets out of a type
is the definition. Fixes several Boost.Proto failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0735908236b79ce2d8b4aebac3acda52a8449d68 30-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Refactor the AnalysisConsumer to analyze functions after the whole
translation unit is parsed. This enables us to inline some calls when still
analyzing one function at a time.

Actions are classified into Function, CXXMethod, ObjCMethod,
ObjCImplementation.

This does not hurt performance much. The analysis time for sqlite3.c:

before:
real 17m52.440s
user 17m49.460s
sys 0m2.010s

after:
real 18m0.500s
user 17m56.900s
sys 0m2.330s

DisplayProgress option is broken now. -inine-call action is removed. It
will be reenabled in another form, perhaps as an indenpendant option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
ed8afacb8118b71bcfa8017059e51da325e7691b 30-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Refactor the AnalysisConsumer to analyze functions after the whole
translation unit is parsed. This enables us to inline some calls when still
analyzing one function at a time.

Actions are classified into Function, CXXMethod, ObjCMethod,
ObjCImplementation.

This does not hurt performance much. The analysis time for sqlite3.c:

before:
real 17m52.440s
user 17m49.460s
sys 0m2.010s

after:
real 18m0.500s
user 17m56.900s
sys 0m2.330s

DisplayProgress option is broken now. -inine-call action is removed. It
will be reenabled in another form, perhaps as an indenpendant option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
584dfa221f1428b2164e375c4137339e3ab7d6d7 29-Apr-2010 Ted Kremenek <kremenek@apple.com> Add FunctionDecl::isVariadic() to match BlockDecl::isVariadic() and ObjCMethodDecl::isVariadic().
Do some minor refactoring along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9498d388810d284d3970aef0d69fa4d069fd6caf 29-Apr-2010 Ted Kremenek <kremenek@apple.com> Add FunctionDecl::isVariadic() to match BlockDecl::isVariadic() and ObjCMethodDecl::isVariadic().
Do some minor refactoring along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f9898e8c59239c9737a57c6b1a3d1a007347d2fa 29-Apr-2010 Ted Kremenek <kremenek@apple.com> Rename BlockDecl::IsVariadic() to BlockDecl::isVariadic() to match the casing
for similar methods. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
db9a0aec04cfd95830d3745b17b0bab5b87b16d1 29-Apr-2010 Ted Kremenek <kremenek@apple.com> Rename BlockDecl::IsVariadic() to BlockDecl::isVariadic() to match the casing
for similar methods. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
829e5c4ef0b3a181f7d5103fe2774e9860e97a86 29-Apr-2010 Ted Kremenek <kremenek@apple.com> Bump Clang version number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
5ac28332220692f7b0095a7fd0de2c230ea6cd82 29-Apr-2010 Ted Kremenek <kremenek@apple.com> Bump Clang version number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
089b1bece1d6f9ecb72db87e0e01965be9a91742 29-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Teach __builtin_offsetof to compute the offsets of members of base
classes, since we only warn (not error) on offsetof() for non-POD
types. We store the base path within the OffsetOfExpr itself, then
evaluate the offsets within the constant evaluator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cc8a5d5f90bbbbcb46f342117b851b7e07ec34f1 29-Apr-2010 Douglas Gregor <dgregor@apple.com> Teach __builtin_offsetof to compute the offsets of members of base
classes, since we only warn (not error) on offsetof() for non-POD
types. We store the base path within the OffsetOfExpr itself, then
evaluate the offsets within the constant evaluator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f2800bc5c579b96a51407623453f84a2459e75f1 29-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -fobjc-abi-version=.
- <rdar://problem/7919678>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
5e2a8ac6599f0c68b14afb2f328ac98b264f770a 29-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -fobjc-abi-version=.
- <rdar://problem/7919678>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
39cbe124df5cfa1223669ff61f49f6d02edc8995 29-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose __builtin_offsetof expressions that refer to bit-fields

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9d5d60ff8d7991234abcc6a9fe9903db930be0a1 29-Apr-2010 Douglas Gregor <dgregor@apple.com> Diagnose __builtin_offsetof expressions that refer to bit-fields

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ce6b353d4b551b98c4282486fd13ef3b3bcf6e31 29-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Completely reimplement __builtin_offsetof, based on a patch by Roberto
Amadini.

This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.

OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.

There are two major caveats to this patch:

1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.

2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.

Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Checker/PathSensitive/GRExprEngine.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/StmtXML.def
8ecdb65716cd7914ffb2eeee993fa9039fcd31e8 29-Apr-2010 Douglas Gregor <dgregor@apple.com> Completely reimplement __builtin_offsetof, based on a patch by Roberto
Amadini.

This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.

OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.

There are two major caveats to this patch:

1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.

2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.

Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Checker/PathSensitive/GRExprEngine.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/StmtXML.def
5ec92586b706c909381ae0b72d9c5d1f7b51f726 28-Apr-2010 Chris Lattner <sabre@nondot.org> add regex support for -verify mode. You can now do things like
expected-error-re {{someregex}}

Patch by mike-m!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/VerifyDiagnosticsClient.h
60909e1242f19aa8b1b87110aaa8e394f329ae96 28-Apr-2010 Chris Lattner <sabre@nondot.org> add regex support for -verify mode. You can now do things like
expected-error-re {{someregex}}

Patch by mike-m!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/VerifyDiagnosticsClient.h
b539d102e1ea422fd034283578a5bbae9aaccfaa 28-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More of Sema to implement initialization of
ivar of c++ object types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e4498c6d66a8f472cba29b6158a2e86dfc60d0ef 28-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More of Sema to implement initialization of
ivar of c++ object types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
de27f52df1dad2ac0d7ff06f5c6642715df76e2c 27-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> When explicitly building a temporary object (CXXTemporaryObjectExpr),
keep track of whether we need to zero-initialize storage prior to
calling its constructor. Previously, we were only tracking this when
implicitly constructing the object (a CXXConstructExpr).

Fixes Boost's value-initialization tests, which means that the
Boost.Config library now passes all of its tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
1c63b9c15d48cb8c833a4b2d6fd6c496c0766e88 27-Apr-2010 Douglas Gregor <dgregor@apple.com> When explicitly building a temporary object (CXXTemporaryObjectExpr),
keep track of whether we need to zero-initialize storage prior to
calling its constructor. Previously, we were only tracking this when
implicitly constructing the object (a CXXConstructExpr).

Fixes Boost's value-initialization tests, which means that the
Boost.Config library now passes all of its tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d7f5c204840d5f44ba1d1643258bd1a945b10fb1 27-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose the use of abstract types as array element types. Previously,
we were relying on checking for abstract class types when an array
type was actually used to declare a variable, parameter, etc. However,
we need to check when the construct the array for, e.g., SFINAE
purposes (see DR337). Fixes problems with Boost's is_abstract type
trait.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
138bb2366baa3856088bae94f36f2d96b2c995b9 27-Apr-2010 Douglas Gregor <dgregor@apple.com> Diagnose the use of abstract types as array element types. Previously,
we were relying on checking for abstract class types when an array
type was actually used to declare a variable, parameter, etc. However,
we need to check when the construct the array for, e.g., SFINAE
purposes (see DR337). Fixes problems with Boost's is_abstract type
trait.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
95c54dfa43c5159d2854910c21cc03374238e94e 27-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> During template instantiation, set the naming class of
UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the
naming class we computed when building the expression in the
template...

... which we didn't always do correctly. Teach
UnresolvedMemberExpr::getNamingClass() all about the new
representation of injected-class-names in templates, so that it can
return a naming class that is the current instantiation.

Also, when decomposing a template-id into its template name and its
arguments, be sure to set the naming class on the LookupResult
structure.

Fixes PR6947 the right way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c96be1ea33cdf63d07cec48d18fe8e3afea48f8d 27-Apr-2010 Douglas Gregor <dgregor@apple.com> During template instantiation, set the naming class of
UnresolvedLookupExpr and UnresolvedMemberExpr by substituting the
naming class we computed when building the expression in the
template...

... which we didn't always do correctly. Teach
UnresolvedMemberExpr::getNamingClass() all about the new
representation of injected-class-names in templates, so that it can
return a naming class that is the current instantiation.

Also, when decomposing a template-id into its template name and its
arguments, be sure to set the naming class on the LookupResult
structure.

Fixes PR6947 the right way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
67ce775bb0d6b2d8cd67f5d9c91218808d00b736 27-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Move CollectIvarsToConstructOrDestruct to Sema
from AST, consider ivar array of objects
(per Doug's comment).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
786cd154f2a48d2b464679d33fcd5df0cd794c06 27-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Move CollectIvarsToConstructOrDestruct to Sema
from AST, consider ivar array of objects
(per Doug's comment).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a99c63e4b17bc28e8011b8a23409b2de99284920 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add Driver support for -fno-constant-cfstrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f35f14d474632142280ec1526d16e87706ce6625 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add Driver support for -fno-constant-cfstrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
cb9f7afc761b3b704f274204b6009b69146fc4dd 27-Apr-2010 John McCall <rjmccall@apple.com> Improve the diagnostic you get when making a qualified member access
with a qualifier referencing a different type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
110acc1ae8d978f9b423394eaf0cace61b1339f0 27-Apr-2010 John McCall <rjmccall@apple.com> Improve the diagnostic you get when making a qualified member access
with a qualifier referencing a different type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4578a3a1441eb22b68d909fa35d82e6ee7204e38 27-Apr-2010 John McCall <rjmccall@apple.com> Make the InjectedClassNameType the canonical type of the current instantiation
of a class template or class template partial specialization. That is to
say, in
template <class T> class A { ... };
or
template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context. This allows us to track the
current instantiation appropriately even inside AST routines. It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/AST/TypeNodes.def
31f17ecbef57b5679c017c375db330546b7b5145 27-Apr-2010 John McCall <rjmccall@apple.com> Make the InjectedClassNameType the canonical type of the current instantiation
of a class template or class template partial specialization. That is to
say, in
template <class T> class A { ... };
or
template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context. This allows us to track the
current instantiation appropriately even inside AST routines. It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/AST/TypeNodes.def
1271d6f682ac66067db6d3ca309a8d3707891ebf 27-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> New method to construct/destruct ivars that have non-trivial default
constructors or destructors, not used yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
184d7900e0202ac468710b731e42075129bb6000 27-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> New method to construct/destruct ivars that have non-trivial default
constructors or destructors, not used yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f5b3dfc64b7c705cfb60f73767d0f7efc49f20be 27-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve source-location information in a C++ typeid (type) expression
by using TypeSourceInfo, cleaning up the representation
somewhat. Teach getTypeOperand() to strip references and
cv-qualifiers, providing the semantic view of the type without
requiring any extra storage (the unmodified type remains within the
TypeSourceInfo). This fixes a bug found by Boost's call_traits test.

Finally, clean up semantic analysis, by splitting the ActOnCXXTypeid
routine into ActOnCXXTypeId (the parser action) and two BuildCXXTypeId
functions, which perform the semantic analysis for typeid(type) and
typeid(expression), respectively. We now perform less work at template
instantiation time (we don't look for std::type_info again) and can
give better diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
57fdc8a4382164955c7b30d09f4ce46fc7e67659 27-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information in a C++ typeid (type) expression
by using TypeSourceInfo, cleaning up the representation
somewhat. Teach getTypeOperand() to strip references and
cv-qualifiers, providing the semantic view of the type without
requiring any extra storage (the unmodified type remains within the
TypeSourceInfo). This fixes a bug found by Boost's call_traits test.

Finally, clean up semantic analysis, by splitting the ActOnCXXTypeid
routine into ActOnCXXTypeId (the parser action) and two BuildCXXTypeId
functions, which perform the semantic analysis for typeid(type) and
typeid(expression), respectively. We now perform less work at template
instantiation time (we don't look for std::type_info again) and can
give better diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
0a68cb3e09c5aaf560f40bfd794a811a3a46e3d2 27-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose declaration of reference typed ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0b7bc8e937735e2b3608c049752c4aa48a283d2a 27-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose declaration of reference typed ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9f0a704bc0ef0855b053ad9f12c2db5ac9cd579b 26-Apr-2010 Chris Lattner <sabre@nondot.org> wordsmith an objc warning, rdar://7900756


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bc0b915148688033e37e9175ddf7629333e45d43 26-Apr-2010 Chris Lattner <sabre@nondot.org> wordsmith an objc warning, rdar://7900756


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6cb535784c071d1a662aeac8e548e8757dd1a969 26-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce Type::isStructureOrClassType(), which does the obvious
thing. Audit all uses of Type::isStructure(), changing those calls to
isStructureOrClassType() as needed (which is alsmost
everywhere). Fixes the remaining failure in Boost.Utility/Swap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
fb87b89fc9eb103e19fb8e4b925c23f0bd091b99 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Introduce Type::isStructureOrClassType(), which does the obvious
thing. Audit all uses of Type::isStructure(), changing those calls to
isStructureOrClassType() as needed (which is alsmost
everywhere). Fixes the remaining failure in Boost.Utility/Swap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
6dfe98fad7326c5c22bb83f6135c37eda3aa24f9 26-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for implicit property references in
Objective-C++. This is the last bit of (non-blocks-related) template
instantiation logic for Objective-C++. Yay!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
9cbfdd212ee0167f2487363d6fac7faaf7c65b64 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for implicit property references in
Objective-C++. This is the last bit of (non-blocks-related) template
instantiation logic for Objective-C++. Yay!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
4a1d3d039af0d74537ecb4ff8f55bb881319b2af 26-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for ObjCPropertyRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
e330354c6bfbb0d7856432fa9055d5236f1b2fa4 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for ObjCPropertyRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
0033ad86713a3f6024fbc2111fa3c207d2ce8373 26-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for value-dependent Objective-C ivar
references and isa expressions. Also, test template instantiation of
unresolved member references to Objective-C ivar references and isa
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
f9b9eab747e911ded499924b2616d8712d65efce 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for value-dependent Objective-C ivar
references and isa expressions. Also, test template instantiation of
unresolved member references to Objective-C ivar references and isa
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
8fcbd122a3363d801e4fb4a3cbd69afbc8f004f0 26-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Refactor Objective-C @catch parameter checking by detangling it from
function-parameter checking and splitting it into the normal
ActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch
parameter rather than the ill-fitting ParmVarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
160b5630aa781ac348303e1ae088d27016637778 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Refactor Objective-C @catch parameter checking by detangling it from
function-parameter checking and splitting it into the normal
ActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch
parameter rather than the ill-fitting ParmVarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
ff0b45f255aedeca5155e50ef2c603c26142f4fc 26-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Make the static type of the exception variable in an Objective-C
@catch a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtObjC.h
c00d8e18ad3d903acfeb5d05163ce90713066a3f 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Make the static type of the exception variable in an Objective-C
@catch a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtObjC.h
f1c7432582fab04c68d0c438e0468236f2c5b7b6 25-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve the diagnostic when we find something we did not expect in a
member expression (p-> or x.), by showing the type we looked into and
what we did actually find.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b0fd483ad64865cc0233981cfddc36a7c9795e5e 25-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve the diagnostic when we find something we did not expect in a
member expression (p-> or x.), by showing the type we looked into and
what we did actually find.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3e93ab1a7228f50b8051c167af25cafcffed2852 25-Apr-2010 Anders Carlsson <andersca@mac.com> Add an explicit UsuallyTinyPtrVector that takes a single element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UsuallyTinyPtrVector.h
8f2abbc791bad003f5d190e70b01d7eafa2a7be1 25-Apr-2010 Anders Carlsson <andersca@mac.com> Add an explicit UsuallyTinyPtrVector that takes a single element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UsuallyTinyPtrVector.h
701a98167bae2eacad9b04a829a52dc9f5140e8b 24-Apr-2010 Anders Carlsson <andersca@mac.com> Convert more call sites over to the new GetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fc89c31a329eb6b36c6dbd8b7cb945d1a831650e 24-Apr-2010 Anders Carlsson <andersca@mac.com> Convert more call sites over to the new GetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fa2d7b260177e9d7f9c4a7a900ab69690c520576 24-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> When we attempt to create a temporary object of class type, be sure
that the type we're copying is complete.

Boost.Regex now builds, although it's failing its regression tests
with our favorite "Sema doesn't consider destructor as used."
assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f86fcb341116e72c5497e6b57695f46eca5f29e9 24-Apr-2010 Douglas Gregor <dgregor@apple.com> When we attempt to create a temporary object of class type, be sure
that the type we're copying is complete.

Boost.Regex now builds, although it's failing its regression tests
with our favorite "Sema doesn't consider destructor as used."
assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
302137f2ccb3843246d7a3dbb0a045e61e7012db 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add base paths for CK_BaseToDerived and CK_BaseToDerivedMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f9d68e1dd015972318b2448f75115ff4fc3d5008 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add base paths for CK_BaseToDerived and CK_BaseToDerivedMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
edb8f575c58dd3d2b3624d64fc0d5d44f4aa11b8 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cee22421929c91b481f4d1bb85cd48c0f6b7510b 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add base paths to CK_UncheckedDerivedToBase and CK_DerivedToBaseMemberPointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b12093a3bb6fe8578e3f33318030a13da928de38 24-Apr-2010 Anders Carlsson <andersca@mac.com> Actually produce base paths for CastExprs of kind CK_DerivedToBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5cf86ba6b5a724bf91cb52feade1158f1fbeb605 24-Apr-2010 Anders Carlsson <andersca@mac.com> Actually produce base paths for CastExprs of kind CK_DerivedToBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a0494768db49126986e425913f6ad77f9e3dfdce 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add BasePath arguments to all cast expr constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
41b2dcd465f1e438502c420effc9d0c747f9db8f 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add BasePath arguments to all cast expr constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
b9421286fab2bf4dc529511a4cb675bc243c741f 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT: Clean up dispatch method policy selection.
- Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.

- Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.

- No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
f643b9b338b797a824447207d7eab5f1187f4f34 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT: Clean up dispatch method policy selection.
- Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.

- Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.

- No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
8bf515b1f6e8ecdcbd3ebcc99fe08ea22fc7fd95 24-Apr-2010 Anders Carlsson <andersca@mac.com> CastExpr should not hold a pointer to the base path. More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/UsuallyTinyPtrVector.h
f1b48b7014992155286d58bb1676f9f51031d18b 24-Apr-2010 Anders Carlsson <andersca@mac.com> CastExpr should not hold a pointer to the base path. More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/UsuallyTinyPtrVector.h
fdf43162f6fe27ae92d0e64bd70a59bba40db42d 24-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Be more careful around dependent nested-name-specifiers, complaining
when they are not complete (since we could not match them up to
anything) and ensuring that enum parsing can cope with dependent
elaborated-type-specifiers. Fixes PR6915 and PR6649.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
48c89f4aa708e28310cb0c94b2d9d044b0ab806c 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Be more careful around dependent nested-name-specifiers, complaining
when they are not complete (since we could not match them up to
anything) and ensuring that enum parsing can cope with dependent
elaborated-type-specifiers. Fixes PR6915 and PR6649.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e6867ce8ab3d1ec6c32be66fa145ff1682bd5526 24-Apr-2010 Anders Carlsson <andersca@mac.com> Rename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifierArray. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7ab9d574d27ecee1f130e5755aa403e5ab529b6b 24-Apr-2010 Anders Carlsson <andersca@mac.com> Rename InheritancePath to BasePath, rename CastExpr::CXXBaseVector to CXXBaseSpecifierArray. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1a7697cc5fa364c548f50fd8931d22e84cecc74d 24-Apr-2010 John McCall <rjmccall@apple.com> Recommit r102215, this time being more careful to only set the "principal
declaration" (i.e. the only which will actually be looked up) to have the
non-member-operator bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
76d326448d7e4c10b2896edc2ee855d1e68d1b88 24-Apr-2010 John McCall <rjmccall@apple.com> Recommit r102215, this time being more careful to only set the "principal
declaration" (i.e. the only which will actually be looked up) to have the
non-member-operator bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
fe52a675aa4ca1019099e1b0379ebe00e0f111dc 24-Apr-2010 Nick Lewycky <nicholas@mxc.ca> Teach clang -fixit to modify files in-place, or -fixit=suffix to create new
files with the additional suffix in the middle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
ba5f6eced29937e4e4851a2c0980744768413d66 24-Apr-2010 Nick Lewycky <nicholas@mxc.ca> Teach clang -fixit to modify files in-place, or -fixit=suffix to create new
files with the additional suffix in the middle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
6742ed0fae1d786bcc2e6c9b4cca19f35fd13bd6 24-Apr-2010 Devang Patel <dpatel@apple.com> Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f0bf4d554f2513cbb4bec952c81ced59279ad91e 24-Apr-2010 Devang Patel <dpatel@apple.com> Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
6e4785e419b650170441901e02795a841eddf59b 24-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> With -fno-constant-cfstrrings, class NSConstantString
must be there or it is error (Next runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8a4377697161c5087e27cc40d6e0682f0cd1fa20 24-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> With -fno-constant-cfstrrings, class NSConstantString
must be there or it is error (Next runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b8e5c14993759f1507e2713e25dd034a7751707d 24-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Rework Parser-Sema interface for Objective-C @catch exception object
arguments. Rather than having the parser call ActOnParamDeclarator
(which is a bit of a hack), call a new ActOnObjCExceptionDecl
action. We'll be moving more functionality into this handler to
perform earlier checking of @catch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
4e6c0d19b7c072758922cf80525a81aeefc6e64b 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework Parser-Sema interface for Objective-C @catch exception object
arguments. Rather than having the parser call ActOnParamDeclarator
(which is a bit of a hack), call a new ActOnObjCExceptionDecl
action. We'll be moving more functionality into this handler to
perform earlier checking of @catch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1a2c1a806b8322d095e20481a2815bc4275900aa 24-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve the AST representation of Objective-C @try/@catch/@finally
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtObjC.h
lang/Parse/Action.h
8f5e3dd32e443768d9dbbad7191e123e6733750c 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve the AST representation of Objective-C @try/@catch/@finally
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtObjC.h
lang/Parse/Action.h
d973415fc7134449ae45582c934adcda521f6968 24-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More -fno-constant-cfstrings API work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
ec951e0c2fc0db00c36bc60c900331dde32c1b43 24-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More -fno-constant-cfstrings API work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
301ea81936fb6061341b17d73c34d9fbd2fdb423 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add an InheritancePath parameter to the ImplicitCastExpr constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
88465d3e996e627bbaa11099b039ddab66d5af2c 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add an InheritancePath parameter to the ImplicitCastExpr constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e5b8fd3a48d3c993d29d3a262ff21a36b8a6521d 23-Apr-2010 John McCall <rjmccall@apple.com> Transition the last acceptable-result filter kind in LookupResult over to use
a simple IDNS mask by introducing a namespace for non-member operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f88b0d6c99e6473e78331271935986535dc4603c 23-Apr-2010 John McCall <rjmccall@apple.com> Transition the last acceptable-result filter kind in LookupResult over to use
a simple IDNS mask by introducing a namespace for non-member operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1a184adfc02d645b05d7509fc9052e50e8cb02c3 23-Apr-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Make Parser::ConsumeAndStoreUntil() more consistent with Parser::SkipUntil().

ConsumeAndStoreUntil would stop at tok::unknown when caching an inline method
definition while SkipUntil would go past it while parsing the method.

Fixes PR 6903.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
14b91628961ab50cc6e724bbcd408fdee100662d 23-Apr-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make Parser::ConsumeAndStoreUntil() more consistent with Parser::SkipUntil().

ConsumeAndStoreUntil would stop at tok::unknown when caching an inline method
definition while SkipUntil would go past it while parsing the method.

Fixes PR 6903.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
dc010fabb200bef288416ed2943b4a8fe87648fa 23-Apr-2010 Anders Carlsson <andersca@mac.com> Destroy the inheritance path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a3bddeda81ca784bed5501d79e1e7c53befaa91d 23-Apr-2010 Anders Carlsson <andersca@mac.com> Destroy the inheritance path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
650d862f7ddfc6215a15da62645cc5e47f93124f 23-Apr-2010 Anders Carlsson <andersca@mac.com> Add an inheritance path member variable to CastExpr. For now it's always null but for derived-to-base and base-to-derived cast expressions it will contain the full base path. This is needed to avoid ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
409c99edb8b623403fade6f3a9e9c86acda74455 23-Apr-2010 Anders Carlsson <andersca@mac.com> Add an inheritance path member variable to CastExpr. For now it's always null but for derived-to-base and base-to-derived cast expressions it will contain the full base path. This is needed to avoid ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
170d1b88f0c77ec5b81f22419f197cefc7b175d6 23-Apr-2010 Anders Carlsson <andersca@mac.com> Turn CXXMethodVector into a generic class template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/UsuallyTinyPtrVector.h
046861b912ed72bdc364d7905180ee63e5b08870 23-Apr-2010 Anders Carlsson <andersca@mac.com> Turn CXXMethodVector into a generic class template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/UsuallyTinyPtrVector.h
b057bb40702a9fb498d623a3be6f110fad650761 23-Apr-2010 John McCall <rjmccall@apple.com> Recommit my change to how C++ does elaborated type lookups, now with
two bugfixes which fix selfhost and (hopefully) the nightly tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/Basic/DiagnosticSemaKinds.td
0d6b1640eb4d1a4a0203235cfdfcdaf3335af36d 23-Apr-2010 John McCall <rjmccall@apple.com> Recommit my change to how C++ does elaborated type lookups, now with
two bugfixes which fix selfhost and (hopefully) the nightly tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/Basic/DiagnosticSemaKinds.td
03da329d5ebfb989a382b8e36fd4dc46e54ac87f 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Improve on my previous diagnostics: per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
055117640dabf88e4e7d35e72c98a5f3bbdac256 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Improve on my previous diagnostics: per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f0b08496aea4aaa2fbe12b8c3af61072c206a30c 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More work toward implementing
NeXt's -fno-constant-cfstrings - wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/TargetInfo.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
2bb5ddaff86ee73d2cea7ec1835978afc88a83f0 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More work toward implementing
NeXt's -fno-constant-cfstrings - wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/TargetInfo.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
f0881b098ee3ecc09a078ef4555d78a2a25ece8a 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Trying to improve on a diagnostics for properties.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ca5cec3b5da9aa6b41c4aeccd0ee1c177825bca4 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Trying to improve on a diagnostics for properties.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a003315f688d26ea2b7ca10e57b4e88e630d7c06 23-Apr-2010 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
37de281ac149a5c5f14e4935a3738d87370da3ed 23-Apr-2010 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e20b812c499916b8b1c6fbd52823ca6b4c6413ec 23-Apr-2010 Chris Lattner <sabre@nondot.org> david conrad points out that {|} in inline assembly on arm are not asm
variants. This fixes neon inline asm which my patch for PR6780 broke.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
9bffb0701d02a10e77e1ac0f196074eed6466ed0 23-Apr-2010 Chris Lattner <sabre@nondot.org> david conrad points out that {|} in inline assembly on arm are not asm
variants. This fixes neon inline asm which my patch for PR6780 broke.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
224f7914a1a4144edf8d45611ecfed9de563121d 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.td
00b40d3f2fb8b2f9043daf3dd4558bff98346b3c 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> Revert "C++ doesn't really use "namespaces" for different kinds of names the same", which seems to break most C++ nightly test apps.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.td
174c1d45482c22b589fb3a5e456088f0f3210965 23-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Strip cv-qualifiers when building C++ constructor and destructor
names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
20b3c9dda95e6808865110a21bfec25f95ebcaa7 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Strip cv-qualifiers when building C++ constructor and destructor
names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
22027ada592fa7f72418cd53934d6000bfcf8c38 23-Apr-2010 Anders Carlsson <andersca@mac.com> Add another 'catch all' access diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0e313bd4795c005f23c43f127039fd948c3e0bd9 23-Apr-2010 Anders Carlsson <andersca@mac.com> Add another 'catch all' access diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c51fdda5ba5bd2a30276d3084769b76055309f57 23-Apr-2010 John McCall <rjmccall@apple.com> C++ doesn't really use "namespaces" for different kinds of names the same
way that C does. Among other differences, elaborated type specifiers
are defined to skip "non-types", which, as you might imagine, does not
include typedefs. Rework our use of IDNS masks to capture the semantics
of different kinds of declarations better, and remove most current lookup
filters. Removing the last remaining filter is more complicated and will
happen in a separate patch.

Fixes PR 6885 as well some spectrum of unfiled bugs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.td
d04efc98d08731e31bd73f430803acc5ffa9040a 23-Apr-2010 John McCall <rjmccall@apple.com> C++ doesn't really use "namespaces" for different kinds of names the same
way that C does. Among other differences, elaborated type specifiers
are defined to skip "non-types", which, as you might imagine, does not
include typedefs. Rework our use of IDNS masks to capture the semantics
of different kinds of declarations better, and remove most current lookup
filters. Removing the last remaining filter is more complicated and will
happen in a separate patch.

Fixes PR 6885 as well some spectrum of unfiled bugs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.td
a19f6bd327360b1ca2d540071ea28acfa1da746d 23-Apr-2010 Anders Carlsson <andersca@mac.com> Change the 'declared at' diagnostic to say 'declared here'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d1aa800a19c956c72319025dd302ae78ed47f9ee 23-Apr-2010 Anders Carlsson <andersca@mac.com> Change the 'declared at' diagnostic to say 'declared here'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d7298f54400d484b4b04393e48bdbe5c2cf3a5a3 23-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Make TemplateDecl and ObjCContainerDecl abstract

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
baf633b41fc1cb42fd5e128954550bf1853f2a8d 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Make TemplateDecl and ObjCContainerDecl abstract

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
9761a64100c53e687c57a5529f9ca54fef11e1aa 23-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they
aren't and never were used. There's a gap in the bit pattern for IDNS
now, but I'm sure *someone* will fill it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
bd4187bb6f4a0cfe7d6d2c8e8856b16bca2f0748 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they
aren't and never were used. There's a gap in the bit pattern for IDNS
now, but I'm sure *someone* will fill it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
b33c766ae8d0e73ae511dff8698d811044968849 22-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Check for -fno-constant-cfstrings consistency
in pch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
4c9d8d0eca5ca635d9a30222f690db9140e98325 22-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Check for -fno-constant-cfstrings consistency
in pch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
b2df6b5289dd2d3b7e4b077ae4555145f6fc9c61 22-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Support for -fno-constant-cfstrings option - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
33e982bf782d851bfe5767acb1336fcf3419ac6b 22-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Support for -fno-constant-cfstrings option - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
7da31c178c1982b1fb3c28ae1aa280c05a32601e 22-Apr-2010 John McCall <rjmccall@apple.com> Use the naming class from the overloaded lookup when access-checking an
address of overloaded function, instead of assuming that a nested name
specifier was used. A nested name specifier is not required for static
functions.

Fixes PR6886.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e9ee23edd17c4bb7f271e67f8790792b4de677fc 22-Apr-2010 John McCall <rjmccall@apple.com> Use the naming class from the overloaded lookup when access-checking an
address of overloaded function, instead of assuming that a nested name
specifier was used. A nested name specifier is not required for static
functions.

Fixes PR6886.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d43994fbedf40dde3a016c3c8991aa2085646cd9 22-Apr-2010 Anders Carlsson <andersca@mac.com> Re-land the patch that merges two diagnostics into one now that it passes self-host :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3b8c53b619c1c3d77632734d227566071459b9f5 22-Apr-2010 Anders Carlsson <andersca@mac.com> Re-land the patch that merges two diagnostics into one now that it passes self-host :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0b01765e44e0766a1d3e6d78de2c95d5cb393db8 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> Revert "Unify two diagnostics into one.", it breaks with an assertion failure on bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d4b2853cec72abdaa6821aabc372d538dfbc2429 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> Revert "Unify two diagnostics into one.", it breaks with an assertion failure on bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
060da325bbd975c2b7f6a08df297ecbdcc71e71f 22-Apr-2010 Anders Carlsson <andersca@mac.com> Unify two diagnostics into one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
792898b58a27ea9034dd95710d388ed30cc693af 22-Apr-2010 Anders Carlsson <andersca@mac.com> Unify two diagnostics into one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
82d10e709325891eaf37609ad9d6178c11fe6b22 22-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Whenever we complain about a failed initialization of a function or
method parameter, provide a note pointing at the parameter itself so
the user does not have to manually look for the function/method being
called and match up parameters to arguments. For example, we now get:

t.c:4:5: warning: incompatible pointer types passing 'long *' to
parameter of
type 'int *' [-pedantic]
f(long_ptr);
^~~~~~~~
t.c:1:13: note: passing argument to parameter 'x' here
void f(int *x);
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a41a8c5972c2632247ae7913cf6ce65d45f7e702 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Whenever we complain about a failed initialization of a function or
method parameter, provide a note pointing at the parameter itself so
the user does not have to manually look for the function/method being
called and match up parameters to arguments. For example, we now get:

t.c:4:5: warning: incompatible pointer types passing 'long *' to
parameter of
type 'int *' [-pedantic]
f(long_ptr);
^~~~~~~~
t.c:1:13: note: passing argument to parameter 'x' here
void f(int *x);
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
008452a502ebc69b0bc26655f5f341b71e139196 22-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Implement parsing for message sends in Objective-C++. Message sends in
Objective-C++ have a more complex grammar than in Objective-C
(surprise!), because

(1) The receiver of an instance message can be a qualified name such
as ::I or identity<I>::type.
(2) Expressions in C++ can start with a type.

The receiver grammar isn't actually ambiguous; it just takes a bit of
work to parse past the type before deciding whether we have a type or
expression. We do this in two places within the grammar: once for
message sends and once when we're determining whether a []'d clause in
an initializer list is a message send or a C99 designated initializer.

This implementation of Objective-C++ message sends contains one known
extension beyond GCC's implementation, which is to permit a
typename-specifier as the receiver type for a class message, e.g.,

[typename compute_receiver_type<T>::type method];

Note that the same effect can be achieved in GCC by way of a typedef,
e.g.,

typedef typename computed_receiver_type<T>::type Computed;
[Computed method];

so this is merely a convenience.

Note also that message sends still cannot involve dependent types or
values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
6aa14d832704ae176c92d4e0f22dfb3f3d83a70a 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement parsing for message sends in Objective-C++. Message sends in
Objective-C++ have a more complex grammar than in Objective-C
(surprise!), because

(1) The receiver of an instance message can be a qualified name such
as ::I or identity<I>::type.
(2) Expressions in C++ can start with a type.

The receiver grammar isn't actually ambiguous; it just takes a bit of
work to parse past the type before deciding whether we have a type or
expression. We do this in two places within the grammar: once for
message sends and once when we're determining whether a []'d clause in
an initializer list is a message send or a C99 designated initializer.

This implementation of Objective-C++ message sends contains one known
extension beyond GCC's implementation, which is to permit a
typename-specifier as the receiver type for a class message, e.g.,

[typename compute_receiver_type<T>::type method];

Note that the same effect can be achieved in GCC by way of a typedef,
e.g.,

typedef typename computed_receiver_type<T>::type Computed;
[Computed method];

so this is merely a convenience.

Note also that message sends still cannot involve dependent types or
values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b78dc9814ff816750a3499ab372056eb2673880b 21-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Migrate the responsibility for turning the receiver name in an
Objective-C class message expression into a type from the parser
(which was doing so in two places) to Action::getObjCMessageKind()
which, in the case of Sema, reduces the number of name lookups we need
to perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1569f95831a8c99e9f664137bf8f40e47ee3d90f 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Migrate the responsibility for turning the receiver name in an
Objective-C class message expression into a type from the parser
(which was doing so in two places) to Action::getObjCMessageKind()
which, in the case of Sema, reduces the number of name lookups we need
to perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f36e10ef71ece964bcd7997b170a7cb48c12901f 21-Apr-2010 Anders Carlsson <andersca@mac.com> Diagnose access to fields with private constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b99c666a940e93bcfcaeddc01515c94472e28a20 21-Apr-2010 Anders Carlsson <andersca@mac.com> Diagnose access to fields with private constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc1ec854fa9a150a195bf004926aeb3736b2b218 21-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Rework the Parser-Sema interaction for Objective-C message
sends. Major changes include:

- Expanded the interface from two actions (ActOnInstanceMessage,
ActOnClassMessage), where ActOnClassMessage also handled sends to
"super" by checking whether the identifier was "super", to three
actions (ActOnInstanceMessage, ActOnClassMessage,
ActOnSuperMessage). Code completion has the same changes.
- The parser now resolves the type to which we are sending a class
message, so ActOnClassMessage now accepts a TypeTy* (rather than
an IdentifierInfo *). This opens the door to more interesting
types (for Objective-C++ support).
- Split ActOnInstanceMessage and ActOnClassMessage into parser
action functions (with their original names) and semantic
functions (BuildInstanceMessage and BuildClassMessage,
respectively). At present, this split is onyl used by
ActOnSuperMessage, which decides which kind of super message it
has and forwards to the appropriate Build*Message. In the future,
Build*Message will be used by template instantiation.
- Use getObjCMessageKind() within the disambiguation of Objective-C
message sends vs. array designators.

Two notes about substandard bits in this patch:
- There is some redundancy in the code in ParseObjCMessageExpr and
ParseInitializerWithPotentialDesignator; this will be addressed
shortly by centralizing the mapping from identifiers to type names
for the message receiver.
- There is some #if 0'd code that won't likely ever be used---it
handles the use of 'super' in methods whose class does not have a
superclass---but could be used to model GCC's behavior more
closely. This code will die in my next check-in, but I want it in
Subversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
2725ca8eb3354975ca77ed4b88ede7b60b216b9a 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework the Parser-Sema interaction for Objective-C message
sends. Major changes include:

- Expanded the interface from two actions (ActOnInstanceMessage,
ActOnClassMessage), where ActOnClassMessage also handled sends to
"super" by checking whether the identifier was "super", to three
actions (ActOnInstanceMessage, ActOnClassMessage,
ActOnSuperMessage). Code completion has the same changes.
- The parser now resolves the type to which we are sending a class
message, so ActOnClassMessage now accepts a TypeTy* (rather than
an IdentifierInfo *). This opens the door to more interesting
types (for Objective-C++ support).
- Split ActOnInstanceMessage and ActOnClassMessage into parser
action functions (with their original names) and semantic
functions (BuildInstanceMessage and BuildClassMessage,
respectively). At present, this split is onyl used by
ActOnSuperMessage, which decides which kind of super message it
has and forwards to the appropriate Build*Message. In the future,
Build*Message will be used by template instantiation.
- Use getObjCMessageKind() within the disambiguation of Objective-C
message sends vs. array designators.

Two notes about substandard bits in this patch:
- There is some redundancy in the code in ParseObjCMessageExpr and
ParseInitializerWithPotentialDesignator; this will be addressed
shortly by centralizing the mapping from identifiers to type names
for the message receiver.
- There is some #if 0'd code that won't likely ever be used---it
handles the use of 'super' in methods whose class does not have a
superclass---but could be used to model GCC's behavior more
closely. This code will die in my next check-in, but I want it in
Subversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
500acd6be7b449d0982cf0a9e63ee282a2a6376c 21-Apr-2010 Anders Carlsson <andersca@mac.com> Keep tack of whether a base in an InitializedEntity is an inherited virtual base or not. Use this in CheckConstructorAccess.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
711f34adb886cce8ba86c7b1b6513a1eaaf63bb5 21-Apr-2010 Anders Carlsson <andersca@mac.com> Keep tack of whether a base in an InitializedEntity is an inherited virtual base or not. Use this in CheckConstructorAccess.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2b83d227f3071159f3b64e84478336ab0ad5f6a9 21-Apr-2010 Anders Carlsson <andersca@mac.com> Pass the InitializedEntity to Sema::CheckConstructorAccess and use it to report different diagnostics depending on which entity is being initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9a68a67c6ae4982001815cc04f69b8781058263a 21-Apr-2010 Anders Carlsson <andersca@mac.com> Pass the InitializedEntity to Sema::CheckConstructorAccess and use it to report different diagnostics depending on which entity is being initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e8741c165985f3c310b77e21a04eaac970d7f3e5 21-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
d2ec7268da536871ae05769d776c4f7caf88dbd7 21-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
80f35bd41307b833ba0e89c0463485aba029789e 21-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add more const to ConstExprIterator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/Stmt.h
1705fe9ec0efb65f77a46e669e48302923204fe8 21-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add more const to ConstExprIterator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/Stmt.h
4a0a0aeb4b8c3906a4c510e1874a6322e02c7a01 21-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> CXXNamedCastExpr is actually an abstract expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
d8383d45e41ba2316610e5d638d2872e37b67cfb 21-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> CXXNamedCastExpr is actually an abstract expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
3651ce8ac4d89a17f28a7b73021fd34734fe4dd7 21-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Reword the note we emit when suppressing template instantiation contexts, per John's advice

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3fb53bd53037872040396225736914fcb75c1fec 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Reword the note we emit when suppressing template instantiation contexts, per John's advice

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5497b5ef7da4e0a570e2ce2c9c9e0d84e8b803b6 21-Apr-2010 John McCall <rjmccall@apple.com> Use const_cast instead of a C cast. Safer, plus it suppresses a gcc warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
5fae1d67ac199755dd26a102e1bddc881edab19c 21-Apr-2010 John McCall <rjmccall@apple.com> Use const_cast instead of a C cast. Safer, plus it suppresses a gcc warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
09bbc68a8388f1e4cd019e66aa6d3f4a375735fe 21-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add initial support for C++ delete expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
6b8513829895e56a7b97e787ea74520bc626512e 21-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add initial support for C++ delete expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
aa598756ea06cb4de58fa775892e02f57e71537b 21-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Overhaul the AST representation of Objective-C message send
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:

1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)

Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:

1) Unchanged; the object instance is represented by an Expr*.

2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...

3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).

4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.

The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!

This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:

if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}

with a switch

switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}

There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Checker/BugReporter/BugReporter.h
04badcf84c8d504d8491c7c7e29b58f52cb16640 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Overhaul the AST representation of Objective-C message send
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:

1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)

Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:

1) Unchanged; the object instance is represented by an Expr*.

2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...

3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).

4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.

The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!

This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:

if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}

with a switch

switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}

There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Checker/BugReporter/BugReporter.h
eb599b04d8f1d7b71e04caf2b6de3b3360662c0c 21-Apr-2010 Anders Carlsson <andersca@mac.com> Remove an unused parameter from isImplicitlyDefined.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
10dc0f8c355c6a726f206aefcb249cb2fafbce17 21-Apr-2010 Anders Carlsson <andersca@mac.com> Remove an unused parameter from isImplicitlyDefined.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d1af63ce83d16bd87e384423c83aad7fbba431e1 20-Apr-2010 Chris Lattner <sabre@nondot.org> change FullSourceLoc to have a *const* SourceManager&, eliminating
a const_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Frontend/TextDiagnosticPrinter.h
5c5db4e94bd1243ba92563acba51ba66afa94917 20-Apr-2010 Chris Lattner <sabre@nondot.org> change FullSourceLoc to have a *const* SourceManager&, eliminating
a const_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Frontend/TextDiagnosticPrinter.h
d8dc8f7f327f2d7f4517e71b54ddaf38b6e7c3e9 20-Apr-2010 Chris Lattner <sabre@nondot.org> push some source location information down through the compiler,
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
e127a0d80155b45dafe77f2b4380e5fa111a3345 20-Apr-2010 Chris Lattner <sabre@nondot.org> push some source location information down through the compiler,
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
0a40dacf833d9b68b6c8a5cd3c4ed4ec0ec3d69b 20-Apr-2010 Chris Lattner <sabre@nondot.org> enhance sourcemgr to detect various UTF BOM's and emit a fatal error
about it instead of producing tons of garbage from the lexer.

It would be even better for sourcemgr to dynamically transcode (e.g.
from UTF16 -> UTF8).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
38caec48bc1c9816ca59b8d164a64447ee208c2e 20-Apr-2010 Chris Lattner <sabre@nondot.org> enhance sourcemgr to detect various UTF BOM's and emit a fatal error
about it instead of producing tons of garbage from the lexer.

It would be even better for sourcemgr to dynamically transcode (e.g.
from UTF16 -> UTF8).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
91330e6d7da91efa05ff0ff63b3f8f47f48fa8c4 20-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Keep proper source location information for the type in an Objective-C
@encode expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
81d3466d037dc5844234c7a93dab21a6ad986e7d 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep proper source location information for the type in an Objective-C
@encode expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
c693861122503dacd40daf3b2fba092db42513c6 20-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a limit on the depth of the template instantiation backtrace
we will print with each error that occurs during template
instantiation. When the backtrace is longer than that, we will print
N/2 of the innermost backtrace entries and N/2 of the outermost
backtrace entries, then skip the middle entries with a note such as:

note: suppressed 2 template instantiation contexts; use
-ftemplate-backtrace-limit=N to change the number of template
instantiation entries shown

This should eliminate some excessively long backtraces that aren't
providing any value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
575cf3791216c33770ba950430493cdd43099f8f 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Introduce a limit on the depth of the template instantiation backtrace
we will print with each error that occurs during template
instantiation. When the backtrace is longer than that, we will print
N/2 of the innermost backtrace entries and N/2 of the outermost
backtrace entries, then skip the middle entries with a note such as:

note: suppressed 2 template instantiation contexts; use
-ftemplate-backtrace-limit=N to change the number of template
instantiation entries shown

This should eliminate some excessively long backtraces that aren't
providing any value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
c5a66dfb93dff2edf9a9b1ea2a9a7b600a75ff2d 20-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Improve handling of CXXNewExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
b17b1b3cc2b0d4d3b263b9384571bbc7f3995771 20-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Improve handling of CXXNewExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
a6e7cc1036bee04fe556448413ed69349a9030cd 20-Apr-2010 Chris Lattner <sabre@nondot.org> add __builtin_[r]index. Perhaps all LIBBUILTIN's should get
these or something?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
d764d6567ca56d23efc2d63b62b156c415fe5fae 20-Apr-2010 Chris Lattner <sabre@nondot.org> add __builtin_[r]index. Perhaps all LIBBUILTIN's should get
these or something?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
944c37abb8acd1e14e73176922ee351db6a0f62f 20-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Parse/DeclSpec.h
16573fa9705b546b7597c273b25b85d6321e2b33 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Parse/DeclSpec.h
24fa15567be0d11ba3c43bb53735016cf23e3cda 19-Apr-2010 Chris Lattner <sabre@nondot.org> add a PPCallback handler for a skipped #include, patch by
Zhanyong Wan!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
6fbe3ebeaef08665a37423f8425314c90b8b5bcf 19-Apr-2010 Chris Lattner <sabre@nondot.org> add a PPCallback handler for a skipped #include, patch by
Zhanyong Wan!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
056f377b25606c6413732c62543bfbb5faeed997 19-Apr-2010 Eric Christopher <echristo@apple.com> Remove the argument number from the constant integer diagnostic.
Update all of the testcases accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5e8965525282a48fd34af05183b8c3705a5b00d5 19-Apr-2010 Eric Christopher <echristo@apple.com> Remove the argument number from the constant integer diagnostic.
Update all of the testcases accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7c5d9538c7621a5b4eb922bf14360fdd6e1d4c6a 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Some renaming of methods, fixes typo
(related to PR6769).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
63326a53418b4853a83b360ce1dbdb10c5739fc7 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Some renaming of methods, fixes typo
(related to PR6769).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f659b239aa691ee558fd4ba0ef0a68ce396857d3 19-Apr-2010 Dan Gohman <gohman@apple.com> Fix -Wcast-qual warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
cb421fa690da545b58a720abe5f1c49b166dbde7 19-Apr-2010 Dan Gohman <gohman@apple.com> Fix -Wcast-qual warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
525310b7e252b3b0495affdba337042d63702a55 19-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move all C++ expression evaluation logic into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
cb7464ab402d057849dda9749d62a62d86c35ab8 19-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move all C++ expression evaluation logic into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
5fa5b9f8a9e7eeb9883ca13c07895db79db1b38f 19-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Analyzer: add support for CXXNewExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
856c6bcaea56e05255e9f3997ddd56b5c18a14f0 19-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Analyzer: add support for CXXNewExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
f573eaf3c7ff85ebd18b6f2861097e1a8b3d1d3f 18-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Local static variables must be available module-wise
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
65ad5a42cca954e070428dcc499b62393aa7a6d3 18-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Local static variables must be available module-wise
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
317e07ea35a2b1269d0b9095bdde70f2685f7015 18-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve our handling of user-defined conversions as part of overload
resolution. There are two sources of problems involving user-defined
conversions that this change eliminates, along with providing simpler
interfaces for checking implicit conversions:

- It eliminates a case of infinite recursion found in Boost.

- It eliminates the search for the constructor needed to copy a temporary
generated by an implicit conversion from overload
resolution. Overload resolution assumes that, if it gets a value
of the parameter's class type (or a derived class thereof), there
is a way to copy if... even if there isn't. We now model this
properly.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3fbaf3e5d524bfff219d1e3e9ac4801a8411590f 18-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve our handling of user-defined conversions as part of overload
resolution. There are two sources of problems involving user-defined
conversions that this change eliminates, along with providing simpler
interfaces for checking implicit conversions:

- It eliminates a case of infinite recursion found in Boost.

- It eliminates the search for the constructor needed to copy a temporary
generated by an implicit conversion from overload
resolution. Overload resolution assumes that, if it gets a value
of the parameter's class type (or a derived class thereof), there
is a way to copy if... even if there isn't. We now model this
properly.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1cfbc68a39712b410f0b5859b87b57f9ff749cea 17-Apr-2010 Chandler Carruth <chandlerc@gmail.com> Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are not
implemented precisely the same as GCC, but the distinction GCC makes isn't
useful to represent. This allows parsing code which uses GCC-specific keywords
('asm', etc.) without parsing in a fully GNU mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
eb5d7b752651283de5abfcc2f91df7227582a08d 17-Apr-2010 Chandler Carruth <chandlerc@gmail.com> Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are not
implemented precisely the same as GCC, but the distinction GCC makes isn't
useful to represent. This allows parsing code which uses GCC-specific keywords
('asm', etc.) without parsing in a fully GNU mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
ac31224820a92c7e38e632c807a8ee55dbfa69a3 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
046c294a43024874ff35656c6e785b64e72f1f36 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
566e7eca199ecccb73cd8305faae30d2dbe8efb6 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add printName to DeclarationName which prints the human-readable name on a
raw_ostream. Use it in getAsString and NamedDecl's raw_ostream operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclarationName.h
f6cde77d7bc34bbee26b086ff192637af8e9da59 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add printName to DeclarationName which prints the human-readable name on a
raw_ostream. Use it in getAsString and NamedDecl's raw_ostream operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclarationName.h
13946c261d641cd1745b59d36ae1420c2aea20ae 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.

The next step is to print the name directly into the stream, avoiding a temporary std::string copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
900fc6388e803868a34b9483510c345e9b49d7eb 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.

The next step is to print the name directly into the stream, avoiding a temporary std::string copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
96d5f0ff7e7486013a97fc56187f65aa19c322f3 17-Apr-2010 Eric Christopher <echristo@apple.com> Consolidate most of the integer constant expression builtin requirement
checking into a single function and use that throughout. Remove some
now unnecessary diagnostics and update tests with now more accurate
diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
691ebc3f3225542e5abd85e107ebdbec907cf510 17-Apr-2010 Eric Christopher <echristo@apple.com> Consolidate most of the integer constant expression builtin requirement
checking into a single function and use that throughout. Remove some
now unnecessary diagnostics and update tests with now more accurate
diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bd344d9ce594b0bd536c00e31d7c7cbb5b2408c7 17-Apr-2010 Chris Lattner <sabre@nondot.org> make our existing "switch on bool" warning work for C. Since
the result of comparisons are 'int' in C, it doesn't work to
test just the result type of the expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
2b334bb3126a67895813e49e6228dad4aec0b4d6 17-Apr-2010 Chris Lattner <sabre@nondot.org> make our existing "switch on bool" warning work for C. Since
the result of comparisons are 'int' in C, it doesn't work to
test just the result type of the expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
b76c03eb4cfd2b99f928da6f1c140dd0f69fcd82 16-Apr-2010 Nick Lewycky <nicholas@mxc.ca> Add a write(raw_ostream&) method to RewriteBuffer. This uses an inefficient
implementation today but is the right place if we want to make it faster some
day.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
0ade808e0ac411baa2dbc1f76ad352b9b6d6d3f8 16-Apr-2010 Nick Lewycky <nicholas@mxc.ca> Add a write(raw_ostream&) method to RewriteBuffer. This uses an inefficient
implementation today but is the right place if we want to make it faster some
day.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
294d66bba4dd35b1b682f2bc76f1dfca3d10a10a 16-Apr-2010 Chris Lattner <sabre@nondot.org> allow mapping fatal errors to errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
d0fe3e9a97459477e64ad1df312fd29b86a3c3cb 16-Apr-2010 Chris Lattner <sabre@nondot.org> allow mapping fatal errors to errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
d0b42aa4601a5ecc96c9fce70bb916d9a91f1b7e 16-Apr-2010 Anders Carlsson <andersca@mac.com> Start working on handling wide bitfields in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
72468ecb98efa158c5f1e2eb39ad413c8e28ebe0 16-Apr-2010 Anders Carlsson <andersca@mac.com> Start working on handling wide bitfields in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
638c4e2d6299d73b5f7009474d67090726051f78 16-Apr-2010 Eric Christopher <echristo@apple.com> Expand the argument diagnostics for too many arguments and give
both number seen and number expected.

Finishes fixing PR6501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ccfa9639f8d09733bcf1c2572c5bd3daba5bd632 16-Apr-2010 Eric Christopher <echristo@apple.com> Expand the argument diagnostics for too many arguments and give
both number seen and number expected.

Finishes fixing PR6501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ed6d04519bf61948802ab0aa504fa9a7c3d0435a 16-Apr-2010 Eric Christopher <echristo@apple.com> Expand argument diagnostic for too few arguments to give the number
of arguments both seen and expected.

Fixes PR6501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d77b9a29651d748f0e30a8dad8969635fc04f725 16-Apr-2010 Eric Christopher <echristo@apple.com> Expand argument diagnostic for too few arguments to give the number
of arguments both seen and expected.

Fixes PR6501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
697bbe8c8174b8ad339d9ebab8269b2bec930d87 16-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Feed proper source-location information into Sema::LookupSingleResult,
in case it ends up doing something that might trigger diagnostics
(template instantiation, ambiguity reporting, access
reporting). Noticed while working on PR6831.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c83c6874e3bf1432d3df5e8d3530f8561ff5441f 16-Apr-2010 Douglas Gregor <dgregor@apple.com> Feed proper source-location information into Sema::LookupSingleResult,
in case it ends up doing something that might trigger diagnostics
(template instantiation, ambiguity reporting, access
reporting). Noticed while working on PR6831.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f5e7dbf23d5a94f0b29927e8f86633a0637018a5 15-Apr-2010 Anders Carlsson <andersca@mac.com> Improve the bit-field too wide error message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c75d6ccf16170af42d31508a026b42382ab8f118 15-Apr-2010 Anders Carlsson <andersca@mac.com> Improve the bit-field too wide error message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
912e11a0708e23088cfb85d224d691517296332a 15-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose attempts to throw an abstract class type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bf422f9d7e2e3454b2296b02202f4d5ae12644f6 15-Apr-2010 Douglas Gregor <dgregor@apple.com> Diagnose attempts to throw an abstract class type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
279ac317a9a1a8b5bc8d3684ac88a11de012eb36 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Add a -fno-bitfield-type-align option, for my own testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
fb937b8c5f1c5dc9cfd4223b5cae230cc42b0287 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Add a -fno-bitfield-type-align option, for my own testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
3d1c024dc8dba472a520f00053a4422154614cf0 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Tweak spelling (Bitfield -> BitField)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
b6830d616a068971f13e1e213e06a945c8c93cea 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Tweak spelling (Bitfield -> BitField)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
44e64d8461f2b4c565061fa2ecdf8268ac3d2351 15-Apr-2010 Nick Lewycky <nicholas@mxc.ca> Teach -fixit to modify all of its inputs instead of just the main file, unless
-fixit-at specified a particular fixit to fix, or the -o flag was used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
lang/Rewrite/Rewriter.h
d4a97a18ea3cda3ba095e7c0c6708e7a39cf31db 15-Apr-2010 Nick Lewycky <nicholas@mxc.ca> Teach -fixit to modify all of its inputs instead of just the main file, unless
-fixit-at specified a particular fixit to fix, or the -o flag was used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
lang/Rewrite/Rewriter.h
ffa6d1ca26643972b8b6bf394e0cc1cb757643ef 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::useBitfieldTypeAlignment().
- Used to determine whether the alignment of the type in a bit-field is
respected when laying out structures. The default is true, targets can
override this as needed.

- This is designed to correspond to the PCC_BITFIELD_TYPE_MATTERS macro in
gcc. The AST/Sema implementation only affects one line, unless I have
forgotten something. I'd appreciate further review.

- IRgen still needs to be updated to fully support this (which is effectively
PR5591).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
b6a169395c1b30c76daffebcbd2164b6247a5d21 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::useBitfieldTypeAlignment().
- Used to determine whether the alignment of the type in a bit-field is
respected when laying out structures. The default is true, targets can
override this as needed.

- This is designed to correspond to the PCC_BITFIELD_TYPE_MATTERS macro in
gcc. The AST/Sema implementation only affects one line, unless I have
forgotten something. I'd appreciate further review.

- IRgen still needs to be updated to fully support this (which is effectively
PR5591).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
85a48e3c8e72f61fb888510213917546e6b4fdec 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM option parser.
- Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
3f87fb08dd502309960646db01099fb4c1be9a7c 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM option parser.
- Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
ead0e63d97e8d96b3ed450ad2012264441feea8b 15-Apr-2010 Eric Christopher <echristo@apple.com> Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.
Stop multiplying constant by 8 accordingly in the header and change
intrinsic definition for what types we expect.

Add to existing palignr test to check that we're emitting the correct things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
e57aa9e367af227214140e1a174cc561aabaa0b9 15-Apr-2010 Eric Christopher <echristo@apple.com> Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.
Stop multiplying constant by 8 accordingly in the header and change
intrinsic definition for what types we expect.

Add to existing palignr test to check that we're emitting the correct things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
ff27fa606ff2dc40b115523b42ed44a6081ef1d9 15-Apr-2010 Ted Kremenek <kremenek@apple.com> Teach ASTVector::append() about the case where 'NumInputs' is 0. This hopefully fixes
a crash in InitListExpr's ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTVector.h
b13c170a280673f4cf4d7d11ec818392407254d4 15-Apr-2010 Ted Kremenek <kremenek@apple.com> Teach ASTVector::append() about the case where 'NumInputs' is 0. This hopefully fixes
a crash in InitListExpr's ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTVector.h
9ba6661319b4b1fa03b8a7d09597f70effa37a4f 15-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Warn about non-aggregate classes with no user-declared constructors
that have reference or const scalar members, since those members can
never be initializer or modified. Fixes <rdar://problem/7804350>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
325e593a83b20d9bce3628aa78fda983b554814e 15-Apr-2010 Douglas Gregor <dgregor@apple.com> Warn about non-aggregate classes with no user-declared constructors
that have reference or const scalar members, since those members can
never be initializer or modified. Fixes <rdar://problem/7804350>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
57b3f7533957905e360e48e5993a9e42f9c5a0c0 15-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Always diagnose and complain about problems in
ResolveAddressOfOverloadedFunction when asked to complain. Previously,
we had some weird handshake where ResolveAddressOfOverloadedFunction
expected its caller to handle some of the diagnostics but not others,
and yet there was no way for the caller to know which case we were
in. Eliminate this madness, fixing <rdar://problem/7765884>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1a8cf73a825ef35917eede448817237b5fd47b05 15-Apr-2010 Douglas Gregor <dgregor@apple.com> Always diagnose and complain about problems in
ResolveAddressOfOverloadedFunction when asked to complain. Previously,
we had some weird handshake where ResolveAddressOfOverloadedFunction
expected its caller to handle some of the diagnostics but not others,
and yet there was no way for the caller to know which case we were
in. Eliminate this madness, fixing <rdar://problem/7765884>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e1e4187656e16bead3702efa068aadfb0055f962 15-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Once we've emitted a fatal diagnostic, keep counting errors but with a
separate count of "suppressed" errors. This way, semantic analysis
bits that depend on the error count to determine whether problems
occured (e.g., some template argument deduction failures, jump-scope
checking) will not get confused.

The actual problem here is that a missing #include (which is a fatal
error) could cause the jump-scope checker to run on invalid code,
which it is not prepared to do. Trivial fix for both
<rdar://problem/7775941> and <rdar://problem/7775709>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
1864f2eb59471d07db51adfc3e5b1a229eed631a 15-Apr-2010 Douglas Gregor <dgregor@apple.com> Once we've emitted a fatal diagnostic, keep counting errors but with a
separate count of "suppressed" errors. This way, semantic analysis
bits that depend on the error count to determine whether problems
occured (e.g., some template argument deduction failures, jump-scope
checking) will not get confused.

The actual problem here is that a missing #include (which is a fatal
error) could cause the jump-scope checker to run on invalid code,
which it is not prepared to do. Trivial fix for both
<rdar://problem/7775941> and <rdar://problem/7775709>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
fd0807f8b2e4618fa8ce1560fe479b5a34c16059 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Make CXLanguage_Invalid the first enum value (with '0' as its value) in CXLanguageKind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101287 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6cd1e7cb04d1da66e8b5675062152ff60bbc354f 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Make CXLanguage_Invalid the first enum value (with '0' as its value) in CXLanguageKind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101287 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c00ec0db7119d3acf22b0933faaa018234406c8a 14-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> When diagnosing suspicious precedence or assignments, move the fix-it
that adds parentheses from the main diagnostic down to a new
note. This way, when the fix-it represents a choice between two
options, each of the options is associted with a note. There is no
default option in such cases. For example:

/Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; ==
will be
evaluated first [-Wparentheses]
if (x & y == 0) {
^~~~~~~~
/Users/dgregor/t.c:2:9: note: place parentheses around the &
expression to
evaluate it first
if (x & y == 0) {
^
( )
/Users/dgregor/t.c:2:9: note: place parentheses around the ==
expression to
silence this warning
if (x & y == 0) {
^
( )



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
55b38842d12ffd9f9ff3a0e16fae2cfe61ab0fe6 14-Apr-2010 Douglas Gregor <dgregor@apple.com> When diagnosing suspicious precedence or assignments, move the fix-it
that adds parentheses from the main diagnostic down to a new
note. This way, when the fix-it represents a choice between two
options, each of the options is associted with a note. There is no
default option in such cases. For example:

/Users/dgregor/t.c:2:9: warning: & has lower precedence than ==; ==
will be
evaluated first [-Wparentheses]
if (x & y == 0) {
^~~~~~~~
/Users/dgregor/t.c:2:9: note: place parentheses around the &
expression to
evaluate it first
if (x & y == 0) {
^
( )
/Users/dgregor/t.c:2:9: note: place parentheses around the ==
expression to
silence this warning
if (x & y == 0) {
^
( )



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3f5e2a56a70376b7076db5a89a70be03b3d45a7d 14-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move GRStmtNodeBuilder::MakeNode() out of line. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
868e78d59d2dfaf9cda511925e5a58f3a712db96 14-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move GRStmtNodeBuilder::MakeNode() out of line. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
04127894699ea33976f8b7a4a138a279fdefff30 14-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for CXXBoolLiteralExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ValueManager.h
477323d58a0de352c6a61e08b5a83127c4adc904 14-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for CXXBoolLiteralExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ValueManager.h
6e8f13abb2926832914caaeab9a3be1240a50082 14-Apr-2010 Chris Lattner <sabre@nondot.org> add builtin for __builtin_vsprintf, patch by Paul Davey


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
270083146ffd71d4ba35c0cda0b7461dea99e031 14-Apr-2010 Chris Lattner <sabre@nondot.org> add builtin for __builtin_vsprintf, patch by Paul Davey


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
9520402122df38f8744cb71ee30e5eadc448e7cc 14-Apr-2010 Chris Lattner <sabre@nondot.org> make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."
when avoiding paste. Patch by David Peixotto!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenConcatenation.h
8877321ca66b2887c2f377a7f724a62f34fdf1cd 14-Apr-2010 Chris Lattner <sabre@nondot.org> make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."
when avoiding paste. Patch by David Peixotto!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenConcatenation.h
2b3730baddad5e06c1498de980ca3efe66e5d893 14-Apr-2010 Chris Lattner <sabre@nondot.org> implement altivec.h and a bunch of support code, patch by Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsPPC.def
dd17394d225b06376e9ae1d23f36cec463fdef01 14-Apr-2010 Chris Lattner <sabre@nondot.org> implement altivec.h and a bunch of support code, patch by Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsPPC.def
cf90f4c267b51a6a782d9aebf145198d0b5b9b41 14-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Implement typo correction for Objective-C message sends when the
receiver is a mis-typed class name. Previously, we would give a non-specific
typo-correction diagnostic from the expression-parsing code, but there
was no fix-it because it was too late to recover. Now, we give a nice
diagnostic

honk.m:6:4: error: unknown receiver 'Hnk'; did you mean 'Honk'?
[Hnk method];
^~~
Honk
honk.m:1:1: note: 'Honk' declared here
@interface Honk
^

which includes a fix-it.

We still need to recover better from mis-typing "super".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
47bd54392a4fd0f10e04de6a0420fd4838caaa0e 14-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement typo correction for Objective-C message sends when the
receiver is a mis-typed class name. Previously, we would give a non-specific
typo-correction diagnostic from the expression-parsing code, but there
was no fix-it because it was too late to recover. Now, we give a nice
diagnostic

honk.m:6:4: error: unknown receiver 'Hnk'; did you mean 'Honk'?
[Hnk method];
^~~
Honk
honk.m:1:1: note: 'Honk' declared here
@interface Honk
^

which includes a fix-it.

We still need to recover better from mis-typing "super".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
61ab13961128a99e59c4c9bb15cb4e32a828001f 14-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a parsing action to distinguish between class, instance, and
super message sends in Objective-C. No actual functionality change
here, but it provides a hook so that Sema can typo-correct the
receiver in some cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1dbca6ea983231b4cab1a8f1edda8f6e13c21f12 14-Apr-2010 Douglas Gregor <dgregor@apple.com> Introduce a parsing action to distinguish between class, instance, and
super message sends in Objective-C. No actual functionality change
here, but it provides a hook so that Sema can typo-correct the
receiver in some cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6e1f2241cecf3eebbc551d4bc83938136d12ea78 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Use ASTVector instead of std::vector for the Exprs in InitListExpr. Performance
measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance
change, but now the vector isn't leaked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
709210feee317b8d6690dd1d15c2b74cfe55e261 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Use ASTVector instead of std::vector for the Exprs in InitListExpr. Performance
measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance
change, but now the vector isn't leaked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
210af35577729de05120c0e86547dfbeeacd8204 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Introduce ASTVector, which is a std::vector-like class that allocates all memory
using the allocator associated with an ASTContext. This is largely copy-and-paste
from SmallVector, and should be refactored one day.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTVector.h
9c9bd84383f742513b3cfd656948bab16d752937 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Introduce ASTVector, which is a std::vector-like class that allocates all memory
using the allocator associated with an ASTContext. This is largely copy-and-paste
from SmallVector, and should be refactored one day.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTVector.h
78120390dc097f0aec6e4757b8309d4dec12c16f 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Add cursor kind for C++ methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101193 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8bd5a69999cfd06b6b5a58fdd04e4f802b2df5a4 14-Apr-2010 Ted Kremenek <kremenek@apple.com> Add cursor kind for C++ methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101193 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f85dad13171f398cad222114a718c21f62746e61 13-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a cc1 option to specify the max number of nodes the analyzer can explore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
c09289d104b8e01ecd998e3f08b2b0561049e1dc 13-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a cc1 option to specify the max number of nodes the analyzer can explore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/AnalysisManager.h
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
2d91a1377ad849f233142ccf2b00ea7e2df6620d 13-Apr-2010 Chris Lattner <sabre@nondot.org> add frontend support for -fdata-sections and -ffunction-sections,
patch by Sylvere Teissier!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
bbea7168326d810eff18dfb8bc43c7790fd55010 13-Apr-2010 Chris Lattner <sabre@nondot.org> add frontend support for -fdata-sections and -ffunction-sections,
patch by Sylvere Teissier!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
27565f77ca93d96cdea71cd6d3d129c02f1e8f82 13-Apr-2010 John McCall <rjmccall@apple.com> Diagnose declarations of conversion functions with declarators other than '()'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a3f8137d9f7cd1af7a6cbe736b9419f7eb99e86c 13-Apr-2010 John McCall <rjmccall@apple.com> Diagnose declarations of conversion functions with declarators other than '()'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
db32f0eee66682b5023179ce31968f6eab3e6244 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6814 - Only print [-pedantic] on a diagnostic if -pedantic
actually turned it on. If a diag is produced by a warning which
is an extension but defaults to on, and has no warning group, don't
print any option info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
04e442714c292d9381cad2ac14087991132bddca 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6814 - Only print [-pedantic] on a diagnostic if -pedantic
actually turned it on. If a diag is produced by a warning which
is an extension but defaults to on, and has no warning group, don't
print any option info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
15053790473b9ec722db7e4b30185575a8ac8eb9 12-Apr-2010 Ted Kremenek <kremenek@apple.com> Add 'clang_getCursorLanguage' to return the "language" of the AST element (e.g., distinguish between C and Objective-C language features). Currently this only returns results for declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101070 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
45e1dae500bba7a9ef5b8206263a5609c07c6f03 12-Apr-2010 Ted Kremenek <kremenek@apple.com> Add 'clang_getCursorLanguage' to return the "language" of the AST element (e.g., distinguish between C and Objective-C language features). Currently this only returns results for declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101070 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
52913d86c34ed2b9d46264b63381e414b0376961 12-Apr-2010 Ted Kremenek <kremenek@apple.com> Update doxygen comments about lifetime requirements of CXUnsaveFile data arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101054 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c6f530defd937faa1c00998e60deea6368526961 12-Apr-2010 Ted Kremenek <kremenek@apple.com> Update doxygen comments about lifetime requirements of CXUnsaveFile data arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101054 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c4d2b25bbd9d93b9db96582e061e5366e21709e2 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix rdar://7852959 - Use of super within a block is actually ok.
(aka, Fariborz was right ;-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
454006d625f9f5f48cd80096f1afa0f5985ec25e 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix rdar://7852959 - Use of super within a block is actually ok.
(aka, Fariborz was right ;-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
cb50023b877a154be8a9da8938aa35dedb7e4762 12-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a crash-on-invalid involving name lookup of tag names, where we
ended up finding a function template that we didn't expect. Recover
more gracefully, and fix a similar issue for class templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
57265e35292897e383d70bbd1d552209fac37b39 12-Apr-2010 Douglas Gregor <dgregor@apple.com> Fix a crash-on-invalid involving name lookup of tag names, where we
ended up finding a function template that we didn't expect. Recover
more gracefully, and fix a similar issue for class templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
93950a22367838ae323d68afd854a03070e9fd85 12-Apr-2010 Chris Lattner <sabre@nondot.org> change Scope::WithinElse to be a normal scope flag, widen the
fields to two 16-bit values instead of using bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
966c78b79004061c1f64feff96818b9f1d68ea58 12-Apr-2010 Chris Lattner <sabre@nondot.org> change Scope::WithinElse to be a normal scope flag, widen the
fields to two 16-bit values instead of using bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
e1046a5974f7d27850e00f50fc0f00a2c5726c57 12-Apr-2010 Chris Lattner <sabre@nondot.org> Have the parser decide whether a message to super is a variable or
type, instead of having sema do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
15faee19fdb9017dd6d08a690427b18c3b062c2d 12-Apr-2010 Chris Lattner <sabre@nondot.org> Have the parser decide whether a message to super is a variable or
type, instead of having sema do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
580de3c5ca180bdef2f4e1c0b721fb3bf48a9ef2 12-Apr-2010 Anders Carlsson <andersca@mac.com> Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
80638c5e6395344c1e6096542b0ff3b8bfb2139e 12-Apr-2010 Anders Carlsson <andersca@mac.com> Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5014ef7ed3214235f35a5ad5a8f48e40af30bcef 11-Apr-2010 Ted Kremenek <kremenek@apple.com> Add CIndex support for blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100989 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1ee6cad59f017601ea54fbb4f62a6e8d69897e3e 11-Apr-2010 Ted Kremenek <kremenek@apple.com> Add CIndex support for blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100989 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6d1911999998c88e8d7cc13d4bc8e3733be70151 11-Apr-2010 Chris Lattner <sabre@nondot.org> avoid double negatives


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b9342fb79bfa84c70188e207a0f212574653b2c7 11-Apr-2010 Chris Lattner <sabre@nondot.org> avoid double negatives


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
43a925d90e57f8ddc897439c6e788fed5691cbec 11-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6811 by not parsing 'super' as a magic expression in
LookupInObjCMethod. Doing so allows all sorts of invalid code
to slip through to codegen. This patch does not change the
AST representation of super, though that would now be a natural
thing to do since it can only be in the receiver position and
in the base of a ObjCPropertyRefExpr.

There are still several ugly areas handling super in the parser,
but this is definitely a step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
eb483eb3ee80300f15d6d13573d82493c2194461 11-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6811 by not parsing 'super' as a magic expression in
LookupInObjCMethod. Doing so allows all sorts of invalid code
to slip through to codegen. This patch does not change the
AST representation of super, though that would now be a natural
thing to do since it can only be in the receiver position and
in the base of a ObjCPropertyRefExpr.

There are still several ugly areas handling super in the parser,
but this is definitely a step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
095e284e099479579bfe3d3c8d623c429d7337cd 10-Apr-2010 Anders Carlsson <andersca@mac.com> Rename -dump-record-layouts to -fdump-record-layouts now that the option behaves like aa flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
46116ce06ae28e3fc3a34c513f2f63ac02d9a194 10-Apr-2010 Anders Carlsson <andersca@mac.com> Rename -dump-record-layouts to -fdump-record-layouts now that the option behaves like aa flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
d7801260901ccfa844f31e9ac8607eba279f3e55 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't support them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/ToolChain.h
43a9b3263cb0bcb050cc75c15b3e6a8951e6b97a 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't support them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/ToolChain.h
3a3bcf9e91f43c970ebb7105d589aa9d070558ad 10-Apr-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When a member pointer is dereferenced, the class it points into must be complete. Enforce this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
59fc2690e622e9db7f7a8f5036562b19d3bfb2b5 10-Apr-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When a member pointer is dereferenced, the class it points into must be complete. Enforce this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c00d11494ad511cc3b09bdf89442e57a48e35876 10-Apr-2010 John McCall <rjmccall@apple.com> Diagnose more cases of initializing distinct members of an anonymous union
member. Use a better diagnostic for this case. Also fix a bug with nested
anonymous structs/unions for -Wreorder; this last was PR6575.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3c3ccdbe73cb43bdf39a9102f5f7eb842fb71952 10-Apr-2010 John McCall <rjmccall@apple.com> Diagnose more cases of initializing distinct members of an anonymous union
member. Use a better diagnostic for this case. Also fix a bug with nested
anonymous structs/unions for -Wreorder; this last was PR6575.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
22afa4bde37ee17753101f3830f5903593938388 10-Apr-2010 John McCall <rjmccall@apple.com> Diagnose misordered initializers in constructor templates immediately instead of
when they're instantiated. Merge the note into the -Wreorder warning; it
doesn't really contribute much, and it was splitting a thought across diagnostics
anyway. Don't crash in the parser when a constructor's initializers end in a
comma and there's no body; the recovery here is still terrible, but anything's
better than a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d6ca8da0f5a4115813055729faaa5128e994806d 10-Apr-2010 John McCall <rjmccall@apple.com> Diagnose misordered initializers in constructor templates immediately instead of
when they're instantiated. Merge the note into the -Wreorder warning; it
doesn't really contribute much, and it was splitting a thought across diagnostics
anyway. Don't crash in the parser when a constructor's initializers end in a
comma and there's no body; the recovery here is still terrible, but anything's
better than a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5a8258076ffe50f595b593c8e0fb3773c857eb85 09-Apr-2010 Ted Kremenek <kremenek@apple.com> Remove copy of 'Optional' in Clang tree, and convert clients to use the one now in the LLVM tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
66d5142ab5026aa77ab6f1d7e4d9bdb0b438d55a 09-Apr-2010 Ted Kremenek <kremenek@apple.com> Remove copy of 'Optional' in Clang tree, and convert clients to use the one now in the LLVM tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
93c3df2694b2d8b59b9a8e6287ad56f2e752a3b6 09-Apr-2010 Ted Kremenek <kremenek@apple.com> Remove fixit for string literal comparison. Telling the user to use 'strcmp' is bad, and
we don't have enough information to tell them how to use 'strncmp'. Instead, change the
diagnostic to indicate they should use 'strncmp'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
03a4bee558b63ead66e942c6b26381df9a8b1754 09-Apr-2010 Ted Kremenek <kremenek@apple.com> Remove fixit for string literal comparison. Telling the user to use 'strcmp' is bad, and
we don't have enough information to tell them how to use 'strncmp'. Instead, change the
diagnostic to indicate they should use 'strncmp'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d2a205a6a0f5f8d6bfcc9c23dcfdc252bfe42932 09-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
c53e3658e667fed25d428d58204f295209b81d45 09-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
8d59c0029279004361496af14fa86775136997b8 09-Apr-2010 John McCall <rjmccall@apple.com> Argh, I modified the .inc file locally, not the .td.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
380509aa107c550d0e77ee2db4069e127709427c 09-Apr-2010 John McCall <rjmccall@apple.com> Argh, I modified the .inc file locally, not the .td.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
668fa2d5ad91a48c2fb2dc7c5f0ad3107ea4fcf3 09-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics like "initializing <type> from an expression of
type..." with "initializing <type> with an expression of type...",
which reads better. Thanks to John for the improved wording.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
08a41901e18aeb91b87d031b93df70374af02564 09-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics like "initializing <type> from an expression of
type..." with "initializing <type> with an expression of type...",
which reads better. Thanks to John for the improved wording.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b33ebd3aa2318ef1938cac5f5720f122342ff798 09-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression caused by implementing cstyle methods
for objc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
4ecb25fa94897b2c03510292acace710e5262ba5 09-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression caused by implementing cstyle methods
for objc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
06b452bc5cfcd82a80f49865500c8526fb9b4c15 09-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics when we fail to convert from a source type to a
destination type for initialization, assignment, parameter-passing,
etc. The main issue fixed here is that we used rather confusing
wording for diagnostics such as

t.c:2:9: warning: initializing 'char const [2]' discards qualifiers,
expected 'char *' [-pedantic]
char *name = __func__;
^ ~~~~~~~~

We're not initializing a 'char const [2]', we're initializing a 'char
*' with an expression of type 'char const [2]'. Similar problems
existed for other diagnostics in this area, so I've normalized them all
with more precise descriptive text to say what we're
initializing/converting/assigning/etc. from and to. The warning for
the code above is now:

t.c:2:9: warning: initializing 'char *' from an expression of type
'char const [2]' discards qualifiers [-pedantic]
char *name = __func__;
^ ~~~~~~~~

Fixes <rdar://problem/7447179>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d4eea8362605807327735727a9098abe1eb23b19 09-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics when we fail to convert from a source type to a
destination type for initialization, assignment, parameter-passing,
etc. The main issue fixed here is that we used rather confusing
wording for diagnostics such as

t.c:2:9: warning: initializing 'char const [2]' discards qualifiers,
expected 'char *' [-pedantic]
char *name = __func__;
^ ~~~~~~~~

We're not initializing a 'char const [2]', we're initializing a 'char
*' with an expression of type 'char const [2]'. Similar problems
existed for other diagnostics in this area, so I've normalized them all
with more precise descriptive text to say what we're
initializing/converting/assigning/etc. from and to. The warning for
the code above is now:

t.c:2:9: warning: initializing 'char *' from an expression of type
'char const [2]' discards qualifiers [-pedantic]
char *name = __func__;
^ ~~~~~~~~

Fixes <rdar://problem/7447179>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b223c6baa6596c5b021b09fe755277dd56b7fb67 09-Apr-2010 Ted Kremenek <kremenek@apple.com> For 'open' check in UnixAPIChecker, hard code value of 'O_CREAT' on Darwin.
This is still not an ideal solution, but should disable the check for other
targets where the value of O_CREAT is different.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
bace4ba042d87a0ed0ec15dbe6caad946b97bd33 09-Apr-2010 Ted Kremenek <kremenek@apple.com> For 'open' check in UnixAPIChecker, hard code value of 'O_CREAT' on Darwin.
This is still not an ideal solution, but should disable the check for other
targets where the value of O_CREAT is different.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
0a0e4f3037e67cb7713609ce301868e02633dd08 09-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Reorder diagnostics to separate the Sema::AssignmentAction diagnostics from other diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8804bdcac242741528036d7e62f26ae5b6a01261 09-Apr-2010 Douglas Gregor <dgregor@apple.com> Reorder diagnostics to separate the Sema::AssignmentAction diagnostics from other diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
70215ec6c46b8d5a701be9ce33e5a11d91d82d0e 08-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Downgrade the "declaration does not declare anything" error to a
warning. It's not harmful to have such pointless declarations, and GCC
does not diagnose this issue consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
cb821d045f5e445384f34d05a526955036073c4a 08-Apr-2010 Douglas Gregor <dgregor@apple.com> Downgrade the "declaration does not declare anything" error to a
warning. It's not harmful to have such pointless declarations, and GCC
does not diagnose this issue consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
5739fe3c388afdb288db79183b966aeb96dead6e 08-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Implement method type encoding in the presense
of c-style arguments. Completes radar 7445205.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7732cc9c0fdc97a2f8cce4e5933d8103213d1aef 08-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Implement method type encoding in the presense
of c-style arguments. Completes radar 7445205.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
bf8f5a373ea4441978b1aa732ddc25b26ba5576f 08-Apr-2010 Ted Kremenek <kremenek@apple.com> Match GCC's behavior and do not include '-Wunused-parameter' in '-Wunused'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
b4c0c2df7a40c753f2eddd8726f807877be4be07 08-Apr-2010 Ted Kremenek <kremenek@apple.com> Match GCC's behavior and do not include '-Wunused-parameter' in '-Wunused'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
638ae62141b81cbef0e6ba3a10464828129f9624 08-Apr-2010 Ted Kremenek <kremenek@apple.com> Include all warnings under '-Wunused' in '-Wmost' and '-Wall'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
e1fcf29951432de60e9fba243d500d069e929900 08-Apr-2010 Ted Kremenek <kremenek@apple.com> Include all warnings under '-Wunused' in '-Wmost' and '-Wall'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
7e3622c53566a4013476340cb09f39fd5c7b9caf 08-Apr-2010 Ted Kremenek <kremenek@apple.com> Sort entries in diagnostic group "Most".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
bbf3fe4852026548bbaeb1b4f92e936f6f3ab206 08-Apr-2010 Ted Kremenek <kremenek@apple.com> Sort entries in diagnostic group "Most".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
ad36d2fbfc683dfd22a2bef574320df5ab8e2747 08-Apr-2010 John McCall <rjmccall@apple.com> Maybe we should store template arguments in the position we allocated for them
instead of scribbling over random memory. Maybe.

Hopefully this fixes the -vg buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
33cab704d9b3b5b0218d578a20593bdfb0b1eb23 08-Apr-2010 John McCall <rjmccall@apple.com> Maybe we should store template arguments in the position we allocated for them
instead of scribbling over random memory. Maybe.

Hopefully this fixes the -vg buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
bb65e4697e4cc2e9014b3df33fc0ef721b5ccb94 08-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> Make CXXScopeSpec invalid when incomplete, and propagate that into any
Declarator that depends on it. This fixes several redundant errors and bad
recoveries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
9ab14541716928894821cf5d53d6b4c95ffdf3a3 08-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> Make CXXScopeSpec invalid when incomplete, and propagate that into any
Declarator that depends on it. This fixes several redundant errors and bad
recoveries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
ded708ad2f2931c5974a3254a9705408523d6a51 08-Apr-2010 John McCall <rjmccall@apple.com> Implement dependent friend function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclFriend.h
lang/AST/DeclTemplate.h
af2094e7cecadf36667deb61a83587ffdd979bd3 08-Apr-2010 John McCall <rjmccall@apple.com> Implement dependent friend function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclFriend.h
lang/AST/DeclTemplate.h
bc9820dd532c8e9fc7d5a6ab51566a640cd52780 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> Fronted: Kill overly specialized RecordLayoutDumper, just make -dump-record-layouts a bit that Sema honors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
b69eca5d2196c06870d3eeb62d689feebaaa8a4d 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> Fronted: Kill overly specialized RecordLayoutDumper, just make -dump-record-layouts a bit that Sema honors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
e41639e4277f1104b3a4d724c727645bda80231d 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Move C++ record layout dumping to ASTContext::DumpRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bf9e48cbaaa23d990dbedf9489513500bd0b9751 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Move C++ record layout dumping to ASTContext::DumpRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c18207ca266360c49f038ec6a41738d213ad436f 08-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement gcc's cstyle arguments in objc
methods. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
4f4fd92c6c64ecbc65507f63ddd09211f732622c 08-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement gcc's cstyle arguments in objc
methods. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
85c95262de036719f872ae38187d751e575df82e 08-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> When a template (without arguments) is passed as a template type
parameter, explicitly ask the user to give it arguments. We used to
complain that it wasn't a type and expect the user to figure it out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
lang/Basic/DiagnosticSemaKinds.td
db88d8ad74097e2601d81ee863ce46a8a48a7034 08-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> When a template (without arguments) is passed as a template type
parameter, explicitly ask the user to give it arguments. We used to
complain that it wasn't a type and expect the user to figure it out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
lang/Basic/DiagnosticSemaKinds.td
020ba89c2aa02c5b4f803a8a3a51d91971de2d3e 08-Apr-2010 Eric Christopher <echristo@apple.com> Add support for stpncpy_chk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
19063cda59391f92d1c717d0ca1d2de8ee9dc6fd 08-Apr-2010 Eric Christopher <echristo@apple.com> Add support for stpncpy_chk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
3b432a4a3971302608924758289cf4fe09f527f0 07-Apr-2010 Chris Lattner <sabre@nondot.org> add a new driver-level -ferror-limit=412 option, which causes clang to stop
emitting diagnostics after it has produced that many errors. Give this a
default value of 20 which produces plenty of errors for people to fix before
recompiling but not so many that their entire console scrolls away when the
compiler gets confused. The experience looks like this:

$ clang foo.c
<tons of crap>
foo.c:102:3: error: unknown type name 'somethingbad'
somethingbad x;
^
fatal error: too many errors emitted, stopping now
36 warnings and 20 errors generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
0f0c963f9b7ac6f0176c34d405d48fcb005dfab6 07-Apr-2010 Chris Lattner <sabre@nondot.org> add a new driver-level -ferror-limit=412 option, which causes clang to stop
emitting diagnostics after it has produced that many errors. Give this a
default value of 20 which produces plenty of errors for people to fix before
recompiling but not so many that their entire console scrolls away when the
compiler gets confused. The experience looks like this:

$ clang foo.c
<tons of crap>
foo.c:102:3: error: unknown type name 'somethingbad'
somethingbad x;
^
fatal error: too many errors emitted, stopping now
36 warnings and 20 errors generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
0f96ef65426bcb7db60a4f1d4ca31d90b46b0e5f 07-Apr-2010 Chris Lattner <sabre@nondot.org> add clang -cc1 level support for "-ferror-limit 42"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Driver/CC1Options.td
lang/Frontend/DiagnosticOptions.h
c100214fdc41a7ea215f75d433eb1cb829fd4330 07-Apr-2010 Chris Lattner <sabre@nondot.org> add clang -cc1 level support for "-ferror-limit 42"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Driver/CC1Options.td
lang/Frontend/DiagnosticOptions.h
d21b55fdf392a252af792758302512a52cd2341a 07-Apr-2010 Chris Lattner <sabre@nondot.org> add capabilities to stop emitting errors after some limit.
Right now the limit is 0 (aka disabled)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticCommonKinds.td
b205ac9fcd22b87b41697172d1983c5ae9dabaaf 07-Apr-2010 Chris Lattner <sabre@nondot.org> add capabilities to stop emitting errors after some limit.
Right now the limit is 0 (aka disabled)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticCommonKinds.td
e6c39d3a3e77c17bb9aa97be6e2e1ae2dbd654db 07-Apr-2010 Shih-wei Liao <sliao@google.com> libbcc

Change-Id: Ieaa3ebd5a38f370752495549f8870b534eeedfc5
MakeLists.txt
akefile
lang-c/Index.h
lang/AST/APValue.h
lang/AST/AST.h
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/ASTDiagnostic.h
lang/AST/ASTImporter.h
lang/AST/Attr.h
lang/AST/CXXInheritance.h
lang/AST/CanonicalType.h
lang/AST/CharUnits.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclContextInternals.h
lang/AST/DeclGroup.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/DeclVisitor.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/ExternalASTSource.h
lang/AST/FullExpr.h
lang/AST/NestedNameSpecifier.h
lang/AST/ParentMap.h
lang/AST/PrettyPrinter.h
lang/AST/RecordLayout.h
lang/AST/Redeclarable.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
lang/AST/StmtNodes.def
lang/AST/StmtObjC.h
lang/AST/StmtVisitor.h
lang/AST/TemplateBase.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/AST/TypeLocNodes.def
lang/AST/TypeLocVisitor.h
lang/AST/TypeNodes.def
lang/AST/TypeOrdering.h
lang/AST/TypeVisitor.h
lang/AST/UnresolvedSet.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/PrintfFormatString.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/AnalysisContext.h
lang/Analysis/AnalysisDiagnostic.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Support/BumpVector.h
lang/Analysis/Support/Optional.h
lang/Analysis/Support/SaveAndRestore.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Basic/Builtins.def
lang/Basic/Builtins.h
lang/Basic/BuiltinsPPC.def
lang/Basic/BuiltinsX86.def
lang/Basic/CMakeLists.txt
lang/Basic/ConvertUTF.h
lang/Basic/Diagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticAnalysisKinds.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/Linkage.h
lang/Basic/MacroBuilder.h
lang/Basic/Makefile
lang/Basic/OnDiskHashTable.h
lang/Basic/OperatorKinds.def
lang/Basic/OperatorKinds.h
lang/Basic/PartialDiagnostic.h
lang/Basic/PrettyStackTrace.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Basic/Specifiers.h
lang/Basic/TargetBuiltins.h
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
lang/Basic/TemplateKinds.h
lang/Basic/TokenKinds.def
lang/Basic/TokenKinds.h
lang/Basic/TypeTraits.h
lang/Basic/Version.h
lang/CMakeLists.txt
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Checker/Checkers/DereferenceChecker.h
lang/Checker/Checkers/LocalCheckers.h
lang/Checker/DomainSpecific/CocoaConventions.h
lang/Checker/ManagerRegistry.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRAuditor.h
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRExprEngineBuilders.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRStateTrait.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SummaryManager.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
lang/CodeGen/CodeGenOptions.h
lang/CodeGen/ModuleBuilder.h
lang/Driver/Action.h
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/CC1Options.h
lang/Driver/CC1Options.td
lang/Driver/CMakeLists.txt
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/DriverDiagnostic.h
lang/Driver/HostInfo.h
lang/Driver/Job.h
lang/Driver/Makefile
lang/Driver/OptParser.td
lang/Driver/OptSpecifier.h
lang/Driver/OptTable.h
lang/Driver/Option.h
lang/Driver/Options.h
lang/Driver/Options.td
lang/Driver/Phases.h
lang/Driver/Tool.h
lang/Driver/ToolChain.h
lang/Driver/Types.def
lang/Driver/Types.h
lang/Driver/Util.h
lang/Frontend/ASTConsumers.h
lang/Frontend/ASTUnit.h
lang/Frontend/Analyses.def
lang/Frontend/AnalysisConsumer.h
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/DeclContextXML.def
lang/Frontend/DeclXML.def
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/DiagnosticOptions.h
lang/Frontend/DocumentXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendDiagnostic.h
lang/Frontend/FrontendOptions.h
lang/Frontend/FrontendPluginRegistry.h
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/LangStandard.h
lang/Frontend/LangStandards.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/PreprocessorOptions.h
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/StmtXML.def
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/TypeXML.def
lang/Frontend/Utils.h
lang/Frontend/VerifyDiagnosticsClient.h
lang/Index/ASTLocation.h
lang/Index/Analyzer.h
lang/Index/CallGraph.h
lang/Index/DeclReferenceMap.h
lang/Index/Entity.h
lang/Index/GlobalSelector.h
lang/Index/Handlers.h
lang/Index/IndexProvider.h
lang/Index/Indexer.h
lang/Index/Program.h
lang/Index/STLExtras.h
lang/Index/SelectorMap.h
lang/Index/TranslationUnit.h
lang/Index/Utils.h
lang/Lex/DirectoryLookup.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/LexDiagnostic.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Lex/TokenConcatenation.h
lang/Lex/TokenLexer.h
lang/Makefile
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
lang/Parse/ParseDiagnostic.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Parse/Template.h
lang/Rewrite/DeltaTree.h
lang/Rewrite/HTMLRewrite.h
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
lang/Rewrite/TokenRewriter.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/ExternalSemaSource.h
lang/Sema/ParseAST.h
lang/Sema/SemaConsumer.h
lang/Sema/SemaDiagnostic.h
9c669c7b673233e4aac507ecb3daf6acdfc2fba7 07-Apr-2010 Chris Lattner <sabre@nondot.org> Instead of counting totally diagnostics, split the count into a count
of errors and warnings. This allows us to emit something like this:

2 warnings and 1 error generated.

instead of:

3 diagnostics generated.

This also stops counting 'notes' because they are just follow-on information
about the previous diag, not a diagnostic in themselves.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
53eee7ba970d21ff15bbd4334164037a3b4cc4b8 07-Apr-2010 Chris Lattner <sabre@nondot.org> Instead of counting totally diagnostics, split the count into a count
of errors and warnings. This allows us to emit something like this:

2 warnings and 1 error generated.

instead of:

3 diagnostics generated.

This also stops counting 'notes' because they are just follow-on information
about the previous diag, not a diagnostic in themselves.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
094cff43e20c7ec8017a377fc7730c7bd8b88512 07-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve handling of friend types in several ways:
- When instantiating a friend type template, perform semantic
analysis on the resulting type.
- Downgrade the errors concerning friend type declarations that do
not refer to classes to ExtWarns in C++98/03. C++0x allows
practically any type to be befriended, and ignores the friend
declaration if the type is not a class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
06245bfb3ae40bb24a8bfb17eafeb266a4daf5ca 07-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve handling of friend types in several ways:
- When instantiating a friend type template, perform semantic
analysis on the resulting type.
- Downgrade the errors concerning friend type declarations that do
not refer to classes to ExtWarns in C++98/03. C++0x allows
practically any type to be befriended, and ignores the friend
declaration if the type is not a class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7049bdd68f79ec4be2b00e4a8a5ce091839ddcee 07-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
74626d6ef2e194fcc911e071556660ff331eb4a8 07-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
eefdcb60d6b7c947ab7c05fd0002f5a238e49936 07-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> Deprecate CXXScopeSpec::isSet() in favor of isNotEmpty() or isValid().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
595f2698fe000b2c7703de8f6eafcd51366ec14a 07-Apr-2010 Jeffrey Yasskin <jyasskin@google.com> Deprecate CXXScopeSpec::isSet() in favor of isNotEmpty() or isValid().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
ae9aa4da09e5ffa4a3020851763bcf0d2670346f 07-Apr-2010 John McCall <rjmccall@apple.com> Check access for the implicit calls to destructors that occur when we
have a temporary object in C++.

Also fix a tag mismatch that Doug noticed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c91cc66e92b084acd1fdbaa1c3c74242741b3d46 07-Apr-2010 John McCall <rjmccall@apple.com> Check access for the implicit calls to destructors that occur when we
have a temporary object in C++.

Also fix a tag mismatch that Doug noticed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ec22ccda34f60d4f586cc8804fc7e520fb8c81b6 07-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Improve on diagnostics when an objc class is used as
a stand-alone type declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e9f5581ad479e2c53703d5799828399249a4be65 07-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Improve on diagnostics when an objc class is used as
a stand-alone type declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ddd166595956e228bf60dd7b2019065c46cb546b 07-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Implement code completion for Objective-C method declarations and
definitions, e.g., after

-

or

- (id)

we'll find all of the "likely" instance methods that one would want to
declare or define at this point. In the latter case, we only produce
results whose return types match "id".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e8f5a1710a7738deff40e10efcd05b1bd6af184f 07-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for Objective-C method declarations and
definitions, e.g., after

-

or

- (id)

we'll find all of the "likely" instance methods that one would want to
declare or define at this point. In the latter case, we only produce
results whose return types match "id".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7351ca993afc0c6cd622cf30808d298871ab083f 07-Apr-2010 John McCall <rjmccall@apple.com> Devote a special diagnostic to the typo
(void*) someFunction(5, 10, 15, 20);
where the cast is presumably meant to be to 'void'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
209acbd6d0c1b4444eb8c1682717753e1cbe38de 07-Apr-2010 John McCall <rjmccall@apple.com> Devote a special diagnostic to the typo
(void*) someFunction(5, 10, 15, 20);
where the cast is presumably meant to be to 'void'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e1cd8b0e2681559f4d085ac963606122d1891270 06-Apr-2010 John McCall <rjmccall@apple.com> Implement the protected access restriction ([class.protected]), which requires
that protected members be used on objects of types which derive from the
naming class of the lookup. My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclAccessPair.h
lang/AST/DeclCXX.h
lang/AST/DependentDiagnostic.h
lang/AST/Expr.h
lang/AST/UnresolvedSet.h
161755a09898c95d21bfff33707da9ca41cd53c5 06-Apr-2010 John McCall <rjmccall@apple.com> Implement the protected access restriction ([class.protected]), which requires
that protected members be used on objects of types which derive from the
naming class of the lookup. My first N attempts at this were poorly-founded,
largely because the standard is very badly worded here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclAccessPair.h
lang/AST/DeclCXX.h
lang/AST/DependentDiagnostic.h
lang/AST/Expr.h
lang/AST/UnresolvedSet.h
4dcf536e5962635a4d142254b6e9fbaded04ac78 06-Apr-2010 Chris Lattner <sabre@nondot.org> teach clang to install the inline asm diagnostic handler,
allowing backend errors to be mapped through clang's
diagnostics subsystem, including the backend location info.

We now get:

$ clang asm.c -c -o t.o -integrated-as
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
1 diagnostic generated.

With colors, and correct "# diagnostics generated".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
6da9eb661616ffd702deeb37e6872dd2294c8fef 06-Apr-2010 Chris Lattner <sabre@nondot.org> teach clang to install the inline asm diagnostic handler,
allowing backend errors to be mapped through clang's
diagnostics subsystem, including the backend location info.

We now get:

$ clang asm.c -c -o t.o -integrated-as
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
1 diagnostic generated.

With colors, and correct "# diagnostics generated".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
a48848339a02b2830dfd40d5684e3084046d4b79 06-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Make code-completion for Objective-C message sends to "id" work in the
presence of precompiled headers by forcibly loading all of the
methods we know about from the PCH file before constructing our
code-completion list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
719770dcfcb3987e8a2377dcca97955301445eb5 06-Apr-2010 Douglas Gregor <dgregor@apple.com> Make code-completion for Objective-C message sends to "id" work in the
presence of precompiled headers by forcibly loading all of the
methods we know about from the PCH file before constructing our
code-completion list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
1a4ec81e504391316c55160ea8f138a1a7423432 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
deciding when we need to emit an extra "command failed" diagnostic.
- This also fixes the case where we were emitting that extra diagnostics, even
when using clang w/ the integrated assembler, which has good diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
60a53f24b160724de0e8dd0e142009981540fd26 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
deciding when we need to emit an extra "command failed" diagnostic.
- This also fixes the case where we were emitting that extra diagnostics, even
when using clang w/ the integrated assembler, which has good diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
c7e067ddabdbf39335bdb2325abbc708cbd59e5e 06-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Make Diagnostic reference-counted, which is simpler than juggling
maybe-ownership vs. ownership.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
28019772db70d4547be05a042eb950bc910f134f 06-Apr-2010 Douglas Gregor <dgregor@apple.com> Make Diagnostic reference-counted, which is simpler than juggling
maybe-ownership vs. ownership.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
lang/Frontend/CompilerInstance.h
efe6c6158b22d5e04dfea48037d7a2f16bd10e3d 05-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Extend the type printing policy to allow one to turn off the printing
of file locations for anonymous tag types (e.g., "enum <anonymous at
t.h:15:6>"), which can get rather long.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
84139d6ef8967cfdb70d37378a7a65cc4827d44d 05-Apr-2010 Douglas Gregor <dgregor@apple.com> Extend the type printing policy to allow one to turn off the printing
of file locations for anonymous tag types (e.g., "enum <anonymous at
t.h:15:6>"), which can get rather long.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
0f3039072ad62586586cbef5a24faee2f1bcfd1c 05-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Clarify the ownership semantics of the Diagnostic object used by
ASTUnit. Previously, we would end up with use-after-free errors
because the Diagnostic object would be creating in one place (say,
CIndex) and its ownership would not be transferred into the
ASTUnit. Fixes <rdar://problem/7818608>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
3687e9d3a5dbfa9963af02a49a2b139d91310813 05-Apr-2010 Douglas Gregor <dgregor@apple.com> Clarify the ownership semantics of the Diagnostic object used by
ASTUnit. Previously, we would end up with use-after-free errors
because the Diagnostic object would be creating in one place (say,
CIndex) and its ownership would not be transferred into the
ASTUnit. Fixes <rdar://problem/7818608>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
e16de65fbe68aa6f063c51ea3d7cd8e1c3bd7e2a 05-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Make the ASTUnit constructor private; all ASTUnit clients should be using the static factory functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
8b96253907c47141af0b7b2a44a368748d006a87 05-Apr-2010 Douglas Gregor <dgregor@apple.com> Make the ASTUnit constructor private; all ASTUnit clients should be using the static factory functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
78a15014492f018930aaf30820095d15d3904fe7 05-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6782, an accept invalid. We weren't emitting the diagnostic
returned by SetTypeSpecType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5c5db553b5c256d0a6f55dde7325c1c829b88e8e 05-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6782, an accept invalid. We weren't emitting the diagnostic
returned by SetTypeSpecType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
ae380213277a4a1ee0ee0dd751434c4c51948992 05-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Minor ASTUnit cleanups:
- Rename "Diagnostics" and related to "StoredDiagnostics", to better
capture what we're actually storing.
- Move SourceManager and FileManager to the heap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
405634b215f19eec7183bd8005e34aa5a02f64a1 05-Apr-2010 Douglas Gregor <dgregor@apple.com> Minor ASTUnit cleanups:
- Rename "Diagnostics" and related to "StoredDiagnostics", to better
capture what we're actually storing.
- Move SourceManager and FileManager to the heap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
6c4e7875b76f4ab0709d008ade4c883ee61c75be 03-Apr-2010 Eric Christopher <echristo@apple.com> Add option and macro definition for AES instructions. Now produces real
assembly for testcases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
eea12d17ec3527f4f9474571fd3011f3d825c45a 03-Apr-2010 Eric Christopher <echristo@apple.com> Add option and macro definition for AES instructions. Now produces real
assembly for testcases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
7e86fd6efe84041e686c23a707cd1b4890abc9da 03-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnosing when a method type does not start with '-'|'+'
when parsing. Fixes radar 7822196.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
05511fa6349ef0820a778f8c840d0b64e05e9aee 03-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnosing when a method type does not start with '-'|'+'
when parsing. Fixes radar 7822196.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
eaa54658da013e6191210ca3598ba13e3f6a7f2b 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Add ObjCIvarDecl::getContainingInterface().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
27a961a6adab85cfcf7e48485bbec9237719ae96 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Add ObjCIvarDecl::getContainingInterface().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d75d12a3c9260109eae7e197fe1e543854f34461 02-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> diagnose declaring class extension after its implementation
(radar 7822210).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
24e14089cc509ff48cf7f1e6f4f9070803dd739b 02-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> diagnose declaring class extension after its implementation
(radar 7822210).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6b63ce63213dd5938d5ef862d112a5c61cdb7a9e 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> Sema/Obj-C: Narrow type of ObjCIvarDecl::Create, and check additional invariants on the provided DeclContext.
- Doug, please see the FIXME in DeclObjC.cpp -- I am not sure what the right fix is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a06549226f45d5b72169a3d054415616dd1014a2 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> Sema/Obj-C: Narrow type of ObjCIvarDecl::Create, and check additional invariants on the provided DeclContext.
- Doug, please see the FIXME in DeclObjC.cpp -- I am not sure what the right fix is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0fedc2fc0a4dc1cf55ece57b339ca0e20d342ff0 02-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Rework our handling of copy construction of temporaries, which was a
poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.

The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.

This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.

Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2f59979a7cc7929f53c9984423b0abeb83113442 02-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of copy construction of temporaries, which was a
poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.

The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.

This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.

Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8edbcc8c7084a7311da0ba56df59c758bed0db87 02-Apr-2010 Chandler Carruth <chandlerc@gmail.com> Resolve a layering violation by making AddTaggedVal public for
PartialDiagnostic objects, and hoisting the stream operator for QualType into
Type.h with the operator for the normal DiagnosticBuilder. Also remove the no
longer needed friend declaration for the DeclarationName stream operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/Type.h
lang/Basic/PartialDiagnostic.h
47c24b1d94f446c43e3a64732867eabed7d9c961 02-Apr-2010 Chandler Carruth <chandlerc@gmail.com> Resolve a layering violation by making AddTaggedVal public for
PartialDiagnostic objects, and hoisting the stream operator for QualType into
Type.h with the operator for the normal DiagnosticBuilder. Also remove the no
longer needed friend declaration for the DeclarationName stream operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/Type.h
lang/Basic/PartialDiagnostic.h
d6fca263d64854e60e33f3850ef421e25c18a526 01-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Overhaul checking of non-type template arguments that should refer to
an object or function. Our previous checking was too lax, and ended up
allowing missing or extraneous address-of operators, among other
evils. The new checking provides better diagnostics and adheres more
closely to the standard.

Fixes PR6563 and PR6749.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b7a09260204f2079e0f998bf7ee52b95122a4c5d 01-Apr-2010 Douglas Gregor <dgregor@apple.com> Overhaul checking of non-type template arguments that should refer to
an object or function. Our previous checking was too lax, and ended up
allowing missing or extraneous address-of operators, among other
evils. The new checking provides better diagnostics and adheres more
closely to the standard.

Fixes PR6563 and PR6749.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dd5363786ff4332ede0ec9794026fce405e13503 01-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
Clang++ support, even in "Production" mode (for testing purposes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
5d93ed3c7a2dae0a8f422747e269963b3ef11d95 01-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
Clang++ support, even in "Production" mode (for testing purposes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
90c191356f559f7c2b678545e48f0ba8a7fc996c 01-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Initial support for visiting CXXMemberCallExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
950db87e5efe2ff0c7234116929f8637aaf7ae7a 01-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> Initial support for visiting CXXMemberCallExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
5aee3992690f4223477053791146555a06922974 01-Apr-2010 Eric Christopher <echristo@apple.com> First start at wmmintrin.h file with Intel AES-NI instructions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
33c903208e8e2f91b8986b0ba7e5f7e077398ea6 01-Apr-2010 Eric Christopher <echristo@apple.com> First start at wmmintrin.h file with Intel AES-NI instructions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
9feb1a3680892a470ae5744ad95be2f61ad9a1be 01-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics when an elaborated-type-specifer containing a
nested-name-specifier (e.g., "class T::foo") fails to find a tag
member in the scope nominated by the
nested-name-specifier. Previously, we gave a bland

error: 'Nested' does not name a tag member in the specified scope

which didn't actually say where we were looking, which was rather
horrible when the nested-name-specifier was instantiated. Now, we give
something a bit better:

error: no class named 'Nested' in 'NoDepBase<T>'




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1eabb7d0c30f6a876b0fd03ad4656c096c26b8d0 01-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics when an elaborated-type-specifer containing a
nested-name-specifier (e.g., "class T::foo") fails to find a tag
member in the scope nominated by the
nested-name-specifier. Previously, we gave a bland

error: 'Nested' does not name a tag member in the specified scope

which didn't actually say where we were looking, which was rather
horrible when the nested-name-specifier was instantiated. Now, we give
something a bit better:

error: no class named 'Nested' in 'NoDepBase<T>'




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ec6d392c816684e9679a3d04f742fa3991f5fe1e 01-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Change the representation of dependent elaborated-type-specifiers
(such as "class T::foo") from an ElaboratedType of a TypenameType to a
DependentNameType, which more accurately models the underlying
concept.

Improve template instantiation for DependentNameType nodes that
represent nested-name-specifiers, by performing tag name lookup and
checking the resulting tag appropriately. Fixes PR5681.

There is still much testing and cleanup to do in this area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4033642464e8ba0982f88f34cffad808d247b393 01-Apr-2010 Douglas Gregor <dgregor@apple.com> Change the representation of dependent elaborated-type-specifiers
(such as "class T::foo") from an ElaboratedType of a TypenameType to a
DependentNameType, which more accurately models the underlying
concept.

Improve template instantiation for DependentNameType nodes that
represent nested-name-specifiers, by performing tag name lookup and
checking the resulting tag appropriately. Fixes PR5681.

There is still much testing and cleanup to do in this area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ca7a15360ebda535be0f3281baf6bd4310b9b6d4 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Extend DependentNameType with a keyword enum that specifies whether
this was parsed as a typename-specifier, elaborated-type-specifier
(including the kind), or just a dependent qualified type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
4a2023f5014e82389d5980d307b89c545dbbac81 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Extend DependentNameType with a keyword enum that specifies whether
this was parsed as a typename-specifier, elaborated-type-specifier
(including the kind), or just a dependent qualified type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
09cd869ae61b2fea52dfba48ffb897c06cb90d72 31-Mar-2010 Ted Kremenek <kremenek@apple.com> For reverse data flow analyses, enqueue the blocks in reverse order.
This more likely matches with the ideal order the blocks should be visited.
This shaves another 1% off the -fsyntax-only time for compare.c (403.gcc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
0798df70753a5feee0e79f2b51f3d4f50127325d 31-Mar-2010 Ted Kremenek <kremenek@apple.com> For reverse data flow analyses, enqueue the blocks in reverse order.
This more likely matches with the ideal order the blocks should be visited.
This shaves another 1% off the -fsyntax-only time for compare.c (403.gcc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
0d2aaec3c0c7e5b992f1c4fc083a673ec48da495 31-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements gcc's -Wno-protocol option to suppress warning
on unimplemented methods in protocols adopted by a class.
(radar 7056600).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
521468391c0abbbfcf6b257442630c70314b8576 31-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements gcc's -Wno-protocol option to suppress warning
on unimplemented methods in protocols adopted by a class.
(radar 7056600).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
387b0fc2d81da3b564801d77e2f20681ee868887 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Remove the AST statistics tracking I added yesterday; it didn't pan out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Statistics.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtObjC.h
lang/AST/Type.h
db2eb5abf4c082d1f0c5c45e39d8cd0300f81e38 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Remove the AST statistics tracking I added yesterday; it didn't pan out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Statistics.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtObjC.h
lang/AST/Type.h
23e07b259ca8de7666d30f2116bf143fe2e8bc00 31-Mar-2010 Ted Kremenek <kremenek@apple.com> Tweak DataFlowSolver's worklist data structure to have an ordered worklist
and a DenseSet for caching instead of using a single SmallPtrSet.
This makes the behavior of the DataFlowSolver more deterministic, and
reduces the -fsyntax-only time on compare.c (403.gcc) by 1%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
2405a0addc2bc627392d9bfe2874bd9431d81d55 31-Mar-2010 Ted Kremenek <kremenek@apple.com> Tweak DataFlowSolver's worklist data structure to have an ordered worklist
and a DenseSet for caching instead of using a single SmallPtrSet.
This makes the behavior of the DataFlowSolver more deterministic, and
reduces the -fsyntax-only time on compare.c (403.gcc) by 1%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
b88ea9f1d1a402b0c9479c1c71a10cf65a5d4157 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate my CodeModificationHint -> FixItHint renaming patch, without
the C-only "optimization".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
849b243d4065f56742a4677d6dc8277609a151f8 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Reinstate my CodeModificationHint -> FixItHint renaming patch, without
the C-only "optimization".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
725b41e4eefc6d19b6215f24489acbc2e1641765 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Rename TypenameType to DependentNameType in anticipation of some
refactoring work in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/TypeXML.def
4714c12a1ab759156b78be8f109ea4c12213af57 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Rename TypenameType to DependentNameType in anticipation of some
refactoring work in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/TypeXML.def
100fdef5f9490615be95cc921c88cdba11c36d85 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Statistics.h
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
275313cbb0847f1f117f60d144d113804d4fa42d 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Statistics.h
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
e885f84e7a6e363a54b9100afd1c63364808d959 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Statistics.h
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
d0ebe080eee7c37e73754068b47fd90cc506e128 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Statistics.h
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
4928202296dbc7758e73536e5a57f2f432683292 31-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Minor include pruning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
6876fe615e16b0e76c7711e129e470305b7e9d41 31-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Minor include pruning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
a2a6e958853d61c9bcd6d613697339936e3356d9 31-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Define "exploded graph" by reference to a paper.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ExplodedGraph.h
b2213dc3dd8f58b611b91d2fce4834a767efcba7 31-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Define "exploded graph" by reference to a paper.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/ExplodedGraph.h
504813dc37b3b584f722ac1acdb3d2e64c78998f 31-Mar-2010 John McCall <rjmccall@apple.com> Regularize support for naming conversion functions in using decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
32daa4223ccb2c0afe5fbe151c6eb1ab64816957 31-Mar-2010 John McCall <rjmccall@apple.com> Regularize support for naming conversion functions in using decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
27160d35e436d2611ade7eb76d31da99b38a32ac 31-Mar-2010 John McCall <rjmccall@apple.com> Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
23cba801e11b03929c44f8cf54578305963a3476 31-Mar-2010 John McCall <rjmccall@apple.com> Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b7862e44093d09c495b8656269152c5c5d4a1148 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> Formatting tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
69d66b28dc953ae7c2c0b877c78ccd9c691b44f1 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> Formatting tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2ffdc0f8242c22c4bca8bbc2390be61a8a80e4b8 31-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Remember the regparm attribute in FunctionType::ExtInfo.
Fixes PR3782.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
425ef72306d4ff6b3698b744353e5f0e56b4b884 31-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Remember the regparm attribute in FunctionType::ExtInfo.
Fixes PR3782.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
0c525edf14d4cf5aaf8f6954433c0476d0bc6a65 30-Mar-2010 John McCall <rjmccall@apple.com> Propagate the "found declaration" (i.e. the using declaration instead of
the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation. This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.

This allows us to complete an access-controlled selfhost, if there are no
recent regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6bb8017bb9e828d118e15e59d71c66bba323c364 30-Mar-2010 John McCall <rjmccall@apple.com> Propagate the "found declaration" (i.e. the using declaration instead of
the underlying/instantiated decl) through a lot of API, including "intermediate"
MemberExprs required for (e.g.) template instantiation. This is necessary
because of the access semantics of member accesses to using declarations:
only the base class *containing the using decl* need be accessible from the
naming class.

This allows us to complete an access-controlled selfhost, if there are no
recent regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1fcc6d593c85584900a084a3c584237f1b123ab1 30-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics when printing a template instantiation backtrace
involving substitution of deduced template arguments into a class
template partial specialization or function template, or when
substituting explicitly-specific template arguments into a function
template. We now print the actual deduced argument bindings so the
user can see what got deduced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5e40291d13ed2d7711235df947a2a18a925c7536 30-Mar-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics when printing a template instantiation backtrace
involving substitution of deduced template arguments into a class
template partial specialization or function template, or when
substituting explicitly-specific template arguments into a function
template. We now print the actual deduced argument bindings so the
user can see what got deduced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
433d7d2c70b9be3f9edd40579f512ecab8755049 30-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> the big refactoring bits of PR3782.

This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/ExprCXX.h
lang/AST/Type.h
264ba48dc98f3f843935a485d5b086f7e0fdc4f1 30-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> the big refactoring bits of PR3782.

This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/ExprCXX.h
lang/AST/Type.h
eb6c0f92e1ddc70ccce0c7ee92666a816773493d 30-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce new AST statistics that keep track of the number of isa (or
dyn_cast) invocations for C++ and Objective-C types, declarations,
expressions, and statements. The statistics will be printed when
-print-stats is provided to Clang -cc1, with results such as:

277073 clang - Number of checks for C++ declaration nodes
13311 clang - Number of checks for C++ expression nodes
18 clang - Number of checks for C++ statement nodes
174182 clang - Number of checks for C++ type nodes
92300 clang - Number of checks for Objective-C declaration nodes
9800 clang - Number of checks for Objective-C expression nodes
7 clang - Number of checks for Objective-C statement nodes
65733 clang - Number of checks for Objective-C type nodes

The statistics are only gathered when NDEBUG is not defined, since
they introduce potentially-expensive operations into very low-level
routines (isa).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Statistics.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtObjC.h
lang/AST/Type.h
f540305c5d834ad9412b41805b81a74249b7c5af 30-Mar-2010 Douglas Gregor <dgregor@apple.com> Introduce new AST statistics that keep track of the number of isa (or
dyn_cast) invocations for C++ and Objective-C types, declarations,
expressions, and statements. The statistics will be printed when
-print-stats is provided to Clang -cc1, with results such as:

277073 clang - Number of checks for C++ declaration nodes
13311 clang - Number of checks for C++ expression nodes
18 clang - Number of checks for C++ statement nodes
174182 clang - Number of checks for C++ type nodes
92300 clang - Number of checks for Objective-C declaration nodes
9800 clang - Number of checks for Objective-C expression nodes
7 clang - Number of checks for Objective-C statement nodes
65733 clang - Number of checks for Objective-C type nodes

The statistics are only gathered when NDEBUG is not defined, since
they introduce potentially-expensive operations into very low-level
routines (isa).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Statistics.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtObjC.h
lang/AST/Type.h
8b4dd8d60bb7f244c084c62d42b2ad3f0d46f9fd 30-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Add Support for 'warn_unused_result" attribute on
objective-c methods. (radar 7418262).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f031774aa2638b4d3f487e7e44180c1f89b867ef 30-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Add Support for 'warn_unused_result" attribute on
objective-c methods. (radar 7418262).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
da13b9eab70e530806bd2a57e44c854a25b96017 30-Mar-2010 Daniel Dunbar <daniel@zuster.org> Fix FileEntry declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Lex/PreprocessorLexer.h
0cc70f1586874aed3337c57cb255b112cdac0948 30-Mar-2010 Daniel Dunbar <daniel@zuster.org> Fix FileEntry declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Lex/PreprocessorLexer.h
2ff387f58d91043f1651c01a117482b5fe79985d 30-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> When copying a partial diagnostic into a DependentDiagnostic, allocate
storage for that partial diagnostic via the ASTContext's
BumpPtrAllocator rather than using up slots in the ASTContext's
cache. Now that we do this, we don't have to worry about destroying
dependent diagnostics when destroying a DependentStoredDeclsMap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/AST/DependentDiagnostic.h
lang/Basic/PartialDiagnostic.h
b836518bfc0a2ad5e22a670c82fa070ed83ea909 30-Mar-2010 Douglas Gregor <dgregor@apple.com> When copying a partial diagnostic into a DependentDiagnostic, allocate
storage for that partial diagnostic via the ASTContext's
BumpPtrAllocator rather than using up slots in the ASTContext's
cache. Now that we do this, we don't have to worry about destroying
dependent diagnostics when destroying a DependentStoredDeclsMap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/AST/DependentDiagnostic.h
lang/Basic/PartialDiagnostic.h
8072597e1d95bcd34bf81697f2eeff70c1a54909 30-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Optimize PartialDiagnostic's memory-allocation behavior by placing a
cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.

Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.

Fixes <rdar://problem/7806091>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/PartialDiagnostic.h
fe6b2d481d91140923f4541f273b253291884214 30-Mar-2010 Douglas Gregor <dgregor@apple.com> Optimize PartialDiagnostic's memory-allocation behavior by placing a
cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.

Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.

Fixes <rdar://problem/7806091>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/PartialDiagnostic.h
5755054fae2f0e8c32dbbe90d9232f793dfee25a 29-Mar-2010 Chris Lattner <sabre@nondot.org> add support for -MQ flag to quote targets in dependency file,
PR6661, patch by Ori Avtalion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/CC1Options.td
3edbeb78fe5ea7fffea7a94575478cde19e830e0 29-Mar-2010 Chris Lattner <sabre@nondot.org> add support for -MQ flag to quote targets in dependency file,
PR6661, patch by Ori Avtalion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/CC1Options.td
4a47dbe2988978fb5f6316fe82a34174ffee61a5 29-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Support __attribute__((packed)) (along with other attributes) at the
end of a struct/class/union in C++, from Justin Bogner!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0b4c9b5834a0a5520d2cd32227a53cf7f73fedca 29-Mar-2010 Douglas Gregor <dgregor@apple.com> Support __attribute__((packed)) (along with other attributes) at the
end of a struct/class/union in C++, from Justin Bogner!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
fdee3fd78798a34a1b2215f48199196c1fb0ad3a 29-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Be a bit more consistent in using operator->

This patch moves some methods from QualType to Type and changes the users to
use -> instead of .



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
802c66edc5073991f2315ea84ecace1867c6027f 29-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Be a bit more consistent in using operator->

This patch moves some methods from QualType to Type and changes the users to
use -> instead of .



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5f97216a4559c9219095ffe4849ce4b8e363961b 29-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Make default arguments to getFunctionNoProtoType an all or nothing option (as they already are in practise).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6a6aa53ec6c89ae0881309b0a0dd84b6868b576b 29-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Make default arguments to getFunctionNoProtoType an all or nothing option (as they already are in practise).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
99643944ad6b889d382f7ea56d6f8e3cdc3b25b3 29-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Drop default arguments no one is using.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1279deea7981fc66adeb941aa08f2753c096684c 29-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Drop default arguments no one is using.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0672dde9c095c3e894519ed66aed2bfff9fbf250 28-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> After performing template argument deduction for a function template,
check deduced non-type template arguments and template template
arguments against the template parameters for which they were deduced,
performing conversions as appropriate so that deduced template
arguments get the same treatment as explicitly-specified template
arguments. This is the bulk of PR6723.

Also keep track of whether deduction of a non-type template argument
came from an array bound (vs. anywhere else). With this information,
we enforce C++ [temp.deduct.type]p17, which requires exact type
matches when deduction deduces a non-type template argument from
something that is not an array bound.

Finally, when in a SFINAE context, translate the "zero sized
arrays are an extension" extension diagnostic into a hard error (for
better standard conformance), which was a minor part of PR6723.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
02024a9f0d8e6c898de276193af604c42ee41269 28-Mar-2010 Douglas Gregor <dgregor@apple.com> After performing template argument deduction for a function template,
check deduced non-type template arguments and template template
arguments against the template parameters for which they were deduced,
performing conversions as appropriate so that deduced template
arguments get the same treatment as explicitly-specified template
arguments. This is the bulk of PR6723.

Also keep track of whether deduction of a non-type template argument
came from an array bound (vs. anywhere else). With this information,
we enforce C++ [temp.deduct.type]p17, which requires exact type
matches when deduction deduces a non-type template argument from
something that is not an array bound.

Finally, when in a SFINAE context, translate the "zero sized
arrays are an extension" extension diagnostic into a hard error (for
better standard conformance), which was a minor part of PR6723.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
13c60517b38e70784e44a38c0c716258615001e2 27-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Checker: random include cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/DomainSpecific/CocoaConventions.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
5e2d2c2ee3cf410643e0f9a5701708e51409d973 27-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Checker: random include cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/DomainSpecific/CocoaConventions.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
5aaa6056a54d4c14f54e8292c90955e08c19076f 27-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics on incomplete implementation
of objc classes; including which methods
need be implemented and where they come from.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8822f7cda557ffa755c16b5c978dada23c37d6be 27-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics on incomplete implementation
of objc classes; including which methods
need be implemented and where they come from.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8b8e3a0b7b60524a996f116ff60a2915f92e12db 27-Mar-2010 John McCall <rjmccall@apple.com> Implement method friends in class templates and fix a few related problems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
b0cb022daec8671406ab25f4b5d5a6d48d823bc4 27-Mar-2010 John McCall <rjmccall@apple.com> Implement method friends in class templates and fix a few related problems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
311fb48404a66a9dc0bcdb54f214a7c819c94de8 27-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix comparison in isDiagnosticInFlight().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
5800f7ea9cf5621280089d690f677bd28064d6b5 27-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix comparison in isDiagnosticInFlight().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
28fcab4e3ea33b0c4ec03e97ca3e0c063a6f040c 26-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> No need to specify ${CMAKE_CURRENT_BINARY_DIR}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
lang/Driver/CMakeLists.txt
67e170623f51457a8edd045be95db43342424f2e 26-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> No need to specify ${CMAKE_CURRENT_BINARY_DIR}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
lang/Driver/CMakeLists.txt
0b78b4be04aa2e9776faae391694b7dd147d7409 26-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate change to non-type template arguments of integral type, so
that we extend/truncate then correct the sign to convert the non-type
template argument to the template parameter's type. Previously, we
reported an error when the non-type template argument was out of
range; now we just warn.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1a6e03457ebafd6ac523cdcf5d6b6f411ea08772 26-Mar-2010 Douglas Gregor <dgregor@apple.com> Reinstate change to non-type template arguments of integral type, so
that we extend/truncate then correct the sign to convert the non-type
template argument to the template parameter's type. Previously, we
reported an error when the non-type template argument was out of
range; now we just warn.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
53e3c53565d28d6de1129cad9d936693d84ac699 26-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Revert attempted fix for integral template arguments. It seems to have broken tramp3d-v4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0d4fd8ef35ecd73ce6388cb5a6fdcfb15171f5aa 26-Mar-2010 Douglas Gregor <dgregor@apple.com> Revert attempted fix for integral template arguments. It seems to have broken tramp3d-v4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
64ac3debd659a8afb761bd926474a27b7344ff5e 25-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Warn when the conversion of an integral non-type template argument to
the type of its corresponding non-type template parameter changes the
value. Previously, we were diagnosing this as an error, which was
wrong. We give reasonably nice warnings like:

test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template
argument value '256' truncated to '0' for template parameter of type
'unsigned char'
Overflow<256> *overflow3; // expected-warning{{non-type template ...
^~~
test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is
declared here
template<unsigned char C> struct Overflow;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
684d096c204c5eef29c10777bce890400d235d8c 25-Mar-2010 Douglas Gregor <dgregor@apple.com> Warn when the conversion of an integral non-type template argument to
the type of its corresponding non-type template parameter changes the
value. Previously, we were diagnosing this as an error, which was
wrong. We give reasonably nice warnings like:

test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template
argument value '256' truncated to '0' for template parameter of type
'unsigned char'
Overflow<256> *overflow3; // expected-warning{{non-type template ...
^~~
test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is
declared here
template<unsigned char C> struct Overflow;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
78dc67e0d8836ec6de51c3091fd5bd0314b076f1 25-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Teach the diagnostic engine to provide more detailed information about
how to handle a diagnostic during template argument deduction, which
may be "substitution failure", "suppress", or "report". This keeps us
from, e.g., emitting warnings while performing template argument
deduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
eab5d1eaaa662c849f1f9920dc8c6a31d7c32d47 25-Mar-2010 Douglas Gregor <dgregor@apple.com> Teach the diagnostic engine to provide more detailed information about
how to handle a diagnostic during template argument deduction, which
may be "substitution failure", "suppress", or "report". This keeps us
from, e.g., emitting warnings while performing template argument
deduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
65996191d65b20494b4015b62642b0eff5675617 25-Mar-2010 John McCall <rjmccall@apple.com> Preserve type-source information in friend declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
lang/AST/DeclTemplate.h
32f2fb53d9d7c28c94d8569fd0fcf06cccee0c3d 25-Mar-2010 John McCall <rjmccall@apple.com> Preserve type-source information in friend declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclFriend.h
lang/AST/DeclTemplate.h
d39a5e7bb75d659025762c035dade1bfc2dddd2a 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> Remove support for nand atomic builtins. They are inconsistently implemented in
gcc, and the common expectation seems to be that they are unused. If and when
someone cares we can add them back with well documented demantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
7eff7c4153faf45b19b5919ef409ee5f6794eb25 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> Remove support for nand atomic builtins. They are inconsistently implemented in
gcc, and the common expectation seems to be that they are unused. If and when
someone cares we can add them back with well documented demantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
9913fcc2f352c63ea536aa5e1ecd5aabb76e4234 25-Mar-2010 Nuno Lopes <nunoplopes@sapo.pt> add dump() method to CanQual for debugging purposes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
d9ab76bbce7b8a563aa847cfcdcd39d8280f11bd 25-Mar-2010 Nuno Lopes <nunoplopes@sapo.pt> add dump() method to CanQual for debugging purposes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
0644185341f61f750582fff16d7331a3c431e4cf 25-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a utility method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SymbolManager.h
ef0df6a1c2a626f69dc11519cf88a50ca321065d 25-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a utility method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SymbolManager.h
dcebee4d43840bfac05064f12906f659b0eeb79d 25-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix two bugs in format-string checking:
(1) Do not assume the data arguments start after the format string
(2) Do not use the fact that a function is variadic to treat it like a va_list printf function

Fixes PR 6697.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6ee765348b2855c702fa593fb030ef6abe0d01f6 25-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix two bugs in format-string checking:
(1) Do not assume the data arguments start after the format string
(2) Do not use the fact that a function is variadic to treat it like a va_list printf function

Fixes PR 6697.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ac68a6884387554fb9bc0c779fcd77eaf6f9cdc5 25-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add methods to remove a GDM entry.
Instead of setting the ReturnExpr GDM to NULL, remove it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
0541d106eae48f4238097df03a72028a610e0dce 25-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add methods to remove a GDM entry.
Instead of setting the ReturnExpr GDM to NULL, remove it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
206a832dc8160b8a231cc0198087bb54e0d8564f 24-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Control warnings about GNU extensions with -Wgnu, which has a subgroup
for GNU designated-initializer syntax (-Wgnu-designator).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
02668985d9ae546ab391740a66fa498ebac09874 24-Mar-2010 Douglas Gregor <dgregor@apple.com> Control warnings about GNU extensions with -Wgnu, which has a subgroup
for GNU designated-initializer syntax (-Wgnu-designator).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
16d4b975a57ec29128a54004ed0ec65eaf776670 24-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Implement support for -nostdc++. Fixes PR6446.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/HeaderSearchOptions.h
4c2bcad7b843c10fd4a2ffd43da40bfefb4dc8ba 24-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement support for -nostdc++. Fixes PR6446.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/HeaderSearchOptions.h
8d0e4cc4025742275594c78744bfc7ce7b267419 24-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics when ivar added to class
extension (radar 6812436).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f3c0bd58400b5a84d16376436e40af79e2d7b105 24-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics when ivar added to class
extension (radar 6812436).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
98a1dadea132c8f5ba6c90f8ba8d262d11e04b39 24-Mar-2010 John McCall <rjmccall@apple.com> Support friend function specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7ad650f88ecbbe659f10f9f6b34a1f29ea9cf8f9 24-Mar-2010 John McCall <rjmccall@apple.com> Support friend function specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
490a4b524bc8ec4bf23fa20e4b7173135fda7e91 24-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> When a declaration of a function is missing an exception specification
that was present in a prior declaration, emit a warning rather than a
hard error (which we did before, and still do with mismatched
exception specifications). Moreover, provide a fix-it hint with the
throw() clause that should be added, e.g.,

t.C:10:7: warning: 'operator new' is missing exception specification
'throw(std::bad_alloc)'
void *operator new(unsigned long sz)
^
throw(std::bad_alloc)

As part of this, disable the warning when we're missing an exception
specification on operator new, operator new[], operator delete, or
operator delete[] when exceptions are turned off (-fno-exceptions).

Fixes PR5957.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
2eef829b19bdc59976a827fa39b409440e352bff 24-Mar-2010 Douglas Gregor <dgregor@apple.com> When a declaration of a function is missing an exception specification
that was present in a prior declaration, emit a warning rather than a
hard error (which we did before, and still do with mismatched
exception specifications). Moreover, provide a fix-it hint with the
throw() clause that should be added, e.g.,

t.C:10:7: warning: 'operator new' is missing exception specification
'throw(std::bad_alloc)'
void *operator new(unsigned long sz)
^
throw(std::bad_alloc)

As part of this, disable the warning when we're missing an exception
specification on operator new, operator new[], operator delete, or
operator delete[] when exceptions are turned off (-fno-exceptions).

Fixes PR5957.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
ce381cff11e5dc61e24621bb26d4f9f3c07444ea 24-Mar-2010 John McCall <rjmccall@apple.com> Implement a framework for the delay of arbitrary diagnostics within
templates. So delay access-control diagnostics when (for example) the target
of a friend declaration is a specific specialization of a template.

I was surprised to find that this was required for an access-controlled selfhost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/DependentDiagnostic.h
0c01d18094100db92d38daa923c95661512db203 24-Mar-2010 John McCall <rjmccall@apple.com> Implement a framework for the delay of arbitrary diagnostics within
templates. So delay access-control diagnostics when (for example) the target
of a friend declaration is a specific specialization of a template.

I was surprised to find that this was required for an access-controlled selfhost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/DependentDiagnostic.h
fec20e6dbd3c93a232a8f1e85f8aa5752e69f8bb 24-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Make sure to properly track the anonymous namespace that lives inside
each namespace, even when the outer namespace has multiple
definitions. As part of this, collapsed two pointers worth of storage
(original namespace and inner anonymous namespace) into a single
pointer with a distinguishing bit, since the two are mutually
exclusive, saving a pointer per NamespaceDecl. Fixes PR6620.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a418147c61a14cd21d4cce8f9c7a8750d2a59803 24-Mar-2010 Douglas Gregor <dgregor@apple.com> Make sure to properly track the anonymous namespace that lives inside
each namespace, even when the outer namespace has multiple
definitions. As part of this, collapsed two pointers worth of storage
(original namespace and inner anonymous namespace) into a single
pointer with a distinguishing bit, since the two are mutually
exclusive, saving a pointer per NamespaceDecl. Fixes PR6620.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cd2f20c3de88eeb5a53346e876123e47e1a37e66 24-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Implement computation of the final overriders for each virtual
function within a class hierarchy (C++ [class.virtual]p2).

We use the final-overrider computation to determine when a particular
class is ill-formed because it has multiple final overriders for a
given virtual function (e.g., because two virtual functions override
the same virtual function in the same virtual base class). Fixes
PR5973.

We also use the final-overrider computation to determine which virtual
member functions are pure when determining whether a class is
abstract or diagnosing the improper use of an abstract class. The
prior approach to determining whether there were any pure virtual
functions in a class didn't cope with virtual base class subobjects
properly, and could not easily be fixed to deal with the oddities of
subobject hiding. Fixes PR6631.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
7b2fc9d3c97f2526528a8b686af1589054025ca0 24-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement computation of the final overriders for each virtual
function within a class hierarchy (C++ [class.virtual]p2).

We use the final-overrider computation to determine when a particular
class is ill-formed because it has multiple final overriders for a
given virtual function (e.g., because two virtual functions override
the same virtual function in the same virtual base class). Fixes
PR5973.

We also use the final-overrider computation to determine which virtual
member functions are pure when determining whether a class is
abstract or diagnosing the improper use of an abstract class. The
prior approach to determining whether there were any pure virtual
functions in a class didn't cope with virtual base class subobjects
properly, and could not easily be fixed to deal with the oddities of
subobject hiding. Fixes PR6631.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
95f50922434fe2bec3cd70dcad90aa77a6edb7be 23-Mar-2010 Ted Kremenek <kremenek@apple.com> Improve diagnostic for @property/ivar type mismatch by including the types of the
ivar and @property respectively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f921a4868cf1876636f6684e7f68697b18c0cb47 23-Mar-2010 Ted Kremenek <kremenek@apple.com> Improve diagnostic for @property/ivar type mismatch by including the types of the
ivar and @property respectively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e85773d9ce04de52df0cca4d7296646aebd00aa1 23-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Bind the constructed object value to CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
8e18c1b840882d26039503629d7e4ad4822f3bda 23-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Bind the constructed object value to CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
9b83b0538d6dea46bf109e17ebc0414f0312dbcf 23-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a AggExprVisitor class. It contains lots of boiler
plate code for evaluating expressions of C++ class type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
7b71c1977cccafa23f9ecb3b0b22199e61ae634c 23-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a AggExprVisitor class. It contains lots of boiler
plate code for evaluating expressions of C++ class type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
4e23ad955904b39bf926ac393cc6100c11b64d08 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/Preprocessor.h
dbd8209b33e6c9f151e4913a9c095d64a95439c4 23-Mar-2010 Daniel Dunbar <daniel@zuster.org> PPCallbacks: Add hook for reaching the end of the main file, and fix DependencyFile to not do work in its destructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/Preprocessor.h
cfe95341b5d475f43f7a74f08aa891a7d715960b 23-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Since we now may have basicblocks with the same block is in different function,
change the block counter map from unsigned -> unsigned to
<StackFrameContext*, unsigned> -> unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
d9e0c0fc47d5881a609ec34372d554e3652db66c 23-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Since we now may have basicblocks with the same block is in different function,
change the block counter map from unsigned -> unsigned to
<StackFrameContext*, unsigned> -> unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
839bff1203adf923e1a75ed2695b8fd824810920 23-Mar-2010 Ted Kremenek <kremenek@apple.com> Only perform CFG-based warnings on 'static inline' functions that
are called (transitively) by regular functions/blocks within a
translation untion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
d064fdc4b7b64ca55b40b70490c79d6f569df78e 23-Mar-2010 Ted Kremenek <kremenek@apple.com> Only perform CFG-based warnings on 'static inline' functions that
are called (transitively) by regular functions/blocks within a
translation untion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
70cc35dc26270a23f17de6e1f08f3b9ca4fa88b2 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose miuse of property dot-syntax instead of crashing.
(radar 7634653).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8149a5786def747af783a9e3c22714bb7ab42b9c 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose miuse of property dot-syntax instead of crashing.
(radar 7634653).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bd7f8bd1770382eb4698989acc0c3af94cb89553 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes access rues for ivars declared in class
implementations (radar 7547942).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
01f1bfc3284d5817517d35217885ea9ecb252817 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes access rues for ivars declared in class
implementations (radar 7547942).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
778abf2acd5ebf1f252ddc77a5b7f7d5167e02d2 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> More clean up of ivars which are either in class extensions and
implementation or synthesized into an implementation. Also,
fixes a code gen. bug when ivars are itroduced in interleaved
implementations. (related to radar 7547942).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3bfacdf6f0706987c1b33c625cd68fb880881c22 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> More clean up of ivars which are either in class extensions and
implementation or synthesized into an implementation. Also,
fixes a code gen. bug when ivars are itroduced in interleaved
implementations. (related to radar 7547942).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4f6f0f8ad4780a121b81cdaccca6e2a0ea195f76 22-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce the notion of a single "delayed" diagnostic into the
Diagnostic subsystem, which is used in the rare case where we find a
serious problem (i.e., an inconsistency in the file system) while
we're busy formatting another diagnostic. In this case, the delayed
diagnostic will be emitted after we're done with the other
diagnostic. This is only to be used for fatal conditions detected at
very inconvenient times, where we can neither stop the current
diagnostic in flight nor can we suppress the second error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
93ea5cb0edf8e509c5113e70cb05ee247c9bdf6b 22-Mar-2010 Douglas Gregor <dgregor@apple.com> Introduce the notion of a single "delayed" diagnostic into the
Diagnostic subsystem, which is used in the rare case where we find a
serious problem (i.e., an inconsistency in the file system) while
we're busy formatting another diagnostic. In this case, the delayed
diagnostic will be emitted after we're done with the other
diagnostic. This is only to be used for fatal conditions detected at
very inconvenient times, where we can neither stop the current
diagnostic in flight nor can we suppress the second error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
08e30999cc236800c13eb0cfde355499028500b5 22-Mar-2010 Chandler Carruth <chandlerc@gmail.com> Add very limited support for GCC's '-B' flag. This allows us to support unusual
toolchain configurations and is a small step toward FreeBSD support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Options.td
48ad6094679ca2bf4f3593068e02e7a208c1a73c 22-Mar-2010 Chandler Carruth <chandlerc@gmail.com> Add very limited support for GCC's '-B' flag. This allows us to support unusual
toolchain configurations and is a small step toward FreeBSD support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Options.td
a80645719e6a724695641d997c6f831b4ddf7177 21-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of the size/modification time of each file source-location
entry in a precompiled header, so that we can detect modified files
even when we miss in the stat cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
2d52be56ff595341be3c6cec337af6763804ce66 21-Mar-2010 Douglas Gregor <dgregor@apple.com> Keep track of the size/modification time of each file source-location
entry in a precompiled header, so that we can detect modified files
even when we miss in the stat cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
35616ad5d13728e791b14173cc579521caaaec41 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Reapply r99024 (but with the memory issue now fixed).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
ff7f736211070be873df0a345295fd1453ee7c50 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Reapply r99024 (but with the memory issue now fixed).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
d42d60fe07651b591d1673c0e9c261e892e7e142 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Check if a BugReporterVisitor has already been added to a BugReporterContext.
This avoids redundant diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
1b431023814196f87515a540ebcb9e9f1a9176a1 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Check if a BugReporterVisitor has already been added to a BugReporterContext.
This avoids redundant diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
34cdf5c43b97f172bbcfe4e1640722bf5f9e98d0 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix use-of-invalid-memory found by Valgrind and Windows buildbots.
We were inserting a value into a std::vector<> while iterating over
it, which could cause the underlying memory to get deallocated
and reallocated. While not the best solution, use an llvm::ImmutableList
for now as it is safely supports insertions during iteration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
6493b8153a56cbff9f89c1a53f04b6af424b383a 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix use-of-invalid-memory found by Valgrind and Windows buildbots.
We were inserting a value into a std::vector<> while iterating over
it, which could cause the underlying memory to get deallocated
and reallocated. While not the best solution, use an llvm::ImmutableList
for now as it is safely supports insertions during iteration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
463110daf084b2a348615e0201fe1065cf915e23 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
4c00fcdf98d3d7c4cb47b64f8b770f8f4bff1357 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
eac8f355d7f502e5c3e4ba19ef809a6341ec2612 20-Mar-2010 Eric Christopher <echristo@apple.com> Add sse4.2 header and builtin support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
67a5936a1d60fff1ec12441de63fd27ea50b0130 20-Mar-2010 Eric Christopher <echristo@apple.com> Add sse4.2 header and builtin support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
a2343f6332f54fb0d9d6ef251b26c4f1774446d9 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Revert r99024, "Augment path diagnostics to include displaying when a message
expression", statistical evidence indicates it has some kind of memory error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
0f2c907b2b5ee8896f5f0c51e35f80447b49b2c0 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Revert r99024, "Augment path diagnostics to include displaying when a message
expression", statistical evidence indicates it has some kind of memory error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
e2a6a781c8824ddde4d2d8b2d92ee37cddff8732 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> C++: Add support for -fno-use-cxa-atexit.
- So much typing, so little gain...

Also, rename the __cxx_global_initialization function just to match llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
efb0fa9e11f75af51744a6159530ef7cc8efa24a 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> C++: Add support for -fno-use-cxa-atexit.
- So much typing, so little gain...

Also, rename the __cxx_global_initialization function just to match llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
78218da42f3b94f4e1e0143bc5135c9766caa4a6 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Augment path diagnostics to include displaying when a message expression
is not evaluated because the receiver is nil.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
2d46f4dc297b32eff154a26c0e3bc16b6c66b78c 20-Mar-2010 Ted Kremenek <kremenek@apple.com> Augment path diagnostics to include displaying when a message expression
is not evaluated because the receiver is nil.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
a307d44a3bcff3d5a3e40d02e5393f5f0c174dc7 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Force joining of "-l" "foo", the linker doesn't eat that format.

<rdar://problem/7641151> clang must eat spaces after -l

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
365b0bd38964c57f7e9fcace1eaf9877fb3b0485 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Force joining of "-l" "foo", the linker doesn't eat that format.

<rdar://problem/7641151> clang must eat spaces after -l

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
33fe4845b5f3bcc46d48da919638ba912e6c67cb 20-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Optimize region-of-interest based cursor walks through the
preprocessed entities by grouping preprocessed entities by file
ID. This drastically improves performance of repeated
clang_getCursor() calls local tests, although it is a bit ugly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
788f5a1242c04762f91eaa7565c07b9865846d88 20-Mar-2010 Douglas Gregor <dgregor@apple.com> Optimize region-of-interest based cursor walks through the
preprocessed entities by grouping preprocessed entities by file
ID. This drastically improves performance of repeated
clang_getCursor() calls local tests, although it is a bit ugly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
effc786f47716410eb470ac4ed0294abe4deb3b6 19-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Remove the capture, serialization, and deserialization of comment
ranges as part of the ASTContext. This code is not and was never used,
but contributes ~250k to the size of the Cocoa.h precompiled
header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Parse/Action.h
lang/Parse/Parser.h
c6fbbedb3e90ff2f04828c36fd839e01468679f5 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Remove the capture, serialization, and deserialization of comment
ranges as part of the ASTContext. This code is not and was never used,
but contributes ~250k to the size of the Cocoa.h precompiled
header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Parse/Action.h
lang/Parse/Parser.h
ea132360e95c97cd75d9fe3600657d530a1ce532 19-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Robustify PreprocessingRecord slightly, by only creating macro
instantiations when we have the corresponding macro definition and by
removing macro definition information from our table when the macro is
undefined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
1b058e8956ea29a7fb7649fdee2b80581dcbdf39 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Robustify PreprocessingRecord slightly, by only creating macro
instantiations when we have the corresponding macro definition and by
removing macro definition information from our table when the macro is
undefined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
ea1881b7369a4b0ad8b95cdced0fb0cc25b7379a 19-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Implement serialization and lazy deserialization of the preprocessing
record (which includes all macro instantiations and definitions). As
with all lay deserialization, this introduces a new external source
(here, an external preprocessing record source) that loads all of the
preprocessed entities prior to iterating over the entities.

The preprocessing record is an optional part of the precompiled header
that is disabled by default (enabled with
-detailed-preprocessing-record). When the preprocessor given to the
PCH writer has a preprocessing record, that record is written into the
PCH file. When the PCH reader is given a PCH file that contains a
preprocessing record, it will be lazily loaded (which, effectively,
implicitly adds -detailed-preprocessing-record). This is the first
case where we have sections of the precompiled header that are
added/removed based on a compilation flag, which is
unfortunate. However, this data consumes ~550k in the PCH file for
Cocoa.h (out of ~9.9MB), and there is a non-trivial cost to gathering
this detailed preprocessing information, so it's too expensive to turn
on by default. In the future, we should investigate a better encoding
of this information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Lex/PreprocessingRecord.h
6a5a23f8e7fb65e028c8092bc1d1a1d9dfe2e9bc 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement serialization and lazy deserialization of the preprocessing
record (which includes all macro instantiations and definitions). As
with all lay deserialization, this introduces a new external source
(here, an external preprocessing record source) that loads all of the
preprocessed entities prior to iterating over the entities.

The preprocessing record is an optional part of the precompiled header
that is disabled by default (enabled with
-detailed-preprocessing-record). When the preprocessor given to the
PCH writer has a preprocessing record, that record is written into the
PCH file. When the PCH reader is given a PCH file that contains a
preprocessing record, it will be lazily loaded (which, effectively,
implicitly adds -detailed-preprocessing-record). This is the first
case where we have sections of the precompiled header that are
added/removed based on a compilation flag, which is
unfortunate. However, this data consumes ~550k in the PCH file for
Cocoa.h (out of ~9.9MB), and there is a non-trivial cost to gathering
this detailed preprocessing information, so it's too expensive to turn
on by default. In the future, we should investigate a better encoding
of this information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Lex/PreprocessingRecord.h
ec83747fc128470f55688e5b0db8432a20c0db27 19-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> More coherent diagnostics when ivar is placed n categories.
(related to radar 7538989).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d52cbdce856d6498a5c454b8e113498e645cc4d 19-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> More coherent diagnostics when ivar is placed n categories.
(related to radar 7538989).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ebb091487d88180a5670a48dc77d0292862cf58d 19-Mar-2010 Ted Kremenek <kremenek@apple.com> Make the CIndex API more resilient to being used on invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98981 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ebfa339321f8a4df9d5011e591a615d5765107d5 19-Mar-2010 Ted Kremenek <kremenek@apple.com> Make the CIndex API more resilient to being used on invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98981 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4ddafccd046e2cf7ccc9b46aab21c6ac57b54edb 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Kill off -empty-input only, and replace with -init-only which is an
actual action.
- This is easier to use, and more reliable for timing the thing this was
actually meant to be useful for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
2758595023c5c7c0495f19260089f975022c50dc 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Kill off -empty-input only, and replace with -init-only which is an
actual action.
- This is easier to use, and more reliable for timing the thing this was
actually meant to be useful for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
54f28d292786be2548a8612f28c5265dcd8e423c 19-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Make the preprocessing record a PPCallbacks subclass itself,
eliminating the extra PopulatePreprocessingRecord object. This will
become useful once we start writing the preprocessing record to
precompiled headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
b9e1b75772db2c7db566c6034ba90a07f22e35eb 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Make the preprocessing record a PPCallbacks subclass itself,
eliminating the extra PopulatePreprocessingRecord object. This will
become useful once we start writing the preprocessing record to
precompiled headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
05a9da2a3af572e6976705528bf15dce9814b440 19-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Optionally store a PreprocessingRecord in the preprocessor itself, and
tie its creation to a CC1 flag -detailed-preprocessing-record.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/PCHWriter.h
lang/Frontend/PreprocessorOptions.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
94dc8f640ebea52241412512ed48601626edbc58 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Optionally store a PreprocessingRecord in the preprocessor itself, and
tie its creation to a CC1 flag -detailed-preprocessing-record.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTUnit.h
lang/Frontend/PCHWriter.h
lang/Frontend/PreprocessorOptions.h
lang/Lex/PreprocessingRecord.h
lang/Lex/Preprocessor.h
2423e99c455d06b310f87644d963e5d97f968e18 19-Mar-2010 John McCall <rjmccall@apple.com> Pretty-print anonymous types using their kind and presumed location.
Fixes PR6643. Patch by Mike M!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
73061d054128e486e70e0f2874b23d6eca067e5b 19-Mar-2010 John McCall <rjmccall@apple.com> Pretty-print anonymous types using their kind and presumed location.
Fixes PR6643. Patch by Mike M!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
69969963d321e2001ed1ebfc6d17107604d75b12 19-Mar-2010 John McCall <rjmccall@apple.com> Remember the "found declaration" for an overload candidate, which is the
entity (if applicable) which was actually looked up. If a candidate was found
via a using declaration, this is the UsingShadowDecl; otherwise, if
the candidate is template specialization, this is the template; otherwise,
this is the function.

The point of this exercise is that "found declarations" are the entities
we do access control for, not their underlying declarations. Broadly speaking,
this patch fixes access control for using declarations.

There is a *lot* of redundant code calling into the overload-resolution APIs;
we really ought to clean that up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
9aa472c45d2bd81b7b52c225e8acc560d716db97 19-Mar-2010 John McCall <rjmccall@apple.com> Remember the "found declaration" for an overload candidate, which is the
entity (if applicable) which was actually looked up. If a candidate was found
via a using declaration, this is the UsingShadowDecl; otherwise, if
the candidate is template specialization, this is the template; otherwise,
this is the function.

The point of this exercise is that "found declarations" are the entities
we do access control for, not their underlying declarations. Broadly speaking,
this patch fixes access control for using declarations.

There is a *lot* of redundant code calling into the overload-resolution APIs;
we really ought to clean that up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
42bd56c8c7545a3e1b6d510712139551e0da43f7 18-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Some cleanup, change diagnostic when assigning to
a property which is not lvalue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
90c71268f04369328e8f579007b8b4f1da9feea0 18-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Some cleanup, change diagnostic when assigning to
a property which is not lvalue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
9a4e46d5048854ad8b63295d9e724a4a13a6fcf0 18-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Explicitly link macro instantiations to macro definitions in the
preprocessing record. Use that link with clang_getCursorReferenced()
and clang_getCursorDefinition() to match instantiations of a macro to
the definition of the macro.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
bf7efa2742dc94363d3561d284c9d634fc5a780f 18-Mar-2010 Douglas Gregor <dgregor@apple.com> Explicitly link macro instantiations to macro definitions in the
preprocessing record. Use that link with clang_getCursorReferenced()
and clang_getCursorDefinition() to match instantiations of a macro to
the definition of the macro.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessingRecord.h
23e75cef2e744cdd4940f22cbdf3a214ca526b5d 18-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Expose macro definitions as CIndex cursors. These can still only be
generated by clang_annotateTokens().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98837 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/PreprocessingRecord.h
572feb2a190b5e8b04fb06c4ac50ee0f61e93ff0 18-Mar-2010 Douglas Gregor <dgregor@apple.com> Expose macro definitions as CIndex cursors. These can still only be
generated by clang_annotateTokens().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98837 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/PreprocessingRecord.h
d8b10596e1b3ea7346c465b19afc59f18bf00a24 18-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce the notion of a "preprocessing record", which keeps track of
the macro definitions and macro instantiations that are found
during preprocessing. Preprocessing records are *not* generated by
default; rather, we provide a PPCallbacks subclass that hooks into the
existing callback mechanism to record this activity.

The only client of preprocessing records is CIndex, which keeps track
of macro definitions and instantations so that they can be exposed via
cursors. At present, only token annotation uses these facilities, and
only for macro instantiations; both will change in the near
future. However, with this change, token annotation properly annotates
macro instantiations that do not produce any tokens and instantiations
of macros that are later undef'd, improving our consistency.

Preprocessing directives that are not macro definitions are still
handled by clang_annotateTokens() via re-lexing, so that we don't have
to track every preprocessing directive in the preprocessing record.

Performance impact of preprocessing records is still TBD, although it
is limited to CIndex and therefore out of the path of the main compiler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Lex/PreprocessingRecord.h
4ae8f298b1ea51b4c2234f9148e2e4349c9bdd23 18-Mar-2010 Douglas Gregor <dgregor@apple.com> Introduce the notion of a "preprocessing record", which keeps track of
the macro definitions and macro instantiations that are found
during preprocessing. Preprocessing records are *not* generated by
default; rather, we provide a PPCallbacks subclass that hooks into the
existing callback mechanism to record this activity.

The only client of preprocessing records is CIndex, which keeps track
of macro definitions and instantations so that they can be exposed via
cursors. At present, only token annotation uses these facilities, and
only for macro instantiations; both will change in the near
future. However, with this change, token annotation properly annotates
macro instantiations that do not produce any tokens and instantiations
of macros that are later undef'd, improving our consistency.

Preprocessing directives that are not macro definitions are still
handled by clang_annotateTokens() via re-lexing, so that we don't have
to track every preprocessing directive in the preprocessing record.

Performance impact of preprocessing records is still TBD, although it
is limited to CIndex and therefore out of the path of the main compiler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Lex/PreprocessingRecord.h
d8d4c87baa4b2cffc46e02b1294a040f5f420d58 18-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> More token-annotation experimentation, preprocessing the annotated
token sequence to detect macro instantiations (that produce at least
token). WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98826 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4807231938d8aff28de09f78f301f9ba5845e5e4 18-Mar-2010 Douglas Gregor <dgregor@apple.com> More token-annotation experimentation, preprocessing the annotated
token sequence to detect macro instantiations (that produce at least
token). WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98826 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
00f425d0b483d49c7893453be479953938a1d0e6 18-Mar-2010 Ted Kremenek <kremenek@apple.com> Bump clang minor version (1.5).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
7133c1aa1c55cb8b9c86a5e1f1318a0d82658c31 18-Mar-2010 Ted Kremenek <kremenek@apple.com> Bump clang minor version (1.5).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
df0c21f52b544a4d7ba1119a0ccef51ca17227f9 18-Mar-2010 Ted Kremenek <kremenek@apple.com> Turn several PCH reader assertions into compiler errors, thus making
the PCHReader more robust to corrupt or invalid PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
d5d7b3f61f82b0fed9d6f02839bc72e528332911 18-Mar-2010 Ted Kremenek <kremenek@apple.com> Turn several PCH reader assertions into compiler errors, thus making
the PCHReader more robust to corrupt or invalid PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
f4cf009d3b3d908632a5a330005a1f248e7330e9 18-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Experimental stab at using relexing to identify preprocessor
directives while annotating tokens in CIndex. This functionality
should probably be factored out of this routine, but we're not there
yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98786 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9f1e3ff3b3095967e2b92b57a53524e2d6bb141c 18-Mar-2010 Douglas Gregor <dgregor@apple.com> Experimental stab at using relexing to identify preprocessor
directives while annotating tokens in CIndex. This functionality
should probably be factored out of this routine, but we're not there
yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98786 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
db5980861dc9061cf0d87db38a4eabc0feb7a135 17-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Reduce the default alignment for ASTContext and Stmt/Expr allocation
from 16 bytes to 8 bytes, since we don't ever use those low 4
bits. Should save some storage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Stmt.h
f4e689b8528770001f4792f1f4ebdfb09d859e3d 17-Mar-2010 Douglas Gregor <dgregor@apple.com> Reduce the default alignment for ASTContext and Stmt/Expr allocation
from 16 bytes to 8 bytes, since we don't ever use those low 4
bits. Should save some storage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Stmt.h
e796ee8892936888e36a6dc9e6daea0aaf392597 17-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Remove warning about shadowing a built-in; built-ins aren't actually
considered to be a part of the translation unit unless they're named
in a way that brings them into existence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c48c916b8cebba954429715f15bd5b5e8e4d4574 17-Mar-2010 Douglas Gregor <dgregor@apple.com> Remove warning about shadowing a built-in; built-ins aren't actually
considered to be a part of the translation unit unless they're named
in a way that brings them into existence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7be95146135fbf8399324f631f0115f74c62ae19 17-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Entering the main source file in the preprocessor can fail if the
source file has been changed. Handle that failure more gracefully.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98727 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
dbf8ee630e4c86e5150492eaf8dbceea3c718ee1 17-Mar-2010 Douglas Gregor <dgregor@apple.com> Entering the main source file in the preprocessor can fail if the
source file has been changed. Handle that failure more gracefully.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98727 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
1071378ede1eeb42f1230ebc65fcbeb22418a518 17-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Use a simple diagnostic (file modified) when we detect that a file has
changed, rather than trying to point out how it changed. The "why"
doesn't matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
e39b600582f9183e3301c3e6cb48b76ac5087119 17-Mar-2010 Douglas Gregor <dgregor@apple.com> Use a simple diagnostic (file modified) when we detect that a file has
changed, rather than trying to point out how it changed. The "why"
doesn't matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
523b4cb03581c20983589e520b1461853aa022d2 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Simplify ProcessWarningOptions since it can't fail

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
5bf932bd0d5db98273938675dbf81cbb2f5ffff7 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Simplify ProcessWarningOptions since it can't fail

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
cd5a90abe7d13e86b52935eb3dae4c56ac12e1e1 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove useless forward decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
ce45414dd8c9631eda43b17a04e560da530168d0 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove useless forward decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
b21cedc32e3bcb010ab2d0f3e095fd863db38b5f 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Issue a proper diagnostic if we couldn't open dump file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
3d67b1e25847319a5a271f9d5a8d607ef18d804a 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Issue a proper diagnostic if we couldn't open dump file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
9707db19f2ac123ede8678026bd621165e72feec 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove useless foward decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticsClient.h
78fbbfe0fe66cf3bbee744a1b702da95ad7fcd13 17-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove useless foward decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticsClient.h
238d3ff0a3d0a6af094b97a416fe6afa724250db 17-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Mark CXXThisRegion in the current or parent stack frame context as live so that
their bindings are not removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
17ddf1c108bb847fb05111fec09d664c9bb2e49b 17-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Mark CXXThisRegion in the current or parent stack frame context as live so that
their bindings are not removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
6d6ec3a5a4e5418a4fa2825166ecf59eb58e6ff9 17-Mar-2010 John McCall <rjmccall@apple.com> Make -faccess-control and -fno-access-control driver options.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
3ddd6e026a173e9519e84e27f8d6aed5473b8b4e 17-Mar-2010 John McCall <rjmccall@apple.com> Make -faccess-control and -fno-access-control driver options.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
d3a26c7179128a12ed30f34ebeb15fec36e39815 17-Mar-2010 John McCall <rjmccall@apple.com> Clean up after ourselves when there's an error parsing the base clause.
Fixes the crash-on-invalid in PR6629.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
db7bb4a4e7d9744cbc994c90932e6f056228e1ff 17-Mar-2010 John McCall <rjmccall@apple.com> Clean up after ourselves when there's an error parsing the base clause.
Fixes the crash-on-invalid in PR6629.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9bec00f10ef63d6483eeffdfd6174d94bec0231e 17-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c patch to provide type safty when blocks are passing or
returning objc objects. There will be a corresponding objective-c++
patch soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
132f2a2da34f378fc675b9e174564b0f52c31d98 17-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c patch to provide type safty when blocks are passing or
returning objc objects. There will be a corresponding objective-c++
patch soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
147177da525a09e65f2d1f5b7b7ee51311cc66b0 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Teach SourceManager's content cache to keep track of whether its
buffer was invalid when it was created, and use that bit to always set
the "Invalid" flag according to whether the buffer is invalid. This
ensures that all accesses to an invalid buffer are marked invalid,
improving recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c815108d08b0417c6f1104e7df70dc5278839406 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Teach SourceManager's content cache to keep track of whether its
buffer was invalid when it was created, and use that bit to always set
the "Invalid" flag according to whether the buffer is invalid. This
ensures that all accesses to an invalid buffer are marked invalid,
improving recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2c9c4584acb6ca7ef35bde8b96f81acc9e66ee75 16-Mar-2010 John McCall <rjmccall@apple.com> Implement -Wshadow. Based on a patch by Mike M.!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8472af4df9292e02fb25c952d25a81f3ca296252 16-Mar-2010 John McCall <rjmccall@apple.com> Implement -Wshadow. Based on a patch by Mike M.!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8884f1af9c258316326940a81250f88600676e59 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Update get*LineNumber() and get*ColumnNumber() functions to pass the
Invalid bit through; there are no safety-critical callers of these
functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
64e462dff03492c586be0349ec6aa3ad5cd92720 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Update get*LineNumber() and get*ColumnNumber() functions to pass the
Invalid bit through; there are no safety-critical callers of these
functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
3d5c30c7576189dbe10bf1ca86dca307b4b04319 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Audit all callers of SourceManager::getCharacterData(); update some of
them to recover more gracefully on failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Lex/Preprocessor.h
a543016fe07030f695d6d56fd22c8c8da617e0d7 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Audit all callers of SourceManager::getCharacterData(); update some of
them to recover more gracefully on failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Lex/Preprocessor.h
2c3e2821703459a03c37e258dd2d70fdf87efbc2 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Audit all getBuffer() callers (for both the FullSourceLoc and
SourceManager versions), updating those callers that need to recover
gracefully from failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
aae58b0c3efb5fa9f97a3e4b1c1a2d31077efe5b 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Audit all getBuffer() callers (for both the FullSourceLoc and
SourceManager versions), updating those callers that need to recover
gracefully from failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
146db93765420b4594464143f13a24fcda4bf73f 16-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -fno-lax-vector-conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
8c6fa84b2e4a30317b7b214a7657cb593d67773b 16-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -fno-lax-vector-conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
a4b6668060ff348c352839427da6cb7b3b6f808f 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Fix header-search problems with precompiled headers, where the
presence or absence of header map arguments when using the precompiled
header would cause Clang to get confused about which headers had
already been included/imported, along with their controlling
macros. The fundamental problem is that the serialization of the
header search information was relying on the UIDs of FileEntry objects
at PCH generation time and PCH load time to be equivalent, which
effectively means that we had to probe the same files in the same
order. Differing header map arguments caused an extra FileEntry
lookup, but it's easy to imagine other minor command-line arguments
triggering this problem.

Header-search information is now encoded along with the
source-location entry for a file, so that we register information
about a file's properties as a header at the same time we create the
FileEntry for that file.

Fixes <rdar://problem/7743243>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Lex/HeaderSearch.h
12fab31aa5868b1a6b52246b5a87daa48a338fe2 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Fix header-search problems with precompiled headers, where the
presence or absence of header map arguments when using the precompiled
header would cause Clang to get confused about which headers had
already been included/imported, along with their controlling
macros. The fundamental problem is that the serialization of the
header search information was relying on the UIDs of FileEntry objects
at PCH generation time and PCH load time to be equivalent, which
effectively means that we had to probe the same files in the same
order. Differing header map arguments caused an extra FileEntry
lookup, but it's easy to imagine other minor command-line arguments
triggering this problem.

Header-search information is now encoded along with the
source-location entry for a file, so that we register information
about a file's properties as a header at the same time we create the
FileEntry for that file.

Fixes <rdar://problem/7743243>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Lex/HeaderSearch.h
12f7326e2cbd006859816b79326e9e665f902213 16-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Switch another function to StringRef instead of char pointer pairs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
ceafc4b63599d14f0b5b10ff92e22bf242682dce 16-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Switch another function to StringRef instead of char pointer pairs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
5fb9b355e182d1ec046cdc061855d3ffb691e967 16-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Let SourceManager::getBufferData return StringRef instead of a pair of two const char*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
f6ac97b101c8840efa92bf29166077ce4049e293 16-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Let SourceManager::getBufferData return StringRef instead of a pair of two const char*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
9ed3fbc43e7e8acac2f584f19f4e4f2f05c65121 16-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add VisitCXXContructExpr logic to the analyzer. This still has not fully worked
since RemoveDeadBinding mistakenly remove the binding to CXXThisRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
c506357c3778092c2a3251243f12524e8eb89274 16-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add VisitCXXContructExpr logic to the analyzer. This still has not fully worked
since RemoveDeadBinding mistakenly remove the binding to CXXThisRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
5d9aa7f89bf11d9b37bc429199f960e3205e91e5 16-Mar-2010 John McCall <rjmccall@apple.com> Access control for implicit calls to copy assignment operators and copy
constructors from implicitly-defined members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b020748a9954c995f2e616f50bb9ed4fe2df1f72 16-Mar-2010 John McCall <rjmccall@apple.com> Access control for implicit calls to copy assignment operators and copy
constructors from implicitly-defined members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
25460408052b508d9d60153a4d29ba881758a1d5 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Don't consume tokens past the end-of-file in an @interface. Fixes
<rdar://problem/7735566>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
c3d43b783dfb1a1502aa8b31ab1985cf237b1f77 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Don't consume tokens past the end-of-file in an @interface. Fixes
<rdar://problem/7735566>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
a90c7d6d992ced031c4a790733142a89a90f9d04 16-Mar-2010 John McCall <rjmccall@apple.com> Perform access control for the implicit base and member destructor calls
required when emitting a destructor definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
58e6f34e4d2c668562e1c391162ee9de7b05fbb2 16-Mar-2010 John McCall <rjmccall@apple.com> Perform access control for the implicit base and member destructor calls
required when emitting a destructor definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
1226abb6ed8d1f9afad889d618b79fb3c7bd4e9e 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce optional "Invalid" parameters to routines that invoke the
SourceManager's getBuffer() and, therefore, could fail, along with
Preprocessor::getSpelling(). Use the Invalid parameters in the literal
parsers (string, floating point, integral, character) to make them
robust against errors that stem from, e.g., PCH files that are not
consistent with the underlying file system.

I still need to audit every use caller to all of these routines, to
determine which ones need specific handling of error conditions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
50f6af7a6d6951a63f3da7d4c5a7d3965bf73b63 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Introduce optional "Invalid" parameters to routines that invoke the
SourceManager's getBuffer() and, therefore, could fail, along with
Preprocessor::getSpelling(). Use the Invalid parameters in the literal
parsers (string, floating point, integral, character) to make them
robust against errors that stem from, e.g., PCH files that are not
consistent with the underlying file system.

I still need to audit every use caller to all of these routines, to
determine which ones need specific handling of error conditions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
331eb3639454b3470a666553cd798f32a42a9c2e 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Use SourceManager's Diagnostic object for all file-reading errors,
simplifying the SourceManager interfaces somewhat.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/SourceManager.h
36c35ba0aca641e60e5dbee8efbc620c08b9bd61 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Use SourceManager's Diagnostic object for all file-reading errors,
simplifying the SourceManager interfaces somewhat.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/SourceManager.h
40e0148c249727d064c9aef48aca7c896c8d21c1 16-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Give SourceManager a Diagnostic object with which to report errors,
and start simplifying the interfaces in SourceManager that can fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
f715ca12bfc9fddfde75f98a197424434428b821 16-Mar-2010 Douglas Gregor <dgregor@apple.com> Give SourceManager a Diagnostic object with which to report errors,
and start simplifying the interfaces in SourceManager that can fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/SourceManager.h
lang/Frontend/ASTUnit.h
e294260bd6b733d4563d182528129f69b76b33e3 16-Mar-2010 Eric Christopher <echristo@apple.com> Add remaining sse4.1 intrinsics and builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
7bd0dfd322d7a2d6a5461dcbdb2a83fd729dd8e2 16-Mar-2010 Eric Christopher <echristo@apple.com> Add remaining sse4.1 intrinsics and builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
72898076bbfe83ff42f2c478fb10e5391948123b 15-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new BufferResult class to act as the return type of
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.

Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/SourceManager.h
aea67dbd653a2dd6dd5cc2159279e81e855b2482 15-Mar-2010 Douglas Gregor <dgregor@apple.com> Introduce a new BufferResult class to act as the return type of
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.

Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/SourceManager.h
950c119aee83ad009dad80836de21bd9a19cc676 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Move method FindPropertyVisibleInPrimaryClass() from ObjCContainerDecl to ObjCInterfaceDecl.
Also change this method to lookup property declarations using DeclContext::lookup().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
37cafb077ad5b170acae77e566638603011ef4c0 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Move method FindPropertyVisibleInPrimaryClass() from ObjCContainerDecl to ObjCInterfaceDecl.
Also change this method to lookup property declarations using DeclContext::lookup().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3ae69a5219df72a1a976ec03370cf8f78f50191e 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Change ObjCCategoryDecl::FindPropertyDeclaration() to lookup
property decls using DeclContext::lookup().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
de09d0c9694f01a99870a8825266d44a29ebb325 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Change ObjCCategoryDecl::FindPropertyDeclaration() to lookup
property decls using DeclContext::lookup().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0ce756b8d20f6ceea8e810d8ced84fe150314b1a 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Make 'findPropertyDecl()' a static method of ObjCPropertyDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9f550ff05d496e6b9480e5619a21d9da0c9e27c1 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Make 'findPropertyDecl()' a static method of ObjCPropertyDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
81cee0b6ea4b4734eac7500d36dea4262508e8be 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Add comment to CFG to 'buildCFG()' arguments indicating that scope
support is not fully implemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
8efb5812b8f49e6c5cb4635e39e4cacafd1ae73c 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Add comment to CFG to 'buildCFG()' arguments indicating that scope
support is not fully implemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
157141a65a0ee47e4984049a39b228eaa313d706 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Rename clang_constructUSR_ObjCategory to clang_constructUSR_ObjCCategory.
(there was a missing 'C').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98554 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
66ccaec73706f3623d2e7d191fe2c944feedcc2b 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Rename clang_constructUSR_ObjCategory to clang_constructUSR_ObjCCategory.
(there was a missing 'C').

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98554 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
64f5cbc9ca2a03280705c2af175e9047c87b7d84 15-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove useless forward decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2d684c2499bd80e28451c1db0e2e040ef00c53bc 15-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove useless forward decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
479f3d4f292c4bbaf42cd9bb1539df16d105975a 15-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> During C++ name lookup, use DeclContext::Equals() rather than
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
dbdf5e7d0b6f1f8d8c496c1a0ada6f706cddf100 15-Mar-2010 Douglas Gregor <dgregor@apple.com> During C++ name lookup, use DeclContext::Equals() rather than
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
3dace0b21f73ddaca879ac59890b33a12cfa509e 15-Mar-2010 John McCall <rjmccall@apple.com> Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
4b7a834e0fecddd9eaf1f4567867c718e4eebf50 15-Mar-2010 John McCall <rjmccall@apple.com> Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
e88b6e3c31125b4bb55d60aa3b982735d308c792 15-Mar-2010 John McCall <rjmccall@apple.com> Remember declaration scope qualifiers in the AST. Imposes no memory overhead
on unqualified declarations.

Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes
with the ASTContext and delete them during Destroy(). I audited a bunch of
Destroy methods at the same time, to ensure that the correct teardown was
being done.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b6217665c6a987f2d6c8665fd70365d7719ac4df 15-Mar-2010 John McCall <rjmccall@apple.com> Remember declaration scope qualifiers in the AST. Imposes no memory overhead
on unqualified declarations.

Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes
with the ASTContext and delete them during Destroy(). I audited a bunch of
Destroy methods at the same time, to ensure that the correct teardown was
being done.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d2adbba2406e58a4ffefa47676b970ab656f357d 15-Mar-2010 John McCall <rjmccall@apple.com> Remember access paths for visible conversion decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b05b5f35f114505182b076aa70002843c0669beb 15-Mar-2010 John McCall <rjmccall@apple.com> Remember access paths for visible conversion decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b80c2261f94adad406167b1c50001cd290e02de2 13-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Add missing space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b031c87ca32993fc54da732fced871bdd5b2a69e 13-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Add missing space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6dbd14d0949144ebc64cd964b74c1b872e62b019 13-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Use SmallString instead of SmallVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
193575455e00eca03fd7177f60e3f2e6263cb661 13-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Use SmallString instead of SmallVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
3ed2031955940663ff7e7c31baf1f40109e515ca 13-Mar-2010 Ted Kremenek <kremenek@apple.com> Implement several CIndex functions for constructing USRs from C-strings instead of AST elements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98421 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
896b70ffc348f6e2c680b5fb5841984d5785b7b5 13-Mar-2010 Ted Kremenek <kremenek@apple.com> Implement several CIndex functions for constructing USRs from C-strings instead of AST elements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98421 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5570021146ec9ed50c891a0af626fec316db896f 12-Mar-2010 John McCall <rjmccall@apple.com> Remember whether a ParmVarDecl was spelled with a default argument or
whether it inherited one from a previous declaration.

Patch by Enea Zaffanella!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
bf73b352acb7a2d041ce8b50171dd7f8e2b2c1bb 12-Mar-2010 John McCall <rjmccall@apple.com> Remember whether a ParmVarDecl was spelled with a default argument or
whether it inherited one from a previous declaration.

Patch by Enea Zaffanella!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e3bbdba82e339b894a8433a752459aef291d762a 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Make IdentifierTable::get(StringRef) "primary" (no functionality change)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
6488292f5e204fed99bb43ab23b8342ddc03ce89 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Make IdentifierTable::get(StringRef) "primary" (no functionality change)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
a77101d10a81e558346c1a7b9ed5b6f6ecc06c07 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Add IdentifierTable::get() overload and start using it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
811f4267aa1ebd727c31594b8ed94048e2c10ad6 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Add IdentifierTable::get() overload and start using it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
038358998fe2a143f33fade9b4f09a4eecb620fc 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Cleanup using StringRef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
2781deb126663ca1bd412044a1e66577585987b3 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Cleanup using StringRef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
8e7cf4fc3dbd3bef86bb9cbb15253e7b702ceaa7 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Switch over IdentifierInfoLookup to StringRef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/PTHManager.h
700030ebddb987936d4fee14d9412821d96e4840 12-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Switch over IdentifierInfoLookup to StringRef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/PTHManager.h
897c3169affd0817efe175993965ad4ad2739dc0 12-Mar-2010 John McCall <rjmccall@apple.com> Extend the builtin syntax to allow address-space qualifiers on pointers and
references. Based on a patch by Arnaud de Grandmaison!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
187ab37a05b8f7015b9f39cc8cd9129a0c6d0b48 12-Mar-2010 John McCall <rjmccall@apple.com> Extend the builtin syntax to allow address-space qualifiers on pointers and
references. Based on a patch by Arnaud de Grandmaison!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
0612eb975cad24213aee96e8d6746d781f764cf6 12-Mar-2010 Eric Christopher <echristo@apple.com> Add SSE4 packed integer comparisons and corresponding intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
0c2b4f40ac17156a424d4faa20ba5d862ecc8416 12-Mar-2010 Eric Christopher <echristo@apple.com> Add SSE4 packed integer comparisons and corresponding intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
e67d87863563c575c611fe2d45cc0aac5ad3330c 12-Mar-2010 John McCall <rjmccall@apple.com> Implement basic support for friend types and functions in non-dependent
contexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
d60e22e601852ae1345f01514318a0951dc09f89 12-Mar-2010 John McCall <rjmccall@apple.com> Implement basic support for friend types and functions in non-dependent
contexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
755efc993c384007d8eb0c97a54288b3aaaa1dbc 11-Mar-2010 Ted Kremenek <kremenek@apple.com> For ivars created using @synthesize, set their DeclContext to be
the @implementation (instead of the @interface) and actually add
the ivar to the DeclContext (which we weren't doing before).

This allows us to simplify ASTContext::CollectNonClassIvars() by
removing ASTContext::CollectProtocolSynthesizedIvars(). Now all
ivars can be found by either inspecting the ObjCInterfaceDecl and
its companion ObjCImplementationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7d2aa11c5c3b85a9d727ff868de666ba3bff5b59 11-Mar-2010 Ted Kremenek <kremenek@apple.com> For ivars created using @synthesize, set their DeclContext to be
the @implementation (instead of the @interface) and actually add
the ivar to the DeclContext (which we weren't doing before).

This allows us to simplify ASTContext::CollectNonClassIvars() by
removing ASTContext::CollectProtocolSynthesizedIvars(). Now all
ivars can be found by either inspecting the ObjCInterfaceDecl and
its companion ObjCImplementationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bdf5263c109e7147dad6d27e372280f1614072a6 11-Mar-2010 John McCall <rjmccall@apple.com> Warn about comparing an unsigned expression with 0 in tautological ways.
Patch by mikem!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d1b47bf17fde73fac67d8664bd65273742c00ecd 11-Mar-2010 John McCall <rjmccall@apple.com> Warn about comparing an unsigned expression with 0 in tautological ways.
Patch by mikem!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
652f18e702323dd3dd9179b11b46196760bce9bd 11-Mar-2010 John McCall <rjmccall@apple.com> Implement -Wmissing-field-initializers. Patch by mikem!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
80639debfb2d90b2f1ffdbcd9a391f744cb0a393 11-Mar-2010 John McCall <rjmccall@apple.com> Implement -Wmissing-field-initializers. Patch by mikem!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
8d766796bdcdde4476d8b2c618a1bde8b3d7f058 11-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Add tentative support for accessing local variables with
external linkage (static, extern, etc.) in blocks in
rewriter. wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6cb6eb4c792b504ad652d9230640656852e18ee9 11-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Add tentative support for accessing local variables with
external linkage (static, extern, etc.) in blocks in
rewriter. wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
81021af73452240c8ac822400dbce9aaf4db99af 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free Action objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
32c1a2ae8b31f32e478c8e504ed81db8c8d25713 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free Action objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
061484b534350106d6d5b25fc25f0e56a9075efa 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free synthesized derived arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
fd48cb31d409cb1f8e1f119426965e498652e2d1 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free synthesized derived arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
f63023e069af1cf8dd3a890193903b40a73e73c8 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free jobs in JobList and PipedJob instances.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
9d44023453094832ada2770941e9e4c96ce0e75e 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free jobs in JobList and PipedJob instances.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
e62539e7e553de6a944f5662e9ad4d3b6efc73a7 11-Mar-2010 John McCall <rjmccall@apple.com> Split C++ friend declarations into their own header/implementation file.
I'm expecting this portion of the AST to grow and change, and I'd like to
be able to do that with minimal recompilation. If this proves unnecessary
when access control is fully-implemented, I'll fold the classes back into
DeclCXX.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclVisitor.h
92b7f70c924cbf4514e9e434cea7def51ab49860 11-Mar-2010 John McCall <rjmccall@apple.com> Split C++ friend declarations into their own header/implementation file.
I'm expecting this portion of the AST to grow and change, and I'd like to
be able to do that with minimal recompilation. If this proves unnecessary
when access control is fully-implemented, I'll fold the classes back into
DeclCXX.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclFriend.h
lang/AST/DeclVisitor.h
388749b8c3c70bbf5dfb8823d173d9ee4e7e4239 11-Mar-2010 Anders Carlsson <andersca@mac.com> Replace the class offset vectors in RecordLayoutBuilder with maps instead so we'll have faster lookup and so we can detect duplicates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
147b5ddc6c8618a9d70a83f90de409e444ae705b 11-Mar-2010 Anders Carlsson <andersca@mac.com> Replace the class offset vectors in RecordLayoutBuilder with maps instead so we'll have faster lookup and so we can detect duplicates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
d880d5093e51b7190fe22be5d7ffab982fe8ca48 11-Mar-2010 Ted Kremenek <kremenek@apple.com> Remove unused 'IVars' field from ObjCInterfaceDecl. That functionality
has migrated to DeclContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
568eb6c87896db19dfb27b394669e05b8cbb27b3 11-Mar-2010 Ted Kremenek <kremenek@apple.com> Remove unused 'IVars' field from ObjCInterfaceDecl. That functionality
has migrated to DeclContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
98624359b74071fdf2575b5b1afb5d3a3a86b4a3 10-Mar-2010 John McCall <rjmccall@apple.com> When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
7c2342dd4c9947806842e5aca3d2bb2e542853c9 10-Mar-2010 John McCall <rjmccall@apple.com> When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
6d7b68bd47850e53cdb0b9a7872675ea43715566 10-Mar-2010 John McCall <rjmccall@apple.com> Allow the fast path through ASTContext::getTypeDeclType to be inlined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
becb8d5a6ab5103393eac5344ae69bcb860601dd 10-Mar-2010 John McCall <rjmccall@apple.com> Allow the fast path through ASTContext::getTypeDeclType to be inlined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
cf782a9505cc3747309933f6a245600bfb6fd285 10-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add use-after-free check to MallocChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SVals.h
c8023788ace75cf0a0417b9b88e643ceebae91e2 10-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add use-after-free check to MallocChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SVals.h
55851d6d117e79db3a891bcb821acd19592b2178 10-Mar-2010 John McCall <rjmccall@apple.com> Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
3cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4 10-Mar-2010 John McCall <rjmccall@apple.com> Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
d86c6299ce44f713f34f278d3fc589693bc38415 09-Mar-2010 John McCall <rjmccall@apple.com> Value-initialize the written-builtin-specifiers field of DeclSpec, which
wasn't being initialized properly along the implicit-definition path.
Found by the valgrind buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
b91570a51f9c9583bb27fdfe43ce9c487623999a 09-Mar-2010 John McCall <rjmccall@apple.com> Value-initialize the written-builtin-specifiers field of DeclSpec, which
wasn't being initialized properly along the implicit-definition path.
Found by the valgrind buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
5013f5735d00abecfd6b18fb3ca111ade3415358 08-Mar-2010 Ted Kremenek <kremenek@apple.com> Implement clang_isUnexposed(), a predicate function to simplify filtering out
unexposed AST elements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97985 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ad6eff611a4391f89fd6c458db16993f76e7f5d0 08-Mar-2010 Ted Kremenek <kremenek@apple.com> Implement clang_isUnexposed(), a predicate function to simplify filtering out
unexposed AST elements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97985 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f769e8ab4bd15a1552a6f198a2cd34afa1f02d9a 08-Mar-2010 Ted Kremenek <kremenek@apple.com> Allocate ASTRecordLayout objects using the allocator associated with ASTContext.
This allows them to be allocated using a BumpPtrAllocated
in the common case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
503524acc73f2f8280080ca0d200377406001b65 08-Mar-2010 Ted Kremenek <kremenek@apple.com> Allocate ASTRecordLayout objects using the allocator associated with ASTContext.
This allows them to be allocated using a BumpPtrAllocated
in the common case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
d9e98228e366032d84834ed1c32b202d158eb3e1 08-Mar-2010 John McCall <rjmccall@apple.com> Rename -Wbad-literal to -Wliteral-range.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
9fd4f8989725aa430c0962ced3bb4c8a2662dc3b 08-Mar-2010 John McCall <rjmccall@apple.com> Rename -Wbad-literal to -Wliteral-range.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
f632112b74a7bf5cf966420526faaa6f299ca6e5 08-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Improve XML output for C++ classes, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
07425c9ae12e62572eebc541522c70a73a819c2b 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Improve XML output for C++ classes, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
f03f5f6c50378476d7fd10edfa0ed8f4c01e38da 08-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Extend ObjCMessageExpr for class method sends with the source location
of the class name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
c2350e553b853ad00914faf23fa731e5fc4a8a5c 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Extend ObjCMessageExpr for class method sends with the source location
of the class name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
44032ab343048030bd4332b3e5ccb59974908918 08-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of type source information in the return type of an
Objective-C method declaration, e.g., for

- (Foo *)myMethod;

we now have TypeSourceInfo for the Foo*.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
4bc1cb6aa635a5bf8fae99bf69c56c724c1e786c 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Keep track of type source information in the return type of an
Objective-C method declaration, e.g., for

- (Foo *)myMethod;

we now have TypeSourceInfo for the Foo*.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a6e3243b91839273ab7e8645d35f8a80b240615c 08-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Downgrade errors when trying to catch a pointer or reference to
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.

(For real this time)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a2762918ecc636c9af207ce2a9ce705edad2a444 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Downgrade errors when trying to catch a pointer or reference to
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.

(For real this time)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fb43c41d0b8a23d74b0067195e6ad8467251e299 07-Mar-2010 Chris Lattner <sabre@nondot.org> implement support for -Wno-deprecated, PR6534. While
I'm in there, change the altivec diagnostics to use 'double'
instead of "double" for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
ffaf4c5eb68718841399fc4396f6d53fedad24e2 07-Mar-2010 Chris Lattner <sabre@nondot.org> implement support for -Wno-deprecated, PR6534. While
I'm in there, change the altivec diagnostics to use 'double'
instead of "double" for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
43c2d99f703df1da9b6fd52e46f9c53990250ca4 07-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Rename to addPPCallbacks since we're effectively adding a callback and maybe chaining it to an existing one

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
a5d10c4df435964600e104ebef6a96b106e416b7 07-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Rename to addPPCallbacks since we're effectively adding a callback and maybe chaining it to an existing one

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
30f378ff6f3bc0d5babb16ec177be37751357172 07-Mar-2010 Eric Christopher <echristo@apple.com> Add in movntdqa intrinsic for load hint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
d6b162e7e6f0cc2be634f16f023b65db546cdc4e 07-Mar-2010 Eric Christopher <echristo@apple.com> Add in movntdqa intrinsic for load hint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
7184506fdebed93034d74600134818b373c44f0c 07-Mar-2010 Eric Christopher <echristo@apple.com> Add in dot product intrinsics for dpps and dppd.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
31b2ac71e40c02cb587ebcc24361a6f94f87a7c7 07-Mar-2010 Eric Christopher <echristo@apple.com> Add in dot product intrinsics for dpps and dppd.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
d0f1f3f71e8712cd32ebcf013519620f31d3e81a 07-Mar-2010 Tanya Lattner <tonic@nondot.org> Implement missing-braces warning and add a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
1e1d396dc55002a2a6355048db542a38b5137002 07-Mar-2010 Tanya Lattner <tonic@nondot.org> Implement missing-braces warning and add a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
29a293a8c5e1679cfdfdbd598d989ede5720eff5 06-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Lowercase for consistency

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
e51dd7be67808d52c80c09b832d875e9655ce6e0 06-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Lowercase for consistency

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
dcd6adcc33de98d6c94c52f208b7f1408d78d3d6 06-Mar-2010 Eli Friedman <eli.friedman@gmail.com> PR6515: Implement __builtin_signbit and friends.

I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
ba68b08a05587490ed4c2e3d26f3a742c995c660 06-Mar-2010 Eli Friedman <eli.friedman@gmail.com> PR6515: Implement __builtin_signbit and friends.

I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
704334111420dc14e5787355626a903b34298bd2 05-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to build qualifier on objective-c
pointer types. Fixes radar 7626768.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a42286486c85402c65f9d30df17e6b1b037a6ade 05-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to build qualifier on objective-c
pointer types. Fixes radar 7626768.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
cbc507a3f3660cfa5f3e5e745411b7a4efcf6183 05-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> The Windows build is just too weird; there's no real cost to doing the concurrency checks for ASTUnit in all builds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
667514d92afd1485765cb4e2bbe452883adc989b 05-Mar-2010 Douglas Gregor <dgregor@apple.com> The Windows build is just too weird; there's no real cost to doing the concurrency checks for ASTUnit in all builds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
4ae8f6b1ae99f3c56057508e840a8d00dcc0e755 05-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Switch from NDEBUG to _DEBUG, since our Windows build is funny

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
12312b807e7c00504c2e5b3b5e2d11bfbca4b8d8 05-Mar-2010 Douglas Gregor <dgregor@apple.com> Switch from NDEBUG to _DEBUG, since our Windows build is funny

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
3ccc4b432a29f24fc459f847c42a50521efd5f6e 05-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Only make __ptr64 and __w64 keywords when Microsoft extensions are enabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
47c27a60b70d879495355833b0d6584c8d12296b 05-Mar-2010 Douglas Gregor <dgregor@apple.com> Only make __ptr64 and __w64 keywords when Microsoft extensions are enabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
827cd390c1e7909937b6c1354a5f6befa1e132ce 05-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> A little hack to identify unwanted concurrency in CIndex

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
bdf6062bc10aa3b73b16402b440b8073310acd06 05-Mar-2010 Douglas Gregor <dgregor@apple.com> A little hack to identify unwanted concurrency in CIndex

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
19b65de9c64b1b4ef4d1300a725ebde33c200b1d 05-Mar-2010 Chris Lattner <sabre@nondot.org> Emit warning on indirect goto that potentially violates
scope instead of error, PR6517


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
02db31c62ae6c68b5cbbecd09acbbc09bc03d110 05-Mar-2010 Chris Lattner <sabre@nondot.org> Emit warning on indirect goto that potentially violates
scope instead of error, PR6517


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
69ce237e87c38ff60784afe9bec296f5414f9204 05-Mar-2010 Chris Lattner <sabre@nondot.org> address PR6502 by downgrading the scope checker's address
of label error to a warning controllable with a -W flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fc3a0700bd63716b89eaabfd6a3da34019ffdb2e 05-Mar-2010 Chris Lattner <sabre@nondot.org> address PR6502 by downgrading the scope checker's address
of label error to a warning controllable with a -W flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e8cb63ddda3c7d3c4f641715bd2bc9f6d1ed61b2 05-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove reference to AnalysisContext in Environment. We already have LocationContext
information in ExplodedNode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/SymbolManager.h
c179a7fbb294fe3ff6cf5479f6239a10f39628c7 05-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove reference to AnalysisContext in Environment. We already have LocationContext
information in ExplodedNode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/SymbolManager.h
e9bc8eb41210a241e1b402366f4810c531b15918 05-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> When we invalidate a declaration, make it public, so that it doesn't
trigger access control or one of the many assertions we have for valid
access specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
42738573253da1bd61f9c44f8d77f600d3b0cd1c 05-Mar-2010 Douglas Gregor <dgregor@apple.com> When we invalidate a declaration, make it public, so that it doesn't
trigger access control or one of the many assertions we have for valid
access specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
8a1db93ddce4c6d7c81ce433b512806f3ed4f5b1 04-Mar-2010 Chris Lattner <sabre@nondot.org> add TCE target support, patch by Pekka J!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
3a47c4e0a3e8d13ee4fb06cc3a98f9cfa9982400 04-Mar-2010 Chris Lattner <sabre@nondot.org> add TCE target support, patch by Pekka J!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
72472f40fac205d41f7ba787c1071634820f3249 04-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> The FIXME is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
a857389a7d0dc24e3c89783939232d927391e66e 04-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> The FIXME is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
dca9e9898d5106e4634b07a795a4b425674eb8fe 04-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> When profiling Environment, also profile with AnalysisContext*, bacause
we now may have identical states with different analysis context.

Set the right AnalysisContext in state when entering and leaving a callee.

With both of the above changes, we can pass the test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
57d3b76761bdba265769deb497afa784935602be 04-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> When profiling Environment, also profile with AnalysisContext*, bacause
we now may have identical states with different analysis context.

Set the right AnalysisContext in state when entering and leaving a callee.

With both of the above changes, we can pass the test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/GRState.h
f889e52574b00be87e112ae29e2bc57db24f78e7 04-Mar-2010 John McCall <rjmccall@apple.com> Revert changes r97693, r97700, and r97718.

Our testing framework can't deal with disabled targets yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
468ec6c0266e48fccb26ce50d5b915c645bb3c7b 04-Mar-2010 John McCall <rjmccall@apple.com> Revert changes r97693, r97700, and r97718.

Our testing framework can't deal with disabled targets yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
850e20192ea602882f196f53457f9073a0bba1f4 04-Mar-2010 Eric Christopher <echristo@apple.com> Add in -msse4.1 and -msse4.2 options and continuing a rather
hacky solution for translating. Expanded on comment explaining
the hack a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
d39ebe2d2a24a331b89465191dce061fd9c6b5e4 04-Mar-2010 Eric Christopher <echristo@apple.com> Add in -msse4.1 and -msse4.2 options and continuing a rather
hacky solution for translating. Expanded on comment explaining
the hack a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
8cef3bac6f95ba6151becfa04577ae8ef6937f6b 04-Mar-2010 Eric Christopher <echristo@apple.com> Fix __builtin_ia32_roundss and __builtin_ia32_roundsd definitions.
Re-enable test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
2ac7472f87cdb157f23ef47422d3dcf1bc66013a 04-Mar-2010 Eric Christopher <echristo@apple.com> Fix __builtin_ia32_roundss and __builtin_ia32_roundsd definitions.
Re-enable test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
bbdb752100cfd5649ea5e1264e5be51950bdac25 04-Mar-2010 John McCall <rjmccall@apple.com> Create a TargetMachine whenever we create a CodeGenAction. The codegen of
some builtins will rely on target knowledge.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
c9fe644675503894e9e76e8ecd8e6519426548de 04-Mar-2010 John McCall <rjmccall@apple.com> Create a TargetMachine whenever we create a CodeGenAction. The codegen of
some builtins will rely on target knowledge.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
b45275280c16fb078d3eb2826a829a75eeb1fc89 03-Mar-2010 Chris Lattner <sabre@nondot.org> add framework for ARM builtins, Patch by Edmund Grimley Evans!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
lang/Basic/TargetBuiltins.h
2752c0137d95aa2f4ee1cdff4b564bac842e041b 03-Mar-2010 Chris Lattner <sabre@nondot.org> add framework for ARM builtins, Patch by Edmund Grimley Evans!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsARM.def
lang/Basic/TargetBuiltins.h
9792fb282311f93cf1cc0ef7210b2040c189d2ca 03-Mar-2010 Ted Kremenek <kremenek@apple.com> Add clang_getCursorLinkage(), which returns the
underlying linkage for the entity referred to by a
CXCursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97646 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
16b4259aecaa22b642d35d36fd89965ed700c1e0 03-Mar-2010 Ted Kremenek <kremenek@apple.com> Add clang_getCursorLinkage(), which returns the
underlying linkage for the entity referred to by a
CXCursor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97646 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
09039e83ed2d4679928c69865dc19a8a1ffbfb5a 03-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Implement name hiding for names found through virtual base subobjects
that are hidden by other derived base subobjects reached along a
lookup path that does *not* pass through the hiding subobject (C++
[class.member.lookup]p6). Fixes PR6462.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
4e6ba4be8ddeca2978da6b9bae02cbe9594f2ef4 03-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement name hiding for names found through virtual base subobjects
that are hidden by other derived base subobjects reached along a
lookup path that does *not* pass through the hiding subobject (C++
[class.member.lookup]p6). Fixes PR6462.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e63aca1ffde2b363bbce66847a14672c354e6149 03-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Refactor CXXRecordDecl::lookupInBases() to push the recursion down a
level. No functionality change, and it obeys access control this
time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
89b7702c9a64e12093ed34fc02dc3cfbb6eb133a 03-Mar-2010 Douglas Gregor <dgregor@apple.com> Refactor CXXRecordDecl::lookupInBases() to push the recursion down a
level. No functionality change, and it obeys access control this
time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
38e21c3676cc46ef0ed2f3c2a09b7c5dc8d1384e 03-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Initialize your storage, dummy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e4687ef4b9c72e1c476fce27d0abc1a2f78f739c 03-Mar-2010 Douglas Gregor <dgregor@apple.com> Initialize your storage, dummy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0464fbe197b98ca4154939e3964b615d02729635 03-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the static map of overridden C++ methods, which was going to
come back to bite us at some point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7d10b7eb670b821741b4c96f6cf7afbc3bb39abe 03-Mar-2010 Douglas Gregor <dgregor@apple.com> Eliminate the static map of overridden C++ methods, which was going to
come back to bite us at some point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
da0d7e9f109e25fe13406cf43f83b51bbce0d2f1 02-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Bump the default maximum template-instantiation depth to 500, as in
GCC. Fixes PR6301.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
0268181bf8e1e561e2a51474ffad9f46b1c3f85d 02-Mar-2010 Douglas Gregor <dgregor@apple.com> Bump the default maximum template-instantiation depth to 500, as in
GCC. Fixes PR6301.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
befd3eac9dd217a76f139bddc714f35e26688467 02-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Diagnose the declaration of enum templates. Also, be a bit more
careful about value-dependent enumerators. Fixes PR5786.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
9b9edd619a7e616d3287435cb5a3f9b1aea648e8 02-Mar-2010 Douglas Gregor <dgregor@apple.com> Diagnose the declaration of enum templates. Also, be a bit more
careful about value-dependent enumerators. Fixes PR5786.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
4eb288f0e3e0faefaad0df73ab5cfba8fa260d28 02-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Move Emit24 to clang::io

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
be08ac7afbb2aca5f6718687787658a928599b21 02-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Move Emit24 to clang::io

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
77bc0861dbaa71d07b49cfc29d5b4db6cf9f1c01 02-Mar-2010 John McCall <rjmccall@apple.com> Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word; this
comports with typical usage (i.e. the one use I know of).

I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
d0b76ca10feefcfda5cb16698e50197e87a7d876 02-Mar-2010 John McCall <rjmccall@apple.com> Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word; this
comports with typical usage (i.e. the one use I know of).

I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
28bbcd9f68afe54de87957346328c8165afec53a 02-Mar-2010 John McCall <rjmccall@apple.com> After much consultation aimed at figuring out what this builtin actually
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
5e11085830d4d4c53ff75575ab75889ee5126854 02-Mar-2010 John McCall <rjmccall@apple.com> After much consultation aimed at figuring out what this builtin actually
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
0d432abff06e87a821e4b337339857ff8ea713a4 02-Mar-2010 John McCall <rjmccall@apple.com> Split out types that are non-canonical unless dependent as their own
category. Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing. Provide terrible manglings for typeof. Mangle
decltype with some hope of accuracy.

Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeNodes.def
ad5e73887052193afda72db8efcb812bd083a4a8 02-Mar-2010 John McCall <rjmccall@apple.com> Split out types that are non-canonical unless dependent as their own
category. Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing. Provide terrible manglings for typeof. Mangle
decltype with some hope of accuracy.

Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeNodes.def
1087f6972103fe8a2e0a5026745dc8a9b352b483 02-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Unbreak the build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
d6d4fcf7fd2cdb8c75e6feb5ab1a7132784e96e1 02-Mar-2010 Douglas Gregor <dgregor@apple.com> Unbreak the build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
d7f8107698d90ee34b13606ffcb2c1b217e0d69f 02-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Keep an explicit stack of function and block scopes, each element of
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.

The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.

Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
9ea9bdbc14374f7bacdb50d3e52c664ff12150ff 02-Mar-2010 Douglas Gregor <dgregor@apple.com> Keep an explicit stack of function and block scopes, each element of
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.

The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.

Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
3cf7ccad96dc226ba1629be8545cddbbc000806d 01-Mar-2010 Chris Lattner <sabre@nondot.org> Implement jump checking for initialized c++ variables, implementing
a fixme and PR6451.

Only perform jump checking if the containing function has no errors,
and add the infrastructure needed to do this.

On the testcase in the PR, we produce:

t.cc:6:3: error: illegal goto into protected scope
goto later;
^
t.cc:7:5: note: jump bypasses variable initialization
X x;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6d97e5e4b7abdae710c2548b51f4ed0298e86d80 01-Mar-2010 Chris Lattner <sabre@nondot.org> Implement jump checking for initialized c++ variables, implementing
a fixme and PR6451.

Only perform jump checking if the containing function has no errors,
and add the infrastructure needed to do this.

On the testcase in the PR, we produce:

t.cc:6:3: error: illegal goto into protected scope
goto later;
^
t.cc:7:5: note: jump bypasses variable initialization
X x;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bbba89cb63b719b3295ee0955c6e8806e8012a13 01-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Robustify instantiation of templates when there are errors in the
template definition. Do this both by being more tolerant of errors in
our asserts and by not dropping a variable declaration completely when
its initializer is ill-formed. Fixes the crash-on-invalid in PR6375,
but not the original issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
00225547b51b42f7400eed36475b6672418a1151 01-Mar-2010 Douglas Gregor <dgregor@apple.com> Robustify instantiation of templates when there are errors in the
template definition. Do this both by being more tolerant of errors in
our asserts and by not dropping a variable declaration completely when
its initializer is ill-formed. Fixes the crash-on-invalid in PR6375,
but not the original issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
4d11decf65a50cde9780eb46f92e7f7c90117856 01-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> When looking for the instantiated declaration that corresponds to a
given declaration in a template, make sure that the context we're
searching through is complete. Fixes PR6376.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7c1e98f1cb37b40e619a0c8aee8b337f037b432b 01-Mar-2010 Douglas Gregor <dgregor@apple.com> When looking for the instantiated declaration that corresponds to a
given declaration in a template, make sure that the context we're
searching through is complete. Fixes PR6376.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1c9bebef96489ae7486ddc68449f3e043bf61074 01-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Since now we store the cast type with an ElementRegion, there is
no need to store a type with SymbolRegionValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
14d2328ecfc5102b077fa2c2c129dce1574c8831 01-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Since now we store the cast type with an ElementRegion, there is
no need to store a type with SymbolRegionValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
8bba8d7d4a3081b61bccb3230e607a2d7c0560cb 01-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SymbolManager.h
a51ff6380664b4846d846a4aee054668d89fa7d8 01-Mar-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SymbolManager.h
0cc133ed9027ddedb91c47539db95e83d50b203a 28-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Pass '-no-canonical-prefixes' on down to GCC. It's not specific to the Clang
driver and was in fact based on a feature in GCC. =]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
3363b35e518c28b504d4a600dc8cb168324b17d5 28-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Pass '-no-canonical-prefixes' on down to GCC. It's not specific to the Clang
driver and was in fact based on a feature in GCC. =]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
30d0edb5d589794e41e3cd2f293bc311f03cf2c6 28-Feb-2010 Chris Lattner <sabre@nondot.org> pull some altivec stuff out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1b49242de4e8bc718d7611c33a1d76ce35864020 28-Feb-2010 Chris Lattner <sabre@nondot.org> pull some altivec stuff out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
97d35a2f4f6cb1cc51e48cfd1841c7fd5a5f5377 28-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Warn about the deprecated string literal -> char* conversion. Fixes PR6428.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a9bff30776888977f580c9cac212fd1583ee963e 28-Feb-2010 Douglas Gregor <dgregor@apple.com> Warn about the deprecated string literal -> char* conversion. Fixes PR6428.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7e8e79e3189954e597867eb91104ff761f80be92 28-Feb-2010 Chris Lattner <sabre@nondot.org> Implement PR6423 by using one token of lookahead to disambiguate
an *almost* always incorrect case. This only does the lookahead
in the insanely unlikely case, so it shouldn't impact performance.

On this testcase:

struct foo {
}
typedef int x;

Before:

t.c:3:9: error: cannot combine with previous 'struct' declaration specifier
typedef int x;
^

After:

t.c:2:2: error: expected ';' after struct
}
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b3a4e432c90be98c6d918087750397e86d030368 28-Feb-2010 Chris Lattner <sabre@nondot.org> Implement PR6423 by using one token of lookahead to disambiguate
an *almost* always incorrect case. This only does the lookahead
in the insanely unlikely case, so it shouldn't impact performance.

On this testcase:

struct foo {
}
typedef int x;

Before:

t.c:3:9: error: cannot combine with previous 'struct' declaration specifier
typedef int x;
^

After:

t.c:2:2: error: expected ';' after struct
}
^
;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0e0d6f7b998e5e1e445e460c5b628c019a5a078b 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Move method out-of-line. I thought this would be a candidate for inlining but I was wrong.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
51f5fe3f2527cd1640d798d8d134268b14de3e86 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Move method out-of-line. I thought this would be a candidate for inlining but I was wrong.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
882a9fe532294c81483fc7fb122c8e5b98a53bd8 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix thinko.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
a15e7eaea9e63f58d1a7e72ed167cbb244da438a 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix thinko.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
62755a5da7e2f51f0d1794024f58bd3797457dd6 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Add an overload of Preprocessor::getSpelling which takes a SmallVector and
returns a StringRef. Use it to simplify some repetitive code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ddeea5644367c9c153c9fee9e51bdea85ce43cbd 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Add an overload of Preprocessor::getSpelling which takes a SmallVector and
returns a StringRef. Use it to simplify some repetitive code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
42a563bcf606a8d7ee96a367b0ee96028bef15e3 27-Feb-2010 Ted Kremenek <kremenek@apple.com> Add reference to positional arguments documentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
de431c2dc7ec3592327ab23ae315fc915c549f05 27-Feb-2010 Ted Kremenek <kremenek@apple.com> Add reference to positional arguments documentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
62f46195bb61f91f9b3b476f4dcfa10126c18ff2 27-Feb-2010 Ted Kremenek <kremenek@apple.com> For printf format string checking, add support for positional format strings.
Along the way, coelesce some of the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
efaff195ba1fa55b6fe0b0b2435b81451387d241 27-Feb-2010 Ted Kremenek <kremenek@apple.com> For printf format string checking, add support for positional format strings.
Along the way, coelesce some of the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
062b3674fbc078a2612c77ea07b2670cfdac3477 27-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> When given unsaved files in clang_createTranslationUnitFromSourceFile,
copy the source buffers provided rather than referencing them
directly, so that the caller can free those buffers immediately after
calling clang_createTranslationUnitFromSourceFile(). Otherwise, we
risk hitting those buffers later (when building source ranges, forming
diagnostics, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97296 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c8dfe5ece04e683106eb96c58a2999f70b53ac21 27-Feb-2010 Douglas Gregor <dgregor@apple.com> When given unsaved files in clang_createTranslationUnitFromSourceFile,
copy the source buffers provided rather than referencing them
directly, so that the caller can free those buffers immediately after
calling clang_createTranslationUnitFromSourceFile(). Otherwise, we
risk hitting those buffers later (when building source ranges, forming
diagnostics, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97296 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
372a8301ff5f833ee54ed0f9bd64803c4082bda6 27-Feb-2010 John McCall <rjmccall@apple.com> Put BadLiteral in the NonGCC group. I'd completely forgotten about this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
e71ef1a4235af7259fcd3a820ca28e2fbd35d169 27-Feb-2010 John McCall <rjmccall@apple.com> Put BadLiteral in the NonGCC group. I'd completely forgotten about this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
590e10016ca12b2a462099ae29801cc412fa8edd 27-Feb-2010 John McCall <rjmccall@apple.com> At sabre's request, drop the FP bounds diagnostics down to warnings and file
them under -Wbad-literal. They're still on by default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
2a0d7574acaa3a8d516e9ae4b720755460ebe8a8 27-Feb-2010 John McCall <rjmccall@apple.com> At sabre's request, drop the FP bounds diagnostics down to warnings and file
them under -Wbad-literal. They're still on by default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
42f1adfc93e40ec0d8d4e7ceaac2dd664b1cb727 26-Feb-2010 Ted Kremenek <kremenek@apple.com> For printf format string checking, move the tracking of the data argument index out of
Sema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine
what arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
7f70dc85d5055c19c8003f43a59135de211ad1b9 26-Feb-2010 Ted Kremenek <kremenek@apple.com> For printf format string checking, move the tracking of the data argument index out of
Sema and into analyze_printf::ParseFormatString(). Also use a bitvector to determine
what arguments have been covered (instead of just checking to see if the last argument consumed is the max argument). This is prep. for support positional arguments (an IEEE extension).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
3ec1c920afae810cb73194dee7e3280e7ffbc786 26-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Make the destructor public. ddunbar, lemme know if you'd prefer a different
fix, just trying to get the build bots happy again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenAction.h
f84df9f076038ad16e1ee412162c328cd091bc59 26-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Make the destructor public. ddunbar, lemme know if you'd prefer a different
fix, just trying to get the build bots happy again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenAction.h
abdf33b89055602bb9234e7d45916c1687ccbe9f 26-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Make GDM private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
8fc19872bc0921d8f7af25e91bf95afd7c7cd6df 26-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Make GDM private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
065a870017fed93c2515b83da406bb89c66e0a0b 26-Feb-2010 John McCall <rjmccall@apple.com> Fix an assertion-on-error during tentative constructor parsing by
propagating error conditions out of the various annotate-me-a-snowflake
routines. Generally (but not universally) removes redundant diagnostics
as well as, you know, not crashing on bad code. On the other hand,
I have just signed myself up to fix fiddly parser errors for the next
week. Again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9ba6166f4a78722e7df8ffbd64eb788bfdf2764a 26-Feb-2010 John McCall <rjmccall@apple.com> Fix an assertion-on-error during tentative constructor parsing by
propagating error conditions out of the various annotate-me-a-snowflake
routines. Generally (but not universally) removes redundant diagnostics
as well as, you know, not crashing on bad code. On the other hand,
I have just signed myself up to fix fiddly parser errors for the next
week. Again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d56fc0f9970dd972e6e0109a0d8d86cc7f91b59d 26-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement semantic analysis for C++ [expr.new]p18-20, which describe
how we find the operator delete that matches withe operator new we
found in a C++ new-expression.

This will also need CodeGen support. On a happy note, we're now a
"nans" away from building tramp3d-v4.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6d90870fe821a9b1a7822d3e28032042d03e5680 26-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement semantic analysis for C++ [expr.new]p18-20, which describe
how we find the operator delete that matches withe operator new we
found in a C++ new-expression.

This will also need CodeGen support. On a happy note, we're now a
"nans" away from building tramp3d-v4.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c9690daee4b38344cc1c7b7d01c8ecf21d2d1a92 26-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove derelict GRStmtNodeBuilder::LastNode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
25108a5d52a302d9319099001ea50e7c684669a3 26-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove derelict GRStmtNodeBuilder::LastNode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
cc392fc654e59b8d55df3901a82b193845ee44f4 26-Feb-2010 John McCall <rjmccall@apple.com> Use the power of types to track down another canonicalization bug in
the ABI-computation interface. Fixes <rdar://problem/7691046>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
ead608af31b6c9abeae1ca6d0b75094dac4641c0 26-Feb-2010 John McCall <rjmccall@apple.com> Use the power of types to track down another canonicalization bug in
the ABI-computation interface. Fixes <rdar://problem/7691046>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
5dfd9b7757839cadd1228e609ac9e098c4a3e279 25-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> When computing the composite pointer type for relational comparisons,
equality comparisons, and conditional operators, produce a composite
pointer type with the appropriate additional "const" qualifiers if the
pointer types would otherwise be incompatible. This is a small
extension (also present in GCC and EDG in a slightly different form)
that permits code like:

void** i; void const** j;
i == j;

with the following extwarn:

t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and
'void const **') uses non-standard composite pointer type
'void const *const *' [-pedantic]
i == j;
~ ^ ~

Fixes PR6346, and I'll be filing a core issue about this with the C++
committee.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b2cb1cbd727469e1567a6f2535895e6b64e12c35 25-Feb-2010 Douglas Gregor <dgregor@apple.com> When computing the composite pointer type for relational comparisons,
equality comparisons, and conditional operators, produce a composite
pointer type with the appropriate additional "const" qualifiers if the
pointer types would otherwise be incompatible. This is a small
extension (also present in GCC and EDG in a slightly different form)
that permits code like:

void** i; void const** j;
i == j;

with the following extwarn:

t.cpp:5:5: warning: comparison of distinct pointer types ('void **' and
'void const **') uses non-standard composite pointer type
'void const *const *' [-pedantic]
i == j;
~ ^ ~

Fixes PR6346, and I'll be filing a core issue about this with the C++
committee.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c82b30d60137ab0f87ac75a1078c8f3285f7b630 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Move ~CodeGenAction out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenAction.h
9ad1c0205ec478d64b3ed6d3dde5efaa9c9932c5 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Move ~CodeGenAction out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenAction.h
17204fa2f4cf2aa94c7edfe0b7cfd6135b24e434 25-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Restore Zhongxing's commits r97122 r97127 r97129 r97131 which were reverted due to a Clang-on-Clang failure

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
102acd5369bbb17c0d6ab868af376671acff7a93 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Restore Zhongxing's commits r97122 r97127 r97129 r97131 which were reverted due to a Clang-on-Clang failure

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
16a764c98d732a774c588be441a01c71e5c22eb9 25-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert patches r97122 r97127 r97129 r97131.
They were breaking clang-x86_64-darwin10-selfhost

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
2b706e56b57c9646dae8c9134d8614fe815a1873 25-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert patches r97122 r97127 r97129 r97131.
They were breaking clang-x86_64-darwin10-selfhost

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
9726c91b908dd4ae12c82a6f7c1fd2e282865c35 25-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move the dead bindings removal logic from CallInliner to GRExprEngine::ProcessCallExit().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
9a9f627f3bc0b0eb948a8b95806383afd72c374e 25-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move the dead bindings removal logic from CallInliner to GRExprEngine::ProcessCallExit().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRCoreEngine.h
9110ff960b44f6c5718dba26dbedd86dc37edc74 25-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Call inliner improvements:

This patch implements the CallEnter/CallExit idea of Ted.

Add two interfaces to GRSubEngine: ProcessCallEnter, ProcessCallExit.

The CallEnter program point uses caller's location context. The
CallExit program point uses callee's location context.

CallEnter is built by GRStmtNodeBuilder. CallExit is built by
GREndPathNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
833e50e6a2c246dbc4b3c17b7c9d657c5b5d333e 25-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Call inliner improvements:

This patch implements the CallEnter/CallExit idea of Ted.

Add two interfaces to GRSubEngine: ProcessCallEnter, ProcessCallExit.

The CallEnter program point uses caller's location context. The
CallExit program point uses callee's location context.

CallEnter is built by GRStmtNodeBuilder. CallExit is built by
GREndPathNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRSubEngine.h
d8fa1bf0cf60f7c0dd5a35288284215288264851 25-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Restore the invariant that a nested-name-specifier can only contain
class types, dependent types, and namespaces. I had previously
weakened this invariant while working on parsing pseudo-destructor
expressions, but recent work in that area has made these changes
unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
edc90500b1d2587bf0b698fada14537d6741fddf 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Restore the invariant that a nested-name-specifier can only contain
class types, dependent types, and namespaces. I had previously
weakened this invariant while working on parsing pseudo-destructor
expressions, but recent work in that area has made these changes
unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2a0f7e6f0d52ccefe975e742e1f5cbc12d326c84 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add CodeGenAction::takeModule().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenAction.h
b954e98893505d401acddac42650a81b83d8dc39 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add CodeGenAction::takeModule().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CodeGenAction.h
862caa4ea60245bec0c4355ad0ada4ef99248b56 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.

This is the way I would like to move the frontend function towards -- distinct
pieces of functionality should be exposed only via FrontendAction
implementations which have clean and relatively-stable APIs.

This also isolates the surface area in clang which depends on LLVM CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/CodeGenAction.h
lang/Frontend/FrontendActions.h
4ee34616c6fa7700e27c0a5311718d844cbb7d2c 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.

This is the way I would like to move the frontend function towards -- distinct
pieces of functionality should be exposed only via FrontendAction
implementations which have clean and relatively-stable APIs.

This also isolates the surface area in clang which depends on LLVM CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/CodeGenAction.h
lang/Frontend/FrontendActions.h
6fcbb37b212f4b27c8f31bd00375056f9b78a5e8 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow driver title (for --help) to be overridden by clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
43302d4144b5291961aa160d2fe191c09a9d8ad1 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow driver title (for --help) to be overridden by clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
2d70af2a2e753b67f986c7ed8611d7bc25344040 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Add TextDiagnosticPrinter::setPrefix, for adding a string to prefix diagnostic
messages with.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
b96b6709fbf5044ab06223ebfefccd58d7aaa88b 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Add TextDiagnosticPrinter::setPrefix, for adding a string to prefix diagnostic
messages with.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
7245a51b0677dec904fff139ee23b375c238a78d 25-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Use CXXPseudoDestructorExpr as the stored representation for dependent
expressions that look like pseudo-destructors, e.g.,

p->T::~T()

where p has dependent type.

At template instantiate time, we determine whether we actually have a
pseudo-destructor or a member access, and funnel down to the
appropriate routine in Sema.

Fixes PR6380.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a2e7dd2f4a50d835351153aee568d35ccc986310 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Use CXXPseudoDestructorExpr as the stored representation for dependent
expressions that look like pseudo-destructors, e.g.,

p->T::~T()

where p has dependent type.

At template instantiate time, we determine whether we actually have a
pseudo-destructor or a member access, and funnel down to the
appropriate routine in Sema.

Fixes PR6380.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
4f557fe5b848b1cdeafc57b615db27966cf328e6 25-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of the location of the '~' in a pseudo-destructor expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
fce46ee68f779e239826e69e45d01d4c8e5323ca 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Keep track of the location of the '~' in a pseudo-destructor expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
73ec616e0974b9bcc911323653706a853589fc71 25-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Retain complete source information for the type after the '~' in a
CXXPseudoDestructorExpr.

Update template instantiation for pseudo-destructor expressions to use
this source information and to make use of
Sema::BuildPseudoDestructorExpr when the base expression is dependent
or refers to a scalar type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
26d4ac97fb514bb60c2536eae6f203dc569159d9 25-Feb-2010 Douglas Gregor <dgregor@apple.com> Retain complete source information for the type after the '~' in a
CXXPseudoDestructorExpr.

Update template instantiation for pseudo-destructor expressions to use
this source information and to make use of
Sema::BuildPseudoDestructorExpr when the base expression is dependent
or refers to a scalar type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
0bd6205193f5c0865b47202d1da8fd9c7ddfa569 24-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Retain source information for the "type-name ::" in a
pseudo-destructor expression such as

p->T::~T()



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e0601ea1220348957dacec5f3dd0707837365290 24-Feb-2010 Douglas Gregor <dgregor@apple.com> Retain source information for the "type-name ::" in a
pseudo-destructor expression such as

p->T::~T()



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
32c627e217b55256110f5d7adfd6bff6dd33169a 24-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> ActOnPseudoDestructorExpr now performs all semantic analysis for
pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr
node directly. Currently, this only affects pseudo-destructor
expressions when they are parsed, but not after template
instantiation. That's coming next...

Improve parsing of pseudo-destructor-names. When parsing the
nested-name-specifier and we hit the sequence of tokens X :: ~, query
the actual module to determine whether X is a type-name (in which case
the X :: is part of the pseudo-destructor-name but not the
nested-name-specifier) or not (in which case the X :: is part of the
nested-name-specifier).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
77549080fb7b9af31606b3c1b4830a94429fb1fd 24-Feb-2010 Douglas Gregor <dgregor@apple.com> ActOnPseudoDestructorExpr now performs all semantic analysis for
pseudo-destructor expressions, and builds the CXXPseudoDestructorExpr
node directly. Currently, this only affects pseudo-destructor
expressions when they are parsed, but not after template
instantiation. That's coming next...

Improve parsing of pseudo-destructor-names. When parsing the
nested-name-specifier and we hit the sequence of tokens X :: ~, query
the actual module to determine whether X is a type-name (in which case
the X :: is part of the pseudo-destructor-name but not the
nested-name-specifier) or not (in which case the X :: is part of the
nested-name-specifier).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
fe7abb31d96e05180de719014c6a6d3a90d36e92 24-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Rework parsing of pseudo-destructor expressions and explicit
destructor calls, e.g.,

p->T::~T

We now detect when the member access that we've parsed, e.g.,

p-> or x.

may be a pseudo-destructor expression, either because the type of p or
x is a scalar or because it is dependent (and, therefore, may become a
scalar at template instantiation time).

We then parse the pseudo-destructor grammar specifically:

::[opt] nested-name-specifier[opt] type-name :: ∼ type-name

and hand those results to a new action, ActOnPseudoDestructorExpr,
which will cope with both dependent member accesses of destructors and
with pseudo-destructor expressions.

This commit affects the parsing of pseudo-destructors, only; the
semantic actions still go through the semantic actions for member
access expressions. That will change soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
d4dca08d6b7ed2e3e3718caa6fd735960b135e9a 24-Feb-2010 Douglas Gregor <dgregor@apple.com> Rework parsing of pseudo-destructor expressions and explicit
destructor calls, e.g.,

p->T::~T

We now detect when the member access that we've parsed, e.g.,

p-> or x.

may be a pseudo-destructor expression, either because the type of p or
x is a scalar or because it is dependent (and, therefore, may become a
scalar at template instantiation time).

We then parse the pseudo-destructor grammar specifically:

::[opt] nested-name-specifier[opt] type-name :: ∼ type-name

and hand those results to a new action, ActOnPseudoDestructorExpr,
which will cope with both dependent member accesses of destructors and
with pseudo-destructor expressions.

This commit affects the parsing of pseudo-destructors, only; the
semantic actions still go through the semantic actions for member
access expressions. That will change soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
b8b85cd2b6e01ef1b62ac10a88b7e8a4b5ec9854 24-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
152e785ce6cbbc068a5240daf7f3daacc7000bf4 24-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Checker.h
59b4e1fe167ba8d40d5de35825a40be2d241928b 24-Feb-2010 Ted Kremenek <kremenek@apple.com> Add support for '%C' and '%S' printf conversion specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
87260c7eabf88eb2009ba2ba20150cd897483241 24-Feb-2010 Ted Kremenek <kremenek@apple.com> Add support for '%C' and '%S' printf conversion specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
76741ab2cc358fa7b9287607d06b171ae9691d6b 23-Feb-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
11e8ce7380856abee188b237c2600272df2ed09d 23-Feb-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
48913fa37e15c0644911bffb2282c26aae253f40 23-Feb-2010 Blaine Garst <blaine@apple.com> Unconditionally support block introspection data in a new field at the end
of the block descriptor field. This field is the ObjC style @encode
signature of the implementation function, and was to this point
conditionally provided in the block literal data structure. That
provisional support is removed.

Additionally, eliminate unused enumerations for the block literal flags field.
The first shipping ABI unconditionally set (1<<29) but this bit is unused
by the runtime, so the second ABI will unconditionally have (1<<30) set so
that the runtime can in fact distinguish whether the additional data is
present or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.td
2a7eb28397148079cbc8e54e8a3871ef01c4f4bc 23-Feb-2010 Blaine Garst <blaine@apple.com> Unconditionally support block introspection data in a new field at the end
of the block descriptor field. This field is the ObjC style @encode
signature of the implementation function, and was to this point
conditionally provided in the block literal data structure. That
provisional support is removed.

Additionally, eliminate unused enumerations for the block literal flags field.
The first shipping ABI unconditionally set (1<<29) but this bit is unused
by the runtime, so the second ABI will unconditionally have (1<<30) set so
that the runtime can in fact distinguish whether the additional data is
present or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.td
bb9e09b399774afe1988fb17b7f2854a66f5480b 23-Feb-2010 Daniel Dunbar <daniel@zuster.org> Fix bogus diagnostic format string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
32141c8f69a6a51d7cf95a18229cd335ecd59903 23-Feb-2010 Daniel Dunbar <daniel@zuster.org> Fix bogus diagnostic format string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
c6c8c8187e9210f5ad3e24f21da12ef1e455471c 23-Feb-2010 Ted Kremenek <kremenek@apple.com> Move the rest of the unreachable code analysis from libSema
to libAnalysis (with only the error reporting in libSema).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ReachableCode.h
72919a334752bc87001a7e3a0b6e5892768fac20 23-Feb-2010 Ted Kremenek <kremenek@apple.com> Move the rest of the unreachable code analysis from libSema
to libAnalysis (with only the error reporting in libSema).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ReachableCode.h
f88ce84475743f4f9308f3598dc8b584d3e4d914 23-Feb-2010 Ted Kremenek <kremenek@apple.com> Add missing header file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ReachableCode.h
e5064ab8a8be7fbb8bb9727bea954c9fea7b40ab 23-Feb-2010 Ted Kremenek <kremenek@apple.com> Add missing header file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/ReachableCode.h
278a77e1278a5ec9574254e51da33a3b803690d4 23-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> More support for ivars in class extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96850 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0e5ad255729ee86b8ed57e659029008984517cde 23-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> More support for ivars in class extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96850 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8d3067d2cbc6bcbee9896fc8ee55e12b0958cbb3 23-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Correct comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
46f35f3660903a98ba16a74fe9302dc09b2c37b5 23-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Correct comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
b85912f3fa881281f014555108851086a1bfb73a 23-Feb-2010 John McCall <rjmccall@apple.com> Perform two more constructor/destructor code-size optimizations:

1) emit base destructors as aliases to their unique base class destructors
under some careful conditions. This is enabled for the same targets that can
support complete-to-base aliases, i.e. not darwin.

2) Emit non-variadic complete constructors for classes with no virtual bases
as calls to the base constructor. This is enabled on all targets and in
theory can trigger in situations that the alias optimization can't (mostly
involving virtual bases, mostly not yet supported).

These are bundled together because I didn't think it worthwhile to split them,
not because they really need to be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
c0bf462cf35fe050bddbd8bff967298e4a67e79d 23-Feb-2010 John McCall <rjmccall@apple.com> Perform two more constructor/destructor code-size optimizations:

1) emit base destructors as aliases to their unique base class destructors
under some careful conditions. This is enabled for the same targets that can
support complete-to-base aliases, i.e. not darwin.

2) Emit non-variadic complete constructors for classes with no virtual bases
as calls to the base constructor. This is enabled on all targets and in
theory can trigger in situations that the alias optimization can't (mostly
involving virtual bases, mostly not yet supported).

These are bundled together because I didn't think it worthwhile to split them,
not because they really need to be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
983dbc222ac25520aea4e0e7250d93f570828944 23-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Rework the CIndex API for displaying diagnostics. Instead of printing
the diagnostics to a FILE*, return a CXString containing the formatted
diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96823 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
274f1906f12ebf8fcc179701deeda6d3271120c1 23-Feb-2010 Douglas Gregor <dgregor@apple.com> Rework the CIndex API for displaying diagnostics. Instead of printing
the diagnostics to a FILE*, return a CXString containing the formatted
diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96823 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2ec53ace49e57fb85ba50676c71ec2f98f3096cc 23-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Early support for declaring ivars in class extensions. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
83c481ade785a919ba21a33f9a8b1b21c1212fb3 23-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Early support for declaring ivars in class extensions. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
527297069fe03fe093e4a63e3f08adbc30e15993 22-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
44b713938266685b1b1dd452a672f9f21b6060f8 22-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
9bc588ad899057f6f3c1b66533a7555eb33253ef 22-Feb-2010 Chris Lattner <sabre@nondot.org> Add 'previous declaration is here' note for param redefinition
errors, e.g.:

t.c:1:21: error: redefinition of parameter 'x'
int test(int x, int x);
^
t.c:1:14: note: previous declaration is here
int test(int x, int x);
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d84aac17180075e0ede53d7762b73d3bd079b52f 22-Feb-2010 Chris Lattner <sabre@nondot.org> Add 'previous declaration is here' note for param redefinition
errors, e.g.:

t.c:1:21: error: redefinition of parameter 'x'
int test(int x, int x);
^
t.c:1:14: note: previous declaration is here
int test(int x, int x);
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e08f580e7d5f1a9f88448d269395f7a51971d729 21-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the default arguments to ASTContext::getFunctionType(),
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
ce056bcaa1c97b89a4b2de2112c62d060863be2b 21-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate the default arguments to ASTContext::getFunctionType(),
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
a15729f7a0d0391655a75b8eeab0813b92395be9 21-Feb-2010 Daniel Dunbar <daniel@zuster.org> Spell string.h correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
f7bb329deb2f8ce9ae7f187d6fbe0f98deaeed0d 21-Feb-2010 Daniel Dunbar <daniel@zuster.org> Spell string.h correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
bacdbd45a4f512fb59d4976dcc0d5484ffffee3a 21-Feb-2010 Daniel Dunbar <daniel@zuster.org> Add missing include, noticed by ace2001ac on IRC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
26f178696e90cdf950dce26ccd1fe19a46537999 21-Feb-2010 Daniel Dunbar <daniel@zuster.org> Add missing include, noticed by ace2001ac on IRC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
b574aa7ed9e7df5cc09e4e6298aa7d83589625a8 21-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g.,

typedef int Int;
int *p;
p->Int::~Int();

This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
b10cd04880672103660e5844e51ee91af7361a20 21-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement support for parsing pseudo-destructor expression with a nested-name-specifier, e.g.,

typedef int Int;
int *p;
p->Int::~Int();

This weakens the invariant that the only types in nested-name-specifiers are tag types (restricted to class types in C++98/03). However, we weaken this invariant as little as possible, accepting arbitrary types in nested-name-specifiers only when we're in a member access expression that looks like a pseudo-destructor expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
4906ddb118727fae0bfce803eb4c6cdcacce3070 21-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement PCH support for C++ namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96738 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
0cef483f3b9d6a7f9fdbc5910d0a3ed64130e8e1 21-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement PCH support for C++ namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96738 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
b30152fd8308b0351e7f377a5dbed95aa8ff5cee 21-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Make Decl::isOutOfLine() virtual, and use that to determine when definitions
are for out of line declarations more easily. This simplifies the logic and
handles the case of out-of-line class definitions correctly. Fixes PR6107.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
8761d680eaa7386e03f51286f4b84a1ffe575e2e 21-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Make Decl::isOutOfLine() virtual, and use that to determine when definitions
are for out of line declarations more easily. This simplifies the logic and
handles the case of out-of-line class definitions correctly. Fixes PR6107.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
c88e462ec769f8dbdb1eff519d59986c175eeafe 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Start supporting declaration of ivars in @implementation
blocks. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bd94d442f6801a4d2a25d53c1843690533180a6d 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Start supporting declaration of ivars in @implementation
blocks. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2d7436407181d647d5816f39b1fc5d37c49c1c6a 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Issue extended diagnostic when property dot-syntax is used and
there is a setter but no getter (part of radar 7664555).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
354095c29ef10d4763ec079fde4d6f73841152f6 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Issue extended diagnostic when property dot-syntax is used and
there is a setter but no getter (part of radar 7664555).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
db3c491e4e53d25b27a1f45ae76624b2e687e8ce 19-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Simplify the CIndex fix-it API, now that we have half-open CXSourceRanges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96685 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
473d7019bb54f8a2f0140dca9e9644a935cc6b20 19-Feb-2010 Douglas Gregor <dgregor@apple.com> Simplify the CIndex fix-it API, now that we have half-open CXSourceRanges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96685 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
38e9420d42304844bf68550a9270d00408b976f8 19-Feb-2010 Ted Kremenek <kremenek@apple.com> Revert: "Change InitListExpr to allocate the array for holding references"

This was causing buildbot breakage.

This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ba7bc5584b8d46f4e8deb3a9d363256908fa86ea 19-Feb-2010 Ted Kremenek <kremenek@apple.com> Revert: "Change InitListExpr to allocate the array for holding references"

This was causing buildbot breakage.

This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
107572e5f29b64120958bb208e76754099cc4dab 19-Feb-2010 John McCall <rjmccall@apple.com> Re-introduce the ctor/dtor alias optimization, this time hidden behind a
command-line option which defaults off.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
d46f98573ba104eda102dd3224b2dca69f1c6336 19-Feb-2010 John McCall <rjmccall@apple.com> Re-introduce the ctor/dtor alias optimization, this time hidden behind a
command-line option which defaults off.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
b17fe9006135d1e6b6d7b545a772b9042c671c0b 19-Feb-2010 Ted Kremenek <kremenek@apple.com> Change InitListExpr to allocate the array for holding references
to initializer expressions in an array allocated using ASTContext.

This plugs a memory leak when ASTContext uses a BumpPtrAllocator to
allocate memory for AST nodes.

In my mind this isn't an ideal solution; it would be nice to have
a general "vector"-like class that allocates memory using ASTContext,
but whose guts could be separated from the methods of InitListExpr
itself. I haven't gone and taken this approach yet because it isn't
clear yet if we'll eventually want an alternate solution for recylcing
memory using by InitListExprs as we are constructing the ASTs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9f9269e810bfe9aea0a57b09250be215808fc1a2 19-Feb-2010 Ted Kremenek <kremenek@apple.com> Change InitListExpr to allocate the array for holding references
to initializer expressions in an array allocated using ASTContext.

This plugs a memory leak when ASTContext uses a BumpPtrAllocator to
allocate memory for AST nodes.

In my mind this isn't an ideal solution; it would be nice to have
a general "vector"-like class that allocates memory using ASTContext,
but whose guts could be separated from the methods of InitListExpr
itself. I haven't gone and taken this approach yet because it isn't
clear yet if we'll eventually want an alternate solution for recylcing
memory using by InitListExprs as we are constructing the ASTs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
292f520b74b449be401d37c8da567d631dbb8b96 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
11062e11236b7bc689dad150e8b490fd6b063ec3 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
732a7dec07e5869f6b1de0faabc899e1a2449a6d 19-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Teach ASTUnit to keep track of temporary files, then delete them when
the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
313e26c4e81f0e467490a530548450f4c824a6c4 19-Feb-2010 Douglas Gregor <dgregor@apple.com> Teach ASTUnit to keep track of temporary files, then delete them when
the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
7f71c68f01b00d5335c53eccc115b1223cb573b5 19-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
try to address the msvc failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96624 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0a812cf707da15dadd19fdeb0178b9707f4e01a6 19-Feb-2010 Douglas Gregor <dgregor@apple.com> Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
try to address the msvc failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96624 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
fde7f1802592d1d761e7528ca30ac42c4c1de7a5 18-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Revert my CIndex diagnostic changes (r96603, 96606, 96607), which were
breaking the msvc9 builder for unknown reasons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96618 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
436f3f0400c633251e4071f81358c47bab964adf 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Revert my CIndex diagnostic changes (r96603, 96606, 96607), which were
breaking the msvc9 builder for unknown reasons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96618 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e1627e98ad57309a74f0b7e20ab6cc850cd3970f 18-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce debugging/testing hook clang_enableStackTraces() into
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96607 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b9c8a24d04d5e5b3107656d8e03e21d3816c081e 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Introduce debugging/testing hook clang_enableStackTraces() into
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96607 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0bf2f71a0e7a7f60ca512bc145667e136a2a8bf5 18-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Resurrect the displayDiagnostics parameter to clang_createIndex(), and
display captured diagnostics when we can't return an invalid
CXTranslationUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96606 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b2710713377f3b900a92ab69c4cf091f560a5cfb 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Resurrect the displayDiagnostics parameter to clang_createIndex(), and
display captured diagnostics when we can't return an invalid
CXTranslationUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96606 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f709fee10564f8ed3c738accedc6ffbf3b00c408 18-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce CIndex API functions for displaying a diagnostic, with some
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.

Use this new function to display diagnostics within c-index-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96603 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4c58923ca904733d588ddb1cec58549b6bc7dfa9 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Introduce CIndex API functions for displaying a diagnostic, with some
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.

Use this new function to display diagnostics within c-index-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96603 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8a981127d8f98521c9275a059fee3461e3be0f92 18-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.

To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.

I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96592 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
a88084b78fd4ca5d3d858c14b02414f8cc399f02 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.

To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.

I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96592 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Diagnostic.h
lang/Frontend/ASTUnit.h
ed4cd8cbcb823ff7515d1777891eac8d4af9aa97 18-Feb-2010 Ted Kremenek <kremenek@apple.com> Start adding cursor kinds for attributes, with first exposing
IBActionAttr and IBOutletAttr respectively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96563 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e77f443dbca8cdc23e5aa94a2653367e4a7cbe47 18-Feb-2010 Ted Kremenek <kremenek@apple.com> Start adding cursor kinds for attributes, with first exposing
IBActionAttr and IBOutletAttr respectively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96563 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
de7b6a7cdd15d9c5cc511262a86a725e43f91fe7 18-Feb-2010 Ted Kremenek <kremenek@apple.com> Change the behavior of ibaction attributes to be attached to methods, not ivars.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
63e5d7c85299134f088033614afd9eb213c50b48 18-Feb-2010 Ted Kremenek <kremenek@apple.com> Change the behavior of ibaction attributes to be attached to methods, not ivars.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
121f3eb1c120089a920ba7e7c0188a07fad59022 18-Feb-2010 Ted Kremenek <kremenek@apple.com> Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes to
match 'ns_returns_retained' and 'cf_returns_retained' respectively. These
are not yet hooked up to the static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
31c780d95a830f0187cfcbb1016ce88f50a7dfe1 18-Feb-2010 Ted Kremenek <kremenek@apple.com> Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes to
match 'ns_returns_retained' and 'cf_returns_retained' respectively. These
are not yet hooked up to the static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
659bddc5f1bfe7636bf6f98e0f6f8e9dc63f6bbe 18-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Hook the "overflow converting case value to switch condition type"
warning into -Wswitch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0b3b4363df8d24905cef8254b0841ef1c9a8bfac 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Hook the "overflow converting case value to switch condition type"
warning into -Wswitch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d0d5f770df01e7c7554e139a768b319aa98ae5a7 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Alphabetize #includes. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
8264558a81563651b0d9377d316eb65a5ce82259 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Alphabetize #includes. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
05b2b140f05bfe635296a1a58902dc93092412cb 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change GNUInlineAttr definition to just use DEF_SIMPLE_ATTR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
3f477eabe90c55ad65ab70b1a3abd77060fbec06 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change GNUInlineAttr definition to just use DEF_SIMPLE_ATTR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
441f07c35f1038e789a0824ca37f328f4f77d6f1 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> PR5803: clang++: Treat untyped 'C' inputs as C++.
- Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated'
diagnostic when we do this. We'll see what zee users say.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Types.h
51679c5e4828b8a64953c4f3db162ca963bf7b03 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> PR5803: clang++: Treat untyped 'C' inputs as C++.
- Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated'
diagnostic when we do this. We'll see what zee users say.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Types.h
8960b491f253cfd6842350e05104c1f98d4ceaee 17-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement AST merging for Objective-C properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
e3261624c1870e52d7efc2ac83e647713361ac6c 17-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement AST merging for Objective-C properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
8fad6ad51759d2d2de102e3c57258ab3cef3963f 17-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> For inline-based inter-procedural analysis, we will have multiple stack space regions. Use a dense map to store them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
c30470dd245e2c3b367d3d806e75bf6cc20fc18c 17-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> For inline-based inter-procedural analysis, we will have multiple stack space regions. Use a dense map to store them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
07bbd4f47b17dde1c0e9ea667e72b394142d332a 17-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a utility method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
8ddf7cead8a67342a4584a203e0bf736b7efedbe 17-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add a utility method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
ffaec6d827eafae99b3f9828fe816f520ee6e39b 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96468 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
71570182471d502a97f7f175aa527152544c75f2 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96468 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3cf68a9d706d41b069a57d75b0995562df4565c8 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Add IBAction attribute to keep the IBOutlet attribute company.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
efbddd23173ea5633cc8a004f1014c68c3ac6593 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Add IBAction attribute to keep the IBOutlet attribute company.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
221ffa76a5265603da1294954a7a0f3486cb86dd 17-Feb-2010 Tanya Lattner <tonic@nondot.org> Fix unused function warning to handle used attributes and redeclarations. Update test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.td
12ead498c4bc279472b21d446bfccec0f654779e 17-Feb-2010 Tanya Lattner <tonic@nondot.org> Fix unused function warning to handle used attributes and redeclarations. Update test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.td
19f7e7d1e7e4bf7a26d46c9278b05f83fdc67ccc 17-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement AST importing and checking for Objective-C method declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/DiagnosticASTKinds.td
c3f2d2bb839593eed8861bce14228df0faf7b6c0 17-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement AST importing and checking for Objective-C method declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/DiagnosticASTKinds.td
b66ae21b07a1f4a599365ad19d6d557dd217ce31 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Convert clang_getCompletionChunkText() to return a CXString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96439 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2ef6f8f5a35a60870594c5b04e0aa2bf22c6886f 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Convert clang_getCompletionChunkText() to return a CXString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96439 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c24ed1edd2698b4f3b5b64d5dff4ae13518bc19f 17-Feb-2010 Charles Davis <cdavis@mines.edu> Revert r95939, as suggested by Alexandre Julliard from the Wine project (and
our own Chris Lattner).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
ab44216009dbdaa9a3b26f541ead13e85f6e39b3 17-Feb-2010 Charles Davis <cdavis@mines.edu> Revert r95939, as suggested by Alexandre Julliard from the Wine project (and
our own Chris Lattner).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
fab0e95c64a33eae01f39973dc02ccef1aaeb00f 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change clang_getCursorKindSpelling() to return a CXString
instead of a 'const char *'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96425 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e68fff6fc083c6270d835216a3de0b82c6ef0310 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change clang_getCursorKindSpelling() to return a CXString
instead of a 'const char *'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96425 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4306954f2958dca0881bf11855bd9a509761408c 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change clang_getFileName() to return a 'CXString' instead of 'const char *'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96424 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
74844072411bae91d5dbb89955d200cbe1e0a1c8 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change clang_getFileName() to return a 'CXString' instead of 'const char *'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96424 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
dfac6238822b929afbc4c8e3c05b9b9ee0272cd9 17-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement AST importing of Objective-C instance variables.
Check superclasses when merging two Objective-C @interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
2e55e3af2f6d6c0509495357fade95105dd144cd 17-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement AST importing of Objective-C instance variables.
Check superclasses when merging two Objective-C @interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
56c054e27cc00e53824a40e83297f3e4382ca324 16-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new kind of failed result for isLvalue/isModifiableLvalue
which describes temporary objects of class type in C++. Use this to
provide a more-specific, remappable diagnostic when takin the address
of such a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
e873fb74219f48407ae0b8fa083aa7f0b6ff1427 16-Feb-2010 Douglas Gregor <dgregor@apple.com> Introduce a new kind of failed result for isLvalue/isModifiableLvalue
which describes temporary objects of class type in C++. Use this to
provide a more-specific, remappable diagnostic when takin the address
of such a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
fbe22a44784dfe89318cc6f17e928915e9d50b41 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> Disable warn_unused_function for now, its breaking various project builds due to
false positives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
75d113711eb4e40029bb0426365396b76281deee 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> Disable warn_unused_function for now, its breaking various project builds due to
false positives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
13df44a5d2692a6ea880042452de26a92931e08d 16-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Improve parsing and instantiation of destructor names, so that we can
now cope with the destruction of types named as dependent templates,
e.g.,

y->template Y<T>::~Y()

Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't
follow the letter of the standard here because that would fail to
parse

template<typename T, typename U>
X0<T, U>::~X0() { }

properly. The problem is captured in core issue 339, which gives some
(but not enough!) guidance. I expect to revisit this code when the
resolution of 339 is clear, and/or we start capturing better source
information for DeclarationNames.

Fixes PR6152.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
124b878dba5007df0a268ea128a6ad8dc5dd2c5e 16-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve parsing and instantiation of destructor names, so that we can
now cope with the destruction of types named as dependent templates,
e.g.,

y->template Y<T>::~Y()

Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't
follow the letter of the standard here because that would fail to
parse

template<typename T, typename U>
X0<T, U>::~X0() { }

properly. The problem is captured in core issue 339, which gives some
(but not enough!) guidance. I expect to revisit this code when the
resolution of 339 is clear, and/or we start capturing better source
information for DeclarationNames.

Fixes PR6152.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
5c248c95f96c70fc04cb1e1eacd2132d847b027c 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Add simpler checker to check if variables captured by a block are uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
94fd0b8c88db9b1cd99457d3cd8cd333341dd39c 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Add simpler checker to check if variables captured by a block are uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
f0533bcf6543bbb5d1b0338c01510eeacea44a76 16-Feb-2010 John McCall <rjmccall@apple.com> Support local namespace aliases and permit them to be instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3dbd3d5c04cd5abd7dfd83b15f51d7c610a3c512 16-Feb-2010 John McCall <rjmccall@apple.com> Support local namespace aliases and permit them to be instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d7757931fd2f6fb2dc272e3cde0f2251c392e1ed 16-Feb-2010 John McCall <rjmccall@apple.com> Make the various type-decl Types (and their associated ASTContext routines)
accept const decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96325 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
19c8576b7328f4dc2d07682f5da552875c1912ef 16-Feb-2010 John McCall <rjmccall@apple.com> Make the various type-decl Types (and their associated ASTContext routines)
accept const decls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96325 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
b39503abb6911b792d4a91ed504b173ecf1676a5 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support this as an argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
b26d483a9f7fdc815e87bbbac4af916307b4c07d 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support this as an argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
5fbc4f48be96f5a8722318721cbe4c0562e0a165 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit::LoadFromCompilerInvocation - Take ownership of the provided invocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
f7acc37450d59ef751df73acb91de73850cc6517 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit::LoadFromCompilerInvocation - Take ownership of the provided invocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
2d237305f070e8b4916802ef300ce94c3a89395e 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> CompilerInstance: Move LLVMContext member out of constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
42e9f8e4983d50f896ec716207817b9d96e7e79c 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> CompilerInstance: Move LLVMContext member out of constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
5c8a08c5da6439047a8521f1b4ea6a61438917b4 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Refactor the logic for printf argument type-checking into analyze_printf::ArgTypeResult.
Implement printf argument type checking for '%s'.

Fixes <rdar://problem/3065808>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
4e4b30ec62d78b24e6556fea2624855c193d0e3e 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Refactor the logic for printf argument type-checking into analyze_printf::ArgTypeResult.
Implement printf argument type checking for '%s'.

Fixes <rdar://problem/3065808>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
1051ab8448e2ed9db0d75871743f12d65d9affe8 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Added 'AsWideChar' flag to LengthModifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
252bee91e9961d9182323c4017092f90d6a09b1d 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Added 'AsWideChar' flag to LengthModifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
5ca6dbdb85b017bf2915dbdd52fb9d51828d755f 16-Feb-2010 Chris Lattner <sabre@nondot.org> mark __builtin_longjmp noreturn, PR6312


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
2d3df5fedc3578402b9178efad489289403d864e 16-Feb-2010 Chris Lattner <sabre@nondot.org> mark __builtin_longjmp noreturn, PR6312


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
c94fe413f94a42971eb8a23a00ac7c5c38b0bef3 16-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Cope with anonymous tags defined within declarators by structurally
comparing their types under the assumption that they are equivalent,
rather than importing the types and then checking for compatibility. A
few minor tweaks here:
- Teach structural matching to handle compatibility between
function types with prototypes and those without prototypes.
- Teach structural matching that an incomplete record decl is the
same as any other record decl with the same name.
- Keep track of pairs of declarations that we have already checked
(but failed to find as structurally matching), so we don't emit
diagnostics repeatedly.
- When importing a typedef of an anonymous tag, be sure to link the
imported tag type to its typedef.

With these changes, we survive a repeated import of <stdlib.h> and
<stdio.h>. Alas, the ASTNodeImporter is getting a little grotty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
ea35d11905f756ad33b87bd89cd3ac1e7ce57994 16-Feb-2010 Douglas Gregor <dgregor@apple.com> Cope with anonymous tags defined within declarators by structurally
comparing their types under the assumption that they are equivalent,
rather than importing the types and then checking for compatibility. A
few minor tweaks here:
- Teach structural matching to handle compatibility between
function types with prototypes and those without prototypes.
- Teach structural matching that an incomplete record decl is the
same as any other record decl with the same name.
- Keep track of pairs of declarations that we have already checked
(but failed to find as structurally matching), so we don't emit
diagnostics repeatedly.
- When importing a typedef of an anonymous tag, be sure to link the
imported tag type to its typedef.

With these changes, we survive a repeated import of <stdlib.h> and
<stdio.h>. Alas, the ASTNodeImporter is getting a little grotty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
78ff1f0bbd460020f570f9082ed0076872e32955 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Convert GRExprEngine's handling of ObjCMessageExprs to use a worklist
to evaluate arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
b9bbd592c7ea72ada8d982e40a729beb9b53371e 16-Feb-2010 Ted Kremenek <kremenek@apple.com> Convert GRExprEngine's handling of ObjCMessageExprs to use a worklist
to evaluate arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRExprEngine.h
206030727647906a20e22bef9ef66189a85d5734 15-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Add Sema support for __builtin_fpclassify by extending the existing check for __builtin_isinf and friends. Part of PR6083.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
e771a7ac11fb27f0e734e5de4d858f2c268895e5 15-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Add Sema support for __builtin_fpclassify by extending the existing check for __builtin_isinf and friends. Part of PR6083.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
2521eb5df5337b93115ab72c7ad73d1d3c19e67a 15-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Issue a bettter diagnostics for incorrect property setter name.
(radar 7647953).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
e0097db2848c463a534c18c235c6d3e53f2f1b87 15-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Issue a bettter diagnostics for incorrect property setter name.
(radar 7647953).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
f584f2392641e1ef754c17a46f2e52334ebbf545 15-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Reimplement the structural-equality checks used to determine whether
two types in different AST contexts are equivalent. Rather than
transforming the type from one context into the other context, we
perform a deep structural comparison of the types. This change
addresses a serious problem with recursive data types like

struct ListNode {
int value;
struct ListNode *Next;
} xList;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/AST/Type.h
73dc30b71e218ba2b776b10d07dc2aff09cb2c47 15-Feb-2010 Douglas Gregor <dgregor@apple.com> Reimplement the structural-equality checks used to determine whether
two types in different AST contexts are equivalent. Rather than
transforming the type from one context into the other context, we
perform a deep structural comparison of the types. This change
addresses a serious problem with recursive data types like

struct ListNode {
int value;
struct ListNode *Next;
} xList;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/AST/Type.h
76a5c369ed6ab5f15886a6258371994eaea96c0c 15-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Class continuation now has its own property ast for
those declared in it. This is to allow duplicate
property diagnostics for properties declared in class extensions
multiple times (radar 7629420) and for future use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
25760611365be23556b32332f8a66ae21ea93ecf 15-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Class continuation now has its own property ast for
those declared in it. This is to allow duplicate
property diagnostics for properties declared in class extensions
multiple times (radar 7629420) and for future use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b1737c48f138035ff97921511a0980508a775d30 14-Feb-2010 Ted Kremenek <kremenek@apple.com> Change LLVMConventionsChecker to accept an entire translation unit instead
of operating on each code decl. This exposes two flaws in AnalysisConsumer
that should eventually be fixed:

(1) It is not possible to associate multiple "actions" with a single
command line argument. This will require the notion of an
"analysis" group, and possibly tablegen support. (although eventually
we want to support dynamically loading analyses as well)

(2) AnalysisConsumer may not actually be scanning the declarations in namespaces.
We'll experiment first in LLVMConventionsChecker before changing the
behavior in AnalysisConsumer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/LocalCheckers.h
lang/Frontend/Analyses.def
676ca153e04b1c6be477bc8a10f1e06256850cee 14-Feb-2010 Ted Kremenek <kremenek@apple.com> Change LLVMConventionsChecker to accept an entire translation unit instead
of operating on each code decl. This exposes two flaws in AnalysisConsumer
that should eventually be fixed:

(1) It is not possible to associate multiple "actions" with a single
command line argument. This will require the notion of an
"analysis" group, and possibly tablegen support. (although eventually
we want to support dynamically loading analyses as well)

(2) AnalysisConsumer may not actually be scanning the declarations in namespaces.
We'll experiment first in LLVMConventionsChecker before changing the
behavior in AnalysisConsumer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/LocalCheckers.h
lang/Frontend/Analyses.def
7ccce1d7e199ca54add8bd318c76b7e1c6079624 14-Feb-2010 Daniel Dunbar <daniel@zuster.org> CIndex: Switch CXSourceRange to proper half-open intervals.
- Doug, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96162 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d52864bd33c66aacc84133460d8c9c0dfcdd5c18 14-Feb-2010 Daniel Dunbar <daniel@zuster.org> CIndex: Switch CXSourceRange to proper half-open intervals.
- Doug, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96162 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6e2e54e98ee9092f275d18ea40ba1ee28afbebb0 14-Feb-2010 Ted Kremenek <kremenek@apple.com> Add new static analyzer for checking LLVM coding conventions: -analyzer-check-llvm-conventions

Currently these checks are intended to be largely syntactical, but may get more
sophisticated over time.

As an initial foray into this brave new world, emit a static analyzer warning
when binding a temporary 'std::string' to an 'llvm::StringRef' where the
lifetime of the 'std::string' does not outlive the 'llvm::StringRef'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/LocalCheckers.h
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
6dd66ed959b7f60749dd0040507b3f304183a1b6 14-Feb-2010 Ted Kremenek <kremenek@apple.com> Add new static analyzer for checking LLVM coding conventions: -analyzer-check-llvm-conventions

Currently these checks are intended to be largely syntactical, but may get more
sophisticated over time.

As an initial foray into this brave new world, emit a static analyzer warning
when binding a temporary 'std::string' to an 'llvm::StringRef' where the
lifetime of the 'std::string' does not outlive the 'llvm::StringRef'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/LocalCheckers.h
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
e06c21b075a36f8f2a46df1385035be7cef85a1e 14-Feb-2010 John McCall <rjmccall@apple.com> Improve the diagnostic given when referring to a tag type without a tag (in C)
or that's been hidden by a non-type (in C++).

The ideal C++ diagnostic here would note the hiding declaration, but this
is a good start.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
23e907ab9119ccfdff17b3808a770c5a6707fb95 14-Feb-2010 John McCall <rjmccall@apple.com> Improve the diagnostic given when referring to a tag type without a tag (in C)
or that's been hidden by a non-type (in C++).

The ideal C++ diagnostic here would note the hiding declaration, but this
is a good start.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f0ba68a76a53360cfaa41d1edc0fa528a758c745 13-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Permit the use of typedefs of class template specializations in
qualified declarator-ids. This patch is actually due to Cornelius;
fixes PR6179.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fe3310697028d8d3d35a11b0877bb2bc47e55b8d 13-Feb-2010 Douglas Gregor <dgregor@apple.com> Permit the use of typedefs of class template specializations in
qualified declarator-ids. This patch is actually due to Cornelius;
fixes PR6179.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ceeffb036421ad7fd6f361e64d03bf8d0b0caffa 13-Feb-2010 John McCall <rjmccall@apple.com> Switch the standard DeclarationName comparator to be a tri-valued comparator.
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
7fe0b9ea2c8137c035402e6ea01dfdfbc93214cb 13-Feb-2010 John McCall <rjmccall@apple.com> Switch the standard DeclarationName comparator to be a tri-valued comparator.
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
409059701c80c4e60a02207fbf231b27c65d5333 13-Feb-2010 John McCall <rjmccall@apple.com> Add an option to disable the LLVM verifier pass (which is still always
disabled in NDEBUG builds). The option applies only to -cc1 invocations and is:
-disable_llvm_verifier



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
824e19ed926d7aa1296a007d0607ac4437e3c4a9 13-Feb-2010 John McCall <rjmccall@apple.com> Add an option to disable the LLVM verifier pass (which is still always
disabled in NDEBUG builds). The option applies only to -cc1 invocations and is:
-disable_llvm_verifier



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
5d9b06134bd92acf490bb57ec8d0613df10cf511 13-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Funnel changes to the ImportedDecls list in the ASTImporter through a
single Imported function, in preparation for fixing a serious design
flaw.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
5ce5dab3c30e4255b8f62b148b6a86f09a444aaa 13-Feb-2010 Douglas Gregor <dgregor@apple.com> Funnel changes to the ImportedDecls list in the ASTImporter through a
single Imported function, in preparation for fixing a serious design
flaw.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
93f9b324137514b4fd95d28a95e356190488a37f 12-Feb-2010 Ted Kremenek <kremenek@apple.com> Make the following functions thread-safe but having them return an std::string that is reconstructed
every time they are called:

getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96033 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Version.h
a2a9d6e4e5b6001b86b7dfc5db1ea296ce29a3d3 12-Feb-2010 Ted Kremenek <kremenek@apple.com> Make the following functions thread-safe but having them return an std::string that is reconstructed
every time they are called:

getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96033 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Version.h
494ab3167ba14e70c84a2e6e7a7f387a9217872d 12-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement AST importing and merging for enumeration types and
enumerators, along with ImplicitCastExprs to make it work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
36ead2e992abb30aa3b4a40b4c8cb22cc9389fef 12-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement AST importing and merging for enumeration types and
enumerators, along with ImplicitCastExprs to make it work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
56ca04563c38d5c7d4e3b1c4fac6d14cc30ad3fa 12-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a warning which exposed a bug in building
a qualified objective-c pointer type. Fixes radar 7638810.
(Also removes a FIXME).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
432a8893f7e30d141d7f279bd00b741a3cdac81f 12-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a warning which exposed a bug in building
a qualified objective-c pointer type. Fixes radar 7638810.
(Also removes a FIXME).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
95e20014f3cf65a7e7717849772e52c105fb7da3 12-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Improve representation of tag declarations first declared or defined
within the declarator of another declaration, from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b37b648b3f2bba4c557a1604ced19b526b25a372 12-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve representation of tag declarations first declared or defined
within the declarator of another declaration, from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
27dc8619071ac2ef47318bf4ff21b99a3e3793ae 12-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Improve documentation for DependentTypeOfExprType, DependentDecltypeType. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c4875ee41ba35f1d746f4266ce47461247f19f41 12-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve documentation for DependentTypeOfExprType, DependentDecltypeType. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d665afdb7e5fdcb4a295c91863cc13c90c3bf4c4 12-Feb-2010 John McCall <rjmccall@apple.com> Waste two bits in every clang::Type so that the type class can be read
in a single byte-load rather than some crazy bitmunging operation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeNodes.def
27935ee59c30b0d8b610ab676aab8e65350af932 12-Feb-2010 John McCall <rjmccall@apple.com> Waste two bits in every clang::Type so that the type class can be read
in a single byte-load rather than some crazy bitmunging operation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeNodes.def
522a9fadbbb012a147c5a9977af9a895e270fe36 12-Feb-2010 Tanya Lattner <tonic@nondot.org> Implementing unused function warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
e6bbc01d1c4ec5241df36042e0a4a12a6711934b 12-Feb-2010 Tanya Lattner <tonic@nondot.org> Implementing unused function warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
4379c49f2c5bc634193521ab80f493f8cd2b23ed 12-Feb-2010 Charles Davis <cdavis@mines.edu> Warn about using the new force_align_arg_pointer attribute on a function
pointer. If you don't like the new warning, you can turn it off with
-Wno-force-align-arg-pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
b84412f587bc9f2f90930cc1c63ba10cb833bd4e 12-Feb-2010 Charles Davis <cdavis@mines.edu> Warn about using the new force_align_arg_pointer attribute on a function
pointer. If you don't like the new warning, you can turn it off with
-Wno-force-align-arg-pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
4fc71f8b92264f2d119bb2d28b1d42649aaf20f8 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Fix leak in CXXNewExpr where the SubExprs array would get allocated directly using 'new[]' instead of the allocator associated with ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
ad7fe864862305c2f71e047cdf6706ef43aebdc0 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Fix leak in CXXNewExpr where the SubExprs array would get allocated directly using 'new[]' instead of the allocator associated with ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e6d8816efc582dc04cf793e78dc9be2d4b81cf3d 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
eb3b324800598cc3d5385fbad95ae5cff2c79113 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
984a375f11d74480963146861d78b2396ca7ed9a 11-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> When AST merging for record declarations fails, warn about the
incompatibility and show where the structural differences are. For
example:

struct1.c:36:8: warning: type 'struct S7' has incompatible definitions
in different translation units
struct S7 { int i : 8; unsigned j : 8; } x7;
^
struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here
struct S7 { int i : 8; unsigned j : 8; } x7;
^
struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here
struct S7 { int i : 8; unsigned j : 16; } x7;
^

There are a few changes to make this work:
- ASTImporter now has only a single Diagnostic object, not multiple
diagnostic objects. Otherwise, having a warning/error printed via
one Diagnostic and its note printed on the other Diagnostic could
cause the note to be suppressed.
- Implemented import functionality for IntegerLiteral (along with
general support for statements and expressions)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/DiagnosticASTKinds.td
4800d95d28b20eca5d57c108ae3d2e6e312c1182 11-Feb-2010 Douglas Gregor <dgregor@apple.com> When AST merging for record declarations fails, warn about the
incompatibility and show where the structural differences are. For
example:

struct1.c:36:8: warning: type 'struct S7' has incompatible definitions
in different translation units
struct S7 { int i : 8; unsigned j : 8; } x7;
^
struct1.c:36:33: note: bit-field 'j' with type 'unsigned int' and length 8 here
struct S7 { int i : 8; unsigned j : 8; } x7;
^
struct2.c:33:33: note: bit-field 'j' with type 'unsigned int' and length 16 here
struct S7 { int i : 8; unsigned j : 16; } x7;
^

There are a few changes to make this work:
- ASTImporter now has only a single Diagnostic object, not multiple
diagnostic objects. Otherwise, having a warning/error printed via
one Diagnostic and its note printed on the other Diagnostic could
cause the note to be suppressed.
- Implemented import functionality for IntegerLiteral (along with
general support for statements and expressions)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/DiagnosticASTKinds.td
838f8e67cab2f1ff6958ad8fc78eaf5a78340fd7 11-Feb-2010 Eli Friedman <eli.friedman@gmail.com> Add builtins from PR5255. Implementations coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
d42ba8a578e905724633ac8fa1bf09cdfc3884c5 11-Feb-2010 Eli Friedman <eli.friedman@gmail.com> Add builtins from PR5255. Implementations coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
c0c30b203cd1e17a8688d3719e3ac7400f758709 11-Feb-2010 Anders Carlsson <andersca@mac.com> More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
848fa64143fbe5ae62a601ad61277f741e54dfab 11-Feb-2010 Anders Carlsson <andersca@mac.com> More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
484523095e8c47e83297153c5bfc962f17eb553e 11-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove noisy semicolon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
8aa79947cbf8f0f3ac82cdd36a823ac1bb53cab4 11-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove noisy semicolon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
5b82fe851c5fa52e23bd4be6dcf628fe79daa5a4 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Patch by Cristian Draghici:

Enhance the printf format string checking when using the format
specifier flags ' ', '0', '+' with the 'p' or 's' conversions (since
they are nonsensical and undefined). This is similar to GCC's
checking.

Also warning when a precision is used with the 'p' conversin
specifier, since it has no meaning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
5c41ee8c49995fb4fd76d686b239c15cbab261ea 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Patch by Cristian Draghici:

Enhance the printf format string checking when using the format
specifier flags ' ', '0', '+' with the 'p' or 's' conversions (since
they are nonsensical and undefined). This is similar to GCC's
checking.

Also warning when a precision is used with the 'p' conversin
specifier, since it has no meaning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
bbc87477d3d15d12a75e1cf717bcd0631732d259 11-Feb-2010 Anders Carlsson <andersca@mac.com> Check in the beginnings of my new vtable layout builder idea.

Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code.

I've also added a very simple new vtable layout test case.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
824d7ea07a4e9208925daa6ae9289fb2b39bce9f 11-Feb-2010 Anders Carlsson <andersca@mac.com> Check in the beginnings of my new vtable layout builder idea.

Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code.

I've also added a very simple new vtable layout test case.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
64474f20248057f0c7cd6e2332811ce32e502d5a 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Use the allocator associated with ASTContext to allocate the args
array associated with NonNullAttr. This fixes yet another leak when
ASTContext uses a BumpPtrAllocator.

Fixes: <rdar://problem/7637150>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
5961611172f1c210fbbaa55b3c692e13b1fc7be4 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Use the allocator associated with ASTContext to allocate the args
array associated with NonNullAttr. This fixes yet another leak when
ASTContext uses a BumpPtrAllocator.

Fixes: <rdar://problem/7637150>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
2e7e2138cf03a0b0a0c3ae6da773ff138ce39e17 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Have ~ASTContext() delete StoredDeclsMap (internal to DeclContext) by
storing the set of StoredDeclsMaps in an internal vector of void*.
This isn't an ideal solution, but for the time being this fixes a
major memory leak with these DenseMaps not being freed.

Fixes: <rdar://problem/7634755>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3478eb6872d836600caf45b0f81c2065d685d6e0 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Have ~ASTContext() delete StoredDeclsMap (internal to DeclContext) by
storing the set of StoredDeclsMaps in an internal vector of void*.
This isn't an ideal solution, but for the time being this fixes a
major memory leak with these DenseMaps not being freed.

Fixes: <rdar://problem/7634755>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
222ea5b36692d59f7feab62ea52b4c698514a27f 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Remove use of 'std::string' from Attr objects, using instead a byte
array allocated using the allocator in ASTContext. This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).

Fixes: <rdar://problem/7636765>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
3d2c43e9a7ca55f5ddc1f0c77d8f5e5ea7c1b573 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Remove use of 'std::string' from Attr objects, using instead a byte
array allocated using the allocator in ASTContext. This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).

Fixes: <rdar://problem/7636765>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
19b2fd19a4059b90844348362168382bd2be13a3 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
lang/Driver/Types.def
64952508c2b0c8bffb45c8b410f0af3d2457f59b 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.td
lang/Driver/Types.def
cb88a1522340ce77e45991250b8599bbc9f92dbf 11-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Remove another redundant ASTContext parameter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
2d5b70386d6f5553b667b6e407ca781b4ca2009e 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Remove another redundant ASTContext parameter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
47bedd03ccebfcf7f6156aed64ef45a9e6318145 11-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate a bunch of unnecessary ASTContexts from members functions of
Decl subclasses. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
838db383b69b9fb55f55c8e9546477df198a4faa 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate a bunch of unnecessary ASTContexts from members functions of
Decl subclasses. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d00b532ca61c8efe030a58d5fa57e47446154223 11-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose when user provided getter is being used as lvalue
using property dot-syntax. Fixes radar 7628953.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
e9ff443040cb571ae2c5c2626c4dc9a9a812d84a 11-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose when user provided getter is being used as lvalue
using property dot-syntax. Fixes radar 7628953.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
0953831bd17a3ec879d4ddbbf33cbb2c67560fb0 11-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
952b017601f9c82b51119c3a1600f1312a833db9 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
fd55fad6f8d0b82717f86d9b9fe5a346864ca30a 11-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement basic AST merging for classes, structs, and unions in C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
96a01b4acf76fb8fe1e05341a97a27b39fb0b914 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement basic AST merging for classes, structs, and unions in C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0e99a69f84925542bb6620d4c196bcec6e2f1467 11-Feb-2010 Charles Davis <cdavis@mines.edu> Add support for the force_align_arg_pointer attribute. This is an x86-specific
attribute, so it uses Anton's new target-specific attribute support. It's
supposed to ensure that the stack is 16-byte aligned, but since necessary
support is lacking from LLVM, this is a no-op for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
5a0164d6ab843ca61437ec59a504365cb1c98f43 11-Feb-2010 Charles Davis <cdavis@mines.edu> Add support for the force_align_arg_pointer attribute. This is an x86-specific
attribute, so it uses Anton's new target-specific attribute support. It's
supposed to ensure that the stack is 16-byte aligned, but since necessary
support is lacking from LLVM, this is a no-op for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
52e5cd68aae0ef2f85da925e5e3f49a3641ea997 10-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement basic support for merging function declarations across
translation units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
a404ea673cbee5e74af710a5f1ab571e71580b67 10-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement basic support for merging function declarations across
translation units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
f8fd82ba49827db0f6a6ba00c55a7b56b12a19fa 10-Feb-2010 Shih-wei Liao <sliao@google.com> Check in LLVM r95781.
MakeLists.txt
akefile
lang-c/Index.h
lang/AST/APValue.h
lang/AST/AST.h
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/ASTDiagnostic.h
lang/AST/ASTImporter.h
lang/AST/Attr.h
lang/AST/CXXInheritance.h
lang/AST/CanonicalType.h
lang/AST/CharUnits.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclContextInternals.h
lang/AST/DeclGroup.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/DeclVisitor.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/ExternalASTSource.h
lang/AST/FullExpr.h
lang/AST/NestedNameSpecifier.h
lang/AST/ParentMap.h
lang/AST/PrettyPrinter.h
lang/AST/RecordLayout.h
lang/AST/Redeclarable.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
lang/AST/StmtNodes.def
lang/AST/StmtObjC.h
lang/AST/StmtVisitor.h
lang/AST/TemplateBase.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/AST/TypeLocNodes.def
lang/AST/TypeLocVisitor.h
lang/AST/TypeNodes.def
lang/AST/TypeOrdering.h
lang/AST/TypeVisitor.h
lang/AST/UnresolvedSet.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/PrintfFormatString.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/AnalysisContext.h
lang/Analysis/AnalysisDiagnostic.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Support/BumpVector.h
lang/Analysis/Support/Optional.h
lang/Analysis/Support/SaveAndRestore.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Basic/Builtins.def
lang/Basic/Builtins.h
lang/Basic/BuiltinsPPC.def
lang/Basic/BuiltinsX86.def
lang/Basic/CMakeLists.txt
lang/Basic/ConvertUTF.h
lang/Basic/Diagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticAnalysisKinds.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/Linkage.h
lang/Basic/MacroBuilder.h
lang/Basic/Makefile
lang/Basic/OnDiskHashTable.h
lang/Basic/OperatorKinds.def
lang/Basic/OperatorKinds.h
lang/Basic/PartialDiagnostic.h
lang/Basic/PrettyStackTrace.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Basic/Specifiers.h
lang/Basic/TargetBuiltins.h
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
lang/Basic/TemplateKinds.h
lang/Basic/TokenKinds.def
lang/Basic/TokenKinds.h
lang/Basic/TypeTraits.h
lang/Basic/Version.h
lang/CMakeLists.txt
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Checker/Checkers/DereferenceChecker.h
lang/Checker/Checkers/LocalCheckers.h
lang/Checker/DomainSpecific/CocoaConventions.h
lang/Checker/ManagerRegistry.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRAuditor.h
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRExprEngineBuilders.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRStateTrait.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SummaryManager.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
lang/CodeGen/CodeGenOptions.h
lang/CodeGen/ModuleBuilder.h
lang/Driver/Action.h
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/CC1Options.h
lang/Driver/CC1Options.td
lang/Driver/CMakeLists.txt
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/DriverDiagnostic.h
lang/Driver/HostInfo.h
lang/Driver/Job.h
lang/Driver/Makefile
lang/Driver/OptParser.td
lang/Driver/OptSpecifier.h
lang/Driver/OptTable.h
lang/Driver/Option.h
lang/Driver/Options.h
lang/Driver/Options.td
lang/Driver/Phases.h
lang/Driver/Tool.h
lang/Driver/ToolChain.h
lang/Driver/Types.def
lang/Driver/Types.h
lang/Driver/Util.h
lang/Frontend/ASTConsumers.h
lang/Frontend/ASTUnit.h
lang/Frontend/Analyses.def
lang/Frontend/AnalysisConsumer.h
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/DeclContextXML.def
lang/Frontend/DeclXML.def
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/DiagnosticOptions.h
lang/Frontend/DocumentXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendDiagnostic.h
lang/Frontend/FrontendOptions.h
lang/Frontend/FrontendPluginRegistry.h
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/LangStandard.h
lang/Frontend/LangStandards.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/PreprocessorOptions.h
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/StmtXML.def
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/TypeXML.def
lang/Frontend/Utils.h
lang/Frontend/VerifyDiagnosticsClient.h
lang/Index/ASTLocation.h
lang/Index/Analyzer.h
lang/Index/CallGraph.h
lang/Index/DeclReferenceMap.h
lang/Index/Entity.h
lang/Index/GlobalSelector.h
lang/Index/Handlers.h
lang/Index/IndexProvider.h
lang/Index/Indexer.h
lang/Index/Program.h
lang/Index/STLExtras.h
lang/Index/SelectorMap.h
lang/Index/TranslationUnit.h
lang/Index/Utils.h
lang/Lex/DirectoryLookup.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/LexDiagnostic.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Lex/TokenConcatenation.h
lang/Lex/TokenLexer.h
lang/Makefile
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
lang/Parse/ParseDiagnostic.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Parse/Template.h
lang/Rewrite/DeltaTree.h
lang/Rewrite/HTMLRewrite.h
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
lang/Rewrite/TokenRewriter.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/ExternalSemaSource.h
lang/Sema/ParseAST.h
lang/Sema/SemaConsumer.h
lang/Sema/SemaDiagnostic.h
21f7bcaa607ffc73866f7b0c2141f449c2943bbf 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
b2987d159a88ab0ee2e40c884eb4d77b42ab89b6 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
1b898e999f1f26dc1634f2f2ebaafbd5e69e9a13 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
73482884560be041d86eccbd7dd5a6918677393b 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
c5d12db8396180a6a84e82caac1e11709f29da03 10-Feb-2010 John McCall <rjmccall@apple.com> Improve access control diagnostics. Perform access control on member-pointer
conversions. Fix an access-control bug where privileges were not considered
at intermediate points along the inheritance path. Prepare for friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/Basic/DiagnosticSemaKinds.td
6b2accb4793e16b2e93a8c2589f5df702231f17a 10-Feb-2010 John McCall <rjmccall@apple.com> Improve access control diagnostics. Perform access control on member-pointer
conversions. Fix an access-control bug where privileges were not considered
at intermediate points along the inheritance path. Prepare for friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/Basic/DiagnosticSemaKinds.td
f9646bbcd669c6afc2c2b0a630793d39a2c896f6 10-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement basic support for importing source locations from one AST
into another AST, including their include history. Here's an example
error that involves a conflict merging a variable with different types
in two translation units (diagnosed in the third AST context into
which everything is merged).

/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var2.c:3:5:
error: external variable 'x2' declared with incompatible types in
different translation units ('int' vs. 'double')
int x2;
^
In file included from
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.c:3:
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.h:1:8:
note: declared here with type 'double'
double x2;
^

Although we maintain include history, we do not maintain macro
instantiation history across a merge. Instead, we map down to the
spelling location (for now!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
885237354fd902998c6ae9d7cc3dc8de96b123dc 10-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement basic support for importing source locations from one AST
into another AST, including their include history. Here's an example
error that involves a conflict merging a variable with different types
in two translation units (diagnosed in the third AST context into
which everything is merged).

/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var2.c:3:5:
error: external variable 'x2' declared with incompatible types in
different translation units ('int' vs. 'double')
int x2;
^
In file included from
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.c:3:
/Volumes/Data/dgregor/Projects/llvm/tools/clang/test/ASTMerge/Inputs/var1.h:1:8:
note: declared here with type 'double'
double x2;
^

Although we maintain include history, we do not maintain macro
instantiation history across a merge. Instead, we map down to the
spelling location (for now!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
5716d5e3feaf4919942d97ec46e2130913bf6b4f 09-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Complain about types and declarations that we don't know how to import.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
89cc9d6e2aaf794fbd2c228a3755c19062ca0ba0 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Complain about types and declarations that we don't know how to import.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.td
545667c28edd700756332a08bb59b8b7cbd385c1 09-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Move the diagnostic argument formatting function out of Sema and make
it available within the AST library, of which Sema is one client. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
79a9a3417929e340e84dcbc06ed9c3a277cad959 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Move the diagnostic argument formatting function out of Sema and make
it available within the AST library, of which Sema is one client. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
d9fd7f081668e0f457eb4e9182eec0ddd7cecf9a 09-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Implement synthesizing properties by default.
This is a non-fragile-abi feature only. Since it
breaks existing code, it is currently placed under
-fobjc-nonfragile-abi2 option for test purposes only
until further notice. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
412e798941ca64e2e6b084323915fa9aa5f6bdf3 09-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Implement synthesizing properties by default.
This is a non-fragile-abi feature only. Since it
breaks existing code, it is currently placed under
-fobjc-nonfragile-abi2 option for test purposes only
until further notice. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
49216b909765ac03a39829b9e60b1e3c601f3342 09-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a testbed for merging multiple ASTs into a single AST
context with the AST importer. WIP, still useless but at least it has
a test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
9bed8798964d9f07599c2c9199701f86fbc70e20 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Introduce a testbed for merging multiple ASTs into a single AST
context with the AST importer. WIP, still useless but at least it has
a test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendAction.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
d8120f709086b16b9948c63f9020111cc403f131 09-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement a specific diagnostic when a class template partial
specialization does not use any of its template parameters, then
recover far more gracefully. Fixes PR6181.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
de09096a9ee7f670dc74c6a5b7771953ffaf5c62 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement a specific diagnostic when a class template partial
specialization does not use any of its template parameters, then
recover far more gracefully. Fixes PR6181.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e341d4c46ac5b892dff7573c414d14afe0b35534 09-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Clean up the CIndex interface to diagnostic ranges. Thanks, Daniel!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95602 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a3890baf1256ff26081306c7fef70202f8223f41 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Clean up the CIndex interface to diagnostic ranges. Thanks, Daniel!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95602 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ba25ab49959ab6cfe8e3d458ef4a05ac36b685f7 09-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Note that a CXIndex cannot be destroyed until after all of its translation units have been destroyed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95598 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0087e1a12b67b6bb032a72ea485a863daeccf55b 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Note that a CXIndex cannot be destroyed until after all of its translation units have been destroyed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95598 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1b60285d38b1d9c443b897cf42d85a7cfee54309 08-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate a pointer of storage in each ObjCInterfaceType and
ObjCObjectPointerType AST node by allocating the list of protocols
after the type node itself. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fd6a0887a099256c35a5b23e9afd517ffe95fa0a 08-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate a pointer of storage in each ObjCInterfaceType and
ObjCObjectPointerType AST node by allocating the list of protocols
after the type node itself. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9360f32703a244acc38d068d7d2c0b8ae2237981 08-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Warn when cases are missing from a switch on a value of enumeration
type (-Wswitch), from Michal!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
ba915af51ced751c46e7c2b9c6f3b59d2e668825 08-Feb-2010 Douglas Gregor <dgregor@apple.com> Warn when cases are missing from a switch on a value of enumeration
type (-Wswitch), from Michal!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
6d24cd5aba5ccff206cfd191fea8b2553c7dee56 08-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of whether a tag was defined in a declarator vs. being
defined by itself, from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
591bd3cb605f1f0229b4b1d8a4b8183377064ec5 08-Feb-2010 Douglas Gregor <dgregor@apple.com> Keep track of whether a tag was defined in a declarator vs. being
defined by itself, from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7e8004acc5e6861e1b0f35c3fb1984754036a156 08-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement basic importing and merging of variable declarations within
the AST importer. This doesn't actually do anything (yet), because we
don't have driver logic for merging ASTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/FrontendAction.h
089459a16bf7e9cd10617d1fac5ec0240a0a1ee6 08-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement basic importing and merging of variable declarations within
the AST importer. This doesn't actually do anything (yet), because we
don't have driver logic for merging ASTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/FrontendAction.h
34a8c6ff2473579ce87e654d91533f48ec8ed0e0 08-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When placing an annotation token over an existing annotation token, make sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
39d67117f896c6e2faa727671ef64b3c04b0e3fe 08-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> When placing an annotation token over an existing annotation token, make sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
79af7da4402b6844ff72ffd4b0b2355ff9d7fa81 08-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Reapply r95546, no intended change in performance or functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
b6f3c70fb8a0def24bcaa937dc28358f20859c73 08-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Reapply r95546, no intended change in performance or functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
dffd58c27666c7dd7121edc9ad4eaa45e0047c36 08-Feb-2010 Ted Kremenek <kremenek@apple.com> Revert 95546 since it changed the algorithmic characteristics of the convention lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
e7d03121afaba80ccfdde83d3584149e301ec5af 08-Feb-2010 Ted Kremenek <kremenek@apple.com> Revert 95546 since it changed the algorithmic characteristics of the convention lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
d063917699e183a7bcd206ea16cfc4e8f95be640 08-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify code with StringRef.

3 files changed, 76 insertions(+), 153 deletions(-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
de69f7044356093247f7453373bf86ac06ddc512 08-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify code with StringRef.

3 files changed, 76 insertions(+), 153 deletions(-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
360c6cbe0c197cd2b96618cd2ccd1aca0086e835 08-Feb-2010 Ted Kremenek <kremenek@apple.com> Revert 95541.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
1397663af9dbcc24dbf0e11de43931b3dc08fdbb 08-Feb-2010 Ted Kremenek <kremenek@apple.com> Revert 95541.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
24f033a685022615f7529fe8dafe4d71ad45c5dd 08-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Cache imported types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
169fba50da76d71723cd1d91629cabb310f8bf9e 08-Feb-2010 Douglas Gregor <dgregor@apple.com> Cache imported types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
d40b7101081b0a764be4b46b3e0b0a7ba1926f72 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Rename: GRState::getSVal(Stmt*) => getExprVal(),
GRState::getSVal(MemRegion*) => Load().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
6f8c430a95279ef048a356d6283871477b4ad351 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Rename: GRState::getSVal(Stmt*) => getExprVal(),
GRState::getSVal(MemRegion*) => Load().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
082714467891d8dad5c68d75ffb04f330e55505c 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Unify the implementation of getLValueElement of store managers.
It's more sophisticated than the original one of BasicStore. But it does
matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
52535688b1339e0b3898ac0d670052482851a3ab 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Unify the implementation of getLValueElement of store managers.
It's more sophisticated than the original one of BasicStore. But it does
matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
8a44ce8041d984d95672b58516c689a7b033cac4 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Unify the implementation of getLValueIvar and getLValueField of store managers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
c1511e04998e685c9e030323e248363b9633267d 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Unify the implementation of getLValueIvar and getLValueField of store managers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
e86eae0f0b3a3079f2dfc43b9777261496f0bb5b 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move common methods to the base StoreManager class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
459731d468235fa8adb27132be46a3b5654351c3 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move common methods to the base StoreManager class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
29cb7163f7aa3a07bb9065c5c85696148f924f07 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> ASTContext is now a reference member of StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
2a393db0969630d01a71fd384affb33ea0a693d1 08-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> ASTContext is now a reference member of StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
548e9ea5aa883368715bf3af889213a0109d22e1 07-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Roll r95513 back in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
eb7f96141f754150a92433286fa385910a22f494 07-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Roll r95513 back in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
8ba488ce817e898a6c6fadf62f91f908f7053b5c 07-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Roll out r95513, it seems to have broken self hosting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
a8ad5d4975aea17c0e7868f83c25083a0eb2040d 07-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Roll out r95513, it seems to have broken self hosting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
b82b35f9cd18aabea0144d413f29c1f5c08f72cc 07-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
1eb1113b139503a3895714d94ec9c037ae62d3b1 07-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
c6ad9b5808bc6d716a3a26f61c2e23e49a29ebfa 07-Feb-2010 Anders Carlsson <andersca@mac.com> Add attributes to namespace decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2a3503d85374ecc2b8e862a8ed9cec8f10f72e84 07-Feb-2010 Anders Carlsson <andersca@mac.com> Add attributes to namespace decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
05326029789a06dbdbf8b3feaada84a7556e8ff7 07-Feb-2010 Anders Carlsson <andersca@mac.com> Add support for threadsafe statics, and make them the default (matching gcc).

Daniel, I'd appreciate a review of the driver/cc1 parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
a508b7de6c5246ab04ed69d0ab4e9977ec1fb4d4 07-Feb-2010 Anders Carlsson <andersca@mac.com> Add support for threadsafe statics, and make them the default (matching gcc).

Daniel, I'd appreciate a review of the driver/cc1 parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
12534a9b7c5cbf6b8c8b3bb62ec13cd38a4a33f0 06-Feb-2010 Anders Carlsson <andersca@mac.com> Implement a warning diagnostic for weak vtables. Fixes PR6116.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1610b8198e31eb6d77d4d6904d6af88ef5cc6d3b 06-Feb-2010 Anders Carlsson <andersca@mac.com> Implement a warning diagnostic for weak vtables. Fixes PR6116.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ad760b38613b3f7f1024b011f6109bed1487b32e 05-Feb-2010 John McCall <rjmccall@apple.com> Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
04a67a6aa3dfdc92d57f7f8d93ba397348c868a4 05-Feb-2010 John McCall <rjmccall@apple.com> Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
663a2dc482905170a9ee846bf52c500c6741688b 05-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Oops, thanks Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
4794081837ba088965a71652a46494ef4c6b2590 05-Feb-2010 Douglas Gregor <dgregor@apple.com> Oops, thanks Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
0dfa56b5b0e2fb319d759dba8748419a5fa2a63a 05-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Initial skeleton of an AST "importer", which will take AST elements from
one context and import them into another context, merging them
according to language-specific rules. This is a skeleton. It doesn't
work, it isn't testable, but I want it in version control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
1b2949d27ec72894dec017c330c0548af4bb2476 05-Feb-2010 Douglas Gregor <dgregor@apple.com> Initial skeleton of an AST "importer", which will take AST elements from
one context and import them into another context, merging them
according to language-specific rules. This is a skeleton. It doesn't
work, it isn't testable, but I want it in version control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTImporter.h
08938e3746e96c4de85fc623a879b8a3bbff08fb 05-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Some clean up of replacement text API no longer needed by
my recent changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
88906cddbb1d5b3a868eeeec6cb170befc829c2f 05-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Some clean up of replacement text API no longer needed by
my recent changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
827d1a19016d0a6413a13a3d84bb9621614118f7 05-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Revert the unused TST_pixel entry from r95335 as it is not listed in the Sema
switch, triggering warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Specifiers.h
lang/Parse/DeclSpec.h
8047f17ff15ff85bfcfc666a2979a77d8af5a4ae 05-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Revert the unused TST_pixel entry from r95335 as it is not listed in the Sema
switch, triggering warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Specifiers.h
lang/Parse/DeclSpec.h
ff2621b6a57e72f8f895b701681728f70d73014c 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
72119c478ffb35354bb168890c77e6ab5271ba06 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
84ed819ff8442c1f9f14c488c6e3862323c5b6cb 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
461147fc8d39f7ad9ee91c53e113df585bd58a64 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
974f12890fee6dd9923c1b71e08c8a0ba92c345c 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
f5416bdb75832e0a400cf3b19bd2116d2fed9ebe 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
3ba7b3ac2b83fc52d27ee40a254ef3e3d22ac9f5 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
b4a9c612f901a47135ea531f60db997d4cc4cdf5 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
7c4d7b0e759c905f590e9c80ba877f9ea014a2b7 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
576bb92057979b14ca04b3080a9405662d0217a3 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> More GRState* -> Store changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
9d276f4f58d0f6ccc3aa218b9c7d34515abdb60a 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Change LazyCompoundVal to a <Store, MemRegion*> pair. We really don't need to
spread GRState* everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/ValueManager.h
bfcaf8048d1673320de60a22ca9c297d7484b2a8 05-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Change LazyCompoundVal to a <Store, MemRegion*> pair. We really don't need to
spread GRState* everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/ValueManager.h
bd9e9c41f75c55177d083502ada1e805aacadc35 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
565e465c6d0093f1bf8414b2cabdc842022385a9 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
9f0ca58754c1ee46c42fecf5b7b19725a0cd8473 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-missing-dealloc' to '-analyzer-check-objc-missing-dealloc'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
7909fc8833e734aac521d7d6945bd823d75150ac 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-missing-dealloc' to '-analyzer-check-objc-missing-dealloc'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
8d64b4226e42a62d16b9bcaee5a6465e672ac19a 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-methodsigs' to '-analyzer-check-objc-methodsigs'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
fa15be4cf95b7ed2d1df583497b16a6f897cf789 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-methodsigs' to '-analyzer-check-objc-methodsigs'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
31d76528d2e4c65bbf24a8b03050cb06bddf655c 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-unused-ivars' to '-analyzer-check-objc-unused-ivars'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
2ade536f6815bf6ff128333520232c3b0e701146 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-unused-ivars' to '-analyzer-check-objc-unused-ivars'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
4ce4665ff3801ca93abe5e3c54a736aa30dd1e02 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-dead-stores' to '-analyzer-check-dead-stores'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
cd9902bfb79c5c67559360514951714bdafac36e 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-dead-stores' to '-analyzer-check-dead-stores'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
ea87f3ac2f31f27f154acf097cea3a61d7267c46 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-security-syntactic' to '-analyzer-check-security-syntactic'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
fb3f893bc58071e548c97a3d667c8ab9b0c38cfb 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-security-syntactic' to '-analyzer-check-security-syntactic'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/Analyses.def
438d00a23413bb5e63afa12a975fd2f2e6216293 05-Feb-2010 John Thompson <john.thompson.jtsoftware@gmail.com> First stage of adding AltiVec support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/Specifiers.h
lang/Basic/TokenKinds.def
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
82287d19ded35248c4ce6a425ce74116a13ce44e 05-Feb-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> First stage of adding AltiVec support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/Specifiers.h
lang/Basic/TokenKinds.def
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
ff48492bf0bafea3cc3f549bad578259ccc67a81 04-Feb-2010 John McCall <rjmccall@apple.com> Extract a common structure for holding information about the definition
of a C++ record. Exposed a lot of problems where various routines were
silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order)
when presented with a non-definition. Also cuts down on memory usage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
86ff308724171494395a840fd2efbe25e62f352e 04-Feb-2010 John McCall <rjmccall@apple.com> Extract a common structure for holding information about the definition
of a C++ record. Exposed a lot of problems where various routines were
silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order)
when presented with a non-definition. Also cuts down on memory usage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
41c4e6c50f5fa693f4144e028c2e01ea95d865b9 04-Feb-2010 Ted Kremenek <kremenek@apple.com> Move ParseFormatString() and FormatStringHandler back into the analyze_printf namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
74d56a168966ff015824279a24aaf566180ed97d 04-Feb-2010 Ted Kremenek <kremenek@apple.com> Move ParseFormatString() and FormatStringHandler back into the analyze_printf namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
543d818dfdf7b0d4ad5cf9fd77be68782b1030c5 04-Feb-2010 Ted Kremenek <kremenek@apple.com> Convert flags in FormatSpecifier to be bitfields instead of doing
direct bit manipulation. This is is less error prone, and fixes a bug
in the handling of the LeadingZeroes flag as pointed out by Cristian
Draghici.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
03db470ec53315368f200a2382590e41ef9ff8d4 04-Feb-2010 Ted Kremenek <kremenek@apple.com> Convert flags in FormatSpecifier to be bitfields instead of doing
direct bit manipulation. This is is less error prone, and fixes a bug
in the handling of the LeadingZeroes flag as pointed out by Cristian
Draghici.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
db5993538c7f29ea7331dcb7292c083e1bab798c 04-Feb-2010 John McCall <rjmccall@apple.com> Allow calling convention attributes to apply to types. Patch by Chip Davis!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f82b4e85b1219295cad4b5851b035575bc293010 04-Feb-2010 John McCall <rjmccall@apple.com> Allow calling convention attributes to apply to types. Patch by Chip Davis!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7b3973a04c8e42803d8e9d09b99ed62b0d1d0580 04-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Cast evaluation no longer touch GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SValuator.h
814e6b915450456eb2a1ba15d82fc7f8ae3bc8a6 04-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Cast evaluation no longer touch GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/SValuator.h
14ae946ce5c568b2fdfe7512bb9ef0294f8d2ef5 04-Feb-2010 John McCall <rjmccall@apple.com> Mangle member expressions. Also invented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
2f27bf854f0519810b34afd209089cc75536b757 04-Feb-2010 John McCall <rjmccall@apple.com> Mangle member expressions. Also invented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a951d436a924a498800d11317b5d85db826c61ff 04-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Now that CastRetrievedVal returns SVal, there is no need to use CastResult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
c999ed792900026c462027e546d63c3f39310755 04-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Now that CastRetrievedVal returns SVal, there is no need to use CastResult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/Store.h
9f628a7a92013f6114687ebb063ff4f5a982ee6a 04-Feb-2010 John McCall <rjmccall@apple.com> Add mangling support for calls, sizeof/alignof, constructor calls,
float literals, and unresolved lookups (which required hand-wavey extensions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
1dd7383dc48718c452e71a625b29531dd96fbb9d 04-Feb-2010 John McCall <rjmccall@apple.com> Add mangling support for calls, sizeof/alignof, constructor calls,
float literals, and unresolved lookups (which required hand-wavey extensions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a34a5d0bebc02f65320a6331eaf407d847c8c6c1 03-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> In some contexts, type declarations cannot occur. Pass this information down to ParseClassSpecifier, to make its decision easier. Fixes PR6200.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d9bafa76f8d6eb9e4f4974ed322217f8df6bb82e 03-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> In some contexts, type declarations cannot occur. Pass this information down to ParseClassSpecifier, to make its decision easier. Fixes PR6200.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a3af6913e8d3eef8e1fb5c42534a97702fb3bf98 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
6d5a1c28593443f3973ef38f8fa042d59182412d 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
b93a009003f19418ef0ef0d8a42a3895562c7391 03-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> When a function or variable somehow depends on a type or declaration
that is in an anonymous namespace, give that function or variable
internal linkage.

This change models an oddity of the C++ standard, where names declared
in an anonymous namespace have external linkage but, because anonymous
namespace are really "uniquely-named" namespaces, the names cannot be
referenced from other translation units. That means that they have
external linkage for semantic analysis, but the only sensible
implementation for code generation is to give them internal
linkage. We now model this notion via the UniqueExternalLinkage
linkage type. There are several changes here:

- Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage
when the declaration is in an anonymous namespace.
- Added Type::getLinkage() to determine the linkage of a type, which
is defined as the minimum linkage of the types (when we're dealing
with a compound type that is not a struct/class/union).
- Extended NamedDecl::getLinkage() to consider the linkage of the
template arguments and template parameters of function template
specializations and class template specializations.
- Taught code generation to rely on NamedDecl::getLinkage() when
determining the linkage of variables and functions, also
considering the linkage of the types of those variables and
functions (C++ only). Map UniqueExternalLinkage to internal
linkage, taking out the explicit checks for
isInAnonymousNamespace().

This fixes much of PR5792, which, as discovered by Anders Carlsson, is
actually the reason behind the pass-manager assertion that causes the
majority of clang-on-clang regression test failures. With this fix,
Clang-built-Clang+LLVM passes 88% of its regression tests (up from
67%). The specific numbers are:

LLVM:
Expected Passes : 4006
Expected Failures : 32
Unsupported Tests : 40
Unexpected Failures: 736

Clang:
Expected Passes : 1903
Expected Failures : 14
Unexpected Failures: 75

Overall:
Expected Passes : 5909
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 811

Still to do:
- Improve testing
- Check whether we should allow the presence of types with
InternalLinkage (in addition to UniqueExternalLinkage) given
variables/functions internal linkage in C++, as mentioned in
PR5792.
- Determine how expensive the getLinkage() calls are in practice;
consider caching the result in NamedDecl.
- Assess the feasibility of Chris's idea in comment #1 of PR5792.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/Linkage.h
lang/Basic/Specifiers.h
0b6bc8bd7a1d2a7d7478d13d78cff94cacad61fc 03-Feb-2010 Douglas Gregor <dgregor@apple.com> When a function or variable somehow depends on a type or declaration
that is in an anonymous namespace, give that function or variable
internal linkage.

This change models an oddity of the C++ standard, where names declared
in an anonymous namespace have external linkage but, because anonymous
namespace are really "uniquely-named" namespaces, the names cannot be
referenced from other translation units. That means that they have
external linkage for semantic analysis, but the only sensible
implementation for code generation is to give them internal
linkage. We now model this notion via the UniqueExternalLinkage
linkage type. There are several changes here:

- Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage
when the declaration is in an anonymous namespace.
- Added Type::getLinkage() to determine the linkage of a type, which
is defined as the minimum linkage of the types (when we're dealing
with a compound type that is not a struct/class/union).
- Extended NamedDecl::getLinkage() to consider the linkage of the
template arguments and template parameters of function template
specializations and class template specializations.
- Taught code generation to rely on NamedDecl::getLinkage() when
determining the linkage of variables and functions, also
considering the linkage of the types of those variables and
functions (C++ only). Map UniqueExternalLinkage to internal
linkage, taking out the explicit checks for
isInAnonymousNamespace().

This fixes much of PR5792, which, as discovered by Anders Carlsson, is
actually the reason behind the pass-manager assertion that causes the
majority of clang-on-clang regression test failures. With this fix,
Clang-built-Clang+LLVM passes 88% of its regression tests (up from
67%). The specific numbers are:

LLVM:
Expected Passes : 4006
Expected Failures : 32
Unsupported Tests : 40
Unexpected Failures: 736

Clang:
Expected Passes : 1903
Expected Failures : 14
Unexpected Failures: 75

Overall:
Expected Passes : 5909
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 811

Still to do:
- Improve testing
- Check whether we should allow the presence of types with
InternalLinkage (in addition to UniqueExternalLinkage) given
variables/functions internal linkage in C++, as mentioned in
PR5792.
- Determine how expensive the getLinkage() calls are in practice;
consider caching the result in NamedDecl.
- Assess the feasibility of Chris's idea in comment #1 of PR5792.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/Linkage.h
lang/Basic/Specifiers.h
a9d08c4e62c469129df8900f5fa541ccf3f21579 03-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add skeleton of flat store manager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
lang/Frontend/Analyses.def
5d26bc02e297543a0252d675d31632790b9a7e6b 03-Feb-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add skeleton of flat store manager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/Store.h
lang/Frontend/Analyses.def
bc7aeabe736622530eabe68e1dfac51fd3e5f9dd 03-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Implement Doug's suggestion. Eliminate the Stmts pointer from CXXTryStmt and instead allocate the statements after the object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
a1a396df16c02b22983b5c9592022fd9237d4866 03-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Implement Doug's suggestion. Eliminate the Stmts pointer from CXXTryStmt and instead allocate the statements after the object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
56cbd4e5ccece0236767469f75a45bf2682b4c82 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -[no-]integrated-as for clang.
- Requires backend support, which only exists for i386--darwin currently.

No 'as' required:
--
ddunbar@ozzy:tmp$ cat t.c
int main() { return 42; }
ddunbar@ozzy:tmp$ clang -m32 -integrated-as t.c


ddunbar@ozzy:tmp$ ./a.out; echo $?
42
ddunbar@ozzy:tmp$
--

The random extra whitespace is how you know its working! :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
lang/Driver/Tool.h
lang/Driver/ToolChain.h
8767cbc475ed96397b6f08617814eeb9cab121bd 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -[no-]integrated-as for clang.
- Requires backend support, which only exists for i386--darwin currently.

No 'as' required:
--
ddunbar@ozzy:tmp$ cat t.c
int main() { return 42; }
ddunbar@ozzy:tmp$ clang -m32 -integrated-as t.c


ddunbar@ozzy:tmp$ ./a.out; echo $?
42
ddunbar@ozzy:tmp$
--

The random extra whitespace is how you know its working! :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
lang/Driver/Tool.h
lang/Driver/ToolChain.h
f7752965429bab3b29c855b74b1f50f8b4e5b737 03-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Remove the SmallVector from CXXTryStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
b0e4cb6a88a4b4bd2ecdcc622e852fa3e20290c9 03-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Remove the SmallVector from CXXTryStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
f1f1590dc4c3ddec947ce5b0c6d7c03c057fbea7 03-Feb-2010 David Chisnall <csdavec@swan.ac.uk> Numerous changes to selector handling:

- Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit.

- Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant.

- Recognise @selector() expressions as valid static initialisers (as GCC does).

- Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load.

- Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this:

- (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL)
withObject: (id)object;

Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes.

- Made @selector() expressions emit type info if available and the runtime supports it.

Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
a8fa96e366ab36145a5500dd4fbea717c217f131 03-Feb-2010 David Chisnall <csdavec@swan.ac.uk> Numerous changes to selector handling:

- Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit.

- Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant.

- Recognise @selector() expressions as valid static initialisers (as GCC does).

- Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load.

- Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this:

- (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL)
withObject: (id)object;

Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes.

- Made @selector() expressions emit type info if available and the runtime supports it.

Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
7b1c919b68d31964e1ac663900da719058e010f5 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Wire up -emit-obj, for emitting object files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
da1573f95902a42aa4d11e8f45ab98ec7e27bc28 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> clang -cc1: Wire up -emit-obj, for emitting object files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
19f36e292e6a6dabde1156d1aaa342cfa805ea8a 03-Feb-2010 John McCall <rjmccall@apple.com> Remove abstract expression kinds from the StmtClass enum. Update a few users
appropriately. Call out a few missing cases in the expression mangler.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
09cc141c89a5e9f305c17d7a88298647df16cedd 03-Feb-2010 John McCall <rjmccall@apple.com> Remove abstract expression kinds from the StmtClass enum. Update a few users
appropriately. Call out a few missing cases in the expression mangler.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
e7dcec91374a863a92a299d99f5cb5fbc3c6298b 03-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Fix DeclContext of an objective-c @catch variable
declaration. Fixes radar 7590273.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2f764f11f513c7b51c716fffa5d02e5de816836f 03-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Fix DeclContext of an objective-c @catch variable
declaration. Fixes radar 7590273.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0a113139bfed49a562a14f9b4de1b371400bb66e 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't error/warn on conflicting deployment targets. Apparently
this is still a popular thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
39053672d459bff1d3ab1f72a7901f24e3fa542e 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't error/warn on conflicting deployment targets. Apparently
this is still a popular thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
573aed17ff75e0d159aa9623d556aa32c8d54c54 02-Feb-2010 John McCall <rjmccall@apple.com> Extract a common base class between UnresolvedLookupExpr and
UnresolvedMemberExpr and employ it in a few places where it's useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
7bb12da2b0749eeebb21854c77877736969e59f2 02-Feb-2010 John McCall <rjmccall@apple.com> Extract a common base class between UnresolvedLookupExpr and
UnresolvedMemberExpr and employ it in a few places where it's useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
62995f069931ad50631eb8dbb2ab4653413577f5 02-Feb-2010 Chris Lattner <sabre@nondot.org> this is reasonably complete by now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
88aad88df1d47d756e5e76fbef6c0bcdaab51b42 02-Feb-2010 Chris Lattner <sabre@nondot.org> this is reasonably complete by now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
4999cb0d4c499b59ac341cdaacdf3922d85d6a7d 02-Feb-2010 John McCall <rjmccall@apple.com> Improve the diagnostic used when an incompatible overload set is passed
as an argument during overload resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5920dbba965a2f2a963313d94be3ff3d2b67ece7 02-Feb-2010 John McCall <rjmccall@apple.com> Improve the diagnostic used when an incompatible overload set is passed
as an argument during overload resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
085b7ba367b7e2cc022f983c714595fe02dbe7f1 02-Feb-2010 Chris Lattner <sabre@nondot.org> Implement PR6180, substantially improving the diagnostics we get from
forgetting a ';' at the end of a struct. For something like:

class c {
}
void foo() {}

we now produce:

t.cc:3:2: error: expected ';' after class
}
^
;

instead of:

t.cc:4:1: error: cannot combine with previous 'class' declaration specifier
void foo() {}
^
t.cc:2:7: error: 'class c' can not be defined in the result type of a function
class c {
^

GCC produces:

t.cc:4: error: new types may not be defined in a return type
t.cc:4: note: (perhaps a semicolon is missing after the definition of ‘c’)
t.cc:4: error: two or more data types in declaration of ‘foo’

I *think* I got the follow set right, but if I forgot anything, we'll start
getting spurious "expected ';' after class" errors, let me know if you see
any.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
4ed5d91db256f7dbe6bf716da0b801004c197254 02-Feb-2010 Chris Lattner <sabre@nondot.org> Implement PR6180, substantially improving the diagnostics we get from
forgetting a ';' at the end of a struct. For something like:

class c {
}
void foo() {}

we now produce:

t.cc:3:2: error: expected ';' after class
}
^
;

instead of:

t.cc:4:1: error: cannot combine with previous 'class' declaration specifier
void foo() {}
^
t.cc:2:7: error: 'class c' can not be defined in the result type of a function
class c {
^

GCC produces:

t.cc:4: error: new types may not be defined in a return type
t.cc:4: note: (perhaps a semicolon is missing after the definition of ‘c’)
t.cc:4: error: two or more data types in declaration of ‘foo’

I *think* I got the follow set right, but if I forgot anything, we'll start
getting spurious "expected ';' after class" errors, let me know if you see
any.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
96063113bc5227ec0cabab27525a5877c589b3c4 02-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Improve handling of enumerator values for C and C++, including:

- In C++, prior to the closing '}', set the type of enumerators
based on the type of their initializer. Don't perform unary
conversions on the enumerator values.
- In C++, handle overflow when an enumerator has no initializer and
its value cannot be represented in the type of the previous
enumerator.
- In C, handle overflow more gracefully, by complaining and then
falling back to the C++ rules.
- In C, if the enumerator value is representable in an int, convert the
expression to the type 'int'.

Fixes PR5854 and PR4515.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
677e4feebe4b3485504860d991d700cc3b933961 02-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve handling of enumerator values for C and C++, including:

- In C++, prior to the closing '}', set the type of enumerators
based on the type of their initializer. Don't perform unary
conversions on the enumerator values.
- In C++, handle overflow when an enumerator has no initializer and
its value cannot be represented in the type of the previous
enumerator.
- In C, handle overflow more gracefully, by complaining and then
falling back to the C++ rules.
- In C, if the enumerator value is representable in an int, convert the
expression to the type 'int'.

Fixes PR5854 and PR4515.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5f9c13dd8204e08957f4e1f18800e4845456f4d6 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
609508ce95732e7e7010f79c5207613eced7c9cb 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
3bb930e44f1e367ef617a1b6a168589c42bd8e35 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
984eb8611d9ee46fc6351dee43609f2deed99f3c 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
50349fac9368c25c7ac0ecd28009cb11051129e2 01-Feb-2010 Chris Lattner <sabre@nondot.org> Don't explicitly force utf strings into the __TEXT,__ustring
by setting the section of the generated global. This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly
handle). This is rdar://7589850



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
b9f709665a6fe9da5c67d0431de2e63c55dd5322 01-Feb-2010 Chris Lattner <sabre@nondot.org> Don't explicitly force utf strings into the __TEXT,__ustring
by setting the section of the generated global. This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly
handle). This is rdar://7589850



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
8cb23faaa8f07087e40d95432b575a810a4e1417 01-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
31310a21fb2a9f13950f864f681c86080b05d5b2 01-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
011323d90dd2c1ff2db6e1871154831885f2d7cb 01-Feb-2010 John McCall <rjmccall@apple.com> Note that an overload candidate was non-viable because template argument
deduction failed. Right now there's a very vague diagnostic for most cases
and a good diagnostic for incomplete deduction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
342fec43c515184a3c0d0600323dfec2b059e74e 01-Feb-2010 John McCall <rjmccall@apple.com> Note that an overload candidate was non-viable because template argument
deduction failed. Right now there's a very vague diagnostic for most cases
and a good diagnostic for incomplete deduction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
810cdd31057e67b7efaab3ef99778bdfbc068808 01-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Fix for PR5185. C99 [*] VLA notation should be disallowed in function definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d17e340e2d516139931768697bf080f60920ba9d 01-Feb-2010 Sam Weinig <sam.weinig@gmail.com> Fix for PR5185. C99 [*] VLA notation should be disallowed in function definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5c0e897ed39db3443ca9695471a87d77f1ac9768 01-Feb-2010 John McCall <rjmccall@apple.com> Access checking for implicit user-defined conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
b13b737a2450167c82e148590e8019b839ce6b98 01-Feb-2010 John McCall <rjmccall@apple.com> Access checking for implicit user-defined conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
08fbf08fc4fc3816971556bad895d9c9d88966b7 31-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e9d12b6c50c1e9b05443db099e21026c5991a93b 31-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add VarDecl::isThisDeclarationADefinition(), which properly encapsulates the logic for when a variable declaration is a (possibly tentativ) definition. Add a few functions building on this, and shift C tentative definition handling over to this new functionality. This shift also kills the Sema::TentativeDefinitions map and instead simply stores all declarations in the renamed list. The correct handling for multiple tentative definitions is instead shifted to the final walk of the list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
bbe7ff8e44e5a1dbf5e26c93afeb8eef479a2a54 31-Jan-2010 Anders Carlsson <andersca@mac.com> Diagnose binding a non-const reference to a vector element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
093802675b1548f2a5f44c29938d65cce00d58bb 31-Jan-2010 Anders Carlsson <andersca@mac.com> Diagnose binding a non-const reference to a vector element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
0076ce20ef0ac992c4bac7777f345851802aefdc 31-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix PR6159 and several other problems with value-dependent non-type template
arguments. This both prevents meaningless checks on these arguments and ensures
that they are represented as an expression by the instantiation.

Cleaned up and added standard text to the relevant test case. Also started
adding tests for *rejected* cases. At least one FIXME here where (I think) we
allow something we shouldn't. More to come in the area of rejecting crazy
arguments with decent diagnostics. Suggestions welcome for still better
diagnostics on these errors!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
038cc399940deefc0f55aad8be97312a7390e2ad 31-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix PR6159 and several other problems with value-dependent non-type template
arguments. This both prevents meaningless checks on these arguments and ensures
that they are represented as an expression by the instantiation.

Cleaned up and added standard text to the relevant test case. Also started
adding tests for *rejected* cases. At least one FIXME here where (I think) we
allow something we shouldn't. More to come in the area of rejecting crazy
arguments with decent diagnostics. Suggestions welcome for still better
diagnostics on these errors!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e3129df6079a8e0028250d71a10b71dcf728d78a 31-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Rework base and member initialization in constructors, with several
(necessarily simultaneous) changes:

- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).

- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.

- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it

- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.

- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.

- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.

- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.

There are also a few "opportunity" fixes here that were needed to not
regress, for example:

- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.

- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
9db7dbb918ca49f4ee6c181e4917e7b6ec547353 31-Jan-2010 Douglas Gregor <dgregor@apple.com> Rework base and member initialization in constructors, with several
(necessarily simultaneous) changes:

- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).

- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.

- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it

- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.

- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.

- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.

- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.

There are also a few "opportunity" fixes here that were needed to not
regress, for example:

- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.

- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
e5a62222721fc93c69bf152c728e2a0a72094671 31-Jan-2010 Anders Carlsson <andersca@mac.com> Remove the SmallVectors from AsmStmt. Fixes PR6105.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
966146e89141804ff6492739a2a6e6592ca671c7 31-Jan-2010 Anders Carlsson <andersca@mac.com> Remove the SmallVectors from AsmStmt. Fixes PR6105.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5f72946a2b22f3f6bb161381089af01377e811bd 30-Jan-2010 Anders Carlsson <andersca@mac.com> Use IdentifierInfo * instead of std::string for the AsmStmt names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
ff93dbd887e40588ed55d135037bb9287488b285 30-Jan-2010 Anders Carlsson <andersca@mac.com> Use IdentifierInfo * instead of std::string for the AsmStmt names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
4cc4433e4f8df9a5863b5bf66727a8494eaf5c63 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Ensure the CompilerInvocation object used in LoadFromCommandLine is
live as long as the ASTUnit. This is useful for clients which want to maintain
pointers to the LangOptions object which ultimately lives in the
CompilerInvocation, although it would be nice to make all of this ownership
stuff more explicit and obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
807b06157a1a5c050520fc194d32f16d22d423a8 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Ensure the CompilerInvocation object used in LoadFromCommandLine is
live as long as the ASTUnit. This is useful for clients which want to maintain
pointers to the LangOptions object which ultimately lives in the
CompilerInvocation, although it would be nice to make all of this ownership
stuff more explicit and obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
562df31360d44201349bc516538d30c0099f5506 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> CompilerInstance: Change to not contain the CompilerInvocation object.

This allows clients to install their own CompilerInvocation object, which is
important for clients that may wish to create references to things like
LangOptions whose lifetime will extend past that of the CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
6228ca00121669ec06a19df4fad87d5049c097cf 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> CompilerInstance: Change to not contain the CompilerInvocation object.

This allows clients to install their own CompilerInvocation object, which is
important for clients that may wish to create references to things like
LangOptions whose lifetime will extend past that of the CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
f34045cd1957b33432ae2dfa2758ef4320f2ab9a 30-Jan-2010 Anders Carlsson <andersca@mac.com> Even more AsmStmt cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
acb6bcb442936f3c14126fdd473307c17647cb84 30-Jan-2010 Anders Carlsson <andersca@mac.com> Even more AsmStmt cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
22b9be9e2cf26a261e4aeb9de19ea2c3a27a1e43 30-Jan-2010 Anders Carlsson <andersca@mac.com> More asm cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
a5a79f7d16b48d3be8bcc8c7650e31aefd92b657 30-Jan-2010 Anders Carlsson <andersca@mac.com> More asm cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
3c0139ea8b51400424c97b36cd0413f0808eb2ad 30-Jan-2010 Anders Carlsson <andersca@mac.com> Combine AsmStmt::setOutputsAndInputs and AsmStmt::setClobbers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
fdba9c069023f686e2608affde02c82131ee1cf8 30-Jan-2010 Anders Carlsson <andersca@mac.com> Combine AsmStmt::setOutputsAndInputs and AsmStmt::setClobbers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
4a8f819bdd8f3af76f47146ffdc53a169a96a09f 30-Jan-2010 Anders Carlsson <andersca@mac.com> Yay for more StringRefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
83c021c6d33aa173cf1a6e3bc61006dabb042703 30-Jan-2010 Anders Carlsson <andersca@mac.com> Yay for more StringRefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
41f80b5a55bdd4d008bd293b77efc8224182ed35 30-Jan-2010 Anders Carlsson <andersca@mac.com> StringRef-ize the TargetInfo::ConstraintInfo constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f959fb5fb82ae2cbdf8635d734613a01818fb7bf 30-Jan-2010 Anders Carlsson <andersca@mac.com> StringRef-ize the TargetInfo::ConstraintInfo constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
977d502acf3d2d1e3c86c1885265e136db49abc1 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> Recognize 'q' as a format length modifier (from BSD).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
01aefc6d20fbfd50bfb83926226dee86dd31c9c5 30-Jan-2010 Daniel Dunbar <daniel@zuster.org> Recognize 'q' as a format length modifier (from BSD).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
6eddb15b9e48f8c0472150493cb4514e3a026f20 30-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef instead of returning a temporary std::string.

This fixes a really nasty bug in Darwin::getDarwinArchName where we were going
StringRef -> temporary std::string -> StringRef (and return the dead StringRef).
The StringRefs from Triple live as long as the Triple itself, that should be
long enough.

Hopefully 2 of 4 MSVC buildbot failures are gone now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
f22d1fd96d6056a2f271b0f7353b31f47547127b 30-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef instead of returning a temporary std::string.

This fixes a really nasty bug in Darwin::getDarwinArchName where we were going
StringRef -> temporary std::string -> StringRef (and return the dead StringRef).
The StringRefs from Triple live as long as the Triple itself, that should be
long enough.

Hopefully 2 of 4 MSVC buildbot failures are gone now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
54429dbe05db911b61f3a88e108bf171bcd654e8 30-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence clang++ warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
500f189081b2edfcf3e14864c0df870d85701a6f 30-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence clang++ warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
fef905c27e50bcddeed6e008b5bbf83f9d12db86 30-Jan-2010 Ted Kremenek <kremenek@apple.com> Add basic type checking of format string conversion specifiers and their arguments. Thanks to Cristian Draghici for his help with this patch!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d635c5fcc45c952b75743dd2f4c86d6950e4954e 30-Jan-2010 Ted Kremenek <kremenek@apple.com> Add basic type checking of format string conversion specifiers and their arguments. Thanks to Cristian Draghici for his help with this patch!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ecf8e8a3ae64ef33cd1beec57e25a740f6c092f7 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Per a suggestion from Cristian Draghici, add a method to FormatSpecifier that returns the expected type of the matching data argument. It isn't complete, but should handle several of the important cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
33567d2feb3e52fac6e0b46d5b3d137fc8467fb0 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Per a suggestion from Cristian Draghici, add a method to FormatSpecifier that returns the expected type of the matching data argument. It isn't complete, but should handle several of the important cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
4f611fa1eb5b57ae66465cfeb73f14b18b4d4446 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Switch Sema over to using the new implementation of format string
checking. It passes all existing tests, and the diagnostics have been
refined to provide better range information (we now highlight
individual format specifiers) and more precise wording in the
diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f88c8e02da48afea6a04091f675af5c4facd99f1 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Switch Sema over to using the new implementation of format string
checking. It passes all existing tests, and the diagnostics have been
refined to provide better range information (we now highlight
individual format specifiers) and more precise wording in the
diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3a2004dc41f4a5735d1717ef63abfbbf25d36611 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Enhancements to the alternate (WIP) format string checking:

- Add ConversionSpecifier::consumesDataArgument() as a helper method
to determine if a conversion specifier requires a matching argument.
- Add support for glibc-specific '%m' conversion
- Add an extra callback to HandleNull() for locations within the
format specifier that have a null character


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
4dcb18ff9d92c66c78077ac5cae4b83af37292e4 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Enhancements to the alternate (WIP) format string checking:

- Add ConversionSpecifier::consumesDataArgument() as a helper method
to determine if a conversion specifier requires a matching argument.
- Add support for glibc-specific '%m' conversion
- Add an extra callback to HandleNull() for locations within the
format specifier that have a null character


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
cc845d86b09df95440626e0f5c9c4ce361fc8fff 29-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Fix reference-binding when we have a reference to const volatile type;
previously, we were allowing this to bind to a temporary. Now, we
don't; add test-cases and improve diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ef06e2451c3069569ba543e7b1c5e0de7a257005 29-Jan-2010 Douglas Gregor <dgregor@apple.com> Fix reference-binding when we have a reference to const volatile type;
previously, we were allowing this to bind to a temporary. Now, we
don't; add test-cases and improve diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4df49eaff07c8dd77c5b7d24801449e1eeae9205 29-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix typo found by clang++. Yay for -Wuninitialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
ddc6b664e4caa86bcccbc2ddfe6ad0d4768372bc 29-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix typo found by clang++. Yay for -Wuninitialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
44c97fa58167368f7f7984544cace6a721e37aa2 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add getters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
4e1c181e2bb378dad55dd25c18611e3a0fb6c22a 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add getters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
437b9a1e67de664cecba5cbbbdf51ccf5da23bed 29-Jan-2010 Anders Carlsson <andersca@mac.com> Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e6d2a534851a649485cb087e9dfcaf8a65886858 29-Jan-2010 Anders Carlsson <andersca@mac.com> Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
bf5afe56417379aba6372d5c416e4d320d6a01d4 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Alternate format string checking: issue warnings for incomplete format specifiers.

In addition, move ParseFormatString() and FormatStringHandler() from
the clang::analyze_printf to the clang namespace. Hopefully this will
resolve some link errors on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
808015a18bd97781ce437831a95a92fdfc8d5136 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Alternate format string checking: issue warnings for incomplete format specifiers.

In addition, move ParseFormatString() and FormatStringHandler() from
the clang::analyze_printf to the clang namespace. Hopefully this will
resolve some link errors on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
lang/Basic/DiagnosticSemaKinds.td
76d8ee48b6f8591391f75ed175e49b385a85fc02 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Alternate format string checking: issue a warning for invalid conversion specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
26ac2e07b46bfb4d4f00752c96481c0a98c79c69 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Alternate format string checking: issue a warning for invalid conversion specifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
9d995ff111efce46ec3b76316b1d97268e7fe2dc 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add an CXXBindReferenceExpr (not used just yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
eb60edffa147e061278c436e513b0df9b4c4e7f6 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add an CXXBindReferenceExpr (not used just yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
fbb374bb50c1a5606186b617bcce34ce21213922 29-Jan-2010 John McCall <rjmccall@apple.com> Do a little magic and a little greasework to make it much more efficient
to cast a DeclContext down to a specific implementation class.

There are still lots of calls to Decl::castFromDeclContext left, mostly
arising from DeclContext::getParent().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
80cd64a8450d8e2c079dc134d9711cd45ba89d63 29-Jan-2010 John McCall <rjmccall@apple.com> Do a little magic and a little greasework to make it much more efficient
to cast a DeclContext down to a specific implementation class.

There are still lots of calls to Decl::castFromDeclContext left, mostly
arising from DeclContext::getParent().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
cf731975a4be023d8ea83fb90349a0e6ed62b66c 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Alternate format string checking: warn of '%n' as being potentially insecure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
e82d804ee761006250543d6fe6e98ee7896cd756 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Alternate format string checking: warn of '%n' as being potentially insecure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
920439c0ec59e26196ce0defcda765c76c8b7778 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Add precision/field width checking to AlternateCheckPrintfString().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
0d27735c51f5bd392e673cf39a675e14e9442387 29-Jan-2010 Ted Kremenek <kremenek@apple.com> Add precision/field width checking to AlternateCheckPrintfString().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
8e933546c229b4dcd7b59d32f95cf73f227cb313 29-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> When printing diagnostics in c-index-test, also print source ranges
and fix-it information, so we can see everything in one place. Along
the way, fix a few bugs with deserialization and query of diagnostics
in CIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
51c6d384551674facc19f745ecf6e289d28dc55f 29-Jan-2010 Douglas Gregor <dgregor@apple.com> When printing diagnostics in c-index-test, also print source ranges
and fix-it information, so we can see everything in one place. Along
the way, fix a few bugs with deserialization and query of diagnostics
in CIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
a3c199b287733dbe42fc28b144e24bb0a09f1da9 28-Jan-2010 John McCall <rjmccall@apple.com> Access control for surrogate function calls. Required a moderately gross hack
to get the access bits set properly in conversion sets.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
233a6419097ed97b67ff8efcacef9af613262ca3 28-Jan-2010 John McCall <rjmccall@apple.com> Access control for surrogate function calls. Required a moderately gross hack
to get the access bits set properly in conversion sets.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
ca5a30b4e4cf7676dee95764d774ec9700f42825 28-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce serialization and deserialization of diagnostic information
so that CIndex can report diagnostics through the normal mechanisms
even when executing Clang in a separate process. This applies both
when performing code completion and when using ASTs as an intermediary
for clang_createTranslationUnitFromSourceFile().

The serialized format is not perfect at the moment, because it does
not encapsulate macro-instantiation information. Instead, it maps all
source locations back to the instantiation location. However, it does
maintain source-range and fix-it information. To get perfect fidelity
from the serialized format would require serializing a large chunk of
the source manager; at present, it isn't clear if this code will live
long enough for that to matter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/SourceManager.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
d93256e55673a17d18543397ec462416acb13792 28-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce serialization and deserialization of diagnostic information
so that CIndex can report diagnostics through the normal mechanisms
even when executing Clang in a separate process. This applies both
when performing code completion and when using ASTs as an intermediary
for clang_createTranslationUnitFromSourceFile().

The serialized format is not perfect at the moment, because it does
not encapsulate macro-instantiation information. Instead, it maps all
source locations back to the instantiation location. However, it does
maintain source-range and fix-it information. To get perfect fidelity
from the serialized format would require serializing a large chunk of
the source manager; at present, it isn't clear if this code will live
long enough for that to matter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/SourceManager.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
1328176b16ca8f3c103bbc32c83edf7131ea5715 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Add position of conversion specifier character to 'ConversionSpecifier'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
a8d8fec7876666d90bb2a144d3b832b2d89a088a 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Add position of conversion specifier character to 'ConversionSpecifier'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
5d5beb9fb6d034ee938886c12cc264dce8c0a16e 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename namespace clang::printf to clang::analyze_printf to avoid problems where the reference to 'printf' is ambiguous.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
d2dcece5882215e92a80bff8a7b7fd2fd81d7086 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename namespace clang::printf to clang::analyze_printf to avoid problems where the reference to 'printf' is ambiguous.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
9e455bbcc8ee1efc7019849fcf1d2ef74a201b38 28-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a rewrite bug rewriting nested ivars reference.
(Radar 7583971).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
7e20ffe322866f6a2e820e054da9bd0f6e9b0af4 28-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a rewrite bug rewriting nested ivars reference.
(Radar 7583971).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
e812a3122c72da6cf7e69c0c68939ca4bf1cbfc4 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Allow HandleFormatSpecifier() to indicate that no more processing of the format string is desired.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
d5f2096e266b7905df660b7839e69e9ed6ba9018 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Allow HandleFormatSpecifier() to indicate that no more processing of the format string is desired.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
1a42095fa3af5a962ff24cf4b0b642d19b257246 28-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Switch the remaining diagnostic printing in CIndex over to the
diagnostic callback mechanism, so all diagnostics now go through that
callback. Also, eliminate the displayDiagnostics flag to
clang_createIndex(), since it is no longer necessary: the client
determines whether to display diagnostics or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94714 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/DiagnosticFrontendKinds.td
936ea3b590117d2cd73b1b92621d06c4a7edbe60 28-Jan-2010 Douglas Gregor <dgregor@apple.com> Switch the remaining diagnostic printing in CIndex over to the
diagnostic callback mechanism, so all diagnostics now go through that
callback. Also, eliminate the displayDiagnostics flag to
clang_createIndex(), since it is no longer necessary: the client
determines whether to display diagnostics or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94714 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/DiagnosticFrontendKinds.td
17046e50050072bd8155259acae85bbeeb7bf999 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Add '@' conversion specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
c7cbb9bf8e0bf8c3191ef0b782ec198c433d2a4e 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Add '@' conversion specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
0c90dc1cac9e73efd0f2cf753202b1e3dbba6b1d 28-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Implement a diagnostics callback for the C interface to Clang, so that
clients can format diagnostics as they wish rather than having to
parse standard error. All of the important parts of the front end's
diagnostics are exposed: text, severity, location, source ranges, and
fix-its. The diagnostics callback is now available with
clang_createTranslationUnitFromSource() and
clang_createTranslationUnit().

As part of this change, CXSourceLocation and CXSourceRange got one
pointer larger, since we need to hold on to the SourceManager and
LangOptions structures in the source location. This is the minimum
amount of information needed for the functions that operate on source
locations and ranges (as implemented now). Previously we held on to
the ASTContext, but the diagnostics callback can end up with source
locations when there is no ASTContext (or preprocessor).

Still to do:
- Code completion needs to support the diagnostics callback, once we
have the ability to (de-)serialize diagnostics.
- Eliminate the "displayDiagnostics" argument to createIndex; we'll
always pass diagnostics to the callback and let it deal with display.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94709 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5352ac06d8f6194825bb2a99ffa009b61bafb503 28-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement a diagnostics callback for the C interface to Clang, so that
clients can format diagnostics as they wish rather than having to
parse standard error. All of the important parts of the front end's
diagnostics are exposed: text, severity, location, source ranges, and
fix-its. The diagnostics callback is now available with
clang_createTranslationUnitFromSource() and
clang_createTranslationUnit().

As part of this change, CXSourceLocation and CXSourceRange got one
pointer larger, since we need to hold on to the SourceManager and
LangOptions structures in the source location. This is the minimum
amount of information needed for the functions that operate on source
locations and ranges (as implemented now). Previously we held on to
the ASTContext, but the diagnostics callback can end up with source
locations when there is no ASTContext (or preprocessor).

Still to do:
- Code completion needs to support the diagnostics callback, once we
have the ability to (de-)serialize diagnostics.
- Eliminate the "displayDiagnostics" argument to createIndex; we'll
always pass diagnostics to the callback and let it deal with display.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94709 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1fa44fc90aa402c4bf12f964d46afff862073537 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Add skeleton for a more structured way to analyzing pring format
strings than what we currently have in Sema. This is both an
experiment and a WIP.

The idea is simple: parse the format string incrementally,
constructing a well-structure representation of each format specifier.
Each format specifier is then handed back one-by-one to a client via a
callback. Malformed format strings are also handled with callbacks.
The idea is to separate the parsing of the format string from the
emission of diagnostics. Currently what we have in Sema for handling
format strings is a mongrel of both that is hard to follow and
difficult to modify (I can apply this label since I'm the original
author of that code).

This is in libAnalysis as it is reasonable generic and can potentially
be used both by libSema and libChecker.

Comments welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
8f0a1c73fd2b83afd4b1fce6f964535b51d13659 28-Jan-2010 Ted Kremenek <kremenek@apple.com> Add skeleton for a more structured way to analyzing pring format
strings than what we currently have in Sema. This is both an
experiment and a WIP.

The idea is simple: parse the format string incrementally,
constructing a well-structure representation of each format specifier.
Each format specifier is then handed back one-by-one to a client via a
callback. Malformed format strings are also handled with callbacks.
The idea is to separate the parsing of the format string from the
emission of diagnostics. Currently what we have in Sema for handling
format strings is a mongrel of both that is hard to follow and
difficult to modify (I can apply this label since I'm the original
author of that code).

This is in libAnalysis as it is reasonable generic and can potentially
be used both by libSema and libChecker.

Comments welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/PrintfFormatString.h
0cc4ace5d467add525df432ac508814b84ec11be 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Move more naming conventions logic out of the retain/release checker to CocoaConventions.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
78acdbfb522f62b6e8899e078e48fea44fda287d 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Move more naming conventions logic out of the retain/release checker to CocoaConventions.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
07c3d6914503af0fe4ab23fedfe848ff527f0e9d 27-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8b752f10c394b140f9ef89e049cbad1a7676fc25 27-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d73d0caae67ccb211c34c8fc355d81c6207e8407 27-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Silence a GCC warning about uninitialized variables. The first user of this
showed up with a primitive type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
9d883b5b3763605cd6850b49fd3b2613074e83a0 27-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Silence a GCC warning about uninitialized variables. The first user of this
showed up with a primitive type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
da3572e27c6a4e7483990fa44b3882da2e57c9d0 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Start pulling out pieces of the monolithic retain/release checker into
reusable and modular API pieces.

Start by pulling the logic for deriving the Cocoa naming convention
into a separate API, header, and source file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
lang/Checker/PathSensitive/SummaryManager.h
a64e89bbfa756816d1e4a48e5d6c03edf1d7f23b 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Start pulling out pieces of the monolithic retain/release checker into
reusable and modular API pieces.

Start by pulling the logic for deriving the Cocoa naming convention
into a separate API, header, and source file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/DomainSpecific/CocoaConventions.h
lang/Checker/PathSensitive/SummaryManager.h
fa4c6c212906ec7806e0892d1d48ba92e068509e 27-Jan-2010 Anders Carlsson <andersca@mac.com> It's not Explicit anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3a18917b5260d67426f55792118262aa6ad42c06 27-Jan-2010 Anders Carlsson <andersca@mac.com> It's not Explicit anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6994e1a96ebc69f63b92df433d30f578f3d92f1d 27-Jan-2010 John McCall <rjmccall@apple.com> Implement access control for overloaded functions. Suppress access control
diagnostics in "early" lookups, such as during typename checks and when building
unresolved lookup expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/UnresolvedSet.h
c373d48502ca7683ab55385f5bd624d778eb288d 27-Jan-2010 John McCall <rjmccall@apple.com> Implement access control for overloaded functions. Suppress access control
diagnostics in "early" lookups, such as during typename checks and when building
unresolved lookup expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/UnresolvedSet.h
c85d4470002e7798f958d15a2c6c217c08fba970 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Support -marm by treating it as an alias for -mno-thumb.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f7b33749d2a686327b8ae249b8eb1ab44770f54b 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Support -marm by treating it as an alias for -mno-thumb.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
92114efac8f6cbf47cea9ff9947fc88d0edf8be9 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Disallow -m{macosx,iphoneos}-version-min as -Xarch arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
5cc025197300c3f323ed572dd0295284a17a6661 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Disallow -m{macosx,iphoneos}-version-min as -Xarch arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b19509ec56e5f79e3a4f41b649da74a632fe31be 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Add const version of ObjCMethodDecl::getCanonicalDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
13e635c55eb23f736d38abf9c954801bd6482db4 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Add const version of ObjCMethodDecl::getCanonicalDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
aed33972e0f9556d0724e6c9cad095e118cd1067 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Teach RegionStore to handle initialization of incomplete arrays in structures using a compound value. Fixes <rdar://problem/7515938>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
fee90811c665893bc27a9bfa8b116548afe1b89b 27-Jan-2010 Ted Kremenek <kremenek@apple.com> Teach RegionStore to handle initialization of incomplete arrays in structures using a compound value. Fixes <rdar://problem/7515938>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
72db0a7dddc5b48e75b3da1944866c0ae1880659 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Move 'LocalCheckers.h' to the 'Checkers' subdirectory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/LocalCheckers.h
lang/Checker/LocalCheckers.h
97053091c0e4df12ffb662b284b6ab329ca1c40f 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Move 'LocalCheckers.h' to the 'Checkers' subdirectory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/LocalCheckers.h
lang/Checker/LocalCheckers.h
479068e0a8c03d5db33a5901ea3223e2aecd1b62 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Move 'include/Checkers/PathSensitive/Checkers' directory to 'include/Checkers'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/DereferenceChecker.h
lang/Checker/PathSensitive/Checkers/DereferenceChecker.h
f12d31999e4ecf821ee4dcdb18cc5412569c3515 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Move 'include/Checkers/PathSensitive/Checkers' directory to 'include/Checkers'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/Checkers/DereferenceChecker.h
lang/Checker/PathSensitive/Checkers/DereferenceChecker.h
7d87b046af89a29ea0969851ed69aa5a9b96fa2a 26-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add 'volatile' to first argument of all
sync compare_and_swap to match them with gcc.
It also fixes a few incorrect argument defitions.
(fixes radar 7540291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
013af39d2a6a2e684f5a458c97890c52cddb7157 26-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add 'volatile' to first argument of all
sync compare_and_swap to match them with gcc.
It also fixes a few incorrect argument defitions.
(fixes radar 7540291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
0b7e1ec48c061711034350ef7976339ae94dad80 26-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Bring some semblance of order into Decl.h and Decl.cpp. While at it, fix some typo comments and remove an unused and unimplemented function prototype. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7783bfc066776a63d6a2cd28329d4d149647bfdc 26-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Bring some semblance of order into Decl.h and Decl.cpp. While at it, fix some typo comments and remove an unused and unimplemented function prototype. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
431e826f53473dff14309abf4ec6903a27684422 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Implement 'clang_getInclusions()' in CIndex. This API allows clients to walk the set of files included in a translation unit via the C API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94575 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/SourceManager.h
16b55a71695a33c094383295cc7b7a2080e098da 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Implement 'clang_getInclusions()' in CIndex. This API allows clients to walk the set of files included in a translation unit via the C API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94575 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/SourceManager.h
5ea4db2ff45ee45e11ae1d807e516adaf2a0dc0e 26-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate clang_getInstantiationLocationOffset(), and instead add an
offset parameter to clang_getInstantiationLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94573 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
46766dc31c09d89024de5aba9e22112a56eadbdf 26-Jan-2010 Douglas Gregor <dgregor@apple.com> Eliminate clang_getInstantiationLocationOffset(), and instead add an
offset parameter to clang_getInstantiationLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94573 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
af16aacb7a7cccfb8119a4b931de39c0d9f2561d 26-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Implement clang_annotateTokens(), which associates cursors with each
of the tokens within a raw token stream. This does not even attempt to
handle macros yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94561 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0045e9fe1f7dfc37f1ea7bdb9b70bcdb6700f0c0 26-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement clang_annotateTokens(), which associates cursors with each
of the tokens within a raw token stream. This does not even attempt to
handle macros yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94561 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d8b5014c8b689915eb87797060fd5c183ef600da 26-Jan-2010 Anders Carlsson <andersca@mac.com> Use the right definition when emitting a global variable. Fixes PR5564.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3bb92693c3332c1e99870a4e45afff3892e1c6ae 26-Jan-2010 Anders Carlsson <andersca@mac.com> Use the right definition when emitting a global variable. Fixes PR5564.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0374d5215df3e6ad58c227cf791dbf5dc420c02c 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Correct cut-and-paste error in doxygen comment for newly introduced
getTypeAlignInChars().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
16e20cce43385001f33f8e3f90ee345609c805d1 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Correct cut-and-paste error in doxygen comment for newly introduced
getTypeAlignInChars().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7aa70146e9cc0f441600426c3e926c9fbfb02283 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Add getTypeAlignInChars() for use in code that works in alignments in character
units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
86fa4311c8a330957ff5b765fbb0a7750ecd38c9 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Add getTypeAlignInChars() for use in code that works in alignments in character
units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9ae7d11a88f270f47d21a9e8ab7d570892e48a2f 26-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a CIndex API for lexing the raw tokens within a given source
range. The token-annotation function does nothing, yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94551 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/Lexer.h
fc8ea23eb6cbaaa5046f2abb4c033e24c8659efd 26-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce a CIndex API for lexing the raw tokens within a given source
range. The token-annotation function does nothing, yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94551 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Lex/Lexer.h
7ef03692a17cbf815a32b258208070dee139cc5b 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Replace inheritance of RegionRawOffset from std::pair with two private member
variables to improve readability and encapsulation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
b896f625d1225450c0b30c4b82cb4d9af5642b9f 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Replace inheritance of RegionRawOffset from std::pair with two private member
variables to improve readability and encapsulation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/PathSensitive/MemRegion.h
a12cfc33df90a89eb078feb7150df53745397aa7 26-Jan-2010 John McCall <rjmccall@apple.com> Avoid some unnecessary copying of unresolved lookup results.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
75345163535eb1765ba8fb971974be895645cb45 26-Jan-2010 John McCall <rjmccall@apple.com> Avoid some unnecessary copying of unresolved lookup results.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
61b29a1dd02abc71d991daabf566b02a38fea9f9 26-Jan-2010 John McCall <rjmccall@apple.com> Preserve access bits through overload resolution much better. Some
general refactoring in operator resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
6e26689f5d513e24ad7783a4493201930fdeccc0 26-Jan-2010 John McCall <rjmccall@apple.com> Preserve access bits through overload resolution much better. Some
general refactoring in operator resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
be60298528c121c545561c7e8d832716f33ae017 26-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce clang_getInstantiationLocationOffset(), which decomposes a
source location in file + offset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94497 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e69517ce61638f12c9abe4605753a45275ac4e37 26-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getInstantiationLocationOffset(), which decomposes a
source location in file + offset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94497 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
71e909ea274771c1cc6e1c8f79c53de36d623104 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
816bc31ed45002de2547d6679b44f31eb85ec491 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
f0839e293d46d8787dc37e55a9a70068819d667f 25-Jan-2010 John McCall <rjmccall@apple.com> Warn on top-level 'asm volatile' (instead of misparsing it).
"Fixes" rdar://problem/7574870



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94458 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
7a6ae743b2ecfdfadadf7df53b569a9a3871a8fd 25-Jan-2010 John McCall <rjmccall@apple.com> Warn on top-level 'asm volatile' (instead of misparsing it).
"Fixes" rdar://problem/7574870



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94458 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f59d2ca2b85aecef18b8f94269da51637dc3efe7 25-Jan-2010 Ted Kremenek <kremenek@apple.com> Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Checker/PathDiagnostic.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BugReporter.h
lang/Checker/PathSensitive/BugType.h
lang/Checker/PathSensitive/GRExprEngine.h
6b67630d5df195f4fe0e4273061c016901d69681 25-Jan-2010 Ted Kremenek <kremenek@apple.com> Move BugReporter.h, PathDiagnostic.h, and BugType.h to 'include/Checker/BugReporter'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Checker/BugReporter/BugReporter.h
lang/Checker/BugReporter/BugType.h
lang/Checker/BugReporter/PathDiagnostic.h
lang/Checker/PathDiagnostic.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BugReporter.h
lang/Checker/PathSensitive/BugType.h
lang/Checker/PathSensitive/GRExprEngine.h
c43496ae981615d58e337b131027551259541842 25-Jan-2010 Ted Kremenek <kremenek@apple.com> Add missing header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
326be568e2cb04285c84e6e26a3e6b3822607361 25-Jan-2010 Ted Kremenek <kremenek@apple.com> Add missing header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/AnalysisContext.h
e6d261e31fcc2204d4117ca753e843bc2c1164f4 25-Jan-2010 Ted Kremenek <kremenek@apple.com> Split libAnalysis into two libraries: libAnalysis and libChecker.

(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)

This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/LocalCheckers.h
lang/Analysis/ManagerRegistry.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
lang/Analysis/PathSensitive/Checkers/DereferenceChecker.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRStateTrait.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/GRWorkList.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Checker/LocalCheckers.h
lang/Checker/ManagerRegistry.h
lang/Checker/PathDiagnostic.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/BugReporter.h
lang/Checker/PathSensitive/BugType.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/Checkers/DereferenceChecker.h
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRAuditor.h
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRExprEngineBuilders.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRStateTrait.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
1309f9a3b225ea846e5822691c39a77423125505 25-Jan-2010 Ted Kremenek <kremenek@apple.com> Split libAnalysis into two libraries: libAnalysis and libChecker.

(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)

This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/LocalCheckers.h
lang/Analysis/ManagerRegistry.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
lang/Analysis/PathSensitive/Checkers/DereferenceChecker.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRStateTrait.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/GRWorkList.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Checker/LocalCheckers.h
lang/Checker/ManagerRegistry.h
lang/Checker/PathDiagnostic.h
lang/Checker/PathSensitive/AnalysisManager.h
lang/Checker/PathSensitive/BasicValueFactory.h
lang/Checker/PathSensitive/BugReporter.h
lang/Checker/PathSensitive/BugType.h
lang/Checker/PathSensitive/Checker.h
lang/Checker/PathSensitive/CheckerVisitor.def
lang/Checker/PathSensitive/CheckerVisitor.h
lang/Checker/PathSensitive/Checkers/DereferenceChecker.h
lang/Checker/PathSensitive/ConstraintManager.h
lang/Checker/PathSensitive/Environment.h
lang/Checker/PathSensitive/ExplodedGraph.h
lang/Checker/PathSensitive/GRAuditor.h
lang/Checker/PathSensitive/GRBlockCounter.h
lang/Checker/PathSensitive/GRCoreEngine.h
lang/Checker/PathSensitive/GRExprEngine.h
lang/Checker/PathSensitive/GRExprEngineBuilders.h
lang/Checker/PathSensitive/GRSimpleAPICheck.h
lang/Checker/PathSensitive/GRState.h
lang/Checker/PathSensitive/GRStateTrait.h
lang/Checker/PathSensitive/GRSubEngine.h
lang/Checker/PathSensitive/GRTransferFuncs.h
lang/Checker/PathSensitive/GRWorkList.h
lang/Checker/PathSensitive/MemRegion.h
lang/Checker/PathSensitive/SVals.h
lang/Checker/PathSensitive/SValuator.h
lang/Checker/PathSensitive/Store.h
lang/Checker/PathSensitive/SymbolManager.h
lang/Checker/PathSensitive/ValueManager.h
cb94ade2e7569f3f9917e9eae9d046f08e444c1e 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Don't check that input files exist when parsing ASTs from the command
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
3bd54cc56276c386f4d50940a9fbfcad7a69cb75 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Don't check that input files exist when parsing ASTs from the command
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
931404f2e5e2b65bbbc9fc6a77bce5838c7e1e0b 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94393 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
fd9f23464bfd35314c87c4df410f3937d59eb96d 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94393 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7a39d4eef0a6541c2cf56cb0462d47e5b8a062e7 24-Jan-2010 Anders Carlsson <andersca@mac.com> Fix a pretty bad bug where if a constructor (or conversion function) was marked as 'explicit', but then defined out-of-line, we would not treat it as being explicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
7a6e13aa2e3874fecf45043ed1a26900b8c13b98 24-Jan-2010 Anders Carlsson <andersca@mac.com> Fix a pretty bad bug where if a constructor (or conversion function) was marked as 'explicit', but then defined out-of-line, we would not treat it as being explicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
25214fa032c02d7170f2dc21918764e34455b1d1 24-Jan-2010 Anders Carlsson <andersca@mac.com> Implement [dcl.fct.spec]p6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0757c8ccb79210ce1f22142851cdcbf6e42a71d6 24-Jan-2010 Anders Carlsson <andersca@mac.com> Implement [dcl.fct.spec]p6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b00102e91daa687afbe6ea647fd723572301bb62 24-Jan-2010 Mike Stump <mrs@apple.com> Ok, turn back off -Wunreachable-code by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8a8fa25baeb6da914155da457d1709d32e779826 24-Jan-2010 Mike Stump <mrs@apple.com> Ok, turn back off -Wunreachable-code by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
99c8d51e6a2a962adff2742e8b87d230222424de 24-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Mark PartialDiagnostic.h as a C++ header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
8b00be55606207c255cf3d3bd529143e93ff9c31 24-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Mark PartialDiagnostic.h as a C++ header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
de344bdcfd849680f534721f8029e6afc58f869c 24-Jan-2010 Anders Carlsson <andersca@mac.com> Implement instantiation of AsmStmts (Crazy, I know)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
703e39486689d6660e75f6b6de0068db031a51c7 24-Jan-2010 Anders Carlsson <andersca@mac.com> Implement instantiation of AsmStmts (Crazy, I know)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
ebeb57eaa262409d7eb1f18c1cd49a4db3f3799a 24-Jan-2010 Daniel Dunbar <daniel@zuster.org> Tweak clang_visitChildren comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94360 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a57259e9d7b30bcce93f0a62eee0488738026172 24-Jan-2010 Daniel Dunbar <daniel@zuster.org> Tweak clang_visitChildren comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94360 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d7a323d09c676b087a0ef3274979ea8eecc1c881 24-Jan-2010 Daniel Dunbar <daniel@zuster.org> Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94351 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1efcf3d137c11fb6b21c385911e0d2ca59ca94c3 24-Jan-2010 Daniel Dunbar <daniel@zuster.org> Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94351 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
bf84be462c28e7d669ca799cc1654e2e08b0150b 24-Jan-2010 Chris Lattner <sabre@nondot.org> fix PR6034, a crash on invalid where the switch stack would get
unbalanced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7e52de4b45286d057b367bb1f9283a1e32d79252 24-Jan-2010 Chris Lattner <sabre@nondot.org> fix PR6034, a crash on invalid where the switch stack would get
unbalanced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
364fe2a79d9194a9c0cd02ccc307993cd1e8d19f 24-Jan-2010 Chris Lattner <sabre@nondot.org> add a prototype for __builtin_fpclassify. We don't know how to
codegen it, so we get 'cannot compile this builtin function yet'
errors, just like we do currently for __builtin_isinf. However,
this should let us parse headers that use it without barfing,
which should help PR6083.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
31819f53836eabb6d2dfeca34487d9a960cb6491 24-Jan-2010 Chris Lattner <sabre@nondot.org> add a prototype for __builtin_fpclassify. We don't know how to
codegen it, so we get 'cannot compile this builtin function yet'
errors, just like we do currently for __builtin_isinf. However,
this should let us parse headers that use it without barfing,
which should help PR6083.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
2d7c0498ba1ac80586da070c01a033e206141591 24-Jan-2010 Anders Carlsson <andersca@mac.com> Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1b36a2fcb2cea310c01fc2a80a9da915e5d2ceb0 24-Jan-2010 Anders Carlsson <andersca@mac.com> Use new initialization code when dealing with [dcl.init.aggr]p12. This fixes the bug where array elements and member initializers weren't copied correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1cc0a0806b33626925c39ecf57aaf8570483fe4e 23-Jan-2010 Mike Stump <mrs@apple.com> Temporary flip default for -Wunreachable-code so some bots can test it
out. They should all be done later tonight, but if something bad
happens, feel free to revert sooner.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b9ea98e6e59a1020361dbb2e2ef3836f6f379cbb 23-Jan-2010 Mike Stump <mrs@apple.com> Temporary flip default for -Wunreachable-code so some bots can test it
out. They should all be done later tonight, but if something bad
happens, feel free to revert sooner.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4fafa2add8bce615d15891872a5b5b8c9d3a93b4 23-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Add bzero builtin; this should help codegen quality for code using this
function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
e6dddfd907f6ea58daed5e26eeaacd893d98db9b 23-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Add bzero builtin; this should help codegen quality for code using this
function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
5d73f09a2dbfcaf65954a2beab893ced1fca91ef 23-Jan-2010 Anders Carlsson <andersca@mac.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e87641915cf1f9913aca13cbd50996061bed32e1 23-Jan-2010 Anders Carlsson <andersca@mac.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6f90d6ce272e62f3c82892f98dea2f67975df6ce 23-Jan-2010 Ted Kremenek <kremenek@apple.com> Add doxygen comment to clang_getClangVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94311 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
23e1ad09bb68f929212e0ff51206258d06e7f6cf 23-Jan-2010 Ted Kremenek <kremenek@apple.com> Add doxygen comment to clang_getClangVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94311 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f118bd48a7f9e03fe64b69f54b35e4b63db64854 23-Jan-2010 John McCall <rjmccall@apple.com> Produce a special diagnostic when users call a function with an argument of
incomplete type (or a pointer/reference to such).

The causes of this problem are different enough to justify a different "design"
for the diagnostic. Most notably, it doesn't give an operand index:
it's usually pretty obvious which operand is the problem, it adds a lot of
clutter to mention it, and the fix is usually in a different part of the file
anyway.

This is yet another diagnostic that should really have an analogue in the
non-overloaded case --- which should be much easier to write because of
the weaker space constraints.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
258b203b853e1c684c290fccd0088d1f340c137f 23-Jan-2010 John McCall <rjmccall@apple.com> Produce a special diagnostic when users call a function with an argument of
incomplete type (or a pointer/reference to such).

The causes of this problem are different enough to justify a different "design"
for the diagnostic. Most notably, it doesn't give an operand index:
it's usually pretty obvious which operand is the problem, it adds a lot of
clutter to mention it, and the fix is usually in a different part of the file
anyway.

This is yet another diagnostic that should really have an analogue in the
non-overloaded case --- which should be much easier to write because of
the weaker space constraints.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
844a3bb8807281e2f3d8fd3f88a99265d7be874a 23-Jan-2010 Anders Carlsson <andersca@mac.com> Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a729bbb739ca97a8dc52b6b0495725590a0367dc 23-Jan-2010 Anders Carlsson <andersca@mac.com> Fix the EntityKind order so that all entity kinds that can be copied (using copy constructors) come first. Also, fix a bug where EK_New was left out of the err_init_conversion_failed diagnostic (It is now reported as 'new value'). Please review Doug :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ee1ca8b4a4c64beb8384e54e69576a6b409a0d05 23-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
0d13f6fdbdd6f06e2449b8834dda53334abd399a 23-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
7e85de74e7913777cb5fd05b6cf48c8f9bf2cb13 23-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangFullVendorVersion() to getClangFullVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
a18f1b88a7ef3d2c944bb1d3b6586a2860ce2baa 23-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangFullVendorVersion() to getClangFullVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
7db083f218f6dca7312610367675183343c91dd3 23-Jan-2010 John McCall <rjmccall@apple.com> Implement elementary access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/Specifiers.h
92f883177b162928a8e632e4e3b93fafd2b26072 23-Jan-2010 John McCall <rjmccall@apple.com> Implement elementary access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/Specifiers.h
919d2779960bc603723c9850b419106f6c4dd3df 23-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
4db64a461cb3442934afe43c83ed3f17f7c11c1d 23-Jan-2010 Douglas Gregor <dgregor@apple.com> Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Frontend/PreprocessorOptions.h
b9aa98e712bdeb8c9b02ce49cd70d4b1312b51c3 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Version.h
04bb716aea8fd2372ac10b0c640cabc5e5caa615 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Add 'clang_getClangVersion()' function to CIndex. This exposes the full Clang version string through the CIndex API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94242 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Basic/Version.h
aeeeb1c615f2310a76519e54a267b938c8d0ea0a 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
3687a5d83f5deb4b70b0c8e522c455d546f40101 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
4d4d180ec10327d9d83691087515e31476ede404 22-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve content and structure of the Doxygen documentation for the
CIndex API. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94234 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c42fefa51f7555bb3644a7cde2ca4bfd0d848d74 22-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve content and structure of the Doxygen documentation for the
CIndex API. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94234 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
fe942e746bf1b4448c7aec9c8a611d5ecd31db4d 22-Jan-2010 Ted Kremenek <kremenek@apple.com> (1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).

(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.

(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.

More cleanup to version string generation pending...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
f7a96a39958b3f919f26764777eec948b43d74bc 22-Jan-2010 Ted Kremenek <kremenek@apple.com> (1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).

(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.

(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.

More cleanup to version string generation pending...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
98e09b5e0640de34f2a2d785aaf6e9b2e2dc81c9 22-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Yet more CIndex API cleanup:
- Added more routines to manipulate/compare source locations and ranges
- Switched clang_getCursor() over to take a CXSourceLocation rather
than file/line/column.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94226 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b979034b100be14de2223f2b8f6cc7a3275cbe4f 22-Jan-2010 Douglas Gregor <dgregor@apple.com> Yet more CIndex API cleanup:
- Added more routines to manipulate/compare source locations and ranges
- Switched clang_getCursor() over to take a CXSourceLocation rather
than file/line/column.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94226 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
92c1e7dec5bfeed3bae63e3abcbbf359d9a3c7e3 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename pch::SVN_BRANCH_REVISION to pch::VERSION_CONTROL_BRANCH_REVISION.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
5b4ec636637c9d876102240127cc0dca9280e83a 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename pch::SVN_BRANCH_REVISION to pch::VERSION_CONTROL_BRANCH_REVISION.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
ec04e5806acd9ea1fd9daea82595938db0813a2f 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
517e676b9e1524e39beeb47718822f2647801d1a 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
35ac8b42f9b300af9bd50e5efd8a3e80aed78dfa 22-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Teach CIndex's cursor visitor to restrict its traversal to a specific
region of interest (if provided). Implement clang_getCursor() in terms
of this traversal rather than using the Index library; the unified
cursor visitor is more complete, and will be The Way Forward.

Minor other tweaks needed to make this work:
- Extend Preprocessor::getLocForEndOfToken() to accept an offset
from the end, making it easy to move to the last character in the
token (rather than just past the end of the token).
- In Lexer::MeasureTokenLength(), the length of whitespace is zero.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
33e9abd21083a0191a7676a04b497006d2da184d 22-Jan-2010 Douglas Gregor <dgregor@apple.com> Teach CIndex's cursor visitor to restrict its traversal to a specific
region of interest (if provided). Implement clang_getCursor() in terms
of this traversal rather than using the Index library; the unified
cursor visitor is more complete, and will be The Way Forward.

Minor other tweaks needed to make this work:
- Extend Preprocessor::getLocForEndOfToken() to accept an offset
from the end, making it easy to move to the last character in the
token (rather than just past the end of the token).
- In Lexer::MeasureTokenLength(), the length of whitespace is zero.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
702429807852dae8328ab4981a7b6400505dae37 22-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Process cast according to the cast kind. Prepare for more specific cast
handling (for C++). No functionality change for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b79b117d3b76da58b14ef835ccfcf2e988b7345f 22-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Process cast according to the cast kind. Prepare for more specific cast
handling (for C++). No functionality change for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
494ca80f0e094a0ab53af340587545036c71892a 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Update tool chain to use static clang_rt libraries provided by
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default
yet.

This drastically cleans up the linker invocation, old invocation:
--
"/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc"
--

New invocation:
--
# For 10.6:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem"
# For 10.4:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a"
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
eec99100f0caa1d71bcc911ce38b9a58a8a43fdc 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Update tool chain to use static clang_rt libraries provided by
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default
yet.

This drastically cleans up the linker invocation, old invocation:
--
"/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc"
--

New invocation:
--
# For 10.6:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem"
# For 10.4:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a"
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
8c8779833fab2e6e8d844c255312c468f559749c 22-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Teach the cursor visitor to walk all of the C and Objective-C
declarations that have enough source information to make such a walk
useful. This includes walking into variable initializers and enum
constants, the types behind typedefs, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
1ef2fc1888d8d14e97ebe561ccbd421282de3ce2 22-Jan-2010 Douglas Gregor <dgregor@apple.com> Teach the cursor visitor to walk all of the C and Objective-C
declarations that have enough source information to make such a walk
useful. This includes walking into variable initializers and enum
constants, the types behind typedefs, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
470a9e4c678a2eb003722c591b8f00a1d1d522bb 22-Jan-2010 Chris Lattner <sabre@nondot.org> revert my patch for rdar://7520940 that warns when a published header
is #included with "foo.h" style syntax instead of framework syntax.
It produced too much noise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
f45b646244705410866d62f1d8bf017a047ed662 22-Jan-2010 Chris Lattner <sabre@nondot.org> revert my patch for rdar://7520940 that warns when a published header
is #included with "foo.h" style syntax instead of framework syntax.
It produced too much noise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
66a1e5dd245505deb9badbe72a8877392b5eb386 21-Jan-2010 John McCall <rjmccall@apple.com> Due to local reversions and re-patching, I accidentally had multiple copies
of the 'payload' in this header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
0380043d402fa87e00dc6166f9167ad4e73b34f4 21-Jan-2010 John McCall <rjmccall@apple.com> Due to local reversions and re-patching, I accidentally had multiple copies
of the 'payload' in this header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
d1224ba451b73cd38e0fb0ef2713fbc300f9e107 21-Jan-2010 Mike Stump <mrs@apple.com> Improve unreachable code warnings for with respect to dead functional casts in C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
2d6ceab0ad062989ecb7b8666c85e58a2fcd95ce 21-Jan-2010 Mike Stump <mrs@apple.com> Improve unreachable code warnings for with respect to dead functional casts in C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
39abeeb809b1c9cdd18d0d338aa8cbf71748d8d2 21-Jan-2010 Ted Kremenek <kremenek@apple.com> Allocate the 'Protocols' array in ObjCInterfaceType and
ObjCObjectPointerType using the allocator associated with ASTContext.
Not only does this fix a memory leak, but it also makes these arrays
BumpPtrAllocated (in the typical case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
71842cc07aafdebc9b180322ebb46f530beca5d6 21-Jan-2010 Ted Kremenek <kremenek@apple.com> Allocate the 'Protocols' array in ObjCInterfaceType and
ObjCObjectPointerType using the allocator associated with ASTContext.
Not only does this fix a memory leak, but it also makes these arrays
BumpPtrAllocated (in the typical case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
27dc20f88c6c0990ebea1c468f2610e3e896d115 21-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d8265b838360578032020757d9a2a84c86457edc 21-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
bf430198a91b6f352db12499d423464278fdb660 21-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement rewriting of properties.
Fixes radar 7562952.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d0502407c1b41b2ace326f355d7b7a6876246223 21-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement rewriting of properties.
Fixes radar 7562952.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
80efae9cd4321e300bff128692fb4300f287a868 21-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce type references into the C API, capturing references to
typedefs only (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94078 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7d0d40e58807f73e06ff5eb637a48e9f978b0e2a 21-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce type references into the C API, capturing references to
typedefs only (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94078 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c5a125febb22d5636fbb9558ef1abbd58aa5b47d 21-Jan-2010 Mike Stump <mrs@apple.com> Speed up compilation by avoiding generating exceptional edges from
CallExprs as those edges help cause a n^2 explosion in the number of
destructor calls. Other consumers, such as static analysis, that
would like to have more a more complete CFG can select the inclusion
of those edges as CFG build time.

This also fixes up the two compilation users of CFGs to be tolerant of
having or not having those edges. All catch code is assumed be to
live if we didn't generate the exceptional edges for CallExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/PathSensitive/AnalysisContext.h
4c45aa1b00b91847acfb082acfaced3ffa294d1d 21-Jan-2010 Mike Stump <mrs@apple.com> Speed up compilation by avoiding generating exceptional edges from
CallExprs as those edges help cause a n^2 explosion in the number of
destructor calls. Other consumers, such as static analysis, that
would like to have more a more complete CFG can select the inclusion
of those edges as CFG build time.

This also fixes up the two compilation users of CFGs to be tolerant of
having or not having those edges. All catch code is assumed be to
live if we didn't generate the exceptional edges for CallExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/PathSensitive/AnalysisContext.h
4347259d31856682ac492d955359add71613f1c3 21-Jan-2010 Mike Stump <mrs@apple.com> Add infrastructure to add base initializers and member initializers to
the CFG. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Analysis/CFG.h
b978a441c7d8bf59e7fede938e1f3b672573b443 21-Jan-2010 Mike Stump <mrs@apple.com> Add infrastructure to add base initializers and member initializers to
the CFG. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Analysis/CFG.h
ab1adf84fc311e70cdc159878886b304be3e3fcb 21-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Stash a CXXUnit pointer into each cursor. This allows us to simplify
the interface to clang_visitChildren() by eliminating the
CXTranslationUnit pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94051 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b2cd48756119f4d8d2a865b4b3e0e8efd02e26a0 21-Jan-2010 Douglas Gregor <dgregor@apple.com> Stash a CXXUnit pointer into each cursor. This allows us to simplify
the interface to clang_visitChildren() by eliminating the
CXTranslationUnit pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94051 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e0ed462530dad09f3c60fc0867743eb8928fd064 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Yet more Doxygen-comment tweaking in the CIndex library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94044 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f55254472e496340cbb4f0a24cff398e441475b5 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Yet more Doxygen-comment tweaking in the CIndex library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94044 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
73773a23f8ffea0b668199e81b3925535103bd7d 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve Doxygen documentation for the CIndex library, somewhat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94042 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7f17376e0931a337d544b75d9030bc92763be287 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve Doxygen documentation for the CIndex library, somewhat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94042 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a90cde534c19e7333722487e5f4a67e7ce2a59d6 20-Jan-2010 John McCall <rjmccall@apple.com> Change LLVM/clang #includes to use quotes, not angle-brackets. Just a think-o
prompted by the #include <iterator> above.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
7264fa161fe77b74163417ce7ab28e3da46381f7 20-Jan-2010 John McCall <rjmccall@apple.com> Change LLVM/clang #includes to use quotes, not angle-brackets. Just a think-o
prompted by the #include <iterator> above.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
cef98aad3b67d823a96fc8c91e5ff3764343f91d 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill CXEntity and CXDecl. The first has never been used, while the
second has been wholly replaced by cursors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94039 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
04d1dd476af585e2b463633b3c24ee6c3f74daf4 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill CXEntity and CXDecl. The first has never been used, while the
second has been wholly replaced by cursors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94039 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2815dc14e57c57c7d6212be2687f5df937c451a3 20-Jan-2010 John McCall <rjmccall@apple.com> First pass at collecting access-specifier information along inheritance paths.
Triggers lots of assertions about missing access information; fix them.

Will actually consume this information soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
46460a68f6508775e98c19b4bb8454bb471aac24 20-Jan-2010 John McCall <rjmccall@apple.com> First pass at collecting access-specifier information along inheritance paths.
Triggers lots of assertions about missing access information; fix them.

Will actually consume this information soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
418ea8ad6bbb6ed180fb03b13057a29332e32c5e 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill some CXDecl-related APIs that have been superceded by
CXCursor-based APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94037 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
78205d4bada39d95097e766af9eb30cdd0159461 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill some CXDecl-related APIs that have been superceded by
CXCursor-based APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94037 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
36c83ed1a560680216a2f9e34610edbea62a48d7 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill CXStmt. It isn't being used anywhere, and has no future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94036 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
68372aa4c575e0fede8c6b876683d28a7acaf9e3 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill CXStmt. It isn't being used anywhere, and has no future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94036 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5d74f0faa81a44accfda357ef6f9a627c94b5d0c 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill clang_loadDeclaration() and clang_loadTranslationUnit().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94034 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
002a528ab0189fc60cfbf9328962c96ccbe567ee 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill clang_loadDeclaration() and clang_loadTranslationUnit().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94034 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
231646006b6e167456ef6ccd209cfc1e4c7a094b 20-Jan-2010 Daniel Dunbar <daniel@zuster.org> Use sizeof() instead of hard-coding a size for WrittenBuiltinSpecs, eek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
d31351288e25e8a7a2a919c99ffe281c2a41b53c 20-Jan-2010 Daniel Dunbar <daniel@zuster.org> Use sizeof() instead of hard-coding a size for WrittenBuiltinSpecs, eek!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
74c6b97cfb166ee3a7edc7c03aa8d17f83a364ea 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new, cursor-based traversal function that visits the
children of a given cursor, regardless of what kind of cursor it
is. This is a generalization of clang_loadDeclaration and
clang_loadTranslationUnit that will also extent to statements,
expressions, etc.

As proof-of-concept, switched clang_loadDeclaration() from its own
visitor over to an instance of this traversal function internally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94022 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b1373d03e4e38620647311bb87e56c0cf7cffeb7 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce a new, cursor-based traversal function that visits the
children of a given cursor, regardless of what kind of cursor it
is. This is a generalization of clang_loadDeclaration and
clang_loadTranslationUnit that will also extent to statements,
expressions, etc.

As proof-of-concept, switched clang_loadDeclaration() from its own
visitor over to an instance of this traversal function internally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94022 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
460512d0f4aa4a31fff7592c23ced4337975a5f6 20-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Settled rule on warning on unimplemented property in
category implementation when some implementations
are missing in the primary class implementation.
(fixes radar 6505200).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3ad230eb626d630877c17d6e81b167ec7476d84e 20-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Settled rule on warning on unimplemented property in
category implementation when some implementations
are missing in the primary class implementation.
(fixes radar 6505200).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2d39bef8d7fc65db1df4ebb9f7b1b3fa497e3ce0 20-Jan-2010 Chris Lattner <sabre@nondot.org> reduce redundant are's


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/DeltaTree.h
3ea5cf8889f48809a94e886d013a911128664c88 20-Jan-2010 Chris Lattner <sabre@nondot.org> reduce redundant are's


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/DeltaTree.h
30ce20c518d02acd5228274095b5cc39cae9f39f 20-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix a typo pointed about by gabor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/MacroBuilder.h
fb26025575421f179020b812c4e9e958812a3dee 20-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix a typo pointed about by gabor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/MacroBuilder.h
a088d5bd3141d05e8a9c4517c0d6f0cc1a0a3692 20-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Move the MacroBuilder utilitiy to its own header. Update references.

Comments and/or improvements to the documentation are welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/MacroBuilder.h
lang/Basic/TargetInfo.h
103b71c37a3c3a3da7128c1d0232a89b1e8d0d90 20-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Move the MacroBuilder utilitiy to its own header. Update references.

Comments and/or improvements to the documentation are welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/MacroBuilder.h
lang/Basic/TargetInfo.h
bf102d56b6a7557c4028652d1e2b176f5ebc1c3f 20-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix a layering issue between Basic and FE by moving a utility class into Basic.

This isn't entirely satisfactory, as it seems an implementation detail, and
with nothing to do with TargetInfo. Suggestions on where to put this are
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Frontend/Utils.h
8a32907d540be6deef8e6c2efd29bbe2da05eac2 20-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix a layering issue between Basic and FE by moving a utility class into Basic.

This isn't entirely satisfactory, as it seems an implementation detail, and
with nothing to do with TargetInfo. Suggestions on where to put this are
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Frontend/Utils.h
f41e1800ba8ac1d0cb3d84bfdcb9ba153d5df4b7 20-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Lift clang resource directory computation to the Driver object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
225c41706dc0f3682236e351820d339e14390e00 20-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Lift clang resource directory computation to the Driver object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
232815543878063ae6157fe77ab1348e22bac967 20-Jan-2010 John McCall <rjmccall@apple.com> Make UnresolvedSet.h standalone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
b377c98af6d5d5ad0cf3d391129518bfa50cbca9 20-Jan-2010 John McCall <rjmccall@apple.com> Make UnresolvedSet.h standalone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/UnresolvedSet.h
6366e1a8ed059d38256bc6950049af34b4ed3de4 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Attempt to improve CIndex Doxygen organization, although I can't actually test this locally

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93961 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
20d416c36b46dd19ee0b1ea2d0266ae43be86e51 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Attempt to improve CIndex Doxygen organization, although I can't actually test this locally

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93961 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8d326ceb3e196f350b6a286f5ae3127ee10788e8 20-Jan-2010 John McCall <rjmccall@apple.com> Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/UnresolvedSet.h
eec51cf1ba5f0e62c9cdb81b5c63babdd6e649ab 20-Jan-2010 John McCall <rjmccall@apple.com> Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet. Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/UnresolvedSet.h
558dcbd63e22ec8ce7f0ea7ee6d68a841c8abb2c 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
clang_getDeclSource, and clang_getDeclSourceFile; the cursor
equivalents are the way of the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93955 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e0356b10832390d5f44b3dc7ad4e6e104ebad556 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
clang_getDeclSource, and clang_getDeclSourceFile; the cursor
equivalents are the way of the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93955 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f89cb334ffa5c382e6da8c9813c16d1bc599f1c0 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a special cursor kind for the translation unit, to serve as
the root of the conceptual cursor hierarchy (just like we do with
declarations). This will be used when we get to unify
clang_loadTranslationUnit() and clang_loadDeclaration() into something
more generally useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93954 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7eaa8ae8692c5cd3eed8cb334fe5346470522091 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce a special cursor kind for the translation unit, to serve as
the root of the conceptual cursor hierarchy (just like we do with
declarations). This will be used when we get to unify
clang_loadTranslationUnit() and clang_loadDeclaration() into something
more generally useful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93954 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
9ec4d4f72ec49401a687b18724f4326b4a0c20d4 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> CXCursor_UnexposedDecl to the first declaration kind

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93952 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
36103f4d8b79f5e88f359c1fbff13586979866ef 20-Jan-2010 Douglas Gregor <dgregor@apple.com> CXCursor_UnexposedDecl to the first declaration kind

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93952 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
971807be6f66c40725267e415b2faa03a0a01ae0 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
and CXCursor_EnumConstantRef; they've been subsumed by expression
references, which do a much nicer job.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93947 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e0ca4baa1da58a22bdeb39871535507143ce9079 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
and CXCursor_EnumConstantRef; they've been subsumed by expression
references, which do a much nicer job.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93947 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
567b1c85cf6d78cc4867406eb1d36c25d2f8f05c 20-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Extend the CIndex API with direct support for expressions and
statements, moving some of the more unnatural kinds of references
(VarRef, EnumConstantRef, etc.) over to the expressions. We can now
poke at arbitrary expressions and statements with, e.g.,
clang_getCursor() and get back useful information (e.g., source
ranges).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93946 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
97b9872d5775446cb8aca1380e437649fe848d91 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Extend the CIndex API with direct support for expressions and
statements, moving some of the more unnatural kinds of references
(VarRef, EnumConstantRef, etc.) over to the expressions. We can now
poke at arbitrary expressions and statements with, e.g.,
clang_getCursor() and get back useful information (e.g., source
ranges).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93946 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
64ec9de57a038064c631176a4a0ed3e314b1e55c 20-Jan-2010 Mike Stump <mrs@apple.com> Implement goto inside of blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a3899eb5e30426b00b80232a15ae557dd4caa5b8 20-Jan-2010 Mike Stump <mrs@apple.com> Implement goto inside of blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
349f08701b41fd9991d80ab14dabccb4897c3eac 19-Jan-2010 John McCall <rjmccall@apple.com> The type of a compound literal expression is not necessarily the same as the
type which was syntactically written. Fixes PR 6080.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1d7d8d66eff7ed0f3e957d330930cc9ab8047add 19-Jan-2010 John McCall <rjmccall@apple.com> The type of a compound literal expression is not necessarily the same as the
type which was syntactically written. Fixes PR 6080.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7ac9339f7c78710d93cdbaf491b23c4ef70d372d 19-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill the unused and unnecessary CXCursor_MemberRef, twin to the
now-dead CXCursor_ObjCIvarRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93928 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e8c7043f6c11aa8e2420b97046f7dbcb6d7e51ab 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill the unused and unnecessary CXCursor_MemberRef, twin to the
now-dead CXCursor_ObjCIvarRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93928 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
76e3252a6465d01519de6526604b7251a890a883 19-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Kill CXCursor_ObjCIvarRef. Such cursors could never be created, and
have been marked for death for a while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93927 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5a5ec3a318c700eab5ffc53217af18a619f22dd4 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Kill CXCursor_ObjCIvarRef. Such cursors could never be created, and
have been marked for death for a while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93927 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
82511203bb8aa80bc68e41aa178a7ba12ed6cfc1 19-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce the notion of an "unexposed" declaration into the CIndex
API. This is a catch-all for any declaration known to Clang but not
specifically part of the CIndex API. We'll use the same approach with
expressions, statements, references, etc., as needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93924 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
301221313be4f97327e931ead9794dd3a8bce160 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce the notion of an "unexposed" declaration into the CIndex
API. This is a catch-all for any declaration known to Clang but not
specifically part of the CIndex API. We'll use the same approach with
expressions, statements, references, etc., as needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93924 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c86545a288b5b370a0055c0eba2e0315c95b2cb0 19-Jan-2010 Mike Stump <mrs@apple.com> Add CFG support for the start and end of scopes and infrastructure for
implicit destructor calls. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
079bd72439448b78629a28da6b1f8abe2cdeaf4d 19-Jan-2010 Mike Stump <mrs@apple.com> Add CFG support for the start and end of scopes and infrastructure for
implicit destructor calls. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
fe6bdd23f6b8a83b7f330ed9d5659ece69533d28 19-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Rework the CXSourceLocation and CXSourceRange APIs. They are now
opaque data structures accessed through the new functions
clang_getInstantiationLocation(), clang_getRangeStart(), and
clang_getRangeEnd(). The new API permits later extensions to introduce
new functions to allow CIndex clients to walk macro instantiations, if
we ever care.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93915 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1db19dea8d221f27be46332d668d1e2decb7f1ab 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Rework the CXSourceLocation and CXSourceRange APIs. They are now
opaque data structures accessed through the new functions
clang_getInstantiationLocation(), clang_getRangeStart(), and
clang_getRangeEnd(). The new API permits later extensions to introduce
new functions to allow CIndex clients to walk macro instantiations, if
we ever care.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93915 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5e36b2af3617ee008876affef6489a8f65d4828c 19-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate cursor kinds used to express definitions. Instead, provide
CIndex functions that (1) map from a reference or declaration to the
corresponding definition, if available, and (2) determine whether a
given declaration cursor is also a definition. This eliminates a lot
of duplication in the cursor kinds, and maps more closely to the Clang
ASTs.

This is another API + ABI breaker with no deprecation. Yay, progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93893 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b699866820102a69d83d6ac6941985c5ef4e8c40 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Eliminate cursor kinds used to express definitions. Instead, provide
CIndex functions that (1) map from a reference or declaration to the
corresponding definition, if available, and (2) determine whether a
given declaration cursor is also a definition. This eliminates a lot
of duplication in the cursor kinds, and maps more closely to the Clang
ASTs.

This is another API + ABI breaker with no deprecation. Yay, progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93893 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
cd984d478c3e5971c955eab0c9dc409b5cd4d41f 19-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Fix a serious bug: Tmp3 is the wrong destination set. We should create a new
intermediate destination set Tmp4.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.h
c39b2bdd4cef51021fe90de91c9fb6d1a15f4d0a 19-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Fix a serious bug: Tmp3 is the wrong destination set. We should create a new
intermediate destination set Tmp4.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.h
12748ddced5fa97ccccb51a665ded78a745af28a 19-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce clang_getCursorReferenced, to get a cursor pointing at the
entity that a particular cursor references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93830 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c5d1e9375d71e66d22456e7cc52cc7c0a5c65c3f 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getCursorReferenced, to get a cursor pointing at the
entity that a particular cursor references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93830 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
bd4444c783dc0985eec9d53df8a4fc95061f32fc 19-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Implement clang_getCursorExtent, which provides a source range for the
cursor itself. In particular, for references this returns the source
range of the reference rather than the source range of the thing it
refers to.

Switch c-index-test from clang_getDeclExtent (which will eventually be
deprecated and removed) over to clang_getCursorExtent. The source
ranges we print for references now make sense; fix up the tests
appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93823 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a7bde20f8c6334ccc3a7ef4dd77243d0921a8497 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement clang_getCursorExtent, which provides a source range for the
cursor itself. In particular, for references this returns the source
range of the reference rather than the source range of the thing it
refers to.

Switch c-index-test from clang_getDeclExtent (which will eventually be
deprecated and removed) over to clang_getCursorExtent. The source
ranges we print for references now make sense; fix up the tests
appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93823 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c22ed34c3b6febf47b4b7d2e6d299433618d21ac 19-Jan-2010 John McCall <rjmccall@apple.com> Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/Specifiers.h
lang/Parse/AccessSpecifier.h
lang/Parse/Action.h
lang/Parse/Parser.h
ad2b804faf29042e6c4e331d0987f103f1e2fd31 19-Jan-2010 John McCall <rjmccall@apple.com> Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/Specifiers.h
lang/Parse/AccessSpecifier.h
lang/Parse/Action.h
lang/Parse/Parser.h
fd9eea090e4ddc3f999a38b2b8791471a437a52c 18-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Now that a reasonable deprecation cycle has passed, kill
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile() outright.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93801 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
547836fad9066cfe03123f43c26b8ef1eec04060 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Now that a reasonable deprecation cycle has passed, kill
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile() outright.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93801 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
827fc14395535b7a79d6542b2a52e2fa0c5756f8 18-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce clang_getCursorLocation(), which supercedes
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4
functions as deprecated and stop using them ourselves.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93800 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
98258afae66bab39b0c57a3efb6b20d4fbb5746c 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getCursorLocation(), which supercedes
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4
functions as deprecated and stop using them ourselves.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93800 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
34af854b711a338424bddf0ffdc8142cc1f2ac02 18-Jan-2010 Chris Lattner <sabre@nondot.org> allow the HandlerComment callback to push tokens into the
preprocessor. This could be used by an OpenMP implementation
or something. Patch by Abramo Bagnara!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
046c2277dcbcc8eb89dbb5b1b8c5226b7cb81635 18-Jan-2010 Chris Lattner <sabre@nondot.org> allow the HandlerComment callback to push tokens into the
preprocessor. This could be used by an OpenMP implementation
or something. Patch by Abramo Bagnara!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
8fdd51c8e7bb9973814364a3bcc0548305122517 18-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Clean up the CIndex API slightly.

Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to
better match Clang's SourceLocation. Teach clang_getDeclExtent to fill
in the CXFile properly.

Renamed CXSourceExtent to CXSourceRange, to better match Clang's
SourceLocation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93783 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3c7313d96cd4a18cd8c1fcd3ddd8128c2fcbe58f 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Clean up the CIndex API slightly.

Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to
better match Clang's SourceLocation. Teach clang_getDeclExtent to fill
in the CXFile properly.

Renamed CXSourceExtent to CXSourceRange, to better match Clang's
SourceLocation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93783 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
30b9354df102f6060a2688fd67b0a95947c139b8 18-Jan-2010 Daniel Dunbar <daniel@zuster.org> Add missing newline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Specifiers.h
353052194ffc744643c63a494752c36d57730d4b 18-Jan-2010 Daniel Dunbar <daniel@zuster.org> Add missing newline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Specifiers.h
b1f3c5b6d59000378616b02f940292db99dfc6ce 18-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> float, double, and long double do need extra data in the
BuiltinTypeLoc structure. Thanks, Enea!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
d038f361d2b4368af7ab85bd04d5aafcc3ea649d 18-Jan-2010 Douglas Gregor <dgregor@apple.com> float, double, and long double do need extra data in the
BuiltinTypeLoc structure. Thanks, Enea!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
0153080bd62cad0315c7135a9bb11d490cc334bd 18-Jan-2010 Ted Kremenek <kremenek@apple.com> Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93760 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
cf84aa46def41cccf4dd4c51cd0543b70c11e4eb 18-Jan-2010 Ted Kremenek <kremenek@apple.com> Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93760 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c1beadbbdca275e932d68978944b8feefbf51941 18-Jan-2010 John McCall <rjmccall@apple.com> Preserve type source information in compound literal expressions.
Patch by Enea Zaffanella!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
42f56b50062cd3b3c6b23fdb9053578ae9145664 18-Jan-2010 John McCall <rjmccall@apple.com> Preserve type source information in compound literal expressions.
Patch by Enea Zaffanella!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b1215843673dae08b29b4fc004f2d4ef273cb76a 18-Jan-2010 Mike Stump <mrs@apple.com> Silence a control reaches end of function warning. Patch by Enea
Zaffanella.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLocVisitor.h
b7fd588ea95bfbe8436380091ab0f61a4210ba4b 18-Jan-2010 Mike Stump <mrs@apple.com> Silence a control reaches end of function warning. Patch by Enea
Zaffanella.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLocVisitor.h
bc6fcc7a405e5d9caf60f0485f374446300bc3cf 18-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Basic/Specifiers.h
lang/Parse/DeclSpec.h
ddf889a2ad2888f1dea573987bbe952d9912c1a0 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve source-location information for builtin TypeLocs, from Enea
Zaffanella (with a couple of my tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Basic/Specifiers.h
lang/Parse/DeclSpec.h
3b6ac18535971f0b50fdae64a82b90ed0979395d 18-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix race condition in creating objdir.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
80febb9876b6de01fc688fb18511567c7af29a12 18-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix race condition in creating objdir.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
31cc550280fe5c50d7f6ff57978ec083d284b53b 18-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Encoding calling conventions in the type system, from Charles Davis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
ab8bbf4ebd3e3e6eab913cb044772a62b7581941 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Encoding calling conventions in the type system, from Charles Davis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
bcb7016f8b0f75e360798f22920b775bda13de66 18-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for computing size in elements for symbolic regions obtained from
malloc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
3ed04d37573c566205d965d2e91d54ccae898d0a 18-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add support for computing size in elements for symbolic regions obtained from
malloc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
c5f3e9f42a6befec845017ba12a6ec5407c2c8b2 16-Jan-2010 Sam Weinig <sam.weinig@gmail.com> Add PCH support for CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, CXXConstCastExpr and CXXFunctionalCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
ce757a7a1ee905f87551996a69da3e95e8afeeb7 16-Jan-2010 Sam Weinig <sam.weinig@gmail.com> Add PCH support for CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, CXXConstCastExpr and CXXFunctionalCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
f658702f2cd01e7b648a7131cb00ff55bc371e9a 16-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> When we are instantiating a member function of a local class, be sure
to merge the local instantiation scope with the outer local
instantiation scope, so that we can instantiate declarations from the
function owning the local class. Fixes an assert while instantiating
Boost.MPL's BOOST_MPL_ASSERT_MSG.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
79c2278a66d8fc0943774d1b7c71a32f7764e1e2 16-Jan-2010 Douglas Gregor <dgregor@apple.com> When we are instantiating a member function of a local class, be sure
to merge the local instantiation scope with the outer local
instantiation scope, so that we can instantiate declarations from the
function owning the local class. Fixes an assert while instantiating
Boost.MPL's BOOST_MPL_ASSERT_MSG.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
efae5800004586a05ac2f6153e71771d6e7187fd 16-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve location information for Objective-C category declarations. We
previously only had a single location (the @ in @interface); now we
know where the @ is (for the start of the declaration), where the
class name is (that's the normal "location" now for diagnostics), and
where the category name is. Also, eliminated the redundant "end"
location, since ObjCContainerDecl already has better @end information.

The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught
CIndex how to use the new locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3db211b617c5073aa70eb25d37ed44ae0dca17c4 16-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve location information for Objective-C category declarations. We
previously only had a single location (the @ in @interface); now we
know where the @ is (for the start of the declaration), where the
class name is (that's the normal "location" now for diagnostics), and
where the category name is. Also, eliminated the redundant "end"
location, since ObjCContainerDecl already has better @end information.

The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught
CIndex how to use the new locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7158dd960d2b47b2f2ab7bf94fa1702ca2778cdd 16-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of the source locations for each protocol reference in
Objective-C classes, protocol definitions, forward protocol
declarations, and categories. This information isn't actually used
yet; that's coming next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
18df52bbb5d28ca082064d31ae7558dbdae52377 16-Jan-2010 Douglas Gregor <dgregor@apple.com> Keep track of the source locations for each protocol reference in
Objective-C classes, protocol definitions, forward protocol
declarations, and categories. This information isn't actually used
yet; that's coming next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
8018d251aa827d5975932d24f97b619470c141e7 16-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove 'default' case in switch statement in clang_getCursorKindSpelling(). This identified a missing case (warned by the compiler) and identified that CXCursor_FirstDecl didn't actually correspond to the first decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93622 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
deb06bd3566e18f677e76bc435d478b033fe328b 16-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove 'default' case in switch statement in clang_getCursorKindSpelling(). This identified a missing case (warned by the compiler) and identified that CXCursor_FirstDecl didn't actually correspond to the first decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93622 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6c30cb6c3d2405decef6232838811a088f9e37b5 16-Jan-2010 Tanya Lattner <tonic@nondot.org> The codegen for these builtins was removed long ago, but their definitions remained. Removing them totally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
41bdf0d35ceab9ed2967ed836f050e5cec9c656d 16-Jan-2010 Tanya Lattner <tonic@nondot.org> The codegen for these builtins was removed long ago, but their definitions remained. Removing them totally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
f9d811a6869c679ad7f922fdc1cc162e37aa19d6 15-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Make CXCursor's data opaque.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93561 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
283cae37b03047c14ef918503bc46b08405c3b69 15-Jan-2010 Douglas Gregor <dgregor@apple.com> Make CXCursor's data opaque.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93561 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d5ecc399aa8985536852b0af8c2c63d5650f6857 15-Jan-2010 John McCall <rjmccall@apple.com> Preserve type source information in explicit cast expressions.
Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
9d125033a9853f3b572a4c9e2f9e2d4e5e346973 15-Jan-2010 John McCall <rjmccall@apple.com> Preserve type source information in explicit cast expressions.
Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
710d1169e49242b6852b7e6611528917f2cb77ec 15-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Convert the type of the LValue offset variable in APValue to CharUnits, moving
the LValue-related methods of APValue out of line to avoid header file leaching.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
a73058324197b7bdfd19307965954f626e26199d 15-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Convert the type of the LValue offset variable in APValue to CharUnits, moving
the LValue-related methods of APValue out of line to avoid header file leaching.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
443b7e5fa98e6a31a86b52ab3689f8140d4076e3 15-Jan-2010 Ted Kremenek <kremenek@apple.com> Convert a few more uses of std::string& to llvm::StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
8b9317186fd5243938128a0b0e0494498d78ab8c 15-Jan-2010 Ted Kremenek <kremenek@apple.com> Convert a few more uses of std::string& to llvm::StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
d53936ede29c21c7f937368abec6eb6b7e4ca9f0 14-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> When qualified lookup into the current instantiation fails (because it
finds nothing), and the current instantiation has dependent base
classes, treat the qualified lookup as if it referred to an unknown
specialization. Fixes PR6031.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9edad9b6184c730a73dc9241c043ea3bae54189f 14-Jan-2010 Douglas Gregor <dgregor@apple.com> When qualified lookup into the current instantiation fails (because it
finds nothing), and the current instantiation has dependent base
classes, treat the qualified lookup as if it referred to an unknown
specialization. Fixes PR6031.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e02f1e2fb37ddd0ec1f25fd0cec534f16c8cad4f 14-Jan-2010 John McCall <rjmccall@apple.com> Improve overload diagnostics some more by calling out qualifier mismatches
for special diagnostics. Unfortunately, the non-overload diagnostics are not
this good.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
651f3eec130099fb46e2ce2c8aee9d01531dc3b5 14-Jan-2010 John McCall <rjmccall@apple.com> Improve overload diagnostics some more by calling out qualifier mismatches
for special diagnostics. Unfortunately, the non-overload diagnostics are not
this good.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ce0452369fa01deec5f736574ff6fe55c54f151b 14-Jan-2010 John McCall <rjmccall@apple.com> Improve the diagnostic for bad conversions in overload resolution to talk
about 'object argument' vs. 'nth argument'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e81e15ed0c31f828104b339ceb66648d1c815a8b 14-Jan-2010 John McCall <rjmccall@apple.com> Improve the diagnostic for bad conversions in overload resolution to talk
about 'object argument' vs. 'nth argument'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e3258ff3df5a57e7f689e45cafda86cbd92e813e 14-Jan-2010 John McCall <rjmccall@apple.com> Perform format-expansion on %select results.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
9f28614bf1a8387000d8df57a713fcf69e198145 14-Jan-2010 John McCall <rjmccall@apple.com> Perform format-expansion on %select results.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
bedfe2752593796f67ba5f5f27968a4644965c64 14-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Banish the notion of a "rank" for code-completion results, since we
are no longer using it for anything. No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
bca403c17b3eee38ea0644fb70f652629b285faf 14-Jan-2010 Douglas Gregor <dgregor@apple.com> Banish the notion of a "rank" for code-completion results, since we
are no longer using it for anything. No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
19a2e1e609e6a9db13f649ccd9f4d1ec16aa5acd 13-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Code-completion for @public, @protected, @private, @package.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c38c3e1e726630458154534227d74eda833d26a0 13-Jan-2010 Douglas Gregor <dgregor@apple.com> Code-completion for @public, @protected, @private, @package.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
13529ab3783ec557034e2fce4d4152372aaabe64 13-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Whenever completing ordinary names for an Objective-C source, also
provide completions for @ keywords. Previously, we only provided
@-completions after an @ was actually typed, which is useful but
probably not the common case.

Also, make sure a few Objective-C 2.0 completions only show up when
Objective-C 2.0 support is enabled (the default).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b6ac2451bfed36206c5cec7217372c4299f67f2b 13-Jan-2010 Douglas Gregor <dgregor@apple.com> Whenever completing ordinary names for an Objective-C source, also
provide completions for @ keywords. Previously, we only provided
@-completions after an @ was actually typed, which is useful but
probably not the common case.

Also, make sure a few Objective-C 2.0 completions only show up when
Objective-C 2.0 support is enabled (the default).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6469dffc68a0b6fb195096b473763f3e1476b954 13-Jan-2010 John McCall <rjmccall@apple.com> Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93344 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Parse/DeclSpec.h
cfb708c354e2f30ccc5cba9d644650f408a1ec3e 13-Jan-2010 John McCall <rjmccall@apple.com> Add type source information for both kinds of typeof types.
Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93344 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/Parse/DeclSpec.h
67e343c5be7a8e558cd739d468182f50ffe7b4e6 13-Jan-2010 Ted Kremenek <kremenek@apple.com> Add 'referringDecl' field to CXCursor to prepare the way to better model declaration references from other delcarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93343 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b89e8f64e63aa1a76452e505c6432e0de93fa7cb 13-Jan-2010 Ted Kremenek <kremenek@apple.com> Add 'referringDecl' field to CXCursor to prepare the way to better model declaration references from other delcarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93343 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
bd51dca82ccb6b91a6e3bdf691a46e641d6a5e85 13-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Predefine __weak attribute when doing objective-c
rewriting for any target. (refixes radar 7530235).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
lang/Frontend/Utils.h
7d957472ef9a09048c03d8a11028536f908c18b9 13-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Predefine __weak attribute when doing objective-c
rewriting for any target. (refixes radar 7530235).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
lang/Frontend/Utils.h
9e433f356f535443788b9ec6a2cd28fa25a0d33d 13-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Reimplement constructor declarator parsing to cope with template-ids
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.

Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.

Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between

C(int); // constructor

and

C (f)(int); // member function

which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:

C::C C::f(int); // error: C::C refers to the constructor name, but
// we complain nicely and recover by treating it as
// a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
0efc2c1716be4f1c5f1343cad3b047e74861f030 13-Jan-2010 Douglas Gregor <dgregor@apple.com> Reimplement constructor declarator parsing to cope with template-ids
that name constructors, the endless joys of out-of-line constructor
definitions, and various other corner cases that the previous hack
never imagined. Fixes PR5688 and tightens up semantic analysis for
constructor names.

Additionally, fixed a problem where we wouldn't properly enter the
declarator scope of a parenthesized declarator. We were entering the
scope, then leaving it when we saw the ")"; now, we re-enter the
declarator scope before parsing the parameter list.

Note that we are forced to perform some tentative parsing within a
class (call it C) to tell the difference between

C(int); // constructor

and

C (f)(int); // member function

which is rather unfortunate. And, although it isn't necessary for
correctness, we use the same tentative-parsing mechanism for
out-of-line constructors to improve diagnostics in icky cases like:

C::C C::f(int); // error: C::C refers to the constructor name, but
// we complain nicely and recover by treating it as
// a type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
23b70b8d8a7271402c433f023e3012717a03cc6b 13-Jan-2010 Sean Hunt <rideau3@gmail.com> Implement semantic checking for C++ literal operators.
This now rejects literal operators that don't meet the requirements.
Templates are not yet checked for.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclarationName.h
lang/Basic/DiagnosticSemaKinds.td
a6c058dd75c5563cced821fc16766a7cc179e00c 13-Jan-2010 Sean Hunt <rideau3@gmail.com> Implement semantic checking for C++ literal operators.
This now rejects literal operators that don't meet the requirements.
Templates are not yet checked for.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclarationName.h
lang/Basic/DiagnosticSemaKinds.td
56e6c573af74698691c61e649b5153bcca795781 13-Jan-2010 Chris Lattner <sabre@nondot.org> diagnose invalid values of -ftabstop, patch by Christian Adaker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Frontend/DiagnosticOptions.h
52388f9aefba585475a38081272ce582d033c883 13-Jan-2010 Chris Lattner <sabre@nondot.org> diagnose invalid values of -ftabstop, patch by Christian Adaker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Frontend/DiagnosticOptions.h
fe6189ee1a85456792b2dd58f3ef7c93de9c4ed0 13-Jan-2010 Mike Stump <mrs@apple.com> Add an unreachable code checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fa6ef180c0d3609124217387618fbb51bbdd2e48 13-Jan-2010 Mike Stump <mrs@apple.com> Add an unreachable code checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9f5bb69061be3e1edc3dc0dbda45516c714a55d5 13-Jan-2010 Daniel Dunbar <daniel@zuster.org> cc1: Factor out CompilerInstance::ExecuteAction which has the majority of the
clang -cc1 logic for running an action against a set of options.
- This should make it easier to build tools that have a clang -cc1 like
interface, but aren't actually part of clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
0397af277e3bba16da1fd125ddba07415686b429 13-Jan-2010 Daniel Dunbar <daniel@zuster.org> cc1: Factor out CompilerInstance::ExecuteAction which has the majority of the
clang -cc1 logic for running an action against a set of options.
- This should make it easier to build tools that have a clang -cc1 like
interface, but aren't actually part of clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
ec29a8136449036f485e28f6e1e21ae3fb0289a0 13-Jan-2010 John McCall <rjmccall@apple.com> Improve the reporting of non-viable overload candidates by noting the reason
why the candidate is non-viable. There's a lot we can do to improve this, but
it's a good start. Further improvements should probably be integrated with the
bad-initialization reporting routines.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
220ccbf2c9ef97034cce80561f9f46c4f1f63bc7 13-Jan-2010 John McCall <rjmccall@apple.com> Improve the reporting of non-viable overload candidates by noting the reason
why the candidate is non-viable. There's a lot we can do to improve this, but
it's a good start. Further improvements should probably be integrated with the
bad-initialization reporting routines.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bb028efabe4dc9ad879cee8aeea735c2250f9205 13-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl instead of a CXEntity.
Enhance USR generation a bit with support for records.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93267 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c50277f748d13f52bd62a6a2c3bede2cf7d65eea 13-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl instead of a CXEntity.
Enhance USR generation a bit with support for records.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93267 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
03d4a759ca310279ed396418a3d6469dd1f06c3a 13-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Don't emit string-comparison or self-comparison warnings in
unevaluated contexts, because they only matter for code that will
actually be evaluated at runtime.

As part of this, I had to extend PartialDiagnostic to support fix-it
hints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
d1e4d9bfd57f643d950eb1373f582bda4dfb8dc7 13-Jan-2010 Douglas Gregor <dgregor@apple.com> Don't emit string-comparison or self-comparison warnings in
unevaluated contexts, because they only matter for code that will
actually be evaluated at runtime.

As part of this, I had to extend PartialDiagnostic to support fix-it
hints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
0dca8ec36388fb792cca7e25345dbd3e755ccbad 12-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve recovery for template-ids whose template-name doesn't actually
name a template, when they occur in a base-specifier. This is one of
the (few) places where we know for sure that an identifier followed by
a '<' must be a template name, so we can diagnose and recover well:

test/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing
'template'
keyword prior to dependent template name 'T::apply'
struct X1 : T::apply<U> { }; // expected-error{{missing 'template' ...
^
template
test/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown
template name
'vector'
struct X2 : vector<T> { }; // expected-error{{unknown template name
'vector'}}
^
2 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
84d0a19828599e8623223632d59447fd498999cf 12-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve recovery for template-ids whose template-name doesn't actually
name a template, when they occur in a base-specifier. This is one of
the (few) places where we know for sure that an identifier followed by
a '<' must be a template name, so we can diagnose and recover well:

test/SemaTemplate/dependent-base-classes.cpp:9:16: error: missing
'template'
keyword prior to dependent template name 'T::apply'
struct X1 : T::apply<U> { }; // expected-error{{missing 'template' ...
^
template
test/SemaTemplate/dependent-base-classes.cpp:12:13: error: unknown
template name
'vector'
struct X2 : vector<T> { }; // expected-error{{unknown template name
'vector'}}
^
2 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
07dae20d1c4268bc0b7548a9d21ae55062acdb53 12-Jan-2010 Chris Lattner <sabre@nondot.org> implement PR6004, warning about divide and remainder by zero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7ef655a78863c0a7550bfe51174b9c340ab1dce0 12-Jan-2010 Chris Lattner <sabre@nondot.org> implement PR6004, warning about divide and remainder by zero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a96e8bff5e65b4ddafb5464c8511ecf5cc2d9b1f 12-Jan-2010 Chris Lattner <sabre@nondot.org> implement PR6007, diagnosing invalid attribute((section))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a1e1dc77e995b746826b64752751dbf35f323767 12-Jan-2010 Chris Lattner <sabre@nondot.org> implement PR6007, diagnosing invalid attribute((section))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d1563a9c50fbde7ce7d4d79f21a6f9abc9a20e1 12-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix the CodeGen half of PR5911 by changing reference initialization to
correctly look through arrays to see cv-qualifiers. Also enhances the routine
for doing this to preserve more type sugaring for diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5535c38a2fcface6c13bc8bbeca66882de2fa227 12-Jan-2010 Chandler Carruth <chandlerc@gmail.com> Fix the CodeGen half of PR5911 by changing reference initialization to
correctly look through arrays to see cv-qualifiers. Also enhances the routine
for doing this to preserve more type sugaring for diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c0e8d18ceec34f3a9ef7f838c430835e5c06ac7e 12-Jan-2010 John McCall <rjmccall@apple.com> Reorganize some of the code to note overload candidates. Improves the
fidelity with which we note them as functions/constructors and templates
thereof. Also will be helpful when reporting bad conversions (next).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3c80f573dfbc01f29cc292f6c1fc794705823d52 12-Jan-2010 John McCall <rjmccall@apple.com> Reorganize some of the code to note overload candidates. Improves the
fidelity with which we note them as functions/constructors and templates
thereof. Also will be helpful when reporting bad conversions (next).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a32558cdc96d1045308c44df49eee66bc62ce7cb 12-Jan-2010 Ted Kremenek <kremenek@apple.com> Change clang_getUSR() to return a CXString instead of a 'const char *'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93213 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1fc00e6e4976f3a05ab4ac8b5a2c7aa5c4d030eb 12-Jan-2010 Ted Kremenek <kremenek@apple.com> Change clang_getUSR() to return a CXString instead of a 'const char *'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93213 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f03f86b53aae1fae9415069e92bab581e7f7295b 12-Jan-2010 Ted Kremenek <kremenek@apple.com> CIndex:
- Remove unused (and unimplemented) clang_getDeclarationName().
- Remove unused (and unimplemented) clang_getEntity().
- Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity)
- Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93209 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
317238334161d2c72d2432a79827d9a7ee1fc123 12-Jan-2010 Ted Kremenek <kremenek@apple.com> CIndex:
- Remove unused (and unimplemented) clang_getDeclarationName().
- Remove unused (and unimplemented) clang_getEntity().
- Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity)
- Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93209 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1981dbd321e8ff34344e9804c1c9d0ee615ff447 11-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid use of deprecated functions (CStrInCStrNoCase and StringsEqualNoCase).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
e45c149996ccd0f2ac1da95493b8563c108abc1f 11-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid use of deprecated functions (CStrInCStrNoCase and StringsEqualNoCase).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
7a5bd1189974bff4cc180f89bb444e9a5c1db545 11-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Change return type of getObjCEncodingTypeSize() to CharUnits as the units are in characters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
aa8741a1db98eef05f09b1200dba94aa5dc3bc3d 11-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Change return type of getObjCEncodingTypeSize() to CharUnits as the units are in characters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8f3a00f7d3af66b977d410e83acfd328b7956a31 11-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Tighten up the "cannot return array or function type" diagnostic to
say either "array type" or "function type", whichever it is. No reason
to make the user guess.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
58408bc4ead86b08af56cd06fc966fd858b48b2d 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Tighten up the "cannot return array or function type" diagnostic to
say either "array type" or "function type", whichever it is. No reason
to make the user guess.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ba171099c6991c1bdc65631c7b89dc1ea746e786 11-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Implement name lookup for conversion function template specializations
(C++ [temp.mem]p5-6), which involves template argument deduction based
on the type named, e.g., given

struct X { template<typename T> operator T*(); } x;

when we call

x.operator int*();

we perform template argument deduction to determine that T=int. This
template argument deduction is needed for template specialization and
explicit instantiation, e.g.,

template<> X::operator float*() { /* ... */ }

and when calling or otherwise naming a conversion function (as in the
first example).

This fixes PR5742 and PR5762, although there's some remaining ugliness
that's causing out-of-line definitions of conversion function
templates to fail. I'll look into that separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
48026d26fb58e413544874eead5491b1452e2ebf 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement name lookup for conversion function template specializations
(C++ [temp.mem]p5-6), which involves template argument deduction based
on the type named, e.g., given

struct X { template<typename T> operator T*(); } x;

when we call

x.operator int*();

we perform template argument deduction to determine that T=int. This
template argument deduction is needed for template specialization and
explicit instantiation, e.g.,

template<> X::operator float*() { /* ... */ }

and when calling or otherwise naming a conversion function (as in the
first example).

This fixes PR5742 and PR5762, although there's some remaining ugliness
that's causing out-of-line definitions of conversion function
templates to fail. I'll look into that separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
549ba49e99494d17bcade748696f3f48384a46cb 11-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Roll out ASTContext::getTypeSizeInChars(), replacing instances of
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.

Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
199c3d6cd16aebbb9c7f0d42af9d922c9628bf70 11-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Roll out ASTContext::getTypeSizeInChars(), replacing instances of
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.

Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
611405cf9f2eafde425844480ea81c427b2778ce 11-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make Clang complain about taking the address of an unqualified member function. Fixes PR5985.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e27d87ff27b26e5886cf6472271d3b5e18ec3d87 11-Jan-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Make Clang complain about taking the address of an unqualified member function. Fixes PR5985.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8a2abfabeea60dafb4a54291291abf3928819866 11-Jan-2010 Ted Kremenek <kremenek@apple.com> Switch RegionStore over to using <BaseRegion+raw offset> to store
value bindings. Along with a small change to OSAtomicChecker, this
resolves <rdar://problem/7527292> and resolves some long-standing
issues with how values can be bound to the same physical address by
not have the same "key". This change is only a beginning; logically
RegionStore needs to better handle loads from addresses where the
stored value is larger/smaller/different type than the loaded value.
We handle these cases in an approximate fashion now (via
CastRetrievedVal and help in SimpleSValuator), but it could be made
much smarter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
c50e6df965ff264952d8d5805d151f89c89af302 11-Jan-2010 Ted Kremenek <kremenek@apple.com> Switch RegionStore over to using <BaseRegion+raw offset> to store
value bindings. Along with a small change to OSAtomicChecker, this
resolves <rdar://problem/7527292> and resolves some long-standing
issues with how values can be bound to the same physical address by
not have the same "key". This change is only a beginning; logically
RegionStore needs to better handle loads from addresses where the
stored value is larger/smaller/different type than the loaded value.
We handle these cases in an approximate fashion now (via
CastRetrievedVal and help in SimpleSValuator), but it could be made
much smarter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
9f08a84789ec21aeb0ac355a6ab32c846ffce0b8 11-Jan-2010 Sean Hunt <rideau3@gmail.com> Do not parse hexadecimal floating point literals in C++0x mode because they are
incompatible with user-defined literals, specifically with the following form:

0x1p+1

The preprocessing-number token extends only as far as the 'p'; the '+' is not
included. Previously we could get away with this extension as p was an invalid
suffix, but now with user-defined literals, 'p' might well be a valid suffix
and we are forced to consider it as such.

This patch also adds a warning in non-0x C++ modes telling the user that
this extension is incompatible with C++0x that is enabled by default
(previously and with other languages, we warn only with a compliance
option such as -pedantic).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
8c723404c34e9347fae473489194e8c200c4ac83 11-Jan-2010 Sean Hunt <rideau3@gmail.com> Do not parse hexadecimal floating point literals in C++0x mode because they are
incompatible with user-defined literals, specifically with the following form:

0x1p+1

The preprocessing-number token extends only as far as the 'p'; the '+' is not
included. Previously we could get away with this extension as p was an invalid
suffix, but now with user-defined literals, 'p' might well be a valid suffix
and we are forced to consider it as such.

This patch also adds a warning in non-0x C++ modes telling the user that
this extension is incompatible with C++0x that is enabled by default
(previously and with other languages, we warn only with a compliance
option such as -pedantic).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
b33725c345a3de48248ba7bb1c7bec3b829f6d11 11-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve code completion by introducing patterns for the various C and
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for

static_cast<type>(expr)

when we can have an expression, or

using namespace identifier;

when we can have a using directive.

Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93134 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
01dfea02d1da297e8b53db8eea3d3cc652acda8d 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve code completion by introducing patterns for the various C and
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for

static_cast<type>(expr)

when we can have an expression, or

using namespace identifier;

when we can have a using directive.

Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93134 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
0bb4d1988e810f9d2576e5ae92a1a2c8d91fec17 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Make clone() method out-of-line for Attr classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
fc5d5133357e36b9b83edd7cd10080d783f19010 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Make clone() method out-of-line for Attr classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
698d8f3d012663fd816aece0570f291926fb35d0 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Generalize target weirdness handling having proper layering in mind:
1. Add helper class for sema checks for target attributes
2. Add helper class for codegen of target attributes

As a proof-of-concept - implement msp430's 'interrupt' attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
82d0a418c8699fc6f4a9417457ffe93d43bba1c1 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Generalize target weirdness handling having proper layering in mind:
1. Add helper class for sema checks for target attributes
2. Add helper class for codegen of target attributes

As a proof-of-concept - implement msp430's 'interrupt' attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
eb8e4f977d5b5851a473832142eafc13330977aa 10-Jan-2010 Chris Lattner <sabre@nondot.org> stringref'ize a bunch of filename handling logic. Much
nicer than passing around two const char*'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/Preprocessor.h
a139481e62fdb209d9d87a54a5733f989d2e8d51 10-Jan-2010 Chris Lattner <sabre@nondot.org> stringref'ize a bunch of filename handling logic. Much
nicer than passing around two const char*'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/Preprocessor.h
45d3b07e2601ba5c87527f3b34f060cce22aa43f 10-Jan-2010 Chris Lattner <sabre@nondot.org> implement rdar://7520940: published framework headers should
import other headers within the same framework with the full
framework path, not with a relative include.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
804f65271953f358dc01bfcf74a93e8c93c5b2d6 10-Jan-2010 Chris Lattner <sabre@nondot.org> implement rdar://7520940: published framework headers should
import other headers within the same framework with the full
framework path, not with a relative include.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
ba62ebd010101759f34b7b41e73cb1f3650d623d 09-Jan-2010 Chris Lattner <sabre@nondot.org> implement -ftabstop=width, patch by Christian Adåker


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
124fca533d9fef2e3f6359283909bd342b5f5f26 09-Jan-2010 Chris Lattner <sabre@nondot.org> implement -ftabstop=width, patch by Christian Adåker


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/Options.td
lang/Frontend/DiagnosticOptions.h
0aeb2d9d73fa302b0fe3392464940df9fc2d6591 09-Jan-2010 Chris Lattner <sabre@nondot.org> make missing prototypes warn by default in c99 mode like GCC does,
rdar://7083878


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e6e8b5af0dc25cab3a5e4cd82ed554b68d5b323a 09-Jan-2010 Chris Lattner <sabre@nondot.org> make missing prototypes warn by default in c99 mode like GCC does,
rdar://7083878


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9ffb1043390ed6ce9772df75ccf2362285d1672c 09-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Use MacroBuilder for TargetDefines instead of std::vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
a99927774d07af9c6f0e1945531eadc910592945 09-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Use MacroBuilder for TargetDefines instead of std::vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0c12b3b01dd46b9401ba86e54aa2639c447fa18c 09-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Move MacroBuilder into Frontend/Utils.h and clean it up a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
b1b5b901ca229ce05dc40abbec8bebe7b1096e42 09-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Move MacroBuilder into Frontend/Utils.h and clean it up a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
01ecd6f31b707cbb1aa53b73829cd1ae767ba5f5 09-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> When binding an rvalue to a reference, create a temporary object. Use
CXXObjectRegion to represent it.

In Environment, lookup a literal expression before make up a value for it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/MemRegion.h
bc37b8dd9914e02580f531fa6e5e72be34d9675e 09-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> When binding an rvalue to a reference, create a temporary object. Use
CXXObjectRegion to represent it.

In Environment, lookup a literal expression before make up a value for it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/MemRegion.h
9aa4251beab46bf7683040cbbae10a507154da0e 08-Jan-2010 Ted Kremenek <kremenek@apple.com> For now, add back clang_getDeclSource().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93003 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6ab9db10c5f89d1db230d227f67ff18f55608e27 08-Jan-2010 Ted Kremenek <kremenek@apple.com> For now, add back clang_getDeclSource().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93003 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
54d54b5a7bae186b56b606382ce36c5724335f13 08-Jan-2010 Dan Gohman <gohman@apple.com> Use -fno-math-errno by default, and remove the IsMathErrnoDefault
targethook, which is no longer being used. This fixes PR5971.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
c31176d5ebbcd407aa512bbd5f717e35da629e7d 08-Jan-2010 Dan Gohman <gohman@apple.com> Use -fno-math-errno by default, and remove the IsMathErrnoDefault
targethook, which is no longer being used. This fixes PR5971.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
f06c73ec0e1154646664ef846508152fa4789b11 08-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve the fix-its for -Wparentheses to ensure that the fix-it
suggestions follow recovery. Additionally, add a note to these
diagnostics which suggests a fix-it for changing the behavior to what
the user probably meant. Examples:

t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first
[-Wparentheses]
if (i & j == k) {
^~~~~~~~
( )
t.cpp:2:9: note: place parentheses around the & expression to evaluate it first
if (i & j == k) {
^
( )

t.cpp:14:9: warning: using the result of an assignment as a condition
without
parentheses [-Wparentheses]
if (i = f()) {
~~^~~~~
( )
t.cpp:14:9: note: use '==' to turn this assignment into an equality
comparison
if (i = f()) {
^
==




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
827feec561c8a1f23c099da56c4ac98364ecfc09 08-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve the fix-its for -Wparentheses to ensure that the fix-it
suggestions follow recovery. Additionally, add a note to these
diagnostics which suggests a fix-it for changing the behavior to what
the user probably meant. Examples:

t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first
[-Wparentheses]
if (i & j == k) {
^~~~~~~~
( )
t.cpp:2:9: note: place parentheses around the & expression to evaluate it first
if (i & j == k) {
^
( )

t.cpp:14:9: warning: using the result of an assignment as a condition
without
parentheses [-Wparentheses]
if (i = f()) {
~~^~~~~
( )
t.cpp:14:9: note: use '==' to turn this assignment into an equality
comparison
if (i = f()) {
^
==




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
48a26b4d276d5d0fd55da6182c8dcae33b11479a 08-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Add an "implicit" bit to CXXThisExpr, so that we can track
implicitness without losing track of the (logical or actual) location
where "this" would occur in the source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
828a197317288e3333b0ce6f5cedadd036e3531f 08-Jan-2010 Douglas Gregor <dgregor@apple.com> Add an "implicit" bit to CXXThisExpr, so that we can track
implicitness without losing track of the (logical or actual) location
where "this" would occur in the source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
4816e3f43cb95c35202db24eeb8673aa35f17c6e 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Fix typo: rename Rewriter::getRewritenText() -> Rewriter::getRewrittenText().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
6a12a14a529a79524e17889046c7098b80a73c49 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Fix typo: rename Rewriter::getRewritenText() -> Rewriter::getRewrittenText().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
6b2a65de031ad19968e314365b37a09ba3c68b10 07-Jan-2010 John McCall <rjmccall@apple.com> Improve the lead diagnostic for C++ object subscript expressions with
no viable overloads. Use a different message when the class provides
no operator[] overloads at all; use it for operator(), too.

Partially addresses PR 5900.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1eb3e1003d5cda4d47f54321d81d678c26981e7a 07-Jan-2010 John McCall <rjmccall@apple.com> Improve the lead diagnostic for C++ object subscript expressions with
no viable overloads. Use a different message when the class provides
no operator[] overloads at all; use it for operator(), too.

Partially addresses PR 5900.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
42c0c4c4c5a06ed3bca2f21b65d3f42827dcfd57 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Change ObjCContainerDecl to contain the entire range for the '@end'
piece of the declaration. The '@' and the 'end' are separate tokens,
and require two SourceLocations to accurately track.

This change was motivated because ObjCContainerDecl::getSourceRange()
would previously not return the entire range of the declaration (the
'end' would be left off).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/SourceLocation.h
lang/Parse/Action.h
lang/Parse/Parser.h
782f2f52b78d8ca785110398a7f7b56b830b9ac7 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Change ObjCContainerDecl to contain the entire range for the '@end'
piece of the declaration. The '@' and the 'end' are separate tokens,
and require two SourceLocations to accurately track.

This change was motivated because ObjCContainerDecl::getSourceRange()
would previously not return the entire range of the declaration (the
'end' would be left off).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/SourceLocation.h
lang/Parse/Action.h
lang/Parse/Parser.h
8ee4c875b808dd97e2e57d023b4793cdd1944290 07-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> When we typo-correct a base class initializer, point to the base class
specifier that we corrected to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0d535c89c5d02017153fb971e1ef080cd80cb4b8 07-Jan-2010 Douglas Gregor <dgregor@apple.com> When we typo-correct a base class initializer, point to the base class
specifier that we corrected to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
45cd47867edde4c3dfb0ff40c8e069ade76eeea9 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Change clang_getDeclExtent() to have the endpoint point to the last character in the last token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92869 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d8210650ed948de65a08a8daf16d291b747717c4 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Change clang_getDeclExtent() to have the endpoint point to the last character in the last token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92869 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8ca761bc62a3749d80becb3e49dd54098c9079d3 07-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Move the allocation of designators in DesignatedInitExpr to the
ASTContext. Fixes <rdar://problem/7495428>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
319d57f21600dd2c4d52ccc27bd12ce260b174e7 07-Jan-2010 Douglas Gregor <dgregor@apple.com> Move the allocation of designators in DesignatedInitExpr to the
ASTContext. Fixes <rdar://problem/7495428>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
84b499ee169a4de028ac44ffd1a360802b40dd89 06-Jan-2010 John McCall <rjmccall@apple.com> Improve the diagnostics used to report implicitly-generated class members
as parts of overload sets. Also, refer to constructors as 'constructors'
rather than functions.

Adjust a lot of tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b1622a1fd7b7f4ab8d00d0183d17c90ad25c14e3 06-Jan-2010 John McCall <rjmccall@apple.com> Improve the diagnostics used to report implicitly-generated class members
as parts of overload sets. Also, refer to constructors as 'constructors'
rather than functions.

Adjust a lot of tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
92e7ff7b302bc2bc73faae8fad57b7d026ab5cae 06-Jan-2010 Daniel Dunbar <daniel@zuster.org> Add missing CINDEX_LINKAGE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92827 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3aacd53816b4ba78f085c05232ec84f4947222d6 06-Jan-2010 Daniel Dunbar <daniel@zuster.org> Add missing CINDEX_LINKAGE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92827 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
274441d6d0e400c029074801e9de3c5d335c00bc 06-Jan-2010 John McCall <rjmccall@apple.com> Add Expr::EvaluateAsBooleanCondition(), which does unprincipled folding to
try to evaluate an expression as a constant boolean condition. This has
the same intended semantics as used in folding conditional operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cd7a445c6b46c5585580dfb652300c8483c0cb6b 06-Jan-2010 John McCall <rjmccall@apple.com> Add Expr::EvaluateAsBooleanCondition(), which does unprincipled folding to
try to evaluate an expression as a constant boolean condition. This has
the same intended semantics as used in folding conditional operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3e479e379dd1ee76b120f632ff9646212ed87bdf 06-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove deprecated function 'clang_getDeclSource()'. Use 'clang_getDeclFile()' instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92803 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
817db7cb9bc5434a9b79aeb580c4404d4146d0a6 06-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove deprecated function 'clang_getDeclSource()'. Use 'clang_getDeclFile()' instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92803 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
86781ad068000ad826abec418ba68cbb91e9b763 06-Jan-2010 Ted Kremenek <kremenek@apple.com> Add C API hook 'clang_getDeclExtent()', which returns the source extent of a declaration. This implements <rdar://problem/7280072>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92802 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
fe6fd3d41a7f48317d6856c9327b6cead32c3498 06-Jan-2010 Ted Kremenek <kremenek@apple.com> Add C API hook 'clang_getDeclExtent()', which returns the source extent of a declaration. This implements <rdar://problem/7280072>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92802 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d2cec347549418847b4b4f1f0f9cc0d17f0b9ba3 05-Jan-2010 Ted Kremenek <kremenek@apple.com> Split (mostly nonexistent) USR code out from the main CIndex logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92789 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1b6869a1831ef66b5024dd23160dc9519c99555d 05-Jan-2010 Ted Kremenek <kremenek@apple.com> Split (mostly nonexistent) USR code out from the main CIndex logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92789 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
51c4c9eaf6a99f50702ab244ab12a5f1b0ddeba3 05-Jan-2010 Nate Begeman <natebegeman@mac.com> Allow clang to pass -x cl through to compiler driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
edcfc411148e81c644a1ff36a9df8a7b08209a23 05-Jan-2010 Nate Begeman <natebegeman@mac.com> Allow clang to pass -x cl through to compiler driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
3d1e103e971807fecb909bdffad0cfd606b91137 05-Jan-2010 Mike Stump <mrs@apple.com> Disallow captured arrays in blocks as well. Radar 7438948.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2849734790738585a9726a84b263c60e3be0193f 05-Jan-2010 Mike Stump <mrs@apple.com> Disallow captured arrays in blocks as well. Radar 7438948.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7cca37d40d1587a897e85fc19db19a74e2d9b458 05-Jan-2010 Mike Stump <mrs@apple.com> Disallow capturing vlas inside blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0d6fd570e52f5d7fc637c9f41382992a97b94b4c 05-Jan-2010 Mike Stump <mrs@apple.com> Disallow capturing vlas inside blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4e96c5d20306d2c645dcd976b0ef677a1906524d 05-Jan-2010 Ted Kremenek <kremenek@apple.com> Make static analysis support for C++ 'this' expression context-sensitive. Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
de0d26310191215a6d1d189dc419f87af18ce6be 05-Jan-2010 Ted Kremenek <kremenek@apple.com> Make static analysis support for C++ 'this' expression context-sensitive. Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
04ed4d956e8beb7b32f54e57d414b1c209a1b029 05-Jan-2010 Chris Lattner <sabre@nondot.org> fix a bug mike noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
6ffe643322949dd776285a6df60d3578f3918be4 05-Jan-2010 Chris Lattner <sabre@nondot.org> fix a bug mike noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
be1f166f974c24a0b945cddf82e448d1b7d189ef 05-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove references to 'Checker' and 'GRTransferFuncs' from
GRStateManager. Having these references was an abstraction violation,
as they really should only be known about GRExprEngine.

This change required adding a new 'ProcessAssume' callback in
GRSubEngine. GRExprEngine implements this callback by calling
'EvalAssume' on all registered Checker objects as well as the
registered GRTransferFunc object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRSubEngine.h
32a58084a4c53e6938dd81bfce224db25a5976d1 05-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove references to 'Checker' and 'GRTransferFuncs' from
GRStateManager. Having these references was an abstraction violation,
as they really should only be known about GRExprEngine.

This change required adding a new 'ProcessAssume' callback in
GRSubEngine. GRExprEngine implements this callback by calling
'EvalAssume' on all registered Checker objects as well as the
registered GRTransferFunc object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRSubEngine.h
bf8cc88a863ad503648b9fc01ace1c1f8812c196 04-Jan-2010 Mike Stump <mrs@apple.com> Remember if the AsmStmt came from Microsoft-style inline assembly code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
3b11fd3b52e7b88233c602407c151d07cb093e75 04-Jan-2010 Mike Stump <mrs@apple.com> Remember if the AsmStmt came from Microsoft-style inline assembly code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
3cbd6c34b9affed2b0571489e52f50444172d949 04-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Make sure to use ASTContext::getAs*ArrayType() when decomposing array
types. Fixes APFloat.cpp compilation failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
442471309fa97348f849687a6a8ef4acc3bc2c1f 04-Jan-2010 Douglas Gregor <dgregor@apple.com> Make sure to use ASTContext::getAs*ArrayType() when decomposing array
types. Fixes APFloat.cpp compilation failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d8c6349c077f98826061f5da06abb475d872c98f 04-Jan-2010 Daniel Dunbar <daniel@zuster.org> Add missing newline (which breaks MSVC build???)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/ExternalPreprocessorSource.h
f8c381fff1a3c10e0f7f0c9f223f08e8d7dce0e3 04-Jan-2010 Daniel Dunbar <daniel@zuster.org> Add missing newline (which breaks MSVC build???)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/ExternalPreprocessorSource.h
b5e7bb7dbd6ea02a30f18cd5e637dd231e8486e5 04-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Teach Preprocessor::macro_begin/macro_end to lazily load all macro
definitions from a precompiled header. This ensures that
code-completion with macro names behaves the same with or without
precompiled headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/Preprocessor.h
88a35862fbe473f2a4f0c19f24dbe536937e1dc6 04-Jan-2010 Douglas Gregor <dgregor@apple.com> Teach Preprocessor::macro_begin/macro_end to lazily load all macro
definitions from a precompiled header. This ensures that
code-completion with macro names behaves the same with or without
precompiled headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Lex/ExternalPreprocessorSource.h
lang/Lex/Preprocessor.h
40cd149f9ac16960a8a366edd067596fc75d864c 04-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> When declaring an Objective-C implementation without a corresponding
interface, suggest correction of typos. For example, given:

@interface NSString
@end

@implementation NSstring
@end

we'll warn with:

t.m:4:19: warning: cannot find interface declaration for 'NSstring';
did you mean 'NSString'?
@implementation NSstring
^

However, since this is just a warning, we don't provide a fix-it
hint. Good idea, Ted!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
95ff742380d1c3dd5152739183bfe085cf27197f 04-Jan-2010 Douglas Gregor <dgregor@apple.com> When declaring an Objective-C implementation without a corresponding
interface, suggest correction of typos. For example, given:

@interface NSString
@end

@implementation NSstring
@end

we'll warn with:

t.m:4:19: warning: cannot find interface declaration for 'NSstring';
did you mean 'NSString'?
@implementation NSstring
^

However, since this is just a warning, we don't provide a fix-it
hint. Good idea, Ted!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1ce05a85971be4d02f9bb3f6ca8198364e32bfcb 03-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Implement typo correction for a variety of Objective-C-specific
constructs:

- Instance variable lookup ("foo->ivar" and, in instance methods, "ivar")
- Property name lookup ("foo.prop")
- Superclasses
- Various places where a class name is required
- Protocol names (e.g., id<proto>)

This seems to cover many of the common places where typos could occur.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f06cdae9c68dfc4191fbf6b9e5ea0fd748488d88 03-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement typo correction for a variety of Objective-C-specific
constructs:

- Instance variable lookup ("foo->ivar" and, in instance methods, "ivar")
- Property name lookup ("foo.prop")
- Superclasses
- Various places where a class name is required
- Protocol names (e.g., id<proto>)

This seems to cover many of the common places where typos could occur.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1241be32b423ef5cdd79abb89beb11bf0679f24e 01-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Typo correction for C99 designated field initializers, e.g.,

test/FixIt/typo.c:19:4: error: field designator 'bunds' does not refer to any
field in type 'struct Window'; did you mean 'bounds'?
.bunds.
^~~~~
bounds



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c171e3b192a372669cf622ff0b6a847f8e5b4220 01-Jan-2010 Douglas Gregor <dgregor@apple.com> Typo correction for C99 designated field initializers, e.g.,

test/FixIt/typo.c:19:4: error: field designator 'bunds' does not refer to any
field in type 'struct Window'; did you mean 'bounds'?
.bunds.
^~~~~
bounds



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
894683184ed0584a7bff845671a224ef5e5a3d49 31-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that an overriding return type is complete before checking if it's covariant. Fixes PR5920.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
be2e205add4c1f6375bb430e847b712a88581e46 31-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that an overriding return type is complete before checking if it's covariant. Fixes PR5920.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
699a60a2225911ed5a0fa015b5442e4567622e58 31-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Typo correction for C++ base and member initializers, e.g.,

test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static
data member or base class; did you mean the base class 'Base'?
Derived() : base(),
^~~~
Base
test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static
data member or base class; did you mean the member 'member'?
ember() { }
^~~~~
member



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fe0241e31dd2d1af60116adf6f71dedc88cd1f68 31-Dec-2009 Douglas Gregor <dgregor@apple.com> Typo correction for C++ base and member initializers, e.g.,

test/FixIt/typo.cpp:41:15: error: initializer 'base' does not name a non-static
data member or base class; did you mean the base class 'Base'?
Derived() : base(),
^~~~
Base
test/FixIt/typo.cpp:42:15: error: initializer 'ember' does not name a non-static
data member or base class; did you mean the member 'member'?
ember() { }
^~~~~
member



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
66a10cbaa65d56b5607e4484f16124e186c419b9 31-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Typo correction for template names, e.g.,

typo.cpp:27:8: error: no template named 'basic_sting' in namespace 'std';
did you mean 'basic_string'?
std::basic_sting<char> b2;
~~~~~^~~~~~~~~~~
basic_string



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bfea239cafdb13256982eb891b151c5c07c1e7a9 31-Dec-2009 Douglas Gregor <dgregor@apple.com> Typo correction for template names, e.g.,

typo.cpp:27:8: error: no template named 'basic_sting' in namespace 'std';
did you mean 'basic_string'?
std::basic_sting<char> b2;
~~~~~^~~~~~~~~~~
basic_string



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d0fd8bfa0dac7de50d82b5ef2d896fc723e1d17a 31-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Let constraint manager inform checkers that some assumption logic has happend.
Add new states for symbolic regions tracked by malloc checker. This enables us
to do malloc checking more accurately. See test case.

Based on Lei Zhang's patch and discussion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
b94b81a9ab46c99b00c7ad28c5e1e212c63fc9ac 31-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Let constraint manager inform checkers that some assumption logic has happend.
Add new states for symbolic regions tracked by malloc checker. This enables us
to do malloc checking more accurately. See test case.

Based on Lei Zhang's patch and discussion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
8b4cf27b95c1cfbe66a3cc5c4ebb8f75a0fc7d90 31-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Implement typo correction for id-expressions, e.g.,

typo.cpp:22:10: error: use of undeclared identifier 'radious'; did
you mean 'radius'?
return radious * pi;
^~~~~~~
radius

This was super-easy, since we already had decent recovery by looking
for names in dependent base classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
bb092bafa984e9fa05136b5cef40fd4374dea0f6 31-Dec-2009 Douglas Gregor <dgregor@apple.com> Implement typo correction for id-expressions, e.g.,

typo.cpp:22:10: error: use of undeclared identifier 'radious'; did
you mean 'radius'?
return radious * pi;
^~~~~~~
radius

This was super-easy, since we already had decent recovery by looking
for names in dependent base classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
9d2a856837a070d01102ec03f9325f895d12f7ed 30-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
f2017d13ebd4a617415d737fa99c7e013b4d5dd9 30-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
b41a2bbe98b693690dca7df2305750e511c81df9 30-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Typo correction for type names when they appear in declarations, e.g., given

tring str2;

we produce the following diagnostic + fix-it:

typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'?
tring str2;
^~~~~
string


To make this really useful, we'll need to introduce typo correction in
many more places (wherever we do name lookup), and implement
declaration-vs-expression heuristics that cope with typos
better. However, for now this will handle the simple cases where we
already get good "unknown type name" diagnostics.

The LookupVisibleDecls functions are intended to be used by code
completion as well as typo correction; that refactoring will happen
later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
546be3c5c000626c8cdf65e32e8ed9b90c424edd 30-Dec-2009 Douglas Gregor <dgregor@apple.com> Typo correction for type names when they appear in declarations, e.g., given

tring str2;

we produce the following diagnostic + fix-it:

typo.cpp:15:1: error: unknown type name 'tring'; did you mean 'string'?
tring str2;
^~~~~
string


To make this really useful, we'll need to introduce typo correction in
many more places (wherever we do name lookup), and implement
declaration-vs-expression heuristics that cope with typos
better. However, for now this will handle the simple cases where we
already get good "unknown type name" diagnostics.

The LookupVisibleDecls functions are intended to be used by code
completion as well as typo correction; that refactoring will happen
later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6d18ae945b0b85054942aaac9ee32011d5b8b34d 30-Dec-2009 Chandler Carruth <chandlerc@gmail.com> More fixes to the handling of CVR-comparisons on array types. Adds a method to
QualType to get CVR-qualifiers through array types, and switches the primary
comparison methods to use it. This may allow simplifying some of the callers of
getUnqualifiedArrayType.

Also fix the normalizing of CV-qualification during template deduction to
normalize through arrays and allow a more qualified deduced array type. This
fixes PR5911.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e724246b9f655801bd96b727daf9dddc44beef4d 30-Dec-2009 Chandler Carruth <chandlerc@gmail.com> More fixes to the handling of CVR-comparisons on array types. Adds a method to
QualType to get CVR-qualifiers through array types, and switches the primary
comparison methods to use it. This may allow simplifying some of the callers of
getUnqualifiedArrayType.

Also fix the normalizing of CV-qualification during template deduction to
normalize through arrays and allow a more qualified deduced array type. This
fixes PR5911.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e6cd706648aa42c1022d30c68e3b77f2a7a68a73 30-Dec-2009 John McCall <rjmccall@apple.com> Typedefs can be redeclared. That seems like something we should record in
the AST lest we run into some crazy canonicalization bug like PR5874.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5126fd0dd92c4ec211c837ee78d5ce59c68dcbd5 30-Dec-2009 John McCall <rjmccall@apple.com> Typedefs can be redeclared. That seems like something we should record in
the AST lest we run into some crazy canonicalization bug like PR5874.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
26f205b92434a4f2d857d2266f80e532981cd2dc 30-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make sure to explicitly pass type/value dependence to Expr constructor. This
caught several cases where we were not doing the right thing. I'm
not completely sure all cases are being handled correctly, but this should
be an improvement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
2333f7727f97018d6742e1e0938133bcfad967ab 30-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make sure to explicitly pass type/value dependence to Expr constructor. This
caught several cases where we were not doing the right thing. I'm
not completely sure all cases are being handled correctly, but this should
be an improvement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
8f36583a712cf7f8dd6d88712739572c4642629e 29-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Correctly refer to element CVR qualifications when determining if a type is
more or less cv-qualified than another during implicit conversion and overload
resolution ([basic.type.qualifier] p5). Factors the logic out of template
deduction and into the ASTContext so it can be shared.

This fixes several aspects of PR5542, but not all of them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
28e318cc6008c2bc008f0caee70dc736a03d6289 29-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Correctly refer to element CVR qualifications when determining if a type is
more or less cv-qualified than another during implicit conversion and overload
resolution ([basic.type.qualifier] p5). Factors the logic out of template
deduction and into the ASTContext so it can be shared.

This fixes several aspects of PR5542, but not all of them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
79f414435ef406f9fb3dc7733b93715ac6313425 29-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of FixedWidthIntType, as suggested by Chris and Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
f5f7d864f5067d1ea4bff7fcf41b53a43b7b48ba 29-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of FixedWidthIntType, as suggested by Chris and Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
5f6b9aa32e5e3038caa5cebbfbb9fb6861bebc00 28-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Adjust indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92205 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
2d3dfd70eee48005f253b72d288e0eb4ed754fe0 28-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Adjust indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92205 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
48b6ae35216b660d09f5f31e7e03cdd5613d5539 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Make sure operator new[] and operator delete[] match. This will hopefully silence 3 remaining MSVC warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0235d1510d0677b26f2d0448694e5e3e8a1ee043 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Make sure operator new[] and operator delete[] match. This will hopefully silence 3 remaining MSVC warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
480622ffee581a2915378aa97f2cd8f1af66b639 24-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Egregious, disgusting workaround for PR5866. We need to rework how we
keep track of friends within templates, which will provide a real for
PR5866. For now, this makes sure we don't do something entirely stupid
with friends of specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
7557a1348d2821dce126a778aa7acd7a00b814fd 24-Dec-2009 Douglas Gregor <dgregor@apple.com> Egregious, disgusting workaround for PR5866. We need to rework how we
keep track of friends within templates, which will provide a real for
PR5866. For now, this makes sure we don't do something entirely stupid
with friends of specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e4d072c96b52a58a0f118e29bb31379aa388641d 24-Dec-2009 John McCall <rjmccall@apple.com> Tweak the text of several main() diagnostics and punch a hole specifically for
Darwin's sekrit fourth argument. This should probably be factored to
let targets make target-specific decisions about what main() should look like.

Fixes rdar://problem/7414990
or if different platforms have radically different ideas of what they want in



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6675586c70945fdd71911d96f83324788b93edd4 24-Dec-2009 John McCall <rjmccall@apple.com> Tweak the text of several main() diagnostics and punch a hole specifically for
Darwin's sekrit fourth argument. This should probably be factored to
let targets make target-specific decisions about what main() should look like.

Fixes rdar://problem/7414990
or if different platforms have radically different ideas of what they want in



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b1459dbc72261bf9df555e143f24635a4a6a75bc 24-Dec-2009 John McCall <rjmccall@apple.com> Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Lex/LiteralSupport.h
94c939dc1d4958b62ea5a89294dd8b2905f3191f 24-Dec-2009 John McCall <rjmccall@apple.com> Diagnose out-of-bounds floating-point constants. Fixes rdar://problem/6974641



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Lex/LiteralSupport.h
cfaf8bb9f360856d5b90f3d2b84328fd6a58d5f7 24-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> As Ted suggested, record the callsite information with the StackFrameContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
62d399e1880aacd9dc494fce374245b0da915ada 24-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> As Ted suggested, record the callsite information with the StackFrameContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
2edf859e96eceb3774acada200b689fb60e185cb 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Enhance dataflow analyses to recognize branch statements in the CFG used as hooks for the initialization of condition variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
bfbcefb7e99905218b3f0a895b7bc1992203123b 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Enhance dataflow analyses to recognize branch statements in the CFG used as hooks for the initialization of condition variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
13e9f2c45f23062fb42bf1d5198702ac75e1034f 24-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Inter-procedural analysis: now we can return from the callee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
598278bee8e5797bc73d24d6ac8a1d6ff6413cae 24-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Inter-procedural analysis: now we can return from the callee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
75e8c707255745e44fb2da09feebeeaa5442fa72 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Fix bug I just introduced in ForStmt::child_end() where we could iterate off into garbage values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
6281213d87e71b76f64c4ca62fbe7a97f18ae0a0 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Fix bug I just introduced in ForStmt::child_end() where we could iterate off into garbage values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d3fff74aff2196ffc8149c0cd284b0de76aec623 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Coelesce 'DoDestroy()' methods in Stmt.cpp, and modify the child_iterator returned by ForStmt to include the initializer of the condition variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
f0d975f25b1d71612fcbd58ce8abbbc4532c6bb5 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Coelesce 'DoDestroy()' methods in Stmt.cpp, and modify the child_iterator returned by ForStmt to include the initializer of the condition variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
40d9c798afe5da69537f8a2967a6ed3861d105e3 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Modify WhileStmt::child_begin()/child_end() to include the initializer for the condition variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7d02b8c3be58676a03046eef9d056063e55ada3e 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Modify WhileStmt::child_begin()/child_end() to include the initializer for the condition variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7c087b1efd1375088e9a89c8847ea5503647e184 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Teach GRExprEngine to handle the initialization of the condition variable of a SwitchStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
fcfb503c280ed8c66d428fed911b2846c0f434fc 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Teach GRExprEngine to handle the initialization of the condition variable of a SwitchStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
30c9e46fd571f58d42ba8060ec5376318bf109ea 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Add StmtIterator support for iterating over both the condition
variable initializer and the other expressions in an IfStmt.

This change required adding a 'DoDestroy()' method for IfStmt that did
not include destroying the initializer (since that is owned by the
VarDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
35628d1f17c817f8c240208db7ba490e3109981b 24-Dec-2009 Ted Kremenek <kremenek@apple.com> Add StmtIterator support for iterating over both the condition
variable initializer and the other expressions in an IfStmt.

This change required adding a 'DoDestroy()' method for IfStmt that did
not include destroying the initializer (since that is owned by the
VarDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
74ad412c8f5727a8108c46b25b7675e7005ecfbb 24-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> When we see a CXXDefaultArgExpr during template instantiation, rebuild
the default argument so that we're sure to mark any referenced
declarations. This gets us another little step closer to fixing
PR5810.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
036aed18662e0193aafe0e8ae13d2e57efe6df25 24-Dec-2009 Douglas Gregor <dgregor@apple.com> When we see a CXXDefaultArgExpr during template instantiation, rebuild
the default argument so that we're sure to mark any referenced
declarations. This gets us another little step closer to fixing
PR5810.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
67d5907ec238ceb55cdbd00895b92887bda91b63 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Increase StmtIterator size by one pointer (separating out the Stmt** from the union including Decl* and Decl**).
This change is setup for adding StmtIterator support for condition variables in IfStmt, WhileStmt, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
b03f630a5d4256220ac48a6f04b765c34c9e8993 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Increase StmtIterator size by one pointer (separating out the Stmt** from the union including Decl* and Decl**).
This change is setup for adding StmtIterator support for condition variables in IfStmt, WhileStmt, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
8a60ea384dab832a2f8a2eb89f3304c6612409fe 23-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose the use of incomplete types in C++ typeid expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
765ccba920269eefbf572ec4bcd6ac7b6e9f9f77 23-Dec-2009 Douglas Gregor <dgregor@apple.com> Diagnose the use of incomplete types in C++ typeid expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
288c8ebe1c37e1a80f893b0781a1b257061cb397 23-Dec-2009 Chris Lattner <sabre@nondot.org> update comments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
4718e67ca9018342483dccb40d43e339101ac386 23-Dec-2009 Chris Lattner <sabre@nondot.org> update comments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
9aa086ec7df90f7c4b5427aecb6455de6448dc7d 23-Dec-2009 Chris Lattner <sabre@nondot.org> switch -Werror/-Wfatal-errors error conditions to use diagnostics instead
of printf, patch by Christian Adaker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
a3b089e062133bdc0e5c39ea03f8b78230953f6c 23-Dec-2009 Chris Lattner <sabre@nondot.org> switch -Werror/-Wfatal-errors error conditions to use diagnostics instead
of printf, patch by Christian Adaker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
918683ef98bf33c9526bacea7ca860cfc34589b3 23-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> When using a default function argument for a function template (or
member function thereof), perform the template instantiation each time
the default argument is needed. This ensures that
(1) We get different CXXTemporary objects for each instantiation, and
(2) Any other instantiations or definitions triggered by the
instantiation of the default argument expression are guaranteed to
happen; previously, they might have been suppressed, e.g., because
they happened in an unevaluated context.

This fixes the majority of PR5810. However, it does not address the
problem where we may have multiple uses of the same CXXTemporary
within an expression when the temporary came from a non-instantiated
default argument expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
65222e82d97af2120b3952d19cbd3cd923f4b43e 23-Dec-2009 Douglas Gregor <dgregor@apple.com> When using a default function argument for a function template (or
member function thereof), perform the template instantiation each time
the default argument is needed. This ensures that
(1) We get different CXXTemporary objects for each instantiation, and
(2) Any other instantiations or definitions triggered by the
instantiation of the default argument expression are guaranteed to
happen; previously, they might have been suppressed, e.g., because
they happened in an unevaluated context.

This fixes the majority of PR5810. However, it does not address the
problem where we may have multiple uses of the same CXXTemporary
within an expression when the temporary came from a non-instantiated
default argument expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
5928e6d3037bf9dbc1716ebc8344413858d2795f 23-Dec-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove RewriteBlocks. It has been superseded by RewriteObjC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
49ac8e63a0622ce049e58decab9e844b1e8c7ecd 23-Dec-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove RewriteBlocks. It has been superseded by RewriteObjC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/ASTConsumers.h
lang/Frontend/FrontendActions.h
lang/Frontend/FrontendOptions.h
95f389f39932863f3472a37bea632a180d748682 23-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Don't disable smart pointers, silly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
ab470d1cc259c3d342a9e61ea1742315814abfc5 23-Dec-2009 Douglas Gregor <dgregor@apple.com> Don't disable smart pointers, silly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
32db22fe16b904778c993deca73fca4a3cbdabb9 23-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Fix DISABLE_SMART_POINTERS build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
e1a5c17bffba76d20efa89d1d74e5f44159a67bd 23-Dec-2009 Douglas Gregor <dgregor@apple.com> Fix DISABLE_SMART_POINTERS build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
a48a9f6d615af246eb18b93ccfd11aa087bc1403 23-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Migrate the call inliner to the Checker interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
3ff8481f4be3f30e1082488238d83f78342303e1 23-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Migrate the call inliner to the Checker interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
0e20d24cf8ee04e4eb616534fb09948b51a9aa96 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child expressions (via StmtIterator), as those expressions are owned by the Decls and Types (which are destroyed elsewhere). This fixes a crasher reported in <rdar://problem/7487294>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e7809d49413febf078d0503753987fe9f6061a68 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add 'DeclStmt::DoDestroy()' which doesn't actually recurse over its child expressions (via StmtIterator), as those expressions are owned by the Decls and Types (which are destroyed elsewhere). This fixes a crasher reported in <rdar://problem/7487294>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
6c07b30ca5bdf6416e1177c47f365ca444a42ae5 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add CFG support for the condition variable that can appear in IfStmts in C++ mode.
Add transfer function support in GRExprEngine for IfStmts with initialized condition variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
61dfbecd8e6181b2ba42ffb5feede27a2bab3b8a 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add CFG support for the condition variable that can appear in IfStmts in C++ mode.
Add transfer function support in GRExprEngine for IfStmts with initialized condition variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
51088401ab6d3ffd6420163d51c4545e1be9a96d 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Fix CXXConstructExpr::getSourceRange() to not include the source ranges of CXXDefaultArgExprs when computing its range (since these expressions have no source range, and using them will make the encompassing range invalid).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e383768f7f5d45ca4af0b1c11cbf072de18bce98 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Fix CXXConstructExpr::getSourceRange() to not include the source ranges of CXXDefaultArgExprs when computing its range (since these expressions have no source range, and using them will make the encompassing range invalid).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
bf5d664fbba567d910833938ee01a1e6bf7ad6cf 23-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Remove CharUnits::toString() to eliminate dependence on <string>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
775f2eb49116baeb0c97d2085fac30174e2ebd43 23-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Remove CharUnits::toString() to eliminate dependence on <string>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
cb3998997b6051defab8c1ab833b12fc989d8a10 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add assertion to check for valid source ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
a5083e6ab51b031241152e81457240497ab9bff9 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add assertion to check for valid source ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
bf57c61ad6225876aeee81c68816bf696f10605c 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop ToolChain::getHost()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
1bda434673d3c51a2ba6b412f100ccfcf3e7083f 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop ToolChain::getHost()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
961cde695946e621f3395e88c37aded954411f17 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add basic support for analyzing CastExprs as lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
949bdb43bf370b23a79a37b017e0a0566c0d66e0 23-Dec-2009 Ted Kremenek <kremenek@apple.com> Add basic support for analyzing CastExprs as lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
8ebca3f26aaac8de84c4a3092d07dd0d90d40f52 23-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> warn when attribute warn_unused_result is applied to void functions.
while at it, remove an outdated FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f857798fa77ac50c6d0a262d96ad6176187190e3 23-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> warn when attribute warn_unused_result is applied to void functions.
while at it, remove an outdated FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
86d7ba180bf61e7cbeac3910ae8065e3cfadb34c 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: When linking, don't warn about unused arguments which are obviously only
used during compilation.
- There is no easy way to define this group properly, unfortunately, and maybe
this is a losing strategy. For now this is unambiguous more friendly, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f3601388f234f70778e3023018dfe57b64cf4043 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: When linking, don't warn about unused arguments which are obviously only
used during compilation.
- There is no easy way to define this group properly, unfortunately, and maybe
this is a losing strategy. For now this is unambiguous more friendly, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
93e4192cb38df5789b0a531c916d6a5cd5d09ca9 23-Dec-2009 Chris Lattner <sabre@nondot.org> implement -W[no-]fatal-errors, patch by Christian Adåker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
e663c720063fc9ff9f75bcbe38cd070c73c78b0e 23-Dec-2009 Chris Lattner <sabre@nondot.org> implement -W[no-]fatal-errors, patch by Christian Adåker!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
6b5e63e8fc7e056fe9eb4c74d52f9f932e3f788c 22-Dec-2009 Chris Lattner <sabre@nondot.org> accept -Wcomments as an alias for -Wcomment, PR5855


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
aae57c21de274984e145c95500b3d9bf4370543c 22-Dec-2009 Chris Lattner <sabre@nondot.org> accept -Wcomments as an alias for -Wcomment, PR5855


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
3c3ae1bef092924a9ea3bef0efa7627199c48c0a 22-Dec-2009 Ted Kremenek <kremenek@apple.com> Add transfer functions support for visiting an Objective-C message expression as an lvalue when the return type is a C++ reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/GRExprEngine.h
38ac4f504bf8ed514520b5a82be538bdb0860687 22-Dec-2009 Ted Kremenek <kremenek@apple.com> Add transfer functions support for visiting an Objective-C message expression as an lvalue when the return type is a C++ reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/GRExprEngine.h
d2d3b515609587914cd5afc33c899b73492014d2 22-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
avoid #including CharUnits.h in ASTContext.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bdc601b196c48d4cd56a5ceb45d41ae4e87371ab 22-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
avoid #including CharUnits.h in ASTContext.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a04f5dcaba86eebe768972ad02fb42f5be685365 22-Dec-2009 John McCall <rjmccall@apple.com> Stop diagnosing the use of inner classes as friends. ddunbar asked whether
this was useful, and on review Doug and I decided it was probably on the level
of a bug in the standard and therefore not worth a warning even in -pedantic.
If someone disagrees and urgently wants clang++ to warn about this in strict
c++98 mode, we can talk about it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a236a5584732c7c285316d7608168f771fac2059 22-Dec-2009 John McCall <rjmccall@apple.com> Stop diagnosing the use of inner classes as friends. ddunbar asked whether
this was useful, and on review Doug and I decided it was probably on the level
of a bug in the standard and therefore not worth a warning even in -pedantic.
If someone disagrees and urgently wants clang++ to warn about this in strict
c++98 mode, we can talk about it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b94a110b0e81aad5bb0156e4bf55eed7adc9ff56 22-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9e9199d8649cf3e10c98a69403f05dbb666d8fb1 22-Dec-2009 Douglas Gregor <dgregor@apple.com> Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
96be2a493357b8172c880889a22d28dfdd0d1c78 22-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
- Correctly is in quotes, because we are following what I interpreted as GCC's
intent (which diverges from practice, naturally).
- Also, fix the arch define for arm1136jf-s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
a91320b8af7143f7af4c0665ffa62a3b244c0bd9 22-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
- Correctly is in quotes, because we are following what I interpreted as GCC's
intent (which diverges from practice, naturally).
- Also, fix the arch define for arm1136jf-s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f50ccbfbe65f0aa666e446aea4f9e55792c6465d 22-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> When a template-id refers to a single function template, and the
explicitly-specified template arguments are enough to determine the
instantiation, and either template argument deduction fails or is not
performed in that context, we can resolve the template-id down to a
function template specialization (so sayeth C++0x
[temp.arg.explicit]p3). Fixes PR5811.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4b52e25f3b05ab0f9d2492276a52323a50a84fb7 22-Dec-2009 Douglas Gregor <dgregor@apple.com> When a template-id refers to a single function template, and the
explicitly-specified template arguments are enough to determine the
instantiation, and either template argument deduction fails or is not
performed in that context, we can resolve the template-id down to a
function template specialization (so sayeth C++0x
[temp.arg.explicit]p3). Fixes PR5811.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eed574461aebce1416058a75edc3a35ceb9dfbac 21-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ToolChain::getDriver() and use it instead of going through the HostInfo
object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
ee788e70fcd0adf76103b17c78ac658d4ea30c9b 21-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ToolChain::getDriver() and use it instead of going through the HostInfo
object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
86a7c7a112be801d31dd8a3989f5f0f8f731ab5d 21-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> fix PR4010: add support for the warn_unused_result for function pointers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d20254f2875d0004c57ee766f258dbcee29f4841 21-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> fix PR4010: add support for the warn_unused_result for function pointers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a7a09e24bee9060b6c7ed975b8bad2491f8d2c3b 20-Dec-2009 John McCall <rjmccall@apple.com> Don't inject the class name until that magical lbrace.

Because of the rules of base-class lookup* and the restrictions on typedefs, it
was actually impossible for this to cause any problems more serious than the
spurious acceptance of
template <class T> class A : B<A> { ... };
instead of
template <class T> class A : B<A<T> > { ... };
but I'm sure we can all agree that that is a very important restriction which
is well worth making another Parser->Sema call for.

(*) n.b. clang++ does not implement these rules correctly; we are not ignoring
non-type names



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f9368159334ff86ea5fa367225c1a580977f3b03 20-Dec-2009 John McCall <rjmccall@apple.com> Don't inject the class name until that magical lbrace.

Because of the rules of base-class lookup* and the restrictions on typedefs, it
was actually impossible for this to cause any problems more serious than the
spurious acceptance of
template <class T> class A : B<A> { ... };
instead of
template <class T> class A : B<A<T> > { ... };
but I'm sure we can all agree that that is a very important restriction which
is well worth making another Parser->Sema call for.

(*) n.b. clang++ does not implement these rules correctly; we are not ignoring
non-type names



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1801ef5d2d7c415b6b0efde7c4d79317cb72c905 19-Dec-2009 John McCall <rjmccall@apple.com> Parse base specifiers within the scope of the class. This is possibly not
quite right; I'll come back to it later. It does fix PR 5741.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
bd0dfa5c37d422427080a0ae3af9b63e70e6e854 19-Dec-2009 John McCall <rjmccall@apple.com> Parse base specifiers within the scope of the class. This is possibly not
quite right; I'll come back to it later. It does fix PR 5741.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
9275674dd96cfa6dd24932f0a08d50feef883bcd 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove another ';' after method definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
6ecc0b5000e9efac2e677dc4dff80b5dbf3a4a4a 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove another ';' after method definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/UninitializedValues.h
917c9e1d36105d8b37c8029b15d1e18dd90c17ad 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove ';' after method definition. Noticed by clang++, which one would think
would have a higher respect for its own code. This is getting old, is this
warning really adding value?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/TemplateBase.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Parse/Action.h
7177dee8aee4b432911c91f1b788963bec0cac9f 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove ';' after method definition. Noticed by clang++, which one would think
would have a higher respect for its own code. This is getting old, is this
warning really adding value?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/TemplateBase.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Parse/Action.h
ab37872411b5ac0f98530d546a804db2f69dc437 19-Dec-2009 John McCall <rjmccall@apple.com> Refactor to remove more dependencies on PreDeclaratorDC. I seem to have made
the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can
live with that; they'll need to be fixed more holistically anyhow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
7a1dc562d4ad59237ed9fe7e8cef56f9eaa7a26c 19-Dec-2009 John McCall <rjmccall@apple.com> Refactor to remove more dependencies on PreDeclaratorDC. I seem to have made
the redeclaration problems in the [temp.explicit]p3 testcase worse, but I can
live with that; they'll need to be fixed more holistically anyhow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
e9079a2f75a26bfbc424d4b0cef2f7a397874676 19-Dec-2009 Anders Carlsson <andersca@mac.com> Fix tyop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
17ef1660b209f1a2294b9ddee86846c6fd8d5ec0 19-Dec-2009 Anders Carlsson <andersca@mac.com> Fix tyop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91761 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f54e3e1e0b6f00482f2679d6d3329a1712ccabb4 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Some small Builtins.def improvements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
65889f374c75ee2142a8ff8c208ceb8c62b08d12 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Some small Builtins.def improvements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
4f7cd963882f72fd85bf5add260fc6427792d647 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Targets: Allow CreateTargetInfo to mutate the target features.
- In particular, it can claim features for itself instead of always passing them on to LLVM.
- This allows using the target features as a generic mechanism for passing target specific options to the TargetInfo instance, which may need them for initializing preprocessor defines, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
b93292ab7f2b3d43a9e0ad6421f572d1f5a323b4 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Targets: Allow CreateTargetInfo to mutate the target features.
- In particular, it can claim features for itself instead of always passing them on to LLVM.
- This allows using the target features as a generic mechanism for passing target specific options to the TargetInfo instance, which may need them for initializing preprocessor defines, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
412ae80abd3a8b2d805d36746d6a85b01044cdde 19-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Switch more of Sema::CheckInitializerTypes over to
InitializationSequence. Specially, switch initialization of a C++
class type (either copy- or direct-initialization).

Also, make sure that we create an elidable copy-construction when
performing copy initialization of a C++ class variable. Fixes PR5826.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7abfbdbc97ad8e7f340789f751df1e32b10118b4 19-Dec-2009 Douglas Gregor <dgregor@apple.com> Switch more of Sema::CheckInitializerTypes over to
InitializationSequence. Specially, switch initialization of a C++
class type (either copy- or direct-initialization).

Also, make sure that we create an elidable copy-construction when
performing copy initialization of a C++ class variable. Fixes PR5826.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ce30d59346b391749cead26ef459613c350c14df 19-Dec-2009 Anders Carlsson <andersca@mac.com> Correctly initialize the PrimaryBaseInfo if a base is null. Fixes PR5832.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
29f1a6070ac35fcbea9241c843df7f3f7c5c3228 19-Dec-2009 Anders Carlsson <andersca@mac.com> Correctly initialize the PrimaryBaseInfo if a base is null. Fixes PR5832.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
aa38e98236bd7cf9df78d68b86a2d408ced4792e 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Add and tidy doxygen comments and move implementation of toString() to newly
created CharUnits.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
c3c90b25cf321d851314f0f19f67e9a00df0da0d 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Add and tidy doxygen comments and move implementation of toString() to newly
created CharUnits.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
4152c0cbdd7437911de1a131c6c09dfbf30e4215 18-Dec-2009 Ted Kremenek <kremenek@apple.com> Enhance GRExprEngine::VisitCallExpr() to be used in an lvalue context. Uncovered a new failing test case along the way, but we're making progress on handling C++ references in the analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
53287518f69b8f06f82a6cdbd13e4e3a13b58186 18-Dec-2009 Ted Kremenek <kremenek@apple.com> Enhance GRExprEngine::VisitCallExpr() to be used in an lvalue context. Uncovered a new failing test case along the way, but we're making progress on handling C++ references in the analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c06b4882497a2127bc9f2d204951f29435103224 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Use System/DataTypes.h, stdint.h isn't portable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
5231eaa5f58c49860d5446d5269685cd9c063ccb 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Use System/DataTypes.h, stdint.h isn't portable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
e376d017de3b00926d3c2163e5d8278655ef6d8e 18-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Extend code-completion results with the type of each result

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91702 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aa 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Extend code-completion results with the type of each result

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91702 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
33b4075302ac1cfe46a55330bf915a131346ccd8 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Fix predefines (__ARM_ARCH_..., __REGISTER_PREFIX).
- This should be done leveraging the backend, but I'm a little refactored
out. I'll fix it one day, I promise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/TargetInfo.h
eac7c53f16bc12bcd9baac756b6f9bb77b74b0ad 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Fix predefines (__ARM_ARCH_..., __REGISTER_PREFIX).
- This should be done leveraging the backend, but I'm a little refactored
out. I'll fix it one day, I promise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/TargetInfo.h
ad33ad3e3281db61391fdec70b93165e4d721c6a 18-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Change clang_codeComplete API to return the results in a structure on
the heap, so that clients are not forced to copy the results during
the initial iteration. A separate clang_disposeCodeCompleteResults
function frees the returned results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91690 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ec6762c709726bf2ee5f76c21df81e71a56e6f81 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Change clang_codeComplete API to return the results in a structure on
the heap, so that clients are not forced to copy the results during
the initial iteration. A separate clang_disposeCodeCompleteResults
function frees the returned results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91690 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
85246b1219cf9ebc357874c81a1c84263b82288a 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to the
new opaque value type, CharUnits. This will help us avoid accidentally mixing
quantities that are in bit and character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4273f7068f16863f2469b45a3f00c3b4217bdbb4 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to the
new opaque value type, CharUnits. This will help us avoid accidentally mixing
quantities that are in bit and character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3294366fb304e88e780aa86c78594f4978e4a16f 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()
and getTypeSizeInChars() to reflect their basis in character type units, not
that of a possibly independent architecture-specific byte.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
cc906ef220c9be2644ad942457766d46a0b3651e 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()
and getTypeSizeInChars() to reflect their basis in character type units, not
that of a possibly independent architecture-specific byte.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b82f552c63f8476d771f3bad90ca1b2c33ebc9bf 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Initial implementation of CharUnits, an opaque value class for representing
sizes, offsets, and alignments in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
64437137888d69b8ef03f3057524e5056e7d9dd6 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Initial implementation of CharUnits, an opaque value class for representing
sizes, offsets, and alignments in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CharUnits.h
e17d54c995fd5e43e7639ad9a3edb44b30579c30 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
38b48afd338d494099697d2611e1f45e558e469e 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
ccfe15ea60d055936a15b370765006c10c25d81a 18-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Switch the initialization required by return statements over to the
new InitializationSequence. This fixes some bugs (e.g., PR5808),
changed some diagnostics, and caused more churn than expected. What's
new:

- InitializationSequence now has a "C conversion sequence" category
and step kind, which falls back to
- Changed the diagnostics for returns to always have the result type
of the function first and the type of the expression second.
CheckSingleAssignmentConstraints to peform checking in C.
- Improved ASTs for initialization of return values. The ASTs now
capture all of the temporaries we need to create, but
intentionally do not bind the tempoary that is actually returned,
so that it won't get destroyed twice.
- Make sure to perform an (elidable!) copy of the class object that
is returned from a class.
- Fix copy elision in CodeGen to properly see through the
subexpressions that occur with elidable copies.
- Give "new" its own entity kind; as with return values and thrown
objects, we don't bind the expression so we don't call a
destructor for it.

Note that, with this patch, I've broken returning move-only types in
C++0x. We'll fix it later, when we tackle NRVO.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
18ef5e28a9a2677f8b1dce1fb2638d66e0a1621f 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Switch the initialization required by return statements over to the
new InitializationSequence. This fixes some bugs (e.g., PR5808),
changed some diagnostics, and caused more churn than expected. What's
new:

- InitializationSequence now has a "C conversion sequence" category
and step kind, which falls back to
- Changed the diagnostics for returns to always have the result type
of the function first and the type of the expression second.
CheckSingleAssignmentConstraints to peform checking in C.
- Improved ASTs for initialization of return values. The ASTs now
capture all of the temporaries we need to create, but
intentionally do not bind the tempoary that is actually returned,
so that it won't get destroyed twice.
- Make sure to perform an (elidable!) copy of the class object that
is returned from a class.
- Fix copy elision in CodeGen to properly see through the
subexpressions that occur with elidable copies.
- Give "new" its own entity kind; as with return values and thrown
objects, we don't bind the expression so we don't call a
destructor for it.

Note that, with this patch, I've broken returning move-only types in
C++0x. We'll fix it later, when we tackle NRVO.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e9756514b410b0ac5afa00cdb4569e1f62f4a7f4 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
to compile a translation unit into the debug info for that file.
- Used by parts of Darwin build process to check compiler flags, etc.
- <rdar://problem/7256886> clang does not emit AT_APPLE_flags

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
f2d8b9f967a1ab53ee9fdbcc3ac0a4ee0a83a26e 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
to compile a translation unit into the debug info for that file.
- Used by parts of Darwin build process to check compiler flags, etc.
- <rdar://problem/7256886> clang does not emit AT_APPLE_flags

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
lang/Driver/ToolChain.h
393dc0a3b0f9137d55ce2af036bf7d844509bd0b 17-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> reword the help text of fno_assume_sane_operator_new, following Chris suggestion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
99860173af0b070f93558c26b78bb7ac07820370 17-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> reword the help text of fno_assume_sane_operator_new, following Chris suggestion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
78d7c2f5d1fb0c6c34beba1899a83fa45e34796c 17-Dec-2009 Ted Kremenek <kremenek@apple.com> Convert GRExprEngine::VisitCallExpr() to use a worklist instead of recursion to evaluate the arguments of a CallExpr. This simplifies the logic and makes it easier to read. (it also avoids any issues with blowing out the stack if the CallExpr had a ridiculous number of arguments)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
3cead901aab394fe8e84953235959ece8002854f 17-Dec-2009 Ted Kremenek <kremenek@apple.com> Convert GRExprEngine::VisitCallExpr() to use a worklist instead of recursion to evaluate the arguments of a CallExpr. This simplifies the logic and makes it easier to read. (it also avoids any issues with blowing out the stack if the CallExpr had a ridiculous number of arguments)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
770fd8dcf4381c0360f52c7db9244626657028a2 17-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> implement PR3962: diagnose more faulty cases of usage of the restrict qualifier. this also removes a FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0a8bab019dbf980911fbefa56d7debd648b7b239 17-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> implement PR3962: diagnose more faulty cases of usage of the restrict qualifier. this also removes a FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8885baa2de9811545e881488d38759942b8e7088 17-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Include <time.h> in order to use 'time_t'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91597 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3d31560343856c573376a04558a7111e7afad4f7 17-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Include <time.h> in order to use 'time_t'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91597 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
38bbd5449aed51d8bcd9eb6c0effbc360af2f7fd 17-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose duplicate declaration of a property. Fixes
PR5809


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6dd30fc45af6bdee05a735d9817b6d9c72cdce35 17-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose duplicate declaration of a property. Fixes
PR5809


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ed14e87ed8e5e9f8b78e9dce7015ec09e1f7774d 17-Dec-2009 Ted Kremenek <kremenek@apple.com> Completely remove ObjCObjectRegion (tests pass this time).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
c410d4d2bb2de2c186fb48857e99e7809e780081 17-Dec-2009 Ted Kremenek <kremenek@apple.com> Completely remove ObjCObjectRegion (tests pass this time).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
f33eac538f44f01d3462bf6fb7c0891c80b42311 16-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix -fdollars-in-identifiers Clang translation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
8663b180085e9bc7a0a87c80cc3f722efef99e79 16-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix -fdollars-in-identifiers Clang translation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
158df1c7b4604fbde219753ec23cd931ca1612f7 16-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> When value-initializing a class with no user-defined constructors but
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
16006c901315fa12a108b4e571f187f4b676e426 16-Dec-2009 Douglas Gregor <dgregor@apple.com> When value-initializing a class with no user-defined constructors but
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
87eabddeb17746908be6f8b202b6ca5e95b09a4a 16-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose property of reference type as unsupported
instead of crashing for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dd69aae2851577e4266b62f3430a1fce757b65ae 16-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose property of reference type as unsupported
instead of crashing for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2186f97cb2706eb3bf26b0f5c943e228e4055593 16-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators.

feel free to chage the name to this lengthy argument

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
fc2844846e91398205fddc71196fe9dda04e105f 16-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators.

feel free to chage the name to this lengthy argument

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
bc9012ac0bf35e1ba8c9aa1068fb60e44fdedb9a 16-Dec-2009 John McCall <rjmccall@apple.com> Shift things around so that it's easier to recover from a missing
function in a C++ call using an arbitrary call-expression type.
Actually exploit this to fix the recovery implemented earlier.

The diagnostic is still iffy, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3b4294e5c1e904a2e0f74449dbc3f52f69cc8e9f 16-Dec-2009 John McCall <rjmccall@apple.com> Shift things around so that it's easier to recover from a missing
function in a C++ call using an arbitrary call-expression type.
Actually exploit this to fix the recovery implemented earlier.

The diagnostic is still iffy, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4b6b478c90cba52c7d9b130d53c462c6fa8df456 16-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a new kind of region: CXXObjectRegion. Currently it has only one
attribute: the object type.
Add initial support for visiting CXXThisExpr.
Fix a bunch of 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
bb141217871e93767aa3f2de1b9946fa6d37066a 16-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a new kind of region: CXXObjectRegion. Currently it has only one
attribute: the object type.
Add initial support for visiting CXXThisExpr.
Fix a bunch of 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
8b29f57d867495ace41cda6a06013f05961c68ca 16-Dec-2009 John McCall <rjmccall@apple.com> Introduce a centralized routine in Sema for diagnosing failed lookups (when
used as expressions). In dependent contexts, try to recover by doing a lookup
in previously-dependent base classes. We get better diagnostics out, but
unfortunately the recovery fails: we need to turn it into a method call
expression, not a bare call expression. Thus this is still a WIP.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
578b69b186d9cba0a6ae1dd7f4c04cd6a49f0aac 16-Dec-2009 John McCall <rjmccall@apple.com> Introduce a centralized routine in Sema for diagnosing failed lookups (when
used as expressions). In dependent contexts, try to recover by doing a lookup
in previously-dependent base classes. We get better diagnostics out, but
unfortunately the recovery fails: we need to turn it into a method call
expression, not a bare call expression. Thus this is still a WIP.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6e040fd9b766a34f0fcf1fd7e4da3daedf61aae3 16-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
3eda63a2e95a4b6c494ec563a5a174cf8c2b6c86 16-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
4165885d9dd560330d51983c28f1c2a88649c30d 16-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Add abort() as a builtin. This has two effects: one, we warn for incorrect
declarations of abort(), and two, we mark it noreturn. Missing the latter
shows up in one of the "embarassing" tests (from the thread on llvmdev
"detailed comparison of generated code size for LLVM and other compilers").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
772494c3b8f0c7c80484d0fef5b20cf4e445a8e2 16-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Add abort() as a builtin. This has two effects: one, we warn for incorrect
declarations of abort(), and two, we mark it noreturn. Missing the latter
shows up in one of the "embarassing" tests (from the thread on llvmdev
"detailed comparison of generated code size for LLVM and other compilers").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
9a8f2ca476f55a6516c972bf2845a786ea616194 16-Dec-2009 Anders Carlsson <andersca@mac.com> More FullExpr work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/FullExpr.h
ac7db1fecfa5dbea890b6b57767d52ac12641352 16-Dec-2009 Anders Carlsson <andersca@mac.com> More FullExpr work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/FullExpr.h
9ee8cfaddbea93d70d7edcbec4c77beee0b8553c 16-Dec-2009 Anders Carlsson <andersca@mac.com> More work on the FullExpr class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/FullExpr.h
d4a0552ea56c934fc7d2072bf61802cafa8cfd13 16-Dec-2009 Anders Carlsson <andersca@mac.com> More work on the FullExpr class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/FullExpr.h
6159b60760b94141aa654eac7e40cde1400d1ffb 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Teach CheckerVisitor about CXXOperatorCallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
6b8ee78873442c2d52ecc8ac344dffa2c2cffbe2 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Teach CheckerVisitor about CXXOperatorCallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
3d680607a09f4159dbbbfccfa30fbabbc89802cb 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Teach CFRecStmtDeclVisitor about CXXMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
1c8008715bc6ad9e7e901540ecf000a3e94a486c 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Teach CFRecStmtDeclVisitor about CXXMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
2914115cceaa8f8a6327594901dfb80fec47dbdf 16-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Make GRSubEngine.h standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRSubEngine.h
3ad359b845b3fe302d765dda5ad879dadcc0b9c4 16-Dec-2009 Douglas Gregor <dgregor@apple.com> Make GRSubEngine.h standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRSubEngine.h
3f1172d26f28f44501d422546566ac29a7c656d0 16-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Fix semantic diagnostics that embed English works, from Nicola Gigante!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6864748fc9a780e6db0bb5a7bd20aa889882dc94 16-Dec-2009 Douglas Gregor <dgregor@apple.com> Fix semantic diagnostics that embed English works, from Nicola Gigante!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4e666bcfd58bbec6b5d31974226ed37266971423 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Add (initial?) static analyzer support for handling C++ references.
This change was a lot bigger than I originally anticipated; among
other things it requires us storing more information in the CFG to
record what block-level expressions need to be evaluated as lvalues.

The big change is that CFGBlocks no longer contain Stmt*'s by
CFGElements. Currently CFGElements just wrap Stmt*, but they also
store a bit indicating whether the block-level expression should be
evalauted as an lvalue. DeclStmts involving the initialization of a
reference require us treating the initialization expression as an
lvalue, even though that information isn't recorded in the AST.
Conceptually this change isn't that complicated, but it required
bubbling up the data through the CFGBuilder, to GRCoreEngine, and
eventually to GRExprEngine.

The addition of CFGElement is also useful for when we want to handle
more control-flow constructs or other data we want to keep in the CFG
that isn't represented well with just a block of statements.

In GRExprEngine, this patch introduces logic for evaluating the
lvalues of references, which currently retrieves the internal "pointer
value" that the reference represents. EvalLoad does a two stage load
to catch null dereferences involving an invalid reference (although
this could possibly be caught earlier during the initialization of a
reference).

Symbols are currently symbolicated using the reference type, instead
of a pointer type, and special handling is required creating
ElementRegions that layer on SymbolicRegions (see the changes to
RegionStoreManager).

Along the way, the DeadStoresChecker also silences warnings involving
dead stores to references. This was the original change I introduced
(which I wrote test cases for) that I realized caused GRExprEngine to
crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/ProgramPoint.h
852274d4257134906995cb252fb3dfd2d71deae8 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Add (initial?) static analyzer support for handling C++ references.
This change was a lot bigger than I originally anticipated; among
other things it requires us storing more information in the CFG to
record what block-level expressions need to be evaluated as lvalues.

The big change is that CFGBlocks no longer contain Stmt*'s by
CFGElements. Currently CFGElements just wrap Stmt*, but they also
store a bit indicating whether the block-level expression should be
evalauted as an lvalue. DeclStmts involving the initialization of a
reference require us treating the initialization expression as an
lvalue, even though that information isn't recorded in the AST.
Conceptually this change isn't that complicated, but it required
bubbling up the data through the CFGBuilder, to GRCoreEngine, and
eventually to GRExprEngine.

The addition of CFGElement is also useful for when we want to handle
more control-flow constructs or other data we want to keep in the CFG
that isn't represented well with just a block of statements.

In GRExprEngine, this patch introduces logic for evaluating the
lvalues of references, which currently retrieves the internal "pointer
value" that the reference represents. EvalLoad does a two stage load
to catch null dereferences involving an invalid reference (although
this could possibly be caught earlier during the initialization of a
reference).

Symbols are currently symbolicated using the reference type, instead
of a pointer type, and special handling is required creating
ElementRegions that layer on SymbolicRegions (see the changes to
RegionStoreManager).

Along the way, the DeadStoresChecker also silences warnings involving
dead stores to references. This was the original change I introduced
(which I wrote test cases for) that I realized caused GRExprEngine to
crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/ProgramPoint.h
10a2b23ef59f4e4de0172a0ebe8ceeb5bb027206 16-Dec-2009 Anders Carlsson <andersca@mac.com> Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action::FullExpr to Action::MakeFullExpr to avoid name clashes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/FullExpr.h
lang/AST/Stmt.h
lang/Parse/Action.h
5ee56e95c3905d2e7bc403631b03865cdbdd8a42 16-Dec-2009 Anders Carlsson <andersca@mac.com> Check in a rudimentary FullExpr class that isn't used anywhere yet. Rename Action::FullExpr to Action::MakeFullExpr to avoid name clashes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/FullExpr.h
lang/AST/Stmt.h
lang/Parse/Action.h
54cd39974f9a8b026851d607f4be60164fee3c2d 16-Dec-2009 John McCall <rjmccall@apple.com> Successive anonymous namespaces name the same scope. I misinterpreted the
standard the last time. Fixes PR5766.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5fdd7643ae81af4ace04f8be888f225b9fcc64b7 16-Dec-2009 John McCall <rjmccall@apple.com> Successive anonymous namespaces name the same scope. I misinterpreted the
standard the last time. Fixes PR5766.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
afe90ebd9ce0079385245d72f893d2da32c3692b 16-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Switch the C++ new expression over to InitializationSequence, rather
than using its own partial implementation of initialization.

Switched CheckInitializerTypes over to
InitializedEntity/InitializationKind, to help move us closer to
InitializationSequence.

Added InitializedEntity::getName() to retrieve the name of the entity,
for diagnostics that care about such things.

Implemented support for default initialization in
InitializationSequence.

Clean up the determination of the "source expressions" for an
initialization sequence in InitializationSequence::Perform.

Taught CXXConstructExpr to store more location information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
99a2e600f9e2e51d3ce10fb6f27191677ac65b2a 16-Dec-2009 Douglas Gregor <dgregor@apple.com> Switch the C++ new expression over to InitializationSequence, rather
than using its own partial implementation of initialization.

Switched CheckInitializerTypes over to
InitializedEntity/InitializationKind, to help move us closer to
InitializationSequence.

Added InitializedEntity::getName() to retrieve the name of the entity,
for diagnostics that care about such things.

Implemented support for default initialization in
InitializationSequence.

Clean up the determination of the "source expressions" for an
initialization sequence in InitializationSequence::Perform.

Taught CXXConstructExpr to store more location information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.td
16640d5b58859b171c052ce26c1b07dffcc702b4 16-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose attempting to assign to a sub-structure of an ivar
using objective-c property. (fixes radar 7449707)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
2514a309204341798f96912ce7a90841bea59727 16-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose attempting to assign to a sub-structure of an ivar
using objective-c property. (fixes radar 7449707)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
3c919b55e4024676b4e5858c4f78ab74330aab0a 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Remove ValueManager::getRegionValueSymbolValOrUnknown(). It was just extra veneer on top of getRegionValueSymbolVal().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
28172a27c0fb69439170aab53127582432e7d5a0 16-Dec-2009 Ted Kremenek <kremenek@apple.com> Remove ValueManager::getRegionValueSymbolValOrUnknown(). It was just extra veneer on top of getRegionValueSymbolVal().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
aa43f81f2f155a0ed8d0c9dfce11eaec516b85a3 15-Dec-2009 Anders Carlsson <andersca@mac.com> ShouldDestroyTemporaries? I don't think so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
0ece491d8f62ce67f047491a6703fac0d3bd4ff4 15-Dec-2009 Anders Carlsson <andersca@mac.com> ShouldDestroyTemporaries? I don't think so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
b057a6b9f0891dc5de5e984bb8769301bee50ad6 15-Dec-2009 Anders Carlsson <andersca@mac.com> If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
337cba4b3e17b98cfa512dfd12e57f4ccb0859be 15-Dec-2009 Anders Carlsson <andersca@mac.com> If a ParmVarDecl's default argument is a CXXExprWithTemporaries, return the underlying expr instead. Add getNumDefaultArgTemporaries and getDefaultArgTemporary which returns the temporaries a default arg creates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
39577075101aa6fa0663e64775ff66ab7763da6f 15-Dec-2009 Nate Begeman <natebegeman@mac.com> Support OpenCL 1.1 odd-length vector component accessors.

For hi/odd of an odd-length vector, the last component is undefined. Since
we shuffle with an undef vector, no CodeGen needs to change to support this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0479a0b9f22331da74df4ea50bce193f9bafb145 15-Dec-2009 Nate Begeman <natebegeman@mac.com> Support OpenCL 1.1 odd-length vector component accessors.

For hi/odd of an odd-length vector, the last component is undefined. Since
we shuffle with an undef vector, no CodeGen needs to change to support this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b49da815d5fc3299dc8e8bbf1886f0a193ad8894 15-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Fix some diagnostic-related FIXMEs, from Nicola Gigante

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5cc07df89ab9afa9079baeec1243ee90c3f84d9d 15-Dec-2009 Douglas Gregor <dgregor@apple.com> Fix some diagnostic-related FIXMEs, from Nicola Gigante

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
48f7fd7894cc17bf9498cbe1ee273d06f8fc2a84 15-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove displayProgress parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
8d09bafdcf870b72e8781279378e7e264499b230 15-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove displayProgress parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
e38592f880f425a6d9ea856a81703522a8ae345b 15-Dec-2009 Chris Lattner <sabre@nondot.org> move isPodLike<clang::QualType> out to Type.h. We don't
want some clients of QualType to think it's a pod and some to
not know it is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeOrdering.h
aed1df80bf64228e1429c1edc408397f9174847c 15-Dec-2009 Chris Lattner <sabre@nondot.org> move isPodLike<clang::QualType> out to Type.h. We don't
want some clients of QualType to think it's a pod and some to
not know it is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeOrdering.h
dbf0031fbbd30144c3ac070baa4f2d0e551a8de9 15-Dec-2009 Chris Lattner <sabre@nondot.org> update to match LLVM API change:

Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/TypeOrdering.h
lang/Analysis/ProgramPoint.h
lang/Basic/IdentifierTable.h
lang/Basic/SourceLocation.h
lang/Frontend/PCHWriter.h
lang/Index/Entity.h
lang/Index/GlobalSelector.h
06159e878569e5f39bf0e8f11b84ac3ad0970597 15-Dec-2009 Chris Lattner <sabre@nondot.org> update to match LLVM API change:

Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/TypeOrdering.h
lang/Analysis/ProgramPoint.h
lang/Basic/IdentifierTable.h
lang/Basic/SourceLocation.h
lang/Frontend/PCHWriter.h
lang/Index/Entity.h
lang/Index/GlobalSelector.h
9165b5ef6fcbdc2832d57e1ad43f75ebd92868f6 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -W[no-]variadic-macros support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
2125adba899ea5fc2e3eeb49028920f774dfd20b 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -W[no-]variadic-macros support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
60b12c5f3d86e912fa0a4ed10fdbdf74af4a3b8b 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Forward -isysroot to clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
feecdf15dc58a5d5e3c77c938b6d5e7deb75d39e 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Forward -isysroot to clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
424284d871025feac9ba4fac208bac30641cce76 15-Dec-2009 John McCall <rjmccall@apple.com> Diagnose the use of typedefs for template specialization types in the scope
specifiers for out-of-line declarations, e.g.
typedef Temp<int> MyTemp;
template <> MyTemp::foo;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4b2b02b26cd51e2e44fa315143618285fd72ce77 15-Dec-2009 John McCall <rjmccall@apple.com> Diagnose the use of typedefs for template specialization types in the scope
specifiers for out-of-line declarations, e.g.
typedef Temp<int> MyTemp;
template <> MyTemp::foo;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
657d2433a41d94fc9552e899514375db309399af 15-Dec-2009 Chris Lattner <sabre@nondot.org> set up the machinery for a MacroArgs cache hanging off Preprocessor.
We creating and free thousands of MacroArgs objects (and the related
std::vectors hanging off them) for the testcase in PR5610 even though
there are only ~20 live at a time. This doesn't actually use the
cache yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
23f77e59718385512984d4e2a021bef52b9f6ddf 15-Dec-2009 Chris Lattner <sabre@nondot.org> set up the machinery for a MacroArgs cache hanging off Preprocessor.
We creating and free thousands of MacroArgs objects (and the related
std::vectors hanging off them) for the testcase in PR5610 even though
there are only ~20 live at a time. This doesn't actually use the
cache yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
b6f0a584301007695651b29834500f971d93e929 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -resource-dir to clang -cc1, this allows the base directory for compiler
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInvocation.h
lang/Frontend/HeaderSearchOptions.h
8b9adfea5e834eaee0f45d8cc7fb052d68df4a46 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -resource-dir to clang -cc1, this allows the base directory for compiler
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/CompilerInvocation.h
lang/Frontend/HeaderSearchOptions.h
ff583e4255851c3937219043280a559e8db2171f 14-Dec-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/7468209> SymbolManager::isLive() should not crash on captured block variables that are passed by reference


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SymbolManager.h
5348f94abd0e9d3945da8d059b55b156967e8ff9 14-Dec-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/7468209> SymbolManager::isLive() should not crash on captured block variables that are passed by reference


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SymbolManager.h
dcbf08f1765a91c8c902d453cd0850188f2638e1 14-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Improve template instantiation for object constructions in several ways:

- During instantiation, drop default arguments from constructor and
call expressions; they'll be recomputed anyway, and we don't want
to instantiate them twice.
- Rewrote the instantiation of variable initializers to cope with
non-dependent forms properly.

Together, these fix a handful of problems I introduced with the switch
to always rebuild expressions from the source code "as written."



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6eef519fc8a97bb7ca6066f23d35e10f06b2c1b5 14-Dec-2009 Douglas Gregor <dgregor@apple.com> Improve template instantiation for object constructions in several ways:

- During instantiation, drop default arguments from constructor and
call expressions; they'll be recomputed anyway, and we don't want
to instantiate them twice.
- Rewrote the instantiation of variable initializers to cope with
non-dependent forms properly.

Together, these fix a handful of problems I introduced with the switch
to always rebuild expressions from the source code "as written."



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
45b5d6f5037dc22d9fd3b4192a8d1195361ea404 14-Dec-2009 Chris Lattner <sabre@nondot.org> teach clang to recover gracefully from conflict markers left in source
files: PR5238.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Lexer.h
34f349da38a7bd99103e12d8ea6c73bc8d025193 14-Dec-2009 Chris Lattner <sabre@nondot.org> teach clang to recover gracefully from conflict markers left in source
files: PR5238.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Lexer.h
4d154df87f43a3d9f464498e218c583fe15f1ce2 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
c3420ffb282c6ffc0192013bf8045b6c21eddece 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
2af4a5e3d32de12b2c7c36ca8256411b3969da8a 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Support x86's PALIGNR instruction without the use of a palignr intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
ce5818a19a8f77d1540d0352649d6687eca4af6b 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Support x86's PALIGNR instruction without the use of a palignr intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
a9bfd7a874fd626324043bbab3cf4a872eace176 14-Dec-2009 Chris Lattner <sabre@nondot.org> formatting changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
1d9c54df56391ac4740db27d551782e81189cb51 14-Dec-2009 Chris Lattner <sabre@nondot.org> formatting changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
21164e4cbcd3ac1f8a80a2dcbebc8e08fc17cf23 14-Dec-2009 Anders Carlsson <andersca@mac.com> Rename dump to dumpDeclContext, so that call RD->dump() won't dump the decl context by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
84834432289a810e713f82f1ed94a99ad8a5c2ea 14-Dec-2009 Anders Carlsson <andersca@mac.com> Rename dump to dumpDeclContext, so that call RD->dump() won't dump the decl context by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
b053bff48230137a33fff2c871a27d72fe2b4bc2 13-Dec-2009 Anders Carlsson <andersca@mac.com> More improvements to checking allocation and deallocation functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
156c78e4ef14e5f7ba251554ea8f2dbec573fef3 13-Dec-2009 Anders Carlsson <andersca@mac.com> More improvements to checking allocation and deallocation functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a510eb928204e0db46c3d5597f98db5057885c02 13-Dec-2009 Daniel Dunbar <daniel@zuster.org> Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
869824e87940f97b87064db2df2861e82e08a8c6 13-Dec-2009 Daniel Dunbar <daniel@zuster.org> Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
c1737ae61e47af3fee9f1c9c4912545b064a2213 13-Dec-2009 Daniel Dunbar <daniel@zuster.org> CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/HeaderSearchOptions.h
1e69fe3a9f0a42b32a3000bda51677d51416564e 13-Dec-2009 Daniel Dunbar <daniel@zuster.org> CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/HeaderSearchOptions.h
00874ad5bb1845b7dfa3d39411ecfc09df321ad7 13-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Silence some release build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
60cfcecaf48e4310339dcfbdb0e3f0e6d2853855 13-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Silence some release build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
e26ac9c9acf105e72a23ebefabfce652f0541db9 12-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Rework the way we handle template instantiation for
implicitly-generated AST nodes. We previously built instantiated nodes
for each of these AST nodes, then passed them on to Sema, which was
not prepared to see already-type-checked nodes (see PR5755). In some
places, we had ugly workarounds to try to avoid re-type-checking
(e.g., in VarDecl initializer instantiation).

Now, we skip implicitly-generated nodes when performing instantiation,
preferring instead to build just the AST nodes that directly reflect
what was written in the source code. This has several advantages:

- We don't need to instantiate anything that doesn't have a direct
correlation to the source code, so we can have better location
information.
- Semantic analysis sees the same thing at template instantiation
time that it would see for a non-template.
- At least one ugly hack (VarDecl initializers) goes away.

Fixes PR5755.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a88cfbfac9bbcbb9858f048d6d73a48711d8e93d 12-Dec-2009 Douglas Gregor <dgregor@apple.com> Rework the way we handle template instantiation for
implicitly-generated AST nodes. We previously built instantiated nodes
for each of these AST nodes, then passed them on to Sema, which was
not prepared to see already-type-checked nodes (see PR5755). In some
places, we had ugly workarounds to try to avoid re-type-checking
(e.g., in VarDecl initializer instantiation).

Now, we skip implicitly-generated nodes when performing instantiation,
preferring instead to build just the AST nodes that directly reflect
what was written in the source code. This has several advantages:

- We don't need to instantiate anything that doesn't have a direct
correlation to the source code, so we can have better location
information.
- Semantic analysis sees the same thing at template instantiation
time that it would see for a non-template.
- At least one ugly hack (VarDecl initializers) goes away.

Fixes PR5755.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
90bb3c80b527a01ce754028bfb1d71b7a02e725b 12-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add initial support for realloc() in MallocChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
d9c84c8381261530b16512d2aac146de8271ea1e 12-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add initial support for realloc() in MallocChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
2f0bd2e89d173e4de8fe7d64a08aa01f97ab7f97 12-Dec-2009 John McCall <rjmccall@apple.com> Remember the type name's scope specifier in the DeclSpec.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
aa87d33309f505b68c3bfc17486c93e4d224b24f 12-Dec-2009 John McCall <rjmccall@apple.com> Remember the type name's scope specifier in the DeclSpec.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
99290a48f55e898ade3a26e558ed8eae5fe17961 12-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Give PartialDiagnostic copy semantics rather than move semantics, since we typically pass it by reference

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
a63d40f85c4621f5ad2362e0d00879933625404b 12-Dec-2009 Douglas Gregor <dgregor@apple.com> Give PartialDiagnostic copy semantics rather than move semantics, since we typically pass it by reference

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
345fdef6e14ec6a5d6570a79e661495511928c64 12-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Remove unnecessary pointers from PartialDiagnostic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
cc5ee6be70278def952fdbe0a3ec2b4ff79b05e8 12-Dec-2009 Douglas Gregor <dgregor@apple.com> Remove unnecessary pointers from PartialDiagnostic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
9d02e7c5fa4e30ceb52a2956c0018ec41a5b6da0 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLocVisitor.h
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLocVisitor.h
669046aad17057d6778610a835f59bc311942f49 12-Dec-2009 Mike Stump <mrs@apple.com> Implement runtime checks for undefined behavior. WIP.

This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:

T a[I];

a[i] abort when i < 0 or i >= I.

Future stuff includes shifts by >= bitwidth amounts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
9c276ae0f24d4cee8f7954069d4b8eae45d0447d 12-Dec-2009 Mike Stump <mrs@apple.com> Implement runtime checks for undefined behavior. WIP.

This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:

T a[I];

a[i] abort when i < 0 or i >= I.

Future stuff includes shifts by >= bitwidth amounts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/CC1Options.td
lang/Driver/Options.td
89ebfafaf5b83ab44fa293ce67729a155a6d5ea8 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove non-sensical FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f86f0d8c9a90acda38c5e80194216d1e227fafee 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove non-sensical FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d67ac076aa2d5921c62174b1b484551a75876bbe 12-Dec-2009 Ted Kremenek <kremenek@apple.com> Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
6feaf57b46f0856127c84b03f3aee5fb51d0262b 12-Dec-2009 Ted Kremenek <kremenek@apple.com> Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
4b779b3b686bbd883b8f9dc5c9eb7c263da58bfc 12-Dec-2009 Anders Carlsson <andersca@mac.com> Factor operator new declaration checking out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a3ccda58913cc1a4b8564e349448b12acc462da7 12-Dec-2009 Anders Carlsson <andersca@mac.com> Factor operator new declaration checking out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a83e8005e94b71d84046ba1941fd56d7e1ee484a 12-Dec-2009 Anders Carlsson <andersca@mac.com> More work on improving the operator delete diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
46991d63642c5a29f62d8b92456f62b0fe564fd0 12-Dec-2009 Anders Carlsson <andersca@mac.com> More work on improving the operator delete diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2af481dc4abb92b99f655264582aa2ff86170385 12-Dec-2009 Anders Carlsson <andersca@mac.com> Improve diagnostics for malformed delete operator function declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/Basic/DiagnosticSemaKinds.td
9d59ecb4d2c2e8efdb214589753826b662246d82 12-Dec-2009 Anders Carlsson <andersca@mac.com> Improve diagnostics for malformed delete operator function declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/Basic/DiagnosticSemaKinds.td
45331ad5d7bec63a995a5ecd7e27fdc3f3aee6ff 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
dd63b28107f21692b5065588f0e90b4534946f93 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
8ddaa225883899ec9034d19bf9bba40ffed3bdba 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using "clang" "-cc1" instead of "clang-cc".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
8ff5b28d6efcffe2251e77634c7edf83a4763344 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using "clang" "-cc1" instead of "clang-cc".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
eb264b1e729713043c0921ef84559dac75af9fdc 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow C-style cast from 'void *' to block pointer type.
(fixes radar 7465023).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3b27f1a80e4e433b503efd344c909eeafaa9033c 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow C-style cast from 'void *' to block pointer type.
(fixes radar 7465023).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9231e43928c9ffe90466b88930e212140b288e55 11-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Switch PathDiagnostic to StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
d8e494faa9f4bc13cd0a136b4d1ee1cfd52860ea 11-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Switch PathDiagnostic to StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
9470ef038a5eb425297c353cf0ad9d74f7eb9910 11-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix two typos.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
8294809ff278bd8e1979d547d89af3f628139e7d 11-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix two typos.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
0a09a2d30fc18d8cf622140f1fc7b8d197373b5d 11-Dec-2009 John McCall <rjmccall@apple.com> Don't enter a new scope for a namespace-qualified declarator unless we're
in a file context. In well-formed code, only happens with friend functions.
Fixes PR 5760.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e7e278bce2301990107cef3f873cbbf7da94469a 11-Dec-2009 John McCall <rjmccall@apple.com> Don't enter a new scope for a namespace-qualified declarator unless we're
in a file context. In well-formed code, only happens with friend functions.
Fixes PR 5760.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b9bfc6676906c75287b353ee529a8b9e41a4b1a7 11-Dec-2009 Ted Kremenek <kremenek@apple.com> Enhance understanding of VarRegions referenced by a block whose declarations are outside the current stack frame. Fixes <rdar://problem/7462324>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/MemRegion.h
2b87ae45e129b941d0a4d221c9d4842385a119bd 11-Dec-2009 Ted Kremenek <kremenek@apple.com> Enhance understanding of VarRegions referenced by a block whose declarations are outside the current stack frame. Fixes <rdar://problem/7462324>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/MemRegion.h
74fa91164768a5469fd299206e893349dcd3c343 11-Dec-2009 John McCall <rjmccall@apple.com> Implement access declarations. Most of the work here is parsing them, which
is difficult because they're so terribly, terribly ambiguous.


We implement access declarations in terms of using declarations, which is
quite reasonable. However, we should really persist the access/using
distinction in the AST and use the appropriate name in diagnostics. This
isn't a priority, so I'll just file a PR and hope someone else does it. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
60fa3cfd7aa63c29f9fc2d593bac56a3646337cc 11-Dec-2009 John McCall <rjmccall@apple.com> Implement access declarations. Most of the work here is parsing them, which
is difficult because they're so terribly, terribly ambiguous.


We implement access declarations in terms of using declarations, which is
quite reasonable. However, we should really persist the access/using
distinction in the AST and use the appropriate name in diagnostics. This
isn't a priority, so I'll just file a PR and hope someone else does it. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
4676677de10dddcd7afe0f75d57dae82a99d13d5 11-Dec-2009 Chris Lattner <sabre@nondot.org> Give the "cannot pass object of non-POD type 'class C' through variadic constructor; call will abort at runtime" warning a -W flag (non-pod-varargs) and default it being an error by default. There is no good reason to allow users to get bitten by this sort of thing by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7e1848ddba7b2a5f73a17387de7078bf8de7a646 11-Dec-2009 Chris Lattner <sabre@nondot.org> Give the "cannot pass object of non-POD type 'class C' through variadic constructor; call will abort at runtime" warning a -W flag (non-pod-varargs) and default it being an error by default. There is no good reason to allow users to get bitten by this sort of thing by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5555f2e6ecd5a73c8fb08bdbed3b28d509213ab1 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a crash trying to access a category name in
objective-c++ mode and also removed dead-code in this area.
(fixes radar 7456710).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
737061fc2948776f941e1854a9bc6ebd070d9151 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a crash trying to access a category name in
objective-c++ mode and also removed dead-code in this area.
(fixes radar 7456710).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
78a8000d29c787541c1d0b1c9a45020ef3aac7e3 10-Dec-2009 John McCall <rjmccall@apple.com> Improve the diagnostic when a new declaration conflicts with a using shadow
declaration. Rename note_using_decl to note_using, which is possibly less confusing.
Add a test for non-class-scope using decl collisions and be sure to note the case
we can't diagnose yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticSemaKinds.td
41ce66f8e20159d8bd39fff54ae01608da06c294 10-Dec-2009 John McCall <rjmccall@apple.com> Improve the diagnostic when a new declaration conflicts with a using shadow
declaration. Rename note_using_decl to note_using, which is possibly less confusing.
Add a test for non-class-scope using decl collisions and be sure to note the case
we can't diagnose yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticSemaKinds.td
d3346686e8b4377150695eff5660b31fa07ec6b1 10-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Move initialization via initializer list over to InitializationSequences.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d87b61f6398bab21176f73818a8d11ca1c3632c8 10-Dec-2009 Douglas Gregor <dgregor@apple.com> Move initialization via initializer list over to InitializationSequences.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9e1d5827a6feaf18cb72a9d8eca80645e2075528 10-Dec-2009 John McCall <rjmccall@apple.com> Implement redeclaration checking and hiding semantics for using declarations. There
are a couple of O(n^2) operations in this, some analogous to the usual O(n^2)
redeclaration problem and some not. In particular, retroactively removing
shadow declarations when they're hidden by later decls is pretty unfortunate.
I'm not yet convinced it's worse than the alternative, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/Basic/DiagnosticSemaKinds.td
9f54ad4381370c6b771424b53d219e661d6d6706 10-Dec-2009 John McCall <rjmccall@apple.com> Implement redeclaration checking and hiding semantics for using declarations. There
are a couple of O(n^2) operations in this, some analogous to the usual O(n^2)
redeclaration problem and some not. In particular, retroactively removing
shadow declarations when they're hidden by later decls is pretty unfortunate.
I'm not yet convinced it's worse than the alternative, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/Basic/DiagnosticSemaKinds.td
c477f788f52e0d00830b09e6ac34361746941e42 10-Dec-2009 Chris Lattner <sabre@nondot.org> Second half of r91023, saving files is good.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
de138eb4e63f58bcfdea6d3834e07f4cd25ca857 10-Dec-2009 Chris Lattner <sabre@nondot.org> Second half of r91023, saving files is good.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
6e355009b1af8c5d9da46db81c1d1111c7c352c2 10-Dec-2009 Chris Lattner <sabre@nondot.org> refactor the 'ColonIsSacred' argument to ParseOptionalCXXScopeSpecifier
to be a bool in Parser that is twiddled by the ColonProtectionRAIIObject
class. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
08d92ecf6e5b1fd23177a08c2312b58d63d863db 10-Dec-2009 Chris Lattner <sabre@nondot.org> refactor the 'ColonIsSacred' argument to ParseOptionalCXXScopeSpecifier
to be a bool in Parser that is twiddled by the ColonProtectionRAIIObject
class. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
da86f093507a7733ae955d7511b88f8bf4f61752 10-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Reimplement reference initialization (C++ [dcl.init.ref]) using the
new notion of an "initialization sequence", which encapsulates the
computation of the initialization sequence along with diagnostic
information and the capability to turn the computed sequence into an
expression. At present, I've only switched one CheckReferenceInit
callers over to this new mechanism; more will follow.

Aside from (hopefully) being much more true to the standard, the
diagnostics provided by this reference-initialization code are a bit
better than before. Some examples:

p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct
Derived'
cannot bind to a value of unrelated type 'struct Base'
Derived &dr2 = b; // expected-error{{non-const lvalue reference to
...
^ ~
p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to
a value of
type 'struct Base const' drops qualifiers
Base &br3 = bc; // expected-error{{drops qualifiers}}
^ ~~

p5-var.cpp:57:15: error: ambiguous conversion from derived class
'struct Diamond' to base class 'struct Base':
struct Diamond -> struct Derived -> struct Base
struct Diamond -> struct Derived2 -> struct Base
Base &br5 = diamond; // expected-error{{ambiguous conversion from
...
^~~~~~~
p5-var.cpp:59:9: error: non-const lvalue reference to type 'long'
cannot bind to
a value of unrelated type 'int'
long &lr = i; // expected-error{{non-const lvalue reference to type
...
^ ~

p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct
Base' cannot
bind to a temporary of type 'struct Base'
Base &br1 = Base(); // expected-error{{non-const lvalue reference to
...
^ ~~~~~~

p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field
'i'
int & ir1 = (ib.i); // expected-error{{non-const reference cannot
...
^ ~~~~~~
p5-var.cpp:98:7: note: bit-field is declared here
int i : 17; // expected-note{{bit-field is declared here}}
^






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
20093b4bf698f292c664676987541d5103b65b15 10-Dec-2009 Douglas Gregor <dgregor@apple.com> Reimplement reference initialization (C++ [dcl.init.ref]) using the
new notion of an "initialization sequence", which encapsulates the
computation of the initialization sequence along with diagnostic
information and the capability to turn the computed sequence into an
expression. At present, I've only switched one CheckReferenceInit
callers over to this new mechanism; more will follow.

Aside from (hopefully) being much more true to the standard, the
diagnostics provided by this reference-initialization code are a bit
better than before. Some examples:

p5-var.cpp:54:12: error: non-const lvalue reference to type 'struct
Derived'
cannot bind to a value of unrelated type 'struct Base'
Derived &dr2 = b; // expected-error{{non-const lvalue reference to
...
^ ~
p5-var.cpp:55:9: error: binding of reference to type 'struct Base' to
a value of
type 'struct Base const' drops qualifiers
Base &br3 = bc; // expected-error{{drops qualifiers}}
^ ~~

p5-var.cpp:57:15: error: ambiguous conversion from derived class
'struct Diamond' to base class 'struct Base':
struct Diamond -> struct Derived -> struct Base
struct Diamond -> struct Derived2 -> struct Base
Base &br5 = diamond; // expected-error{{ambiguous conversion from
...
^~~~~~~
p5-var.cpp:59:9: error: non-const lvalue reference to type 'long'
cannot bind to
a value of unrelated type 'int'
long &lr = i; // expected-error{{non-const lvalue reference to type
...
^ ~

p5-var.cpp:74:9: error: non-const lvalue reference to type 'struct
Base' cannot
bind to a temporary of type 'struct Base'
Base &br1 = Base(); // expected-error{{non-const lvalue reference to
...
^ ~~~~~~

p5-var.cpp:102:9: error: non-const reference cannot bind to bit-field
'i'
int & ir1 = (ib.i); // expected-error{{non-const reference cannot
...
^ ~~~~~~
p5-var.cpp:98:7: note: bit-field is declared here
int i : 17; // expected-note{{bit-field is declared here}}
^






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
973d503936deb9e86b56dd832dd25bd7e5f863f2 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a bogus error when declaring an extern "C" array.
(fixes radar 7457109).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3acd9aaa4ddd14afecb4f1c02ca6f585a6d51849 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a bogus error when declaring an extern "C" array.
(fixes radar 7457109).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
324dba21acdc0ff9fcc36b06e52a8f3c0baa86eb 09-Dec-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
e4cb2a4b4ad6b9596f9109945a5b3a87949f375b 09-Dec-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
232523601c62daf54c4b35597e953f5e91b2bb98 09-Dec-2009 Anders Carlsson <andersca@mac.com> Add DeclContext::dump.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
2b7d8ddc746a9096f8af4bd0d8b07eae523864b5 09-Dec-2009 Anders Carlsson <andersca@mac.com> Add DeclContext::dump.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
b921fd382783460ee0514c914175a7a20458acda 09-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor OSAtomic evaluation logic into OSAtomicChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
1ec4e976113ac56c0b3d96f484613d1dc62c3f85 09-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor OSAtomic evaluation logic into OSAtomicChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
385a59967822b8ac61697f25e23666af3ec1f119 09-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Mark -i* options as JoinedOrSeparate, since the driver forwards them
directly and one can write '-includefoo' if one really wants to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
b94ffa4a641b71c7c6155cddc7dc384f8a45c9f1 09-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Mark -i* options as JoinedOrSeparate, since the driver forwards them
directly and one can write '-includefoo' if one really wants to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
472f89244393933f55431259174d6e7ca14d44a6 09-Dec-2009 John McCall <rjmccall@apple.com> First pass at implementing C++ enum semantics: calculate (and store) an
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to. This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.

Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
842aef8d942a880eeb9535d40de31a86838264cb 09-Dec-2009 John McCall <rjmccall@apple.com> First pass at implementing C++ enum semantics: calculate (and store) an
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to. This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.

Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f649a723918ae081408f162b5786727cfddbdb51 09-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Implemented an implicit conversion from "noreturn" function types (and
pointers thereof) to their corresponding non-noreturn function
types. This conversion is considered an exact match for
overload-resolution purposes. Note that we are a little more strict
that GCC is, because we encode noreturn in the type system, but that's
a Good Thing (TM) because it does not allow us to pretend that
potentially-returning function pointers are non-returning function
pointers.

Fxies PR5620.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
43c79c2b07abc7ba6d9f243b84ee6539de4d2652 09-Dec-2009 Douglas Gregor <dgregor@apple.com> Implemented an implicit conversion from "noreturn" function types (and
pointers thereof) to their corresponding non-noreturn function
types. This conversion is considered an exact match for
overload-resolution purposes. Note that we are a little more strict
that GCC is, because we encode noreturn in the type system, but that's
a Good Thing (TM) because it does not allow us to pretend that
potentially-returning function pointers are non-returning function
pointers.

Fxies PR5620.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ac5ad7ebb178bbc9e7b1bb0983852de795c7d027 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
92ef5d75720c032808181133e4d7c5f82230237e 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1916a4762a0e8938f9a2a390c2f9f9eed2905600 08-Dec-2009 Anders Carlsson <andersca@mac.com> Make the BugType.h header self-contained so Daniel will stop bugging me ;)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
7cdc25edb6ee3d1673baff05cd582b7285e04748 08-Dec-2009 Anders Carlsson <andersca@mac.com> Make the BugType.h header self-contained so Daniel will stop bugging me ;)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
0646aa214e9a7fb2f7106ddce68309278ff97147 08-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
87667aafe68c366be57f5afb60428237593da0ed 08-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
b85c1556de06cc741c9465e669cbe8c2c559ffde 08-Dec-2009 John McCall <rjmccall@apple.com> DeclRefExpr stores a ValueDecl internally.

Template instantiation can re-use DeclRefExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dbd872f273a8dbf22e089b3def6c09f0a460965d 08-Dec-2009 John McCall <rjmccall@apple.com> DeclRefExpr stores a ValueDecl internally.

Template instantiation can re-use DeclRefExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
59a1058f1b34622e6709045c19555490d59af894 08-Dec-2009 John McCall <rjmccall@apple.com> Correctly implement the C++03 and 0x restrictions on class-member using
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
604e7f14d672af80ca5b9044f30f3dc23d37ddd5 08-Dec-2009 John McCall <rjmccall@apple.com> Correctly implement the C++03 and 0x restrictions on class-member using
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
060ea1c5dcaf20098a60679c11274a32eb1f4c7d 08-Dec-2009 John McCall <rjmccall@apple.com> Add CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookup
semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with
pre-instantiation diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e8174bc483615e79614d9284a50ac94831e8b7c6 08-Dec-2009 John McCall <rjmccall@apple.com> Add CXXRecordDecl::forallBases to walk an inheritance hierarchy with non-lookup
semantics and CXXRecordDecl::isProvablyNotDerivedFrom to assist with
pre-instantiation diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
7df221b517baa7f9d2762bf238a183efcea9addc 08-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Remove dead diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ba03dfddc383918aef4d59a9ce1c0a0249692d5b 08-Dec-2009 Douglas Gregor <dgregor@apple.com> Remove dead diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
683786b2eb02e9e82df57216701e7bb469c64a0f 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of some diagnostics that don't follow our rules for -pedantic
diagnostics (specifically, that any extension in a compiler-reserved namespace
shouldn't trigger a diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
265f52e920a46c8029760ced39363ffb48c43f10 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of some diagnostics that don't follow our rules for -pedantic
diagnostics (specifically, that any extension in a compiler-reserved namespace
shouldn't trigger a diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
2ab887915142c46b8c6d5dae98f1e6ec7cb07fbe 08-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Remove several .c_str() to be forward-compatible with StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
e3fdca2ee0346a41d9cc5ee417a75e66274216f5 08-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Remove several .c_str() to be forward-compatible with StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
97ea8cc943409d290b600024924c8847839944ac 07-Dec-2009 John McCall <rjmccall@apple.com> Recover from dot accesses to record pointers and arrow accesses to records.
Patch by Nicola Gigante!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
812c15476c9dddb72a8fd48deb7ca86402664b94 07-Dec-2009 John McCall <rjmccall@apple.com> Recover from dot accesses to record pointers and arrow accesses to records.
Patch by Nicola Gigante!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a8e641996bb71bd6d4b999c408567390cbcceead 07-Dec-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
fc576514d06c46a7cac49500169411d82f38d04b 07-Dec-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/AnalysisConsumer.h
a8de3531caf928a9b1fd5561884b0e2a39ac64e6 07-Dec-2009 Ted Kremenek <kremenek@apple.com> Add analysis support for blocks. This includes a few key changes:

- Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters.
- VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference)
- Add transfer function support to GRExprEngine for BlockDeclRefExprs.

This change also supports analyzing blocks as an analysis entry point
(top-of-the-stack), which required pushing more context-sensitivity
around in the MemRegion hierarchy via the use of LocationContext
objects. Functionally almost everything is the same, except we track
LocationContexts in a few more areas and StackSpaceRegions now refer
to a StackFrameContext object. In the future we will need to modify
MemRegionManager to allow multiple StackSpaceRegions in flight at once
(for the analysis of multiple stack frames).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
67d1287035767f4f6c8ca0c2bb755990012a44ca 07-Dec-2009 Ted Kremenek <kremenek@apple.com> Add analysis support for blocks. This includes a few key changes:

- Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters.
- VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference)
- Add transfer function support to GRExprEngine for BlockDeclRefExprs.

This change also supports analyzing blocks as an analysis entry point
(top-of-the-stack), which required pushing more context-sensitivity
around in the MemRegion hierarchy via the use of LocationContext
objects. Functionally almost everything is the same, except we track
LocationContexts in a few more areas and StackSpaceRegions now refer
to a StackFrameContext object. In the future we will need to modify
MemRegionManager to allow multiple StackSpaceRegions in flight at once
(for the analysis of multiple stack frames).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
65494fab0e4c7463ea2c3706bbdcbbcaa132876e 07-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
claim it in Driver.cpp instead of Tools.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
7ca7987669fcd14d91b4227a9ddcf7fdd8b1f8c2 07-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
claim it in Driver.cpp instead of Tools.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
b4c7be862abff31c56ff098f9f56aa4d5e47c443 07-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion for Objective-C @ keywords that are statements or expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9a0c85e640a08174569a303db22981612f05d385 07-Dec-2009 Douglas Gregor <dgregor@apple.com> Code completion for Objective-C @ keywords that are statements or expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
debc7cbc085252e68d7672d68620cfab1c714e1b 07-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion for Objective-C @ directives

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c464ae8444edb6d07ea49b7a0eae1674c0fa1bb8 07-Dec-2009 Douglas Gregor <dgregor@apple.com> Code completion for Objective-C @ directives

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
aec57a159a6191047eaf49d9ab79e6e6328ca76a 07-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add EvalCallExpr interface to checker, and migrate the no-return function
handler to this interface.
GRExprEngine::CheckerEvalCall() will return true if one of the checkers has
processed the node. In the future this might return void when we have some
default checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
935ef90f4b065c7c865ee5b2a99c5f9b1a115d72 07-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add EvalCallExpr interface to checker, and migrate the no-return function
handler to this interface.
GRExprEngine::CheckerEvalCall() will return true if one of the checkers has
processed the node. In the future this might return void when we have some
default checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
0a97b7d4712dbfa203dbb5f7fa6c394228cb6b2f 07-Dec-2009 Anders Carlsson <andersca@mac.com> getTemplateSpecializationKind should be const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b13e357dac872bc7d507a770c4fb0f7b47ff0ac9 07-Dec-2009 Anders Carlsson <andersca@mac.com> getTemplateSpecializationKind should be const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
39cf32a9e9019054816da59a27b52416d9a664e0 07-Dec-2009 Anders Carlsson <andersca@mac.com> Move key functions to a separate map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
f53df2398e07d13be9962b95aebc19b31706fa33 07-Dec-2009 Anders Carlsson <andersca@mac.com> Move key functions to a separate map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
7755c88dcbfa1d4273fd97bdd3415c5c2aa19039 07-Dec-2009 John McCall <rjmccall@apple.com> DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
a93c934af4fbf97cbe8e649d82e68ccacfe57c95 07-Dec-2009 John McCall <rjmccall@apple.com> DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
468058b2b3153e0040490e89fa6b5c91843b8c94 07-Dec-2009 Chris Lattner <sabre@nondot.org> add 'F' to a bunch of libm builtins so that codegen doesn't die on them,
pointed out by Charles Davis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
c08582ba5eef9383702fd3e434de1a6f2f470e3c 07-Dec-2009 Chris Lattner <sabre@nondot.org> add 'F' to a bunch of libm builtins so that codegen doesn't die on them,
pointed out by Charles Davis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
18973ce02baf8b310df51803738460c99a566cf0 07-Dec-2009 Chris Lattner <sabre@nondot.org> reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
This time with a fix to bail out when in a dependent context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
46646491834cd8faabb22482dfe93b24ce28a6c1 07-Dec-2009 Chris Lattner <sabre@nondot.org> reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
This time with a fix to bail out when in a dependent context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
1557461a4f7d494e2a669ede1fbe95c71dafb28e 07-Dec-2009 Sam Weinig <sam.weinig@gmail.com> Remove a now out of date and out of place comment about predefined exprs from the FloatingLiteral class declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
19a9edb5dd7ab2c63249b28f45f16781a5577874 07-Dec-2009 Sam Weinig <sam.weinig@gmail.com> Remove a now out of date and out of place comment about predefined exprs from the FloatingLiteral class declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
701ae24245e603b38ccfc45252604e99f60fa66c 06-Dec-2009 Chris Lattner <sabre@nondot.org> revert my previous patch, it is breaking something and I don't have time
to fix it ATM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
1ade4ca0aa9331c2388cca9becad1357a154ae34 06-Dec-2009 Chris Lattner <sabre@nondot.org> revert my previous patch, it is breaking something and I don't have time
to fix it ATM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
76f672aad5e7b2677cbc594453042e2e3a29f0d1 06-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Move helper onto CXXMethodDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d7d7f67c1dd8626520bb243d3928f59d32424534 06-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Move helper onto CXXMethodDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
12668c9ba492222aab34ac1d3a5054035bb58194 06-Dec-2009 Chris Lattner <sabre@nondot.org> implement PR4451, improving error recovery for a mistaken : where a :: was
intended. On the first testcase in the bug, we now produce:

cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
^
::

instead of:

t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
^
;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
a564b17dcc7daf298ffa72cde94630343bf9c31a 06-Dec-2009 Chris Lattner <sabre@nondot.org> implement PR4451, improving error recovery for a mistaken : where a :: was
intended. On the first testcase in the bug, we now produce:

cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
^
::

instead of:

t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
^
;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
edd4eef848ee75b19934bc0261851760a423c6e4 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
bb3503a146f5eee6393a8b7542f38d9f5fce6583 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
7552668f1873684e67a5d8919be2d81a3c5dd134 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.

Also, update SourceManager.h doxyments for getBuffer() to reflect reality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2ffb14f004affc363d86d6c7c63c356190db3679 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.

Also, update SourceManager.h doxyments for getBuffer() to reflect reality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
7a414b24402c5e426a009d2414c0429338428609 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
63ceaa32a2371e38d1f912080fe471285e6b6e56 06-Dec-2009 Daniel Dunbar <daniel@zuster.org> Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
486e9845f0f2f6b73f45e5015a202201ac2fd489 05-Dec-2009 Steve Naroff <snaroff@apple.com> Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642).

Simply use the 'LangOpts' member already present in TextDiagnosticPrinter.

Sorry for the confusion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
0304c6cb7fd3b2137213858b1e5ae85ef3f4f8e2 05-Dec-2009 Steve Naroff <snaroff@apple.com> Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642).

Simply use the 'LangOpts' member already present in TextDiagnosticPrinter.

Sorry for the confusion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
ae427a94f20d49c5e8a73b6458ed06b422813ab8 05-Dec-2009 Steve Naroff <snaroff@apple.com> Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71086

Note - This commit only includes the fix for:

<rdar://problem/6309338> slightly different error message format for Visual Studio.

The fix for <rdar://problem/6845623> from protocol to template. is separate/forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
e0c4d895ffe4320aa4e29485711ad7d154f2cc2b 05-Dec-2009 Steve Naroff <snaroff@apple.com> Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71086

Note - This commit only includes the fix for:

<rdar://problem/6309338> slightly different error message format for Visual Studio.

The fix for <rdar://problem/6845623> from protocol to template. is separate/forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
caf383ae337966d67380b6b161fab17ec2b53d04 04-Dec-2009 John McCall <rjmccall@apple.com> Fix "using typename" and the instantiation of non-dependent using declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
ed97649e9574b9d854fa4d6109c9333ae0993554 04-Dec-2009 John McCall <rjmccall@apple.com> Fix "using typename" and the instantiation of non-dependent using declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeLocBuilder.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
44c4e153d8a79562e196aea7e917ccae8a16ebc7 04-Dec-2009 Anders Carlsson <andersca@mac.com> Forgot this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
99369081447e9b7b2c2f724d39e9ec8409291d08 04-Dec-2009 Anders Carlsson <andersca@mac.com> Forgot this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7e5ca36f05758666353d5353cf27c0e027e1782b 04-Dec-2009 Mike Stump <mrs@apple.com> Add an easy accessor for the end of the try/catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
be0ed67bc79e96c26cd0ad41dcfab5a5020ead51 04-Dec-2009 Mike Stump <mrs@apple.com> Add an easy accessor for the end of the try/catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
fcd71df22e090cbc65ac9d92773016886d392d29 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch -ccc-* options to using the standard options functionality.
- I still want to get rid of them, but manually handling them isn't adding value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
8477ee93c9d81d1b5fe321706ff95bcd219c744b 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch -ccc-* options to using the standard options functionality.
- I still want to get rid of them, but manually handling them isn't adding value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
e985d447b2bcbe764b27dfc8e6b34462b563c33a 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptTable: Allow option groups to be used to define "help groups", which will
collate the options inside that group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
lang/Driver/OptTable.h
2658f05caf1c1d86608a46ebc7be0b3bb21fef2a 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptTable: Allow option groups to be used to define "help groups", which will
collate the options inside that group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
lang/Driver/OptTable.h
973c39d43eeb03c50792b691a5e1d33da95d6d6d 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptParser: Add HelpHidden flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
lang/Driver/OptTable.h
9a242512a8b319cc4df7d050166a1c65bf66abeb 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptParser: Add HelpHidden flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
lang/Driver/OptTable.h
38ded47e4b3634cf0a45fa06ee66c2aef77bc08e 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Replace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
edeb5b6b50e773b243e0ee0d84589cd1f7dea9b0 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Replace SymbolReaper::isLive(VarDecl) with SymbolReaper::isLive(VarRegion).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
617eef3b2e1175b6f9f90a138a4b79282061745f 04-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Add gcc's -no-canonical-prefixes option to clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
0f4c59c3beae302b5a3ecea13f2e257bdaad3188 04-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Add gcc's -no-canonical-prefixes option to clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
277ecd35a01920a03f319779c039d676ea2ecaf2 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> ASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit made
from a source file.
- This allows CIndex to avoid iterating over all the top-level decls when using
a PCH, which means we deserialize far fewer decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
f772d1e2a5688572d07f42896a50ac57a4a41fe8 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> ASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit made
from a source file.
- This allows CIndex to avoid iterating over all the top-level decls when using
a PCH, which means we deserialize far fewer decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
e24cecad697d12f01689797c26293c6e4a16f0b6 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> Ignore -fsched-interblock and -freorder-blocks to the ignored -f flags, we have
no plans to support invasive optimization flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
f13876fac1eb2d384732779a7709575d4ecf27b6 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> Ignore -fsched-interblock and -freorder-blocks to the ignored -f flags, we have
no plans to support invasive optimization flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.td
1e701d6da32716d9dba79bc092366925e216dc29 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Rename instance variable to avoid name conflict with parameters, and modify addTransition() to compare the correct state values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
bfb4fc9ebc64ec3db597441d4b79adcd0f69cf58 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Rename instance variable to avoid name conflict with parameters, and modify addTransition() to compare the correct state values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
bd7d5e3313d3a1c0fef7532c0357074d9bcaed4f 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Revert r90546.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
6dea40475158edea3b64e1247b07b94db4f48dc8 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Revert r90546.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
2ed2ca150395db08e9ac31401c2ea00fe10a76b9 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make the type of the Decl referred to by a MemberExpr a bit more precise.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f595cc41c4d95fe323f8a2b209523de9956f874d 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make the type of the Decl referred to by a MemberExpr a bit more precise.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
616b4a99b724217fb375aef2e837840b137cd287 04-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> the assertion says state is not NULL. When state is not NULL, getState()
returns state. So simplify the predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
1d60710c593c82e6c4a9a5c1e96e24fbb3a61592 04-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> the assertion says state is not NULL. When state is not NULL, getState()
returns state. So simplify the predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
7969eed168f037095da9e0ded43eaa0728e1a846 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/MemRegion.h
d02e83a548359df978f40cc1a52ffd78b7ef371b 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/MemRegion.h
e58ebf3b717db406dc9e434b41a771c856e0af05 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Refactor LocationContext creation logic into a single member template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
0ee4124012950d7bb853438629b8e7652febf183 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Refactor LocationContext creation logic into a single member template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
7db88c68869b191692ce35df151fcbc555221980 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Refactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocationContext to represent the invocation of a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
dc0d909f0f6684159c8475db1a15967e5613cb27 04-Dec-2009 Ted Kremenek <kremenek@apple.com> Refactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocationContext to represent the invocation of a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
dcb5b8c17602418d0ea1359cf7481507a1b7c03f 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
as a constant integer. Also, some minor cleanup and improvements to the
diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9aef7263d84d9224575e113878cfbb06b8343cbf 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
as a constant integer. Also, some minor cleanup and improvements to the
diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
361a02d9d9de6cb533fca1254d574494b2bce55c 04-Dec-2009 Ted Kremenek <kremenek@apple.com> constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b48ad64a0e9e8d6488adebe597b6af32c1eb84f4 04-Dec-2009 Ted Kremenek <kremenek@apple.com> constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
94eeea38304ad9771cf2cff3326f9121a92246d7 04-Dec-2009 Ted Kremenek <kremenek@apple.com> More template-logic for MemRegion construction out of MemRegion.h and into MemRegion.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
bcd7f9f8cb2f1b78e8ad991677a4364044e1deb7 04-Dec-2009 Ted Kremenek <kremenek@apple.com> More template-logic for MemRegion construction out of MemRegion.h and into MemRegion.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
c390fde6fcb2de361f14d12de7cb6e9a79f036c8 03-Dec-2009 John McCall <rjmccall@apple.com> Lift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.
Make it an inner class of Parser to assuage access control.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d0014540005f2a5ab837365db6bd40f479406758 03-Dec-2009 John McCall <rjmccall@apple.com> Lift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.
Make it an inner class of Parser to assuage access control.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e883d27dfdf59eeac18f9276bf2460a549e68d31 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Add recursion guards to ice-checking and evaluation for declrefs, so we
don't infinitely recurse for cases we can't evaluate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c013118155077cf8bdaef743c5dbce760114eed3 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Add recursion guards to ice-checking and evaluation for declrefs, so we
don't infinitely recurse for cases we can't evaluate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
49028b52ab9238223a313a3babaf4e01a73f7e28 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Convert some methods in PathDiagnostic to return StringRefs instead of std::string&.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
d3d870b96d2f76d981a49595e9395ef09d970812 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Convert some methods in PathDiagnostic to return StringRefs instead of std::string&.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
2f5b7a8b9a82804a119ac53a8d69aeab48181eb5 03-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e7184df728bb339633d88c774b5097dd9318cc8a 03-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0f45500a267ab15aa31bcfa4ac779d8300fb89ea 03-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Minor cleanup to the code-completion-point logic suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
109ae73ec71a1d27358510ce049b59637b4a6b40 03-Dec-2009 Douglas Gregor <dgregor@apple.com> Minor cleanup to the code-completion-point logic suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
537c3461818cf88a8ab483e05d7228991456cd18 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix two more diagnostic-on-stderr instances that thought they could hide from me -- they thought wrong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
baac10380c8b8597a9e5f1beb96c439c3bf02baa 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix two more diagnostic-on-stderr instances that thought they could hide from me -- they thought wrong.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
2b50918fa2304555963214b21b551289fad889c9 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Kill a few more random stderr uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
e7cb7e4570842297f698bd7fd8d85520fc008acd 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Kill a few more random stderr uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
ff484446f9cabe0e9c1737bfee761528ab019cc9 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/CompilerInstance.h
360435908c9b90429cfe192fab22854af1d4497c 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/CompilerInstance.h
5f0565da5a8963b22f1d108c614e240ec7f96c9c 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Switch PCHReader::getOriginalSourceFile to use proper diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
93ebb1ba9f35ab5e7bff37c471baeb360eeb0b04 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Switch PCHReader::getOriginalSourceFile to use proper diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
93b0536a7d9a798d87c8772353d1f50f9e6c8895 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix BackendConsumer to use proper diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
3be0d19503f8291b1581a39a8f6ca01d74bf5cb1 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix BackendConsumer to use proper diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
fee543b77072594204591b3da62fa453937a1da8 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Make BlockDataRegion::referenced_vars_iterator an actual class that enforces that all MemRegions iterated over are VarRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
81cef5889027d0f96b24afa7a0bb28d9023474ed 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Make BlockDataRegion::referenced_vars_iterator an actual class that enforces that all MemRegions iterated over are VarRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
257ed2df3ef232b2389aabf8d5edcaa870e22169 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix layering violation by moving Analysis/CallGraph to Index

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/CallGraph.h
8fd57fea85ff7b4dc1895fbbdf73173feaa063b5 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix layering violation by moving Analysis/CallGraph to Index

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/CallGraph.h
9d49f63815d6e6119d346337523e1e07c9b642e5 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Honor -help and -version when using new style option parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
9b5e9ae08defd14441acca1d7d4502b933bf6c5a 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Honor -help and -version when using new style option parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
ab2d6b34508e4babdae7e6e79ae7795edf9bdede 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> CC1Options: Normalize meta var spellings, and fix a few help texts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
b737fb12cbf9617edc5720fba8b6aed118c84771 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> CC1Options: Normalize meta var spellings, and fix a few help texts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
a1bac7d03c52b8639ebb4523fcbbaabf37667c85 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add OptTable::PrintHelp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptTable.h
60e107fb86132fea75b886d2259f4c220334bc5e 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add OptTable::PrintHelp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptTable.h
9b7e42db3f7fb9f10576dd2251f3c691c7704a49 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 support for -remap-file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/CC1Options.td
e14b5f5237d0740c2b21c50b2eb41a06e778d820 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 support for -remap-file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/CC1Options.td
67af496b731c7571ee529879be16acd6ecdc7bf0 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 -load option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
efba227cc5459554eca466aafe786b5132dcb68c 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 -load option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/CC1Options.td
lang/Frontend/FrontendOptions.h
47b8f8ef224c46bf0dfb846b4ec34b1c0ecc6e07 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Add batch version of 'StoreManager::InvalidateRegion()' for invalidating multiple regions as once. After adopting this in the CFRefCount::EvalCall(), we see a reduction in analysis time of 1.5% when analyzing all of SQLite3.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
81a958366873c8bb49a2ed7324f004047ec18e48 03-Dec-2009 Ted Kremenek <kremenek@apple.com> Add batch version of 'StoreManager::InvalidateRegion()' for invalidating multiple regions as once. After adopting this in the CFRefCount::EvalCall(), we see a reduction in analysis time of 1.5% when analyzing all of SQLite3.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
7594d04e6f5511975464b9f99b54321307a49ff4 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
- This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it.
- For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this.

On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source:

Wall time to c-index-test all files (no PCH):
Old: 23.4221
New: 12.3884

Wall time to c-index-test all files (with a PCH, and "local" mode):
Old: 10.9233
New: 1.9038

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90385 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
8506dde586459887b7e14e23a30af8ac5be5adb6 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
- This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it.
- For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this.

On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source:

Wall time to c-index-test all files (no PCH):
Old: 23.4221
New: 12.3884

Wall time to c-index-test all files (with a PCH, and "local" mode):
Old: 10.9233
New: 1.9038

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90385 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
0e63e4cef5eb977474ebcc44ccb06335626f876c 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/ASTUnit.h
5262fda30b876c8aae95f2eb92e349418d6b14bb 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/ASTUnit.h
956affe43fe9655a9ffa93ffbc8f0458a854ec58 03-Dec-2009 John McCall <rjmccall@apple.com> Stop stripping UnresolvedUsingDecls out of LookupResults that have other
results in them (which we were doing intentionally as a stopgap). Fix
an DeclContext lookup-table ordering problem which was causing UsingDecls to
show up incorrectly when looking for ordinary results. And oh hey
Clang-Code-Syntax passes now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
fda8e12774921e3cac3ebcba1148bcf4479ddd7a 03-Dec-2009 John McCall <rjmccall@apple.com> Stop stripping UnresolvedUsingDecls out of LookupResults that have other
results in them (which we were doing intentionally as a stopgap). Fix
an DeclContext lookup-table ordering problem which was causing UsingDecls to
show up incorrectly when looking for ordinary results. And oh hey
Clang-Code-Syntax passes now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
75067d2c35093b2c9cd4f96a3d5e2df0b5383d17 03-Dec-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce the notion of literal types, as specified in C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
ccf43505dbc47da041c06125f90b3bd3ac7eac97 03-Dec-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce the notion of literal types, as specified in C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
2409a21ff088c4aab328a9d32fb96502efd9de18 02-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Improve source location information for C++ member initializers in a
constructor, by keeping the DeclaratorInfo* rather than just the type
and a single location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
802ab45fea51beff12f386329d4928811a479c6e 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Improve source location information for C++ member initializers in a
constructor, by keeping the DeclaratorInfo* rather than just the type
and a single location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
c0d05c5b347d88964866f598b04900edb8d33f54 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> ASTUnit: Explicitly track whether the ASTUnit came from an actual AST or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
c7822dbf3c01a2a5f837cff82ba7889ea755daca 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> ASTUnit: Explicitly track whether the ASTUnit came from an actual AST or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
ab3dcdb26025c611f1f04a6433d76361fbfc27de 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> ASTUnit: Fix initialization of OnlyLocalDecls variable, and honor UseBumpAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
68ea2ac7fd98a5a44c7a5b04c54076cf794531cb 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> ASTUnit: Fix initialization of OnlyLocalDecls variable, and honor UseBumpAllocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90348 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
d60cad99e4fdac287de5e3cc192b6a7231d582b1 02-Dec-2009 Mike Stump <mrs@apple.com> Change rtti/Rtti to RTTI, as it is an acronym.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
de05057932cebc3f43911f87d75869cb7b705a19 02-Dec-2009 Mike Stump <mrs@apple.com> Change rtti/Rtti to RTTI, as it is an acronym.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
bd4cbba67a2cb7047c6f82e9b7a1e6f96748904e 02-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Extend -remap-file=from;to to permit mapping from a non-existent
file. This is accomplished by introducing the notion of a "virtual"
file into the file manager, which provides a FileEntry* for a named
file whose size and modification time are known but which may not
exist on disk.

Added a cute little test that remaps both a .c file and a .h file it
includes to alternative files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
057e567f1b375190779e5341f42861896cdee442 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Extend -remap-file=from;to to permit mapping from a non-existent
file. This is accomplished by introducing the notion of a "virtual"
file into the file manager, which provides a FileEntry* for a named
file whose size and modification time are known but which may not
exist on disk.

Added a cute little test that remaps both a .c file and a .h file it
includes to alternative files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
3901b72e9ecb9bc37106905b4f4a6e861a7029b5 02-Dec-2009 Anders Carlsson <andersca@mac.com> In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5ec02ae147760c32ad5b6fb0fec30ab3b3696778 02-Dec-2009 Anders Carlsson <andersca@mac.com> In Sema, whenever we think that a function is going to cause a vtable to be generated, we mark any virtual implicit member functions as referenced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9c414a88a8e3bb5e04efde85f45a39e4ee2ab89f 02-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Extend the CIndex code-completion API to perform code completion
involving unsaved files, using the -remap-file= functionality recently
added to clang-cc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90314 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
735df88a38e80c1ca70daa889aa516b8b9f54b50 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Extend the CIndex code-completion API to perform code completion
involving unsaved files, using the -remap-file= functionality recently
added to clang-cc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90314 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
54d93fde6518761f600ccc71dad2e9b5e0e93ebf 02-Dec-2009 John McCall <rjmccall@apple.com> r90313, in which OverloadedFunctionDecl is removed and never spoken of again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
51fa86f738a9768fac4e1cad7bdde53774b5b322 02-Dec-2009 John McCall <rjmccall@apple.com> r90313, in which OverloadedFunctionDecl is removed and never spoken of again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
5a21f1b51d958d4d1e1926e439b5dd66074f3121 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix ASTUnit::getOriginalSourceFileName() when using ASTUnit's derived from
source files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
68d40e2d16b9fadba386853d6bbb60089291fdc5 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix ASTUnit::getOriginalSourceFileName() when using ASTUnit's derived from
source files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
b433a70277eab84ec3221781aba642e9da8bc53d 02-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new clang-cc option

-remap-file=from;to

which takes the file "from" and transparently replaces its contents
with the contents of the file "to" from the source manager's
perspective. This is the moral equivalent of

cp from saved
cp to from
<call clang>
cp saved from
rm saved

without all of the pesky file copying.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PreprocessorOptions.h
716f0b3e2e36f362b64a2ce0a40a9ad915103255 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Introduce a new clang-cc option

-remap-file=from;to

which takes the file "from" and transparently replaces its contents
with the contents of the file "to" from the source manager's
perspective. This is the moral equivalent of

cp from saved
cp to from
<call clang>
cp saved from
rm saved

without all of the pesky file copying.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PreprocessorOptions.h
894fc4791408c58549d78f6fa333d7e2c1dd5f4e 02-Dec-2009 John McCall <rjmccall@apple.com> Push overloaded function templates through the parser using a totally different
leaked data structure than before. This kills off the last remaining
explicit uses of OverloadedFunctionDecl in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
0bd6feb9e9d40fc889fd47e899985125a43dfed8 02-Dec-2009 John McCall <rjmccall@apple.com> Push overloaded function templates through the parser using a totally different
leaked data structure than before. This kills off the last remaining
explicit uses of OverloadedFunctionDecl in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
d01fc222cedc08537c9d74e86ac69b4fb684f1a8 02-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Extend the source manager with the ability to override the contents of
files with the contents of an arbitrary memory buffer. Use this new
functionality to drastically clean up the way in which we handle file
truncation for code-completion: all of the truncation/completion logic
is now encapsulated in the preprocessor where it belongs
(<rdar://problem/7434737>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
2968442603b029949246467253eeac8139a5b6d8 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Extend the source manager with the ability to override the contents of
files with the contents of an arbitrary memory buffer. Use this new
functionality to drastically clean up the way in which we handle file
truncation for code-completion: all of the truncation/completion logic
is now encapsulated in the preprocessor where it belongs
(<rdar://problem/7434737>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
876e1c59230d11409d1e8b54eff28a68a2074b98 02-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Hard bifurcate the state into nil receiver and non-nil receiver, so that
we don't need to use the DoneEvaluation hack when check for
ObjCMessageExpr.

PreVisitObjCMessageExpr() only checks for undefined receiver or arguments.

Add checker interface EvalNilReceiver(). This is a 'once-and-done' interface.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
a46e4d91d8f3eb341f2387768db66dcfe8dd0afa 02-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Hard bifurcate the state into nil receiver and non-nil receiver, so that
we don't need to use the DoneEvaluation hack when check for
ObjCMessageExpr.

PreVisitObjCMessageExpr() only checks for undefined receiver or arguments.

Add checker interface EvalNilReceiver(). This is a 'once-and-done' interface.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
a211fccd7f4843258173c74b2bc80b8991d21b94 02-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate the unnecessary FirstFID cache variable from the source manager's ContentCache

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
4a160e16eb97bee03e36962d11aedc6452710bc5 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Eliminate the unnecessary FirstFID cache variable from the source manager's ContentCache

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
5f037ba770a202ddbf79b2df98ee45514bd659f6 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list of
(clang/driver) command line arguments (including the source file).
- The arguments are expected to include the source file.

- The idea is that even though this is a somewhat odd API, its the form which
many tools can most easily use (for example, by interposing with the compiler).

Also, switch index-test's -ast-from-source to use this entry point, and provide
a -arg command line argument which can be used to test that the command line
arguments are handled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/ASTUnit.h
7b55668db7618334cc40011d3c1e128524d89462 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list of
(clang/driver) command line arguments (including the source file).
- The arguments are expected to include the source file.

- The idea is that even though this is a somewhat odd API, its the form which
many tools can most easily use (for example, by interposing with the compiler).

Also, switch index-test's -ast-from-source to use this entry point, and provide
a -arg command line argument which can be used to test that the command line
arguments are handled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/ASTUnit.h
0e67ae0b7deb99e13a4af5b4774fb0084be7cff4 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Command::Creator member variable, which tracks the tool that was
used to create a particular command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
daab7b1016f0a82fefa4f7be6e63c57c06b19ffc 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Command::Creator member variable, which tracks the tool that was
used to create a particular command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
6fc358ea6ce5c8f786a939f70c2d8ca015be512a 01-Dec-2009 Chris Lattner <sabre@nondot.org> pass the reason for failure up from MemoryBuffer and report it
in diagnostics when we fail to open a file. This allows us to
report things like:

$ clang test.c -I.
test.c:2:10: fatal error: error opening file './foo.h': Permission denied
#include "foo.h"
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
39d9841ed4c0568d4b44dfbc12ac04491f60a374 01-Dec-2009 Chris Lattner <sabre@nondot.org> pass the reason for failure up from MemoryBuffer and report it
in diagnostics when we fail to open a file. This allows us to
report things like:

$ clang test.c -I.
test.c:2:10: fatal error: error opening file './foo.h': Permission denied
#include "foo.h"
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
2958bb22c81b0610f9017f8a80b65d782433fd2e 01-Dec-2009 Ted Kremenek <kremenek@apple.com> The minimum element size in BumpVector should be 1, not 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
1488c7a0989e4543b9acb46fa02a54d12a9d0cc9 01-Dec-2009 Ted Kremenek <kremenek@apple.com> The minimum element size in BumpVector should be 1, not 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
317ae5eb67c34b9be76e991c7851d72dd355f78d 01-Dec-2009 John McCall <rjmccall@apple.com> Rework how we support C++ implicit member accesses. If we can resolve an
implicit member access to a specific declaration, go ahead and create
it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as
appropriate. Otherwise, create an UnresolvedMemberExpr or
DependentScopeMemberExpr with a null base expression.

By representing implicit accesses directly in the AST, we get the ability
to correctly delay the decision about whether it's actually an instance
member access or not until resolution is complete. This permits us
to correctly avoid diagnosing the 'problem' of 'MyType::foo()'
where the relationship to the type isn't really known until instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
aa81e1658d87b9011125c632aa902d154ae4b02c 01-Dec-2009 John McCall <rjmccall@apple.com> Rework how we support C++ implicit member accesses. If we can resolve an
implicit member access to a specific declaration, go ahead and create
it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as
appropriate. Otherwise, create an UnresolvedMemberExpr or
DependentScopeMemberExpr with a null base expression.

By representing implicit accesses directly in the AST, we get the ability
to correctly delay the decision about whether it's actually an instance
member access or not until resolution is complete. This permits us
to correctly avoid diagnosing the 'problem' of 'MyType::foo()'
where the relationship to the type isn't really known until instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e4c9b99cff0331ab9e2c590189ba9eac906844ed 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
c4e265f67e63d870b4a188be5af1bcd848214802 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
dc8da56001c07f54ea809d33fb2e6ee174aaad46 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReader
to use it so it at least won't try to access Sema once it is gone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Sema/ExternalSemaSource.h
lang/Sema/SemaConsumer.h
ec2a4ed278a1112ebf84fdcb80ed66f53d8ec8ba 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReader
to use it so it at least won't try to access Sema once it is gone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Sema/ExternalSemaSource.h
lang/Sema/SemaConsumer.h
a3172a36050a033d2e91117d8f2204c646b85dff 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Convert Diagnostic::getCustomDiagID to take a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
32d4d80c26e8c4c1922cff4661e0b9f44a3aabfc 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Convert Diagnostic::getCustomDiagID to take a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
800403606c795e97685f1f95fe494cd20003d776 01-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Don't automatically assume that an id-expression refers to a
ValueDecl, because that isn't always the case in ill-formed
code. Diagnose a common mistake (forgetting to provide a template
argument list for a class template, PR5655) and dyn_cast so that we
handle the general problem of referring to a non-value declaration
gracefully.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9af2f52fbcb993350f54e57d498e7849ba29c75d 01-Dec-2009 Douglas Gregor <dgregor@apple.com> Don't automatically assume that an id-expression refers to a
ValueDecl, because that isn't always the case in ill-formed
code. Diagnose a common mistake (forgetting to provide a template
argument list for a class template, PR5655) and dyn_cast so that we
handle the general problem of referring to a non-value declaration
gracefully.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1b95569b560abb0427aa76a597e09e13c21bc290 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ASTUnit::LoadFromCompilerInvocation, which does what it says.

Also, add an -ast-from-source option to index-test which allows index-test to
run on source files directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
521bf9c529e653ab28896d027352d3e16e2672d5 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ASTUnit::LoadFromCompilerInvocation, which does what it says.

Also, add an -ast-from-source option to index-test which allows index-test to
run on source files directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
63b2bd2961598da03211cbd9c5851d7a54363d47 01-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Sema/CodeCompleteConsumer.h
2b4074f1d3919e77cb33ca49c960521dea27afab 01-Dec-2009 Douglas Gregor <dgregor@apple.com> Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Sema/CodeCompleteConsumer.h
65a5382416ec3d6a058923d3b487c70ab2dcdc32 01-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Clean up BuiltinBug class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
f99ce1e81f965fb0bb56ead76742aadd8b551835 01-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Clean up BuiltinBug class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
79af29e9baa26318af6fda91db377c863c997412 01-Dec-2009 Anders Carlsson <andersca@mac.com> Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
1a5e0d7f18485e4fb958f96dcddff3e4486a4069 01-Dec-2009 Anders Carlsson <andersca@mac.com> Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
abb74cc24e06928418871be6535520b14d714a8e 30-Nov-2009 John McCall <rjmccall@apple.com> Eliminate the use of OverloadedFunctionDecl in member expressions.
Create a new UnresolvedMemberExpr for these lookups. Assorted hackery
around qualified member expressions; this will all go away when we
implement the correct (i.e. extremely delayed) implicit-member semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
129e2df52ed7e0434b3f1cf1867fd6a5cb083ff6 30-Nov-2009 John McCall <rjmccall@apple.com> Eliminate the use of OverloadedFunctionDecl in member expressions.
Create a new UnresolvedMemberExpr for these lookups. Assorted hackery
around qualified member expressions; this will all go away when we
implement the correct (i.e. extremely delayed) implicit-member semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
686986ccccb6e40d3374c7c1669fae76bff03730 30-Nov-2009 Anders Carlsson <andersca@mac.com> When we're trying to define an implicit virtual destructor, make sure that we have a valid delete operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
37909808416da93703cecc83091e2b9eab0053d6 30-Nov-2009 Anders Carlsson <andersca@mac.com> When we're trying to define an implicit virtual destructor, make sure that we have a valid delete operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
011c5a02450ed959679d4ebfd2fdb8198b3cba18 30-Nov-2009 Mike Stump <mrs@apple.com> Add const to accessors that don't modify the object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
6515afe50c8d69dbb029b85f879cb2e083854b6c 30-Nov-2009 Mike Stump <mrs@apple.com> Add const to accessors that don't modify the object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
2818bd26562e1a2b7d7e9fb31d72f698a5748289 30-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a crash when ivar type is a __strong SEL. Fallout from
recent change to make SEL a builtin type (fixes radar 7425510).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8d2c0a9814e56c2b22e22d1045181c735aef62fd 30-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a crash when ivar type is a __strong SEL. Fallout from
recent change to make SEL a builtin type (fixes radar 7425510).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c44208598d88308695d0e7c5a6d7ba3ead6e6904 30-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef in Attr constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
bb377edda2656752016a0bc01fe4f9f8b6f80e19 30-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef in Attr constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
a3f4eeff4aec1306447707c73f70a5657357422c 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CodeGenOptions::{SoftFloat,FloatABI}, and update the all the (far too many) places to use this instead of using the backend -soft-float and -float-abi= options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
3b315264d1a6fa303e20fe0caec306ccafc090de 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CodeGenOptions::{SoftFloat,FloatABI}, and update the all the (far too many) places to use this instead of using the backend -soft-float and -float-abi= options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
507561c5d5f7e06f6f3fe07b394c44f4ff9ca392 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add TextDiagnosticBuffer::FlushDiagnostics, for forwarding the buffered diagnostics to a different diagnostics engine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticBuffer.h
c238955f09f3bce9386e6553d5d12f79e8cc2b08 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add TextDiagnosticBuffer::FlushDiagnostics, for forwarding the buffered diagnostics to a different diagnostics engine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticBuffer.h
8d9cacb67dd4f30fc20b2f1e2773390ea5c58d77 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::TimePasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
b33fbaa5f14452b6dc2442e89266acb0810616fd 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::TimePasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
eeef8220155ad20d50065b5315ea30a83c05a64f 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::SimplifyLibCalls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
3636e1d784aedb37052aa235966e4fdbe7ed9082 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::SimplifyLibCalls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
4d4df61e3badbc9196c12aafd135e8ed6f3686ee 30-Nov-2009 Chris Lattner <sabre@nondot.org> Fix PR5633 by making the preprocessor handle the case where we can
stat a file but where mmaping it fails. In this case, we emit an
error like:
t.c:1:10: fatal error: error opening file '../../foo.h'

instead of "cannot find file".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
6e2901407bff59aeb4cc301cc58b034723d0eb49 30-Nov-2009 Chris Lattner <sabre@nondot.org> Fix PR5633 by making the preprocessor handle the case where we can
stat a file but where mmaping it fails. In this case, we emit an
error like:
t.c:1:10: fatal error: error opening file '../../foo.h'

instead of "cannot find file".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
abbbb983c8f7c7f74ace2a531cea346c788f03eb 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Use proper diagnostics for all parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
9e612408c237ce3cac3fe7e97d7ce564601c1f63 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Use proper diagnostics for all parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
06779965fc91f7c594e49cb077018761bf8849c1 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
e03245246acbec5c46e93b68ec6942ce42b9e256 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
60788e86724178e222f5e9a9a8e1d96f97a1e477 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
545c28117c64e78521b8b402caa060ba0b58a530 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
83fdb795f734f8cb262ddd61cf6befef4403934f 29-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Port BugReporter and BugType to StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/BugType.h
f0171732efb4647772ad2a45c0f31978b0e34f71 29-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Port BugReporter and BugType to StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/BugType.h
8407ef47f548c87f6578727e6cf61c73d14d9dd6 29-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Streamline Stmt::CollectingStats() and Decl::CollectingStats(). No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
2024f4d4b0d57616f79ea742fa782d633d414462 29-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Streamline Stmt::CollectingStats() and Decl::CollectingStats(). No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
75bf1a79fdabced1ccce906c7d86523023c88067 29-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> This patch moves the frontend timer from clang-cc into CompilerInstance.
CompilerInstance already contains various objects that are used
throughout the entire run.

Also addresses Daniels review comments in:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091123/024508.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendAction.h
f79bafa608a5d7c49ec40ad199af5e32f3038b47 29-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> This patch moves the frontend timer from clang-cc into CompilerInstance.
CompilerInstance already contains various objects that are used
throughout the entire run.

Also addresses Daniels review comments in:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091123/024508.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
lang/Frontend/FrontendAction.h
5ab46ef39dcd6583b092497c89729b197a2089de 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Allow -triple= as an alias for -triple, -code-compiletion-at= as an alias for -code-completion-at, and spell "-std=" option correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
ce6bf1ecdaca15450d8c0424724cc1558b847364 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Allow -triple= as an alias for -triple, -code-compiletion-at= as an alias for -code-completion-at, and spell "-std=" option correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
c481191979b4ca7f2c5511ce9cc4d0fe65fd1d46 29-Nov-2009 Sean Hunt <rideau3@gmail.com> Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/IdentifierTable.h
3e518bda00d710754ca077cf9be8dd821e16a854 29-Nov-2009 Sean Hunt <rideau3@gmail.com> Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/IdentifierTable.h
e8dd73706cf9c9a2b7b9dce818a7637ef3fa24de 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move LLVM backend options to explicit clang-cc / clang -cc1 options, which we then manually pass to the command line library; eventually the latter grossness should be fixed by a real API when creating the target machine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
f219e7c1529fac29e34483667f740b452e5ef9cc 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move LLVM backend options to explicit clang-cc / clang -cc1 options, which we then manually pass to the command line library; eventually the latter grossness should be fixed by a real API when creating the target machine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/Driver/CC1Options.td
b24efa95d4dae2888cdcbf27fb6e7cc3297a83ca 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
7674352cf3e8f699914a2f739f1ae8c8c3480813 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
b43ed88dcc6aff01624a65574440caac4c5a3ae7 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing accessors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandard.h
fb435102b1632cc0ea8ebdef66099aff082b7d63 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing accessors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandard.h
97306e57626414a11dbaeda3f03069d16a8ec46d 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
1b0969590e712d7d52fc9c0d43d3ab85c36d07a6 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
42c06b5340576b23978aaea160013c7edbb2b27f 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move MainFileName option variable into CodeGenOptions instead of LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/CodeGen/CodeGenOptions.h
7d065d0f21b35f445cee13730398bc2bec6edff2 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move MainFileName option variable into CodeGenOptions instead of LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/CodeGen/CodeGenOptions.h
50cee73129a38c5780dca6abb3ef6d3e288eb6e3 28-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
59c55e724945daa060a5f1aaecbfd4de04770e93 28-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
c9940b7d7a97d8adc7babe7826d69f2e76384d49 28-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Cleanup llvm/Support/Compiler.h include in header files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Basic/OnDiskHashTable.h
149594457da7edfea2ce537ed18ca1b412dffd54 28-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Cleanup llvm/Support/Compiler.h include in header files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Basic/OnDiskHashTable.h
60a732f811c6152495647a3452021fefe47b9802 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Missed a forward declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Frontend/PathDiagnosticClients.h
408ac1767a87e1e49fcea5f8620e386b5007334a 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Missed a forward declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Frontend/PathDiagnosticClients.h
5e2f6ed50bf8c96fa371297ecc8412b34e5911f3 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Cleanup includes and forward decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
58652887b08da3207226ec6d8bdb59ec0e96edfe 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Cleanup includes and forward decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
f784707e88e25ad4fd14eab0da1f93f7ad7d5519 28-Nov-2009 Sean Hunt <rideau3@gmail.com> Add Parser support for C++0x literal operators ('operator "" i').
DeclarationName can't handle them yet, so right now Parser just errors out on them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
0486d746019f8310589b1f0d92edcc4bb3916b33 28-Nov-2009 Sean Hunt <rideau3@gmail.com> Add Parser support for C++0x literal operators ('operator "" i').
DeclarationName can't handle them yet, so right now Parser just errors out on them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
cbfba6c81ae3ecd63bbf03aa209da28d4fef4017 28-Nov-2009 Anders Carlsson <andersca@mac.com> Add an iterator for walking the primary base chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
1fb7cf9214402aacfaa74c92870b94c5879e97dc 28-Nov-2009 Anders Carlsson <andersca@mac.com> Add an iterator for walking the primary base chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
c8a9e76a468ba844969b8e637c20d5d171ed20dc 27-Nov-2009 Anders Carlsson <andersca@mac.com> Use a PointerIntPair for the PrimaryBaseInfo. Yay for clever LLVM data structures!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
261fba6cf57a09a1f1d0c4a4c4856aaa62753242 27-Nov-2009 Anders Carlsson <andersca@mac.com> Use a PointerIntPair for the PrimaryBaseInfo. Yay for clever LLVM data structures!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
89f16283ed2f1df67eae86fe9fdd28a82909b768 27-Nov-2009 Anders Carlsson <andersca@mac.com> Add a new PrimaryBaseInfo struct that combines the record decl of a primary base with whether it's virtual or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
ce2009ab2f59894dbcc847e25e05abe78c296e95 27-Nov-2009 Anders Carlsson <andersca@mac.com> Add a new PrimaryBaseInfo struct that combines the record decl of a primary base with whether it's virtual or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
1b388d470f5e3dd0a1c37e345a876c9845c2379e 27-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix typo, thanks Sebastian!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandard.h
83d5a2a7d5f933cfdba756e76b6c5cc2f61ac37e 27-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix typo, thanks Sebastian!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandard.h
ab9525eab85dde7fde9f9ffb292fe761b0223da5 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Add iterators to BlockDataRegion that allow clients to iterate over the VarRegions for "captured" variables for a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
4240096011a187807058f887eb81df750ffa17fe 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Add iterators to BlockDataRegion that allow clients to iterate over the VarRegions for "captured" variables for a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
768b60a8a134387d7d5ac98f16b18026156e1490 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Added batch versions of GRState::scanReachableSymbols() so that clients can scan a collection of SVals or MemRegions all at once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
9dce71ff2bb3016827f519152bd54830c20bb1da 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Added batch versions of GRState::scanReachableSymbols() so that clients can scan a collection of SVals or MemRegions all at once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
3d908a69b81a6f9164cf8442ad6dabda08613bad 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance LiveVariables to understand that blocks can extend the liveness of a variable by "capturing" them in a BlockExpr.

This required two changes:

1) Added 'getReferencedgetReferencedBlockVars()' to AnalysisContext so
that clients can iterate over the "captured" variables in a block.

2) Modified LiveVariables to take an AnalysisContext& in its
constructor and to call getReferencedgetReferencedBlockVars() when it
processes a BlockExpr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/PathSensitive/AnalysisContext.h
b1a7b65231e86f7da6aacbf00bcdc16c56350e65 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance LiveVariables to understand that blocks can extend the liveness of a variable by "capturing" them in a BlockExpr.

This required two changes:

1) Added 'getReferencedgetReferencedBlockVars()' to AnalysisContext so
that clients can iterate over the "captured" variables in a block.

2) Modified LiveVariables to take an AnalysisContext& in its
constructor and to call getReferencedgetReferencedBlockVars() when it
processes a BlockExpr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/PathSensitive/AnalysisContext.h
0d4c012da45097c5884741e1fefdc2f96254f608 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out a LangStandard class and coalesce the information about the standards into LangStandards.def
- I'd appreciate another pair of eyeballs to double check this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandard.h
lang/Frontend/LangStandards.def
f51ac1b3d0fd39853ba6c04e81149acbca6eead4 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out a LangStandard class and coalesce the information about the standards into LangStandards.def
- I'd appreciate another pair of eyeballs to double check this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/LangStandard.h
lang/Frontend/LangStandards.def
72dfa8de67f5b374caf4cd72908285d46aef052a 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for preprocessor options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
0ff679f5ddd24a4acbeffc9757a9b2a6e4673c14 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for preprocessor options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
25abc98d7bd848e9024a37b35f698cc18aaab06c 26-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor our handling of expression evaluation contexts, so that Sema
maintains a stack of evaluation contexts rather than having the parser
do it. This change made it simpler to track in which contexts
temporaries were created, so that we could...

"Forget" about temporaries created within unevaluated contexts, so
that we don't build a CXXExprWithTemporaries and, therefore, destroy
the integral-constness of our expressions. Fixes PR5609.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2afce7248b7a362f1e322ad18e43484d575b9c9d 26-Nov-2009 Douglas Gregor <dgregor@apple.com> Refactor our handling of expression evaluation contexts, so that Sema
maintains a stack of evaluation contexts rather than having the parser
do it. This change made it simpler to track in which contexts
temporaries were created, so that we could...

"Forget" about temporaries created within unevaluated contexts, so
that we don't build a CXXExprWithTemporaries and, therefore, destroy
the integral-constness of our expressions. Fixes PR5609.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
174b5c7823b30d585db0c44dbe25fc0e4ea2592c 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Refine MemRegions for blocks. Add a new region called
'BlockDataRegion' to distinguish between the code associated with a
block (which is represented by 'BlockTextRegion') and an instance of a
block, which includes both code and data. 'BlockDataRegion' has an
associated LocationContext, which can be used to eventually model the
lifetime of a block object once LocationContexts can represent scopes
(and iterations around a loop, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
0a8112a78d00b5140c5b7f16c3b34c2c0c13c1a0 26-Nov-2009 Ted Kremenek <kremenek@apple.com> Refine MemRegions for blocks. Add a new region called
'BlockDataRegion' to distinguish between the code associated with a
block (which is represented by 'BlockTextRegion') and an instance of a
block, which includes both code and data. 'BlockDataRegion' has an
associated LocationContext, which can be used to eventually model the
lifetime of a block object once LocationContexts can represent scopes
(and iterations around a loop, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
96c4d512d3ce2f9c900de3ae50623583959bf5a4 26-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Allow user re-definition of SEL as well as accessing its fields.
This fixes pr5611.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
369a3bd9979cf529eed529aa037de713c213e47d 26-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Allow user re-definition of SEL as well as accessing its fields.
This fixes pr5611.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c01f9e5cbcab06ff67a12e97897300bbc40f63e1 25-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement the rules in C++ [basic.link] and C99 6.2.2 for computing
the linkage of a declaration. Switch the lame (and completely wrong)
NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(),
along with the "can this declaration be a template argument?" check
that started all of this.

Fixes -fsyntax-only for PR5597.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d85b5b9b8fcf53906d9a61649b3657ca0d902017 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement the rules in C++ [basic.link] and C99 6.2.2 for computing
the linkage of a declaration. Switch the lame (and completely wrong)
NamedDecl::hasLinkage() over to using the new NamedDecl::getLinkage(),
along with the "can this declaration be a template argument?" check
that started all of this.

Fixes -fsyntax-only for PR5597.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3edb303f20257c9250d60598ecbcb1b841414fd4 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Add post-visit Checker support in GRExprEngine for BlockExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
66078610be5e4319de02efa283b07887c73c2e27 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Add post-visit Checker support in GRExprEngine for BlockExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
31983e68d3c9338e7b6e723eb72ef5c995b80f4a 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Make RegisterInternalChecks() part of GRExprEngine's private implementation by making it a static function within GRExprEngine.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
32c4995826c76f282fc05fbbc3241d2dded4fb57 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Make RegisterInternalChecks() part of GRExprEngine's private implementation by making it a static function within GRExprEngine.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
f5028c7fd91dfc91cab36ab486a1b9e8233200e8 25-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for default template arguments of function templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
51ffb0c9d43b2d3fd210e51ecdd67ba5d1790d70 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement support for default template arguments of function templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
112ca686f089a6ad06e2f3749ddb5a4e07801543 25-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose ill-formed uses of default template arguments in
function templates (in C++98), friend function templates, and
out-of-line definitions of members of class templates.

Also handles merging of default template arguments from previous
declarations of function templates, for C++0x. However, we don't yet
make use of those default template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5b6d70e2dece713de82612ffbac2f2bc5c367f73 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Diagnose ill-formed uses of default template arguments in
function templates (in C++98), friend function templates, and
out-of-line definitions of members of class templates.

Also handles merging of default template arguments from previous
declarations of function templates, for C++0x. However, we don't yet
make use of those default template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1cac905e89de668a6ad094f94a949b27827036d1 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> What the FIXMEs want, the FIXMEs shall have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
cdd9686b890ebdc10039ae256ef4c9dfb5ebacb7 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> What the FIXMEs want, the FIXMEs shall have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
4943af3df02880f6e6db197e6050ff188abe0011 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add an arg_iterator, for iterating over a subset of arguments in an ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptSpecifier.h
3b84f5bab9f134741cf4d3c80086009519b6d968 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add an arg_iterator, for iterating over a subset of arguments in an ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptSpecifier.h
1a7868e9a6b3056ad089133d6205b535e5cfec59 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add ParseSourceLocation::FromString, and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
6453f72b8d2ecd85eaef3bf3184fc6db0da5525d 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add ParseSourceLocation::FromString, and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
dcf3234760a3538e1a7a6b1bbf1c4406709f37f2 25-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> This patch streamlines CheckerVisitor.def so that it follows the usual '#ifndef foo' pattern:

#ifndef foo
#define foo(parm1)
#endif

foo(parm1) parm1 ...

#undef foo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
d23c447e4be8310413c473d83aaa547ad10d2271 25-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> This patch streamlines CheckerVisitor.def so that it follows the usual '#ifndef foo' pattern:

#ifndef foo
#define foo(parm1)
#endif

foo(parm1) parm1 ...

#undef foo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
fcbd31311a686139f05764c16e267a537ec879b9 25-Nov-2009 Sean Hunt <rideau3@gmail.com> Parse C++ member check attributes - base_check, hiding, and override.
The attributes are currently ignored.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
7725e67639fa2fe74f8775b7ed884a076ffdbffc 25-Nov-2009 Sean Hunt <rideau3@gmail.com> Parse C++ member check attributes - base_check, hiding, and override.
The attributes are currently ignored.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
0c1c21ac8c7d674455c1c4a9e52bd8fda16a9945 25-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> UndefResults is not needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
bc6c676448f4726dbdf086d4cb066b0fa3e97db2 25-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> UndefResults is not needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
93149185c2695190236e84fc0e6b01642ff44c72 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Add transfer function support for BlockExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c95ad9ff6e574aecdd759542d5578bc65d586d93 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Add transfer function support for BlockExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
20543d8881b0cbdae51b1d58ac1c1a89bc330093 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a precursor to having basic static analysis support for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
eb1c7a04509f5d25c09005a6d46bd8bbb3ca88cb 25-Nov-2009 Ted Kremenek <kremenek@apple.com> Split CodeTextRegion into FunctionTextRegion and BlockTextRegion. This a precursor to having basic static analysis support for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
cc288c291c0b6e71806f376281e8800775e47e6b 25-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Some fancy footwork to move the decision on how
to build casted expression-list AST to Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
f88f7ab5adaa11d050270ffee6aa871e855f83b8 25-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Some fancy footwork to move the decision on how
to build casted expression-list AST to Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
d77dffe44101d3425c00f6eeae6f17c499eb516d 25-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Qualify the name of the llvm::cast template. I am somewhat amazed that GCC parsed this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
3233441b439a3dee9fa187f2c195b5188e71483b 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Qualify the name of the llvm::cast template. I am somewhat amazed that GCC parsed this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
e16949907574662cb76b58caf13b1a4601276bc5 25-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXConditionDeclExpr with extreme prejudice.

All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Frontend/StmtXML.def
lang/Parse/Action.h
lang/Parse/Parser.h
99e9b4d172f6877e6ba5ebe75bb8238721f5e01c 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXConditionDeclExpr with extreme prejudice.

All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Frontend/StmtXML.def
lang/Parse/Action.h
lang/Parse/Parser.h
2f9d7b5fa1fa416089a9a72c6092e06cfd5a2f6c 25-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Have the parser tell sema whether a member declaration is a function definition. This allows sema to not emit spurious diagnostics in some invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d1a7846699a82f85ff3ce6b2e383409537c3f5c5 25-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Have the parser tell sema whether a member declaration is a function definition. This allows sema to not emit spurious diagnostics in some invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a400663825fe7e7a83072d33accabd690d443d4d 24-Nov-2009 Ted Kremenek <kremenek@apple.com> Cleanups and fixes to the nil-receiver checker, some of it fallout the
initial transition of the nil-receiver checker to the Checker
interface as done in r89745. Some important changes include:

1) We consolidate the BugType object used for nil receiver bug
reports, and don't include the type of the returned value in the
BugType (which would be wrong if a nil receiver bug was reported more
than once)

2) Added a new (temporary) flag to CheckerContext: DoneEvauating.
This is used by GRExprEngine when evaluating message expressions to
not continue evaluating the message expression if this flag is set.
This flag is currently set by the nil receiver checker. This is an
intermediate solution to allow the nil-receiver checker to properly
work as a plug-in outside of GRExprEngine. Basically, this flag
indicates that the entire message expression has been evaluated, not
just a precondition (which is what the nil-receiver checker does).
This flag *should not* be repurposed for general use, but just to pull
more things out of GRExprEngine that already in there as we devise a
better interface in the Checker class.

3) Cleaned up the logic in the nil-receiver checker, making the
control-flow a lot easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
fee96e043108b6e24e7d4c5464bf89ac970a7f81 24-Nov-2009 Ted Kremenek <kremenek@apple.com> Cleanups and fixes to the nil-receiver checker, some of it fallout the
initial transition of the nil-receiver checker to the Checker
interface as done in r89745. Some important changes include:

1) We consolidate the BugType object used for nil receiver bug
reports, and don't include the type of the returned value in the
BugType (which would be wrong if a nil receiver bug was reported more
than once)

2) Added a new (temporary) flag to CheckerContext: DoneEvauating.
This is used by GRExprEngine when evaluating message expressions to
not continue evaluating the message expression if this flag is set.
This flag is currently set by the nil receiver checker. This is an
intermediate solution to allow the nil-receiver checker to properly
work as a plug-in outside of GRExprEngine. Basically, this flag
indicates that the entire message expression has been evaluated, not
just a precondition (which is what the nil-receiver checker does).
This flag *should not* be repurposed for general use, but just to pull
more things out of GRExprEngine that already in there as we devise a
better interface in the Checker class.

3) Cleaned up the logic in the nil-receiver checker, making the
control-flow a lot easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
64ba265d4b05c2621add63b6d5959ac321bd5dc3 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Clean up the AST for while loops and fix several problems with
cleanups for while loops:

1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,

while (shared_ptr<WorkInt> p = getWorkItem()) {
// ...
}

2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,

while (blah)
RAIIObject raii(blah+1);



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5656e14d91405417182171a705ed3e3d2d6d7aa3 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Clean up the AST for while loops and fix several problems with
cleanups for while loops:

1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,

while (shared_ptr<WorkInt> p = getWorkItem()) {
// ...
}

2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,

while (blah)
RAIIObject raii(blah+1);



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
47e18bea5f3330ad69725c7d8d23a5a3f862d14e 24-Nov-2009 John McCall <rjmccall@apple.com> Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and
DependentScopeDeclRefExpr support storing templateids. Unite the common
code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr.

This gets us to a point where we don't need to store function templates in
the AST using TemplateNames, which is critical to ripping out OverloadedFunction.

Also resolves a few FIXMEs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
f7a1a744eba4b29ceb0f20af8f34515d892fdd64 24-Nov-2009 John McCall <rjmccall@apple.com> Rip out TemplateIdRefExpr and make UnresolvedLookupExpr and
DependentScopeDeclRefExpr support storing templateids. Unite the common
code paths between ActOnDeclarationNameExpr and ActOnTemplateIdExpr.

This gets us to a point where we don't need to store function templates in
the AST using TemplateNames, which is critical to ripping out OverloadedFunction.

Also resolves a few FIXMEs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
7a63864c30f20df3da1f9d674ae731ce2aeb9fed 24-Nov-2009 John McCall <rjmccall@apple.com> DeclarationName::getIdentifier should take a const IdentifierInfo, since the
constructor does anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
909e58988b3a3bb2ad36bec03aafa1302544fd73 24-Nov-2009 John McCall <rjmccall@apple.com> DeclarationName::getIdentifier should take a const IdentifierInfo, since the
constructor does anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
457afc93c071f6bf414b29c2feec83d2dea9d505 24-Nov-2009 John McCall <rjmccall@apple.com> Helper function for turning a TemplateName into a DeclarationName.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
80ad16f4b2b350ddbaae21a52975e63df5aafc2c 24-Nov-2009 John McCall <rjmccall@apple.com> Helper function for turning a TemplateName into a DeclarationName.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9a1020a0528e6c9b0bf0ff1eb44cec471469f6e6 24-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make sure redeclaration chains are properly linked, even through invalid decls. This fixes PR5415.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
46408eedfff5aa33662cedb6716a20616f3bad31 24-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make sure redeclaration chains are properly linked, even through invalid decls. This fixes PR5415.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
a4b8172b40e73af01884d28c0e832ab117951eb6 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Explicitly store the condition variable within switch statements, and
make sure that this variable is destroyed when we exit the switch
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d3d5301c44138b92bf01286183f5bf310cdd37cf 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Explicitly store the condition variable within switch statements, and
make sure that this variable is destroyed when we exit the switch
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
2d9fa6dc9811f26a4c108f176e5c756943426ff0 24-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove trailing spaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/StmtXML.def
87392c4919f7ff2653ffec8b915b4dc7099a69dc 24-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove trailing spaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/StmtXML.def
39c2ebcf7097defbccd2e5b2d56a53a61e4dbf03 24-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add getByteSize() and getTypeSizeInBytes().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f5f514477d8a4e04e511d345b9fb896153f70e9d 24-Nov-2009 Ken Dyck <ken.dyck@onsemi.com> Add getByteSize() and getTypeSizeInBytes().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d403230ff3c353d93f8222a1545bd3024f9c47c9 24-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor undefined result checker. This is the last one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
668399b23cf18124c8c8c41a14a7712212f6fa45 24-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor undefined result checker. This is the last one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
6735d0154b73d6687960db9bd6b3a3fa0ad903ea 24-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor NilReceiverStructRet and NilReceiverLargerThanVoidPtrRet into
CallAndMessageChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
2055effed54d614b51e3501a174c9b1fe92e4de4 24-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor NilReceiverStructRet and NilReceiverLargerThanVoidPtrRet into
CallAndMessageChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
a4926fff519308f8ef6cd52137100e8c121f36f1 24-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove trailing spaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
990a07c0954c387813fa9cece48c0fdfac484d30 24-Nov-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove trailing spaces

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DeclXML.def
60d96290a5b2e86a14b80c304964d67424515a52 24-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance null dereference diagnostics by indicating what variable (if any) was dereferenced. Addresses <rdar://problem/7039161>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
e576af2754bfa309bb10a518bbc17c81b9e0723f 24-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance null dereference diagnostics by indicating what variable (if any) was dereferenced. Addresses <rdar://problem/7039161>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
4b756410f4c0f06cbcd901cfeface345816289c8 24-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
33a33d8abd7a3d49eacc05e40c00b00634bf1ee9 24-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
ccb5a3248dbe899ccd0081c0b4e62e2842956496 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8cfe5a784133d90bf329fd20801824a6f71bb8ca 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
27d0014be2d42ace977745f5d232ea1359f1847c 24-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of diagnostic options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
21affc089773edc30be43ecb0022a48acdac7093 24-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of diagnostic options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
f66c615e1a2d66a99dc4be9eaa76184d51cfd402 23-Nov-2009 Ted Kremenek <kremenek@apple.com> Clean up the Checker API a little more, resolving some hidden bugs
along the way. Important changes:

1) To generate a sink node, use GenerateSink(); GenerateNode() is for
generating regular transitions. This makes the API clearer and also
allows us to use the 'bool' option to GenerateNode() for a different
purpose.

2) GenerateNode() now automatically adds the generated node to the
destination ExplodedNodeSet (autotransition) unless the client
specifies otherwise with a bool flag. Several checkers did not call
'addTransition()' after calling 'GenerateNode()', causing the
simulation path to be prematurely culled when a non-fail stop bug was
encountered.

3) Add variants of GenerateNode()/GenerateSink() that take neither a
Stmt* or a GRState*; most callers of GenerateNode() just pass in the
same Stmt* as provided when the CheckerContext object is created; we
can just use that the majority of the time. This cleanup also allows
us to potentially coelesce the APIs for evaluating branches and
end-of-paths (which currently directly use builders).

4) addTransition() no longer needs to be called except for a few
cases. We now have a variant of addTransition() that takes a
GRState*; this allows one to propagate the updated state without
caring about generating a new node explicitly. This nicely cleaned up
a bunch of cases that called autoTransition() with a bunch of
conditional logic surround the call (that common logic has now been
swallowed up by addTransition() itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
19d67b52b73c04ef8eb663980330a1de2b47c845 23-Nov-2009 Ted Kremenek <kremenek@apple.com> Clean up the Checker API a little more, resolving some hidden bugs
along the way. Important changes:

1) To generate a sink node, use GenerateSink(); GenerateNode() is for
generating regular transitions. This makes the API clearer and also
allows us to use the 'bool' option to GenerateNode() for a different
purpose.

2) GenerateNode() now automatically adds the generated node to the
destination ExplodedNodeSet (autotransition) unless the client
specifies otherwise with a bool flag. Several checkers did not call
'addTransition()' after calling 'GenerateNode()', causing the
simulation path to be prematurely culled when a non-fail stop bug was
encountered.

3) Add variants of GenerateNode()/GenerateSink() that take neither a
Stmt* or a GRState*; most callers of GenerateNode() just pass in the
same Stmt* as provided when the CheckerContext object is created; we
can just use that the majority of the time. This cleanup also allows
us to potentially coelesce the APIs for evaluating branches and
end-of-paths (which currently directly use builders).

4) addTransition() no longer needs to be called except for a few
cases. We now have a variant of addTransition() that takes a
GRState*; this allows one to propagate the updated state without
caring about generating a new node explicitly. This nicely cleaned up
a bunch of cases that called autoTransition() with a bunch of
conditional logic surround the call (that common logic has now been
swallowed up by addTransition() itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
7deb1a5f25fa38306fec3b79129df808fdb90eb6 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle converting member pointers to bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bc0e0781da778bd5eb41a810419912893ae20448 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle converting member pointers to bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fa5b709bcdedb3e6821f1e9277aa58403717d861 23-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a recent regression probably caused by addition of altivec-style
type-casts in the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a79f8b3989558884d9dbbbdbd4da861117345865 23-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a recent regression probably caused by addition of altivec-style
type-casts in the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1b02d43b6715b48d5230634852ab80066da3a917 23-Nov-2009 Ted Kremenek <kremenek@apple.com> Provide out-of-line definition for destructor of Checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
c6e11fff7623e07681a29c103fcf0bb5c5b39140 23-Nov-2009 Ted Kremenek <kremenek@apple.com> Provide out-of-line definition for destructor of Checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
1c5ecf0835f3153ad95c8972ac6e657717e4ab36 23-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Intercept sizeof and alignof references before they get into ASTContext methods. This fixes a crash when writing sizeof(Incomplete&), and lets ASTContext's methods do the right thing for CodeGen, which fixes PR5590.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5d484e8cf710207010720589d89602233de61d01 23-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Intercept sizeof and alignof references before they get into ASTContext methods. This fixes a crash when writing sizeof(Incomplete&), and lets ASTContext's methods do the right thing for CodeGen, which fixes PR5590.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b4a0a8293aff2c6160e11edb51d8715a670248c6 23-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Let using directives refer to namespace aliases. Fixes PR5479.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
eb0d8c95b43549ebf1acbb78d597901ace6dc8b7 23-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Let using directives refer to namespace aliases. Fixes PR5479.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6f004c558de407237662ee018bd84b897a54b71f 23-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Require a class type to be complete before probing its conversion
functions for a switch condition's conversion to integral or
enumeration type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f21bac640870db0569e697a8a14f59f6ca069f80 23-Nov-2009 Douglas Gregor <dgregor@apple.com> Require a class type to be complete before probing its conversion
functions for a switch condition's conversion to integral or
enumeration type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
40a5b87dba33d7113618513c375a152c62dcb1a8 23-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement conversion from a switch condition with class type to an
integral or enumeration type (vi user-defined conversions). Fixes PR5518.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
84fb9c0be621c9e4ca4e56f67dae2a0bb6e44821 23-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement conversion from a switch condition with class type to an
integral or enumeration type (vi user-defined conversions). Fixes PR5518.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a3f73b773c9a8b982b5ff65a3d3e25cd751a4709 23-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Tolerate extraneous "template<>" headers better, downgrading the
complaint to a warning and providing a helpful node in the case where
the "template<>" header is redundant because the corresponding
template-id refers to an explicit specialization. C++0x might still
change this behavior, and existing practice is all over the place on
the number of "template<>" headers actually needed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3ebd75399112dd9ad1c96ee5e7c59df580378cc8 23-Nov-2009 Douglas Gregor <dgregor@apple.com> Tolerate extraneous "template<>" headers better, downgrading the
complaint to a warning and providing a helpful node in the case where
the "template<>" header is redundant because the corresponding
template-id refers to an explicit specialization. C++0x might still
change this behavior, and existing practice is all over the place on
the number of "template<>" headers actually needed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
39e1291cdbae6ce02b7642b12dd39af8762cfa93 23-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Centralize and complete the computation of value- and type-dependence for DeclRefExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
0da76df9218d7c27b471b0a4d83a5b29fe24e5b4 23-Nov-2009 Douglas Gregor <dgregor@apple.com> Centralize and complete the computation of value- and type-dependence for DeclRefExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
f3dd9b5d08647f4ede159e6715c343014f8bfb2d 23-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Initial refactor of UndefBranchChecker. We still use GRBranchNodeBuilder
in the checker directly. But I don't have a better approach for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
0835e4cccfef3ea5346962722b79484f6b3ca602 23-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Initial refactor of UndefBranchChecker. We still use GRBranchNodeBuilder
in the checker directly. But I don't have a better approach for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
ed9480970db65f8705eeba0760fbe8feefe6389b 23-Nov-2009 John McCall <rjmccall@apple.com> Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into
a new class. Use it pervasively throughout Sema.

My fingers hurt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/TemplateBase.h
lang/AST/Type.h
d5532b6cfff2977e0c59fa6ead7f7973984a620d 23-Nov-2009 John McCall <rjmccall@apple.com> Encapsulate "an array of TemplateArgumentLocs and two angle bracket locations" into
a new class. Use it pervasively throughout Sema.

My fingers hurt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/TemplateBase.h
lang/AST/Type.h
0fd696eb70d53f5135a62fbec67bbf1ada621293 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of analyzer options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
e2814d89025b847ad7363b21e3e053bbae180b54 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of analyzer options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
807db3e6d5c5223413cabc6207847e049eb8b4cf 22-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Save and restore the HasGen flag in MallocChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
f605aae3227ffa3a5dae8eb34fdd79ba0a0d19d1 22-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Save and restore the HasGen flag in MallocChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
8a1b07e8a021935affe1f3e056a3fdcf1dacfd80 22-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove UndefinedAssignmentChecker's header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h
c3372e0ee8dac4fc11c771a92b05e4641bce6b32 22-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove UndefinedAssignmentChecker's header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h
331835cdfdc06157ab5143808dd44f3143e9861e 22-Nov-2009 John McCall <rjmccall@apple.com> Consider a FunctionTemplate to be an overload all on its lonesome. Track
this information through lookup rather than rederiving it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
7453ed4cb2cab113de3378df371b1c6f1243d832 22-Nov-2009 John McCall <rjmccall@apple.com> Consider a FunctionTemplate to be an overload all on its lonesome. Track
this information through lookup rather than rederiving it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a238d6daa15f845738a8b15a3bc9f5b84617744b 21-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch implements objective-c's 'SEL' type as a built-in
type and fixes a long-standing code gen. crash reported in
at least two PRs and a radar. (radar 7405040 and pr5025).
There are couple of remaining issues that I would like for
Ted. and Doug to look at:

Ted, please look at failure in Analysis/MissingDealloc.m.
I have temporarily added an expected-warning to make the
test pass. This tests has a declaration of 'SEL' type which
may not co-exist with the new changes.

Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp.
I think the changes which I have ifdef'ed out are correct. They
need be considered for in a few Indexer/PCH test cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
13dcd00615de5c4279d97bdf63cd5f0a14fd9dcc 21-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch implements objective-c's 'SEL' type as a built-in
type and fixes a long-standing code gen. crash reported in
at least two PRs and a radar. (radar 7405040 and pr5025).
There are couple of remaining issues that I would like for
Ted. and Doug to look at:

Ted, please look at failure in Analysis/MissingDealloc.m.
I have temporarily added an expected-warning to make the
test pass. This tests has a declaration of 'SEL' type which
may not co-exist with the new changes.

Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp.
I think the changes which I have ifdef'ed out are correct. They
need be considered for in a few Indexer/PCH test cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
7b9d4282306c37af1f96e17585a07f6a31427ed9 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Fix 80-cols violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
37ac7990a6236ba1c42cfaa0d0efae921afd0e51 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Fix 80-cols violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
4b7111c501f61fb9a618408324f179c9dac00136 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add 1+2 consts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
c52365674b5b157a0486f75c12dd9f4cc41d8089 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add 1+2 consts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
a32612ec0fdca70ce6dea0c7477e64bef1691906 21-Nov-2009 John McCall <rjmccall@apple.com> "Incremental" progress on using expressions, by which I mean totally ripping
into pretty much everything about overload resolution in order to wean
BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace
UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the
idea of a non-member lookup that we haven't totally resolved yet, whether by
overloading, argument-dependent lookup, or (eventually) the presence of
a function template in the lookup results.

Incidentally fixes a problem with argument-dependent lookup where we were
still performing ADL even when the lookup results contained something from
a block scope.

Incidentally improves a diagnostic when using an ObjC ivar from a class method.
This just fell out from rewriting BuildDeclarationNameExpr's interaction with
lookup, and I'm too apathetic to break it out.

The only remaining uses of OverloadedFunctionDecl that I know of are in
TemplateName and MemberExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
ba13543329afac4a0d01304ec2ec4924d99306a6 21-Nov-2009 John McCall <rjmccall@apple.com> "Incremental" progress on using expressions, by which I mean totally ripping
into pretty much everything about overload resolution in order to wean
BuildDeclarationNameExpr off LookupResult::getAsSingleDecl(). Replace
UnresolvedFunctionNameExpr with UnresolvedLookupExpr, which generalizes the
idea of a non-member lookup that we haven't totally resolved yet, whether by
overloading, argument-dependent lookup, or (eventually) the presence of
a function template in the lookup results.

Incidentally fixes a problem with argument-dependent lookup where we were
still performing ADL even when the lookup results contained something from
a block scope.

Incidentally improves a diagnostic when using an ObjC ivar from a class method.
This just fell out from rewriting BuildDeclarationNameExpr's interaction with
lookup, and I'm too apathetic to break it out.

The only remaining uses of OverloadedFunctionDecl that I know of are in
TemplateName and MemberExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
53529e8c71aa94b2ea008510a577d59ba8afe3f6 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
lang/Parse/Parser.h
bbd37c62e34db3f5a95c899723484a76c71d7757 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
lang/Parse/Parser.h
1ecdb74fddd711f4d29fb5492c5c04243ca5b115 21-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement C++ [temp.param]p2 correctly, looking ahead when we see a
"typename" parameter to distinguish between non-type and type template
parameters. Fixes the actual bug in PR5559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
98440b4ac17dc5f85ea3db683c1c1785449c17e1 21-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement C++ [temp.param]p2 correctly, looking ahead when we see a
"typename" parameter to distinguish between non-type and type template
parameters. Fixes the actual bug in PR5559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5ae2d050d90fd66fbca01a26d204cef01e2ce000 21-Nov-2009 Ted Kremenek <kremenek@apple.com> Pull BadCallChecker int UndefinedArgChecker, and have UndefinedArgChecker also handled undefined receivers in message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c79d7d49c5ec42e8bb6ac34350ebb5bc24ca663d 21-Nov-2009 Ted Kremenek <kremenek@apple.com> Pull BadCallChecker int UndefinedArgChecker, and have UndefinedArgChecker also handled undefined receivers in message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
14a70a3beef619fd82fc190754023656554f452b 21-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
9cf910efc4fb7001a6d276ed2eabf01f0f0efaaa 21-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
500ca35d30b275fae4eb834d44436459f6f9f6a6 21-Nov-2009 Ted Kremenek <kremenek@apple.com> More checker refactoring. Passing undefined values in a message expression is now handled by UndefinedArgChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
64fa85855638d69e56ed1b2fad7ed65deb3ecdfd 21-Nov-2009 Ted Kremenek <kremenek@apple.com> More checker refactoring. Passing undefined values in a message expression is now handled by UndefinedArgChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
9ae4976e33e484b05a6ed1910a10570fcafce8f5 21-Nov-2009 Mike Stump <mrs@apple.com> Checkpoint current work. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
2bf701ee4babb5c4a9ea99ca4675c5ef040bd402 21-Nov-2009 Mike Stump <mrs@apple.com> Checkpoint current work. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
51d8507971945b0b848ecedf74cafda48d2268be 21-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Cope with extraneous "template" keyword when providing an out-of-line
definition of a member template (or a member thereof). Fixes PR5566.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a481edb1b11c956a46cb42cd0dc4dd9851c10801 21-Nov-2009 Douglas Gregor <dgregor@apple.com> Cope with extraneous "template" keyword when providing an out-of-line
definition of a member template (or a member thereof). Fixes PR5566.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1a21a63ef46cda04659418aee51314641860bfe6 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add clang -cc1 dependency output options parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
1bed0c3a555d9e32de9dead55658b4a28a4d6e03 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add clang -cc1 dependency output options parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
e57bf1d80dc8e70add82f4a40a0c8014aa92e800 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
20be8c4551d49fe66835baf1200be85ac2fd0c86 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
a36fcdcff6335dbae850c2ba882dee8b97384baf 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Update for palign intrinsic fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
56cd500ff6851b081261d72c98b25662c3c4a4fb 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Update for palign intrinsic fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/BuiltinsX86.def
32d9526bd9375a5078b811053fbe7573699e80d4 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
a31100e62f83933432df9092a04e48f9e5561a14 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
f1408014375a5a65a277e8aa177055878939490f 20-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement C++ [basic.lookup.classref]p3, which states how the type
name 'T' is looked up in the expression

t.~T()

Previously, we weren't looking into the type of "t", and therefore
would fail when T actually referred to an injected-class-name. Fixes
PR5530.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f6e6fc801c700c7b8ac202ddbe550d9843a816fc 20-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement C++ [basic.lookup.classref]p3, which states how the type
name 'T' is looked up in the expression

t.~T()

Previously, we weren't looking into the type of "t", and therefore
would fail when T actually referred to an injected-class-name. Fixes
PR5530.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a1a1086a21b5126cb786905bc1c8dfd6d5599d72 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of CodeGenOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
50a4487683a7e09fb93e8b506181e034241a0ffe 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of CodeGenOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
9fcbca2b6e4fb937d19de25c3db9aa2f588f87f9 20-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> no need to cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
21433a5fece2bb9a2c1792c18edd13b8d77e0bbd 20-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> no need to cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
46f33d7a3e4e75d629a94dc7adb334441b64dbc7 20-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> No need to pass the state argument explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
04b826daa7d5e81d163adc10bf23248caedc99df 20-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> No need to pass the state argument explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
e1dbc37bcd8fd50ca8d24c0860fc7a8c23417520 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
31db76cb2dde031ab3262808ac233889daf7d720 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.td
ce6419e14dedcb3b8345b6d09dabf5ac7b28407f 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Ignore -Wstrict-overflow={3,4,5} for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
6ac78bf87e2a3c22a60db2d8c495f7c75ae1dcb0 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Ignore -Wstrict-overflow={3,4,5} for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
ccb556aedb901dfaad70f5ea8b815e7c47a533e6 19-Nov-2009 John McCall <rjmccall@apple.com> Draw a brighter line between "unresolved" expressions, where we have done the
appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
865d447ac6a4721ab58e898d014a21f2eff74b06 19-Nov-2009 John McCall <rjmccall@apple.com> Draw a brighter line between "unresolved" expressions, where we have done the
appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
1afca66f4228d6acdc8ef2bf31a032184a36d506 19-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Don't issue spurious diagnostic with Obj-C fast enumeration.
(radar 7409165).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a7cf23a72b0846fc5aacf3f38bb8c8f9e76784cf 19-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Don't issue spurious diagnostic with Obj-C fast enumeration.
(radar 7409165).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
61985cf402d2ab2347c1d103ccc07c25e2935ff5 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix some default in the option classes, and some CompilerInvocation argification
errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
lang/Frontend/FrontendOptions.h
1be3b3bd5c983e3fc5b78db155632d2d2d6aa968 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix some default in the option classes, and some CompilerInvocation argification
errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
lang/Frontend/FrontendOptions.h
41d2ba60853dbcf8594ddd0459a308851ea0e4a4 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing dependency on TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Makefile
f7b56fa451893699178b17d88644447bd5dbabd3 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing dependency on TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Makefile
3af73da5dae06dddcbb29c36415798f50286f229 19-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix 80 col. violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c05f23994720b3eb0a3b3494e7bfcec9e1536c89 19-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix 80 col. violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
5e0594fbfee826dc8766317aaae775b25dff8dd1 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.h
lang/Driver/OptParser.td
lang/Driver/Options.h
a08304a38c2fecd647f41039d2245f0c4cd33504 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.h
lang/Driver/OptParser.td
lang/Driver/Options.h
4c64599a52bf40b3843614c61b41d34dba44eb48 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Sentinel flag to option kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
f010b26b60f3f51b6fa0335218c9a458ec30cff4 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Sentinel flag to option kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptParser.td
393c00d16a75731eceb7f815751722e4b4a950e4 19-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Cope with an amusingly little anomaly with dependent types and
incomplete array initialization, where we have the following in a
template:

int a[] = { 1, 2, something-value-dependent };
// ...
sizeof(a);

The type of "a" appears to be a non-dependent IncompleteArrayType, but
treating it as such makes the sizeof(a) fail at template definition
time. We now correctly handle this by morphing the IncompleteArrayType
into a DependentSizedArrayType with a NULL expression, indicating that
its size has no corresponding expression (and, therefore, the type is
distinct from others).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
cb78d8852a454684c987220132cdb5e54dd00121 19-Nov-2009 Douglas Gregor <dgregor@apple.com> Cope with an amusingly little anomaly with dependent types and
incomplete array initialization, where we have the following in a
template:

int a[] = { 1, 2, something-value-dependent };
// ...
sizeof(a);

The type of "a" appears to be a non-dependent IncompleteArrayType, but
treating it as such makes the sizeof(a) fail at template definition
time. We now correctly handle this by morphing the IncompleteArrayType
into a DependentSizedArrayType with a NULL expression, indicating that
its size has no corresponding expression (and, therefore, the type is
distinct from others).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ef7852884e0ae4748a7e2e91e7961b623062a4f4 19-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Objective-C code completion within properties after "setter = " or
"getter = ", to provide suitable method names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
lang/Sema/CodeCompleteConsumer.h
4ad9685b3e2d5e2923c9cda7baaf7973ef0b1c62 19-Nov-2009 Douglas Gregor <dgregor@apple.com> Objective-C code completion within properties after "setter = " or
"getter = ", to provide suitable method names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
lang/Sema/CodeCompleteConsumer.h
ba4210eb6cd5c5d06fbb1d86bb75f010bd922b9a 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing init.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
47cd787877c0a402c16956810ac75118f571f037 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing init.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
163b52ba0a0954e6a04a1bdfdcc58d87565e7c7a 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch .td file and build system goop for OptTable based clang-cc options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.h
lang/Driver/CC1Options.td
lang/Driver/CMakeLists.txt
lang/Driver/Makefile
8adfcff02334455b6f95bc4e1f347204f7c0dd3e 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch .td file and build system goop for OptTable based clang-cc options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CC1Options.h
lang/Driver/CC1Options.td
lang/Driver/CMakeLists.txt
lang/Driver/Makefile
2d944943497eca819e239dad3c320d61923cef26 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out OptTable::ParseArgs, for parsing an entire argument vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptTable.h
847abaa62883b6c20005bdd3346ebbd44e46dbac 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out OptTable::ParseArgs, for parsing an entire argument vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/OptTable.h
3974c2db5492c532a8d144200c37e3f5f487a071 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Remove some more llvm::cl::init arguments, by only setting values when
the argument is given.

Also, tweak Opt.Sysroot defaulting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
c59dc9274612f318d43910a3b5de19997a8eb656 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Remove some more llvm::cl::init arguments, by only setting values when
the argument is given.

Also, tweak Opt.Sysroot defaulting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
469415844fdbb50242c9a5836628732adab05098 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList doesn't depend on Options.h anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
265e9ef9f3ef30a97790e6e7bbc3c17d97981ca7 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList doesn't depend on Options.h anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
0cefb592b02535db64382a15da204b7b770e56e5 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Take option ID for {Input,Unknown}Option, to drop dependency on actual options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
a0289fda5b5d67ad49596a5e1f62e1f9db497d06 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Take option ID for {Input,Unknown}Option, to drop dependency on actual options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
ef9c002425bf3acfe3659ab08de01b3abec0cdc1 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce OptSpecifier class for protecting access to an option id.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptSpecifier.h
lang/Driver/OptTable.h
lang/Driver/Option.h
9e1f98260a1842df4bb8e6de0b592a1622dcfdc0 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce OptSpecifier class for protecting access to an option id.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptSpecifier.h
lang/Driver/OptTable.h
lang/Driver/Option.h
0d76dea24f8314ee742905e062b2ee538b90bd1a 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
- Most driver code always claims, and bool arguments don't play nice with the overloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
e4bdae78c69d2a09ee96619cc5ccf81441674412 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
- Most driver code always claims, and bool arguments don't play nice with the overloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
d6678af9737c6700ac613964d955496f0636f44b 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Resolve inconsistency in matching options against options which are
aliases -- just treat this case as an (unchecked) client error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
b32aa51ce9b608002a031e8ca682f073e28024cf 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Resolve inconsistency in matching options against options which are
aliases -- just treat this case as an (unchecked) client error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
514bc4437862ec6996e9c51c3f672f3a03277998 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove extra ';', found by clang++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
6f776b0c943c0065b5148297e61afbe29d54cc51 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove extra ';', found by clang++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
6e60f5fab8203f51b1eac69c8f071c786d5fa39e 19-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Improve code completion for Objective-C message sends, so that we
provide completion results before each keyword argument, e.g.,

[foo Method:arg WithArg1:arg1 WithArg2:arg2]

We now complete before "WithArg1" and before "WithArg2", in addition
to completing before "Method".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
d3c6854153fd6bc6a412a29e4491dbd0a47bdb14 19-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve code completion for Objective-C message sends, so that we
provide completion results before each keyword argument, e.g.,

[foo Method:arg WithArg1:arg1 WithArg2:arg2]

We now complete before "WithArg1" and before "WithArg2", in addition
to completing before "Method".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
7e37793a51f1a6ad5d4369177235a3e3a52ddce3 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using TableGen'erated Options.inc instead of Options.def file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CMakeLists.txt
lang/Driver/CMakeLists.txt
lang/Driver/Makefile
lang/Driver/OptParser.td
lang/Driver/Options.def
lang/Driver/Options.h
lang/Driver/Options.td
lang/Makefile
64bdce3f02091b0a4e1528d690495970c1249803 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using TableGen'erated Options.inc instead of Options.def file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CMakeLists.txt
lang/Driver/CMakeLists.txt
lang/Driver/Makefile
lang/Driver/OptParser.td
lang/Driver/Options.def
lang/Driver/Options.h
lang/Driver/Options.td
lang/Makefile
dd7c00f2ae32ea2c1cc955b122ec45ced6d9b149 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Split OptTable out into OptTable.{h,cpp}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptTable.h
lang/Driver/Options.h
27e738d0d3f781672a5999d2a9e2827b00a97d0c 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Split OptTable out into OptTable.{h,cpp}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/OptTable.h
lang/Driver/Options.h
7ee33727703b1972fced6a6e0fb4aee656d8b4a6 19-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Improve code-completion results for the flags in an @property
declaration by providing patterns for "getter = <method>" and "setter
= <method>". As part of this, invented a new "pattern" result kind
that is merely a semantic string. The "pattern" result kind should
help with other kinds of code templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
54f016150acf7e0d4dab702d3d7d5e40ba1fdebf 19-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve code-completion results for the flags in an @property
declaration by providing patterns for "getter = <method>" and "setter
= <method>". As part of this, invented a new "pattern" result kind
that is merely a semantic string. The "pattern" result kind should
help with other kinds of code templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
3d682f21889a52f57b244e4c3635f1640ecb52f1 19-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Rename CodeCompleteObjCProperty to something more specific. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a93b108e025ef2480fa867cc533e7781a40a639b 19-Nov-2009 Douglas Gregor <dgregor@apple.com> Rename CodeCompleteObjCProperty to something more specific. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2359600f15eeb83b24ae675045a07cd239a629c2 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion after @dynamic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
424b2a546dbd09cf70d43087771c7fff851ca158 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Code completion after @dynamic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a6a4e66b9a313407931ac91b941221b013080b3a 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion for Objective-C @synthesized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
322328b8a65ad2e45829eb06d245addb64037f6f 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Code completion for Objective-C @synthesized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c764354133398d5decdb8f88b72e6c008c93bbbd 18-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes a bug in misdiagnosing correct
use of pointer to data member.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
05ebda9490e15f900edb2e5c690e067abcb37b2e 18-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes a bug in misdiagnosing correct
use of pointer to data member.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
df3ee13cdbbbd68e45b31f97dd71197575b65d55 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rework OptTable to have no dependency on the options it manages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
a79a2b5bf23d1422eed9be3793186ebbba7532ec 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rework OptTable to have no dependency on the options it manages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
1e427b002936650c300beb45e6ffbaa6654e3d40 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Store Option ID field as unsigned to drop dependency on the options
type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
1d189e187b1bf7d7677aefd7482bcdad29683a0c 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Store Option ID field as unsigned to drop dependency on the options
type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
f9af3b2becb7e7dbc76a73af721f2da994df992e 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics and recovery when parsing @synthesized definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
b328c4251a9d2db704b3bd46ec04884dc8e56332 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics and recovery when parsing @synthesized definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
502995460462ad6a49a9cbb84dab33d7ea75b437 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement code completion for Objective-C category names in @interface
and @implementation declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
33ced0b8550f3e7169f326944731ee02e9338659 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement code completion for Objective-C category names in @interface
and @implementation declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
fcffbe7ac7f3c0b86bbef40990ccbeadc6ffdcee 18-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Improve on diagnosing type mismatches because of
lack of viable convesion functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc5306ac8a39cdd5e7f83e597cba911e97c4a595 18-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Improve on diagnosing type mismatches because of
lack of viable convesion functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c4db6723b8630f6a5184e9e8b70b41b374484c7a 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
into a string).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
a4f64805e032fa6a669434ca3f9c04b02f1bbd97 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
into a string).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
11881a45ef70f5107501a89e82e2a328b24ecf6c 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion for Objective-C class names after @interface,
@implementation, and in the declaration of the superclass of an
@interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
3b49aca913dc0c1838321b9bb2dc9a4cb4681922 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Code completion for Objective-C class names after @interface,
@implementation, and in the declaration of the superclass of an
@interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
16a726b129e225e2560927f8e9668ddeb5d8f492 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion after @property, providing the names of forward-declared properties

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
083128f6b13dfa4fc615a838c49b516d901b1ac0 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Code completion after @property, providing the names of forward-declared properties

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c7d37b2f351456c5bff6ef45303fb6323c05355a 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion for Objective-C properly lists

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
55385fe3e723cd675001e45f42d61adde6b7f075 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Code completion for Objective-C properly lists

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9d020f660eea532c69449d77862f842b1538c62b 18-Nov-2009 John McCall <rjmccall@apple.com> Incremental progress on using declarations. Split UnresolvedUsingDecl into
two classes, one for typenames and one for values; this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard. Track the location of the 'typename' keyword in a using-typename
decl. Make a new lookup result for unresolved values and deal with it in
most places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
7ba107a1863ddfa1664555854f0d7bdb3c491c92 18-Nov-2009 John McCall <rjmccall@apple.com> Incremental progress on using declarations. Split UnresolvedUsingDecl into
two classes, one for typenames and one for values; this seems to have some
support from Doug if not necessarily from the extremely-vague-on-this-point
standard. Track the location of the 'typename' keyword in a using-typename
decl. Make a new lookup result for unresolved values and deal with it in
most places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
1df77a912b351f6c9d668b1c335abf301f04a8ab 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Add ObjCClassDecl::getSourceRange().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2dbdd622d02d1bfbe1e5bcf421b07b74c7a748f1 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Add ObjCClassDecl::getSourceRange().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d1448cac120e790d85643475f88a02ede2fb53fa 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
321c22f1c4271c3d9a3d4d3fc18847f948ab595b 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
cc63b0ae295c41df978ae287d9fbf452394553bf 18-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Rename Objective-C message send completion functions to indicate that we're referring to message sends

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
60b01cc44855d62979f76dc4cdffa4277f321049 18-Nov-2009 Douglas Gregor <dgregor@apple.com> Rename Objective-C message send completion functions to indicate that we're referring to message sends

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
47c04774d0e646160cb4cbc2ae1ea9f2e5df04d7 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c09cba67d0ad01e53e0fed07322e95dd281bcfd9 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
93e324813bd8c55ac19aaac0123eb4e294a6fa44 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/LangOptions.h
lang/Driver/Options.def
5e530af5d51572a0ed5dbe50da54bd333840c63d 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/LangOptions.h
lang/Driver/Options.def
b6dc4510e8ad6aaf73214bb984d053e8b4216511 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89131 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
738855554394a6afcf39cc8345fd22c3756b8dd0 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89131 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
623c5dd781c5aa64c91f825f6d9a3b6dea04f5ae 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Allow "source_filename" to be an optional argument (the client can provide NULL). This allows the client to put the source_filename in the command_line_args without fear of the file being named twice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89118 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4633d1b26949346b6c0e707f76b899c79948b592 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Allow "source_filename" to be an optional argument (the client can provide NULL). This allows the client to put the source_filename in the command_line_args without fear of the file being named twice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89118 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6b16b29529787b8d7b5403b0e338d6aff587db9f 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a typo, reported by Doug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1ac7104947020a60430ba6f519cd5869af77046f 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a typo, reported by Doug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e4f33fbd5005a236d88314528058d6db8b12c506 17-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure, for sure this time, that expressions do not have reference type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
905d11d53aeb6b26744f44fedc2b2820c7a62df6 17-Nov-2009 Douglas Gregor <dgregor@apple.com> Make sure, for sure this time, that expressions do not have reference type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ab9c3e9089b542af76352ac862a71b4fe709a958 17-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> StringRef'ify CodeCompletionString

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
92eff466867fd6a82fb3e245f2091e96a3e9888e 17-Nov-2009 Douglas Gregor <dgregor@apple.com> StringRef'ify CodeCompletionString

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
e5e4346173de621c9609abd1bd772c4816c97813 17-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix MSVC warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticsClient.h
bd8405898be641ad9574b210fb70c5d449cef578 17-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix MSVC warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticsClient.h
c85b911b3e178a14c63e3d5e2ed7e2492f0a3132 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
in the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
2fc430d5483545b47a5a22f45338ff54f5362e34 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
in the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1339191d4d6dc66f2c7ba2b206064a61bcb6449a 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/ToolChain.h
9e5cc6b703b2d0013f13800c2ffbeb3cf85fcfad 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/ToolChain.h
96baada03b8e62d21f644f89953736fed5a9afa2 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add driver::types::isObjC predicate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
77544fde702fdab2a6150ba812ecf04eb1e6eab6 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add driver::types::isObjC predicate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
ab24406c3e2ae6c7f3e6841482b3cf4575cddc11 17-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add EvalEndPath interface to Checker. Now we can check memory leaked at the
end of the path. Need to unify interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
243fde9f549a8f5f000c4baccb572dd0b7266a41 17-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add EvalEndPath interface to Checker. Now we can check memory leaked at the
end of the path. Need to unify interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
e6c9f54d16b0af0c3962d456dbc37699d0ccde08 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
c5a97ec19408c3dca4b6a6385f11d8c783b94d0b 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
2614ec30662bebbb1b9b7a4fa4c82eb5f5fc34b0 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
0be42c44f0199c5023b542d6a6d2e66eb594f27d 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
660f0a0ecd56cfda36aa921a6c68b065e2e4988f 17-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Silence some warnings produced by Clang, and add a missing header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
6490ae5003226cae28f980648948bea8b21a8638 17-Nov-2009 Douglas Gregor <dgregor@apple.com> Silence some warnings produced by Clang, and add a missing header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
636e79c53a7a358829b95d8f40e0a658c2d2ef36 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1).
- Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
b3375cba7938e01895bb504e7e48ad94a2e07dd1 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1).
- Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
5b05662377e2fd448c3e356aa6cc0bfe9e38bb35 17-Nov-2009 John McCall <rjmccall@apple.com> Instead of hanging a using declaration's target decls directly off the using
decl, create shadow declarations and put them in scope like normal.
Work in progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
9488ea120e093068021f944176c3d610dd540914 17-Nov-2009 John McCall <rjmccall@apple.com> Instead of hanging a using declaration's target decls directly off the using
decl, create shadow declarations and put them in scope like normal.
Work in progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
62515faf2aaec4565171d15e7ae40480ed92731d 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Simplify PreprocessorOptions, it doesn't need abstracted field access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
049d3a06ea9f8fc03582488a2b7f24512565a335 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Simplify PreprocessorOptions, it doesn't need abstracted field access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
3e8f5018fc04d40e2489fc703f0c847d5c57115a 17-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Add missing #include found by Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
b91c7f67e85309fbd4cd5007c873e1d27b86e8bb 17-Nov-2009 Douglas Gregor <dgregor@apple.com> Add missing #include found by Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
c7fe2da068df4621ab3fd372b2bcb8fd8def8947 17-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Require the object type of a member access expression ("." or "->") to
be complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
03c5705a99a96a471b2868898ee9688a6721e02a 17-Nov-2009 Douglas Gregor <dgregor@apple.com> Require the object type of a member access expression ("." or "->") to
be complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
56a9e76f8a95f02d8a25885c54e7ed7637fc0119 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Reorder options alphabetically.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
145e2ea10fb6240265c3fac8137a5f2b01b1a426 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Reorder options alphabetically.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
73490257d12d78978dfa80ed2bfd2b36dca6f540 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove unused program action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
a9be12792943d0aa2cf1eff9c0c0c0e5fd137b80 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove unused program action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
a4c841e4a1167c32eeeb8259186aa62052c26348 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rename CompilerInvocation::DiagOpts -> DiagnosticOpts for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
35ffe2fc57bcf040f652fba70e8f3ff3fcf95115 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rename CompilerInvocation::DiagOpts -> DiagnosticOpts for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
67aebf034e4803209287e79311ebca551b46af9b 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing defaults to AnalyzerOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
093333a46c5155ec1bdcb460fe33201338bc3c45 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing defaults to AnalyzerOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
dcaa7786383f799f3ebdc4fbe2bd6ea817e4642a 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
1b483e70ad3f670f6dd0bc62dbe0921a28195f24 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
2fb7bee22e3174d9103071aee16fc9ab7affe879 17-Nov-2009 Anders Carlsson <andersca@mac.com> Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9f853df0d3c25c646907a7b7ef22398370def00f 17-Nov-2009 Anders Carlsson <andersca@mac.com> Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8a51708c5f35a776402a3b981ff7b2c391034c0d 17-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRWorkList.h
6a45c2bffc9b73290aad3041595b3e662b690bdc 17-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRWorkList.h
4f4b5bcdce90be1ebc9373c500cc07cfb458400c 17-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> When querying type qualifiers on QualType via one of the "non-local"
interfaces (which are used throughout the front end), combine the
qualifiers on the QualType instance with the qualifiers on the
canonical type to produce the set of qualifiers that, semantically,
apply to that type. This should design away a large category of
"qualifier-hidden-behind-a-typedef" buts like we saw in PR5383.

Performance-wise, this caused a regression of ~0.5% on Cocoa.h, but
it's totally worth it. We may actually be able to get a little more
performance back by using CanQualType more often.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeLoc.h
fa1a06e80706846fa15e0bd44671bdc3dfc53d84 17-Nov-2009 Douglas Gregor <dgregor@apple.com> When querying type qualifiers on QualType via one of the "non-local"
interfaces (which are used throughout the front end), combine the
qualifiers on the QualType instance with the qualifiers on the
canonical type to produce the set of qualifiers that, semantically,
apply to that type. This should design away a large category of
"qualifier-hidden-behind-a-typedef" buts like we saw in PR5383.

Performance-wise, this caused a regression of ~0.5% on Cocoa.h, but
it's totally worth it. We may actually be able to get a little more
performance back by using CanQualType more often.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeLoc.h
33caf24a738012a8cf0db8c40d0af2da9afb0a43 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove extra space in warn_maynot_respond diagnostic. Fixes <rdar://problem/7364274>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a661bee756bf0c0ca1d42377c6f7b0936d171f48 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove extra space in warn_maynot_respond diagnostic. Fixes <rdar://problem/7364274>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d7e73b50ce836808c23a20ecd10b316a604e9585 16-Nov-2009 Daniel Dunbar <daniel@zuster.org> Store more information in HeaderSearchOptions so that its initialization is not
language dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
c363cb1929c7908c8c8c4b77d025c2ccb09284ae 16-Nov-2009 Daniel Dunbar <daniel@zuster.org> Store more information in HeaderSearchOptions so that its initialization is not
language dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
c79209789205c9de5fcc7aedfd6308057d40b618 16-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> First part of changes to eliminate problems with cv-qualifiers and
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:

typedef const int CInt;
typedef CInt Self;

Self.isConstQualified() currently returns false!

Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:

- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.

This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of

Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()

expressions over to

Context.hasSameUnqualifiedType(T1, T2)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/Frontend/PCHWriter.h
lang/Frontend/TypeXML.def
a4923eb7c4b04d360cb2747641a5e92818edf804 16-Nov-2009 Douglas Gregor <dgregor@apple.com> First part of changes to eliminate problems with cv-qualifiers and
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:

typedef const int CInt;
typedef CInt Self;

Self.isConstQualified() currently returns false!

Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:

- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.

This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of

Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()

expressions over to

Context.hasSameUnqualifiedType(T1, T2)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/Frontend/PCHWriter.h
lang/Frontend/TypeXML.def
5606a89ace41517879ee1adff3afe850719695b8 16-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix condition in LocationCheck::classof(). Thanks to Marius Wachtler for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
d651141308a777d60ff98309d21e045bb936f8b7 16-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix condition in LocationCheck::classof(). Thanks to Marius Wachtler for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
1e77493df0663d644f9191c6909cb43a32da88b5 16-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Handle case of missing '@end' in implementation context
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
63e963cdffca9530f920dbab58b9b4eecb2a582c 16-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Handle case of missing '@end' in implementation context
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Parser.h
5f98bf339bde1bd8a845103b14c0488658d08bc7 16-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> * Do the same thing to the basicstore as in r84163.
* Add a load type to GRExprEngine::EvalLoad().
* When retrieve from 'theValue' of OSAtomic funcitions, use the type of the
region instead of the argument expression as the load type.
* Then we can convert CastRetrievedSVal to a pure assertion. In the future
we can let all Retrieve() methods simply return SVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/Store.h
652be346f74feba027bcbdeb6a3e3f4755a0e62c 16-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> * Do the same thing to the basicstore as in r84163.
* Add a load type to GRExprEngine::EvalLoad().
* When retrieve from 'theValue' of OSAtomic funcitions, use the type of the
region instead of the argument expression as the load type.
* Then we can convert CastRetrievedSVal to a pure assertion. In the future
we can let all Retrieve() methods simply return SVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/Store.h
683b021318387947f24f1553abb11e727d35a7eb 15-Nov-2009 Anders Carlsson <andersca@mac.com> Make sure that virtual destructors have delete operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6d7013940a37f03fd324ef438ff984a5369013b0 15-Nov-2009 Anders Carlsson <andersca@mac.com> Make sure that virtual destructors have delete operators.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
f824ae9fcb35d15cb840582682435bb73d00c52d 15-Nov-2009 Anders Carlsson <andersca@mac.com> Add DeclarationName::dump().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
70f5bc77dbe4172bde860e15d8b3c29e0d5005cb 15-Nov-2009 Anders Carlsson <andersca@mac.com> Add DeclarationName::dump().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
5f73455853da1acb0307d98608529ddf19375bee 15-Nov-2009 Anders Carlsson <andersca@mac.com> If we find a deallocation function in the class scope, but it is a placement function we should not look for a deallocation function in the global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
50724302e24d44a27e3bc45e7185a710d6eb3c2d 15-Nov-2009 Anders Carlsson <andersca@mac.com> If we find a deallocation function in the class scope, but it is a placement function we should not look for a deallocation function in the global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3a6a9dcb26335a9573c68ae9c78d94eac6dd7a3f 15-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Make a couple more headers standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/GRWorkList.h
lang/Analysis/Support/Optional.h
539e9b18e64479e1092e0cd52efdb2ad41b4d07d 15-Nov-2009 Douglas Gregor <dgregor@apple.com> Make a couple more headers standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/GRWorkList.h
lang/Analysis/Support/Optional.h
30c95171e619256bb70cc831dbdc2631f39292e7 15-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Remove an obviously-broken header, which still tries to refer to ScopedDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGVarDeclVisitor.h
88f0d009db9b8a54b23eff6c1c29d9a8e75291d0 15-Nov-2009 Douglas Gregor <dgregor@apple.com> Remove an obviously-broken header, which still tries to refer to ScopedDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGVarDeclVisitor.h
551e2b811afe835d482cbb71adba30439b3d437a 15-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Make some more headers standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/HeaderSearchOptions.h
a61066310d4544d6343154eb3f4448fec0b15420 15-Nov-2009 Douglas Gregor <dgregor@apple.com> Make some more headers standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/HeaderSearchOptions.h
ca3e991c52d516df8069e9e64261cc5b821f3ecc 15-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add TargetOptions and use it when constructing targets.
- This ended up being hard to factor, sorry for the large diff.

- Some post-commit cleanup to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
lang/CodeGen/CodeGenOptions.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/FrontendOptions.h
d58c03f42ebb4e548c2b53fa25b1cfe02ebb9ac0 15-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add TargetOptions and use it when constructing targets.
- This ended up being hard to factor, sorry for the large diff.

- Some post-commit cleanup to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/TargetInfo.h
lang/Basic/TargetOptions.h
lang/CodeGen/CodeGenOptions.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompilerInstance.h
lang/Frontend/CompilerInvocation.h
lang/Frontend/FrontendOptions.h
3e45b913d53b7353f25eed5e11212bf719e5f0ab 15-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Make a few headers parse standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/AST/RecordLayout.h
lang/AST/Redeclarable.h
lang/AST/TypeLocBuilder.h
7745cab137b9d91205f13a7adaebe6ed801595f7 15-Nov-2009 Douglas Gregor <dgregor@apple.com> Make a few headers parse standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
lang/AST/RecordLayout.h
lang/AST/Redeclarable.h
lang/AST/TypeLocBuilder.h
7dcf2d9ca8a66997604dd0637cbd43f11e2d85be 15-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add pluggable action support to clang-cc, via -plugin command line option.
- Expects the plugin has been loaded with -load.

- Using this may require disabling TOOL_NO_EXPORTS in the clang-cc Makefile, this breaks the llvm::Registry way of working (static constructors are bad, kids). This should be replaced with a "real" plugin model that has explicit plugin interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FrontendOptions.h
lang/Frontend/FrontendPluginRegistry.h
d10c5b88334d860d19284032a7126dc2219f57ed 15-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add pluggable action support to clang-cc, via -plugin command line option.
- Expects the plugin has been loaded with -load.

- Using this may require disabling TOOL_NO_EXPORTS in the clang-cc Makefile, this breaks the llvm::Registry way of working (static constructors are bad, kids). This should be replaced with a "real" plugin model that has explicit plugin interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FrontendOptions.h
lang/Frontend/FrontendPluginRegistry.h
d6dbb35661cfd31394e9a7b3d506a9e8c9adcd50 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move the program action enum to FrontendOptions.

--
ddunbar@giles:clang-cc (master)$ grep llvm::cl::opt clang-cc.cpp # Woot
ddunbar@giles:clang-cc (master)$
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
9a8a83b8fe5be9a4ca20ec6eeaafaf201ce594f9 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move the program action enum to FrontendOptions.

--
ddunbar@giles:clang-cc (master)$ grep llvm::cl::opt clang-cc.cpp # Woot
ddunbar@giles:clang-cc (master)$
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
c52cb3da67f7b7b41c482056d11c0fa560e85a06 14-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Change *BugReport constructors to take StringRefs.

- Eliminates many calls to std::string.c_str()
- Fixes an invalid read in ReturnStackAddressChecker due to an unsafe call to
StringRef.data() which doesn't guarantee null-termination.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
d02e232c43b979758810794de24d3f5cde40fe93 14-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Change *BugReport constructors to take StringRefs.

- Eliminates many calls to std::string.c_str()
- Fixes an invalid read in ReturnStackAddressChecker due to an unsafe call to
StringRef.data() which doesn't guarantee null-termination.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
62ead0154844abdfc0ba63e1ecbb6a5386421454 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendActions for all preprocessor based clang-cc actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
5f3b997e28899972e2ba23ec25e830d4066fa59a 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendActions for all preprocessor based clang-cc actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
7377399fbd7de555def64a5a9c64c71b11792528 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendActions, which provides a FrontendAction interface to all the existing AST consumer based clang-cc actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
8305d01a1de4bfbfdd501b83074a1e80fada752d 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendActions, which provides a FrontendAction interface to all the existing AST consumer based clang-cc actions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendActions.h
76ff871fb09e69f01153dfcd396f13cc8d0f67e1 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendAction interface, for encapsulating a "clang-cc" style action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
4ee24097a8050b885c1d75ca4ee9f6d534c3f20b 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendAction interface, for encapsulating a "clang-cc" style action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendAction.h
ef786d1f85f7c524cdec74becf939ee4170f5718 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Shuffle VerifyDiagnosticsClient API to be less fragile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticsClient.h
221c7211c507482a91e97ede1bf6cf65a456ff67 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Shuffle VerifyDiagnosticsClient API to be less fragile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/VerifyDiagnosticsClient.h
8feaabf13088d427f1c391e6ef81c09c9f949de2 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::InitializeSourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
ccb6cb6fd9e48697564d536b07397b95dfc28d5b 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::InitializeSourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
45e497945ee1dd30ef583d33e48a5a7dd18838c9 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Turn -fixit it back into a mode, but make -fixit-at imply that mode this time
(instead of running it with arbitrary consumers).
- Also, turn any -fixit-at lookup failure into an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FrontendOptions.h
79b55f97c826f5fd28b4c4f037b088d0cc960457 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Turn -fixit it back into a mode, but make -fixit-at imply that mode this time
(instead of running it with arbitrary consumers).
- Also, turn any -fixit-at lookup failure into an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FrontendOptions.h
52a3f666f09dc4ef7869856f1168a0e62f8fca9a 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add VerifyDiagnosticsClient, to replace old -verify.
- This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.

- This also tweaks a few things:
o Errors are now just regular diagnostics.
o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though.

- Not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/CompilerInstance.h
lang/Frontend/VerifyDiagnosticsClient.h
81f5a1e699b2eefa4a5e50b5dfc06df600748f59 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add VerifyDiagnosticsClient, to replace old -verify.
- This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface.

- This also tweaks a few things:
o Errors are now just regular diagnostics.
o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though.

- Not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/CompilerInstance.h
lang/Frontend/VerifyDiagnosticsClient.h
f69385a9856d46537f3b6420b39bbf460732cc4c 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass Preprocessor through DiagnosticClient::BeginSourceFile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/TextDiagnosticPrinter.h
7d90199f109290e9d587479a481a2850d390b552 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass Preprocessor through DiagnosticClient::BeginSourceFile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/ChainedDiagnosticClient.h
lang/Frontend/TextDiagnosticPrinter.h
194f7af8c1df30254c2258122cc83690ebb2f46d 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add ASTConsumer to CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
12ce6943aae499225708ecf364c5a8b0a3269c87 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add ASTConsumer to CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
e0eb15e014e6d9d4f819cbfacb26a068d1421ee7 14-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> If we attempt to add a constructor template specialization that looks
like a copy constructor to the overload set, just ignore it. This
ensures that we don't try to use such a constructor as a copy
constructor *without* triggering diagnostics at the point of
declaration.

Note that we *do* diagnose such copy constructors when explicitly
written by the user (e.g., as an explicit specialization).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
66724ea67d7d598b937d86fa66f03f09a1c758f3 14-Nov-2009 Douglas Gregor <dgregor@apple.com> If we attempt to add a constructor template specialization that looks
like a copy constructor to the overload set, just ignore it. This
ensures that we don't try to use such a constructor as a copy
constructor *without* triggering diagnostics at the point of
declaration.

Note that we *do* diagnose such copy constructors when explicitly
written by the user (e.g., as an explicit specialization).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
4239bc5bcadb2ec59551de1de217d5f04943cedf 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add static version of Preprocessor::getSpelling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0ff1042ddaad1419264be0de6da17f3b378482a4 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add static version of Preprocessor::getSpelling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
b109794893842ef35d2483d1c2665407c22d0879 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move CompilerInstance::set* methods out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
8a9f569262860b8d03203327afd6047be2a9b5a6 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move CompilerInstance::set* methods out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
9c09e135211c384b5cafae4dfc76af638e27a9d7 14-Nov-2009 Ted Kremenek <kremenek@apple.com> Move definition of GRExprEngine::ProcessEndPath() out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
73099bfea9f5d4ec05265170bbefec3d76fb6b5e 14-Nov-2009 Ted Kremenek <kremenek@apple.com> Move definition of GRExprEngine::ProcessEndPath() out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
36eeb3dcc70b38527b866045b673f3345056092f 14-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Revert r88718, which does NOT solve the constructor-template-as-copy-constructor issue. Big thanks to John for finding this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fd47648b5d351ff6d1a3e886e1c3d10712ba4675 14-Nov-2009 Douglas Gregor <dgregor@apple.com> Revert r88718, which does NOT solve the constructor-template-as-copy-constructor issue. Big thanks to John for finding this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7f42c4ac73a969da3c4df93a1435f4f4cc32a1cd 14-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> A constructor template cannot be instantiated to a copy
constructor. Make sure that such declarations can never be formed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cad84b7c12564ff37feb66d6d004bb609bea8788 14-Nov-2009 Douglas Gregor <dgregor@apple.com> A constructor template cannot be instantiated to a copy
constructor. Make sure that such declarations can never be formed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc9161aa3fd5f78211190fcd996ed34932da8a49 13-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/AnalysisConsumer.h
8382cf57b722f130f1a6b45380639871c07271c1 13-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/AnalysisConsumer.h
795a09872e52ee42e17b33e907f7f93354ad1672 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance utility functions for creating output files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
f482d59386dbc70716f7a5f65adb37ff86b501e6 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance utility functions for creating output files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
644714d2905c1a553e81731004b7d6fbd87b937d 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add output file list to CompilerInstance, so that it can track them instead of
forcing all clients to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
a9204831639e31474b927681b97c46781b758a1a 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add output file list to CompilerInstance, so that it can track them instead of
forcing all clients to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
247484eab554c849f2f804494e95abb0d07ee597 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CodeCompletion consumer to CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
c2f484f1f05216a9a427ac84b5773789a4661111 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CodeCompletion consumer to CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
6e8ce9cc9d02c22a5a6a4657b5ca7a0fe55bd5b0 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rework Sema code completion interface.
- Provide Sema in callbacks, instead of requiring it in constructor. This
eliminates the need for a factory function. Clients now just pass the object
to consume the results in directly.

- CodeCompleteConsumer is cheap to construct, so building it whenever we are
doing code completion is reasonable.

Doug, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/ParseAST.h
3a2838d14251427089c39caec90c8abbc27f7a14 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rework Sema code completion interface.
- Provide Sema in callbacks, instead of requiring it in constructor. This
eliminates the need for a factory function. Clients now just pass the object
to consume the results in directly.

- CodeCompleteConsumer is cheap to construct, so building it whenever we are
doing code completion is reasonable.

Doug, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
lang/Sema/ParseAST.h
b86e2e801d5b291cc40bc0136f2c211b8ca668a6 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::createPCHExternalASTSource.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
0f800391ffbfe3820e1c60246a09a97e5f065179 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::createPCHExternalASTSource.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
beec9a9c42ae5b05f355f373e9644cd0e4bde436 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::has* methods for testing if the instance has a particular
subobject.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
704e48ae75111072eecaa20a365dff46fb49d2be 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::has* methods for testing if the instance has a particular
subobject.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
785b5a106991fb92e0b88121e43e4497e50b7923 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add ASTContext to CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
5eb810024dc8a1d12d5f066c02c978f07c4fcb00 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add ASTContext to CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
4a6deb578c91edd6e8611da7c40edac3bacfe7ce 13-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Check in a new interface of Checker, which will soon be used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
9400613b54bf56c317786d778f58f45f1080d619 13-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Check in a new interface of Checker, which will soon be used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
6d916ecc1266527a9fbc8c62d07a3283d953303d 13-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> GRStateManager::CurrentStmt is not used. Remove it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
ccd373a1162803a7a11f877cbca5ad7b78e833a6 13-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> GRStateManager::CurrentStmt is not used. Remove it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
93e4adfac6b648b4c79731109071c09459edec0a 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::createDiagnostics, and move clang-cc to it.

clang-cc.cpp is now under 1k lines, if anyone is counting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
0fbb3d9a9cdd2201848be9eb017c54cd78538122 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance::createDiagnostics, and move clang-cc to it.

clang-cc.cpp is now under 1k lines, if anyone is counting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
261eec309cf92775155a5c69de1010421bafad19 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add Preprocessor to CompilerInstance, and move clang-cc CreatePreprocessor to
CompilerInstance::createPreprocessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
22dacfacacf5559028550ba6ddfbaa4ea6cb3944 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add Preprocessor to CompilerInstance, and move clang-cc CreatePreprocessor to
CompilerInstance::createPreprocessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
840186769433bb1743097e3144d9b90b9aacce88 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
444be7366d0a1e172c0290a1ea54c1cb16b5947c 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
98e19d3f0d2d9cf32b9c578b7b777f782f945bd5 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add {File,Source}Manager to CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
16b7449d86b843d0926b04f87104cf3fff7149fe 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add {File,Source}Manager to CompilerInstance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
a8a0f59ccc6535a55e0589c6d6242133618d6ab6 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance, and starting moving clang-cc to it.
- The design philosophy is in the CompilerInstance doxyment, if you don't agree
with it now would be a good time to speak up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
2a79e162a3fde25c1941151a67966830d873f2db 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInstance, and starting moving clang-cc to it.
- The design philosophy is in the CompilerInstance doxyment, if you don't agree
with it now would be a good time to speak up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInstance.h
b2635f59e4d6751728f0c7843c177b36666f210b 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move input kind identification (-x) into FrontendOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
fbe2fafe317a757031e4f24026a77dd305607d32 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move input kind identification (-x) into FrontendOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
fc26eec00ec10996922ddce55ef2f77703b733e4 13-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option "-analyzer-experimental-checks" to enable experimental path-sensitive checks. The idea is to separate "barely working" or "skunkworks" checks from ones that should always run. Later we need more fine-grain checker control.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/AnalysisConsumer.h
eb94113be0ee5f4d38408b413d92464a0bc16b55 13-Nov-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option "-analyzer-experimental-checks" to enable experimental path-sensitive checks. The idea is to separate "barely working" or "skunkworks" checks from ones that should always run. Later we need more fine-grain checker control.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/AnalysisConsumer.h
c680c5ec4c39d78ad14158b4d7617b2b9f8a9e6b 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -target-{triple,abi} options into FrontendOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
21dac5e24a14d3288565515b35ad98c38460c9dd 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -target-{triple,abi} options into FrontendOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
24740cf9d313b14283e0ef6e58801361bfaa0b81 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move code completion options to clang-cc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
914474ca51d202369241a81013208833a6bb3f12 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move code completion options to clang-cc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FrontendOptions.h
7afa0dc617379fe6a1ac2d56006ffe337341cf82 13-Nov-2009 Chris Lattner <sabre@nondot.org> add a fixme, inheriting from PointerIntPair is gross :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
efc18e41f122b6ccac507bd9ec1aa7cb8845c2db 13-Nov-2009 Chris Lattner <sabre@nondot.org> add a fixme, inheriting from PointerIntPair is gross :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
06b5313223c854877dcc6fba187076ddea3263b6 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move FixItAtLocations into FrontendOptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/FrontendOptions.h
c86804bc9c3f1953520b59084c9ad75104aba123 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move FixItAtLocations into FrontendOptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/FrontendOptions.h
6d12c5245f0264ac1532070b537d03580738f567 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendOptions, and starting moving clang-cc to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/DiagnosticOptions.h
lang/Frontend/FrontendOptions.h
26266885d6eba8ee197577dd42a8e68a0e4dd2e8 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add FrontendOptions, and starting moving clang-cc to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/DiagnosticOptions.h
lang/Frontend/FrontendOptions.h
4d07786b4231ef8d83f96aaaf710314c85eed77b 12-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> We need the definition of NamedDecl in DeclContextInternals.h, since Clang is type-checking the template definition more thoroughly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
c0213f2691aed7c3f8f252e073b0b3913ee1c33c 12-Nov-2009 Douglas Gregor <dgregor@apple.com> We need the definition of NamedDecl in DeclContextInternals.h, since Clang is type-checking the template definition more thoroughly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
0e1bd10b5cf2002e337379a09bfbbcc869b557f6 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Spell empty StringRef correctly (0 is a null StringRef, which is not the same).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
ad5757f798b08f24942f093c4ac8b9fc2b527d39 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Spell empty StringRef correctly (0 is a null StringRef, which is not the same).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
2fcfe27c7e9115b8246d90510cbe079af13b7a16 12-Nov-2009 Chandler Carruth <chandlerc@gmail.com> Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
This resolves the layering violation where CodeGen depended on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompileOptions.h
lang/Frontend/CompilerInvocation.h
2811ccf48d6d898c42cc4cfad37abedb36236d20 12-Nov-2009 Chandler Carruth <chandlerc@gmail.com> Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
This resolves the layering violation where CodeGen depended on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/CodeGenOptions.h
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
lang/Frontend/CompileOptions.h
lang/Frontend/CompilerInvocation.h
b0b2636370c810d4140200d9b956dbcb510a7bce 12-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Give CanQual<T> an implicit conversion to bool, so that it can be used
in "if" statements like:

if (CanQual<ReferenceType> RefType = T.getAs<ReferenceType>())

Thanks to Clang for pointing out this mistake :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
cffecd08f1974dc7cc328bd620b2f69daf442fda 12-Nov-2009 Douglas Gregor <dgregor@apple.com> Give CanQual<T> an implicit conversion to bool, so that it can be used
in "if" statements like:

if (CanQual<ReferenceType> RefType = T.getAs<ReferenceType>())

Thanks to Clang for pointing out this mistake :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
a0e2783cbc13e5a0212f4597ebb3a9641f41a2ed 12-Nov-2009 Anders Carlsson <andersca@mac.com> Add a CK_BaseToDerived cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
11de6de25a0110cd7be97eef761ef3b189781da6 12-Nov-2009 Anders Carlsson <andersca@mac.com> Add a CK_BaseToDerived cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c5a93cc90631e2415915f96e3783bdbf9cc8a47e 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Disallow FIX-ITs when generating code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
e0c4ff2fcef19a84afaacf9eff71636b3bdad071 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Disallow FIX-ITs when generating code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
bff06d8fa05294f339620d8d9045064c3af4d04d 12-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Improve source-location information for implicitly-generated member call expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
00b98c229ef28a5e82943bb23d09fb46d24ca381 12-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve source-location information for implicitly-generated member call expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d01de3a57d667e9a241d5117caecfd91252fcdcd 12-Nov-2009 Chris Lattner <sabre@nondot.org> do not store wchar/char16/char32/intmax width/alignment info
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
9184646509d015ea66e796113a8c68598681374b 12-Nov-2009 Chris Lattner <sabre@nondot.org> do not store wchar/char16/char32/intmax width/alignment info
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
223f6e4b8e9dfad13113d65afb6fbcb5f1458e07 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move warning options into DiagnosticOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
lang/Frontend/Utils.h
6907943901e0aae5be7618c36c0f8275634e6ab5 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move warning options into DiagnosticOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
lang/Frontend/Utils.h
99b98f8376f0b7caae75e590acc504ec833f3702 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move dump-build-information option into DiagnosticOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
11e729d295378bdc185c8fb87d3326f24d1840d0 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move dump-build-information option into DiagnosticOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
d403fdb704a371c2bd735dce2981493c8794d596 12-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove obsolete 'struct NullDerefTag'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
1acfe8eeafd794c81b8d4fbb27bf483645849156 12-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove obsolete 'struct NullDerefTag'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
1861aa51b788e2f5ee24dbe1648bb2205e0c86b7 12-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance Checker class (and GRExprEngine) to support PostVisitation for CallExprs. No clients (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
31a241a0bbb281040b02ced04d1ad6c45c586d73 12-Nov-2009 Ted Kremenek <kremenek@apple.com> Enhance Checker class (and GRExprEngine) to support PostVisitation for CallExprs. No clients (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
bbe566dde3063f898d92424a5bdf41a71fcf3402 12-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove GRExprEngine::EvalCall(). It had a single callsite in GRExprEngine, and was easily inlined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
7422db3eb6753370ece0443c23f636b233f5ec9b 12-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove GRExprEngine::EvalCall(). It had a single callsite in GRExprEngine, and was easily inlined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1845bc260fd7ffa3035c8c5fbeb86b4685b49938 12-Nov-2009 John McCall <rjmccall@apple.com> Random const correctness, and incidentally use computeDeclContext when building
a using declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
af8e6ed61b5e80ab95632b63f583af79dcb62590 12-Nov-2009 John McCall <rjmccall@apple.com> Random const correctness, and incidentally use computeDeclContext when building
a using declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
72f74be5940cd72580096373637782be3ffd9a61 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move TokenCache option to PreprocessorOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
b3cb98ee35b4707c59d7f6d1a6ee2eee95cb7eb5 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move TokenCache option to PreprocessorOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
9ca178568578e21e84b683acb08b76213553cf5d 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch PTHManager to using diagnostics for most errors.

Also, always give errors on a token-cache PTH failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/PTHManager.h
3574f46cf495ec61618fd6864b045c5b1d0d5068 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch PTHManager to using diagnostics for most errors.

Also, always give errors on a token-cache PTH failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/PTHManager.h
7ead0e4bf176e508ab2dd9eea18c3c9d98129ec4 12-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make StoreManager::getSizeInElements() always return DefinedOrUnknownSVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
e884ff88baa1bd61db273baf107862a2110058ed 12-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make StoreManager::getSizeInElements() always return DefinedOrUnknownSVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
8b2898a25909781809bedaaeb763ff4034832ad2 12-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Improve recovery in a wonky case where one tries to specialize a
template template parameter.

When building a template-id type, check whether the template-name
itself is dependent (even if the template arguments are not!) and
handle it as a template-id type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8b13c08b1a181b290600814c765f9f199a74f414 12-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve recovery in a wonky case where one tries to specialize a
template template parameter.

When building a template-id type, check whether the template-name
itself is dependent (even if the template arguments are not!) and
handle it as a template-id type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9d25bee62326178186c615364c3eb783790b6426 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix Makefile dependency bug with out-of-dir builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
1144c218f5d74f2270ebcd5ddd82dc472790eaef 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix Makefile dependency bug with out-of-dir builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
7ae5b5888617dd1a664759956ac51577f1bd3e24 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Tweak AnalyzerOptions for consistency, and make sure default constructed object
is sane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
918ac48e315d42fed7fe856a3fce70d9d930cdcd 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Tweak AnalyzerOptions for consistency, and make sure default constructed object
is sane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
902f17d5d026126e9d1c64ce6f065892888e477b 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move AnalyzerOptions into CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
lang/Frontend/CompilerInvocation.h
5746f1ff6286f5e5bd7fc28e5e2031f18e4676c9 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move AnalyzerOptions into CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
lang/Frontend/CompilerInvocation.h
8d4b7f8f30088d62279ae1753a6dd804ba17b473 12-Nov-2009 John McCall <rjmccall@apple.com> Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category,
and give that category an explicit test. Generalize the internal diagnostic
name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c8d8ac5f454311d0154d2d080196cc150edbb2d6 12-Nov-2009 John McCall <rjmccall@apple.com> Add <foo> = [<bar> nextObject] to the -Widiomatic-parentheses category,
and give that category an explicit test. Generalize the internal diagnostic
name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ac6f92fb12fad4d2c11735ec93810e0f52e991ce 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Tweak PCH -include handling to make sure it matches the name as would be present
in the predefines buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
c7162937a4ccd044a0df67eed4a73ee828c49162 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Tweak PCH -include handling to make sure it matches the name as would be present
in the predefines buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
556a951c9cc08f486749e7e4c374a5e73bbc84bf 12-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Template argument deduction for template template parameters. This
permits, among other things, ripping apart and reconstructing
templates via partial specialization:

template<typename T>
struct DeepRemoveConst { typedef T type; };

template<typename T>
struct DeepRemoveConst<const T> {
typedef typename DeepRemoveConst<T>::type type;
};

template<template<typename> class TT, typename T>
struct DeepRemoveConst<TT<T> > {
typedef TT<typename DeepRemoveConst<T>::type> type;
};

Also, fix a longstanding thinko in the code handling partial ordering
of class template partial specializations. We were performing the
second deduction without clearing out the results of the first
deduction. It's amazing we got through so much code with such a
horrendous error :(



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
db0d4b751e83b8841b8f48f913f17e50467f13d4 12-Nov-2009 Douglas Gregor <dgregor@apple.com> Template argument deduction for template template parameters. This
permits, among other things, ripping apart and reconstructing
templates via partial specialization:

template<typename T>
struct DeepRemoveConst { typedef T type; };

template<typename T>
struct DeepRemoveConst<const T> {
typedef typename DeepRemoveConst<T>::type type;
};

template<template<typename> class TT, typename T>
struct DeepRemoveConst<TT<T> > {
typedef TT<typename DeepRemoveConst<T>::type> type;
};

Also, fix a longstanding thinko in the code handling partial ordering
of class template partial specializations. We were performing the
second deduction without clearing out the results of the first
deduction. It's amazing we got through so much code with such a
horrendous error :(



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0100ae4aaad92864c029ebb1eac389823ee99023 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> writable atomic property's setter/getter must be in 'lock' step of
either both synthesized or bith user defined.
Implements radar 6557233.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7ca8b0694840385d707689eba9ad965e7b28c8cb 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> writable atomic property's setter/getter must be in 'lock' step of
either both synthesized or bith user defined.
Implements radar 6557233.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a57c339c88bf248af2aba7f1bae1c284c69e82dd 11-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics when a default template argument does not match
with its corresponding template parameter. This can happen when we
performed some substitution into the default template argument and
what we had doesn't match any more, e.g.,

template<int> struct A;
template<typename T, template<T> class X = A> class B;

B<long> b;

Previously, we'd emit a pretty but disembodied diagnostic showing how
the default argument didn't match the template parameter. The
diagnostic was good, but nothing tied it to the *use* of the default
argument in "B<long>". This commit fixes that.

Also, tweak the counting of active template instantiations to avoid
counting non-instantiation records, such as those we create for
(surprise!) checking default arguments, instantiating default
arguments, and performing substitutions as part of template argument
deduction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f35f828f9883123772a9731af190a608f3236ef4 11-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics when a default template argument does not match
with its corresponding template parameter. This can happen when we
performed some substitution into the default template argument and
what we had doesn't match any more, e.g.,

template<int> struct A;
template<typename T, template<T> class X = A> class B;

B<long> b;

Previously, we'd emit a pretty but disembodied diagnostic showing how
the default argument didn't match the template parameter. The
diagnostic was good, but nothing tied it to the *use* of the default
argument in "B<long>". This commit fixes that.

Also, tweak the counting of active template instantiations to avoid
counting non-instantiation records, such as those we create for
(surprise!) checking default arguments, instantiating default
arguments, and performing substitutions as part of template argument
deduction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d1c72c0552298cdff5ceefc3d92e8f842301c8eb 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Always initialize the header search object as part of InitializePreprocessor;
not doing this has little to no utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
961c76ea8d5089293e448e5d538570653e28080c 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Always initialize the header search object as part of InitializePreprocessor;
not doing this has little to no utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
6ce3b4c5d6525ee44f2193baf24c3e5c5e6154a1 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Allow Preprocessor to take ownership of the HeaderSearch object. I think it should probably always own the header search object, but I'm not sure...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
lang/Lex/Preprocessor.h
5814e657c9ad9ef6049a2a4af0d2aad248a8a15c 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Allow Preprocessor to take ownership of the HeaderSearch object. I think it should probably always own the header search object, but I'm not sure...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
lang/Lex/Preprocessor.h
d505c1c7f10a0c7753756d8d3b6684d9d9d744cf 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sink AttachDependencyFileGen into CreatePreprocessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
ca11f61233b2acc266f371816e48290af4e10528 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sink AttachDependencyFileGen into CreatePreprocessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
266dbdc05284f893f870dc5f71a19bd6f63e001f 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add DependencyOutputOptions to wrap -M... options, and propogate to
CompilerInvocation and clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/Utils.h
0e0bae8139e25de81f18b6a519783a06f7ba1e25 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add DependencyOutputOptions to wrap -M... options, and propogate to
CompilerInvocation and clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/DependencyOutputOptions.h
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/Utils.h
0a683793780a98ae3b85a772cb67c4b8a701d154 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove some stale ErrorNodes variables in GRExprEngine and the old buffer overflow logic in GRExprEngineInternalChecks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
10f51e8785e43d5a22acc2d2a638307c582949c2 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove some stale ErrorNodes variables in GRExprEngine and the old buffer overflow logic in GRExprEngineInternalChecks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
8026ff6fa20d0fe3fd7061b9bc1df2d2a5455732 11-Nov-2009 Chandler Carruth <chandlerc@gmail.com> After drinking caffeine, add the two files missing from the previous submit.
Sorry about that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ManagerRegistry.h
0059f1cfb84bcdd78a385f5e3c016374c953756b 11-Nov-2009 Chandler Carruth <chandlerc@gmail.com> After drinking caffeine, add the two files missing from the previous submit.
Sorry about that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ManagerRegistry.h
ae0ff4efad2d004c7cddec80942e7583e7f2cb2c 11-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Before checking a template template argument against its corresponding
template template parameter, substitute any prior template arguments
into the template template parameter. This, for example, allows us to
properly check the template template argument for a class such as:

template<typename T, template<T Value> class X> struct Foo;

The actual implementation of this feature was trivial; most of the
change is dedicated to giving decent diagnostics when this
substitution goes horribly wrong. We now get a note like:

note: while substituting prior template arguments into template
template parameter 'X' [with T = float]

As part of this change, enabled some very pedantic checking when
comparing template template parameter lists, which shook out a bug in
our overly-eager checking of default arguments of template template
parameters. We now perform only minimal checking of such default
arguments when they are initially parsed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9148c3f5829f4d031249faeb1043e7be914539e8 11-Nov-2009 Douglas Gregor <dgregor@apple.com> Before checking a template template argument against its corresponding
template template parameter, substitute any prior template arguments
into the template template parameter. This, for example, allows us to
properly check the template template argument for a class such as:

template<typename T, template<T Value> class X> struct Foo;

The actual implementation of this feature was trivial; most of the
change is dedicated to giving decent diagnostics when this
substitution goes horribly wrong. We now get a note like:

note: while substituting prior template arguments into template
template parameter 'X' [with T = float]

As part of this change, enabled some very pedantic checking when
comparing template template parameter lists, which shook out a bug in
our overly-eager checking of default arguments of template template
parameters. We now perform only minimal checking of such default
arguments when they are initially parsed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d451f25a0cf6dc510f7a4e23f095b46aceef0251 11-Nov-2009 Chandler Carruth <chandlerc@gmail.com> Move the ManagerRegistry to the Analysis library to resolve the layering violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ManagerRegistry.h
f465e85fd8744fce8769f18f0dbfec51dbc6d4af 11-Nov-2009 Chandler Carruth <chandlerc@gmail.com> Move the ManagerRegistry to the Analysis library to resolve the layering violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ManagerRegistry.h
31abec71090eb46f2ddcdeee6f444c2f0858e863 11-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add undefined array subscript checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
d694485f9d6e3ea7b458df8241dfffd38f62aca8 11-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add undefined array subscript checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
531508de8693babe861d3f3faa46260dd1a6e37a 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOutputOptions to CompilerInvocation, and move initialization to
clang-cc/Options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/Utils.h
29cf746aef63b1984c013448e843a290b2badf7b 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOutputOptions to CompilerInvocation, and move initialization to
clang-cc/Options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
lang/Frontend/Utils.h
3ce2bf2f10b7e29948011f3af4af7389a22c0dd7 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOutputOptions, for things like -dM, -C, -CC which control -E
mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/Utils.h
775bee71ad21c84bc130af22ac47c1c8e0f9e72f 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOutputOptions, for things like -dM, -C, -CC which control -E
mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOutputOptions.h
lang/Frontend/Utils.h
8dd8f2672d6fc45c99318ab81b6dbcab38c18166 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Simplifiy target feature handling by coalescing all the logic into
InitializeCompileOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
29a790ba422cfeeea9546b6e76777d98fa73cd67 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Simplifiy target feature handling by coalescing all the logic into
InitializeCompileOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f641d19345322d2609ff5190f247c851353194f0 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Allow TextDiagnosticPrinter to have optional ownership of its output stream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
aea364195b81f933515e8968b5254a1195eb0337 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Allow TextDiagnosticPrinter to have optional ownership of its output stream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
eb980cc41fff21be5a9649970e9f71d7e08d7d82 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Turn LoggingDiagnosticClient into a more general ChainedDiagnosticClient and
move to libFrontend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ChainedDiagnosticClient.h
dbf75feeb6e1b0015b72fa42c80b45497e9ffefc 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Turn LoggingDiagnosticClient into a more general ChainedDiagnosticClient and
move to libFrontend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ChainedDiagnosticClient.h
ef02c9fa5e74a42ad6dde92894018f19c3e73646 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix display of "ANALYZE" statements in AnalysisConsumer by correctly resetting the flag indicating that the current Decl* has not yet been displayed. Also move this out of AnalysisManager, since AnalysisManager should not handle text output to the user.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
1d9cbeb76cf4c36acf5545028e2b2ac207086442 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix display of "ANALYZE" statements in AnalysisConsumer by correctly resetting the flag indicating that the current Decl* has not yet been displayed. Also move this out of AnalysisManager, since AnalysisManager should not handle text output to the user.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
2b054643672157da4691c9bb378b37bb3350ae43 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Move InitializePreprocessorOptions to Options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
b52d243d3626bb08758022c39b2cbc58160eadd7 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Move InitializePreprocessorOptions to Options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
f87c837fc0bc59321736a92dc5c60ea472a4e79e 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove public headers for UndefinedArgChecker, AttrNonNullChecker, and BadCallChecker, making their implementations completely private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h
lang/Analysis/PathSensitive/Checkers/BadCallChecker.h
lang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
f493f49fae3ab242ae055ae00b24fa5512655e15 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove public headers for UndefinedArgChecker, AttrNonNullChecker, and BadCallChecker, making their implementations completely private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h
lang/Analysis/PathSensitive/Checkers/BadCallChecker.h
lang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
fb1edf1663f6becf70605fc470cfc52f62c88364 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Redo how PCH handles its implicit include. Instead of treating this specially in
the front-end (as far as the preprocessor goes), follow the usual logic of
inserting the (original include path) name into the predefines buffer. This
pushes the responsibility for handling this to PCH instead of the front-end. In
PCH this requires being a little more clever when we diff the predefines
buffers.

Neither of these solutions are particularly great, I think what we eventually
should do is something like gcc where we insert a special marker to indicate the
PCH file, but then run the preprocessor as usual. This would be clearer and
would allow us to drop the overly clever predefines handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
7b5a1210d93ca62ecd61800f245c87259b1f8f79 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Redo how PCH handles its implicit include. Instead of treating this specially in
the front-end (as far as the preprocessor goes), follow the usual logic of
inserting the (original include path) name into the predefines buffer. This
pushes the responsibility for handling this to PCH instead of the front-end. In
PCH this requires being a little more clever when we diff the predefines
buffers.

Neither of these solutions are particularly great, I think what we eventually
should do is something like gcc where we insert a special marker to indicate the
PCH file, but then run the preprocessor as usual. This would be clearer and
would allow us to drop the overly clever predefines handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
4272cfe3335b7e65d61dd18dba9cd8cf86c054c6 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> More StringRef simplification to PCHValidator::ReadPredefinesBuffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
4d5936aaa4e4e2d41fe79101ac9c09444951448f 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> More StringRef simplification to PCHValidator::ReadPredefinesBuffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
7c24bd1fe31cfaf8032b42a502bb26bd368f0053 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Refactor DereferenceChecker to use only the new Checker API instead of
the old builder API. This percolated a bunch of changes up to the
Checker class (where CheckLocation has been renamed VisitLocation) and
GRExprEngine. ProgramPoint now has the notion of a "LocationCheck"
point (with PreLoad and PreStore respectively), and a bunch of the old
ProgramPoints that are no longer used have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/DereferenceChecker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
b4b817d704287836b52b34369009e682f208aa2b 11-Nov-2009 Ted Kremenek <kremenek@apple.com> Refactor DereferenceChecker to use only the new Checker API instead of
the old builder API. This percolated a bunch of changes up to the
Checker class (where CheckLocation has been renamed VisitLocation) and
GRExprEngine. ProgramPoint now has the notion of a "LocationCheck"
point (with PreLoad and PreStore respectively), and a bunch of the old
ProgramPoints that are no longer used have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/DereferenceChecker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
58b8d15c4daf54f2d19e134a089dd8a8de4f1cd2 11-Nov-2009 John McCall <rjmccall@apple.com> Apparently the following idiom is specifically encouraged:
if (self = [super init])
Recognize it and only warn if -Wparentheses is explicitly enabled.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
a52ef08b26420c8b7208c2fe7f3daf8802b22dd7 11-Nov-2009 John McCall <rjmccall@apple.com> Apparently the following idiom is specifically encouraged:
if (self = [super init])
Recognize it and only warn if -Wparentheses is explicitly enabled.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
63c8e75e3df30caab2d7251514a0d7ddc9cb39a2 11-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new representation for template template
parameters. Rather than storing them as either declarations (for the
non-dependent case) or expressions (for the dependent case), we now
(always) store them as TemplateNames.

The primary change here is to add a new kind of TemplateArgument,
which stores a TemplateName. However, making that change ripples to
every switch on a TemplateArgument's kind, also affecting
TemplateArgumentLocInfo/TemplateArgumentLoc, default template
arguments for template template parameters, type-checking of template
template arguments, etc.

This change is light on testing. It should fix several pre-existing
problems with template template parameters, such as:
- the inability to use dependent template names as template template
arguments
- template template parameter default arguments cannot be
instantiation

However, there are enough pieces missing that more implementation is
required before we can adequately test template template parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
788cd06cf8e868a67158aafec5de3a1f408d14f3 11-Nov-2009 Douglas Gregor <dgregor@apple.com> Introduce a new representation for template template
parameters. Rather than storing them as either declarations (for the
non-dependent case) or expressions (for the dependent case), we now
(always) store them as TemplateNames.

The primary change here is to add a new kind of TemplateArgument,
which stores a TemplateName. However, making that change ripples to
every switch on a TemplateArgument's kind, also affecting
TemplateArgumentLocInfo/TemplateArgumentLoc, default template
arguments for template template parameters, type-checking of template
template arguments, etc.

This change is light on testing. It should fix several pre-existing
problems with template template parameters, such as:
- the inability to use dependent template names as template template
arguments
- template template parameter default arguments cannot be
instantiation

However, there are enough pieces missing that more implementation is
required before we can adequately test template template parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
edecc7154650000514f021ad5c5303128a801577 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> StringRefify some PCH interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
dc3c0d20375bda7775b2fade05b20e315798b9fe 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> StringRefify some PCH interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
5eda0df7b2eff874c67505f290bf660c92a2139a 11-Nov-2009 John McCall <rjmccall@apple.com> Create a new Scope when parsing a declaration with a C++ scope specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f7f3d0db754db0500b56d49ac19f795f13965912 11-Nov-2009 John McCall <rjmccall@apple.com> Create a new Scope when parsing a declaration with a C++ scope specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9e6f870b68c0f139c3ea9acf9c2dc759e912cd73 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add Diagnostic::Report method for reporting diagnostics without a location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Driver/Driver.h
0f9fed70cea107b3f79df554e38bd8e98d48fe47 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add Diagnostic::Report method for reporting diagnostics without a location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Driver/Driver.h
4dae925caba4a4e6708f0d777f6854877ffc1359 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> PreprocessorOptions: Get rid of unnecessary 'isPTH' flag for include entries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
b6d1cc84d1a7e314f7a7a02fbe092adc4caf67e8 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> PreprocessorOptions: Get rid of unnecessary 'isPTH' flag for include entries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
8173cdeb026b9f4503618983f5de45dd36c8454d 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose illegally typed operator new/new[].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b03bfa55d03ca38922ffedac19225d0832e8d911 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose illegally typed operator new/new[].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4e15e2040f1c62f495c82bd77deea336cc30e600 10-Nov-2009 Ted Kremenek <kremenek@apple.com> Shuffle order of warning declarations (alphabetize).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
69a2c268dbc2844bbdecfbbbb82602e6bb4bd1df 10-Nov-2009 Ted Kremenek <kremenek@apple.com> Shuffle order of warning declarations (alphabetize).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
d89952754074f4de6c86955e8c005e81540d4379 10-Nov-2009 Ted Kremenek <kremenek@apple.com> Make -Wsemicolon-before-method-body opt-in (and part of -Wextra). Addresses <rdar://problem/7381735>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
dfcaf060d57fdb46e596e93c91dd86ed53a31ba9 10-Nov-2009 Ted Kremenek <kremenek@apple.com> Make -Wsemicolon-before-method-body opt-in (and part of -Wextra). Addresses <rdar://problem/7381735>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticParseKinds.td
fd09f9daf6e87ace3a29a5c5d56f4c2bd2910028 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Decouple more of clang-cc by moving ImplicitP[CT]H options into
PreprocessorOptions.

Global variables used as [in] [out] parameters considered harmful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
e0a9581d606ea1a6a723758a8d7eef93650cbe93 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Decouple more of clang-cc by moving ImplicitP[CT]H options into
PreprocessorOptions.

Global variables used as [in] [out] parameters considered harmful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PreprocessorOptions.h
7af1eaaec2b8014e74e66b0e451e1191768fa5c6 10-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Add newline at EOF.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Template.h
c1643de31b9acff14b88354c0b13025407db9e8a 10-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Add newline at EOF.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Template.h
b226b2e8514db1c679ed27ebd6a241e0f4cacac6 10-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Improve parsing of template arguments to lay the foundation for
handling template template parameters properly. This refactoring:

- Parses template template arguments as id-expressions, representing
the result of the parse as a template name (Action::TemplateTy)
rather than as an expression (lame!).

- Represents all parsed template arguments via a new parser-specific
type, ParsedTemplateArgument, which stores the kind of template
argument (type, non-type, template) along with all of the source
information about the template argument. This replaces an ad hoc
set of 3 vectors (one for a void*, which was either a type or an
expression; one for a bit telling whether the first was a type or
an expression; and one for a single source location pointing at
the template argument).

- Moves TemplateIdAnnotation into the new Parse/Template.h. It never
belonged in the Basic library anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
lang/Parse/Template.h
314b97f8c564b465af605efaee23f91ec18a982b 10-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve parsing of template arguments to lay the foundation for
handling template template parameters properly. This refactoring:

- Parses template template arguments as id-expressions, representing
the result of the parse as a template name (Action::TemplateTy)
rather than as an expression (lame!).

- Represents all parsed template arguments via a new parser-specific
type, ParsedTemplateArgument, which stores the kind of template
argument (type, non-type, template) along with all of the source
information about the template argument. This replaces an ad hoc
set of 3 vectors (one for a void*, which was either a type or an
expression; one for a bit telling whether the first was a type or
an expression; and one for a single source location pointing at
the template argument).

- Moves TemplateIdAnnotation into the new Parse/Template.h. It never
belonged in the Basic library anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
lang/Parse/Template.h
9a26d359d35a4a4ade8c9486b4d7af4ede219ad5 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Localize -disable-llvm-optzns handling to BackendConsumer::CreatePasses.
- This is conceptually better since the only thing we want this option to do is
preserve the internal module as constructed by IRgen, before running any
passes.

- This also fixes bugs in -disable-llvm-optzns handling with regards to debug
info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
8d35314401047092eb97b989ed930967ed9e8ccc 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Localize -disable-llvm-optzns handling to BackendConsumer::CreatePasses.
- This is conceptually better since the only thing we want this option to do is
preserve the internal module as constructed by IRgen, before running any
passes.

- This also fixes bugs in -disable-llvm-optzns handling with regards to debug
info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
31ed95a876a4a26b3f61aae4c77f06e497a019d8 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompileOptions to CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
36f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompileOptions to CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
adf9faf3e1b76c94c848f79dac89b1bce47274bb 10-Nov-2009 John McCall <rjmccall@apple.com> Make a somewhat more convincing test case for unqualified lookup through
using directives, and fix a bug thereby exposed: since we're playing
tricks with pointers, we need to make certain we're always using the same
pointers for things.
Also tweak an existing error message.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
12ea5780e7729de3fee009525e49468fd8d0b713 10-Nov-2009 John McCall <rjmccall@apple.com> Make a somewhat more convincing test case for unqualified lookup through
using directives, and fix a bug thereby exposed: since we're playing
tricks with pointers, we need to make certain we're always using the same
pointers for things.
Also tweak an existing error message.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
4391af20613f300ef4d3584a214cb3c22af4c4eb 10-Nov-2009 Anders Carlsson <andersca@mac.com> Don't try to emit null fixit hints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
2f019aadc96f8fa3185c684c7150bd596d045064 10-Nov-2009 Anders Carlsson <andersca@mac.com> Don't try to emit null fixit hints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
c060c8ebe14943c61fe97febbff838a8fbeac874 10-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refine PointerSubChecker: compare the base region instead of the original
region, so that arithmetic within a memory chunk is allowed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
adca27102ff733c7d42fcbbc2c7e134a7fc026f9 10-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refine PointerSubChecker: compare the base region instead of the original
region, so that arithmetic within a memory chunk is allowed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
87d9e0a2772827042a3a8463099cecdaee9eab02 10-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename: StripCasts describes what it does better.
getBaseRegion will be used in another method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
479529e679957fbb92b56e116e3c86734429331e 10-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename: StripCasts describes what it does better.
getBaseRegion will be used in another method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
db8393ca63e3a82398c3bfb4e7b441d72995d707 10-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Move all of the type-printing logic to its own C++ source file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fee8a3c003a8894002810a6373bd5b895290974e 10-Nov-2009 Douglas Gregor <dgregor@apple.com> Move all of the type-printing logic to its own C++ source file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9a8b5c15c7e7e092084788a3c22580c743056749 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOptions to CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
5fc7d344ae772731d3d7c9076b8786e780a68696 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOptions to CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
2805608e3043e0a580926fbff6a41bb8b64762c9 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Privatize InitHeaderSearch, this functionality is only exposed via
ApplyHeaderSearchOptions now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/InitHeaderSearch.h
lang/Frontend/Utils.h
2cdafa8001ee69b75d2906cbb36f16cf8e1dc60a 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Privatize InitHeaderSearch, this functionality is only exposed via
ApplyHeaderSearchOptions now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/InitHeaderSearch.h
lang/Frontend/Utils.h
c198a20435e3aa40dac43b0e3dda902a226546c8 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move LangOptions, HeaderSearchOptions, and the target feature map into
CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
26a0cac165aea204f661b8da7b167623b12ff143 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move LangOptions, HeaderSearchOptions, and the target feature map into
CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
8b0e47f603b3433386b158e2b0a036789eb12ee1 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add default initializer for Sysroot ivar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
0f25ae8bafdfc4265569d9867e793aaa99407934 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add default initializer for Sysroot ivar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
183948c04cef998fda57c1a39b12e40f934ad031 09-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Changed error for nested type qualifier mismatch to
warning, to match gcc. It used to be warning, so
better keep it a warning (it broke a certain project).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3451e9282a72f09e834486ce6f5aab803f491e97 09-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Changed error for nested type qualifier mismatch to
warning, to match gcc. It used to be warning, so
better keep it a warning (it broke a certain project).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
406b56a9a0ed38e9fbcea1f51ea28ee3719517d3 09-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of
ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
89c49f09b0292dc7c03885f6c765d667a9837597 09-Nov-2009 Douglas Gregor <dgregor@apple.com> Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of
ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c7df7c4dba32a7fcca048454c8e3994dd0c5b34c 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInvocation object, to capture all the options one needs to invoke
the compiler, and start flood filling it into clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
e29709f32e82d7f7dfc25d8602b1b828a1aa7f56 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CompilerInvocation object, to capture all the options one needs to invoke
the compiler, and start flood filling it into clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompilerInvocation.h
21f7874b85ae2cb5f4d6b996d8ecc3815ebf72a6 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Stub out a few more warning groups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
c19aa99b57e9d005121bd7f4d87d408e187a1238 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Stub out a few more warning groups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
94643353690615a5a531d5f2445f481d7aa13e77 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add additional note to mark the cause of synthesized constructors. Mark
declaration invalid if the constructor can't be properly built. Addresses
remaining review comments from Fariborz for r86500.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
80c30dad6c6fca077293125a96f464b6c8857171 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add additional note to mark the cause of synthesized constructors. Mark
declaration invalid if the constructor can't be properly built. Addresses
remaining review comments from Fariborz for r86500.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2c20fd833cd2e6a75e25e1203ebc80fe23a802ed 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGen
unless we start implementing command-line switches which override the default
calling convention, so the effect is mostly to silence unknown attribute
warnings.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
8f4c59e912f08919bd051fbca3d0dd2b90382ab3 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGen
unless we start implementing command-line switches which override the default
calling convention, so the effect is mostly to silence unknown attribute
warnings.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
66147b3351b7f104c9cb7546b4c9a16707aedd6a 09-Nov-2009 Steve Naroff <snaroff@apple.com> Introduce CXString type and associated functions clang_getCString() and clang_disposeString().

This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now).

Patch by John Thompson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86562 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ef0cef6cec8de5fc60e469a93436eed7212e0dc2 09-Nov-2009 Steve Naroff <snaroff@apple.com> Introduce CXString type and associated functions clang_getCString() and clang_disposeString().

This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now).

Patch by John Thompson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86562 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c1bd0c680b113f08ac88c78387d876c00e5fcb6b 09-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add checker for CWE-588: Attempt to Access Child of a Non-structure Pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
4f3dc698a1bbeea16155e51dfc7d0f69ff689598 09-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add checker for CWE-588: Attempt to Access Child of a Non-structure Pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
6c18a787fb40505ff86829dbb53222b9b4fe2a8f 09-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add checker for CWE-587: Assignment of a Fixed Address to a Pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
b10a7c235f82c6eb074be097c9ae7ee51fccc9c6 09-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add checker for CWE-587: Assignment of a Fixed Address to a Pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
4b7c77b50a7674f970d6438ec6a2876d617fe46f 09-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
8e2a9d8adbd2169b46c2edff5b267b05df3febb0 09-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
ff050356b5529b0745b3039453ad5016d42f515c 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors. This has a number of benefits:

1. Less code.

2. Explicit and implicit constructors get the same diagnostics.

3. The AST explicitly contains constructor calls from implicit default
constructors. This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
49c16da71b9c95cc53b4af6de2833a022cb69b6a 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors. This has a number of benefits:

1. Less code.

2. Explicit and implicit constructors get the same diagnostics.

3. The AST explicitly contains constructor calls from implicit default
constructors. This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
50c1fbac3d55d10e88375970668d583b23147e22 08-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a checker for CWE-467: Use of sizeof() on a Pointer Type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/Analyses.def
28a109f63506d8c96e3fbf1b959b603ccec2f586 08-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a checker for CWE-467: Use of sizeof() on a Pointer Type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/Analyses.def
2aace57a73eef77967b28d19a2721033eaa3f85a 08-Nov-2009 Sean Hunt <rideau3@gmail.com> Test commit - minor terminology change to my recent patch suggested by John McCall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c9132b697cff37f2918f9501b8ee2262b0bc6f03 08-Nov-2009 Sean Hunt <rideau3@gmail.com> Test commit - minor terminology change to my recent patch suggested by John McCall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bfebffa3b92e064193e1c9b0a55fae424b4d8684 07-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to gives an error that at least points users in the direction of the error, rather
than an error about incompatible types. Patch by Sean Hunt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
36a862f1d6810e05121d5be1b6458bd11b69e495 07-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to gives an error that at least points users in the direction of the error, rather
than an error about incompatible types. Patch by Sean Hunt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2b0adf4958d3a49dd751a5522cca625e4ba673a9 07-Nov-2009 John McCall <rjmccall@apple.com> Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
core requirements. Fixes rdar://problem/6389954



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
dc767a1f560ae936a08eeead8164be6f82b6b0f7 07-Nov-2009 John McCall <rjmccall@apple.com> Support -Wshorten-64-to-32 for integer types only, which seems to satisfy the
core requirements. Fixes rdar://problem/6389954



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
d6e3d329768ef9d0cea30b68146ee4e97373fc52 07-Nov-2009 Ted Kremenek <kremenek@apple.com> Use SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks(). Patch by Kovarththanan Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/SaveAndRestore.h
31d8cadc8337b5f90c2e5eddf712d769e99c977b 07-Nov-2009 Ted Kremenek <kremenek@apple.com> Use SaveAndRestore to simplify logic in LiveVariables::runOnAllBlocks(). Patch by Kovarththanan Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/SaveAndRestore.h
870278bbbab94d3bc38fdd9487aae3829df314be 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add HeaderSearchOptions class, for packaging the information needed to
initialize HeaderSearch. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/InitHeaderSearch.h
63c8b77334f90472260d2f48df2742ed5067261e 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add HeaderSearchOptions class, for packaging the information needed to
initialize HeaderSearch. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/HeaderSearchOptions.h
lang/Frontend/InitHeaderSearch.h
0df9906d1eddee1dbeec1a5b6c097ec3d9ca48e0 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Lift InitHeaderSearch::AddEnvVarPaths logic higher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
e166582f8f36f4db8f4ea157538fab7fe6bf2658 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Lift InitHeaderSearch::AddEnvVarPaths logic higher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
4791e04b59ae973456144bb98cab1ff228ae678b 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
5c5758bb0a4ec0f572cd20249277736da5715003 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
b795a5daff072412abe32fbe3ead662a11534527 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rename PreprocessorInitOptions to PreprocessorOptions for consistency, and fix
filenames.

Also, move InitializePreprocessor to Utils.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
lang/Frontend/PreprocessorOptions.h
lang/Frontend/Utils.h
8863b985f1cf78a2fb62913e184dc45162853cf9 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rename PreprocessorInitOptions to PreprocessorOptions for consistency, and fix
filenames.

Also, move InitializePreprocessor to Utils.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
lang/Frontend/PreprocessorOptions.h
lang/Frontend/Utils.h
6f80e076a42b3fa954d4da7c7c196d3ae30f3027 07-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove Checker::CheckType() (and instead using CheckerVisitor::PreVisitDeclStmt()), and refactor VLASizeChecker to have only one Checker subclass (not two) and to not use the node builders directly (and instead use the newer CheckerContext).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/GRState.h
ae1623345aed43dcd2e069970a00618378a37b34 07-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove Checker::CheckType() (and instead using CheckerVisitor::PreVisitDeclStmt()), and refactor VLASizeChecker to have only one Checker subclass (not two) and to not use the node builders directly (and instead use the newer CheckerContext).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/GRState.h
afcfd753e6c5d50edb13dd0b7f46fc40f6aa8fa0 07-Nov-2009 John McCall <rjmccall@apple.com> Implement -Wconversion. Off by default, in the non-gcc group. There's
significant work left to be done to reduce the false-positive rate here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
680523a91dd3351389667c8de17121ba7ae82673 07-Nov-2009 John McCall <rjmccall@apple.com> Implement -Wconversion. Off by default, in the non-gcc group. There's
significant work left to be done to reduce the false-positive rate here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
c2c78ec0b6acd3c5e3d82b58eb3197595d08c082 07-Nov-2009 Steve Naroff <snaroff@apple.com> Add basic code completion support for ObjC messages.

Still a work in progress...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c4df6d2c05c647a6a5770ba0c749782b6c023a3a 07-Nov-2009 Steve Naroff <snaroff@apple.com> Add basic code completion support for ObjC messages.

Still a work in progress...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
5117fe60743bb49f91f6e38bf56ff2fa8ecc2e18 07-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Various improvements to Clang's code-completion infrastructure:
- Introduce more code-completion string "chunk" kinds that describe
symbols, the actual text that the user is expected to type, etc.
- Make the generation of macro results optional, since it can be
slow
- Make code-completion accessible through the C API, marshalling the
code-completion results through a temporary file (ick) to maintain
process separation.

The last doesn't have tests yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86306 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
0c8296dfb495f41d6f0de6fe1d03014ffd063674 07-Nov-2009 Douglas Gregor <dgregor@apple.com> Various improvements to Clang's code-completion infrastructure:
- Introduce more code-completion string "chunk" kinds that describe
symbols, the actual text that the user is expected to type, etc.
- Make the generation of macro results optional, since it can be
slow
- Make code-completion accessible through the C API, marshalling the
code-completion results through a temporary file (ick) to maintain
process separation.

The last doesn't have tests yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86306 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Sema/CodeCompleteConsumer.h
86af9e45d2eb35eb6ca2d671826e3b6c8b1645f9 06-Nov-2009 Ted Kremenek <kremenek@apple.com> Make the VLASizeChecker implementation private, and its creation only known to GRExprEngineInternalChecks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/VLASizeChecker.h
84b3595729d249d89b8b67a547e0992797e19793 06-Nov-2009 Ted Kremenek <kremenek@apple.com> Make the VLASizeChecker implementation private, and its creation only known to GRExprEngineInternalChecks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/VLASizeChecker.h
2ec81ee9afc929a8b429ddb2d4feb39ef96c718b 06-Nov-2009 Ted Kremenek <kremenek@apple.com> Make the implementation of DivZeroChecker private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/DivZeroChecker.h
36df58ab9e3eb6823966ee16c5516eea1d88e541 06-Nov-2009 Ted Kremenek <kremenek@apple.com> Make the implementation of DivZeroChecker private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/DivZeroChecker.h
cc8201ab5d9944974be29d965111068d7b10f6c9 06-Nov-2009 John McCall <rjmccall@apple.com> Don't warn -Wsign-compare if we're in an unevaluated context, and fixed
a typo pointed out by Fariborz.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
7d62a8f81f2f22e25c048edfb412b22e06c542ff 06-Nov-2009 John McCall <rjmccall@apple.com> Don't warn -Wsign-compare if we're in an unevaluated context, and fixed
a typo pointed out by Fariborz.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
bfd5ad645215f07538266b169ebec822c2a9b004 06-Nov-2009 Chris Lattner <sabre@nondot.org> add some const qualifiers, patch by Kovarththanan Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
abbbfd960cc0978509e060741ff8cc8db32d6b5c 06-Nov-2009 Chris Lattner <sabre@nondot.org> add some const qualifiers, patch by Kovarththanan Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
cb0223508aed978a08628ef9fabb781ed9198540 06-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a checker for CWE-466: Return of Pointer Value Outside of Expected Range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
ceeb02db9ad4232ea248a44192180d5bc7fe2653 06-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a checker for CWE-466: Return of Pointer Value Outside of Expected Range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
7f7b91e7aee474a258b6132d5ba04143b417d7c8 06-Nov-2009 John McCall <rjmccall@apple.com> Create a warning group "non-gcc" for diagnostics which are not enabled
by default in GCC. Users who want to emulate gcc's warning behavior
exactly should be able to use CC="clang -Wno-non-gcc"; this should help
projects to transition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
4c2620705b87ab6899fb2756bf191bb89d1995c8 06-Nov-2009 John McCall <rjmccall@apple.com> Create a warning group "non-gcc" for diagnostics which are not enabled
by default in GCC. Users who want to emulate gcc's warning behavior
exactly should be able to use CC="clang -Wno-non-gcc"; this should help
projects to transition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
8d825b261b61699d3312326e5d4140a3cb3cc113 06-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Rework the fix-it hint for code like

get_origin->x

where get_origin is actually a function and the user has forgotten the
parentheses. Instead of giving a lame note for the fix-it, give a
full-fledge error, early, then build the call expression to try to
recover.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3f0b5fd3a55baf1e3e768fe981bcc3ad5e209ec1 06-Nov-2009 Douglas Gregor <dgregor@apple.com> Rework the fix-it hint for code like

get_origin->x

where get_origin is actually a function and the user has forgotten the
parentheses. Instead of giving a lame note for the fix-it, give a
full-fledge error, early, then build the call expression to try to
recover.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
13b2bab70fd6034cb0461b74a9738bf5a23a8a4c 06-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Turn off -Wsign-compare warnings by default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
35de813674503b87ec5117b6492cc0a4ef7d8728 06-Nov-2009 Douglas Gregor <dgregor@apple.com> Turn off -Wsign-compare warnings by default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
ed1db4d1eb4e1e67ae71d56d59090c8342978bfe 06-Nov-2009 Ted Kremenek <kremenek@apple.com> static analyzer: refactor checking logic for returning the address of a stack variable or a garbage
value into their own respective subclasses of Checker (and put them in .cpp files where their
implementation details are hidden from GRExprEngine).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/GRExprEngine.h
1053d246f451c399468248625d1146e3d845e21e 06-Nov-2009 Ted Kremenek <kremenek@apple.com> static analyzer: refactor checking logic for returning the address of a stack variable or a garbage
value into their own respective subclasses of Checker (and put them in .cpp files where their
implementation details are hidden from GRExprEngine).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/GRExprEngine.h
32aff13caef037f4296d2efe6192a5d759633dbd 06-Nov-2009 Ted Kremenek <kremenek@apple.com> Minor cleanup: use BuiltinBug (which will soon be renamed) for DeferenceChecker and friends so that they always report the same bug type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
2c791bd122285e1212094147454ef996dee8ebaf 06-Nov-2009 Ted Kremenek <kremenek@apple.com> Minor cleanup: use BuiltinBug (which will soon be renamed) for DeferenceChecker and friends so that they always report the same bug type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
4176705b836ea3720fcec92428c688fb0a9fc9b1 05-Nov-2009 John Thompson <john.thompson.jtsoftware@gmail.com> Eliminate tabls

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
40d1bb6383c14d5f8249d0640e8088a91b694c66 05-Nov-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Eliminate tabls

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
cffa5b706a6ccbc5c2f96e6778d0e1b33b666144 05-Nov-2009 Chris Lattner <sabre@nondot.org> clean up integer preprocessor type definitions, patch by Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
9099e7bcda3922cee0cffcdf21332ac4aa193cea 05-Nov-2009 Chris Lattner <sabre@nondot.org> clean up integer preprocessor type definitions, patch by Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e65800a6496207b51379f92540789206b990781e 05-Nov-2009 John Thompson <john.thompson.jtsoftware@gmail.com> Adding -fshort-wchar option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Basic/TargetInfo.h
lang/Driver/Options.def
a6fda124bf380479529d6a80b84b62cacd3cb707 05-Nov-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Adding -fshort-wchar option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Basic/TargetInfo.h
lang/Driver/Options.def
9c7ab14293ca026170bfa698aa5141dd136c2cd2 05-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Don't allow definitions of array variables without some size information in C++. Fixed PR5401

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6e8247556807ecaaac470852222762db998a05b2 05-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Don't allow definitions of array variables without some size information in C++. Fixed PR5401

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bd48e8c48190a8f036a539463e7b55ebb0a573c7 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Adds doxygen comment for HasSideEffects method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6ddf4784a22b994b954ed74c6061d4603d474639 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Adds doxygen comment for HasSideEffects method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
90157f6d8093abd6c42c97481f5b9cd8252c6139 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Added support for static variables which require
initialization before main. Fixes pr5396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
393c247fe025ccb5f914e37e948192ea86faef8c 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Added support for static variables which require
initialization before main. Fixes pr5396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dac6742b8ae1203ba81978ee1f0c98524bc4b690 05-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate some false positives due to a thinko in the "'blah' is
always zero in this context" warning logic. Also, make the diagnostic
itself more precise when referring to pointer values ("NULL" vs. "zero").


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Scope.h
9c4b838782132ec670fd7e48d1a7a7fd433fed06 05-Nov-2009 Douglas Gregor <dgregor@apple.com> Eliminate some false positives due to a thinko in the "'blah' is
always zero in this context" warning logic. Also, make the diagnostic
itself more precise when referring to pointer values ("NULL" vs. "zero").


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Scope.h
78bfc818ad9b7502e0a16c4b90e960881b4db4ac 05-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse C++0x constexpr. Test case follows when this does something useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
2ac67239b4ab81c439ffcc56367574c869f87dae 05-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse C++0x constexpr. Test case follows when this does something useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
a93c19302a410443d4ec3d12f97a0b0ac178c40c 05-Nov-2009 John McCall <rjmccall@apple.com> Implement the conditional-operator part of -Wsign-compare. Turn
DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places.

Add some enumerator tests. These seem to expose some oddities in the
types we're converting C++ enumerators to; in particular, they're converting
to unsigned before int, which seems to contradict 4.5 [conv.prom] p2.

Note to self: stop baiting Doug in my commit messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b13c87f0c9705d91d5a3e134be9934c9ad531071 05-Nov-2009 John McCall <rjmccall@apple.com> Implement the conditional-operator part of -Wsign-compare. Turn
DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places.

Add some enumerator tests. These seem to expose some oddities in the
types we're converting C++ enumerators to; in particular, they're converting
to unsigned before int, which seems to contradict 4.5 [conv.prom] p2.

Note to self: stop baiting Doug in my commit messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a0be7a010356fc4a0806317227fec73fedea10a7 05-Nov-2009 Ted Kremenek <kremenek@apple.com> Tweak wording and classifications of analyzer diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
ae78447ef124fcbc6bef14f73a67586420c0196a 05-Nov-2009 Ted Kremenek <kremenek@apple.com> Tweak wording and classifications of analyzer diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
815ef4694cfca2e39767546be78d92d1fd9f8bfc 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Replace DiagnosticClient::setLangOptions with {Begin,End}SourceFile, and clarify
invariants (diagnostics with source informations must occur between
{Begin,End}SourceFile).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
efcbe9475348ecab6b85153baa21d0e894e39607 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Replace DiagnosticClient::setLangOptions with {Begin,End}SourceFile, and clarify
invariants (diagnostics with source informations must occur between
{Begin,End}SourceFile).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
a93f338bc8bebdafc6fe241e87312ad312a1fe6b 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Convert CreateAnalysisConsumer and friends to just take a const Preprocessor&, and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
lang/Frontend/PathDiagnosticClients.h
efceabd2380f49306bc0229583458e93b062094b 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Convert CreateAnalysisConsumer and friends to just take a const Preprocessor&, and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
lang/Frontend/PathDiagnosticClients.h
fe5ab32a071721c7fabc0729b8dc4daca567e70c 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove unused SetPreprocessor method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
eb6aeb51977b6755481213a1f31512538648e24b 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove unused SetPreprocessor method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
0e2a50f5a0f0171f2d7836a5860bf5b82d39f80a 05-Nov-2009 Ted Kremenek <kremenek@apple.com> AnalysisManager: Don't rely on PathDiagnosicClients flushing their diagnostics when they are destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
b01f06ca72362d527bb65fbf018ac53df575ded1 05-Nov-2009 Ted Kremenek <kremenek@apple.com> AnalysisManager: Don't rely on PathDiagnosicClients flushing their diagnostics when they are destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
a8f606dbba86bc18edad2956887a276f466b60be 05-Nov-2009 Ted Kremenek <kremenek@apple.com> Acting on Daniel's nagging, remove PathDiagnosticClientFactory() and
migrate work in the destructors of PathDiagnosticClients from their
destructors to FlushReports(). The destructors now currently call
FlushReports(); this will be fixed in a subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Frontend/PathDiagnosticClients.h
b697a4e4118d2d59dc0f38463c8417ddaf58a11f 05-Nov-2009 Ted Kremenek <kremenek@apple.com> Acting on Daniel's nagging, remove PathDiagnosticClientFactory() and
migrate work in the destructors of PathDiagnosticClients from their
destructors to FlushReports(). The destructors now currently call
FlushReports(); this will be fixed in a subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Frontend/PathDiagnosticClients.h
54c27bec7e039582b418511eaf52cab34239e98b 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Make html::{SyntaxHighlight,HighlightMacros} take a const Preprocessor.

This is conceptually correct, but adds a huge hack to HighlightMacros which is
in fact doing all sorts of mutation to the Preprocessor. See FIXME.

Chris, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
ff6912b5a9d5073221956fe4d6367b14f3f4b68f 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Make html::{SyntaxHighlight,HighlightMacros} take a const Preprocessor.

This is conceptually correct, but adds a huge hack to HighlightMacros which is
in fact doing all sorts of mutation to the Preprocessor. See FIXME.

Chris, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
c577cb6cdabd5883fdf654241cfea08d0d4967b3 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Make LookUpIdentifierInfo const. This makes the Identifiers table mutable and is
a little fuzzy, but conceptually it's just uniquing the identifier.

Chris, please review. I debated splitting into const/non-const versions where
the const one propogated constness to the resulting IdentifierInfo*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
c3222091e1ffa35d0264ca6b680a88c9dc84ede2 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Make LookUpIdentifierInfo const. This makes the Identifiers table mutable and is
a little fuzzy, but conceptually it's just uniquing the identifier.

Chris, please review. I debated splitting into const/non-const versions where
the const one propogated constness to the resulting IdentifierInfo*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
24a324f88279837ce7f3d6783a66fc186a66d40d 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> StringRefize Preprocessor::getIdentifierInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
3da736c1143126be19b253804b3b135ebcd3d6ff 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> StringRefize Preprocessor::getIdentifierInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
226cd92ffbd118e46109e40168e7fb1aaf148889 05-Nov-2009 Ted Kremenek <kremenek@apple.com> Modify GRExprEngine::EvalBind() to take both a "store expression" and
an "assign expression", representing the expressions where the value
binding occurs and the assignment takes place respectively. These are
largely syntactic clues for better error reporting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h
lang/Analysis/PathSensitive/GRExprEngine.h
50ecd1536a2b70327e9eb2c2c2a652cde3dae365 05-Nov-2009 Ted Kremenek <kremenek@apple.com> Modify GRExprEngine::EvalBind() to take both a "store expression" and
an "assign expression", representing the expressions where the value
binding occurs and the assignment takes place respectively. These are
largely syntactic clues for better error reporting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h
lang/Analysis/PathSensitive/GRExprEngine.h
ea3fd09ae9d2c5eb51cdd626b329785546856fa8 05-Nov-2009 John McCall <rjmccall@apple.com> Implement -Wsign-compare, or at least the actual comparison part of it.
Conditional operands are next.

Fixes part of rdar://problem/7289584.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
45aa4557fe4210034e85f4a807ff637a9dd146d6 05-Nov-2009 John McCall <rjmccall@apple.com> Implement -Wsign-compare, or at least the actual comparison part of it.
Conditional operands are next.

Fixes part of rdar://problem/7289584.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d321195358ca63f30a5eb83ef8b8c3a4f74ba41 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Kill PreprocessorFactory, which was both morally repugnant and totally unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/AnalysisConsumer.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/Utils.h
lang/Lex/Preprocessor.h
lang/Rewrite/HTMLRewrite.h
90b1827c1c1cf075266b96b416eefcf37924333b 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Kill PreprocessorFactory, which was both morally repugnant and totally unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/AnalysisConsumer.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/Utils.h
lang/Lex/Preprocessor.h
lang/Rewrite/HTMLRewrite.h
7536a5fe4cf7fa1a9972e1401a32c54fbae88cf2 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Tweak formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
3926a1fe92f622f194d7d99560d0b17b2af65a61 05-Nov-2009 Daniel Dunbar <daniel@zuster.org> Tweak formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
9a5062f947c83614745ee356083115b67ba78e8b 05-Nov-2009 John McCall <rjmccall@apple.com> Diagnose using a field to initialize itself. Patch by Brandon Pearcy!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b41900410fae8cba4bc02db2e3e44142e7f4c625 05-Nov-2009 John McCall <rjmccall@apple.com> Diagnose using a field to initialize itself. Patch by Brandon Pearcy!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4e08e7487e619e2a37d6c8d8ad811173ade97ba1 04-Nov-2009 Chris Lattner <sabre@nondot.org> ignore two new -W flags, patch by Tom Jablin!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
655fe9b0d93471e02d6510058355389bbac154f8 04-Nov-2009 Chris Lattner <sabre@nondot.org> ignore two new -W flags, patch by Tom Jablin!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
cdf4f468399c6598b2238772c09c12208365069d 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> InitializePreprocessor cannot fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
938963f076418aa61b570e5317240f66642af2df 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> InitializePreprocessor cannot fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
053eb03fc0dd1c3038f653859ca0e83b49648734 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -undef flag into PreprocessorInitOptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
468fe246192c3683360d1a6b1b333d85b8794f77 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -undef flag into PreprocessorInitOptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
26c32514ce211ace671036d3dae6898e520b3aab 04-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate the "old" ways of parsing operator-function-ids and
conversion-function-ids; all clients have moved on to
ParseUnqualifiedId.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1cf7f0adb4a9cbb9cc971a46af5eca9fcb6c566e 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Eliminate the "old" ways of parsing operator-function-ids and
conversion-function-ids; all clients have moved on to
ParseUnqualifiedId.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a5f7cb98b31f09b1011a46a37643fc6e6f451674 04-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Switch parsing of using declarations over to ParseUnqualifiedId.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
12c118a8ff9f61a4d63146fe1a5c0d60987f99bb 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Switch parsing of using declarations over to ParseUnqualifiedId.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
000f59548655c6a0f9dc69521406506de022f5c8 04-Nov-2009 John McCall <rjmccall@apple.com> Preserve type source information in sizeof/alignof expressions, and pass it
through to indexing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5ab75172051a6d2ea71a80a79e81c65519fd3462 04-Nov-2009 John McCall <rjmccall@apple.com> Preserve type source information in sizeof/alignof expressions, and pass it
through to indexing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0c29c7363f3b12a7563b56c163414dcd0ca5f891 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix commento.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
ac9cf4d943c33484caa235627c440d68d82f4337 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix commento.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
542defb262afbdac5a09bb02dd8ce7de2818f0fa 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out a diagnostic options class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
lang/Frontend/TextDiagnosticPrinter.h
eace8743030d2979251a0c5ae247371cfd9056e5 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out a diagnostic options class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/DiagnosticOptions.h
lang/Frontend/TextDiagnosticPrinter.h
aa934169a09b153bc7475e43fe0d1dcbf60737b9 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Catch uses of undefined values when they are used in assignment, thus catching such bugs closer to the source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h
lang/Analysis/PathSensitive/GRExprEngine.h
b107c4b7efb907d75620cd3c17f82fe27dc5b745 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Catch uses of undefined values when they are used in assignment, thus catching such bugs closer to the source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/UndefinedAssignmentChecker.h
lang/Analysis/PathSensitive/GRExprEngine.h
3f2bda4af4d6e73382a42030dcd94cec0e658f82 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Add mising #ifdef guards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
bf960cb0ff08fd766723a059e012daa596f5e918 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Add mising #ifdef guards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
3cdeade697dbfcc60cf14c3f87b7d41f5aa0f7f4 04-Nov-2009 John McCall <rjmccall@apple.com> Diagnose the use of 'fastcall' on functions without prototypes or with
varargs prototypes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9112b93829da90b1612453bea4c491a1678272a4 04-Nov-2009 John McCall <rjmccall@apple.com> Diagnose the use of 'fastcall' on functions without prototypes or with
varargs prototypes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0ba3aff6166d24f3e6732c033e87bf3d33faad7b 04-Nov-2009 John McCall <rjmccall@apple.com> Diagnose __builtin_offsetof on incomplete types. Fixes
rdar://problem/7222956



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d00f200f64994858492558b54c6f6f2b3d4b4310 04-Nov-2009 John McCall <rjmccall@apple.com> Diagnose __builtin_offsetof on incomplete types. Fixes
rdar://problem/7222956



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9701fea26fbbd52521d6fba23ff272edecb4108d 04-Nov-2009 John McCall <rjmccall@apple.com> Change our basic strategy for avoiding deprecation warnings when the decl use
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
54abf7d4fa3123b8324c09d2a4dfb789fd818403 04-Nov-2009 John McCall <rjmccall@apple.com> Change our basic strategy for avoiding deprecation warnings when the decl use
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
76e653a3565d955f87a1228297377d6ece62db54 04-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Merge ZeroSizedVLAChecker and UndefSizedVLAChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefSizedVLAChecker.h
lang/Analysis/PathSensitive/Checkers/VLASizeChecker.h
lang/Analysis/PathSensitive/Checkers/ZeroSizedVLAChecker.h
05a2338f7ba1c8a0136e120502f80a38cf0e9fd3 04-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Merge ZeroSizedVLAChecker and UndefSizedVLAChecker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefSizedVLAChecker.h
lang/Analysis/PathSensitive/Checkers/VLASizeChecker.h
lang/Analysis/PathSensitive/Checkers/ZeroSizedVLAChecker.h
cb368453a76478fcc07a8c08b94aa2311ea3c410 04-Nov-2009 Tanya Lattner <tonic@nondot.org> Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Frontend/CompileOptions.h
59876c2713683d1538ca45bb14c2f415862fb716 04-Nov-2009 Tanya Lattner <tonic@nondot.org> Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Frontend/CompileOptions.h
d1319d2d62b108c7c24c92e73d4d101b035d1037 04-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for parsing dependent template-ids that refer to
overloaded operators, e.g.,

p->template operator+<T>()




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
lang/Basic/OperatorKinds.h
lang/Parse/Parser.h
ca1bdd7c269a2390d43c040a60511edd017ee130 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement support for parsing dependent template-ids that refer to
overloaded operators, e.g.,

p->template operator+<T>()




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
lang/Basic/OperatorKinds.h
lang/Parse/Parser.h
773c0e5614b4f5bf5ab40e7730c8bbfd9ff94de0 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Use unsigned char instead of unsigned : 8 to make the optimizer happier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
082fb9ae304a25aa6be1f74d9b9720c52a96231e 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Use unsigned char instead of unsigned : 8 to make the optimizer happier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
1da5135f631dc77b9f5f0a107d72ba36e759e0aa 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Refactor StoreManager::BindDecl() to take a VarRegion* instead of a VarDecl*, and modify GRExprEngine::EvalBind() to handle decl initialization as well. This paves the way for adding "checker" visitation in EvalBind().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
f6f56d4fc8ebce17e7b83eb2c35f57a055c22283 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Refactor StoreManager::BindDecl() to take a VarRegion* instead of a VarDecl*, and modify GRExprEngine::EvalBind() to handle decl initialization as well. This paves the way for adding "checker" visitation in EvalBind().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
8ba8cd34a5e7080c3d41c8d344d9ed90d5cdc784 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Change GRTransferFuncs::RegisterChecks() to take a GRExprEngine& instead of a BugReporter&. This paves the way for pulling some of the retain/release checker into a "Checker" class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
1fb7d0c8323d53d10ae4f61e8bce02029f143ff7 04-Nov-2009 Ted Kremenek <kremenek@apple.com> Change GRTransferFuncs::RegisterChecks() to take a GRExprEngine& instead of a BugReporter&. This paves the way for pulling some of the retain/release checker into a "Checker" class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
c9f5eac5c940cc542c7f26560653cfeecd264545 04-Nov-2009 Mike Stump <mrs@apple.com> Refine volatile handling, specifically, we must have the canonical
type to look at the volatile specifier. I found these all from just
hand auditing the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
df317bf71653eeb235da8337b1e8e790f9653aa4 04-Nov-2009 Mike Stump <mrs@apple.com> Refine volatile handling, specifically, we must have the canonical
type to look at the volatile specifier. I found these all from just
hand auditing the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3bd3bc4796da157e94d39ba30154b2fc7bf8af0a 04-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Parsing and semantic analysis for template-ids that name overloaded
operators, e.g.,

operator+<int>

which now works in declarators, id-expressions, and member access
expressions. This commit only implements the non-dependent case, where
we can resolve the template-id to an actual declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
014e88d94ff83e3aad4e33b16413a2d1817ec208 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Parsing and semantic analysis for template-ids that name overloaded
operators, e.g.,

operator+<int>

which now works in declarators, id-expressions, and member access
expressions. This commit only implements the non-dependent case, where
we can resolve the template-id to an actual declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
a054adf6f7e7edcd096f57b8e21d54c79574dc89 03-Nov-2009 Chris Lattner <sabre@nondot.org> Implement support for the -undef command line option, patch by
Roman Divacky! PR5363


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
e6113de52df132b89c3a5a6141f17d37e83322ae 03-Nov-2009 Chris Lattner <sabre@nondot.org> Implement support for the -undef command line option, patch by
Roman Divacky! PR5363


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
b14db815faa116fe0b183c8e916eb7b4259e6125 03-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Replace the code that parses member access expressions after "." or
"->" with a use of ParseUnqualifiedId. Collapse
ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them),
ActOnOverloadedOperatorReferenceExpr,
ActOnConversionOperatorReferenceExpr, and
ActOnMemberTemplateIdReferenceExpr into a single, new action
ActOnMemberAccessExpr that does the same thing more cleanly (and can
keep more source-location information).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
2d1c21414199a7452f122598189363a3922605b1 03-Nov-2009 Douglas Gregor <dgregor@apple.com> Replace the code that parses member access expressions after "." or
"->" with a use of ParseUnqualifiedId. Collapse
ActOnMemberReferenceExpr, ActOnDestructorReferenceExpr (both of them),
ActOnOverloadedOperatorReferenceExpr,
ActOnConversionOperatorReferenceExpr, and
ActOnMemberTemplateIdReferenceExpr into a single, new action
ActOnMemberAccessExpr that does the same thing more cleanly (and can
keep more source-location information).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
388a960c68b38f593ed6282f391ec505b57ab89d 03-Nov-2009 John McCall <rjmccall@apple.com> Silence a warning by giving Parser::FieldCallback a virtual destructor, and
anchor the vtable to Parser.cpp for good measure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
6c94a6d77f456f23ecd4c2061e6413786b5e6571 03-Nov-2009 John McCall <rjmccall@apple.com> Silence a warning by giving Parser::FieldCallback a virtual destructor, and
anchor the vtable to Parser.cpp for good measure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bc3aaabab8943d6bfc1f5df4ef068be1c6f81e11 03-Nov-2009 John McCall <rjmccall@apple.com> Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d8ac05753dc4506224d445ff98399c01da3136e5 03-Nov-2009 John McCall <rjmccall@apple.com> Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases). Remove some excess diagnostics arising during parse failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3ce99b53f01404c7f34520d0bd8c5072a7e46643 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Merge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp]. They are essentially two parts of the same check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/DereferenceChecker.h
lang/Analysis/PathSensitive/Checkers/NullDerefChecker.h
lang/Analysis/PathSensitive/Checkers/UndefDerefChecker.h
dc998c1b90a17d747ca2fb05e967779740747162 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Merge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp]. They are essentially two parts of the same check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/DereferenceChecker.h
lang/Analysis/PathSensitive/Checkers/NullDerefChecker.h
lang/Analysis/PathSensitive/Checkers/UndefDerefChecker.h
4d8e4fe646df7d12f08a9c2681e6b13b7185f72f 03-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Use ParseUnqualifiedId when parsing id-expressions. This eliminates
yet another copy of the unqualified-id parsing code.

Also, use UnqualifiedId to simplify the Action interface for building
id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr,
ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been
removed in favor of the new ActOnIdExpression action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
02a24ee67c0a91bdb0db8a651d5748595652e670 03-Nov-2009 Douglas Gregor <dgregor@apple.com> Use ParseUnqualifiedId when parsing id-expressions. This eliminates
yet another copy of the unqualified-id parsing code.

Also, use UnqualifiedId to simplify the Action interface for building
id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr,
ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been
removed in favor of the new ActOnIdExpression action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
c2e8dd74fd21c4ee3be55a63cd55cab00b1c5e4f 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull VLA size checker into its own files.
Split it to two checkers, one for undefined size,
the other for zero size, so that we don't need to query the size
when emitting the bug report.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/UndefSizedVLAChecker.h
lang/Analysis/PathSensitive/Checkers/ZeroSizedVLAChecker.h
5206f0b913d1a11744c9436c83b24f8daa21152c 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull VLA size checker into its own files.
Split it to two checkers, one for undefined size,
the other for zero size, so that we don't need to query the size
when emitting the bug report.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/Checkers/UndefSizedVLAChecker.h
lang/Analysis/PathSensitive/Checkers/ZeroSizedVLAChecker.h
b4be4da7a6b37e5296b01b1f2172bfdbef0da7a1 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Implement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool release] in GC mode


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
54cb7ccc769a5e81a13812e08c21daf52a781262 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Implement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool release] in GC mode


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
7f437c99d5bec4dd91aa7404e64c0237e288f4d8 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Move 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRefCount.cpp to ASTContext.h. These functions are likely to be generally useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d5925bdff8bda8e062985caea299946636104d99 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Move 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRefCount.cpp to ASTContext.h. These functions are likely to be generally useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fa24b86da2e04bfa3afd4f86d26f666971a3a87a 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull AttrNonNullChecker into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h
94943b6d913718216a95a91864040ffc11a1d779 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull AttrNonNullChecker into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h
de62af5132c51cdc718534e53278002b6949a00c 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull UndefinedArgChecker into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
8958fff8aad09f317a51b2d4cda3d7b126a530a4 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull UndefinedArgChecker into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h
d3dca2e52a73dcede1c56ef5e4fa7e68e4610f18 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull BadCallChecker into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/BadCallChecker.h
4f64e5f03149200aaf553d7742966d78b717a32c 03-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Pull BadCallChecker into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/BadCallChecker.h
bc8aae9e4a2d56b14fa48fd36bcf123443869304 03-Nov-2009 John McCall <rjmccall@apple.com> Switch ParseStructDeclaration to a callback-based API. This will make
it easier to track within Sema whether the parser is parsing a declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bdd563ec391b0a83fc6d04b8a8ea3022aa702f74 03-Nov-2009 John McCall <rjmccall@apple.com> Switch ParseStructDeclaration to a callback-based API. This will make
it easier to track within Sema whether the parser is parsing a declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d87f5a7a7cb050e9cec8b330f06d1f034eddb417 03-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new class, UnqualifiedId, that provides a parsed
representation of a C++ unqualified-id, along with a single parsing
function (Parser::ParseUnqualifiedId) that will parse all of the
various forms of unqualified-id in C++.

Replace the representation of the declarator name in Declarator with
the new UnqualifiedId class, simplifying declarator-id parsing
considerably and providing more source-location information to
Sema. In the future, I hope to migrate all of the other
unqualified-id-parsing code over to this single representation, then
begin to merge actions that are currently only different because we
didn't have a unqualified notion of the name in the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
3f9a0566e6793151b99a65ab936220971cf96c1b 03-Nov-2009 Douglas Gregor <dgregor@apple.com> Introduce a new class, UnqualifiedId, that provides a parsed
representation of a C++ unqualified-id, along with a single parsing
function (Parser::ParseUnqualifiedId) that will parse all of the
various forms of unqualified-id in C++.

Replace the representation of the declarator name in Declarator with
the new UnqualifiedId class, simplifying declarator-id parsing
considerably and providing more source-location information to
Sema. In the future, I hope to migrate all of the other
unqualified-id-parsing code over to this single representation, then
begin to merge actions that are currently only different because we
didn't have a unqualified notion of the name in the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
509ec12b3c2db8166ccac2a9f87de6b6aa280602 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove GRExprEngine::CheckerVisitLocation(). It was only called in one place, so we inlined it in to GRExprEngine::EvalLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
0296c22557b3735e2ffeff690eb46fb0e9152bcc 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Remove GRExprEngine::CheckerVisitLocation(). It was only called in one place, so we inlined it in to GRExprEngine::EvalLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
ce45a081aec95156d0c3ab5ab9ca0d37ac268372 02-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Property declared in continuation class can only be used to
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
a6f14e1a7ee3a9343a838297c73ca87fddb9ed4a 02-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Property declared in continuation class can only be used to
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
4c746ada4fe8f5b46b213cc50ad5df664dc0d512 02-Nov-2009 John Thompson <john.thompson.jtsoftware@gmail.com> Added __has_include and __has_include_next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
92bd8c70a6837b647a6c55964f8d0a50bf561dbc 02-Nov-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Added __has_include and __has_include_next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
3d6b1440630e63bb2e8f7cec5cbcb48ed599ff00 02-Nov-2009 Ted Kremenek <kremenek@apple.com> Hopefully make gcc-4.0 happy with respect to the following warning:

warning: 'class clang::StackFrameContext' has virtual functions but non-virtual destructor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
cf9c789d449e088814c9e254d48112c96c8c6c6a 02-Nov-2009 Ted Kremenek <kremenek@apple.com> Hopefully make gcc-4.0 happy with respect to the following warning:

warning: 'class clang::StackFrameContext' has virtual functions but non-virtual destructor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
dea1cba5fdb20dc2e685261a19dc6236757a2899 02-Nov-2009 Ted Kremenek <kremenek@apple.com> Add "virtual" keywords for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
3abf3ad0861fb6eb8368f59dcb4cd454939b1bd2 02-Nov-2009 Ted Kremenek <kremenek@apple.com> Add "virtual" keywords for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
8ee2fc3918d6eaf8befcfd5d6fa11169987db203 02-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose implementation of a property declared in a category
in its class implementation instead of crashing. Fixes radar 7350345.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3684bd4c9518f6507d375ff8e4a4e32ce3bb51c3 02-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose implementation of a property declared in a category
in its class implementation instead of crashing. Fixes radar 7350345.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4b54e8f07c3acbb3919a6b2a28639e8765c62366 31-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Fix the type of __builtin_expect, from Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
df7c3b955e31a6951822f2adf36e98543ef14c7e 31-Oct-2009 Douglas Gregor <dgregor@apple.com> Fix the type of __builtin_expect, from Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
a8ddfcbd6dbcf292c30401f3b712e5453ec2667f 31-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Add two missing CINDEX_LINKAGE uses, in libCIndex, from Kovarththanan
Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85665 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
08b0e8daeb683686b876d72674962ad96df21d45 31-Oct-2009 Douglas Gregor <dgregor@apple.com> Add two missing CINDEX_LINKAGE uses, in libCIndex, from Kovarththanan
Rajaratnam!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85665 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
13ead642842f892c86682355db5c6f71770f36a9 31-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Update CMake file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
7e36e95e213285bea70854541150868b6b74842b 31-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Update CMake file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
ecce7f59b973b9f54f180e0369f461fcb588eb01 31-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move CheckDivZero into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/DivZeroChecker.h
9e56d2360b2cfb66864755396c5a64b5019871b8 31-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move CheckDivZero into its own files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/DivZeroChecker.h
92641557ce714394ad6e92e64f856afb71d49757 31-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move UndefDerefChecker into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefDerefChecker.h
246a9ade3e1fd24249c03f1757ed740e35fef0cd 31-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move UndefDerefChecker into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/UndefDerefChecker.h
3a6c877c4fd82f5b747e205fef45d39f9e11575a 31-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add header comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
507eec8d849fd86ac42ebdae2a343f9ab64fb274 31-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add header comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugType.h
fc4cdc9e773e417a67ac53160ced64dd783f0236 30-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Improved fix for PR3844, which recovers better for class template
partial specializations and explicit instantiations of non-templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
c78c06d81f9838aea4198e4965cc1b26bb0bf838 30-Oct-2009 Douglas Gregor <dgregor@apple.com> Improved fix for PR3844, which recovers better for class template
partial specializations and explicit instantiations of non-templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
0cfb3bbb2ebbc7198b55ac255c3d2f2228c484ae 30-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics when parsing something like

template<> struct foo<int> { ... };

where "foo" does not refer to a template. Fixes PR3844.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
2cc782f7932f1069d9fa8bb5c518165802aad68d 30-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics when parsing something like

template<> struct foo<int> { ... };

where "foo" does not refer to a template. Fixes PR3844.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
854d2b8695ea2d66a3ff8973170fc531efae5d0a 30-Oct-2009 John McCall <rjmccall@apple.com> Finally suppress a compiler warning from gcc on release-asserts. Also fixes
a crash on <vector> in same, which bears additional investigation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
cbe12738371bec6ff20372e1d3426cffc85d8323 30-Oct-2009 John McCall <rjmccall@apple.com> Finally suppress a compiler warning from gcc on release-asserts. Also fixes
a crash on <vector> in same, which bears additional investigation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
c73058aa49e18c39d463d97e94ec98fe5697a951 30-Oct-2009 Ted Kremenek <kremenek@apple.com> Make checkers run in deterministic order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
094bef56a7900f13bb777f9a352704104b1458e7 30-Oct-2009 Ted Kremenek <kremenek@apple.com> Make checkers run in deterministic order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
9a10833ddd4ecf88c00662d7696cf02b05ab3044 30-Oct-2009 Ted Kremenek <kremenek@apple.com> Move NullDerefChecker.h instead a 'Checkers' subdirectory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/NullDerefChecker.h
lang/Analysis/PathSensitive/NullDerefChecker.h
d86caaa6c3d1f8ec4307f883d6b1a7722aecdc81 30-Oct-2009 Ted Kremenek <kremenek@apple.com> Move NullDerefChecker.h instead a 'Checkers' subdirectory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checkers/NullDerefChecker.h
lang/Analysis/PathSensitive/NullDerefChecker.h
ae18c1dbca608965c06a5b4679c62d01ba44f30f 30-Oct-2009 Ted Kremenek <kremenek@apple.com> Move all logic for the null dereference checker from GRExprEngineInternalChecks.cpp to a separate .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/NullDerefChecker.h
bc3a021df7f9ee4c4d1e9ec3c2aac2ef6d883206 30-Oct-2009 Ted Kremenek <kremenek@apple.com> Move all logic for the null dereference checker from GRExprEngineInternalChecks.cpp to a separate .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/NullDerefChecker.h
12ceb217833981841c85c1231354369f8ee43272 30-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Include macros in code-completion results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
3f7c7f48654230d8e379214cfe49fcf2fde0a2c6 30-Oct-2009 Douglas Gregor <dgregor@apple.com> Include macros in code-completion results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
ab22afee00f4ca457dfa537892475879bde72448 30-Oct-2009 John Thompson <john.thompson.jtsoftware@gmail.com> Re-arranged some internal functions for coming __has_include changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
a28cc090f265d5bdaef9ebb24fb9d579928d3a18 30-Oct-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Re-arranged some internal functions for coming __has_include changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
ab171c54591c02d246e1938c6ec7ae598fcba2ec 30-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix PR5316: make assignment expressions can be visited as lvalue. Then we
can get the correct base lvalue.
Revert r85578.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
662174ca204cb520f634bdcb34a3708f45389d14 30-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix PR5316: make assignment expressions can be visited as lvalue. Then we
can get the correct base lvalue.
Revert r85578.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
a9a97de9a49a3937dbae5e366d48a56a6b4c5b3a 30-Oct-2009 Chris Lattner <sabre@nondot.org> warn about returning the address of a label.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9e6b37a9f1d499e7ca0950edacd0b6569e491d7f 30-Oct-2009 Chris Lattner <sabre@nondot.org> warn about returning the address of a label.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
01530b13a7a16858a8505fa90499e7ccae7baa35 30-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> This patch computes composite type of two objective-c expressions
used in a conditional expression by finding the most-derived common
super class of the two and qualifies the resulting type by the
intersection of the protocl qualifier list of the two objective-c
pointer types. ( this is continuation of radar 7334235).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e23fa2d0e84d1b878e012442a726c664216a9adf 30-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> This patch computes composite type of two objective-c expressions
used in a conditional expression by finding the most-derived common
super class of the two and qualifies the resulting type by the
intersection of the protocl qualifier list of the two objective-c
pointer types. ( this is continuation of radar 7334235).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
691c8c98e422ea1cfbcd14006b874c0fc1f90714 30-Oct-2009 Anders Carlsson <andersca@mac.com> Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1a31a18db9d657751f38c724adc0d62e86852bd7 30-Oct-2009 Anders Carlsson <andersca@mac.com> Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d6e6aa154f9dd6184e82950d1bda29e192b1a355 30-Oct-2009 John McCall <rjmccall@apple.com> Include pointee type information in the diagnostic for creating bad pointers or
arrays.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ac406052f7b980f8caa6b07b4a8d0867d53852c4 30-Oct-2009 John McCall <rjmccall@apple.com> Include pointee type information in the diagnostic for creating bad pointers or
arrays.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
997b30eccf20a93658b692604a4c89848c098d9c 30-Oct-2009 John McCall <rjmccall@apple.com> Report accurate source-location information when rebuilding types during
template instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
85737a71fee8c737f7cfba79a0aca89298fe573b 30-Oct-2009 John McCall <rjmccall@apple.com> Report accurate source-location information when rebuilding types during
template instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
671b0ff0d8b39fa6ba97a7a16d0d98124020d9aa 30-Oct-2009 John McCall <rjmccall@apple.com> Silence a gcc warning where it notices that default-constructing a class
doesn't initialize anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
7c475ee1339c03e2d544a28aa9b8da393ce7d20c 30-Oct-2009 John McCall <rjmccall@apple.com> Silence a gcc warning where it notices that default-constructing a class
doesn't initialize anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
3d3c085b441678d5cac46322c10be9d35ddeb813 29-Oct-2009 Steve Naroff <snaroff@apple.com> - Add/tweak some comments.
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0d69b8cc8e90a9364771837cb42d7031b4cbb984 29-Oct-2009 Steve Naroff <snaroff@apple.com> - Add/tweak some comments.
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
1f5b1cfe70f976b9f13294a194c025c8cc3881ae 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move some clang-cc errors to use diagnostics, and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
8cb6562f7b7e881342bfb228204545bfc9ee51c0 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move some clang-cc errors to use diagnostics, and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
9260ee905bf6adf1084464ae9abe6a68c2e59cd3 29-Oct-2009 John McCall <rjmccall@apple.com> A few TemplateArgumentLoc clean-ups. Try to remember the Expr for a declaration.
Provide an API for getting the SourceRange of a TAL and use it judiciously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
828bff2079b6a91ecd7ed5b842c59527d7682789 29-Oct-2009 John McCall <rjmccall@apple.com> A few TemplateArgumentLoc clean-ups. Try to remember the Expr for a declaration.
Provide an API for getting the SourceRange of a TAL and use it judiciously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
lang/AST/TypeLoc.h
9532add6f24ae449c22f8c98f2246a974eee95be 29-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Fix Release-Asserts build breakage

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
8de39b431d3775cd46584080beec3a75d019bd28 29-Oct-2009 Douglas Gregor <dgregor@apple.com> Fix Release-Asserts build breakage

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
2509390283cc92808f9d67495b994f7a0c8eddd4 29-Oct-2009 John McCall <rjmccall@apple.com> Apparently when is now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
4fff4b3fdf49272a26b7cb7bd564a521e938805b 29-Oct-2009 John McCall <rjmccall@apple.com> Apparently when is now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateBase.h
588613178e3a10e2b840c8f4db9e058f2fec0005 29-Oct-2009 John McCall <rjmccall@apple.com> Track source information for template arguments and template specialization
types. Preserve it through template instantiation. Preserve it through PCH,
although TSTs themselves aren't serializable, so that's pretty much meaningless.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/TemplateBase.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
833ca991c1bfc967f0995974ca86f66ba1f666b5 29-Oct-2009 John McCall <rjmccall@apple.com> Track source information for template arguments and template specialization
types. Preserve it through template instantiation. Preserve it through PCH,
although TSTs themselves aren't serializable, so that's pretty much meaningless.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/TemplateBase.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
1bffadc0d7351f9d155ca1f62141cc571279f3d0 29-Oct-2009 John McCall <rjmccall@apple.com> Extract TemplateArgument into a new header just for common template
classes. Move its implementation into a new module.

This will seem marginally more justified in a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/TemplateBase.h
275c10a8a4a43219f67d8d2c912ec6294d9d9af2 29-Oct-2009 John McCall <rjmccall@apple.com> Extract TemplateArgument into a new header just for common template
classes. Move its implementation into a new module.

This will seem marginally more justified in a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/TemplateBase.h
52128a7f4d9abea59815ca49e00a2e194d1c34b4 29-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move NullDeref and UndefDeref into their own checker.
Add a CheckLocation() interface to Checker.
Now ImplicitNullDeref nodes are cached in NullDerefChecker.
More cleanups follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/NullDerefChecker.h
ec9227fea66c3439991fc84b0d33b0a8b4b8875e 29-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move NullDeref and UndefDeref into their own checker.
Add a CheckLocation() interface to Checker.
Now ImplicitNullDeref nodes are cached in NullDerefChecker.
More cleanups follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/BugType.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/NullDerefChecker.h
e91c15fe1a18434b313f3de05d983c60227169ba 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Reject -I- in driver instead of clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
607d7f6d8f21066cc48bbe2c51e6ca412a00943f 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Reject -I- in driver instead of clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
c55a11bb31cf885afdc8e62f560f356bc0fdd4a9 29-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for semantic checking and template instantiation of
class template partial specializations of member templates. Also,
fixes a silly little bug in the marking of "used" template parameters
in member templates. Fixes PR5236.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
ed9c0f90b7e0811c209b95e39fe07c211c531285 29-Oct-2009 Douglas Gregor <dgregor@apple.com> Implement support for semantic checking and template instantiation of
class template partial specializations of member templates. Also,
fixes a silly little bug in the marking of "used" template parameters
in member templates. Fixes PR5236.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
adb6d18929adba2aca1b118c148df59190f1c1e9 28-Oct-2009 Steve Naroff <snaroff@apple.com> Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/7310688>.

Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.

I wanted to land the major changes before finishing up the optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85425 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Index/Utils.h
f96b524306ccfa623235d375deee79637bd38f29 28-Oct-2009 Steve Naroff <snaroff@apple.com> Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/7310688>.

Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.

I wanted to land the major changes before finishing up the optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85425 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
lang/Index/Utils.h
2dc6522289d676177a7bd9c524a59a76c50530ac 28-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Mangle based on the declaration we're given, not the canonical
declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
457e2815d43fa68f7ff7cd2f7e9d1bf7b6fdc653 28-Oct-2009 Douglas Gregor <dgregor@apple.com> Mangle based on the declaration we're given, not the canonical
declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Redeclarable.h
277959bc806648ed3332b7a752ecd0380ff29d34 28-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> make CallGraph more flexible by letting it accept ASTContext instead of ASTUnit.
Patch by Simone Pellegrini.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
f20288c91601dd3fbab6362a3400a0e6c472795f 28-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> make CallGraph more flexible by letting it accept ASTContext instead of ASTUnit.
Patch by Simone Pellegrini.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
7872ee90a6a7002574321da3fafb39ca9b035e30 28-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Type of a conditional expression with two distinct objective-c
class pointer is the most derived common class of the two.
This is <rdar://problem/7334235>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
db07b3f7cdcb505329c1280d7cf70791739a7cad 28-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Type of a conditional expression with two distinct objective-c
class pointer is the most derived common class of the two.
This is <rdar://problem/7334235>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8b43240c2af348312e8b5d5bcb53018a238879a5 27-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce FunctionDecl::isInlined() to tell whether a function should
be inlined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7ced9c8529b734e313f62a3b81189d6f402f6713 27-Oct-2009 Douglas Gregor <dgregor@apple.com> Introduce FunctionDecl::isInlined() to tell whether a function should
be inlined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
21c878fe794911621478ec927e03d3c44866ca9b 27-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Rename FunctionDecl::isInline/setInline to
FunctionDecl::isInlineSpecified/setInlineSpecified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/DeclXML.def
0130f3cc4ccd5f46361c48d5fe94133d74619424 27-Oct-2009 Douglas Gregor <dgregor@apple.com> Rename FunctionDecl::isInline/setInline to
FunctionDecl::isInlineSpecified/setInlineSpecified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/DeclXML.def
df79222c1d35830ff1e38e82e01ef186bc52ede5 27-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Explicit instantiation suppresses the instantiation of non-inline
function template specializations and member functions of class
template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3b846b6c252972a6f142aa226c1e65aebd0feeca 27-Oct-2009 Douglas Gregor <dgregor@apple.com> Explicit instantiation suppresses the instantiation of non-inline
function template specializations and member functions of class
template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cc04c7d8f91caa9fabeda99728c18407f2ba68c8 27-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> An explicit instantiation definition only instantiations those class
members that have a definition. Also, use
CheckSpecializationInstantiationRedecl as part of this instantiation
to make sure that we diagnose the various kinds of problems that can
occur with explicit instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0d03514da06dffb39a260a1228ea3fd01d196fa4 27-Oct-2009 Douglas Gregor <dgregor@apple.com> An explicit instantiation definition only instantiations those class
members that have a definition. Also, use
CheckSpecializationInstantiationRedecl as part of this instantiation
to make sure that we diagnose the various kinds of problems that can
occur with explicit instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
29806f1ea6f6b496f20425f5a9b675a4f6cecce6 27-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Split AddDefaultSystemIncludePaths into C, C++ and framework specific functions.

The user visible changes are:

*) Frameworks are only searched on OS X
*) The Cygwin c++ headers are now marked as c++ aware. I am almost
sure that not marking them was a bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
e4b255c80a786c6f16d3f0362ecb7e1b1e959f63 27-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Split AddDefaultSystemIncludePaths into C, C++ and framework specific functions.

The user visible changes are:

*) Frameworks are only searched on OS X
*) The Cygwin c++ headers are now marked as c++ aware. I am almost
sure that not marking them was a bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
e37450da5a0e12caee4b5a6e19add068c44df399 27-Oct-2009 Steve Naroff <snaroff@apple.com> Add support for 'CXFile' (<rdar://problem/7303360>).

- 4 new functions (clang_getCursorSourceFile, clang_getDeclSourceFile, clang_getFileName, clang_getFileTime).

- Should remove clang_getDeclSource() and clang_getCursorSource(). For now, just put 'deprecate' comment in header.

- Also changed CXX style comment to C style (to eliminate warning).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85238 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
88145034694ed5267fa6fa5febc54fadc02bd479 27-Oct-2009 Steve Naroff <snaroff@apple.com> Add support for 'CXFile' (<rdar://problem/7303360>).

- 4 new functions (clang_getCursorSourceFile, clang_getDeclSourceFile, clang_getFileName, clang_getFileTime).

- Should remove clang_getDeclSource() and clang_getCursorSource(). For now, just put 'deprecate' comment in header.

- Also changed CXX style comment to C style (to eliminate warning).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85238 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
a2e668734e6112b939229c4526a4ee444c7808c4 27-Oct-2009 John Thompson <john.thompson.jtsoftware@gmail.com> Changes for building as a Windows DLL

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85234 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2e06fc877a633abea3b40a64950c7316dac29ca8 27-Oct-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Changes for building as a Windows DLL

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85234 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3ea917bf3bdf43c4dd8d1aa3469295d4ba2b8a5a 27-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Chris's suggestions for the precendence warnings. Reformat the code a bit. Test the fixits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
aee3c9375f97a49edef2a36f15df6abd9748e2a1 27-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Chris's suggestions for the precendence warnings. Reformat the code a bit. Test the fixits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
07677bbc5b3ebd35868bc3a2a6fd4597373485e0 27-Oct-2009 Mike Stump <mrs@apple.com> __builtin_object_size refinements. Also handle stack based objects. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
660e6f79a138a30a437c02142f23e7ef4eb21b2e 27-Oct-2009 Mike Stump <mrs@apple.com> __builtin_object_size refinements. Also handle stack based objects. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4b4153e445952585fb2ffec00987149c0a276b3d 26-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add fixit hint to bitwise precedence warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
6b169accbb182d328ad41746c4071d8e7f90a628 26-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add fixit hint to bitwise precedence warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
1d2ce5a06cd25bf3e6de3cbcea9341c3e9adeb9a 26-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9e1d29bb369530c15230e4c92aa67239c283ece2 26-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement a warning for mixing bitwise logical with comparison ops. Fixes PR5297.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bc328239ed5ed2cf460741e225f7d1df0bb9cd9f 26-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Rename -nostdclanginc to -nobuiltininc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
8d737cc78cb28f39179d6c7ca00eb5d3cf563129 26-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Rename -nostdclanginc to -nobuiltininc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
e670df714312e47c62ab4ef4d44db682a55fb604 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Update location of DataTypes.h to reflect move in LLVM with r85086.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/RecordLayout.h
lang/AST/StmtIterator.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/ProgramPoint.h
lang/Basic/OnDiskHashTable.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Lex/LiteralSupport.h
9f8eb2032030482b1d3de86e9bee725d93564302 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Update location of DataTypes.h to reflect move in LLVM with r85086.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/RecordLayout.h
lang/AST/StmtIterator.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/ProgramPoint.h
lang/Basic/OnDiskHashTable.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Lex/LiteralSupport.h
3b822f1b2faac5db9cc6297485f82ac5fe417b0b 25-Oct-2009 Chris Lattner <sabre@nondot.org> rename getTypeSigned() -> isTypeSigned() per daniel's review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
961f0708fb66375acf47f9e9bc1aecfb3f992aea 25-Oct-2009 Chris Lattner <sabre@nondot.org> rename getTypeSigned() -> isTypeSigned() per daniel's review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
efe2668a02c21cfce57380eabad105941bf65906 25-Oct-2009 Chris Lattner <sabre@nondot.org> cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e37b3e6d7ed495fdec4067ccc1117a79d2afd450 25-Oct-2009 Chris Lattner <sabre@nondot.org> cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
f6d3e11497fbae115d58e7d4e47051e098b945e1 25-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
8ce35b095e8fca45e04c1bda14ed0548ce7536ad 25-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Remove the Skip parameter from GetTypeForDeclarator and dependents. Take the opportunity to improve an error message and fix PR4498.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
1ea45c2dc05470e81c857750bbe6ed82c4fabcc0 25-Oct-2009 Chris Lattner <sabre@nondot.org> change Sema::ActOnFriendTypeDecl to use GetTypeForDeclarator instead
of ConvertDeclSpecToType, which I'd like to keep private to SemaType.cpp.
We do this by cons'ing up a trivial Declarator for the type.

John, please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c7f1904474600aa74f5f014941d2ed5c4cf462aa 25-Oct-2009 Chris Lattner <sabre@nondot.org> change Sema::ActOnFriendTypeDecl to use GetTypeForDeclarator instead
of ConvertDeclSpecToType, which I'd like to keep private to SemaType.cpp.
We do this by cons'ing up a trivial Declarator for the type.

John, please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0627d19a4caf3246f1f5948cf754146fc6165cbc 25-Oct-2009 Chris Lattner <sabre@nondot.org> In objc mode, every identifier in a cast expression was using doing a
type looking using getTypeName() and every property access was using
NextToken() to do lookahead to see if the identifier is followed by
a '.'. Rearrange this code to not need lookahead and only do the
type lookup if we have "identifier." in the token stream. Also
improve a diagnostic a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
b7c3fd7b493329550c29dec11d31aca4d537e23e 25-Oct-2009 Chris Lattner <sabre@nondot.org> In objc mode, every identifier in a cast expression was using doing a
type looking using getTypeName() and every property access was using
NextToken() to do lookahead to see if the identifier is followed by
a '.'. Rearrange this code to not need lookahead and only do the
type lookup if we have "identifier." in the token stream. Also
improve a diagnostic a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
e3a745cf178d0df7e61be9db186979aa9b4d848b 24-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove duplicated constructor declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
63daa6179ea77eb4ff7a213c891aff5f32aca03f 24-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove duplicated constructor declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
7f96d1fe90385d6477dbff418408a5563c3022e3 24-Oct-2009 John McCall <rjmccall@apple.com> Preserve type source information in TypedefDecls. Preserve it across
template instantiation. Preserve it through PCH. Show it off to the indexer.

I'm healthily ignoring the vector type cases because we don't have a sensible
TypeLoc implementation for them anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ba6a9bd384df475780be636ca45bcef5c5bbd19f 24-Oct-2009 John McCall <rjmccall@apple.com> Preserve type source information in TypedefDecls. Preserve it across
template instantiation. Preserve it through PCH. Show it off to the indexer.

I'm healthily ignoring the vector type cases because we don't have a sensible
TypeLoc implementation for them anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b57ab7949f6b2ec0dd49f750843fab093592cacd 24-Oct-2009 John McCall <rjmccall@apple.com> Store the builtin types as CanQualTypes. Expand a bit on the CanQual API,
but also remove some methods that cause ambiguities, and generally
make CanQual<blah> more analogous to QualType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
e27ec8ad56dbf1efb2de004b90fbbb86f740e3f1 24-Oct-2009 John McCall <rjmccall@apple.com> Store the builtin types as CanQualTypes. Expand a bit on the CanQual API,
but also remove some methods that cause ambiguities, and generally
make CanQual<blah> more analogous to QualType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
54d2596d47cc4ae9067d3b05f533d2176ef8492a 23-Oct-2009 John McCall <rjmccall@apple.com> Remove OriginalTypeParmDecl; the original type is the one specified
in the DeclaratorInfo, if one is present.

Preserve source information through template instantiation. This is made
more complicated by the possibility that ParmVarDecls don't have DIs, which
is possibly worth fixing in the future.

Also preserve source information for function parameters in ObjC method
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclNodes.def
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Frontend/PCHBitCodes.h
58e4677a948e80c92deeebbcd3bdd9266adda798 23-Oct-2009 John McCall <rjmccall@apple.com> Remove OriginalTypeParmDecl; the original type is the one specified
in the DeclaratorInfo, if one is present.

Preserve source information through template instantiation. This is made
more complicated by the possibility that ParmVarDecls don't have DIs, which
is possibly worth fixing in the future.

Also preserve source information for function parameters in ObjC method
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclNodes.def
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Frontend/PCHBitCodes.h
48527cf92c374e24f3a06dd9ab6fd58c0004d393 23-Oct-2009 John McCall <rjmccall@apple.com> Add ASTContext::getTrivialDeclaratorInfo, which initializes a new
source info block with a single location.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a4eb74d4dfe126c686dc708fec444c85ffb73b47 23-Oct-2009 John McCall <rjmccall@apple.com> Add ASTContext::getTrivialDeclaratorInfo, which initializes a new
source info block with a single location.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c5117f73bbc42ccc149fdd447af0e7ff60e5f95f 23-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose misuse of '.*' and '->*' operators during parse
instead of crashing in code gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f071e9b173dbaf97b00849c309a97c5aa3c49ae9 23-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose misuse of '.*' and '->*' operators during parse
instead of crashing in code gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
a86b882c81a748417bbf10b488a779a6e78818cb 23-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix operator precedence in Doug's most recent commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2cf719c3c3d805f630dfc6b1255e52647820888e 23-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix operator precedence in Doug's most recent commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1d5d81452d1e5f93f0fd6537a5909b1fcf94bb73 23-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate QualifiedDeclRefExpr, which captured the notion of a
qualified reference to a declaration that is not a non-static data
member or non-static member function, e.g.,

namespace N { int i; }
int j = N::i;

Instead, extend DeclRefExpr to optionally store the qualifier. Most
clients won't see or care about the difference (since
QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the
number of top-level expression types that clients need to cope with,
brings the implementation of DeclRefExpr into line with MemberExpr,
and simplifies and unifies our handling of declaration references.

Extended DeclRefExpr to (optionally) store explicitly-specified
template arguments. This occurs when naming a declaration via a
template-id (which will be stored in a TemplateIdRefExpr) that,
following template argument deduction and (possibly) overload
resolution, is replaced with a DeclRefExpr that refers to a template
specialization but maintains the template arguments as written.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
a2813cec2605ce7878d1b13471d685f689b251af 23-Oct-2009 Douglas Gregor <dgregor@apple.com> Eliminate QualifiedDeclRefExpr, which captured the notion of a
qualified reference to a declaration that is not a non-static data
member or non-static member function, e.g.,

namespace N { int i; }
int j = N::i;

Instead, extend DeclRefExpr to optionally store the qualifier. Most
clients won't see or care about the difference (since
QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the
number of top-level expression types that clients need to cope with,
brings the implementation of DeclRefExpr into line with MemberExpr,
and simplifies and unifies our handling of declaration references.

Extended DeclRefExpr to (optionally) store explicitly-specified
template arguments. This occurs when naming a declaration via a
template-id (which will be stored in a TemplateIdRefExpr) that,
following template argument deduction and (possibly) overload
resolution, is replaced with a DeclRefExpr that refers to a template
specialization but maintains the template arguments as written.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
4ea8425c9601895fa137f877bc784f75f20adac6 23-Oct-2009 John McCall <rjmccall@apple.com> When building types from declarators, instead of building two types (one for
the DeclaratorInfo, one for semantic analysis), just build a single type whose
canonical type will reflect the semantic analysis (assuming the type is
well-formed, of course).

To make that work, make a few changes to the type system:
* allow the nominal pointee type of a reference type to be a (possibly sugared)
reference type. Also, preserve the original spelling of the reference type.
Both of these can be ignored on canonical reference types.
* Remove ObjCProtocolListType and preserve the associated source information on
the various ObjC TypeLocs. Preserve the spelling of protocol lists except in
the canonical form.
* Preserve some level of source type structure on parameter types, but
canonicalize on the canonical function type. This is still a WIP.

Drops code size, makes strides towards accurate source location representation,
slight (~1.7%) progression on Cocoa.h because of complexity drop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
54e14c4db764c0636160d26c5bbf491637c83a76 23-Oct-2009 John McCall <rjmccall@apple.com> When building types from declarators, instead of building two types (one for
the DeclaratorInfo, one for semantic analysis), just build a single type whose
canonical type will reflect the semantic analysis (assuming the type is
well-formed, of course).

To make that work, make a few changes to the type system:
* allow the nominal pointee type of a reference type to be a (possibly sugared)
reference type. Also, preserve the original spelling of the reference type.
Both of these can be ignored on canonical reference types.
* Remove ObjCProtocolListType and preserve the associated source information on
the various ObjC TypeLocs. Preserve the spelling of protocol lists except in
the canonical form.
* Preserve some level of source type structure on parameter types, but
canonicalize on the canonical function type. This is still a WIP.

Drops code size, makes strides towards accurate source location representation,
slight (~1.7%) progression on Cocoa.h because of complexity drop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
7480534aa1979f5c8a6c1d59ede223ba21f280e5 22-Oct-2009 John McCall <rjmccall@apple.com> Canonicality is a property of qualified types, not unqualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
467b27b9a24bdc823218ad1ad0e37673b6cc1e83 22-Oct-2009 John McCall <rjmccall@apple.com> Canonicality is a property of qualified types, not unqualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
lang/AST/Type.h
f6aaa5dd70d8915a5b2ee14965dadb1ee916f417 22-Oct-2009 Ted Kremenek <kremenek@apple.com> Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84873 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
fbcb2b716bee88c754684bd189913ed9f8c09086 22-Oct-2009 Ted Kremenek <kremenek@apple.com> Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84873 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1af8faf20679db29c525f3c3f06e9dd7b6830874 22-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> When building and instantiating a template-id reference expression, such as

N::f<int>

keep track of the full nested-name-specifier. This is mainly QoI and
relatively hard to test; will try to come up with a printing-based
test once we also retain the explicit template arguments past overload
resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f17bb74e74aca9bb0525d2249041ab65c7d1fd48 22-Oct-2009 Douglas Gregor <dgregor@apple.com> When building and instantiating a template-id reference expression, such as

N::f<int>

keep track of the full nested-name-specifier. This is mainly QoI and
relatively hard to test; will try to come up with a printing-based
test once we also retain the explicit template arguments past overload
resolution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1722951a44aeac688e05d9f9310097ef6fa233d5 22-Oct-2009 Mike Stump <mrs@apple.com> Extend out the block descriptor structure for debug information with
the copy/dispose helpers as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
083c25eea14bb4cc4ecc3ec763c60e2e609e22bd 22-Oct-2009 Mike Stump <mrs@apple.com> Extend out the block descriptor structure for debug information with
the copy/dispose helpers as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
9da283f5b99e76c133e8019ad3eb8ccabb0d2452 22-Oct-2009 Ted Kremenek <kremenek@apple.com> Enhance 'clang_createTranslationUnitFromSourceFile()' in two ways:

(1) Allow the source file to be specified in the actual command line arguments by allowing the
caller to set 'source_filename' to NULL.

(2) Automatically strip off the arguments '-emit-ast', '-fsyntax-only', and '-c'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84802 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
139ba86a362593da2e350f881e5c7003917aa5a7 22-Oct-2009 Ted Kremenek <kremenek@apple.com> Enhance 'clang_createTranslationUnitFromSourceFile()' in two ways:

(1) Allow the source file to be specified in the actual command line arguments by allowing the
caller to set 'source_filename' to NULL.

(2) Automatically strip off the arguments '-emit-ast', '-fsyntax-only', and '-c'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84802 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
3726e21e172d2456babf9a8fcb932650942e5bb3 21-Oct-2009 Mike Stump <mrs@apple.com> Complete out debug info generation for captured __block variables. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
af7b44d847d3e44c43346d508b2e55a6254b6e9d 21-Oct-2009 Mike Stump <mrs@apple.com> Complete out debug info generation for captured __block variables. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8b50b3d0f7bd37e80534ecdaf56bbd7ab5d6df70 21-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Downgrade "function declared 'noreturn' should not return" from an
error (by default) to a warning, per C++0x [dcl.attr.noreturn]. Patch
from Sean Hunt!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9dc9c376a9f3e0c72f33e27075caa0647dadb350 21-Oct-2009 Douglas Gregor <dgregor@apple.com> Downgrade "function declared 'noreturn' should not return" from an
error (by default) to a warning, per C++0x [dcl.attr.noreturn]. Patch
from Sean Hunt!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1c497273203fca91d72920642d61e874a86101af 21-Oct-2009 Steve Naroff <snaroff@apple.com> Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up searching). Without a 'relativeDecl', the algorithm is n-squared. For example, running the following command on 'Large.m' takes hours without a 'relatvieDecl'.

snaroff% time ../../Debug/bin/c-index-test Large.ast all > Large.out
snaroff% cat Large.m
#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#import <OpenGL/OpenGL.h>

With a 'relativeDecl', it takes <30 seconds:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84760 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Index/Utils.h
6a6de8b4fc944ca1bfa4e47c516d049a0d627b0e 21-Oct-2009 Steve Naroff <snaroff@apple.com> Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up searching). Without a 'relativeDecl', the algorithm is n-squared. For example, running the following command on 'Large.m' takes hours without a 'relatvieDecl'.

snaroff% time ../../Debug/bin/c-index-test Large.ast all > Large.out
snaroff% cat Large.m
#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#import <OpenGL/OpenGL.h>

With a 'relativeDecl', it takes <30 seconds:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84760 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Index/Utils.h
40a75fef39da6855688629ed68045d3690b29c75 21-Oct-2009 Chris Lattner <sabre@nondot.org> add helpful methods to TargetInfo for querying builtin integer type properties,
patch by Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
b304f77cb621a47221f2aa2d35acdb5c730421ff 21-Oct-2009 Chris Lattner <sabre@nondot.org> add helpful methods to TargetInfo for querying builtin integer type properties,
patch by Ken Dyck!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
57d23a991e94b32b2ce78b7c8c301c48687f7281 21-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics and template instantiation behavior when calling
an overloaded function call operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
4a27d7061ee2fe0e2b71aa470c323e76afb95917 21-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics and template instantiation behavior when calling
an overloaded function call operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
72f4aae0cff32005612e3d53ad20f9a2db7971de 21-Oct-2009 Chris Lattner <sabre@nondot.org> hookize wint_t's definition, patch by Edward O'Callaghan (from PR5233).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e64ef80363c84f4f431e26b61db554c89beeddb6 21-Oct-2009 Chris Lattner <sabre@nondot.org> hookize wint_t's definition, patch by Edward O'Callaghan (from PR5233).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f9c1e2a127f577045d22ccdcb4a6a3d8bf4fc800 21-Oct-2009 Mike Stump <mrs@apple.com> Prep work to always preallocate BlockDeclRefExprs so that we can
generate the debug information for the first parameter to the block
invoke functions. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ea26cb522e88fc86b0d1cae61dcefcfe4cc20231 21-Oct-2009 Mike Stump <mrs@apple.com> Prep work to always preallocate BlockDeclRefExprs so that we can
generate the debug information for the first parameter to the block
invoke functions. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7ab70b0f6cd7046804ab3fa21ad6631e6f021065 21-Oct-2009 John McCall <rjmccall@apple.com> Add TypeLocBuilder, an API for incrementally creating TypeLocs. Change
the API for creating DeclaratorInfos to allow callers to provide an exact
size.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TypeLocBuilder.h
109de5ead1dfcb3bc985cddb8cb3ed5bcecad88d 21-Oct-2009 John McCall <rjmccall@apple.com> Add TypeLocBuilder, an API for incrementally creating TypeLocs. Change
the API for creating DeclaratorInfos to allow callers to provide an exact
size.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TypeLocBuilder.h
72415c5c8facb2991705e689a092c0affbe75598 21-Oct-2009 John McCall <rjmccall@apple.com> Publicize getSigilLoc / setSigilLoc for better metaprogramming.

Fix the ReferenceTypeLoc hierarchy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
bb833dcc562f686a0652865d1945cfa3a421379c 21-Oct-2009 John McCall <rjmccall@apple.com> Publicize getSigilLoc / setSigilLoc for better metaprogramming.

Fix the ReferenceTypeLoc hierarchy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
e2a2319d9367c21590d5b47fb3cf5f7328e8b436 20-Oct-2009 Ted Kremenek <kremenek@apple.com> Add destructor and cleanup code to LocationContext (fixing some leaks). Along the way, have
AnalysisManager periodically cleanup its AnalysisContextManager and LocationContextManager objects,
as they don't need to forever retain all the CFGs ever created when analyzing a file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
58f5ec7d56b1ebf5f90ee11226ebe7663f2821ea 20-Oct-2009 Ted Kremenek <kremenek@apple.com> Add destructor and cleanup code to LocationContext (fixing some leaks). Along the way, have
AnalysisManager periodically cleanup its AnalysisContextManager and LocationContextManager objects,
as they don't need to forever retain all the CFGs ever created when analyzing a file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84684 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
90b6a295ecb165d2ce4027dc42880bf5227121a8 20-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Changed text of warning in my last patch.
Related to radar:
<rdar://problem/7308503> clang should disallow the trailing semicolon in method definitions



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
2b1f291bb43ccc2fbaad39c457ab488c74d365dd 20-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Changed text of warning in my last patch.
Related to radar:
<rdar://problem/7308503> clang should disallow the trailing semicolon in method definitions



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
f10e029650c0899da44cc4b715662dd7ce0a366c 20-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Issue warning if method body starts with a semicolon.
Fixes
<rdar://problem/7308503> clang should disallow the trailing semicolon in method definitions


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
209a8c2fa23636f6d065d618e7078e164903f5cd 20-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Issue warning if method body starts with a semicolon.
Fixes
<rdar://problem/7308503> clang should disallow the trailing semicolon in method definitions


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
e090581c733fd054cbd7f24ce45c393cafb1bcf9 20-Oct-2009 Steve Naroff <snaroff@apple.com> Add an example to help claify the process/assumptions...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84642 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b4ece6377d95e35a8df01cd010d910c34d690f67 20-Oct-2009 Steve Naroff <snaroff@apple.com> Add an example to help claify the process/assumptions...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84642 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
95470d7b9c9e50a585d989c18dc6c4cb86591e7c 20-Oct-2009 Steve Naroff <snaroff@apple.com> - Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This seems cleaner to me without sacrificing much flexibility.

- Remove clang_wantOnlyLocalDeclarations().

- Remove 'displayDiagnostics' arguments to clang_createTranslationUnitFromSourceFile() and clang_createTranslationUnit().

- Have clang_createTranslationUnitFromSourceFile() strip the '-o <outfile>' command line arguments if they exist. Document this semantic in the header. Also verify we have a valid ASTUnit before telling it to 'unlinkTemporaryFile()'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84634 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e56b4baeba5097852e04bc41ca2e0396cf729955 20-Oct-2009 Steve Naroff <snaroff@apple.com> - Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This seems cleaner to me without sacrificing much flexibility.

- Remove clang_wantOnlyLocalDeclarations().

- Remove 'displayDiagnostics' arguments to clang_createTranslationUnitFromSourceFile() and clang_createTranslationUnit().

- Have clang_createTranslationUnitFromSourceFile() strip the '-o <outfile>' command line arguments if they exist. Document this semantic in the header. Also verify we have a valid ASTUnit before telling it to 'unlinkTemporaryFile()'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84634 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
747e87ce7b0f81bddad5d354ae7718a321592547 20-Oct-2009 Ted Kremenek <kremenek@apple.com> BumpVectorContext: Use 'unsigned' integer type with PointerIntUnion instead of bool to keep it clear that we are reasoning about an unsigned integer with a single bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
375e69cb19e9ba65ab5f822ad5d44cffae15edb1 20-Oct-2009 Ted Kremenek <kremenek@apple.com> BumpVectorContext: Use 'unsigned' integer type with PointerIntUnion instead of bool to keep it clear that we are reasoning about an unsigned integer with a single bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
f170dc1c5113bb1749cb77f15609e961688e8c6d 20-Oct-2009 Chris Lattner <sabre@nondot.org> teach FormatDiagnostic to aggregate previously formatted arguments and
pass them down into the ArgToStringFn implementation. This allows
redundancy across operands to a diagnostic to be eliminated.

This isn't used yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b54d8af9a66cc20a6a9a9219c7eaea8df7ee7fd4 20-Oct-2009 Chris Lattner <sabre@nondot.org> teach FormatDiagnostic to aggregate previously formatted arguments and
pass them down into the ArgToStringFn implementation. This allows
redundancy across operands to a diagnostic to be eliminated.

This isn't used yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
7ec499ecbdabd1c77acc30026ca9e576be629b75 20-Oct-2009 Mike Stump <mrs@apple.com> Refine the type of the first parameter to block invoke functions.
WIP. I have yet to find the magic incantation to get the structure
type to be defined. If someone has a pointer, love to hear it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
adaaad3715c9c26cdcfdfe3401a13d7b4423ddcf 20-Oct-2009 Mike Stump <mrs@apple.com> Refine the type of the first parameter to block invoke functions.
WIP. I have yet to find the magic incantation to get the structure
type to be defined. If someone has a pointer, love to hear it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
54dc71a167815dcb1fe1416b3ae6313a7e73e086 20-Oct-2009 Ted Kremenek <kremenek@apple.com> Really fix <rdar://problem/7312058> by adding a 'displayDiagnostics' option to
clang_createTranslationUnit() and clang_createTranslationUnitFromSourceFile(). The user can now
specify if the diagnostics from Clang are printed to stderr or are silenced completely. We can
obviously evolve this API to be more general in the future.

Note: Added a FIXME since I wasn't certain what was the best way to redirect to something analogous
to '/dev/null' on Windows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84548 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
1374598619f83e6b2de91341a326eae564ece2cb 20-Oct-2009 Ted Kremenek <kremenek@apple.com> Really fix <rdar://problem/7312058> by adding a 'displayDiagnostics' option to
clang_createTranslationUnit() and clang_createTranslationUnitFromSourceFile(). The user can now
specify if the diagnostics from Clang are printed to stderr or are silenced completely. We can
obviously evolve this API to be more general in the future.

Note: Added a FIXME since I wasn't certain what was the best way to redirect to something analogous
to '/dev/null' on Windows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84548 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5de26c359e36b84c7c7a926d75f5e0fe837d1f78 20-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Parse a simple-template-id following a '~' when calling a destructor, e.g.,

t->~T<A0, A1>()

Fixes PR5213.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
dd62b15665a4144c45c1f7c53665414ad5f7f4f2 20-Oct-2009 Douglas Gregor <dgregor@apple.com> Parse a simple-template-id following a '~' when calling a destructor, e.g.,

t->~T<A0, A1>()

Fixes PR5213.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
dc7a434ec19113f620727291e77990b762f76cbb 19-Oct-2009 Ted Kremenek <kremenek@apple.com> The constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ASTUnit to specify
alternate DiagnosticClients. To match this API, ASTUnit::LoadFromPCHFile() now takes a corresponding
DiagnosticClient* argument as well. The DiagnosticClient object is destroyed when the ASTUnit object
is destroyed.

The CIndex library now uses this API to create a 'IgnoreDiagnosticsClient' that simply silences
diagnostics when using the clang_createTranslationUnitFromSourceFile() function. This fixes
<rdar://problem/7312058>. This API can change in the future as we add more flexibility for clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
fc0622155fa61349698a8fd0053773c37d9f7ac4 19-Oct-2009 Ted Kremenek <kremenek@apple.com> The constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ASTUnit to specify
alternate DiagnosticClients. To match this API, ASTUnit::LoadFromPCHFile() now takes a corresponding
DiagnosticClient* argument as well. The DiagnosticClient object is destroyed when the ASTUnit object
is destroyed.

The CIndex library now uses this API to create a 'IgnoreDiagnosticsClient' that simply silences
diagnostics when using the clang_createTranslationUnitFromSourceFile() function. This fixes
<rdar://problem/7312058>. This API can change in the future as we add more flexibility for clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
d95dfb8afce8a119d0afc95bd83cf08b52092a19 19-Oct-2009 Steve Naroff <snaroff@apple.com> Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.

Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Index/Indexer.h
36c4464ba6cfc2a63dc67c493ef2f5ab2aea09cc 19-Oct-2009 Steve Naroff <snaroff@apple.com> Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.

Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Index/Indexer.h
06b164b7d92a75478ef391104cf745ad473df3e0 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Update NamedDecl::getName() to work for empty names.
- I'm not sure this is ideal, but otherwise clients must be overly careful when handling decl's which can have empty names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84457 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
45475c696ecfd6d296535adb4723b7ba8817c06c 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Update NamedDecl::getName() to work for empty names.
- I'm not sure this is ideal, but otherwise clients must be overly careful when handling decl's which can have empty names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84457 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c05b6f3a9ae8cc57d174c6f2ce01d2bacc2d8477 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add ObjCImplementationDecl::getName() for consistency, with FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d0c10e20d5ba8c1a8a077db128c03eddc3158673 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add ObjCImplementationDecl::getName() for consistency, with FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
226262ae8d69f060747948b1a52aa2c5d244d857 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add FIXME calling for rename of NamedDecl::getNameAsString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b409e2ddfd97fc51db377e346a6dbb8a317035b3 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add FIXME calling for rename of NamedDecl::getNameAsString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9712926717b71836e1e287e319ff5653df25a0c3 19-Oct-2009 Anders Carlsson <andersca@mac.com> Fix tyop noticed by Sean Hunt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f67cea84bac1d3417f0baaf1fcbc86ee126e2d87 19-Oct-2009 Anders Carlsson <andersca@mac.com> Fix tyop noticed by Sean Hunt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1ed2bb804102b54d62426d8aa4f60bcd6f2a6cb0 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/IdentifierTable.h
01eb9b9683535d8a65c704ad2c545903409e2d36 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/IdentifierTable.h
ae8bee82369414db0865b321f328190bf8fbe4eb 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add ObjCCategoryImplDecl::getName() -> StringRef, and a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b5217efa5be2fd6be48d207267c8bcda6bf9206c 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add ObjCCategoryImplDecl::getName() -> StringRef, and a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5a0c5fb984577232cdaaf527c3e275620b3100a7 18-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> non-POD members => make it a class (also silences MSVC warnings)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
4e0e2f1c5fde88a235d71a6f4f87f5c3fcaab7ac 18-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> non-POD members => make it a class (also silences MSVC warnings)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
ac892b549fb25b82a60a28309837b823b45083f5 18-Oct-2009 Anders Carlsson <andersca@mac.com> Add some more cast kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
82debc7d282e723e58d183bfa89ddc2500a8daaf 18-Oct-2009 Anders Carlsson <andersca@mac.com> Add some more cast kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5cc4b067c9a94ff7a98c34b4a8b14f2643980c79 18-Oct-2009 John McCall <rjmccall@apple.com> When performing template-substitution into a type, don't just replace the
TemplateTypeParmType with the substituted type directly; instead, replace it
with a SubstTemplateTypeParmType which will note that the type was originally
written as a template type parameter. This makes it reasonable to preserve
source information even through template substitution.

Also define the new SubstTemplateTypeParmType class, obviously.

For consistency with current behavior, we stringize these types as if they
were the underlying type. I'm not sure this is the right thing to do.
At any rate, I paled at adding yet another clause to the don't-desugar 'if'
statement, so I extracted a function to do it. The new function also does
The Right Thing more often, I think: e.g. if we have a chain of typedefs
leading to a vector type, we will now desugar all but the last one.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
49a832bd499d6f61c23655f1fac99f0dd229756e 18-Oct-2009 John McCall <rjmccall@apple.com> When performing template-substitution into a type, don't just replace the
TemplateTypeParmType with the substituted type directly; instead, replace it
with a SubstTemplateTypeParmType which will note that the type was originally
written as a template type parameter. This makes it reasonable to preserve
source information even through template substitution.

Also define the new SubstTemplateTypeParmType class, obviously.

For consistency with current behavior, we stringize these types as if they
were the underlying type. I'm not sure this is the right thing to do.
At any rate, I paled at adding yet another clause to the don't-desugar 'if'
statement, so I extracted a function to do it. The new function also does
The Right Thing more often, I think: e.g. if we have a chain of typedefs
leading to a vector type, we will now desugar all but the last one.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
80d53d0b51aa2e48c3954c02ab50f7cb7cf311ed 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add NameDecl::getName() -> StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ecfa8d2d865a997e2240dd7ea8f939844e347200 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add NameDecl::getName() -> StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
14c3221c184cd7305ee9c7d4514caa5c13265b78 18-Oct-2009 John McCall <rjmccall@apple.com> Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize
TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor.
Provide skeleton implementations for all the new TypeLocs.

Handle all cases in PCH. Handle a few more cases when inserting
location information in SemaType.

It should be extremely straightforward to add new location information
to existing TypeLoc objects now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
lang/AST/TypeLocVisitor.h
lang/Index/ASTLocation.h
51bd803fbdade51d674598ed45da3d54190a656c 18-Oct-2009 John McCall <rjmccall@apple.com> Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize
TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor.
Provide skeleton implementations for all the new TypeLocs.

Handle all cases in PCH. Handle a few more cases when inserting
location information in SemaType.

It should be extremely straightforward to add new location information
to existing TypeLoc objects now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
lang/AST/TypeLocVisitor.h
lang/Index/ASTLocation.h
9e0e7878a94606ed663d248be2facaea4e973a7a 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
bfec576b1b8882b94670727cac2584b60962a607 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
0fd358c5649315620fca562d5b7638ff9482c118 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> StringRefize some parts of Diagnostic API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
eaea925e70e3ee85809e572aa8474b8dfc491af7 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> StringRefize some parts of Diagnostic API.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
082ad908426f9803a1f6318b1728a258ebeb116d 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Remove unused BernsteinHash functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
8b944468737f9bf91cd99454b54f0134fb7e52ee 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Remove unused BernsteinHash functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
d74e88ea1b5f86f16b3cb281893da8e774bebdf6 18-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a crash with qualified member access into a non-type, from Sean Hunt!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d1c9ae5d27c5190a7793f7ac1224a70cd3df33f 18-Oct-2009 Douglas Gregor <dgregor@apple.com> Fix a crash with qualified member access into a non-type, from Sean Hunt!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
22d7388756439d42657fe3873a939dff0b331f5b 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add IdentifierTable::CreateIdentifierInfo(StringRef).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
83885f7e3bf68d271e1e96726931814b836353a3 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add IdentifierTable::CreateIdentifierInfo(StringRef).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
511628ef6364ddd4212c50f01b37ad013a75d2c7 17-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for PR5190, Credit to Zhanyong Wan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
12356b119032edd64e9c32f9f01920d12c2acc57 17-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for PR5190, Credit to Zhanyong Wan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e940efe4c977acfdd693208e654eeb4af89dd88a 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Remove a FIXME that doesn't belong, there are numerous other places that use
alignment in bits in clang. If we really want to fix this, it should be a bugzilla.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
67f594c0a0f285df815fe8eb64c59d4c23f99949 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Remove a FIXME that doesn't belong, there are numerous other places that use
alignment in bits in clang. If we really want to fix this, it should be a bugzilla.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
af8b56844f43fcef07307d5494436e29ad329831 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add IdentiferInfo::getNameStr() -> StringRef.

Also, add getNameStart as a synonym for getName(). getName() is now deprecated,
when all clients are updated then getNameStr() should be renamed to
getName(). PR5218.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Basic/IdentifierTable.h
7fe60650c1133ee74a3395cf1063690e274bb7ac 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add IdentiferInfo::getNameStr() -> StringRef.

Also, add getNameStart as a synonym for getName(). getName() is now deprecated,
when all clients are updated then getNameStr() should be renamed to
getName(). PR5218.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Basic/IdentifierTable.h
b65681662aa7c3431805505a0964a391d06e0fa8 17-Oct-2009 Ted Kremenek <kremenek@apple.com> Add 'UseBumpPtrAllocator' flag to ASTUnit::LoadFromPCHFile() to cause the created ASTContext to use
its own BumpPtrAllocator to allocate ASTs.

Change clang_createTranslationUnit (CIndex) to pass 'UseBumpPtrAllocator = true' to
ASTUnit::LoadFromPCHFile().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
5cf48766d626ff6b223acc9d4b7e415ca8480836 17-Oct-2009 Ted Kremenek <kremenek@apple.com> Add 'UseBumpPtrAllocator' flag to ASTUnit::LoadFromPCHFile() to cause the created ASTContext to use
its own BumpPtrAllocator to allocate ASTs.

Change clang_createTranslationUnit (CIndex) to pass 'UseBumpPtrAllocator = true' to
ASTUnit::LoadFromPCHFile().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
5cd1f9a47e3900fc6e005d78a1b6fc791fe8df72 17-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Merge the "types" and "declarations" blocks in the precompiled header
format, so that we don't end up with multiple declaration and types
blocks. Also, fix a few obscure bugs with PCH loading and generation:

- If the DeclIDs DenseMap reallocates while we are writing a
declaration (due to recursively writing other declarations), we
could end up writing a bad ID to ExternalDefinitions.
- When loading an ArrayLoc (part of DeclaratorInfo), we need to set
the size expression to NULL if no size expression was provided.

PCH -> AST rewriting is still partly broken, unfortunately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
61d60ee6aa0a5ded0ddcf48679673b37506a1895 17-Oct-2009 Douglas Gregor <dgregor@apple.com> Merge the "types" and "declarations" blocks in the precompiled header
format, so that we don't end up with multiple declaration and types
blocks. Also, fix a few obscure bugs with PCH loading and generation:

- If the DeclIDs DenseMap reallocates while we are writing a
declaration (due to recursively writing other declarations), we
could end up writing a bad ID to ExternalDefinitions.
- When loading an ArrayLoc (part of DeclaratorInfo), we need to set
the size expression to NULL if no size expression was provided.

PCH -> AST rewriting is still partly broken, unfortunately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
a93c909080d28e87c22dd6e8766bb8b7750db80b 17-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to clean up and improve visual display of
builtin function ambiguity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
866b2744ffe66294c8791cc8407b918f3bb81b2c 17-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to clean up and improve visual display of
builtin function ambiguity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
04b3dcd8226f569d6ff85bebdd47406fb4945cca 17-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> While writing source-location entries to a PCH file, go through an
interface that can load those source-location entries on demand (from
another PCH file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
bdfe48ac80573e026595af91e541474dbf02565f 17-Oct-2009 Douglas Gregor <dgregor@apple.com> While writing source-location entries to a PCH file, go through an
interface that can load those source-location entries on demand (from
another PCH file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
7776acedfc946a7dd0c91c7d6f40b2eac909f560 17-Oct-2009 John McCall <rjmccall@apple.com> Allow TypeLocs to be fully initialized with a single SourceLocation. This
will be the keystone of converting existing rewrites to be rewrites on TypeLocs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
4ce74bd425dccd9d9ad6ccfc9ffbc01698a6e71a 17-Oct-2009 John McCall <rjmccall@apple.com> Allow TypeLocs to be fully initialized with a single SourceLocation. This
will be the keystone of converting existing rewrites to be rewrites on TypeLocs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
01b64b35df896f5607325b20c4d4e0e4c914bcab 16-Oct-2009 John McCall <rjmccall@apple.com> Factor out routines to encode/decode DeclaratorInfos and move them into the
core PCH reader/writer implementation files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
a1ee0c548b8aa4aaf93d1917e304e3da13171a08 16-Oct-2009 John McCall <rjmccall@apple.com> Factor out routines to encode/decode DeclaratorInfos and move them into the
core PCH reader/writer implementation files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
e99ec20791613393d88c5292be32d90637456272 16-Oct-2009 John McCall <rjmccall@apple.com> Add an accessor to extra the type directly from a DeclaratorInfo
without an opaque call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d9067b318604fddf960057fcb59145381c449d9e 16-Oct-2009 John McCall <rjmccall@apple.com> Add an accessor to extra the type directly from a DeclaratorInfo
without an opaque call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
99062d43bde01f2e68f9bb3d5744435f7a25cf2a 16-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Make CIndex and c-index-test a little bit more robust. The only
substantive change is that clang_getCursorSource() now returns the
file in which a macro was instantiated when the cursor points into a
macro instantiation, rather than crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
02465750c8c3fa96b1e7e596b02297e24361dc4f 16-Oct-2009 Douglas Gregor <dgregor@apple.com> Make CIndex and c-index-test a little bit more robust. The only
substantive change is that clang_getCursorSource() now returns the
file in which a macro was instantiated when the cursor points into a
macro instantiation, rather than crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
e05db11d09b8461c6eb1a2e4e2ef7f2d2be1c369 16-Oct-2009 Ted Kremenek <kremenek@apple.com> Provide 'static' version of BinaryOperator::isShiftOp().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
40a5ef90ac8d3f29bc8fe4ff80e00eaf3ef5b79f 16-Oct-2009 Ted Kremenek <kremenek@apple.com> Provide 'static' version of BinaryOperator::isShiftOp().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e6f70046cc9acf8b51952211f6d2aa98998e73df 16-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of whether declararions were loaded from a precompiled
header or not via a new "PCHLevel" field in Decl. We currently use
this information to help CIndex filter out declarations that came from
a precompiled header (rather than from an AST file). Further down the
road, it can be used to help implement multi-level precompiled
headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84267 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclBase.h
lang/Frontend/ASTUnit.h
7d1d49d2971b20a97b3c2a301470b9eaaa130137 16-Oct-2009 Douglas Gregor <dgregor@apple.com> Keep track of whether declararions were loaded from a precompiled
header or not via a new "PCHLevel" field in Decl. We currently use
this information to help CIndex filter out declarations that came from
a precompiled header (rather than from an AST file). Further down the
road, it can be used to help implement multi-level precompiled
headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84267 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/AST/DeclBase.h
lang/Frontend/ASTUnit.h
f0281ef6cb826acaf5090ea65d69164fe28e9352 16-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Add support for a chain of stat caches in the FileManager, rather than
only supporting a single stat cache. The immediate benefit of this
change is that we can now generate a PCH/AST file when including
another PCH file; in the future, the chain of stat caches will likely
be useful with multiple levels of PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/PCHReader.h
52e7108f51a4a9f4d6e84f33fb594d06e1d79560 16-Oct-2009 Douglas Gregor <dgregor@apple.com> Add support for a chain of stat caches in the FileManager, rather than
only supporting a single stat cache. The immediate benefit of this
change is that we can now generate a PCH/AST file when including
another PCH file; in the future, the chain of stat caches will likely
be useful with multiple levels of PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/PCHReader.h
551bc1f4cd792579735f79e935d07e1a26e34d81 16-Oct-2009 Anders Carlsson <andersca@mac.com> Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
16a8904f3f5ed19158657e1da95e5902fbee66f7 16-Oct-2009 Anders Carlsson <andersca@mac.com> Add CK_VectorSplat and use it for casting non-pointer scalars to ExtVectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5e564fd5a07022a4603e0b4d0856ad06196a1730 16-Oct-2009 Anders Carlsson <andersca@mac.com> Add a ToVoid cast kind and start using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ebeaf2031c968143c531bfe232d7507f20c57347 16-Oct-2009 Anders Carlsson <andersca@mac.com> Add a ToVoid cast kind and start using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
79f4bc78271e554430dfe13938de5928aefb4b4e 16-Oct-2009 Ted Kremenek <kremenek@apple.com> retain/release checker: Stop tracking reference counts for any symbols touched by StoreManager::InvalidateRegion().

This fixes <rdar://problem/7257223> and <rdar://problem/7283470>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
473e16745a6f3370ba3ab6fe70bff43b1c8b2ab9 16-Oct-2009 Ted Kremenek <kremenek@apple.com> retain/release checker: Stop tracking reference counts for any symbols touched by StoreManager::InvalidateRegion().

This fixes <rdar://problem/7257223> and <rdar://problem/7283470>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
32b25ab7d4b3355b804e367c90f5cd55f4c9187e 16-Oct-2009 John McCall <rjmccall@apple.com> Remove the ConstantArrayType subtypes. This information is preserved in the
TypeLoc records for declarations; it should not be necessary to represent it
directly in the type system.

Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
46a617a792bfab0d9b1e057371ea3b9540802226 16-Oct-2009 John McCall <rjmccall@apple.com> Remove the ConstantArrayType subtypes. This information is preserved in the
TypeLoc records for declarations; it should not be necessary to represent it
directly in the type system.

Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
953d06ccb58f1e73e09ee892631ee86cf1de3157 16-Oct-2009 John McCall <rjmccall@apple.com> ConcreteTypeLoc subclasses which call getInnerTypeLoc() should get a
compile-time error now; moreover, remove the need for an explicit hasInnerType()
call. Thanks to Doug Gregor for the metaprogramming approach.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
a6f56429aa9a02e71426e99db8b0ae94d0115215 16-Oct-2009 John McCall <rjmccall@apple.com> ConcreteTypeLoc subclasses which call getInnerTypeLoc() should get a
compile-time error now; moreover, remove the need for an explicit hasInnerType()
call. Thanks to Doug Gregor for the metaprogramming approach.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
ca55f6feb4c1785fa35fd9e69494df0912ccc3c5 16-Oct-2009 Steve Naroff <snaroff@apple.com> Make sure temporary files get unlinked.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHReader.h
e19944c93961b7618f4f3f3185f698f46369ea54 16-Oct-2009 Steve Naroff <snaroff@apple.com> Make sure temporary files get unlinked.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
lang/Frontend/PCHReader.h
5b54a16eb5b34b51d2ff245d54551007c33f6166 15-Oct-2009 Steve Naroff <snaroff@apple.com> Implement <rdar://problem/7303432> [Clang/Index] In-memory-style AST generation API (initial API implementation).

Added clang_createTranslationUnitFromSourceFile().
Changed clang_createIndex() to lookup the location of clang (using dladdr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84198 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
5b7d8e254f6c2855b37b5521c0aee0a560dab237 15-Oct-2009 Steve Naroff <snaroff@apple.com> Implement <rdar://problem/7303432> [Clang/Index] In-memory-style AST generation API (initial API implementation).

Added clang_createTranslationUnitFromSourceFile().
Changed clang_createIndex() to lookup the location of clang (using dladdr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84198 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f445d2d26b272f4180b5c08a5c335077f594492c 15-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Simplify checking of explicit template specialization/explicit
instantiation redeclaration semantics for function template
specializations and member functions of class template
specializations. Also, record the point of instantiation for
explicit-instantiated functions and static data members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0a897e32a09d290aa5b375444fe33928e47168bb 15-Oct-2009 Douglas Gregor <dgregor@apple.com> Simplify checking of explicit template specialization/explicit
instantiation redeclaration semantics for function template
specializations and member functions of class template
specializations. Also, record the point of instantiation for
explicit-instantiated functions and static data members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
193c2422457a7cd1cbe94450d1119a8d724601eb 15-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Check the interactions between explicit instantiations and template
specializations. Work in progress; there's more cleanup required to
actually use the new CheckSpecializationInstantiationRedecl checker
uniformly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
454885ec4f59959a01a2c7861b88abdea8617147 15-Oct-2009 Douglas Gregor <dgregor@apple.com> Check the interactions between explicit instantiations and template
specializations. Work in progress; there's more cleanup required to
actually use the new CheckSpecializationInstantiationRedecl checker
uniformly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e44e62ba4163f0da137ff736cb5bd040ac0a54a5 15-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose explicit instantiations of function templates and member
functions/static data members of class template specializations that
do not have definitions. This is the latter part of [temp.explicit]p4;
the former part still needs more testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e2d3a3de71b2fa35614cb732a6da95a41fa38ad9 15-Oct-2009 Douglas Gregor <dgregor@apple.com> Diagnose explicit instantiations of function templates and member
functions/static data members of class template specializations that
do not have definitions. This is the latter part of [temp.explicit]p4;
the former part still needs more testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
79c0657c022ff95b8fecfc48c5eeff35796ce40f 15-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> More explicit template instantiation. Now we're checking for more
cases where an explicit instantiation requires a definition; the
remainder of these checks will come with the implementation of
paragraph 4 of [temp.explicit].


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bf7643e7966cd9acd797a84870018034112e49d3 15-Oct-2009 Douglas Gregor <dgregor@apple.com> More explicit template instantiation. Now we're checking for more
cases where an explicit instantiation requires a definition; the
remainder of these checks will come with the implementation of
paragraph 4 of [temp.explicit].


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3d3d16cfa0a911055c5d7cb2ff4400c48752dd94 15-Oct-2009 John McCall <rjmccall@apple.com> Complete some unfinished comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
f2130a6e3cef10b435feadf6ad8bebaaf9a81a88 15-Oct-2009 John McCall <rjmccall@apple.com> Complete some unfinished comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
6816472475db68c155dc71a0a4402b5a0f2cfb0c 15-Oct-2009 John McCall <rjmccall@apple.com> Better living through metaprogramming. Create a base class which abstracts
most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class
to represent the idea that we *might* start representing source locations
of qualifiers. Dealing with qualifiers explicitly like this also lets us
efficiently ignore them in all the concrete cases.

This should make it obvious and easy to add new TypeLoc subclasses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
lang/AST/TypeLocVisitor.h
34a0447b8072e0da14c0980597da9d03a1495662 15-Oct-2009 John McCall <rjmccall@apple.com> Better living through metaprogramming. Create a base class which abstracts
most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class
to represent the idea that we *might* start representing source locations
of qualifiers. Dealing with qualifiers explicitly like this also lets us
efficiently ignore them in all the concrete cases.

This should make it obvious and easy to add new TypeLoc subclasses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
lang/AST/TypeLocVisitor.h
46709fd0c6e48a27f6abc31b04bf59fce446799f 15-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> CheckTemplateSpecializationScope isn't going to be used for explicit
instantiations, since the requirements are too different from those
for template specializations. Simplify it slightly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9302da67eabe2e9ad27433994b6727d670839476 15-Oct-2009 Douglas Gregor <dgregor@apple.com> CheckTemplateSpecializationScope isn't going to be used for explicit
instantiations, since the requirements are too different from those
for template specializations. Simplify it slightly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
49628d8472551b062b7c1d4368f9516c9f577986 15-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Additional semantic checking for explicit template instantiations,
focusing on the scope- and qualifier-related semantic requirements in
C++ [temp.explicit]p2.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
558c03222c77873a934b002073667a3c971fe8a9 15-Oct-2009 Douglas Gregor <dgregor@apple.com> Additional semantic checking for explicit template instantiations,
focusing on the scope- and qualifier-related semantic requirements in
C++ [temp.explicit]p2.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
89f408a6b2d78c18b79163415ba155c1029fab63 14-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Give explicit and implicit instantiations of static data members of
class templates the proper linkage.

Daniel, please look over the CodeGenModule bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1028c9f0afc1cc5f4951b39b7067fa57c1fea07b 14-Oct-2009 Douglas Gregor <dgregor@apple.com> Give explicit and implicit instantiations of static data members of
class templates the proper linkage.

Daniel, please look over the CodeGenModule bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3377acc532d272744e956203abb45b6862336bcd 14-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Testing and some minor fixes for explicit template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
663b5a0be7261c29bc4c526a71cffcfa02d4153e 14-Oct-2009 Douglas Gregor <dgregor@apple.com> Testing and some minor fixes for explicit template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
850c3e7b448a03033d430acea9273dd405fb2316 14-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Add support for having different c++ search dirs with -m32 and -m64. So far
this is only used in darwin10, 64 bit ubuntu 9.10 and 64 bit openSUSE 11.1.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
31b63beefa058aa42a12a1c2b72b43a4ba21f7f1 14-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Add support for having different c++ search dirs with -m32 and -m64. So far
this is only used in darwin10, 64 bit ubuntu 9.10 and 64 bit openSUSE 11.1.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
1cfff33985f932c3145835d3d8d8a27c4e3344a0 14-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Have the exception specification checkers take partial diagnostics. Use this to merge two diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
37c38ec5f1c155886929739338110a0b70ac3362 14-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Have the exception specification checkers take partial diagnostics. Use this to merge two diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3e15f36d74a85df70045d25232df9e0d746308af 14-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Use partial diagnostics properly in call to RequireCompleteType. Among other things, this means we get a note on the declaration of the incomplete type when it is used in an exception specification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
491b84c062ead1c69911a8d5f0d57826afacc099 14-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Use partial diagnostics properly in call to RequireCompleteType. Among other things, this means we get a note on the declaration of the incomplete type when it is used in an exception specification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
229e0a852b3a8b4d64eedf685c5f9f38bb910972 14-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Now StoreManager::CastRegion() takes a MemRegion, returns a MemRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
09270cc1b9cdd4c50012cb7984df8745e05833e5 14-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Now StoreManager::CastRegion() takes a MemRegion, returns a MemRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
bba981c237207bf87b57575837748a53c64f10d9 14-Oct-2009 Chris Lattner <sabre@nondot.org> fix some cfstring related issues:
1) -fwritable-string does affect the non-utf16 version of cfstrings
just not the utf16 ones.
2) utf16 strings should always be marked constant, as the __TEXT segment
is readonly.
3) The name of the global doesn't matter, remove it from TargetInfo.
4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now.

This fixes rdar://7115750



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
278b9f06933c385ffbccc15f8491787470cb4a1b 14-Oct-2009 Chris Lattner <sabre@nondot.org> fix some cfstring related issues:
1) -fwritable-string does affect the non-utf16 version of cfstrings
just not the utf16 ones.
2) utf16 strings should always be marked constant, as the __TEXT segment
is readonly.
3) The name of the global doesn't matter, remove it from TargetInfo.
4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now.

This fixes rdar://7115750



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
b55ff6d82d9fe4b87cfb936ab16814727749c357 14-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> * Remove unused GRState* parameter
* Make all Base value the last argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
d0f8bb1f6b51b93bf07b27b4a8f9d1823063cba8 14-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> * Remove unused GRState* parameter
* Make all Base value the last argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
d417f4491ec35c2bccb0d852ce4d6eab80a35af3 14-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Handle ambiguity of reference initialization.
Removes a FIXME.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d9290cb5ad9eae8d10487cea5392331cf6a47142 14-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Handle ambiguity of reference initialization.
Removes a FIXME.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
65365455dc48e8382aab5079aa2e23ed5ab65eb3 14-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics when the parser encounters a declarator with an
unknown type name, e.g.,

foo::bar x;

when "bar" does not refer to a type in "foo".

With this change, the parser now calls into the action to perform
diagnostics and can try to recover by substituting in an appropriate
type. For example, this allows us to easily diagnose some missing
"typename" specifiers, which we now do:

test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename'
prior to dependent type name 'A<T>::type'
A<T>::type A<T>::f() { return type(); }
^~~~~~~~~~
typename

Fixes PR3990.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
a786fdbf6c1d8ff08c3e61c7eb6bf2872895e2b4 14-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics when the parser encounters a declarator with an
unknown type name, e.g.,

foo::bar x;

when "bar" does not refer to a type in "foo".

With this change, the parser now calls into the action to perform
diagnostics and can try to recover by substituting in an appropriate
type. For example, this allows us to easily diagnose some missing
"typename" specifiers, which we now do:

test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename'
prior to dependent type name 'A<T>::type'
A<T>::type A<T>::f() { return type(); }
^~~~~~~~~~
typename

Fixes PR3990.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
f1aa12fb490a02785a57140f0af5163be5f24619 13-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Unify our diagnostic printing for errors of the form, "we didn't like
what we found when we looked into <blah>", where <blah> is a
DeclContext*. We can now format DeclContext*'s in nice ways, e.g.,
"namespace N", "the global namespace", "'class Foo'".

This is part of PR3990, but we're not quite there yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
3f09327b26033d0a9676d52d80cf92c48f581aff 13-Oct-2009 Douglas Gregor <dgregor@apple.com> Unify our diagnostic printing for errors of the form, "we didn't like
what we found when we looked into <blah>", where <blah> is a
DeclContext*. We can now format DeclContext*'s in nice ways, e.g.,
"namespace N", "the global namespace", "'class Foo'".

This is part of PR3990, but we're not quite there yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
f2013e7533228afe9ce1ca158b88f7a8447f85f8 13-Oct-2009 John McCall <rjmccall@apple.com> Turn -Wparentheses on by default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f66d5cd8926541099def3cb187d56eff60d3be99 13-Oct-2009 John McCall <rjmccall@apple.com> Turn -Wparentheses on by default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
33316b8add2209c6af2336373c92856dc5638942 13-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose attempts to add default function arguments to a
specialization. This completes C++ [temp.expl.spec]!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
096ebfda90b35a5cd6e399920fca7d9b5b0859f3 13-Oct-2009 Douglas Gregor <dgregor@apple.com> Diagnose attempts to add default function arguments to a
specialization. This completes C++ [temp.expl.spec]!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
db056de08969d15cbc275de3e955db2f375ff8ae 13-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> When explicitly specializing a member that is a template, mark the
template as a specialization. For example, this occurs with:

template<typename T>
struct X {
template<typename U> struct Inner { /* ... */ };
};

template<> template<typename T>
struct X<int>::Inner {
T member;
};

We need to treat templates that are member specializations as special
in two contexts:

- When looking for a definition of a member template, we look
through the instantiation chain until we hit the primary template
*or a member specialization*. This allows us to distinguish
between the primary "Inner" definition and the X<int>::Inner
definition, above.
- When computing all of the levels of template arguments needed to
instantiate a member template, don't add template arguments
from contexts outside of the instantiation of a member
specialization, since the user has already manually substituted
those arguments.

Fix up the existing test for p18, which was actually wrong (but we
didn't diagnose it because of our poor handling of member
specializations of templates), and add a new test for member
specializations of templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
fd056bc86a8b22a9421b5d921bbca276d0f9d0f7 13-Oct-2009 Douglas Gregor <dgregor@apple.com> When explicitly specializing a member that is a template, mark the
template as a specialization. For example, this occurs with:

template<typename T>
struct X {
template<typename U> struct Inner { /* ... */ };
};

template<> template<typename T>
struct X<int>::Inner {
T member;
};

We need to treat templates that are member specializations as special
in two contexts:

- When looking for a definition of a member template, we look
through the instantiation chain until we hit the primary template
*or a member specialization*. This allows us to distinguish
between the primary "Inner" definition and the X<int>::Inner
definition, above.
- When computing all of the levels of template arguments needed to
instantiate a member template, don't add template arguments
from contexts outside of the instantiation of a member
specialization, since the user has already manually substituted
those arguments.

Fix up the existing test for p18, which was actually wrong (but we
didn't diagnose it because of our poor handling of member
specializations of templates), and add a new test for member
specializations of templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
85fef1d87e35b508bf0ca18e89e42eedcef22af3 13-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Improve the internal representation and semantic analysis of friend
function templates.

This commit ensures that friend function templates are constructed as
FunctionTemplateDecls rather than partial FunctionDecls (as they
previously were). It then implements template instantiation for friend
function templates, injecting the friend function template only when
no previous declaration exists at the time of instantiation.

Oh, and make sure that explicit specialization declarations are not
friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a735b206fdb5c15767a45289e1ffb3b568f70f2b 13-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve the internal representation and semantic analysis of friend
function templates.

This commit ensures that friend function templates are constructed as
FunctionTemplateDecls rather than partial FunctionDecls (as they
previously were). It then implements template instantiation for friend
function templates, injecting the friend function template only when
no previous declaration exists at the time of instantiation.

Oh, and make sure that explicit specialization declarations are not
friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e74439f006a375143871936abcb2866f1f278184 13-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Return the original state by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
d6116cc4730245f09d458167aa94f2ea6e2b2b53 13-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Return the original state by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
128121838edc20d691df3eff6506d88dbf28d81c 13-Oct-2009 Chris Lattner <sabre@nondot.org> make the diagnostic in the 'unused result' warning more precise
about the reason, rdar://7186119.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
bc8d42c6f1565c0b2f93ad524edebfd7a4e6cac6 13-Oct-2009 Chris Lattner <sabre@nondot.org> make the diagnostic in the 'unused result' warning more precise
about the reason, rdar://7186119.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
a44a241c8b49eee747f7f31847d9a6b53ebdbfae 13-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add two utility methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/GRCoreEngine.h
798d2ca60d1cd6de70d28a5ce60337a2b03a663f 13-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add two utility methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/GRCoreEngine.h
bd247025a48f05aa94c3c4a182c8248c84bff116 13-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add an initial implementation of EnterStackFrame() to the StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/Store.h
4e3c1f7c2a2053cf770f744846a87087415eb340 13-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add an initial implementation of EnterStackFrame() to the StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/Store.h
17cfb461d4d8d0d40dcd740df1c0ad8c6f0d88cc 12-Oct-2009 John McCall <rjmccall@apple.com> Implement -Wparentheses: warn about using assignments in contexts that require
conditions. Add a fixit to insert the parentheses. Also fix a very minor
possible memory leak in 'for' conditions.

Fixes PR 4876 and rdar://problem/7289172



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5a881bb09928b7ade891efc680088aaad276f8d6 12-Oct-2009 John McCall <rjmccall@apple.com> Implement -Wparentheses: warn about using assignments in contexts that require
conditions. Add a fixit to insert the parentheses. Also fix a very minor
possible memory leak in 'for' conditions.

Fixes PR 4876 and rdar://problem/7289172



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c33bbc52e3e2f7e160b34dd923159238a5ae7154 12-Oct-2009 Ted Kremenek <kremenek@apple.com> Use a BumpPtrAllocator to allocate all aspects of CFG, including CFGBlocks, successor and predecessor vectors, etc.

Speedup: when doing 'clang-cc -analyze -dump-cfg' (without actual printing, just
CFG building) on the amalgamated SQLite source (all of SQLite in one source
file), runtime reduced by 9%.

This fixes: <rdar://problem/7250745>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
ee82d9bdc5025b82de8ce2a4ad4685e0a8b79da9 12-Oct-2009 Ted Kremenek <kremenek@apple.com> Use a BumpPtrAllocator to allocate all aspects of CFG, including CFGBlocks, successor and predecessor vectors, etc.

Speedup: when doing 'clang-cc -analyze -dump-cfg' (without actual printing, just
CFG building) on the amalgamated SQLite source (all of SQLite in one source
file), runtime reduced by 9%.

This fixes: <rdar://problem/7250745>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
fa64ec0971d80624416a6af735808aa7db59994e 12-Oct-2009 Mike Stump <mrs@apple.com> Fixup windows include paths. Patch by John Thompson.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
620d57a293143e3f07d6e4f5ba50020a80f45564 12-Oct-2009 Mike Stump <mrs@apple.com> Fixup windows include paths. Patch by John Thompson.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
c176c0af307cfcd6cd9d9069ac7fb29d8da1d4bf 12-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose the declaration of explicit specializations after an implicit
instantiation has already been required. To do so, keep track of the
point of instantiation for anything that can be instantiated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
b3ae4fcd4314a9c1c46d41b200883599c32025b4 12-Oct-2009 Douglas Gregor <dgregor@apple.com> Diagnose the declaration of explicit specializations after an implicit
instantiation has already been required. To do so, keep track of the
point of instantiation for anything that can be instantiated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
e8385e054e1b35df057af080fb5ed69d1b5ad923 12-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Handle built-in unary operators when reporting ambiguities.
wip - To prune excessive reporting.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2ebe7ebb1d6149a1845dd3169009f99b78e91bc9 12-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Handle built-in unary operators when reporting ambiguities.
wip - To prune excessive reporting.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7bd12db210d40fbc6530e51f7c6c8b6cdd619027 12-Oct-2009 Ted Kremenek <kremenek@apple.com> Allow BumpVectorContext to conditionally own the underlying BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
87342dc37237c6efb9e311bacb12547de3ccbc0f 12-Oct-2009 Ted Kremenek <kremenek@apple.com> Allow BumpVectorContext to conditionally own the underlying BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
52f24e6d2307a19eacc5fb393d59b9a131df96b2 12-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Use CanQualType (instead of QualType) to store collection of visible
canonical conversion types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
f4e462c2c2f4cb76c5a75d952adeb4355f32f6a7 12-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Use CanQualType (instead of QualType) to store collection of visible
canonical conversion types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e4cb91964a91bd5bbaae5a556b8df0ebc821279f 12-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> If built-in operators could not be selected because of ambiguity in
user-defined type conversions, issue list of ambiguites in addition
to the diagnostic. So, clang now issues the following:

b.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C1'
int i = c1->*pmf;
~~^
b.cpp:19:19: note: because of ambiguity in conversion of 'struct C1' to 'struct E *'
b.cpp:5:5: note: candidate function
operator E*();
^
b.cpp:11:5: note: candidate function
operator E*();
^


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
27687cf7f6fea50e592f653549a33f07bf5c0667 12-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> If built-in operators could not be selected because of ambiguity in
user-defined type conversions, issue list of ambiguites in addition
to the diagnostic. So, clang now issues the following:

b.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C1'
int i = c1->*pmf;
~~^
b.cpp:19:19: note: because of ambiguity in conversion of 'struct C1' to 'struct E *'
b.cpp:5:5: note: candidate function
operator E*();
^
b.cpp:11:5: note: candidate function
operator E*();
^


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0368a85c12e24c008960c9b73c8f79343bec38c0 11-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Test exception spec compatibility on return type and parameters.

Along the way, use RequireCompleteType when testing exception spec types.
Separate all the ugly spec stuff into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dced226e37f7c2c31c25d06c514f29b610fe2a54 11-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Test exception spec compatibility on return type and parameters.

Along the way, use RequireCompleteType when testing exception spec types.
Separate all the ugly spec stuff into its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
798d96a85399a9f99a6f43ef4b11cb554445909f 10-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement the core checking for compatible exception specifications in assignment and initialization.

The exception specification of the assignee must be the same or a subset of the target. In addition, exception specifications on arguments and return types must be equivalent, but this is not implemented yet.
This currently produces two diagnostics for every invalid assignment/initialization, due to the diagnostic produced outside PerformImplicitConversion, e.g. in CheckSingleInitializer. I don't know how to suppress this; in any case I think it is the wrong place for a diagnostic, since there are other diagnostics produced inside the function. So I'm leaving it as it is for the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2c7588f1260c6655cfb73126b695d2f79ae170bb 10-Oct-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement the core checking for compatible exception specifications in assignment and initialization.

The exception specification of the assignee must be the same or a subset of the target. In addition, exception specifications on arguments and return types must be equivalent, but this is not implemented yet.
This currently produces two diagnostics for every invalid assignment/initialization, due to the diagnostic produced outside PerformImplicitConversion, e.g. in CheckSingleInitializer. I don't know how to suppress this; in any case I think it is the wrong place for a diagnostic, since there are other diagnostics produced inside the function. So I'm leaving it as it is for the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9399940fd9562dd693525bcdcdb81cb89ae63cef 10-Oct-2009 John McCall <rjmccall@apple.com> Qualified lookup through using declarations. Diagnose a new type of ambiguity.
Split the various ambiguous result enumerators into their own enum. Tests
for most of C++ [namespace.qual].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6e24726524c2b51b31bb4b622aa678a46b024f42 10-Oct-2009 John McCall <rjmccall@apple.com> Qualified lookup through using declarations. Diagnose a new type of ambiguity.
Split the various ambiguous result enumerators into their own enum. Tests
for most of C++ [namespace.qual].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bb78b8e78e76cce6453774bb4c1f2dfe6c69fd6b 10-Oct-2009 Anders Carlsson <andersca@mac.com> Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For

struct B;

B f();

void g() {
f();
}

We now get

t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B'
f();
^~~
t.cpp:3:3: note: 'f' declared here
B f();
^
t.cpp:1:8: note: forward declaration of 'struct B'
struct B;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
8c8d91917c307dc3ba4f60661377c745f2a6bef2 10-Oct-2009 Anders Carlsson <andersca@mac.com> Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For

struct B;

B f();

void g() {
f();
}

We now get

t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B'
f();
^~~
t.cpp:3:3: note: 'f' declared here
B f();
^
t.cpp:1:8: note: forward declaration of 'struct B'
struct B;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
de9af1f057b3ea9005e629384f1af9859716227c 09-Oct-2009 Mike Stump <mrs@apple.com> Efficiency refinements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
ec05766fe525a8f81c7dc96ddbdc874814a14b2c 09-Oct-2009 Mike Stump <mrs@apple.com> Efficiency refinements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
2835511b72c361fa346767a65bd2df7b79f9b9f4 09-Oct-2009 Axel Naumann <Axel.Naumann@cern.ch> Passing const Triple& is sufficient for AddDefaultSystemIncludePaths()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
38ee4e07633f1548f6b703e74ac7ad2208059d39 09-Oct-2009 Axel Naumann <Axel.Naumann@cern.ch> Passing const Triple& is sufficient for AddDefaultSystemIncludePaths()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
3ef7e3242f4a4c489fc8a1aaa9f5f72dd837f5ea 09-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Produce good looking diagnostics on ambiguous built-in operators.
Now we produce things like:
bug1.cpp:21:11: error: use of overloaded operator '->*' is ambiguous
int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \
~^ ~~~
bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int const struct A::*')
bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int restrict struct A::*')
...

Still need to look at an issue (indicated as FIXME in the test case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ad3607da8ad626c408d8e6d804bf1359977b200a 09-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Produce good looking diagnostics on ambiguous built-in operators.
Now we produce things like:
bug1.cpp:21:11: error: use of overloaded operator '->*' is ambiguous
int i = c->*pmf; // expected-error {{use of overloaded operator '->*' is ambiguous}} \
~^ ~~~
bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int const struct A::*')
bug1.cpp:21:11: note: built-in candidate operator ->* ('struct A volatile *', 'int restrict struct A::*')
...

Still need to look at an issue (indicated as FIXME in the test case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
acf555b5a0774d696039aa473a1c81cf382f98a0 09-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
82887688bdd931c37488c9a8d089fd811485947f 09-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
6ac11c8e90789d2b101cbde272a75d623f4d035e 09-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Improve on reporting ambiguity involving built-in candidates.
I still don't like it but it is improvement over what we had.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
16a5eac559730f4a7ec5ffdab3f236f51df85b63 09-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Improve on reporting ambiguity involving built-in candidates.
I still don't like it but it is improvement over what we had.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
030f8967a3a687dce7196f9268731ef8eeb7080a 09-Oct-2009 Mike Stump <mrs@apple.com> Set up include paths for VC++ and Cygwin headers, along with the
existing MinGW headers, plus the newer 4.4.0 version. Patch by John
Thompson.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
43d8176d2e8e304b2d419fb0fe139cc07af80dea 09-Oct-2009 Mike Stump <mrs@apple.com> Set up include paths for VC++ and Cygwin headers, along with the
existing MinGW headers, plus the newer 4.4.0 version. Patch by John
Thompson.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
75d19e667f0c48cc21ed4dd23f5c4aa6d350f069 09-Oct-2009 Mike Stump <mrs@apple.com> This fixes support for complex literals, reworked to avoid a goto, and
to add a flag noting the presence of a Microsoft extension suffix (i8,
i16, i32, i64). Patch by John Thompson.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
b79fe2d28777652a4df4f49dc876cbec060ca90e 09-Oct-2009 Mike Stump <mrs@apple.com> This fixes support for complex literals, reworked to avoid a goto, and
to add a flag noting the presence of a Microsoft extension suffix (i8,
i16, i32, i64). Patch by John Thompson.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
0d05afc49b3ad3f82835eb758d6f98ae8223d257 09-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Fix up error reporting when object cannot be constructed
because of missing default constructor of a member.
Fixes pr5154.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0c728f1eb2e8e6e5adc2501c6fdcd87105b34d5c 09-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Fix up error reporting when object cannot be constructed
because of missing default constructor of a member.
Fixes pr5154.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6cd088ae0272f34c202bf7b67fd55de43b287582 08-Oct-2009 Steve Naroff <snaroff@apple.com> Add code completion support for ObjC property declarations/attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ece8e71d12b6f4cb2dc501297afef126dab8ad74 08-Oct-2009 Steve Naroff <snaroff@apple.com> Add code completion support for ObjC property declarations/attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1dac9df4db4cc39667df05bf306178f521a32f04 08-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for -Wunused-variable, from Oscar Bonilla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b5352cf949898cd42c8c5bc96a17a831b61ac2e5 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Implement support for -Wunused-variable, from Oscar Bonilla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2fc4b612a23127bf2a180642ff9313f6a163456c 08-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Fix an assertion in the XML output, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/StmtXML.def
b46f57d9daa0c30d79dc8149d30c3e3a12fe2b32 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Fix an assertion in the XML output, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/StmtXML.def
89f31cf5d2248186424147302dc1bfeadcd3528c 08-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Improve checking for specializations of member classes of class
templates, and keep track of how those member classes were
instantiated or specialized.

Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
f6b1185f0a8a209c06dfc1efdb6a59cc851e970c 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Improve checking for specializations of member classes of class
templates, and keep track of how those member classes were
instantiated or specialized.

Make sure that we don't try to instantiate an explicitly-specialized
member class of a class template, when that explicit specialization
was a declaration rather than a definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
f044bb1ea8e4a0d6840a7638ae8e8fd054c6917b 08-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> For instantiations of static data members of class templates, keep
track of the kind of specialization or instantiation. Also, check the
scope of the specialization and ensure that a specialization
declaration without an initializer is not a definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
251b4ff2578e26959a4c036140ccd61c5e9292f2 08-Oct-2009 Douglas Gregor <dgregor@apple.com> For instantiations of static data members of class templates, keep
track of the kind of specialization or instantiation. Also, check the
scope of the specialization and ensure that a specialization
declaration without an initializer is not a definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
b6a0249748ea465da1e75880239044d6e8fac4cb 08-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Compress storage for MemberSpecializationInfo into a single
pointer. Yay, PointerIntPair.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
44e368b6a85c42d681148ccd5e0052418ff9751e 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Compress storage for MemberSpecializationInfo into a single
pointer. Yay, PointerIntPair.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
193fb2be18e531ad344bf02099a72fd05b17d846 08-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of whether a member function instantiated from a member
function of a class template was implicitly instantiated, explicitly
instantiated (declaration or definition), or explicitly
specialized. The same MemberSpecializationInfo structure will be used
for static data members and member classes as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
2db323294ac02296125e1e0beb4c3595992e75bb 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Keep track of whether a member function instantiated from a member
function of a class template was implicitly instantiated, explicitly
instantiated (declaration or definition), or explicitly
specialized. The same MemberSpecializationInfo structure will be used
for static data members and member classes as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
af2cbe1ec5e4b07df78c70f5f57a111d735d356e 08-Oct-2009 John McCall <rjmccall@apple.com> Refactoring around friend class templates. Better error message for friend enums.
Don't create a new declaration for friend classes if a declaration already exists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e3af0235ce6548e221e04c2ae5aeb0fb413ba736 08-Oct-2009 John McCall <rjmccall@apple.com> Refactoring around friend class templates. Better error message for friend enums.
Don't create a new declaration for friend classes if a declaration already exists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9e639362fc5f5cf4016bf83355917c8614f95ed5 08-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Type checking for specializations of member functions of class
templates. Previously, these weren't handled as specializations at
all. The AST for representing these as specializations is still a work
in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1fef4e60e7e884803977a8376c172ea584f8a5d1 08-Oct-2009 Douglas Gregor <dgregor@apple.com> Type checking for specializations of member functions of class
templates. Previously, these weren't handled as specializations at
all. The AST for representing these as specializations is still a work
in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
68a8293229299e6d6593c18c828ec27736101ca4 07-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes problem in finding visible convertion functions of a class
where matching conversion types in base classes were still visible.
Plus refactoring and cleanup.
Added a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0351a1e2e17c1edf27f90c23fbf65d8fcad995c4 07-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes problem in finding visible convertion functions of a class
where matching conversion types in base classes were still visible.
Plus refactoring and cleanup.
Added a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
bea479409a94af5abf202739e5688fdb452f9aa9 07-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose explicit instantiations and specializations that occur in class scope

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0a4074768a6ecd81513f0db02bfb0e96ab3e56a0 07-Oct-2009 Douglas Gregor <dgregor@apple.com> Diagnose explicit instantiations and specializations that occur in class scope

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4b0eb87ebf2f12cf8ebacd208e9c5d8c0d5a5877 07-Oct-2009 Ted Kremenek <kremenek@apple.com> Add 'template' keyword to disambiguate the use of a member template within a templated class. Hopefully this will please the buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
f0e75d6baf0dc6ba0a7d66726d9e3ba455db8639 07-Oct-2009 Ted Kremenek <kremenek@apple.com> Add 'template' keyword to disambiguate the use of a member template within a templated class. Hopefully this will please the buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/BumpVector.h
116cb606331bf8eacd400d25c14c4feec83eddbd 07-Oct-2009 Ted Kremenek <kremenek@apple.com> Change ExplodedNode to have its NodeGroups all BumpPtrAllocated, avoiding malloc() traffic when adding successors/predecessors to a node. This was done by introducing BumpVector, which is essentially SmallVector with all memory being BumpPtrAllocated (this can certainly be cleaned up or moved into llvm/ADT).

This change yields a 1.8% speed increase when running the analyzer (with -analyzer-store=region) on a small benchmark file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/Support/BumpVector.h
5fe4d9deb543a19f557e3d85c5f33867af97cd96 07-Oct-2009 Ted Kremenek <kremenek@apple.com> Change ExplodedNode to have its NodeGroups all BumpPtrAllocated, avoiding malloc() traffic when adding successors/predecessors to a node. This was done by introducing BumpVector, which is essentially SmallVector with all memory being BumpPtrAllocated (this can certainly be cleaned up or moved into llvm/ADT).

This change yields a 1.8% speed increase when running the analyzer (with -analyzer-store=region) on a small benchmark file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/Support/BumpVector.h
f70acbff9a538f988571af4980262424c0dac6a0 07-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor checking of the scope of explicit template specialization
declarations and explicit template instantiations, improving
diagnostics and making the code usable for function template
specializations (as well as class template specializations and partial
specializations).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d5cb8765ad3841ead8eaacb0360ac385f2f0e080 07-Oct-2009 Douglas Gregor <dgregor@apple.com> Refactor checking of the scope of explicit template specialization
declarations and explicit template instantiations, improving
diagnostics and making the code usable for function template
specializations (as well as class template specializations and partial
specializations).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
26b8955aaa75ca5ae58e1671731f0752ed28c1e0 07-Oct-2009 Mike Stump <mrs@apple.com> Fix eof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
da5529121eb3102432170ee0a1797b9e58044a2f 07-Oct-2009 Mike Stump <mrs@apple.com> Fix eof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
812e771af3dd667402707ad3680cca137ef05081 07-Oct-2009 Mike Stump <mrs@apple.com> Add codegen for __builtin_abort. Convert to FileCheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
31c5141451d537720615edf67f15a048077bdc5f 07-Oct-2009 Mike Stump <mrs@apple.com> Add codegen for __builtin_abort. Convert to FileCheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
44f1fa60787902f79b9679c5a0a5064fa1893f59 06-Oct-2009 Mike Stump <mrs@apple.com> Add more of __builtin_abort, WIP, still missing codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
07b1270f438292710466ca77a1ab83e74f1abebc 06-Oct-2009 Mike Stump <mrs@apple.com> Add more of __builtin_abort, WIP, still missing codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
c54f652cb72837e087f396dfbcf6dbeaa500c08d 06-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor the code that walks a C++ inheritance hierarchy, searching
for bases, members, overridden virtual methods, etc. The operations
isDerivedFrom and lookupInBases are now provided by CXXRecordDecl,
rather than by Sema, so that CodeGen and other clients can use them
directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/DeclCXX.h
lang/AST/DeclarationName.h
a8f32e0965ee19ecc53cd796e34268377a20357c 06-Oct-2009 Douglas Gregor <dgregor@apple.com> Refactor the code that walks a C++ inheritance hierarchy, searching
for bases, members, overridden virtual methods, etc. The operations
isDerivedFrom and lookupInBases are now provided by CXXRecordDecl,
rather than by Sema, so that CodeGen and other clients can use them
directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CXXInheritance.h
lang/AST/DeclCXX.h
lang/AST/DeclarationName.h
020092eede29117ae1af0854b9e6efaae9f426b2 06-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Add the -nostdclanginc option to clang (the driver).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
6961fdd661f75b8452f526143b9f60b54e175c9d 06-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Add the -nostdclanginc option to clang (the driver).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
28ca54a01ef2b89a8a20d22f1af1ea625f6357db 06-Oct-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/7275774> Static analyzer warns about NULL pointer when
adding assert

This fix required a few changes:

SimpleSValuator:
- Eagerly replace a symbolic value with its constant value in EvalBinOpNN
when it is constrained to a constant. This allows us to better constant fold
values along a path.
- Handle trivial case of '<', '>' comparison of pointers when the two pointers
are exactly the same.

RegionStoreManager:





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SValuator.h
cd8f6ac9b613e1fe962ebf9c87d822ce765275e6 06-Oct-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/7275774> Static analyzer warns about NULL pointer when
adding assert

This fix required a few changes:

SimpleSValuator:
- Eagerly replace a symbolic value with its constant value in EvalBinOpNN
when it is constrained to a constant. This allows us to better constant fold
values along a path.
- Handle trivial case of '<', '>' comparison of pointers when the two pointers
are exactly the same.

RegionStoreManager:





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SValuator.h
23ad4eb7d6a8a45f17531a75f7bc3bd8f5ca01e4 06-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Refactor the c++ include path a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
2e9f652d53346bf7e64c8a12a9ff06b004a3e489 06-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Refactor the c++ include path a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitHeaderSearch.h
6fe12e8550fc84db231cb60c093c1e59fcf56b4c 06-Oct-2009 Mike Stump <mrs@apple.com> This is slightly contentious, but, if llvm has gone to addressable
units, we should as well. The problem is the non-predictability of
the dimension of the values. I'd love for the dimension to be part of
the static type system... but in C++ it is kinda annoying to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
8cf7a1a6dd284a356d0cc69448e35f9b13a7b35a 06-Oct-2009 Mike Stump <mrs@apple.com> This is slightly contentious, but, if llvm has gone to addressable
units, we should as well. The problem is the non-predictability of
the dimension of the values. I'd love for the dimension to be part of
the static type system... but in C++ it is kinda annoying to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
eeca8bc32b7825c78c67bb5d09353edd0f715fb1 05-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Encode the Clang branch and Subversion revision into a PCH file, and
assume that PCH files from different Clang revisions are not
compatible. Addresses <rdar://problem/7266572>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHBitCodes.h
445e23e9b909ec8e21303c7dd82c90b72fc09ac4 05-Oct-2009 Douglas Gregor <dgregor@apple.com> Encode the Clang branch and Subversion revision into a PCH file, and
assume that PCH files from different Clang revisions are not
compatible. Addresses <rdar://problem/7266572>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHBitCodes.h
7eb9e2e342729219ed2dc0c39b80710db97f5547 05-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement Protocols on class extensions.
<rdar://problem/7269631> Protocols on class extensions don't work



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
339798eae1eb61c50ca68766ed028c0a16d0a284 05-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement Protocols on class extensions.
<rdar://problem/7269631> Protocols on class extensions don't work



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
45e728a16a4ed8662ae0b051940f4a984ce520a6 05-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Provide a common set of routines in Version.h that return Subversion
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
b8d1191fdeb4eec9bc5cf9bf4b027add0fb467b3 05-Oct-2009 Douglas Gregor <dgregor@apple.com> Provide a common set of routines in Version.h that return Subversion
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
0c6d1f94a45dcb3f83adf9fb44461ea9b55dfd85 02-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure to free the explicit template arguments provided for an
explicit instantiation. Also, tighten up reference-count checking to
help catch these issues earlier. Fixes PR5069.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b2f81cf7f8445e0c65c0428f4fbb0442566916b8 02-Oct-2009 Douglas Gregor <dgregor@apple.com> Make sure to free the explicit template arguments provided for an
explicit instantiation. Also, tighten up reference-count checking to
help catch these issues earlier. Fixes PR5069.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b36cf1c496192714a73be212156f9215d35276bd 02-Oct-2009 Steve Naroff <snaroff@apple.com> - Remove Sema::FindMethodInNestedImplementations().
- Add ObjCInterfaceDecl::lookupPrivateInstanceMethod().
- Convert clients.

No functionality change - One less method in Sema:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d789d3d985e28c9404e62157af46dcb7331920e0 02-Oct-2009 Steve Naroff <snaroff@apple.com> - Remove Sema::FindMethodInNestedImplementations().
- Add ObjCInterfaceDecl::lookupPrivateInstanceMethod().
- Convert clients.

No functionality change - One less method in Sema:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
df41c4d4174d9d12829544508c9786d9e2290915 01-Oct-2009 John McCall <rjmccall@apple.com> Anonymous namespaces, sema + codegen. A lot of semantics are still broken,
apparently because using directives aren't quite working correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
9aeed32282fe8a775c24c01c923717ca86695685 01-Oct-2009 John McCall <rjmccall@apple.com> Anonymous namespaces, sema + codegen. A lot of semantics are still broken,
apparently because using directives aren't quite working correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
91d6427d55572d892fdc2d9e67c898f63af5be6d 30-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue good diagnostics when initializing a refernce type with
a bad initializer. Fixes pr4274.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
893f955321cdf49dd0ceaf4ff821632e9b265000 30-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue good diagnostics when initializing a refernce type with
a bad initializer. Fixes pr4274.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c5bd24265e5a0b38a3c2149d2b11dbf064a2b243 30-Sep-2009 Tanya Lattner <tonic@nondot.org> Add an error for function parameters that have a qualified address space since this is not allowed by the embedded c extension spec.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
27a84d01614609c094029a49f7a86f0f7f8fe7f1 30-Sep-2009 Tanya Lattner <tonic@nondot.org> Add an error for function parameters that have a qualified address space since this is not allowed by the embedded c extension spec.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
be568a229d8947727a49a4719cd08d237a2db5fa 30-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> self-referecing operator '->' member function was causing
infinit recursion. This patch fixes it. [13.3.1.2]-p2



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4a4e345a8bf749b5462a127ecfb1f90d4a9d6ba7 30-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> self-referecing operator '->' member function was causing
infinit recursion. This patch fixes it. [13.3.1.2]-p2



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0afd9f4ac27a7cef40c7a879f4b3fac0c612a218 30-Sep-2009 John McCall <rjmccall@apple.com> Desugaring optimizations. Add single-step desugaring methods to all
concrete types. Use unqualified desugaring for getAs<> and sundry.
Fix a few users to either not desugar or use qualified desugar, as seemed
appropriate. Removed Type's qualified desugar method, as it was easy
to accidentally use instead of QualType's.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Analysis/PathSensitive/MemRegion.h
bf1cc05907ceb2081e8158b26f3d3f48b31caad3 30-Sep-2009 John McCall <rjmccall@apple.com> Desugaring optimizations. Add single-step desugaring methods to all
concrete types. Use unqualified desugaring for getAs<> and sundry.
Fix a few users to either not desugar or use qualified desugar, as seemed
appropriate. Removed Type's qualified desugar method, as it was easy
to accidentally use instead of QualType's.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Analysis/PathSensitive/MemRegion.h
7c10e9e6304a7ab7175c9bdadf5c75b39db1b856 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Pull TypeLocVisitor into its own header file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocVisitor.h
0c411806d540f7158bf12fee5c10f7de2647de76 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pull TypeLocVisitor into its own header file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocVisitor.h
f70c796848eaa08e8b2986d5be82e5a6b7eec3d7 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Fix Decl class hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
fbc85e565271c762debfb3dcfce3a18df3e2b396 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix Decl class hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
96eac694184d88ab34e621e7d44f3dc526927398 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce ObjCInterfaceLoc which provides type source information for ObjC interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
eb66759e9a1d7c041354d132a14674b2d948059b 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ObjCInterfaceLoc which provides type source information for ObjC interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
f453db071fe7be38ede2607671fa196c58cffc88 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce TypedefLoc::getTypedefDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
9036d5e369aae65e3baccdeed74c796e3d367b3d 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce TypedefLoc::getTypedefDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
389b93309a90a7447a7c625cd4f3a490fafd24b8 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:

-A NamedDecl reference
-A TypeLoc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
f4526e3fd48248af78b3d59ec36a37bc055b326f 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:

-A NamedDecl reference
-A TypeLoc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
225d6ca735de81dfb9bdc95645e30c6ba9514f43 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce ObjCProtocolListLoc for keeping source location information for protocol references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
f352bddf015e537350416c296dd2963524f554f9 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ObjCProtocolListLoc for keeping source location information for protocol references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
3921aa9c84f6876fdf2b7feb596ccb94fb83989e 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce ObjCProtocolListType type subclass.

This is used only for keeping detailed type source information for protocol references,
it should not participate in the semantics of the type system.

Its protocol list is not canonicalized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
24fab41057e4b67ed69a6b4027d5ae0f2f6934dc 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ObjCProtocolListType type subclass.

This is used only for keeping detailed type source information for protocol references,
it should not participate in the semantics of the type system.

Its protocol list is not canonicalized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
a42559185fa17298b63dada8e84046ce5b7d175a 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move DeclSpec::setProtocolQualifiers() out of line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e3a535bb6b39ff721aa3a7177dc427974ca0ff42 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move DeclSpec::setProtocolQualifiers() out of line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
81a8f5c228d256bc51ff13c7a588c0636b81d3dc 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Keep protocol source locations when parsing protocol references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
71b0addffbdeed29cc062c962e236c34107755d6 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep protocol source locations when parsing protocol references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
6cbe8f397e8fd4aa01310bcefdcbe36639eea7e0 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce Type::getTypeClassName() that returns the string associated with the TypeClass enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
cd01f17358dc8ef19338c0e2321138dd0a6160d9 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Type::getTypeClassName() that returns the string associated with the TypeClass enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7c9745c42bd7714a8f52bc5039bc65809da9e30c 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce TypeLoc::getSourceRange().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
68006af18fb880cd8547ce797152111b810aa0ba 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce TypeLoc::getSourceRange().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
0a1f4eb1b3533b9fc898feb44cb6c09da5d97ff8 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> -Introduce TypeLoc::getOpaqueData()
-Make TypeLoc's constructor public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
b735471f3848065120d7210e557b5f0d37ed4c43 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Introduce TypeLoc::getOpaqueData()
-Make TypeLoc's constructor public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
e5477d6e6dd834cb3944a623723a6e6443fad849 29-Sep-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add more const-goodness to ASTLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
1ebd7405be6dbea497d5ec72ab15e65debb0d72e 29-Sep-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add more const-goodness to ASTLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
b532d84f56b8cce3c92b8a0e4fe1d929c1d067cf 29-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Handle C++ delete expressions when the overloaded delete operator is a
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.

Fixes the Sema part of PR4782.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9091656e423f2354e53b2b3baa95b3eb5510badc 29-Sep-2009 Douglas Gregor <dgregor@apple.com> Handle C++ delete expressions when the overloaded delete operator is a
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.

Fixes the Sema part of PR4782.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
cff17421f6486c8baf51cea99a95d486f2ee735f 29-Sep-2009 Mike Stump <mrs@apple.com> Fix http://llvm.org/PR5090.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Redeclarable.h
740256bafbba6c5b5cb95a5c5bd7db161f3b2833 29-Sep-2009 Mike Stump <mrs@apple.com> Fix http://llvm.org/PR5090.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Redeclarable.h
986d177fbc817b81035ef75f152ce9070d9f63d7 28-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Add all of the C99 complex builtins prefixed with __builtin_

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
d3a23b238a2b2c0f11e6ac4951c7410a8c5717bf 28-Sep-2009 Douglas Gregor <dgregor@apple.com> Add all of the C99 complex builtins prefixed with __builtin_

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
1cbff35ede6b8a46fc4dda8e200a8e8748bb71de 28-Sep-2009 Rafael Espindola <rafael.espindola@gmail.com> Add -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
4eda2143f1543faa0399e69bad95756f08fbf0ff 28-Sep-2009 Rafael Espindola <rafael.espindola@gmail.com> Add -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
9a56fc75142846a3130910c5eb0806ca920fc123 28-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Provide a custom diagnostic when code tries to use an unknown builtin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9a8c9a2eacd80437f18edb339a37516ab7e773cd 28-Sep-2009 Douglas Gregor <dgregor@apple.com> Provide a custom diagnostic when code tries to use an unknown builtin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
46c99a20531dcfa2a194ae9d760372589972f952 28-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Add __builtin_vsnprintf. Thanks to Anders Johnsen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
1bffabaa357563607196b59d009bc3a12f19c032 28-Sep-2009 Douglas Gregor <dgregor@apple.com> Add __builtin_vsnprintf. Thanks to Anders Johnsen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
9da9394cff9bfc5ce9773bbaaf669e1551151b23 27-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix:

<rdar://problem/6914474> checker doesn't realize that variable might
have been assigned if a pointer to that variable was passed to another
function via a structure

The problem here was the RegionStoreManager::InvalidateRegion didn't
invalidate the bindings of invalidated regions. This required a
rewrite of this method using a worklist.

As part of this fix, changed ValueManager::getConjuredSymbolVal() to
require a 'void*' SymbolTag argument. This tag is used to
differentiate two different symbols created at the same location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
8780679b02bea5ab6360f3f8ebf3b221aaeda93f 27-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix:

<rdar://problem/6914474> checker doesn't realize that variable might
have been assigned if a pointer to that variable was passed to another
function via a structure

The problem here was the RegionStoreManager::InvalidateRegion didn't
invalidate the bindings of invalidated regions. This required a
rewrite of this method using a worklist.

As part of this fix, changed ValueManager::getConjuredSymbolVal() to
require a 'void*' SymbolTag argument. This tag is used to
differentiate two different symbols created at the same location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
76ee308b7fc21f689473a9138a5562d6ee8c89f1 26-Sep-2009 Anders Carlsson <andersca@mac.com> Make Decl::dump const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f88df8652e0726fe9eee5d78f92e3c5b34d0a537 26-Sep-2009 Anders Carlsson <andersca@mac.com> Make Decl::dump const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
6eb2a8a4cd21ea03ef4bbdfe71dda5d2eaf3d886 26-Sep-2009 Chris Lattner <sabre@nondot.org> builtin_trap should be noreturn, this fixes PR5062, patch by
Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
50dd255e5ad05f0d44bb92f358ff3f541a3d7a4b 26-Sep-2009 Chris Lattner <sabre@nondot.org> builtin_trap should be noreturn, this fixes PR5062, patch by
Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
6d716e4336f0cb7ff537bda8d25ee33c22aa4d5f 26-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Rework the Parse-Sema interaction for friends to better support friend
class templates. We now treat friend class templates much more like
normal class templates, except that they still get special name lookup
rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in
<iostream>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
d85bea2affdd59d83d1be7d24b97f436484c3625 26-Sep-2009 Douglas Gregor <dgregor@apple.com> Rework the Parse-Sema interaction for friends to better support friend
class templates. We now treat friend class templates much more like
normal class templates, except that they still get special name lookup
rules. Fixes PR5057 and eliminates a bunch of spurious diagnostics in
<iostream>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
2a5d2c4ce951afc0e6cecfad4508778392ae9caf 26-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Use explicitly-specified template argument lists to help naming
explicit template specializations, when available.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
0b60d9e0097e2d6a1a5e62396967e207c4a772f2 26-Sep-2009 Douglas Gregor <dgregor@apple.com> Use explicitly-specified template argument lists to help naming
explicit template specializations, when available.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
6e81a8cf44c2873abf988479d9949e6024242b0a 25-Sep-2009 Steve Naroff <snaroff@apple.com> Add clang_getDeclSource().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82807 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
ee9405e807d7c447c0143c2bd865b759192e97b3 25-Sep-2009 Steve Naroff <snaroff@apple.com> Add clang_getDeclSource().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82807 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d9e25cd62162910982a8f4335438ef493b6d9696 25-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Declarators can now properly represent template-ids, e.g., for

template void f<int>(int);
~~~~~~
Previously, we silently dropped the template arguments. With this
change, we now use the template arguments (when available) as the
explicitly-specified template arguments used to aid template argument
deduction for explicit template instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
db422dffb720ff41d0b60e228f45c685600ffa9e 25-Sep-2009 Douglas Gregor <dgregor@apple.com> Declarators can now properly represent template-ids, e.g., for

template void f<int>(int);
~~~~~~
Previously, we silently dropped the template arguments. With this
change, we now use the template arguments (when available) as the
explicitly-specified template arguments used to aid template argument
deduction for explicit template instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
f4fb6d472242e237ec988d05e1443edf299d32c8 25-Sep-2009 Steve Naroff <snaroff@apple.com> Add clang_getDeclLine and clang_getDeclColumn
Fix clang_getCursorDecl to do the right thing for expr refs
Fixup test file to accommodate new output (which includes the line/column for the referenced decl)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82798 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
699a07d8a0b1579c5178b3baf4bcf9edb6b38108 25-Sep-2009 Steve Naroff <snaroff@apple.com> Add clang_getDeclLine and clang_getDeclColumn
Fix clang_getCursorDecl to do the right thing for expr refs
Fixup test file to accommodate new output (which includes the line/column for the referenced decl)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82798 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
06c13d6e31ba05d4a0bb31274aecce4544571673 25-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> WIP implementation of explicit instantiation of function templates,
member functions of class template specializations, and static data
members. The mechanics are (mostly) present, but the semantic analysis
is very weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
lang/Parse/Action.h
d5a423b279e787e9fdd8309fe52cb515388c54ea 25-Sep-2009 Douglas Gregor <dgregor@apple.com> WIP implementation of explicit instantiation of function templates,
member functions of class template specializations, and static data
members. The mechanics are (mostly) present, but the semantic analysis
is very weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
lang/Parse/Action.h
eadb1e8ff5a7d778576df4c4d7ce0eadc3fd867e 25-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Fix checking for a null pointer constant when the expression itself is
value-dependent. Audit (and fixed) all calls to
Expr::isNullPointerConstant() to provide the correct behavior with
value-dependent expressions. Fixes PR5041 and a crash in libstdc++
<locale>.

In the same vein, properly compute value- and type-dependence for
ChooseExpr. Fixes PR4996.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ce94049b69f75b44c18584fe79cd238978b6b0d5 25-Sep-2009 Douglas Gregor <dgregor@apple.com> Fix checking for a null pointer constant when the expression itself is
value-dependent. Audit (and fixed) all calls to
Expr::isNullPointerConstant() to provide the correct behavior with
value-dependent expressions. Fixes PR5041 and a crash in libstdc++
<locale>.

In the same vein, properly compute value- and type-dependence for
ChooseExpr. Fixes PR4996.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ad571b45cadf91b0ce32dc47a0b591bc4d31130a 25-Sep-2009 Anders Carlsson <andersca@mac.com> Handle array fields that contain empty structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fbbce49c116aa8c8c7c0707cb6048b55f70461a9 25-Sep-2009 Anders Carlsson <andersca@mac.com> Handle array fields that contain empty structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
220b672dca732949a43bf8d40237a605f19d60ea 25-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix <rdar://problem/7249327> by allowing silent conversions between signed and unsigned integer values for symbolic values. This is an intermediate solution (i.e. hack) until we support extension/truncation of symbolic integers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
80417471b01ab2726cd04773b2ab700ce564073c 25-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix <rdar://problem/7249327> by allowing silent conversions between signed and unsigned integer values for symbolic values. This is an intermediate solution (i.e. hack) until we support extension/truncation of symbolic integers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
25fe73ffe15ec725db0642d95138f305dfab4148 25-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> When entering the scope of a declarator, make sure that the scope is
complete (or, possibly causing template instantiation).

Test this via some explicit specializations of member functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
7dfd0fb08300b60a9657748bda7d8b3ceb07babe 25-Sep-2009 Douglas Gregor <dgregor@apple.com> When entering the scope of a declarator, make sure that the scope is
complete (or, possibly causing template instantiation).

Test this via some explicit specializations of member functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
451b7b9a60208869cf5d6d958134cb104343949f 25-Sep-2009 John McCall <rjmccall@apple.com> Make it really, really easy to change the alignment of Type (and ExtQuals).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6b304a0254a13f42390b865ff5ba668a49cc58ae 25-Sep-2009 John McCall <rjmccall@apple.com> Make it really, really easy to change the alignment of Type (and ExtQuals).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
04f30d3ffeaf87f6db1cc6664901b73569f9753f 25-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> WIP implementation of explicit function template specialization. This
first implementation recognizes when a function declaration is an
explicit function template specialization (based on the presence of a
template<> header), performs template argument deduction + ambiguity
resolution to determine which template is being specialized, and hooks

There are many caveats here:
- We completely and totally drop any explicitly-specified template
arguments on the floor
- We don't diagnose any of the extra semantic things that we should
diagnose.
- I haven't looked to see that we're getting the right linkage for
explicit specializations

On a happy note, this silences a bunch of errors that show up in
libstdc++'s <iostream>, although Clang still can't get through the
entire header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
b9aa6b214c8fbc3e081dde575eef1f0913d48bdc 25-Sep-2009 Douglas Gregor <dgregor@apple.com> WIP implementation of explicit function template specialization. This
first implementation recognizes when a function declaration is an
explicit function template specialization (based on the presence of a
template<> header), performs template argument deduction + ambiguity
resolution to determine which template is being specialized, and hooks

There are many caveats here:
- We completely and totally drop any explicitly-specified template
arguments on the floor
- We don't diagnose any of the extra semantic things that we should
diagnose.
- I haven't looked to see that we're getting the right linkage for
explicit specializations

On a happy note, this silences a bunch of errors that show up in
libstdc++'s <iostream>, although Clang still can't get through the
entire header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
3ddc81456e4ee7e1017f17860053f3eec505a50e 24-Sep-2009 John McCall <rjmccall@apple.com> Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/DocumentXML.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Frontend/TypeXML.def
lang/Parse/DeclSpec.h
0953e767ff7817f97b3ab20896b229891eeff45b 24-Sep-2009 John McCall <rjmccall@apple.com> Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/DocumentXML.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Frontend/TypeXML.def
lang/Parse/DeclSpec.h
51287e77727c6ad39e7654ff77949700389c46bf 24-Sep-2009 Anders Carlsson <andersca@mac.com> Add a -dump-record-layouts argument to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
78762ebb9ad71d681110d4bada4b0575eaadfebe 24-Sep-2009 Anders Carlsson <andersca@mac.com> Add a -dump-record-layouts argument to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
54995045eee24b2e28d19e596d3f425151dd3c11 24-Sep-2009 Ted Kremenek <kremenek@apple.com> When building CFGs, no longer reverse the statements in the CFGBlock. Instead
have the iterators and operator[] handle the traversal of statements, as they
are stored in reverse order. Tests show this has no real performance impact, but
it does simply the CFG construction logic and will make it slightly easier to
change the allocation strategy for CFGBlocks (as we have fewer copies).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
6c2497248bc4f7fd8e5fb0a206d20abbf0e16645 24-Sep-2009 Ted Kremenek <kremenek@apple.com> When building CFGs, no longer reverse the statements in the CFGBlock. Instead
have the iterators and operator[] handle the traversal of statements, as they
are stored in reverse order. Tests show this has no real performance impact, but
it does simply the CFG construction logic and will make it slightly easier to
change the allocation strategy for CFGBlocks (as we have fewer copies).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
e0dd8ec0b57438c26f2565c5fabb9d62d27a6a6a 24-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Make C++ temporary-related expressions provide proper source-range information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
96be6917e1c4ba1f4435a14c9e7c6c139571d086 24-Sep-2009 Douglas Gregor <dgregor@apple.com> Make C++ temporary-related expressions provide proper source-range information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
ad10374fde0659fd4388aa51973f2869de5b9ff2 23-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> This patch addresses a few issues related to 8.5.3 [dcl.init.ref]
It uses a recent API to find inherited conversion functions to do
the initializer to reference lvalue conversion (and removes a FIXME).
It issues the ambiguity diagnostics when multiple conversions are found.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
51bebc83e74001ed0412d82aadae9eb247fee2d4 23-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> This patch addresses a few issues related to 8.5.3 [dcl.init.ref]
It uses a recent API to find inherited conversion functions to do
the initializer to reference lvalue conversion (and removes a FIXME).
It issues the ambiguity diagnostics when multiple conversions are found.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cdf86ef9cf43bfbbe4a9bd1993b1f1caa95bffbd 23-Sep-2009 Steve Naroff <snaroff@apple.com> More work to enable more exhaustive testing of the indexing API.

Next step: Add actual some test cases:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82636 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
4ade6d6eae934f796ca43c81a5aa185e456dde9b 23-Sep-2009 Steve Naroff <snaroff@apple.com> More work to enable more exhaustive testing of the indexing API.

Next step: Add actual some test cases:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82636 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
aa339184940ceb3aa0cac0b5cb45262796aa3341 23-Sep-2009 Chris Lattner <sabre@nondot.org> implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
This implements PR5034 and rdar://6836445.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/TargetInfo.h
21fb98ee003e992b0c4e204d98a19e0ef544cae3 23-Sep-2009 Chris Lattner <sabre@nondot.org> implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
This implements PR5034 and rdar://6836445.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/TargetInfo.h
bbcd5ea763a8ad80171a937f46f9a6e6f4bbba0d 23-Sep-2009 Chris Lattner <sabre@nondot.org> return a bool value as a bool


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
6a3bc6df36848188e9d0c1d978170c2b0918c6a3 23-Sep-2009 Chris Lattner <sabre@nondot.org> return a bool value as a bool


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1575c954eec7015c93aff49b57b52cf9f9d732f3 23-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Produce detailed diagnostics when overload
resolution failed to select a candidate due to
ambiguity in type conversion function selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b1663d050744ab3a4987df2d3a394f3ae0468435 23-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Produce detailed diagnostics when overload
resolution failed to select a candidate due to
ambiguity in type conversion function selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cc47e57e3421542eb343394bfc45ec568716a26c 23-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Print the results of code-completion for overloading by displaying the
signature of the function with the current parameter highlighted as a
placeholder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
86d802e03a267af79663990c39865c67e0645238 23-Sep-2009 Douglas Gregor <dgregor@apple.com> Print the results of code-completion for overloading by displaying the
signature of the function with the current parameter highlighted as a
placeholder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
bbc18cb67a198b42a0e20d6f4a57eae050438330 23-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Separate the code-completion results for call completion from the
results for other, textual completion. For call completion, we now
produce enough information to show the function call argument that we
are currently on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
0594438e06f58ab3798416324780ab39ca9c8f54 23-Sep-2009 Douglas Gregor <dgregor@apple.com> Separate the code-completion results for call completion from the
results for other, textual completion. For call completion, we now
produce enough information to show the function call argument that we
are currently on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
3d2491e8c664a3ffe39921fa442a28d524dcc631 23-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> When code-completion finds a declaration only because it is usable as
the start of a nested-name-specifier, add the "::" after the
nested-name-specifier to the code-completion string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
3e7253f155e1e40542a6815689adef5abc65b17b 23-Sep-2009 Douglas Gregor <dgregor@apple.com> When code-completion finds a declaration only because it is usable as
the start of a nested-name-specifier, add the "::" after the
nested-name-specifier to the code-completion string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
29e94efa938bf9d27f9d0a18d9214a4c0ca92d9b 23-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Tweak the code-completion results ranking and formation, so that
members found in base classes have the same ranking as members found
in derived classes. However, we will introduce an informative note for
members found in base classes, showing (as a nested-name-specifier)
the qualification to name the base class, to make it clear which
members are from bases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
0563c2677cfc20c9450342ddc53aa96971671c71 23-Sep-2009 Douglas Gregor <dgregor@apple.com> Tweak the code-completion results ranking and formation, so that
members found in base classes have the same ranking as members found
in derived classes. However, we will introduce an informative note for
members found in base classes, showing (as a nested-name-specifier)
the qualification to name the base class, to make it clear which
members are from bases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
62a09c2ac45fc86c21edd303209096de84b28cf0 23-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push "clang-is-production" logic up to tools/driver, and make it hittable by
defining the CLANG_IS_PRODUCTION Makefile variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
f44c58563286bb448a72ed9c9af5f21718633230 23-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push "clang-is-production" logic up to tools/driver, and make it hittable by
defining the CLANG_IS_PRODUCTION Makefile variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
79361ebfc1dc90a1d63c30748450202045da2023 23-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Add getDeclaration()/getKind() accessors to CodeCompleteConsumer::Result

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
76e0fece5b0c829ee4c184e78863806d3ca04be8 23-Sep-2009 Douglas Gregor <dgregor@apple.com> Add getDeclaration()/getKind() accessors to CodeCompleteConsumer::Result

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
5ae137150d5623de6fe4c2c25138551cefb9bd49 22-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> In C++, a variadic function does not need an ellipsis prior to the comma. Parse it in both C and C++, but diagnose it as an error in C with a fix-it hint to add the comma.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
ed5d651b0d4b99d0b68bb8d4633e49b98c95bd8f 22-Sep-2009 Douglas Gregor <dgregor@apple.com> In C++, a variadic function does not need an ellipsis prior to the comma. Parse it in both C and C++, but diagnose it as an error in C with a fix-it hint to add the comma.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
4d8a77769e8da39c0cd25d67941cb153fb4a9782 22-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Replace the -code-completion-dump option with

-code-completion-at=filename:line:column

which performs code completion at the specified location by truncating
the file at that position and enabling code completion. This approach
makes it possible to run multiple tests from a single test file, and
gives a more natural command-line interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
b657f115c3b4e262e72906a28cbcf3eaccd9460c 22-Sep-2009 Douglas Gregor <dgregor@apple.com> Replace the -code-completion-dump option with

-code-completion-at=filename:line:column

which performs code completion at the specified location by truncating
the file at that position and enabling code completion. This approach
makes it possible to run multiple tests from a single test file, and
gives a more natural command-line interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
a1234addb02a8789b63c82db4c660874778a6a19 22-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue good ambiguity diagnostic when convesion fails.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82565 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
455acd9452f5b2a69d7ab8e53f733e46b500473a 22-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue good ambiguity diagnostic when convesion fails.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82565 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
21e28f0a6f8ab4d362c837ac945bd818e3d9e46f 22-Sep-2009 Steve Naroff <snaroff@apple.com> - Implement support for various types of "refs" (initially to help test clang_getCursor()).
- Add missing prototypes for dispose functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82564 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
fb5704295c6137685a7b90b92cd6b958028740c8 22-Sep-2009 Steve Naroff <snaroff@apple.com> - Implement support for various types of "refs" (initially to help test clang_getCursor()).
- Add missing prototypes for dispose functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82564 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7bc38e309657a5b406c2a66addc6bd1806f2e8a9 22-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Implement code completion within a function call, triggered after the
opening parentheses and after each comma. We gather the set of visible
overloaded functions, perform "partial" overloading based on the set
of arguments that we have thus far, and return the still-viable
results sorted by the likelihood that they will be the best candidate.

Most of the changes in this patch are a refactoring of the overloading
routines for a function call, since we needed to separate out the
notion of building an overload set (common to code-completion and
normal semantic analysis) and then what to do with that overload
set. As part of this change, I've pushed explicit template arguments
into a few more subroutines.

There is still much more work to do in this area. Function templates
won't be handled well (unless we happen to deduce all of the template
arguments before we hit the completion point), nor will overloaded
function-call operators or calls to member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
9c6a0e92dbf89897eae6106b24bfd017f269bfd0 22-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement code completion within a function call, triggered after the
opening parentheses and after each comma. We gather the set of visible
overloaded functions, perform "partial" overloading based on the set
of arguments that we have thus far, and return the still-viable
results sorted by the likelihood that they will be the best candidate.

Most of the changes in this patch are a refactoring of the overloading
routines for a function call, since we needed to separate out the
notion of building an overload set (common to code-completion and
normal semantic analysis) and then what to do with that overload
set. As part of this change, I've pushed explicit template arguments
into a few more subroutines.

There is still much more work to do in this area. Function templates
won't be handled well (unless we happen to deduce all of the template
arguments before we hit the completion point), nor will overloaded
function-call operators or calls to member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
b4e0bb9b13133eefecf17005e93d55f401fa5e48 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Spell function pointer correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
e119e84ea5ea66eb2090aec05310c23e9d6f63fc 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Spell function pointer correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
0700c31e43f6d1805de0e8a34420b5eecec92690 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add StringLiteral::getString -> StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b648023da23e8b227cdda57a241db4c6f368726b 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add StringLiteral::getString -> StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bbb56d126f2f1c094d848a473d785c04eabe0803 22-Sep-2009 Anders Carlsson <andersca@mac.com> Store the set of indirect primary bases directly in the record layout builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3f066522342538509cf0aa4f381503b43fbdb68b 22-Sep-2009 Anders Carlsson <andersca@mac.com> Store the set of indirect primary bases directly in the record layout builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
17a07a1724c34d4fe8f86a945d27294b941d354f 22-Sep-2009 Anders Carlsson <andersca@mac.com> Record layout builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
e4feb834fb1a6b03291ed78fd32d13729b5a3c4a 22-Sep-2009 Anders Carlsson <andersca@mac.com> Record layout builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
cac0eaf6caa1035b6a971b32adeea895ba14715c 22-Sep-2009 John McCall <rjmccall@apple.com> Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/DeclXML.def
183700f494ec9b6701b6efe82bcb25f4c79ba561 22-Sep-2009 John McCall <rjmccall@apple.com> Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/DeclXML.def
f2833355dec1227932d8255542b28e2019b3a7c0 22-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
b924259cc53e4d38e493616715e7b3e95bdee1ef 22-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
eba53155ef9b46ebeadd7850b19aae8f4ce78509 21-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Another code-completion TODO

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
cfd2f625318ddce258e4c243b54492235ecf0e02 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Another code-completion TODO

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7c559f33215453ee80f0c36857b6845858e1a9a0 21-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion for ordinary names when we're starting a declaration, expression, or statement

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
791215b7a24666912c0b71175d2ca5ba082f666e 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Code completion for ordinary names when we're starting a declaration, expression, or statement

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
07c960b2a56da11355727295ebba130e97044c08 21-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> -fobjc-newgc-api is now the default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
90b4fd48a6b42c2fc7b162a5e61e5f8bfa17d4ee 21-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> -fobjc-newgc-api is now the default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
a51a7ad10bb5d1c8df03c7da637188638921b5b3 21-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Enhance "case" code completion in C++ to suggest qualified names for
enumerators when either the user intentionally wrote a qualified name
(in which case we just use that nested-name-specifier to match
the user's code) or when this is the first "case" statement and we
need a qualified name to refer to an enumerator in a different scope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
b9d0ef76347574a147b8456b018fe94dc1e2be26 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Enhance "case" code completion in C++ to suggest qualified names for
enumerators when either the user intentionally wrote a qualified name
(in which case we just use that nested-name-specifier to match
the user's code) or when this is the first "case" statement and we
need a qualified name to refer to an enumerator in a different scope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
fbf10cd4af8d30d49f616492be227b85d5363c7e 21-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Code completion for "case" statements within a switch on an expression
of enumeration type, providing the various unused enumerators as options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
3e1005f085006dfb3545f0c54ac5e22483137c7d 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Code completion for "case" statements within a switch on an expression
of enumeration type, providing the various unused enumerators as options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
78bfefe6d1c9a17d51581167150187a9b7905082 21-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor and simplify the CodeCompleteConsumer, so that all of the
real work is performed within Sema. Addresses Chris's comments, but
still retains the heavyweight list-of-multimaps data structure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
86d9a52c24d390631a888d4ff812e1b15445e0a0 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Refactor and simplify the CodeCompleteConsumer, so that all of the
real work is performed within Sema. Addresses Chris's comments, but
still retains the heavyweight list-of-multimaps data structure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
a740be9bd9a01fd70bd25db2481d16af868dc670 21-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add missing PCH support for -fstack-protector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
ab8e281b32a3d3b9b18257d26844362bf806ecdc 21-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add missing PCH support for -fstack-protector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
97304c0cb855e6ec9a1f5a68853327086a4ae4fe 21-Sep-2009 Chris Lattner <sabre@nondot.org> Implement __builtin_unreachable(), a GCC 4.5 extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
21190d54634d6e244e85d28ad915ce2fe86ecbff 21-Sep-2009 Chris Lattner <sabre@nondot.org> Implement __builtin_unreachable(), a GCC 4.5 extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
5d8871d4a40dbf5618062638e110f1d7bb03ca7b 21-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change ASTUnit to take the Diagnostic as an argument, the client should have control of this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
31b87d8006d4863dd9b17e515ac720941efc38e3 21-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change ASTUnit to take the Diagnostic as an argument, the client should have control of this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
2e7db60c94e121de287cc58a99ee4626a41ae2f7 21-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add Diagnostic to Indexer, and have it keep its own FileManager instead of taking an external reference (which was leaked in the case of the CIndex library).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Indexer.h
a39075952caea0af902f174ce26ad5ac787b3974 21-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add Diagnostic to Indexer, and have it keep its own FileManager instead of taking an external reference (which was leaked in the case of the CIndex library).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Indexer.h
0326de31eee2694e21ffa9f17866b6b6e722e0de 20-Sep-2009 Chris Lattner <sabre@nondot.org> switch command line 'parse' methods to use StringRef for efficiency, which
is also required for an llvm-side change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82344 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
59b2172751e78ef7c0895d9a5d1359b61ab63a33 20-Sep-2009 Chris Lattner <sabre@nondot.org> switch command line 'parse' methods to use StringRef for efficiency, which
is also required for an llvm-side change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82344 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
341acdb918360aeaa9e6f5a712cac92cfd51e3b3 19-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify code with a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
c2ff3f85481fbfa79f56a444b5726d4ab394bf4d 19-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify code with a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
e0cc499a04a09bbbe297433faacbf3d0c067f308 19-Sep-2009 Ted Kremenek <kremenek@apple.com> Reintroduce FoldingSet profiling for PathDiagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
db8338a35fa729c08bc2dfd87cdc43533506f548 19-Sep-2009 Ted Kremenek <kremenek@apple.com> Reintroduce FoldingSet profiling for PathDiagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
ac547d56ba6725811c9f09c241785bc230ce5345 19-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce code completion strings, which describe how to *use* the
results of code completion, e.g., by providing function call syntax
with placeholders for each of the parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
e6e0361984b077d205e9a45d64257d41d2c788c8 19-Sep-2009 Douglas Gregor <dgregor@apple.com> Introduce code completion strings, which describe how to *use* the
results of code completion, e.g., by providing function call syntax
with placeholders for each of the parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
fc9c5997e8bd83d62fca2908628aae9222378710 18-Sep-2009 Chris Lattner <sabre@nondot.org> allow clearing this value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
0369297684c13d5495ab490d46ed9d14ef235ce3 18-Sep-2009 Chris Lattner <sabre@nondot.org> allow clearing this value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
270f5b6882bd9746bac5eefab4dec5b17744e35c 18-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> C++ code completion after the "operator" keyword. Provide overloaded
operators, type specifiers, type names, and nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
ed8d322b4086b8b1e1f78b21389cabb23457dcb3 18-Sep-2009 Douglas Gregor <dgregor@apple.com> C++ code completion after the "operator" keyword. Provide overloaded
operators, type specifiers, type names, and nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
7b7274e575c184d8c0841063f8bf6428f5522ade 18-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce four new code-completion hooks for C++:

- after "using", show anything that can be a nested-name-specifier.
- after "using namespace", show any visible namespaces or namespace aliases
- after "namespace", show any namespace definitions in the current scope
- after "namespace identifier = ", show any visible namespaces or
namespace aliases



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
49f40bd0c9c9de5e74727774fec429b47d36303a 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Introduce four new code-completion hooks for C++:

- after "using", show anything that can be a nested-name-specifier.
- after "using namespace", show any visible namespaces or namespace aliases
- after "namespace", show any namespace definitions in the current scope
- after "namespace identifier = ", show any visible namespaces or
namespace aliases



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
23f40faeea7911e5f0fb1e37e8f357e29487f76e 18-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Don't perform name lookup into a given declaration context more than once during code completion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
5836b010d0a74c8b7be3f2616332cd70d3c87f83 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Don't perform name lookup into a given declaration context more than once during code completion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
03546f72ab350b0181d20a9e95da6b451401cc00 18-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> For code completion in C++ member access expressions and tag names,
look into the current scope for anything that could start a
nested-names-specifier. These results are ranked worse than any of the
results actually found in the lexical scope.

Perform a little more pruning of the result set, eliminating
constructors, __va_list_tag, and any duplication of declarations in
the result set. For the latter, implemented
NamespaceDecl::getCanonicalDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Sema/CodeCompleteConsumer.h
33224e61bfca370850abae89bbd415a4dabe07fa 18-Sep-2009 Douglas Gregor <dgregor@apple.com> For code completion in C++ member access expressions and tag names,
look into the current scope for anything that could start a
nested-names-specifier. These results are ranked worse than any of the
results actually found in the lexical scope.

Perform a little more pruning of the result set, eliminating
constructors, __va_list_tag, and any duplication of declarations in
the result set. For the latter, implemented
NamespaceDecl::getCanonicalDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Sema/CodeCompleteConsumer.h
9437430d8dde6c1f4273bb2f7600c44abd5fd621 18-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> When gathering results for code completion, only include hidden
results when there is some way to refer to them in the language, such
as with a qualified name in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
b1c28a1f7ef3bd3616df6ddcdb503f4b480a8df6 18-Sep-2009 Douglas Gregor <dgregor@apple.com> When gathering results for code completion, only include hidden
results when there is some way to refer to them in the language, such
as with a qualified name in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
d143259608d01ca37a3172ce31e725b3167ef4f1 18-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Implement code completion for tags, e.g., code completion after "enum"
will provide the names of various enumerations currently
visible. Introduced filtering of code-completion results when we build
the result set, so that we can identify just the kinds of declarations
we want.

This implementation is incomplete for C++, since we don't consider
that the token after the tag keyword could start a
nested-name-specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
374929f7e88f6c7a96382b3eb4201b721c418372 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement code completion for tags, e.g., code completion after "enum"
will provide the names of various enumerations currently
visible. Introduced filtering of code-completion results when we build
the result set, so that we can identify just the kinds of declarations
we want.

This implementation is incomplete for C++, since we don't consider
that the token after the tag keyword could start a
nested-name-specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
a50e796b429b487ff5d73f75fb02aede2825e75c 18-Sep-2009 Ted Kremenek <kremenek@apple.com> Revert most of r82198, which was causing a large number of crashes
when running the analyzer on real projects. We'll keep the change to
AnalysisManager.cpp in r82198 so that -fobjc-gc analyzes code
correctly in both GC and non-GC modes, although this may emit two
diagnostics for each bug in some cases (a better solution will come
later).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
7f473c546602de69b35f0c657619c2ffe8e4136a 18-Sep-2009 Ted Kremenek <kremenek@apple.com> Revert most of r82198, which was causing a large number of crashes
when running the analyzer on real projects. We'll keep the change to
AnalysisManager.cpp in r82198 so that -fobjc-gc analyzes code
correctly in both GC and non-GC modes, although this may emit two
diagnostics for each bug in some cases (a better solution will come
later).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
6902706ff2be3b90f376e735dacc0a955e4e3ccd 18-Sep-2009 Ted Kremenek <kremenek@apple.com> Introduce caching of diagnostics in BugReporter. This provides extra
pruning of diagnostics that may be emitted multiple times. This is
accomplished by adding FoldingSet profiling support to PathDiagnostic,
and then having BugReporter record what diagnostics have been issued.

This was motived to a serious bug introduced by moving the
'divide-by-zero' checking outside of GRExprEngine into a separate
'Checker' class. When analyzing code using the '-fobjc-gc' option, a
given function would be analyzed twice, but the second time various
"internal checks" would be disabled to avoid emitting multiple
diagnostics (e.g., "null dereference") for the same issue. The
problem is that such checks also effect path pruning and don't just
emit diagnostics. This resulted in an assertion failure involving a
real divide-by-zero in some analyzed code where we would get an
assertion failure in APInt because the 'DivZero' check was disabled
and didn't prune the logic that resulted in the divide-by-zero in the
analyzer.

The implemented solution is somewhat of a hack, and may not perform
extremely well. This will need to be cleaned up over time.

As a regression test, 'misc-ps.m' has been modified so that its tests
are run using -fobjc-gc to test this diagnostic pruning behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
6a19832d08f00ac78c0a69c4fbe38b04a55b75cc 18-Sep-2009 Ted Kremenek <kremenek@apple.com> Introduce caching of diagnostics in BugReporter. This provides extra
pruning of diagnostics that may be emitted multiple times. This is
accomplished by adding FoldingSet profiling support to PathDiagnostic,
and then having BugReporter record what diagnostics have been issued.

This was motived to a serious bug introduced by moving the
'divide-by-zero' checking outside of GRExprEngine into a separate
'Checker' class. When analyzing code using the '-fobjc-gc' option, a
given function would be analyzed twice, but the second time various
"internal checks" would be disabled to avoid emitting multiple
diagnostics (e.g., "null dereference") for the same issue. The
problem is that such checks also effect path pruning and don't just
emit diagnostics. This resulted in an assertion failure involving a
real divide-by-zero in some analyzed code where we would get an
assertion failure in APInt because the 'DivZero' check was disabled
and didn't prune the logic that resulted in the divide-by-zero in the
analyzer.

The implemented solution is somewhat of a hack, and may not perform
extremely well. This will need to be cleaned up over time.

As a regression test, 'misc-ps.m' has been modified so that its tests
are run using -fobjc-gc to test this diagnostic pruning behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
2515c3925fd57d7af37d10498579155fb88a9734 17-Sep-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
87667dcbc1301409c9c07a3f6281a2c496997649 17-Sep-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/CodeCompleteConsumer.h
70aa572f9b5ebb13221f2062f40459a58bc59497 17-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Initial implementation of a code-completion interface in Clang. In
essence, code completion is triggered by a magic "code completion"
token produced by the lexer [*], which the parser recognizes at
certain points in the grammar. The parser then calls into the Action
object with the appropriate CodeCompletionXXX action.

Sema implements the CodeCompletionXXX callbacks by performing minimal
translation, then forwarding them to a CodeCompletionConsumer
subclass, which uses the results of semantic analysis to provide
code-completion results. At present, only a single, "printing" code
completion consumer is available, for regression testing and
debugging. However, the design is meant to permit other
code-completion consumers.

This initial commit contains two code-completion actions: one for
member access, e.g., "x." or "p->", and one for
nested-name-specifiers, e.g., "std::". More code-completion actions
will follow, along with improved gathering of code-completion results
for the various contexts.

[*] In the current -code-completion-dump testing/debugging mode, the
file is truncated at the completion point and EOF is translated into
"code completion".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/TokenKinds.def
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/ParseAST.h
81b747b7fcc91c2fba9a3183d8fac80adbfc1d3e 17-Sep-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of a code-completion interface in Clang. In
essence, code completion is triggered by a magic "code completion"
token produced by the lexer [*], which the parser recognizes at
certain points in the grammar. The parser then calls into the Action
object with the appropriate CodeCompletionXXX action.

Sema implements the CodeCompletionXXX callbacks by performing minimal
translation, then forwarding them to a CodeCompletionConsumer
subclass, which uses the results of semantic analysis to provide
code-completion results. At present, only a single, "printing" code
completion consumer is available, for regression testing and
debugging. However, the design is meant to permit other
code-completion consumers.

This initial commit contains two code-completion actions: one for
member access, e.g., "x." or "p->", and one for
nested-name-specifiers, e.g., "std::". More code-completion actions
will follow, along with improved gathering of code-completion results
for the various contexts.

[*] In the current -code-completion-dump testing/debugging mode, the
file is truncated at the completion point and EOF is translated into
"code completion".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/TokenKinds.def
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Sema/CodeCompleteConsumer.h
lang/Sema/ParseAST.h
f26c8cfeee1f5294b190615ee0d4137dbd4ebfe1 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add a bunch of math builtins, #include <cmath> passes now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
aa14a1b949fafc1263d9d28ee2e3496aabb831ef 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add a bunch of math builtins, #include <cmath> passes now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
dd5e046ff2d1eeeec5642d2a5f2cd8ba3a1298ee 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Improve driver error message when only running the preprocessor and an input is
already preprocessed.

--
ddunbar@giles:tmp$ touch t.i
ddunbar@giles:tmp$ gcc -E t.i
ddunbar@giles:tmp$ clang -E t.i
clang: warning: t.i: previously preprocessed input unused when '-E' is present
ddunbar@giles:tmp$
--

<rdar://problem/6813375> [driver] driver prints confusing message when running -E on preprocessed file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
634b24563be901f8adc37c07ffba3eeac1f1d4cc 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Improve driver error message when only running the preprocessor and an input is
already preprocessed.

--
ddunbar@giles:tmp$ touch t.i
ddunbar@giles:tmp$ gcc -E t.i
ddunbar@giles:tmp$ clang -E t.i
clang: warning: t.i: previously preprocessed input unused when '-E' is present
ddunbar@giles:tmp$
--

<rdar://problem/6813375> [driver] driver prints confusing message when running -E on preprocessed file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
3112bf37eb8d1149983a9d08d77551dda16a6bc5 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Initial support for code generation from .ast files.
- Doesn't actually work yet because only module level asm's get correctly marked as externally visible in the PCH.

- Other things like 'clang-cc foo.ast -ast-dump' now work, as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
aca2ebdf416ade724e71a81aa150977ac5baa9b0 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Initial support for code generation from .ast files.
- Doesn't actually work yet because only module level asm's get correctly marked as externally visible in the PCH.

- Other things like 'clang-cc foo.ast -ast-dump' now work, as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
d3ad986df2a0accecb98f83881ce20c3874e9d76 17-Sep-2009 John McCall <rjmccall@apple.com> Improved representation and support for friend class templates. Angst about same.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
dd4a3b0065b9a7e7b00073df415a798886c090f3 17-Sep-2009 John McCall <rjmccall@apple.com> Improved representation and support for friend class templates. Angst about same.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
3c861932313947f863a233ec3273f6b237c29ead 16-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Starting patch to generate more specific API for objc's
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
b123ea395ee607de85161f84c6e78595946304a5 16-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Starting patch to generate more specific API for objc's
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
fb333737aaecc764e04100b640281681b79f78d5 16-Sep-2009 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82073 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
459789b8d2e3235e2f3342c393b7a78bd73c1347 16-Sep-2009 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82073 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
6115803d4017efcda82aef639a3254be4d3698f3 16-Sep-2009 Anders Carlsson <andersca@mac.com> Improve handling of vector casts in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0de51bc6122f6cee0e8081d65dfcc7d500da1c6f 16-Sep-2009 Anders Carlsson <andersca@mac.com> Improve handling of vector casts in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fed00f32a343674a6edff91f9de51a07554c1efe 16-Sep-2009 Ted Kremenek <kremenek@apple.com> Remove ImplicitBadDivides/ExplicitBadDivides node sets. This checking is now down by a 'Checker' and not build into GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
76823024e0b68068915f7631acc88f44e1315133 16-Sep-2009 Ted Kremenek <kremenek@apple.com> Remove ImplicitBadDivides/ExplicitBadDivides node sets. This checking is now down by a 'Checker' and not build into GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b6b91043dfa57420fec7b8e2af10becda81ccd85 16-Sep-2009 Mike Stump <mrs@apple.com> Chris doesn't want the FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b95519a3835a1fb16c6106c4570066e7693187a5 16-Sep-2009 Mike Stump <mrs@apple.com> Chris doesn't want the FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f7b39b9826d01e0fad5131bce58d86aa264ed79b 16-Sep-2009 Mike Stump <mrs@apple.com> Add a FIXME, so the next person don't trip as hard on the landmines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
f36fa37c4e51167e92b87af599702c5ea51e8747 16-Sep-2009 Mike Stump <mrs@apple.com> Add a FIXME, so the next person don't trip as hard on the landmines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
5c000ca60eb1d0a28fc4e69ec061e68103f2710d 16-Sep-2009 Mike Stump <mrs@apple.com> Some people don't want to fix their broken code just yet, so turn off
hard error for falling off a noreturn function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
29813c3509a0229947e35897a9a145c4fb3bc147 16-Sep-2009 Mike Stump <mrs@apple.com> Some people don't want to fix their broken code just yet, so turn off
hard error for falling off a noreturn function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
faea0812d816d842a6ef25954e2894e1f7a8b186 16-Sep-2009 Mike Stump <mrs@apple.com> Back to 1.1 we go.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
1f2c32e61ca0825e05e7bf6af2f3cb59e21ed2b9 16-Sep-2009 Mike Stump <mrs@apple.com> Back to 1.1 we go.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
ae55579764060c7c12356d8c55461ac5b553c1a6 16-Sep-2009 Mike Stump <mrs@apple.com> Back out for now, as apparently there is some really broken code somewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
a08feb7718cc4a07c7d44c23c9a1c93575b36359 16-Sep-2009 Mike Stump <mrs@apple.com> Back out for now, as apparently there is some really broken code somewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
6bd18e7fff34cb0f01fa8c01571a73cfcfa5fb51 16-Sep-2009 Mike Stump <mrs@apple.com> Bump.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
13392aa6895bcdbbec4aa4abe48fb3d709f1e596 16-Sep-2009 Mike Stump <mrs@apple.com> Bump.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Version.h
d38d42dd4f34aa05de01772f221c9161ddf9ad42 15-Sep-2009 Steve Naroff <snaroff@apple.com> - clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor_NoDeclFound).
- Add predicate clang_isInvalid().
- Implement clang_getCursorFromDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81908 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
77128ddd3077fc045751a55bb3226802b15d5510 15-Sep-2009 Steve Naroff <snaroff@apple.com> - clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor_NoDeclFound).
- Add predicate clang_isInvalid().
- Implement clang_getCursorFromDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81908 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
38c42b40321aacf18da8a70b1d5d5131ab922a5c 15-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> When printing an overload candidate that is a function template specialization,
point at the template and print out its template arguments, e.g.,

ambiguous-ovl-print.cpp:5:8: note: candidate function template specialization
[with T = int]
void f(T*, long);




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1fdd89ba1d14ee11fda5b9e1c171db428b1acb23 15-Sep-2009 Douglas Gregor <dgregor@apple.com> When printing an overload candidate that is a function template specialization,
point at the template and print out its template arguments, e.g.,

ambiguous-ovl-print.cpp:5:8: note: candidate function template specialization
[with T = int]
void f(T*, long);




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3fa04998b1be7a53e60d121b40c3dd86a9346266 15-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue good diagnostics when initialization failes due to
ambiguity in type conversion function selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
34acd3e62c4ca3a2904f2515ff2a1a94c7d27b01 15-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue good diagnostics when initialization failes due to
ambiguity in type conversion function selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f3adbe0eac82acf2213ea2623d47b8cb7887cf4c 15-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Perform overload resolution when selecting a pointer conversion
function for delete of a class expression and issue
good diagnostic when result is ambiguous.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f652793d4d32cc71b5ee2167069cbd363baa75de 15-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Perform overload resolution when selecting a pointer conversion
function for delete of a class expression and issue
good diagnostic when result is ambiguous.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cebb824cf2fb8701a7e4a744de1ab064375e1c5e 15-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Implement partial ordering of class template partial specializations
(C++ [temp.class.order]).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
bf4ea56cdc376cef5a12abf6bf18dc34805c2226 15-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement partial ordering of class template partial specializations
(C++ [temp.class.order]).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
75f48e16726933b75d77737f4af43620e21bfdcd 15-Sep-2009 Anders Carlsson <andersca@mac.com> Get rid of the CastInfo struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
c0a2fd8f092722c8f78b566ac4506a21437040e9 15-Sep-2009 Anders Carlsson <andersca@mac.com> Get rid of the CastInfo struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
e3ffcdc86649d032d1d928653a3e0807653d0931 15-Sep-2009 Anders Carlsson <andersca@mac.com> Handle reinterpret_cast between integral types and pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
7f9e646b7ed47bc8e9a60031ad0c2b55031e2077 15-Sep-2009 Anders Carlsson <andersca@mac.com> Handle reinterpret_cast between integral types and pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
2d9010f78bf1c83d5b97ca237cf5ea4375db2a08 15-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a good diagnostics when attempt to select
a type convesion function results in ambiguity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
78cf9a26d27349a7b9ae83a0b7d5451571b9b41e 15-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a good diagnostics when attempt to select
a type convesion function results in ambiguity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c93226665c934b286c70db0f2d729860e0d900a8 15-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/5905851> do not report a leak when post-dominated by a call
to a noreturn or panic function


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
06c9cb4d1a29e708f51bce9f7ee5acbe1c3761c3 15-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/5905851> do not report a leak when post-dominated by a call
to a noreturn or panic function


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
c927d7e282394200e6fc1cb82576ad6a17c64f53 14-Sep-2009 John McCall <rjmccall@apple.com> Skeletal support for friend class templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
05b23ea2119b4c411719bd6631e5d679ba5e7ef1 14-Sep-2009 John McCall <rjmccall@apple.com> Skeletal support for friend class templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
276d7841778cce99f534266cb81a97a8edce5a16 14-Sep-2009 Anders Carlsson <andersca@mac.com> For consistency, use "bit-field" instead of "bitfield" in our diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c313e11e2c224fe1caa46bbb85f7b5e2be3c83ef 14-Sep-2009 Anders Carlsson <andersca@mac.com> For consistency, use "bit-field" instead of "bitfield" in our diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e3bc121ad330c2e4e178fbca54edda07d0004d88 14-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Implement partial ordering of function template specializations
(C++ [temp.func.order]).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8a51491d936d8c50480f3c3ca6647be12a7ad51f 14-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement partial ordering of function template specializations
(C++ [temp.func.order]).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3f0290ae15164d38be7083a5b8a0276c07628b8d 14-Sep-2009 Sam Weinig <sam.weinig@gmail.com> Remove duplicate definition of char-subscripts DiagGroup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
f6412c6479e2027a35d74bd37869b50adc49b620 14-Sep-2009 Sam Weinig <sam.weinig@gmail.com> Remove duplicate definition of char-subscripts DiagGroup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
d4f0283ca56ac6229e552cba4be4c5eec0b66f03 14-Sep-2009 Sam Weinig <sam.weinig@gmail.com> Add support for -Wchar-subscripts. Fixes PR4801.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
76e2b710a92bceb9575a81db181109664946986e 14-Sep-2009 Sam Weinig <sam.weinig@gmail.com> Add support for -Wchar-subscripts. Fixes PR4801.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
0d83d5116ec471aa80c4aaa4aab3e5d91b9265f2 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
018ba5ab0671d9b6eefecaffc118c869bea151a1 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
88439e1b2ae2a57887dd0233d0f5a59b67173684 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Support -mabi= for clang/ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
2030d8f46b4226fa99e59389e3ca856a79c27e9a 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Support -mabi= for clang/ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
45e5ad87f1c9b79dc92adf0dd7470342ca66cda5 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add -target-abi clang-cc option, currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/TargetInfo.h
73b79596bac6f6169e5979d0c7241924259d2a76 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add -target-abi clang-cc option, currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/TargetInfo.h
fa4770459f62d47f6889d145347b8bf02462b543 14-Sep-2009 Anders Carlsson <andersca@mac.com> Fix a bug in getFriendObjectKind where we would clear out all mask bits except IDNS_TagFriend and IDNS_OrdinaryFriend but then check for IDNS_Tag and IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
255d6415a692e8384971755f91541497d54b3193 14-Sep-2009 Anders Carlsson <andersca@mac.com> Fix a bug in getFriendObjectKind where we would clear out all mask bits except IDNS_TagFriend and IDNS_OrdinaryFriend but then check for IDNS_Tag and IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ee39e6176a9e5e34999a55a48a57abde2ee21eb8 13-Sep-2009 Anders Carlsson <andersca@mac.com> CXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8195bc932d27e21be46b9a1f8ce268ebd419246b 13-Sep-2009 Anders Carlsson <andersca@mac.com> CXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
ed52be042b68b329a9ca40030e809547bc527d6c 13-Sep-2009 Eli Friedman <eli.friedman@gmail.com> Add utility to evaluate lvalues which are an offset relative to a stack
location. Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b2f295c8050fb8c141bf2cf38eed0a56e99d0092 13-Sep-2009 Eli Friedman <eli.friedman@gmail.com> Add utility to evaluate lvalues which are an offset relative to a stack
location. Patch by Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d7e072a022193d8fab49a31e5875025661e8c4fa 13-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Rework the way we determine whether an externally visible symbol is
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1fc09a92d0bffda20e06fa882388c01e192e2069 13-Sep-2009 Douglas Gregor <dgregor@apple.com> Rework the way we determine whether an externally visible symbol is
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
21ded519fdd8f9bf08d7f85e35920ba32d81626a 12-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed Context argument from couple of methods which don't
need them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
debc629300e4c6c774b7d2a1d3c665c2c719e803 12-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed Context argument from couple of methods which don't
need them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3b3f5749ef24073d20a9d235540ddd540bb38110 12-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward having an access method for visible
conversion functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6250921cc5bd3493a0d99fa2c32ec9716767a965 12-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward having an access method for visible
conversion functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
1af472ef14ec61bd3f93cd9aa6c81550367a8831 12-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> SmallVectorize preprocessor's token cache. Testing shows there is almost never
more than one token in the cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
f4d5eb4866a27d497f0bb75b12c2ffd48ad4d9c0 12-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> SmallVectorize preprocessor's token cache. Testing shows there is almost never
more than one token in the cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
a51c20938769d33ad75db6dfe7f7e9082999d8c7 12-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7814e6d6645d587891293d59ecf6576defcfac92 12-Sep-2009 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4c7050d630d296460793c5dddccd09b823e0ca27 12-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Remove unnecessary ASTContext parameters from isMain and isExternC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
48a83b5e7ae4051c7c11680ac00c1fa02d610a62 12-Sep-2009 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameters from isMain and isExternC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d3693926e6834c657d1b64b68f790f36daf5f8c2 12-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate FunctionDecl::getBodyIfAvailable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
af3280fadbdab6305581955c973e1229970958eb 12-Sep-2009 Douglas Gregor <dgregor@apple.com> Eliminate FunctionDecl::getBodyIfAvailable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1c6fa28a7a2e715c1421f724755d90e38ac7e61d 12-Sep-2009 Ted Kremenek <kremenek@apple.com> Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a way
to statically type various methods in SValuator/GRState as required either a
defined value or a defined-but-possibly-unknown value. This leads to various
logic cleanups in GRExprEngine, and lets the compiler enforce via type checking
our assumptions about what symbolic values are possibly undefined and what are
not.

Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/ValueManager.h
5b9bd2137ebef350af803c634e3fdf5d74678100 12-Sep-2009 Ted Kremenek <kremenek@apple.com> Introduce "DefinedOrUnknownSVal" into the SVal class hierarchy, providing a way
to statically type various methods in SValuator/GRState as required either a
defined value or a defined-but-possibly-unknown value. This leads to various
logic cleanups in GRExprEngine, and lets the compiler enforce via type checking
our assumptions about what symbolic values are possibly undefined and what are
not.

Along the way, clean up some of the static analyzer diagnostics regarding the uses of uninitialized values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/ValueManager.h
b0abe0316f62bd3175cc7e34dc54ce1c27769867 11-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build visible conversion function list lazily and make its
first use in calling the conversion function on delete statements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5346278f81930e7fd0545bbbb2fc217c6921b109 11-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build visible conversion function list lazily and make its
first use in calling the conversion function on delete statements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e9bd85c32d6c8c66fa648b3a0f54783abb3b20fe 11-Sep-2009 John McCall <rjmccall@apple.com> Alter Action's friend interface to prepare for templated friend declarations and
to stop making promises we can't currently keep.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
bbbcdd9cc06b6078939129330ecc9bda3310984d 11-Sep-2009 John McCall <rjmccall@apple.com> Alter Action's friend interface to prepare for templated friend declarations and
to stop making promises we can't currently keep.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6bd72d4b2c8aef8b667feb91c1144e68f712d6f4 11-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Tweak the semantics of FunctionDecl::isOutOfLine to consider an
instantiation of a member function template or member function of a
class template to be out-of-line if the definition of that function
template or member function was defined out-of-line. This ensures that
we get the correct linkage for explicit instantiations of out-of-line
definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
9f185076dc8b79c8240b20a8746da96beb3f147b 11-Sep-2009 Douglas Gregor <dgregor@apple.com> Tweak the semantics of FunctionDecl::isOutOfLine to consider an
instantiation of a member function template or member function of a
class template to be out-of-line if the definition of that function
template or member function was defined out-of-line. This ensures that
we get the correct linkage for explicit instantiations of out-of-line
definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
f40d6390380632f6cc7964074fe97744c765c256 11-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Cleanup and test C++ default arguments. Improvements include:

- Diagnose attempts to add default arguments to templates (or member
functions of templates) after the initial declaration (DR217).
- Improve diagnostics when a default argument is redefined. Now, the
note will always point at the place where the default argument was
previously defined, rather than pointing to the most recent
declaration of the function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
6cc1518b9f15ca846b8c35518eeae9557935678d 11-Sep-2009 Douglas Gregor <dgregor@apple.com> Cleanup and test C++ default arguments. Improvements include:

- Diagnose attempts to add default arguments to templates (or member
functions of templates) after the initial declaration (DR217).
- Improve diagnostics when a default argument is redefined. Now, the
note will always point at the place where the default argument was
previously defined, rather than pointing to the most recent
declaration of the function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
93c4d4d481fde4024e734e19551d2de0e8555ba0 11-Sep-2009 John McCall <rjmccall@apple.com> Track a class template specialization's point of instantiation separately
from its location. Initialize appropriately.

When implicitly creating a declaration of a class template specialization
after encountering the first reference to it, use the pattern class's
location instead of the location of the first reference.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
9cc7807e1622c2f945b607bdd39dd283df5e7bb5 11-Sep-2009 John McCall <rjmccall@apple.com> Track a class template specialization's point of instantiation separately
from its location. Initialize appropriately.

When implicitly creating a declaration of a class template specialization
after encountering the first reference to it, use the pattern class's
location instead of the location of the first reference.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
541ebfb9469f442190f1d21f093a1279f6ec0a1a 11-Sep-2009 John McCall <rjmccall@apple.com> When stringizing a NamedDecl for a diagnostic, treat the template
specialization types differently.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
136a6988960ac3aeb96f298da7a1a182db7217cd 11-Sep-2009 John McCall <rjmccall@apple.com> When stringizing a NamedDecl for a diagnostic, treat the template
specialization types differently.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
c090f84847510c1cc210010e89ba7b51c453c6f2 11-Sep-2009 John McCall <rjmccall@apple.com> Support elaborated dependent types and diagnose tag mismatches.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c4e7019d5c9034a2d84ee4695f8e98dc025ac131 11-Sep-2009 John McCall <rjmccall@apple.com> Support elaborated dependent types and diagnose tag mismatches.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
59b2cf88fd200aa96f385a0c2834f3e9abd36f2c 11-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Start to add a new transfer function that inlines callee. To be continued.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Frontend/Analyses.def
66847a2826c97b8e09aec304a0a7b4fe1dc35969 11-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Start to add a new transfer function that inlines callee. To be continued.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Frontend/Analyses.def
73cf66ee8e3e654e21345bc1303b60f28d298eac 11-Sep-2009 Anders Carlsson <andersca@mac.com> Instantiate PredefinedExprs correctly. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
773f3973cf5e2b6b8788e895967dcb3c1e6ffe79 11-Sep-2009 Anders Carlsson <andersca@mac.com> Instantiate PredefinedExprs correctly. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3f361b5c731e14d7fa08efd76a93f2f912e66e73 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
f4aa4f61de7d364364dc94bbf83ff71448a11327 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
dfdfcb0e3aa078285da702e458c88387a703afd0 11-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose VLAs as an error in C++.

Also, treat the GNU __null as an integral constant expression to match
GCC's behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
043cad21b78c6b02597cdc7b6ead32388e27ebc7 11-Sep-2009 Douglas Gregor <dgregor@apple.com> Diagnose VLAs as an error in C++.

Also, treat the GNU __null as an integral constant expression to match
GCC's behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
27d83340140f245595bf5542fe478466dbafd152 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.def
cbd1933f83e2332b2d7add10459f80cc4e7eb7bf 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.def
9c73aa02c1e3dc693ae66b223ab2e3105f50007c 10-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Non fragile ABI for GNU runtime. Patch bu David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
d9a1db3a4ded1c8f0daa43c0d6167576e2766453 10-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Non fragile ABI for GNU runtime. Patch bu David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
4ed32e95d2de203884ed4af3d254d252137f20ba 10-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> When performing unqualified name lookup into a DeclContext, also look into
all of the parent DeclContexts that aren't represented within the
Scope chain. This fixes some name-lookup problems in out-of-line
definitions of members of nested classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
e942bbe02b6fb332d1f13d38c6e1980b416cf89a 10-Sep-2009 Douglas Gregor <dgregor@apple.com> When performing unqualified name lookup into a DeclContext, also look into
all of the parent DeclContexts that aren't represented within the
Scope chain. This fixes some name-lookup problems in out-of-line
definitions of members of nested classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
3f37ee9a48a7ab02a95bf21f0ec19004825419ea 10-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make AnalysisManager stateless. Now other analyzer components only depends on
local node information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
b317f8f5ca8737a5bbad97a3f7566a2dbd2ed61b 10-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make AnalysisManager stateless. Now other analyzer components only depends on
local node information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
05b416eb4bcf019f3affa0538ed5d11992e12a0f 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
2ba91575905a54f712a7f64304e56002e4882499 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
972576178833d9a0f4f18acc8aa6837ce065d050 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Recognize and ignore -Woverloaded-virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
659862902cdf115c6ae2bd064e2bf9fea2525b7e 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Recognize and ignore -Woverloaded-virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
55d931bb427b489a614efa3a4fc733b524258047 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix dependencies for DiagnosticGroups.td.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
70ba7e026011b9a94cb3fbe85bccbad74a976c5f 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix dependencies for DiagnosticGroups.td.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
343aad6b139537dc285f667a406ccdf63da7a8d4 10-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Improve handling of initialization by constructor, by ensuring that
such initializations properly convert constructor arguments and fill
in default arguments where necessary. This also makes the ownership
model more clear.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
39da0b8145eaec7da7004f9b3645c5c9f4f63b1d 10-Sep-2009 Douglas Gregor <dgregor@apple.com> Improve handling of initialization by constructor, by ensuring that
such initializations properly convert constructor arguments and fill
in default arguments where necessary. This also makes the ownership
model more clear.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
7b3d2c8ede936b03a654a528aed3b9a93360ba2d 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change Get{File,Program}Path to return an std::string (instead of a sys::Path).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/ToolChain.h
5ed34f4c58b6ad4e21038d713c1fae31a6146ff5 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change Get{File,Program}Path to return an std::string (instead of a sys::Path).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/ToolChain.h
d60f9d826e2cce7fb980b9494ccace4abb0d1ef6 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> StringRefize ArgList construction of ArgStrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
16484afe5ca790d2f9a16650638e54067c037d7d 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> StringRefize ArgList construction of ArgStrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
0c6215978605dfde5ba2c4fdea8fb3c11ec67f81 09-Sep-2009 Anders Carlsson <andersca@mac.com> If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
0aebc81e02397a5987aaa8e8c7acbdb01a31d7c3 09-Sep-2009 Anders Carlsson <andersca@mac.com> If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
1301bf756f8243177a493a3f151571b864a94d5f 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into TranslateArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
0dcb9a3705743ec972af37f48ead81a0939e3958 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into TranslateArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
cc50b82fa5f3547471a0eab4f7b74ae870a30551 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into Compilation::getArgsForToolChain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
4954018954bbc97363eef02d0c83bea19ce9b329 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into Compilation::getArgsForToolChain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
25cf760b54d3b88633827501013bc51a29b28aba 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/ASTDiagnostic.h
lang/AST/Attr.h
lang/AST/CanonicalType.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclContextInternals.h
lang/AST/DeclGroup.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/ExternalASTSource.h
lang/AST/NestedNameSpecifier.h
lang/AST/ParentMap.h
lang/AST/PrettyPrinter.h
lang/AST/RecordLayout.h
lang/AST/Redeclarable.h
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
lang/AST/StmtObjC.h
lang/AST/StmtVisitor.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeOrdering.h
lang/AST/TypeVisitor.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/AnalysisDiagnostic.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRStateTrait.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/GRWorkList.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Support/Optional.h
lang/Analysis/Support/SaveAndRestore.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
lang/Basic/Builtins.h
lang/Basic/ConvertUTF.h
lang/Basic/Diagnostic.h
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/OnDiskHashTable.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.h
lang/CodeGen/ModuleBuilder.h
lang/Driver/Action.h
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/DriverDiagnostic.h
lang/Driver/HostInfo.h
lang/Driver/Job.h
lang/Driver/Option.h
lang/Driver/Options.h
lang/Driver/Tool.h
lang/Frontend/ASTConsumers.h
lang/Frontend/ASTUnit.h
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/CompileOptions.h
lang/Frontend/DocumentXML.h
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendDiagnostic.h
lang/Frontend/ManagerRegistry.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/Utils.h
lang/Index/ASTLocation.h
lang/Index/DeclReferenceMap.h
lang/Index/Entity.h
lang/Index/GlobalSelector.h
lang/Index/Handlers.h
lang/Index/Indexer.h
lang/Index/Program.h
lang/Index/STLExtras.h
lang/Index/SelectorMap.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/LexDiagnostic.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Lex/TokenConcatenation.h
lang/Lex/TokenLexer.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
lang/Parse/ParseDiagnostic.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Rewrite/DeltaTree.h
lang/Rewrite/HTMLRewrite.h
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
lang/Rewrite/TokenRewriter.h
lang/Sema/ExternalSemaSource.h
lang/Sema/ParseAST.h
lang/Sema/SemaConsumer.h
lang/Sema/SemaDiagnostic.h
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/ASTDiagnostic.h
lang/AST/Attr.h
lang/AST/CanonicalType.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclContextInternals.h
lang/AST/DeclGroup.h
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/ExternalASTSource.h
lang/AST/NestedNameSpecifier.h
lang/AST/ParentMap.h
lang/AST/PrettyPrinter.h
lang/AST/RecordLayout.h
lang/AST/Redeclarable.h
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
lang/AST/StmtObjC.h
lang/AST/StmtVisitor.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeLoc.h
lang/AST/TypeOrdering.h
lang/AST/TypeVisitor.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/AnalysisDiagnostic.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRStateTrait.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/GRWorkList.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Support/Optional.h
lang/Analysis/Support/SaveAndRestore.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
lang/Basic/Builtins.h
lang/Basic/ConvertUTF.h
lang/Basic/Diagnostic.h
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/OnDiskHashTable.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.h
lang/CodeGen/ModuleBuilder.h
lang/Driver/Action.h
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/DriverDiagnostic.h
lang/Driver/HostInfo.h
lang/Driver/Job.h
lang/Driver/Option.h
lang/Driver/Options.h
lang/Driver/Tool.h
lang/Frontend/ASTConsumers.h
lang/Frontend/ASTUnit.h
lang/Frontend/CommandLineSourceLoc.h
lang/Frontend/CompileOptions.h
lang/Frontend/DocumentXML.h
lang/Frontend/FixItRewriter.h
lang/Frontend/FrontendDiagnostic.h
lang/Frontend/ManagerRegistry.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Frontend/Utils.h
lang/Index/ASTLocation.h
lang/Index/DeclReferenceMap.h
lang/Index/Entity.h
lang/Index/GlobalSelector.h
lang/Index/Handlers.h
lang/Index/Indexer.h
lang/Index/Program.h
lang/Index/STLExtras.h
lang/Index/SelectorMap.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/LexDiagnostic.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Lex/TokenConcatenation.h
lang/Lex/TokenLexer.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
lang/Parse/ParseDiagnostic.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Rewrite/DeltaTree.h
lang/Rewrite/HTMLRewrite.h
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
lang/Rewrite/TokenRewriter.h
lang/Sema/ExternalSemaSource.h
lang/Sema/ParseAST.h
lang/Sema/SemaConsumer.h
lang/Sema/SemaDiagnostic.h
6dbc2003c38702cfdcdee292224d9c422a5601fe 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tab characters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/ConvertUTF.h
lang/Driver/HostInfo.h
lang/Lex/PreprocessorLexer.h
lang/Parse/Ownership.h
79d39f92590cf2e91bf81486b02cd1156d13ca54 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tab characters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/ConvertUTF.h
lang/Driver/HostInfo.h
lang/Lex/PreprocessorLexer.h
lang/Parse/Ownership.h
cc00fc02fb26921c2f1f99632ea1d96aa5d4d183 09-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Initial stab at implement dependent member references to member
templates, e.g.,

x.template get<T>

We can now parse these, represent them within an UnresolvedMemberExpr
expression, then instantiate that expression node in simple cases.

This allows us to stumble through parsing LLVM's Casting.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/TemplateName.h
3b6afbb99a1c44b4076f8e15fb7311405941b306 09-Sep-2009 Douglas Gregor <dgregor@apple.com> Initial stab at implement dependent member references to member
templates, e.g.,

x.template get<T>

We can now parse these, represent them within an UnresolvedMemberExpr
expression, then instantiate that expression node in simple cases.

This allows us to stumble through parsing LLVM's Casting.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/TemplateName.h
f985dabfc82c71996bdb97015fd7df817fe59182 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Validate arguments to -arch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
36df2904354ac150500ec16238a1ec3cce4ba83e 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Validate arguments to -arch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
31a70e9cf8a025ebe368b23f08ebfdc85fa9749a 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreate
the default tool chain when binding the default architecture.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
d7502d0a662b5c299125aba04245aefce67cbc22 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreate
the default tool chain when binding the default architecture.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
a28b9d49dc8fa8247da173a83cf9d2d5d28add04 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix ShouldUseClangCompiler to use llvm::Triple.
- -1 FIXME, and fixes 'clang -arch armv4t ...', for example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
a6046bec7fc835186dde134fb81aa1b7d45cd9f0 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix ShouldUseClangCompiler to use llvm::Triple.
- -1 FIXME, and fixes 'clang -arch armv4t ...', for example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
6fb019f2873c3391d140d2ad99c60528568d4ad9 08-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure to access APValue's data via a char array (rather than
through an array of void*), so that we don't run afoul of the
strict-aliasing rules in C++ 3.10p15. Unfortunately, GCC 4.4 still
complains about this code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
983004686a1bfc816f7aeb47bac7e16049550278 08-Sep-2009 Douglas Gregor <dgregor@apple.com> Make sure to access APValue's data via a char array (rather than
through an array of void*), so that we don't run afoul of the
strict-aliasing rules in C++ 3.10p15. Unfortunately, GCC 4.4 still
complains about this code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
4bb774e2352b6c5f459b345a5e0f41bd244e70a7 08-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression in generating objc's GC API
in assiging to c pointer types with a GC'able
attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ac423ba85bb59cc7cc1d43081b20d7e8d40355ff 08-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression in generating objc's GC API
in assiging to c pointer types with a GC'able
attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2c087d5956b1921cdb4015a493453526aa06c487 08-Sep-2009 Anders Carlsson <andersca@mac.com> Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
3a082d81006e7a2e01a6e431a22e21c78490ff8f 08-Sep-2009 Anders Carlsson <andersca@mac.com> Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
d321d4999177cb0267a54a2b1903411ba6996ceb 08-Sep-2009 John McCall <rjmccall@apple.com> Support templateids in friend declarations. Fixes bug 4859.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6b2becfc434b0bdced8560802c4d0e03148c61b8 08-Sep-2009 John McCall <rjmccall@apple.com> Support templateids in friend declarations. Fixes bug 4859.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e4f848ca6fadd15fd47fe10dee94766a8094188c 08-Sep-2009 Anders Carlsson <andersca@mac.com> Handle variadic constructors better. Share code between BuildCXXConstructExpr and BuildCXXTemporaryObjectExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d74d4149f759b8abec15fb8163a4206e8c7068c8 08-Sep-2009 Anders Carlsson <andersca@mac.com> Handle variadic constructors better. Share code between BuildCXXConstructExpr and BuildCXXTemporaryObjectExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d42b0d9c2c541eb8fc8bc75a47408cd4be0efabd 08-Sep-2009 Anders Carlsson <andersca@mac.com> Clean up the CXXConstructExpr constructor, add Arg getters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
bcb11d01c034f967503bd98f28bdf458c1ab8001 08-Sep-2009 Anders Carlsson <andersca@mac.com> Clean up the CXXConstructExpr constructor, add Arg getters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d23693c609ddebadca0cbbf3d9ec489c0678786c 07-Sep-2009 Anders Carlsson <andersca@mac.com> Check that the destination type of a static_cast expression is a complete type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d851b37a331a7bc0047922ea9244aff85470987e 07-Sep-2009 Anders Carlsson <andersca@mac.com> Check that the destination type of a static_cast expression is a complete type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6ba693c29fa2d99ba4b6a8f24f785fadfa825c25 05-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Replace some instances of std::string with StringRefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/InitHeaderSearch.h
458fb10ef5ba2d7b375c6c64095c1458af0a5be3 05-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Replace some instances of std::string with StringRefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/InitHeaderSearch.h
fbec6a92f5bf5cbae1ea922f8ec04d6a6d18682f 05-Sep-2009 John McCall <rjmccall@apple.com> Start emitting ElaboratedTypes in C++ mode. Support the effort in various
ways: remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
2191b20bfb31fc0e22a158f6b4204cd0b7dbd0fd 05-Sep-2009 John McCall <rjmccall@apple.com> Start emitting ElaboratedTypes in C++ mode. Support the effort in various
ways: remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
21d18f2893c38398e147708d48ceb5d4c9c1290f 05-Sep-2009 Anders Carlsson <andersca@mac.com> Use a separate diagnostic for default function argument expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
25cae7f4b1155b1a6ca959ea5143ea39eae656cd 05-Sep-2009 Anders Carlsson <andersca@mac.com> Use a separate diagnostic for default function argument expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
07d2c655103d927962071c5e3e2b0eaa5f527baa 05-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor builtin function evaluation code into its own function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
248072a8b9cd956c4ac63172fc2af09790f7c6a9 05-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor builtin function evaluation code into its own function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
49743ab9531cef4ee3b205bf99c8d7433b450513 05-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add missing include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
0c5920c3159e6a8c83a871f26f7d7ea621c29860 05-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add missing include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
379448fc7bc91bba33e3d2df073f6cf011960b96 05-Sep-2009 John McCall <rjmccall@apple.com> Basic support for representing elaborated type specifiers
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.

This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.

Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
7da2431c23ef1ee8acb114e39692246e1801afc2 05-Sep-2009 John McCall <rjmccall@apple.com> Basic support for representing elaborated type specifiers
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.

This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.

Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
8e7e4609012900d1a0eafafb49b5089acddf5b7a 05-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
d0e3daf2b980b505e535d35b432c938c6d0208ef 05-Sep-2009 Douglas Gregor <dgregor@apple.com> Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
0670594f65a1718aa383721718bc6b6d89025a1e 04-Sep-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
f79079565e15e6a328372076ac5583af16c8dbce 04-Sep-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
bc56aa3e51bac38cea6c6dbb2406ea5c094c41c2 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tweak darwin::Link::AddLinkArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d82f8fa53771b454885c546f0fd452a4980b3a3e 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tweak darwin::Link::AddLinkArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
455bf703e26c1bb65057e65c27fb697ce6d72507 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement darwin::Link::AddDarwinArch for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
78dbd580a02759bbc408dbefb6754afa71b2c24c 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement darwin::Link::AddDarwinArch for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
e89a0af97237fb82f3c709e2e8e6264bd38c2d7b 04-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> If a destructor is referenced or a pseudo-destructor expression is
formed without a trailing '(', diagnose the error (these expressions
must be immediately called), emit a fix-it hint, and fix the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
a78c5c34fbd20fde02261c3f3e21933cd58fcc04 04-Sep-2009 Douglas Gregor <dgregor@apple.com> If a destructor is referenced or a pseudo-destructor expression is
formed without a trailing '(', diagnose the error (these expressions
must be immediately called), emit a fix-it hint, and fix the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
3e36851cc872a3e8461234e69642852d46b545ce 04-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

p->~T()

when p is a pointer to a scalar type.

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
a71d819bb8f50c28938db0f2867d3fb6e2ce5910 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

p->~T()

when p is a pointer to a scalar type.

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
e39087aff486958d7736015153344e13c8ebf7ad 04-Sep-2009 Steve Naroff <snaroff@apple.com> Implement accessors clang_getCursorKind(), clang_getCursorDecl().
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
9efa767be8e9f2dae509d3a0be93ade01bfa1560 04-Sep-2009 Steve Naroff <snaroff@apple.com> Implement accessors clang_getCursorKind(), clang_getCursorDecl().
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
7a3747265a26b68d1b9f2b55d11ef38b262e50eb 04-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Parse extern templates, pass that information all the way to Sema,
then drop it on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
45f965581935791a018df829a14dff53c1dd8f47 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Parse extern templates, pass that information all the way to Sema,
then drop it on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
122f940d749ab8a0f78b97b0f9252b41fb1248cd 04-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Actually initialize HasQualifier and HasExplicitTemplateArgumentList in the EmptyShell constructor for MemberExpr. Should clear up some valgrind failures in PCH reading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e6585a7d71510be00a625686153f48d496d3bbf1 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Actually initialize HasQualifier and HasExplicitTemplateArgumentList in the EmptyShell constructor for MemberExpr. Should clear up some valgrind failures in PCH reading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fd02518096d78c6d4ccf1156e64cd4dd34221444 04-Sep-2009 John McCall <rjmccall@apple.com> Correctly handle elaborated template ids. Still not handled properly for friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
f1bbbb49f06a7462476cd88166fccda5feb15cab 04-Sep-2009 John McCall <rjmccall@apple.com> Correctly handle elaborated template ids. Still not handled properly for friends.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
d4b30098043a0f4273818c5a6cec4b7ca629d22b 04-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to instantiate destructors used to destruct
base and data members when they are needed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
34374e6ce5710a91c478f69379220ff20c3e7f15 04-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to instantiate destructors used to destruct
base and data members when they are needed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
bc2fb7fd319e8beaf899395ffa5b44ea833a648e 03-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Improve template instantiation for member access expressions that
involve qualified names, e.g., x->Base::f. We now maintain enough
information in the AST to compare the results of the name lookup of
"Base" in the scope of the postfix-expression (determined at template
definition time) and in the type of the object expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
c68afe2cbe7f875a9243c411077602fb5f5dc74b 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Improve template instantiation for member access expressions that
involve qualified names, e.g., x->Base::f. We now maintain enough
information in the AST to compare the results of the name lookup of
"Base" in the scope of the postfix-expression (determined at template
definition time) and in the type of the object expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f988e2228fd3d7a78ee4ad03be58bb919e7c918e 03-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue diagnostics in variety of situations involving
reference/const data members when user has declared
the constructor. This necessitated some non-minor
refactoring.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
80545ad0f9b8e52177a8c37bd140bae0ffbd0cc6 03-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Issue diagnostics in variety of situations involving
reference/const data members when user has declared
the constructor. This necessitated some non-minor
refactoring.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
5bfadbe7135ab3b9c796c142b986337941f51426 03-Sep-2009 Steve Naroff <snaroff@apple.com> Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
77accc11f04ed4ff9afd4e27d430144d4714be56 03-Sep-2009 Steve Naroff <snaroff@apple.com> Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
0f927cf843bfe5a54ad059ab17d0beeffeec2275 03-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Improved handling for dependent, qualified member access expressions, e.g.,

t->Base::f

where t has a dependent type. We save the nested-name-specifier in the
CXXUnresolvedMemberExpr then, during instantiation, substitute into
the nested-name-specifier with the (transformed) object type of t, so
that we get name lookup into the type of the object expression.

Note that we do not yet retain information about name lookup into the
lexical scope of the member access expression, so several regression
tests are still disabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a38c687ef5354678b9d76a7b29354159f2b83736 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Improved handling for dependent, qualified member access expressions, e.g.,

t->Base::f

where t has a dependent type. We save the nested-name-specifier in the
CXXUnresolvedMemberExpr then, during instantiation, substitute into
the nested-name-specifier with the (transformed) object type of t, so
that we get name lookup into the type of the object expression.

Note that we do not yet retain information about name lookup into the
lexical scope of the member access expression, so several regression
tests are still disabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
5a1c5b36b953d7e463dbed5bdf3bdbea786ac782 03-Sep-2009 Steve Naroff <snaroff@apple.com> - Add back some harmless code that part of a reverted commit (r80859). I'll investigate the lifetime snafu (with ASTUnit) separately.
- Traverse category methods, add a "class ref" and make the little test harness a bit more flexible.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80921 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
af08ddc8f1c53fed8d8d0ad82aa2a0bb7d654bd1 03-Sep-2009 Steve Naroff <snaroff@apple.com> - Add back some harmless code that part of a reverted commit (r80859). I'll investigate the lifetime snafu (with ASTUnit) separately.
- Traverse category methods, add a "class ref" and make the little test harness a bit more flexible.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80921 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
172cb43b46e0deccbe4113bf65e278ce76ab5b18 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Revert "Visit function/method bodies and issue callback for parameters and local
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80896 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
bce6f62ae7d2c15992617f64e30067803fb5b47f 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Revert "Visit function/method bodies and issue callback for parameters and local
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80896 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
62a7cbc34a427d95d86fb35c69ac073c252465a9 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add basic support for -pthread.
- Patch by David Chisnall, with PCH and Darwin support mixed in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
5345c391c65d1780a0d7b0102b7f735cc3f82732 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add basic support for -pthread.
- Patch by David Chisnall, with PCH and Darwin support mixed in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
4e38d7077289117a0b072492423abf7cf2625964 03-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix 80 column violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
e1ccccff777f6bad6b25e9c6a762f98fd8003181 03-Sep-2009 Ted Kremenek <kremenek@apple.com> Fix 80 column violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
4584765b41dc942a8e37a562411c473e585dd44c 03-Sep-2009 Anders Carlsson <andersca@mac.com> Add CastExpr::getCastKindName and use it in the StmtDumper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f8ec55a104e55961f8666f773dce99bbc628298f 03-Sep-2009 Anders Carlsson <andersca@mac.com> Add CastExpr::getCastKindName and use it in the StmtDumper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
81699d95c5924301824c3ff5ebff984c17063726 03-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> This patch does the following.
1) Issue digsnostics in non-fragile ABI, when an expression
evaluates to an interface type (except when it is used to
access a non-fragile ivar).
2) Issue unsupported error in fragile ABI when an expression
evaluates to an interface type (except when it is used to
access a fragile ivar).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
16b10378a93e8644008289fd86c1caf737d1395c 03-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> This patch does the following.
1) Issue digsnostics in non-fragile ABI, when an expression
evaluates to an interface type (except when it is used to
access a non-fragile ivar).
2) Issue unsupported error in fragile ABI when an expression
evaluates to an interface type (except when it is used to
access a fragile ivar).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6b0576bf7b3751de35b77061fcd18bf3cb402d2f 03-Sep-2009 Steve Naroff <snaroff@apple.com> Visit function/method bodies and issue callback for parameters and local variables.
Add clang_getTranslationUnitSpelling().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80859 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
23d8bea7056e7f474ce7f42042021a148feee8f7 03-Sep-2009 Steve Naroff <snaroff@apple.com> Visit function/method bodies and issue callback for parameters and local variables.
Add clang_getTranslationUnitSpelling().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80859 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Frontend/ASTUnit.h
ad979bd99b8a3afa145e78d66bd8eac8d249a9c5 03-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Add a wicked little test-case that illustrates what we have to deal
with to properly support member access expressions in templates. This
test is XFAIL'd, because we get it completely wrong, but I've made the
minimal changes to the representation to at least avoid a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
2700dcde044893642b9b77638e052aa90be7cd51 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Add a wicked little test-case that illustrates what we have to deal
with to properly support member access expressions in templates. This
test is XFAIL'd, because we get it completely wrong, but I've made the
minimal changes to the representation to at least avoid a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
681d31d4185cfa8a5378440dee12fc1535e3de99 03-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Rewrite of our handling of name lookup in C++ member access expressions, e.g.,

x->Base::f

We no longer try to "enter" the context of the type that "x" points
to. Instead, we drag that object type through the parser and pass it
into the Sema routines that need to know how to perform lookup within
member access expressions.

We now implement most of the crazy name lookup rules in C++
[basic.lookup.classref] for non-templated code, including performing
lookup both in the context of the type referred to by the member
access and in the scope of the member access itself and then detecting
ambiguities when the two lookups collide (p1 and p4; p3 and p7 are
still TODO). This change also corrects our handling of name lookup
within template arguments of template-ids inside the
nested-name-specifier (p6; we used to look into the scope of the
object expression for them) and fixes PR4703.

I have disabled some tests that involve member access expressions
where the object expression has dependent type, because we don't yet
have the ability to describe dependent nested-name-specifiers starting
with an identifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
2dd078ae50ff7be1fb25ebeedde45e9ab691a4f0 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Rewrite of our handling of name lookup in C++ member access expressions, e.g.,

x->Base::f

We no longer try to "enter" the context of the type that "x" points
to. Instead, we drag that object type through the parser and pass it
into the Sema routines that need to know how to perform lookup within
member access expressions.

We now implement most of the crazy name lookup rules in C++
[basic.lookup.classref] for non-templated code, including performing
lookup both in the context of the type referred to by the member
access and in the scope of the member access itself and then detecting
ambiguities when the two lookups collide (p1 and p4; p3 and p7 are
still TODO). This change also corrects our handling of name lookup
within template arguments of template-ids inside the
nested-name-specifier (p6; we used to look into the scope of the
object expression for them) and fixes PR4703.

I have disabled some tests that involve member access expressions
where the object expression has dependent type, because we don't yet
have the ability to describe dependent nested-name-specifiers starting
with an identifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
e7228108544bf81c0a5fd9979f55911414dd0318 02-Sep-2009 Anders Carlsson <andersca@mac.com> Fix a crash when referencing static data members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a0d4b63d15138ca00e12df3c0573954b07ea40a8 02-Sep-2009 Anders Carlsson <andersca@mac.com> Fix a crash when referencing static data members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a82c7d0ed6f39771dfbf973bdb2ecf6572b67712 02-Sep-2009 Steve Naroff <snaroff@apple.com> Start issuing callback for references (add some predicates, refactor some code).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80810 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f334b4e3eda5a39f041fe13f805dbb53535daa2f 02-Sep-2009 Steve Naroff <snaroff@apple.com> Start issuing callback for references (add some predicates, refactor some code).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80810 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
51366e92ee6efeec93cad01050ac194b1bfa46f5 02-Sep-2009 Steve Naroff <snaroff@apple.com> Flesh out CXCursorKind...

- More declaration types (distinguish between struct/union/class, instance/class methods).
- Add definition types (class, category, function, instance/class method, etc.).

Add client data to clang_loadDeclaration() and implement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80787 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c857ea4d22e1e6dd9ede1f0e84d48b157c6924fd 02-Sep-2009 Steve Naroff <snaroff@apple.com> Flesh out CXCursorKind...

- More declaration types (distinguish between struct/union/class, instance/class methods).
- Add definition types (class, category, function, instance/class method, etc.).

Add client data to clang_loadDeclaration() and implement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80787 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
e49d8f0656f05e4494cf4aedd58da46e242513de 02-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor the check for bad divide into a checker.

Also fix a checker context bug: the Dst set is not always empty initially.
Because in GRExprEngine::CheckerVisit(), *CurrSet is used repeatedly.
So we removed the Dst.empty() condition in ~CheckerContext() when deciding
whether to do autotransision.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
6403b57eda05a22273d920ad0bd2991d11eaa7b8 02-Sep-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor the check for bad divide into a checker.

Also fix a checker context bug: the Dst set is not always empty initially.
Because in GRExprEngine::CheckerVisit(), *CurrSet is used repeatedly.
So we removed the Dst.empty() condition in ~CheckerContext() when deciding
whether to do autotransision.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
53ec7aa095aa4c79e4dde7011b44d96804526875 02-Sep-2009 Ted Kremenek <kremenek@apple.com> Replace uses of ImmutableSet in SymbolReaper with DenseSet. This was
motivated from Shark profiles that shows that 'markLive' was very
heavy when using --analyzer-store=region. On my benchmark file, this
reduces the analysis time for --analyzer-store=region from 19.5s to
13.5s and for --analyzer-store=basic from 5.3s to 3.5s. For the
benchmark file, this is a reduction of about 30% analysis time for
both analysis modes (a huge win).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
a97d54c165ca6b6e57b9f333059a84c2188dd591 02-Sep-2009 Ted Kremenek <kremenek@apple.com> Replace uses of ImmutableSet in SymbolReaper with DenseSet. This was
motivated from Shark profiles that shows that 'markLive' was very
heavy when using --analyzer-store=region. On my benchmark file, this
reduces the analysis time for --analyzer-store=region from 19.5s to
13.5s and for --analyzer-store=basic from 5.3s to 3.5s. For the
benchmark file, this is a reduction of about 30% analysis time for
both analysis modes (a huge win).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
b98cc63ed75cc49f8b8853564779d81eaebea093 02-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> It is illegal to derefrercne to an interface in
objc's non-fragile ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ce8827a4941fb966e3f6c32fbe97a7bbb7da5840 02-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> It is illegal to derefrercne to an interface in
objc's non-fragile ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
80f0075a200e7c7cec5a986723955a4285dcd82b 01-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> In CXXBaseOrMemberInitializer, don't confuse CtorTocall with
AnonUnionMember. Fixes PR4826.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
72f6d678c8de9f3a770e8ae5fc4979abf3940668 01-Sep-2009 Douglas Gregor <dgregor@apple.com> In CXXBaseOrMemberInitializer, don't confuse CtorTocall with
AnonUnionMember. Fixes PR4826.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b6feaf3f96a6f93e4afcc103a058f63c78f105b3 01-Sep-2009 Anders Carlsson <andersca@mac.com> Add a CK_FunctionToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b633c4ee622df81d4572ef57dac54ebed69bb9bf 01-Sep-2009 Anders Carlsson <andersca@mac.com> Add a CK_FunctionToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f02d2aefb7a9b3d186de72b0109ea00f74bd459d 01-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
61481dad22ebca3fba3fe4fb67a3b926d0895e9c 01-Sep-2009 Douglas Gregor <dgregor@apple.com> Add DeclContext::Equals to compare declaration contexts based on their primary context. Use this instead of pointer comparisons

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
291065da7b3b53c650381c21228fba135de25363 01-Sep-2009 Steve Naroff <snaroff@apple.com> Tweak comment based on Daniel's recently added '-emit-ast' option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80684 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
b7cd17cfd2970636af0fe9b491bab1acf0009c2f 01-Sep-2009 Steve Naroff <snaroff@apple.com> Tweak comment based on Daniel's recently added '-emit-ast' option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80684 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f750e26620957224ea107e426abc135bf97246f3 01-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> "The attached patch moves AttributeList::addAttributeList outside the
class so as to accomodate one or both parameters being NULL, " from Sean Hunt!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
ac25503714ba1a384d4f1cae05b84bc785eb5fad 01-Sep-2009 Douglas Gregor <dgregor@apple.com> "The attached patch moves AttributeList::addAttributeList outside the
class so as to accomodate one or both parameters being NULL, " from Sean Hunt!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
ec4380002e5ed2527ae3f21c7841a4391f6319e3 01-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add driver support for -emit-ast and AST compilation steps.
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.def
lang/Driver/Types.def
5915fbf310e171c4cd3c2af05e9de360c0fa988a 01-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add driver support for -emit-ast and AST compilation steps.
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.def
lang/Driver/Types.def
6e862e28ca9115c404fd0542e8727a476366c849 01-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Tip-toe around strict-aliasing violation. Fixes PR4061.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
35f153f8ff4fd6a9b39c077026c3e5cc2c721a82 01-Sep-2009 Douglas Gregor <dgregor@apple.com> Tip-toe around strict-aliasing violation. Fixes PR4061.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b836cb78d36f4aad6eb58317700558ac848efdb4 01-Sep-2009 Steve Naroff <snaroff@apple.com> Add explicit "blind" client data to callback function (since we aren't using blocks).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80673 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2b8ee6c2994f738e5162ff46b638974870f51662 01-Sep-2009 Steve Naroff <snaroff@apple.com> Add explicit "blind" client data to callback function (since we aren't using blocks).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80673 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
20c55141395e22b6002b42ef30fcf4238402e48c 01-Sep-2009 Anders Carlsson <andersca@mac.com> Don't assert when instantiating member references to fields in anonymous structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d8b285fee4471f393da8ee30f552ceacdc362afa 01-Sep-2009 Anders Carlsson <andersca@mac.com> Don't assert when instantiating member references to fields in anonymous structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d33e328e84080d75879182f882b578ffa7db52ab 01-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Preliminary AST representation and semantic analysis for
explicitly-specified template argument lists in member reference
expressions, e.g.,

x->f<int>()



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c4bf26fbdff42967d660f505a83f75a4df2cc752 01-Sep-2009 Douglas Gregor <dgregor@apple.com> Preliminary AST representation and semantic analysis for
explicitly-specified template argument lists in member reference
expressions, e.g.,

x->f<int>()



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c1991bf37685134f7a139f22883a6c7448aa0f62 01-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
83f6faf37d9bf58986bedc9bc0ea897a56b4dbad 01-Sep-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
ea7c7ce3586b1a1774fe41c53267bc7c5dfad6bf 01-Sep-2009 John McCall <rjmccall@apple.com> Fix bug 4784 and allow friend declarations to properly extend
existing declaration chains.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ab88d97734f1260402a0c6a8f6b77bed7ed4e295 01-Sep-2009 John McCall <rjmccall@apple.com> Fix bug 4784 and allow friend declarations to properly extend
existing declaration chains.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
efccbec93fa2bc73800857b0208b583cb3d68d78 31-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
also be adding explicit template arguments as an additional
"adornment". No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
0979c805475d1ba49b5d6ef93c4d2ce6d2eab6ed 31-Aug-2009 Douglas Gregor <dgregor@apple.com> Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
also be adding explicit template arguments as an additional
"adornment". No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
cfa0a63ebe696ba691ffad4963c6945d3d13fa84 31-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Add parsing for references to member function templates with explicit
template argument lists, e.g., x.f<int>().

Semantic analysis will be a separate commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f328a2857d6dc397ec7a304b07d40893891f7f98 31-Aug-2009 Douglas Gregor <dgregor@apple.com> Add parsing for references to member function templates with explicit
template argument lists, e.g., x.f<int>().

Semantic analysis will be a separate commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9841cdf19fd7601b35e1a42c679d87b6cfdbd7f6 31-Aug-2009 Eli Friedman <eli.friedman@gmail.com> PR4836, part 1: add Sema support for __builtin_isnan and friends; they
are apparently used by Solaris libc despite the fact that clang claims
to be compatible with gcc 4.2, which doesn't support them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
9ac6f62a77be5b281a7ddc24a16669b457ac47c2 31-Aug-2009 Eli Friedman <eli.friedman@gmail.com> PR4836, part 1: add Sema support for __builtin_isnan and friends; they
are apparently used by Solaris libc despite the fact that clang claims
to be compatible with gcc 4.2, which doesn't support them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
04b3aa87d282f222719838ccb7b236cc960b6c0c 31-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Support explicit C++ member operator syntax, from James Porter!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a6f0f9d589a06737707fe914e06bd6d4bfae0997 31-Aug-2009 Douglas Gregor <dgregor@apple.com> Support explicit C++ member operator syntax, from James Porter!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
cd118e609b2bd1abedf9a99b543770a425597e20 31-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
8a5a9aaddb627c0884c2ed8db55cc29fdb601195 31-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
52833ba0187db1caa1d030d20680eca913c0822f 31-Aug-2009 Steve Naroff <snaroff@apple.com> Implement source/line/column hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80585 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
2d4d629d8a0de5112c7ae9d05c03ddbf6dcd956a 31-Aug-2009 Steve Naroff <snaroff@apple.com> Implement source/line/column hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80585 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c674c2de209ed3f91bdf136b8bb1529c6cb2caa9 31-Aug-2009 Steve Naroff <snaroff@apple.com> More fleshing out the C-based indexing API (under construction).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80529 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
89922f86f4e7da383af2a62ef04ad8b93b941220 31-Aug-2009 Steve Naroff <snaroff@apple.com> More fleshing out the C-based indexing API (under construction).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80529 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
f1cb83539bb1ec38bae49a189e107b298e360df8 30-Aug-2009 Anders Carlsson <andersca@mac.com> Improve missing error messages as suggested by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
639bfc7b1e55e01dd38d2ef399366b5efa55a9a7 30-Aug-2009 Anders Carlsson <andersca@mac.com> Improve missing error messages as suggested by Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4355a39424035ba0bcdfa3f89bda6eff5ec6de3b 30-Aug-2009 Anders Carlsson <andersca@mac.com> Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f4d84b663ef7dda959cbe45561d90e59760cbb74 30-Aug-2009 Anders Carlsson <andersca@mac.com> Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e6c7b0611256a2e2dbaad79d1f587b18186d41e5 30-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Fix TypeLoc::operator bool().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
19a97e27a545959ee9b395a96140661148a6b5b0 30-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix TypeLoc::operator bool().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeLoc.h
e16b4fe4afe3b13b013d2b0a092c80932fddddee 29-Aug-2009 Anders Carlsson <andersca@mac.com> Set the access specifier for using decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
595adc1795cc2c079ef5876100e01acd10a0504a 29-Aug-2009 Anders Carlsson <andersca@mac.com> Set the access specifier for using decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
8197c48a5bedf9418f8616ee4b6ed98e4bfd2ed3 29-Aug-2009 Anders Carlsson <andersca@mac.com> Improve instantiation of UnresolvedUsingDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0d8df780aef1acda5962347a32591efc629b6748 29-Aug-2009 Anders Carlsson <andersca@mac.com> Improve instantiation of UnresolvedUsingDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
99aa43241a83ae52eaaeaa9ff64afcdca1f89d8e 29-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of mostly-unused, buggy method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d933a0198f3ccce9c73bf2951625315b911d37bf 29-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of mostly-unused, buggy method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a903eb4de66320b25f766fdf6bdd505283a8fd1d 29-Aug-2009 John McCall <rjmccall@apple.com> Fix the breakage by handling indirect instantiations. This would be much
improved if there were a consistent name for getInstantiatedFromMemberX()
across all classes. Cheap refactor if someone wants to do it, but let's get the
buildbots happy first.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
52a575a5ce7b27b6612357cdba5aa4ec1574ad5e 29-Aug-2009 John McCall <rjmccall@apple.com> Fix the breakage by handling indirect instantiations. This would be much
improved if there were a consistent name for getInstantiatedFromMemberX()
across all classes. Cheap refactor if someone wants to do it, but let's get the
buildbots happy first.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
6d68ad4556299aea1408c20fffc9c3e9444313a7 29-Aug-2009 Anders Carlsson <andersca@mac.com> Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8c57a66a2aa59939a902ffa8c4ad0ddd5b949a21 29-Aug-2009 Anders Carlsson <andersca@mac.com> Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
cc6b85d68cdcb334790e64fb1cfc0b016e759b3a 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> path to ir-gen 12.3.1 Conversion by constructor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7fe5d72fbc8605b60d42d32394248ea76cf763a0 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> path to ir-gen 12.3.1 Conversion by constructor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
948945747bcd09eabe2504c1798d41edcefdf92b 28-Aug-2009 Anders Carlsson <andersca@mac.com> Fix this for real.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
faccd72e2448b552f17992eaba6cfe12ec497e58 28-Aug-2009 Anders Carlsson <andersca@mac.com> Fix this for real.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3ba83e97b3b528b83e2ee293e275be1a03b5ee6d 28-Aug-2009 Steve Naroff <snaroff@apple.com> Lot's of little changes to get the C-based indexing API going...

Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80367 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Index/Indexer.h
50398199fb10e196a8d92fbf7a062dbe42ed88fd 28-Aug-2009 Steve Naroff <snaroff@apple.com> Lot's of little changes to get the C-based indexing API going...

Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80367 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
lang/Index/Indexer.h
6145173144dc3a03dcfcc021df08cbcd76af91c4 28-Aug-2009 Anders Carlsson <andersca@mac.com> Instantiate unresolved using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0dde18e5a713bc186062ca1ebc9967500b07faee 28-Aug-2009 Anders Carlsson <andersca@mac.com> Instantiate unresolved using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
00eb51c1642a122e65c3902118e7a56d2112a0a1 28-Aug-2009 Steve Naroff <snaroff@apple.com> Add CX prefix to Cursor and move a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80359 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7e8f8189d0876e03ebc5018f6a22e41f5aaa20d9 28-Aug-2009 Steve Naroff <snaroff@apple.com> Add CX prefix to Cursor and move a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80359 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
7de15913bed5143cebaf1ea32eba3d26a9e4ae83 28-Aug-2009 John McCall <rjmccall@apple.com> Omnibus friend decl refactoring. Instead of cloning AST classes for friend
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.

Refactor the Sema methods specific to friends for cleaner flow and less nesting.

Incidentally solve a few bugs, but I remain confident that we can put them back.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
02cace78cf48cc26686bd5b07c78606abca13bcd 28-Aug-2009 John McCall <rjmccall@apple.com> Omnibus friend decl refactoring. Instead of cloning AST classes for friend
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not. Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.

Refactor the Sema methods specific to friends for cleaner flow and less nesting.

Incidentally solve a few bugs, but I remain confident that we can put them back.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
50bc7088e5d8534dfac0fbb91bb267c6da8f3071 28-Aug-2009 Anders Carlsson <andersca@mac.com> Create UnresolvedUsingDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
550b14b410eaed037c9b791806194e6cea1ebe90 28-Aug-2009 Anders Carlsson <andersca@mac.com> Create UnresolvedUsingDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4e75006e36f088f43ebd712025b1742871e6d0ed 28-Aug-2009 Anders Carlsson <andersca@mac.com> Check in UnresolvedUsingDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
665b49c62d637d16826036118f92d35f116f3ef3 28-Aug-2009 Anders Carlsson <andersca@mac.com> Check in UnresolvedUsingDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
f772e8b18cf221bcc36474a4dd8ab7005a5ebb8f 28-Aug-2009 Ted Kremenek <kremenek@apple.com> Use SymbolicRegion instead of CodeTextRegion for symbolic function
pointers. Most logic cares first about whether or not a region is
symbolic, and second if represents code. This should fix a series of
silent corner case bugs (as well as simplify a bunch of code).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
abd46e13cfd48f2c9bf26d9759edb4366aaa6d5b 28-Aug-2009 Ted Kremenek <kremenek@apple.com> Use SymbolicRegion instead of CodeTextRegion for symbolic function
pointers. Most logic cares first about whether or not a region is
symbolic, and second if represents code. This should fix a series of
silent corner case bugs (as well as simplify a bunch of code).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
66b082afa97af35fa317529ec3c4f9be73380889 28-Aug-2009 Anders Carlsson <andersca@mac.com> More work on using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
73b39cf02eaa346c6d7a76c32bf13759de7516db 28-Aug-2009 Anders Carlsson <andersca@mac.com> More work on using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
b49f1bd5691c6e04b84f6aa365853bf49688c82e 28-Aug-2009 Anders Carlsson <andersca@mac.com> Many improvements to using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cf9f921268e67703d9cddcf9f2d6ac057c4c3cc8 28-Aug-2009 Anders Carlsson <andersca@mac.com> Many improvements to using declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a133e244a156b76bd06b98a66210e9868601c994 28-Aug-2009 Chris Lattner <sabre@nondot.org> Accept and ignore a few more -Wflags.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
dd46adef4e839686bf9f22c2f861d1f29c9095d4 28-Aug-2009 Chris Lattner <sabre@nondot.org> Accept and ignore a few more -Wflags.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
2993eddf5716775128f10b731a0627daab97bacc 28-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> When looking for overloaded member operators, make sure to instantiate
class template specializations (when possible) and look into base
classes. Thanks to Eli for the test case!

FIXME -=1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8a5ae2401645788144c0ae769a2fb899866801f5 28-Aug-2009 Douglas Gregor <dgregor@apple.com> When looking for overloaded member operators, make sure to instantiate
class template specializations (when possible) and look into base
classes. Thanks to Eli for the test case!

FIXME -=1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
a7b9c669ba16390d7aed1b279cd2155eebf4005b 28-Aug-2009 Ted Kremenek <kremenek@apple.com> Rename 'bindExpr' to 'BindExpr'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
8e0293406f9d62a293be6be3b1fb89d359f5ea40 28-Aug-2009 Ted Kremenek <kremenek@apple.com> Rename 'bindExpr' to 'BindExpr'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
ab5bb918631236a7130112be9c245721712fd313 28-Aug-2009 Ted Kremenek <kremenek@apple.com> Move the AnalysisContext* from GRState to Environment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
6d2c657b528d9ac1bacd382281f0bc49975aa89a 28-Aug-2009 Ted Kremenek <kremenek@apple.com> Move the AnalysisContext* from GRState to Environment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
53cf7f5e99596f38a4211d0e051ee1cd151a87a0 28-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Add __builtin_memchr (used by GNU libstdc++).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
51ac7d494f5ed15718edde97d190dbb52ea664be 28-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Add __builtin_memchr (used by GNU libstdc++).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
a6fc61b37b6d78a602c4528998bb526366865605 27-Aug-2009 Steve Naroff <snaroff@apple.com> Fill in Index.h header file and add stubs to implementation file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80279 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
600866cc7d6d9ec2e27d4b6d6ec461f6463b5ab6 27-Aug-2009 Steve Naroff <snaroff@apple.com> Fill in Index.h header file and add stubs to implementation file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80279 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
c75673a0fcde5c85abe95a4df6b4ac37fa7507ea 27-Aug-2009 Eli Friedman <eli.friedman@gmail.com> PR4800: Implement -Wpointer-arith. I think this is the correct behavior
per the documentation, although I'm not completely sure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
cbdebdd11395ac1e63f5d5762f886549ae329464 27-Aug-2009 Eli Friedman <eli.friedman@gmail.com> PR4800: Implement -Wpointer-arith. I think this is the correct behavior
per the documentation, although I'm not completely sure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
3b896451923635c7d82f943dbaba1c03e6bb7c1f 27-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Implement instantiation of the declarations of member function
templates within class templates, producing a member function template
of a class template specialization. If you can parse that, I'm
sorry. Example:

template<typename T>
struct X {
template<typename U> void f(T, U);
};

When we instantiate X<int>, we now instantiate the declaration
X<int>::f, which looks like this:

template<typename U> void X<int>::f(int, U);

The path this takes through
TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and
ugly, but I don't know how to improve it yet. I'm resting my hopes on
the multi-level substitution required to instantiate definitions of
nested templates, which may simplify this code as well.

More testing to come...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
d60e105e6d1624da647ef7dd35a9cf6fad1b763e 27-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement instantiation of the declarations of member function
templates within class templates, producing a member function template
of a class template specialization. If you can parse that, I'm
sorry. Example:

template<typename T>
struct X {
template<typename U> void f(T, U);
};

When we instantiate X<int>, we now instantiate the declaration
X<int>::f, which looks like this:

template<typename U> void X<int>::f(int, U);

The path this takes through
TemplateDeclInstantiator::VisitCXXMethodDecl is convoluted and
ugly, but I don't know how to improve it yet. I'm resting my hopes on
the multi-level substitution required to instantiate definitions of
nested templates, which may simplify this code as well.

More testing to come...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
bcd4749cafde917323f114afa09c5bb8f9e08628 27-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused utility methods of GRStmtNodeBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
1d8bdd34101651e5ffca93486f9f4034eb0a564f 27-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused utility methods of GRStmtNodeBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
ba4592cbfb3cccd23740942fbbd9aa9defa0f0e3 27-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused utility methods of GRStmtNodeBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
99330ca3e3e5311b8106b631ea25dbc2b924a944 27-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused utility methods of GRStmtNodeBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
9bc6bbfff7ee44e24015a82827f32ab87b22b79f 27-Aug-2009 Gabor Greif <ggreif@gmail.com> restore indentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
cf78271b0a932b94598a9dec83fb33046fd033ce 27-Aug-2009 Gabor Greif <ggreif@gmail.com> restore indentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
ef0d74385f9ac97a31f16e7fc35dbc60c00115aa 27-Aug-2009 Gabor Greif <ggreif@gmail.com> add missing header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
156c4134fc936c8080ab6f15794da936f815bf8a 27-Aug-2009 Gabor Greif <ggreif@gmail.com> add missing header

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
998cd55ec625fa78d5ae5a8d211a168f437556a2 27-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove a unused member variable. Instead query the option from AnalysisManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c99949653fa00bab038af008ceeec15d3d8f62cc 27-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove a unused member variable. Instead query the option from AnalysisManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
aa5bff55484f0610783419d493e692aafa40faf9 27-Aug-2009 Gabor Greif <ggreif@gmail.com> iterator.h is no more. Be standards compliant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/Rewrite/RewriteRope.h
f5afb5e1fa1877a4adf3328e5be31b2f959d82eb 27-Aug-2009 Gabor Greif <ggreif@gmail.com> iterator.h is no more. Be standards compliant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/Rewrite/RewriteRope.h
430390dc279d39481598846b973d51786cf9e357 27-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> When checking whether one declaration context encloses another, make sure to look at the primary contexts. Thanks to Eli for the test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
6dd38daf1495367db8fe9e9a5cacb7420cf08e27 27-Aug-2009 Douglas Gregor <dgregor@apple.com> When checking whether one declaration context encloses another, make sure to look at the primary contexts. Thanks to Eli for the test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
b30f1c83501f3d6526cefa39a62f236352503bce 27-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Stub out an error so we don't crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2a16a138812f2f725f645cca95c41e6bd12ad14f 27-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Stub out an error so we don't crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3a4fed165ad3b46aee9ac07e25474fe98d5a13f2 27-Aug-2009 Anders Carlsson <andersca@mac.com> In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
bb60a509f47a95a4ed9366ec1fc65850da654d38 27-Aug-2009 Anders Carlsson <andersca@mac.com> In ActOnCXXTypeConstructExpr, check that the type is complete and non-abstract before creating any expressions. This assures that any templates are instantiated if necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5b76b8344ac7a91c30516e93b9d6c81910c4c489 27-Aug-2009 Ted Kremenek <kremenek@apple.com> Simplify 'Environment' to contain only one map from 'const Stmt*' to SVals, greatly simplifying the logic of the analyzer in many places. We now only distinguish between block-level expressions and subexpressions in Environment::RemoveDeadBindings and GRState pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
0fb0bc4067d6c9d7c0e655300ef309b05d3adfc9 27-Aug-2009 Ted Kremenek <kremenek@apple.com> Simplify 'Environment' to contain only one map from 'const Stmt*' to SVals, greatly simplifying the logic of the analyzer in many places. We now only distinguish between block-level expressions and subexpressions in Environment::RemoveDeadBindings and GRState pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
980108de0acaf5ecdfc16bb18b997dc9ffa2d708 27-Aug-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0e88b16fe88d7419fe2b48362d38c960bc93982c 27-Aug-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
62ce58301ea9dfb179993943fa96a590b7c07516 27-Aug-2009 Anders Carlsson <andersca@mac.com> New RequireNonAbstractType function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
a6ec7ad25a137fd42d84e6b6d44b32976cae440c 27-Aug-2009 Anders Carlsson <andersca@mac.com> New RequireNonAbstractType function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/PartialDiagnostic.h
e399ad4e75a7cb3e0abd0b8210f66393711d1360 27-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> When a member reference expression includes a qualifier on the member
name, e.g.,

x->Base::f()

retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.

When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
bd4c4aebe6035e7a7125470cc9f0f92511230ee3 27-Aug-2009 Douglas Gregor <dgregor@apple.com> When a member reference expression includes a qualifier on the member
name, e.g.,

x->Base::f()

retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.

When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
1ca68fb5c7932a1c2783e90655e0a2429e197ebd 27-Aug-2009 Ted Kremenek <kremenek@apple.com> Add initial boilerplate for CIndex, a shared library that will vend high-level
source symbol information (harvested by Clang) through a C API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80166 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
d2fa56687f8bd5ac6ebf9d9468d0efd714986a54 27-Aug-2009 Ted Kremenek <kremenek@apple.com> Add initial boilerplate for CIndex, a shared library that will vend high-level
source symbol information (harvested by Clang) through a C API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80166 91177308-0d34-0410-b5e6-96231b3b80d8
lang-c/Index.h
11415f75d95e088ce4748b8cc438f2d015b47e51 27-Aug-2009 Anders Carlsson <andersca@mac.com> The PartialDiagnostic constructor doesn't need to be explicit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
022fb28d79829c40c9b3a3bdd400dcacea495e26 27-Aug-2009 Anders Carlsson <andersca@mac.com> The PartialDiagnostic constructor doesn't need to be explicit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
9c71db1d83b6c08e92f0dd69fd0e23bc0aeaf6d2 27-Aug-2009 Mike Stump <mrs@apple.com> Regularize the case and sort.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
1feade8e520be483293dbf55eb57a51720899589 27-Aug-2009 Mike Stump <mrs@apple.com> Regularize the case and sort.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
7e5a7e363903a188018a33cd3ad4a5964ecc8bdd 26-Aug-2009 Anders Carlsson <andersca@mac.com> More improvements to PartialDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
21c2e20a00c2215d297470e6b657ede366b147d3 26-Aug-2009 Anders Carlsson <andersca@mac.com> More improvements to PartialDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PartialDiagnostic.h
52be1ca6972aae4d4bc4e4293b2b49cb05272b4c 26-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for C++ direct initializers that involve dependent
types or type-dependent expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
83ddad3ab513f5d73698cf9fbeb4ed3f011bc3b9 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement support for C++ direct initializers that involve dependent
types or type-dependent expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a1377ad3b9dd3b078f419b3a829bfb83e8c2baaa 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
58d3f1af9b4efa426826816a16894986b78b2692 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c3e811318b81d07db4b2a4f8aca7e83298e4366c 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> AST for conversion by conversion functions. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9099ff0cf91ac9e0b2d5a142807fa384ce842fc4 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> AST for conversion by conversion functions. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3d56748bff1454d33f1f5a9ae1644f4c54c37b44 26-Aug-2009 Anders Carlsson <andersca@mac.com> More support for pseudo dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2cf738f1944d1cc724ea7561b84440a3a1059e45 26-Aug-2009 Anders Carlsson <andersca@mac.com> More support for pseudo dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cf13d4ad85bceb69c8dfb2fc9f2b4276ccd3a130 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> update to CXXFunctionalCastExpr to support ir-gen for
type convesions of class objects [class.conv]. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e9f42087aabfdb6b2afc35c7e38ac65da063b409 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> update to CXXFunctionalCastExpr to support ir-gen for
type convesions of class objects [class.conv]. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
64037c8170f3c38f7946558be14085bb392bc9f1 26-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> When we know that we are parsing a class-name, implicitly construct a
TypenameType if getTypeName is looking at a member of an unknown
specialization. This allows us to properly parse class templates that
derived from type that could only otherwise be described by a typename type,
e.g.,

template<class T> struct X {};
template<typename T> struct Y : public X<T>::X { };

Fixes PR4381.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
42c39f39184c5ce9d7f489e5dcb7eec770728a9a 26-Aug-2009 Douglas Gregor <dgregor@apple.com> When we know that we are parsing a class-name, implicitly construct a
TypenameType if getTypeName is looking at a member of an unknown
specialization. This allows us to properly parse class templates that
derived from type that could only otherwise be described by a typename type,
e.g.,

template<class T> struct X {};
template<typename T> struct Y : public X<T>::X { };

Fixes PR4381.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
691e04e82d51364fe3c2a68cf6fd902a7ba30e06 26-Aug-2009 Anders Carlsson <andersca@mac.com> Address some of Doug's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
3aa4ca439da54bc71def778126c9cf10c7d910ed 26-Aug-2009 Anders Carlsson <andersca@mac.com> Address some of Doug's comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
daa1f3e4599eadb8ae87aabfef0928b14b2542d4 26-Aug-2009 Anders Carlsson <andersca@mac.com> Add the partially implemented PartialDiagnostic class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
b2153946fff330e54abfdc740c0a83aedd485b33 26-Aug-2009 Anders Carlsson <andersca@mac.com> Add the partially implemented PartialDiagnostic class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/PartialDiagnostic.h
346198721c8f96f8ab2f0fcf1fe129170ad2394f 26-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
47e1f7c68bf375cac470fdb2b599ddbb395aeb52 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Source location information for ? and : in a ConditionalOperator, from Enea Zaffanella

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
936d0d6b7438b967f0ee65c36f186c1adeb23161 26-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Fix bug in __extension__ handling for declarations, from Abramo
Bagnara with a fix from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Parse/DeclSpec.h
91a2886d558ea6ca7a0bed73ab5acea5ae78eac2 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Fix bug in __extension__ handling for declarations, from Abramo
Bagnara with a fix from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Parse/DeclSpec.h
3e208d820f141072cfbb82bee660850654932e66 26-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics and recovery when the nested-name-specifier of a
qualified name does not actually refer into a class/class
template/class template partial specialization.

Improve printing of nested-name-specifiers to eliminate redudant
qualifiers. Also, make it possible to output a nested-name-specifier
through a DiagnosticBuilder, although there are relatively few places
that will use this leeway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
dacd434c49658286c380c7b4c357d76d53cb4aa1 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics and recovery when the nested-name-specifier of a
qualified name does not actually refer into a class/class
template/class template partial specialization.

Improve printing of nested-name-specifiers to eliminate redudant
qualifiers. Also, make it possible to output a nested-name-specifier
through a DiagnosticBuilder, although there are relatively few places
that will use this leeway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.td
093ba8b2ac7f6fae34282b88dd142c2eb5ea062f 26-Aug-2009 Anders Carlsson <andersca@mac.com> Parsing of pseudo-destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ec7738776ba68576db5d8316af399d1f983245ee 26-Aug-2009 Anders Carlsson <andersca@mac.com> Parsing of pseudo-destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c03d3303fb298ae86bf5d5d6c98755928fdbde00 26-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Improve support for out-of-line definitions of nested templates and
their members, including member class template, member function
templates, and member classes and functions of member templates.

To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,

template<typename X> template<typename Y>
X Outer<X>::Inner1<Y>::foo(Y) {
return X();
}

we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.

Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
495c35d291da48c4f5655bbb54d15128ddde0d4d 26-Aug-2009 Douglas Gregor <dgregor@apple.com> Improve support for out-of-line definitions of nested templates and
their members, including member class template, member function
templates, and member classes and functions of member templates.

To actually parse the nested-name-specifiers that qualify the name of
an out-of-line definition of a member template, e.g.,

template<typename X> template<typename Y>
X Outer<X>::Inner1<Y>::foo(Y) {
return X();
}

we need to look for the template names (e.g., "Inner1") as a member of
the current instantiation (Outer<X>), even before we have entered the
scope of the current instantiation. Since we can't do this in general
(i.e., we should not be looking into all dependent
nested-name-specifiers as if they were the current instantiation), we
rely on the parser to tell us when it is parsing a declaration
specifier sequence, and, therefore, when we should consider the
current scope specifier to be a current instantiation.

Printing of complicated, dependent nested-name-specifiers may be
somewhat broken by this commit; I'll add tests for this issue and fix
the problem (if it still exists) in a subsequent commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
2e38e1e3988ef4a50b3551a33c8decc9790f8fe3 25-Aug-2009 Ted Kremenek <kremenek@apple.com> Fix crash reported in <rdar://problem/7124210> by "back-porting" some of the
implicit cast logic in RegionStoreManager to BasicStoreManager. This involved
moving CastRetriedVal from RegionStoreManager to StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
1894dce96476dbe58c0e60d47f8987cbeb3d3869 25-Aug-2009 Ted Kremenek <kremenek@apple.com> Fix crash reported in <rdar://problem/7124210> by "back-porting" some of the
implicit cast logic in RegionStoreManager to BasicStoreManager. This involved
moving CastRetriedVal from RegionStoreManager to StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
90d6e4d832c48f214970b9be930fd11b2cf60282 25-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Changed condition of an assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
cf5c19b9b7145e7fc092fa1309085deded25b0f1 25-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Changed condition of an assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d7a0049ccf7c0ca3fbd0210c2f6cdd47e7705a41 25-Aug-2009 Ted Kremenek <kremenek@apple.com> Move logic of GRExprEngine::EvalBinOp to SValuator::EvalBinOp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/SValuator.h
ff4264dae31cf42807b64ecc114906b0b835690a 25-Aug-2009 Ted Kremenek <kremenek@apple.com> Move logic of GRExprEngine::EvalBinOp to SValuator::EvalBinOp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/SValuator.h
82d05b9db0e33bfd819442cbc51dfa5c5818669a 25-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Sanity checking for statement reference counts. Thanks for the suggestion, Fariborz

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8b55ce79391dcce51c52f8aff923f4607e6cd977 25-Aug-2009 Douglas Gregor <dgregor@apple.com> Sanity checking for statement reference counts. Thanks for the suggestion, Fariborz

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b4fa87b8e064c6b104c5e918e7df0587c8d9bc27 25-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove CodeDecl and CFG from GRExprEngine and GRStateManager.
Now AnalysisManager is the only place we can get CodeDecl.
This leads to an API change: GRState::bindExpr() now takes the CFG argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
5032ffe4259e7d436f2eb19e5a29fdae559e7c12 25-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove CodeDecl and CFG from GRExprEngine and GRStateManager.
Now AnalysisManager is the only place we can get CodeDecl.
This leads to an API change: GRState::bindExpr() now takes the CFG argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
dd5c0339f04bb08e2397571eb41a97e01b3aa0db 25-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove Decl and CFG from ExplodedGraph. This leads to a series small changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
cc0255383f96a557c36923f602819bdb0cdd2761 25-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove Decl and CFG from ExplodedGraph. This leads to a series small changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
fef99322746767af932eec8260f2ce7a813e4c01 25-Aug-2009 Anders Carlsson <andersca@mac.com> Add Decl getter/setters for uninstantiated default arguments for function parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
66e78e23e35630e72d77b27ea145f236f49e2732 25-Aug-2009 Anders Carlsson <andersca@mac.com> Add Decl getter/setters for uninstantiated default arguments for function parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d53d05841afc14d472a0d43a7d0ce81558c0fb9c 25-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of the template parameter depth properly when we have
member templates declared inside other templates. This allows us to
match out-of-line definitions of member function templates within
class templates to the declarations within the class template. We
still can't handle out-of-line definitions for member class templates,
however.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
c3058338075a2132e057f1249a13b55a81fe021c 25-Aug-2009 Douglas Gregor <dgregor@apple.com> Keep track of the template parameter depth properly when we have
member templates declared inside other templates. This allows us to
match out-of-line definitions of member function templates within
class templates to the declarations within the class template. We
still can't handle out-of-line definitions for member class templates,
however.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
27959208cc1499c65770d46337979306600de498 25-Aug-2009 Ted Kremenek <kremenek@apple.com> ConstraintManager::AssumeDual now accepts a 'DefinedSVal' instead of 'SVal' for
the condition. This eliminates a source of bugs where the client doesn't
correctly reason about undefined or unknown values. This fixes PR 4759.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/SVals.h
08780078183ae4b2534c69a3e0ded596cdb695ba 25-Aug-2009 Ted Kremenek <kremenek@apple.com> ConstraintManager::AssumeDual now accepts a 'DefinedSVal' instead of 'SVal' for
the condition. This eliminates a source of bugs where the client doesn't
correctly reason about undefined or unknown values. This fixes PR 4759.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/SVals.h
4a73ab2981ca6b80af515262c852318a2f48b985 25-Aug-2009 Ted Kremenek <kremenek@apple.com> Introduce 'DefinedSVal', an intermediate parent class between Loc/NonLoc and
SVal. This allows us to use the C++ type system to distinguish between SVals
that are potentially unknown/undefined and those that are not.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
c3a94151d12e3821f760e1e342f719ddeebeea19 25-Aug-2009 Ted Kremenek <kremenek@apple.com> Introduce 'DefinedSVal', an intermediate parent class between Loc/NonLoc and
SVal. This allows us to use the C++ type system to distinguish between SVals
that are potentially unknown/undefined and those that are not.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
d5afcd799493200dfe8fca7f33311c34d27a3b0b 24-Aug-2009 Chris Lattner <sabre@nondot.org> normalize the CharacterLiteral::getLocation method name, patch
by Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
018d8e0596dd57401eeddcf11ac84ff0a065fbbe 24-Aug-2009 Chris Lattner <sabre@nondot.org> normalize the CharacterLiteral::getLocation method name, patch
by Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b35c799aeb381f5e4e8a61e839a1bea9cc21a68e 24-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Try to complete a type before looking for conversion functions within
that type. Note that we do not produce a diagnostic if the type is
incomplete; rather, we just don't look for conversion functions. Fixes PR4660.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5842ba9fd482bb2fe5198b32c2ae549cd5474e6d 24-Aug-2009 Douglas Gregor <dgregor@apple.com> Try to complete a type before looking for conversion functions within
that type. Note that we do not produce a diagnostic if the type is
incomplete; rather, we just don't look for conversion functions. Fixes PR4660.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
2e967de5e6f7a9ab2e382bc3b3bed638d12bdd4b 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove TargetInfo::getTargetPrefix().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
55cc2ed722e041228670d26d548e5590e355aced 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove TargetInfo::getTargetPrefix().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
608b388b563b5ccf7eeac5da78b539ea8f7ae4cd 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch TargetInfo to store an llvm::Triple.
- Primarily to discourage clients form making decisions based on the string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1752ee4849f4c37f5e03193e658be92650b0e65a 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch TargetInfo to store an llvm::Triple.
- Primarily to discourage clients form making decisions based on the string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
4eff2865ac5f8dc5fce65a523e27dba02d56547f 24-Aug-2009 Chris Lattner <sabre@nondot.org> prune #includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
0fa0daafdfc631681cc42a26a99618e9f9e63f97 24-Aug-2009 Chris Lattner <sabre@nondot.org> prune #includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
02fdbfe99a5648dbca42720198f420acccaf5ac5 23-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Catch a few more cases of illegal comparisons.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3075e760ceb73b6fafc2fb4977ad68552d83aef8 23-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Catch a few more cases of illegal comparisons.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
124569f192b4c4cc6d5d0bcaa310d618fe4456e0 23-Aug-2009 Chris Lattner <sabre@nondot.org> Eli points out that we really must diagnose "void* > 0" as an extension.
Explicitly add it as an EXTENSION instead of an EXTWARN so that it only
comes out with -pedantic. Thanks Eli!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
06c0f5b1bb1623a93a2bc4c345fb3be52a2b22a7 23-Aug-2009 Chris Lattner <sabre@nondot.org> Eli points out that we really must diagnose "void* > 0" as an extension.
Explicitly add it as an EXTENSION instead of an EXTWARN so that it only
comes out with -pedantic. Thanks Eli!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
512f4ba8728430f8b7c015123fe12eecd8991dc0 23-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast-dump print out the cast kinds of cast expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
27a5b9b9babd1e4f8a19c5c9c0736c4b311c79b2 23-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast-dump print out the cast kinds of cast expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9a0c2a528cab3391cc1c8635155a12fc1d4240b1 23-Aug-2009 Anders Carlsson <andersca@mac.com> Add a -fno-elide-constructors option to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
92f5822df6a0d7571df44b5d279ed4f017fbb0e6 23-Aug-2009 Anders Carlsson <andersca@mac.com> Add a -fno-elide-constructors option to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
6a5eb0ea571145251124a14a21c417add4f43253 22-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Removed couple of FIXME comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
c47285c44fdffa6b2dbdeb3ee825e6e856e31e5f 22-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Removed couple of FIXME comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
71da36ef59252de09ee7515ed73a2d62248a3b96 22-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Removed -Wundeclared-selector and -Wreadonly-setter-attrs from
-Wmost group (too noisy). Placed warning on parameter type
misatch between methods in sub and super class under
-Wsuper-class-method-mismatch (also too noisy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
92eaacbccfa27837de0ee4749062cf91b8364508 22-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Removed -Wundeclared-selector and -Wreadonly-setter-attrs from
-Wmost group (too noisy). Placed warning on parameter type
misatch between methods in sub and super class under
-Wsuper-class-method-mismatch (also too noisy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
b68ac567934bb139c5ac01d6eecf9d1b56a59964 22-Aug-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Second half of, clang, AuroraUX toolchain support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
e7925a075f110ab21afeae084670a155dea568e3 22-Aug-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Second half of, clang, AuroraUX toolchain support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
6ee3505754a995ce47e91de424cab07631a64248 22-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Implement delayed parsing for member function templates. Fixes PR4608.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d83d04041f64a2c89123d227fa8003b482391279 22-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement delayed parsing for member function templates. Fixes PR4608.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
8724ebaa64d8f4d9d943a24de8c040da92a17fea 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Remove 'AnalysisContext::setDecl()', as we the Decl associated with an
AnalysisContext should never change. Along the way, propagate some constness
around.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
2376002038c8b904acd20be754aedd1a7471be71 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Remove 'AnalysisContext::setDecl()', as we the Decl associated with an
AnalysisContext should never change. Along the way, propagate some constness
around.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
698edee0c2a62bdee9165f057801458299a7ccf5 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Constify LocationContext* (parent) and Stmt* fields in LocationContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
54c809b19444a01444f36e93d1d28c9a5668484c 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Constify LocationContext* (parent) and Stmt* fields in LocationContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
22e45e8d4c55977fa5e1c9b10d20c3d15f67f43f 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Remove 'SelfRegion' field from both BasicStoreManager and RegionStoreManager.
SelfRegion represented the object bound to 'self' (when analyzing Objective-C
methods) upon entry to a method. Having this region stored on the side ignores
the current stack frame that we might be analyzing (among other things), and is
a problem for interprocedural analysis.

For RegionStoreManager, the value for SelfRegion is just lazily created.

For BasicStoreManager, the value for SelfRegion is bound eagerly to 'self', but
no explicit tracking of SelfRegion on the side is made.

As part of this change, remove the restriction in BasicStoreManager that we only
track ivars for 'self'. This shouldn't actually change anything in terms of
precision, and simplifies the logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
82cd37cf1cccde162d1f13eda6cdfe1398216f36 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Remove 'SelfRegion' field from both BasicStoreManager and RegionStoreManager.
SelfRegion represented the object bound to 'self' (when analyzing Objective-C
methods) upon entry to a method. Having this region stored on the side ignores
the current stack frame that we might be analyzing (among other things), and is
a problem for interprocedural analysis.

For RegionStoreManager, the value for SelfRegion is just lazily created.

For BasicStoreManager, the value for SelfRegion is bound eagerly to 'self', but
no explicit tracking of SelfRegion on the side is made.

As part of this change, remove the restriction in BasicStoreManager that we only
track ivars for 'self'. This shouldn't actually change anything in terms of
precision, and simplifies the logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
8c860df7de4a8e2e56020ad1907b81d1c242738a 22-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Implement conversion function templates, along with the ability to use
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
65ec1fda479688d143fe2403242cd9c730c800a1 22-Aug-2009 Douglas Gregor <dgregor@apple.com> Implement conversion function templates, along with the ability to use
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6555ff9df18a7fe9a58421e7da567937e144c068 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Add LocationContext* field to VarRegion. This is needed for interprocedural analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
d17da2b99f323fa91b01e1dd119cc32e0ee8197d 22-Aug-2009 Ted Kremenek <kremenek@apple.com> Add LocationContext* field to VarRegion. This is needed for interprocedural analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
050cabf8b5ba0448c07fca099f3bcfceb1ad77a1 21-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce support for constructor templates, which can now be declared
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
dec06664a1c4d8984251083db2215875aea1c80d 21-Aug-2009 Douglas Gregor <dgregor@apple.com> Introduce support for constructor templates, which can now be declared
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
c6c3838a12f723db5b808c55700f7f6d9b81240d 21-Aug-2009 Chris Lattner <sabre@nondot.org> remove a dead warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0aa3f75d161629a2172696093e4ae40c2fe180b3 21-Aug-2009 Chris Lattner <sabre@nondot.org> remove a dead warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dae3e75fa046ddb930251c67b65e2f6cf97db7d0 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Introduce getConstantArrayElementCount API and use it in
construction/destruction of array members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0de78998e7bda473b408437053e48661b510d453 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Introduce getConstantArrayElementCount API and use it in
construction/destruction of array members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f4a15d5e3d85e125d5e80778a93ed1c53956863a 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix commentos


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
f3cd67369289014929ccc8431aaea536adade001 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix commentos


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
be1f991d902710c2ef8722ce9f2df7c821c92b68 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix refacto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
7cd830be364eaf98d9c9279e0d58b52dcde614c5 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix refacto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
ab7c0725f67a6b862607cd0bc124a8b0167ea0d0 21-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Tie the local check NSErrorCheck to a Decl to pave the way
to untie the ExplodedGraph from a specific Decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
5ab128b02d3b10413fb30738ec9f401dcfb47252 21-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Tie the local check NSErrorCheck to a Decl to pave the way
to untie the ExplodedGraph from a specific Decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
d55021f24c4264133442c7bbc7e486a50124cf92 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove comma at the end of enumerator list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
3caa4fb0d128575903fa2a024c776a747934538c 21-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove comma at the end of enumerator list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
42556e426eaf5b19971c2dd15c0564657fcdd235 21-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
a5d82000f7b173a0a5ce34dc8c09a03f98d9e439 21-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
90107998c89fe5f17d3d48b57c8bcd2deaa51d00 21-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Make the new Objective-C "id" and "Class" redefinition types special
types that are preloaded by the PCH file. Fixes PCH breakage
introduced in r79248.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
d1571acc700b652a52c766e36a6c688d9bf6f3a1 21-Aug-2009 Douglas Gregor <dgregor@apple.com> Make the new Objective-C "id" and "Class" redefinition types special
types that are preloaded by the PCH file. Fixes PCH breakage
introduced in r79248.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
398a801c9b914b01c4f6222c8338448314dd6f4f 21-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Initial support for parsing and representation of member function templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
37b372b76a3fafe77186d7e6079e5642e2017478 21-Aug-2009 Douglas Gregor <dgregor@apple.com> Initial support for parsing and representation of member function templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
9e2b9e01aeaf38e474da3acce29f2f751b727ad7 20-Aug-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Issue an error if the user specifies parameters in a function marked as ISR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
da3e03ec5d7161135bd90c0786421e8994bcc2f8 20-Aug-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Issue an error if the user specifies parameters in a function marked as ISR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
128cdc592c93af458ae89032d83dc75242eac52d 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
A field rename and more comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/Frontend/PCHBitCodes.h
09105f52b1f28cbb1374c27c3c70f5517e2c465d 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
A field rename and more comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/Frontend/PCHBitCodes.h
627c055b81f90ad8af138615887af68a55bd1383 20-Aug-2009 John McCall <rjmccall@apple.com> Add syntax examples for the friend declaration types.

Remove an assert trivialized by dominating code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
f18970d1dd3a88b7a50e9abd4fd4ceef675a8a2e 20-Aug-2009 John McCall <rjmccall@apple.com> Add syntax examples for the friend declaration types.

Remove an assert trivialized by dominating code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
1931cc820eeece9852582c3c3896c8e548f698a8 20-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Fix bit-field promotion to be a bit closer to the behavior of gcc.
Patch by Enea Zaffanella, with some simplifications/corrections to
isPromotableBitField by me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
04e8357f6801e9ff52673e7e899a67bbabf9de93 20-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Fix bit-field promotion to be a bit closer to the behavior of gcc.
Patch by Enea Zaffanella, with some simplifications/corrections to
isPromotableBitField by me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d64b41e7dda166fef72cb25b2c26f28c0c22a425 20-Aug-2009 John McCall <rjmccall@apple.com> Basic nested-template implementation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
e29ba20148e9b7835ad463b39cd4ee9223eafbbf 20-Aug-2009 John McCall <rjmccall@apple.com> Basic nested-template implementation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
28bf0810110322cc6a3b6604482b0f06751d9e69 20-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename: ProgramPoint::getContext() => ProgramPoint::getLocationContext().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/ProgramPoint.h
fafd3834754d2093e0ad7a1c005860fd527ecb7f 20-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename: ProgramPoint::getContext() => ProgramPoint::getLocationContext().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/ProgramPoint.h
ba47c2f0e888abadd4cbaaee049f04b8c9a60229 20-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Keep track of the right paren ')' source location in a function declarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
82bf01061b97404fed8c422fc0eda0a380689cc9 20-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track of the right paren ')' source location in a function declarator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
274d336c68ad8d36d8859370578dba9b97ec7f5f 19-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove now unnecessary helper methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
44ba7bf54434be88bda7a752f857d42cc92b462d 19-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove now unnecessary helper methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
60987c9074e5ae6d6a1a2cba8bbf36788f5ea82b 19-Aug-2009 Daniel Dunbar <daniel@zuster.org> Convert parts of Rewriter to StringRef based API.
- Please accept my sincere apologies for the gratuitous elimination of code
duplication, manual string length counting, unnecessary strlen calls, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
d7407dc92c7d19cafce429e7e1cf9819d3fc0b92 19-Aug-2009 Daniel Dunbar <daniel@zuster.org> Convert parts of Rewriter to StringRef based API.
- Please accept my sincere apologies for the gratuitous elimination of code
duplication, manual string length counting, unnecessary strlen calls, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
eb627495cc903ed7c9980107b256a7ef490b8dd5 19-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Get the Decl from the current ExplodedNode. Eventually the diagnostic client
and other core analysis logic will be untied to a particular Decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
f7a50a4ee255b3a624ae64125537a7bdbd1da0ef 19-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Get the Decl from the current ExplodedNode. Eventually the diagnostic client
and other core analysis logic will be untied to a particular Decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
6ae7d117d878330ed52c8c50265168678b348cae 19-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Make integer promotions work correctly on PIC16 and other platforms
where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType
out of Sema, since it was only there as a historical artifact. Patch by
Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a95d75769edae299816ec7fd9bbcdf1ef617c5c9 19-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Make integer promotions work correctly on PIC16 and other platforms
where sizeof(short) == sizeof(int). Move UsualArithmeticConversionsType
out of Sema, since it was only there as a historical artifact. Patch by
Enea Zaffanella.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fd3d5fdac0d25464e1b9c36bc646965494d44f66 19-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce LocInfoType which is a Sema-specific implementation detail.

This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1bb8a45f7386a23871598d05141a07af03067925 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce LocInfoType which is a Sema-specific implementation detail.

This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b17120c5d87b1b078891071188b89ec4fe6857bf 19-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.

DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
a1d5662d96465f0fddf8819d245da4d19b892eff 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.

DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
lang/AST/DeclTemplate.h
f1a75054ec58a51b415e7cc1b317e20ec3504c32 19-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce DeclaratorInfo and TypeLoc, intended to be used for storing and reading source information for types.

DeclaratorInfo will contain a flat memory block for source information about a type that came out of a declarator.
TypeLoc and its subclasses will be used by clients as wrappers to "traverse" the memory block and read the information.

Both DeclaratorInfo and TypeLoc are not utilized in this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
b17166c8077cd900cca83a895c43b30ea6660598 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclaratorInfo and TypeLoc, intended to be used for storing and reading source information for types.

DeclaratorInfo will contain a flat memory block for source information about a type that came out of a declarator.
TypeLoc and its subclasses will be used by clients as wrappers to "traverse" the memory block and read the information.

Both DeclaratorInfo and TypeLoc are not utilized in this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/TypeLoc.h
lang/AST/TypeLocNodes.def
5bb99723ed13ea4fe0d6b9bbb837b3c04daacd29 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
d2ae5aa732e8587816fd7a7be911460e337c178e 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
1c4da457d434b07b67f4d7dbb0b31351142de64d 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/Frontend/PCHBitCodes.h
154440e6a8fa6ac5bca395876d79b530b39a2c1c 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/Frontend/PCHBitCodes.h
e9835e137aeb9eb377f86cda52942c5acf279185 18-Aug-2009 Anders Carlsson <andersca@mac.com> Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f53b4433abb7a3bc14c0329d3175cbc291280137 18-Aug-2009 Anders Carlsson <andersca@mac.com> Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
8e69143ac6ce2bf331e8e81b63351866f0162b10 18-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused parameter BugReporter due to previous patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
292a5c04694ebf0cfcf41f5afe7e3db27019260e 18-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused parameter BugReporter due to previous patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
b31dd5bbb7f02867efd9210a92949d00bd5bbc1e 18-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Now we can get the CFG from the ProgramPoint. No need to pass in the
BugReporter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/BugReporter.h
50d5bc4e3b53eb8bb4ebf198f1213348a3fa0f38 18-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Now we can get the CFG from the ProgramPoint. No need to pass in the
BugReporter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/BugReporter.h
c447418cd19ac0a79c404455c2b35de76d415984 18-Aug-2009 Ted Kremenek <kremenek@apple.com> Enhance static analyzer diagnostics by introducing a new 'EnhancedBugReporter'
which allows custom checks to register callback creator functions for creating
BugReporterVisitor objects. This allows various checks to include diagnostics
such as 'assuming value is null' with little extra work. Eventually this API
should be refactored to be cleaner and more simple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/Checker.h
592362b46ad69db0db0988e7f9d8cbe647510bdd 18-Aug-2009 Ted Kremenek <kremenek@apple.com> Enhance static analyzer diagnostics by introducing a new 'EnhancedBugReporter'
which allows custom checks to register callback creator functions for creating
BugReporterVisitor objects. This allows various checks to include diagnostics
such as 'assuming value is null' with little extra work. Eventually this API
should be refactored to be cleaner and more simple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/Checker.h
44663db1b5b82107ccb94fe1cc08de2b1adf3fac 17-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Initial patch to support definitions of id and Class from headers in Objective-C code.

This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.

Approved by snaroff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0f436560640a1cff5b6d96f80f540770f139453f 17-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Initial patch to support definitions of id and Class from headers in Objective-C code.

This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.

Approved by snaroff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5c65d29c4215b57c2a2b72f176127ef4becadff9 17-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
94f1d16bb0f46c22bc51f4d7a483b77c0766201d 17-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
43c60b81bb2d3dd7684f2d7af0f1241fac3f1cce 17-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> To make the analysis independent on the locally stored liveness and cfg
of GRStateManager and GRExprEngine, pass the initial location context
to the getInitialState() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/Store.h
17fd8632dcda97022a51effc24060eacdad9dbe0 17-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> To make the analysis independent on the locally stored liveness and cfg
of GRStateManager and GRExprEngine, pass the initial location context
to the getInitialState() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRSubEngine.h
lang/Analysis/PathSensitive/Store.h
010bd7dc60facc8769d91521d9a6a6b932eb58bb 16-Aug-2009 Anders Carlsson <andersca@mac.com> Destroy bound temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
8478ce6d3f2416a694e39f791655a473c3907d62 16-Aug-2009 Anders Carlsson <andersca@mac.com> Destroy bound temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
b2df16619b7395f44d53800d60182cd5da4cef02 16-Aug-2009 Chris Lattner <sabre@nondot.org> Improve the diagnostic emitted when an unused ObjC property getter
is found. Instead of complaining about a generic "unused expr",
emit:
t.m:7:3: warning: property access result unused - getters should not have side effects

While objc property getters *could* have side effects, according to
the language best practices, they *shouldn't*. Hopefully the
diagnostic now gets this across.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
419cfb318cd69b6c717019288d5a3822be18d8f9 16-Aug-2009 Chris Lattner <sabre@nondot.org> Improve the diagnostic emitted when an unused ObjC property getter
is found. Instead of complaining about a generic "unused expr",
emit:
t.m:7:3: warning: property access result unused - getters should not have side effects

While objc property getters *could* have side effects, according to
the language best practices, they *shouldn't*. Hopefully the
diagnostic now gets this across.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bd9f51a0eb90a9be5e1394231d5e2925c546d527 16-Aug-2009 Anders Carlsson <andersca@mac.com> AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9abf2aedae7538cfd85f3ff0898a6d14385c8e36 16-Aug-2009 Anders Carlsson <andersca@mac.com> AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7fb13801b165ac3b72d62fde53f16187e6cdec07 16-Aug-2009 Anders Carlsson <andersca@mac.com> Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79157 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
d406bf0e8c17012110a8476d03c6f9a97b56ecf7 16-Aug-2009 Anders Carlsson <andersca@mac.com> Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79157 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
10747ff6448c87cdfd2b438042738036ecb5de86 15-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Implement __is_empty. Patch by Sean Hunt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
1d954f6a0057cb55a3a5d483904a3c57d03c996f 15-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Implement __is_empty. Patch by Sean Hunt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
190f9406d5fea03448d4cae409ca4d6c046e812d 15-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Ignore -Wno-import.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
0d9a279e9ebac8d99267a4dce645186e0b72816e 15-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Ignore -Wno-import.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
2ac46a53b5e5098e3c413cd65518981121f48d23 15-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Extend the ProgramPoint to include the context information LocationContext,
which is either a stack frame context of the function or a local scope
context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
25e695b2d574d919cc1bbddf3a2efe073d449b1c 15-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Extend the ProgramPoint to include the context information LocationContext,
which is either a stack frame context of the function or a local scope
context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/PathSensitive/AnalysisManager.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
cb6dd8a2171c0e8e996078a91377b8e9b31c40a3 15-Aug-2009 John McCall <rjmccall@apple.com> Disable all recognition of main() in -ffreestanding. Addresses bug #4720.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
07a5c22bb6fb0674c95205ae189365bf8e1b695e 15-Aug-2009 John McCall <rjmccall@apple.com> Disable all recognition of main() in -ffreestanding. Addresses bug #4720.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f87ef44558ee53d1f8fbe5f43f2655870370e738 15-Aug-2009 Ted Kremenek <kremenek@apple.com> Change handling of attribute 'malloc' to only accept the attribute on function
declarations (and not function pointers). This is consistent with GCC. Accepting
this attribute on function pointers means that the attribute should be treated
as a type qualifier, which apparently is not what GCC does. We obviously can
change this later should we desire to enhance the 'malloc' attribute in this
way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2cff7d16fe58e6d6447ec9cad2af083beb20d6b5 15-Aug-2009 Ted Kremenek <kremenek@apple.com> Change handling of attribute 'malloc' to only accept the attribute on function
declarations (and not function pointers). This is consistent with GCC. Accepting
this attribute on function pointers means that the attribute should be treated
as a type qualifier, which apparently is not what GCC does. We obviously can
change this later should we desire to enhance the 'malloc' attribute in this
way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3d752dbee56ff1988d81644613aa595fc8d7bfa4 14-Aug-2009 Anders Carlsson <andersca@mac.com> Make the CXXDefaultArgExpr constructor protected and add a static Create function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f1480eee38b59d15438fb7bc50865ac7c7e22403 14-Aug-2009 Anders Carlsson <andersca@mac.com> Make the CXXDefaultArgExpr constructor protected and add a static Create function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
42368bbdc9866806962ce35f27ba7372410bd639 14-Aug-2009 Mike Stump <mrs@apple.com> Deconflate virtual base offsets from non-virtual base offsets.
Deconflate a virtual base primary from a non-virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
215389180617e4edb8aa95a5526509948ed1416f 14-Aug-2009 Mike Stump <mrs@apple.com> Deconflate virtual base offsets from non-virtual base offsets.
Deconflate a virtual base primary from a non-virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
04500242a5c45dd1165547dcaafd88956e197edd 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> More toward synthesizing copy assignments. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0270b8aa3f9b50ec3acd1abfd2b97377a3e1bb05 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> More toward synthesizing copy assignments. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
651efb73490efb9715fb4ca21cac71b9ae86d2a2 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for synthesizing copy assignment operator.
WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2198ba12b73a8e6801d13f25de38031da6df46b6 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for synthesizing copy assignment operator.
WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
23a7302d3447acb67ac823ebb96eb68dea99da6d 12-Aug-2009 Nate Begeman <natebegeman@mac.com> Transition the PCH support for ShuffleVectorExpr over to ASTContext allocation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
888376a2bbcfc2f047902249f8455918e2489ae1 12-Aug-2009 Nate Begeman <natebegeman@mac.com> Transition the PCH support for ShuffleVectorExpr over to ASTContext allocation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d7552175d63ba7dfbaf97da4dff06342938dc87b 12-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> More cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
e96de2dfde487211fb52f9139cdcae64d051a406 12-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> More cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
1e47b19a7b8ed85d5ec17135bc376a5735b3d0ad 12-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove redundant forward declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
2ddde27ac627a1daf85edcf16e13eedc3b688984 12-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove redundant forward declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
257589e9035a669dd4c67645009cedca2b491b01 12-Aug-2009 Nate Begeman <natebegeman@mac.com> Fix a fixme by allocating ShuffleVectorExprs in the Context


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a88dc3079bedf70a5cfc39791727e43a10383006 12-Aug-2009 Nate Begeman <natebegeman@mac.com> Fix a fixme by allocating ShuffleVectorExprs in the Context


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
92c7b16d2d171d92187c44a2cf8fa34b0314602a 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to warn if a property which is 'assign' by default
may not implement NSCopying protocol in -fobjc-gc[-only] mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
0fd8904c5f71a11d29f67716c3ebdf7ad1c855fb 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to warn if a property which is 'assign' by default
may not implement NSCopying protocol in -fobjc-gc[-only] mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
7be34f4c71849160496fc33f5e7a1a150e9d0add 11-Aug-2009 John McCall <rjmccall@apple.com> Add a FriendClassDecl type for holding declarations of friend types in
the AST, and create such declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
c48fbdfb83a5e50fed693f0bdda3396e5b67051d 11-Aug-2009 John McCall <rjmccall@apple.com> Add a FriendClassDecl type for holding declarations of friend types in
the AST, and create such declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
fef75cbb293a4684ae4799d0f4211c4b78fcaf3b 11-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for anonymous union data member
copying in copy constructors and used in
default constructor's initializer list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e64941280877d065a27e8cefd2a9038256d0e3ac 11-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for anonymous union data member
copying in copy constructors and used in
default constructor's initializer list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
a2ca746d9b6f6e763c0ce2c39ad2d4dc44236d9a 11-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> LLVMContext is a class now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
f21efe9088a0b3eda1209d1706529f6cb2073092 11-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> LLVMContext is a class now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
3649308db6bd13b6e3ada598cad1cc40daaf504d 11-Aug-2009 John McCall <rjmccall@apple.com> Argument-dependent lookup for friend declarations. Add a new decl type,
FriendFunctionDecl, and create instances as appropriate.

The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Parse/Action.h
3f9a8a60614b763785d54ad08821745d03a4af70 11-Aug-2009 John McCall <rjmccall@apple.com> Argument-dependent lookup for friend declarations. Add a new decl type,
FriendFunctionDecl, and create instances as appropriate.

The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Parse/Action.h
9d87976f7f2e258d12eb546a473518d493afedd7 11-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor the template-instantiation logic for expressions into a
generic tree transformation (also used for recanonicalization) and a
small amount of template-instantiation-specific logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
b98b1991c7ad1eaedb863bdbdd784ec164277675 11-Aug-2009 Douglas Gregor <dgregor@apple.com> Refactor the template-instantiation logic for expressions into a
generic tree transformation (also used for recanonicalization) and a
small amount of template-instantiation-specific logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
e85f43d31101a875a6621e43bde21dcc13d860ff 11-Aug-2009 Nate Begeman <natebegeman@mac.com> Take 2 on AltiVec-style vector initializers.

Fixes PR4704 problems

Addresses Eli's patch feedback re: ugly cast code

Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
2ef13e5abef0570a9f567b4671367275c05d4d34 11-Aug-2009 Nate Begeman <natebegeman@mac.com> Take 2 on AltiVec-style vector initializers.

Fixes PR4704 problems

Addresses Eli's patch feedback re: ugly cast code

Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
c0b0396e7e37b56bc73c43c2dc290cd801fa1567 10-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
bd0fb30fa2a039439d1a30a83ea896801394d780 10-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
43954311b4159a6f058ff19a5d66817afe0d025f 10-Aug-2009 Chris Lattner <sabre@nondot.org> fix a couple of problems with section attributes:

1. Passing something that isn't a string used to cause:
"argument to annotate attribute was not a string literal"
make it say "section attribute" instead.

2. Fix the location of the above message to point to the
bad argument instead of the section token.

3. Implement rdar://4341926, by diagnosing invalid section
specifiers in the frontend rather than letting them slip all
the way to the assembler (a QoI win).

An example of #3 is that we used to produce something like this:

/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.).

Daniel improved clang to use llvm_report_error, so now we got:

$ clang t.c -c
fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier
requires a segment and section separated by a comma.

with no loc info. Now we get:

$ clang t.c -fsyntax-only
t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment
and section separated by a comma
int x __attribute__((section("sadf")));
^

which is nice :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TargetInfo.h
797c3c4f5dc4fda735e55c6b5d6270a54cf6d263 10-Aug-2009 Chris Lattner <sabre@nondot.org> fix a couple of problems with section attributes:

1. Passing something that isn't a string used to cause:
"argument to annotate attribute was not a string literal"
make it say "section attribute" instead.

2. Fix the location of the above message to point to the
bad argument instead of the section token.

3. Implement rdar://4341926, by diagnosing invalid section
specifiers in the frontend rather than letting them slip all
the way to the assembler (a QoI win).

An example of #3 is that we used to produce something like this:

/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.).

Daniel improved clang to use llvm_report_error, so now we got:

$ clang t.c -c
fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier
requires a segment and section separated by a comma.

with no loc info. Now we get:

$ clang t.c -fsyntax-only
t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment
and section separated by a comma
int x __attribute__((section("sadf")));
^

which is nice :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TargetInfo.h
07d7174ab7769b6ca5b2375081500788d89ae1ea 10-Aug-2009 Mike Stump <mrs@apple.com> Add walking bases in reverse order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b98f05c7389a5426c54f0e864043bb34862fa4e7 10-Aug-2009 Mike Stump <mrs@apple.com> Add walking bases in reverse order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
028ba50032038244543bd3630afb0f42a71d49ac 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Use LLVM's new error handler API to report back end errors using Diagnostic.

For example,
--
ddunbar@giles:Frontend$ clang -c backend-errors.c
fatal error: error in backend: Global variable 'a' has an invalid section specifier
'I AM, not, legal': mach-o section specifier uses an unknown section type.
--
compare to:
--
ddunbar@giles:Frontend$ gcc -c backend-errors.c
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected comma after segment-name
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest of line ignored. 1st junk character valued 77 (M).
--

Yay!

I am not tied to my wording choice, we could also go with "uncoverable error"
for the prefix, or just leave it off entirely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
70121ebd65be51d67025914bd3f035515b0caf4f 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Use LLVM's new error handler API to report back end errors using Diagnostic.

For example,
--
ddunbar@giles:Frontend$ clang -c backend-errors.c
fatal error: error in backend: Global variable 'a' has an invalid section specifier
'I AM, not, legal': mach-o section specifier uses an unknown section type.
--
compare to:
--
ddunbar@giles:Frontend$ gcc -c backend-errors.c
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected comma after segment-name
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest of line ignored. 1st junk character valued 77 (M).
--

Yay!

I am not tied to my wording choice, we could also go with "uncoverable error"
for the prefix, or just leave it off entirely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
48cf40f8f2e06e54a63ff13f06a567f5cf489404 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Revert r78535, it is causing a number of failures to build projects.

--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
1df5109f475bcbc528eb1fb9fdb179dcadbb33a6 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Revert r78535, it is causing a number of failures to build projects.

--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
6a7fda0a3b1b7f5229e1121190e009e92f533555 10-Aug-2009 Ryan Flynn <pizza@parseerror.com> warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fd6ad3cf9c8fc6904bd5f33212207aa69743fd45 10-Aug-2009 Ryan Flynn <pizza@parseerror.com> warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
31af091f101c08ecb39a00c2b4741bec5cc00150 09-Aug-2009 Ryan Flynn <pizza@parseerror.com> map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
76168e289ca4b307259e3bc9b3353f03b05bb6b9 09-Aug-2009 Ryan Flynn <pizza@parseerror.com> map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
bc8e297c7d620cd63eeb31c641dc7f51a1076785 09-Aug-2009 Nate Begeman <natebegeman@mac.com> AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);

In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
25b4fdb9d63095448e6cbc97b8865b36b0c8cbb6 09-Aug-2009 Nate Begeman <natebegeman@mac.com> AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);

In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
a5e76935d79d84e3a00a2fbb47651799f5da7fef 08-Aug-2009 Ryan Flynn <pizza@parseerror.com> PR4700 - remove shift by 0 warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8045c7393bc83060f812d0f7b1221edbc767407c 08-Aug-2009 Ryan Flynn <pizza@parseerror.com> PR4700 - remove shift by 0 warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c915fa76c5429bbc235d8993dc218ad20bc26e3b 08-Aug-2009 Anders Carlsson <andersca@mac.com> Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).

This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
a860e755f1f9f071b6a6a2f96128a6a258f5c331 08-Aug-2009 Anders Carlsson <andersca@mac.com> Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).

This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
7103a89ce3a9e0628f339028a5ef5a8cde6169e0 08-Aug-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Patch should implement packed enums - PR4098. Credit to Anders Johnsen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
fee13819693c8492f0c364bc704645e844ef737a 08-Aug-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Patch should implement packed enums - PR4098. Credit to Anders Johnsen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2665057a9cbee200a2c2c0cb7b8585c698d86e52 08-Aug-2009 Anders Carlsson <andersca@mac.com> Get rid of Stmt::Clone now that we can reference count statements instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Stmt.h
d497206844a894a0557e927adf29b34fe960dffd 08-Aug-2009 Anders Carlsson <andersca@mac.com> Get rid of Stmt::Clone now that we can reference count statements instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Stmt.h
a5d06285584d8c5d4db1ebe09e6c48536b37794d 08-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce reference counting for statements and expressions, using it
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
43d9d9243329b1b75d1a6efdad9f16d6fb386b8e 08-Aug-2009 Douglas Gregor <dgregor@apple.com> Introduce reference counting for statements and expressions, using it
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
5c09af0f78493759fee5948784d270d9126a2d51 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CK_ArrayToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
112a0a8ddf23f6d25e0920002d5d4c1df0515f86 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CK_ArrayToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b4671fa23fe684b71594cf2010d0286d0bd2718d 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_ToUnion and use it for aggregate expression codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4d8673b645ad86e496b886a0f80b60763f67071d 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_ToUnion and use it for aggregate expression codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b41b2052f4188f2254c28a877c2c8f1787d9d6a4 08-Aug-2009 John McCall <rjmccall@apple.com> Just add global scope to the associated namespaces set instead of tracking it
separately. Add the framework (currently unfed) for finding friend declarations
during argument-dependent lookup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
6ff0785f1e58fb2cfb702d2995d076c6648a9a13 08-Aug-2009 John McCall <rjmccall@apple.com> Just add global scope to the associated namespaces set instead of tracking it
separately. Add the framework (currently unfed) for finding friend declarations
during argument-dependent lookup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
e57c0274c8b59b3674582fd7e1acd16ceca5466f 07-Aug-2009 Mike Stump <mrs@apple.com> Add rbegin and rend for virtual bases, might come in handy some day.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
89ed850a1b586a4ed303ee8a8140bed11b85b390 07-Aug-2009 Mike Stump <mrs@apple.com> Add rbegin and rend for virtual bases, might come in handy some day.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
bea9cc83e485cc548edde19a25add74ded7cdbb1 07-Aug-2009 Mike Stump <mrs@apple.com> Add ability to generate vcall offsets for primary virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
928f1506eb38bb26a1284b876213a8f5244f6933 07-Aug-2009 Mike Stump <mrs@apple.com> Add ability to generate vcall offsets for primary virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
e7545629eb1bf23badcf749ee1ac1d944ce82e2b 07-Aug-2009 Mike Stump <mrs@apple.com> Fix some const_cast issues. This is the beginning of the rabbit hole.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e607ed068334bacb8d7b093996b4671c6ca79e25 07-Aug-2009 Mike Stump <mrs@apple.com> Fix some const_cast issues. This is the beginning of the rabbit hole.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f109fffb4f803b7d70450d7809c8473037c4af71 07-Aug-2009 Ryan Flynn <pizza@parseerror.com> PR3333: warn when shifting by invalid amount

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d0439688fea4dedc28125d246bbdec1f5a208660 07-Aug-2009 Ryan Flynn <pizza@parseerror.com> PR3333: warn when shifting by invalid amount

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
53e8e4b098c89c1833abf07f79e88a9843298317 07-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Separate Stmt::Destroy into the entrypoint for destroying a statement
or expression (Destroy) from the virtual function used to actually
destroy a given expression (DoDestroy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
42602bb40aefcc2751d4078ba88aacf4d965c9bd 07-Aug-2009 Douglas Gregor <dgregor@apple.com> Separate Stmt::Destroy into the entrypoint for destroying a statement
or expression (Destroy) from the virtual function used to actually
destroy a given expression (DoDestroy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtCXX.h
559024e3bc7986eb5b34b40466d5b13d2e96ba60 06-Aug-2009 Ted Kremenek <kremenek@apple.com> Fix a couple false positive "uninitialized value" warnings with RegionStore
involving reasoning about unions (which we don't handle yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
d4e5a606c9c64e24c05e5f4610796087e911fb9c 06-Aug-2009 Ted Kremenek <kremenek@apple.com> Fix a couple false positive "uninitialized value" warnings with RegionStore
involving reasoning about unions (which we don't handle yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/Optional.h
dc9d681e44b05d028a6955c9ddd7887b9f626489 06-Aug-2009 John McCall <rjmccall@apple.com> Drop the friend-inner-class diagnostic from an extwarn to an ext and don't
guard its report on GNUMode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
470c2a9ab6807be8a695e583a41b20ed69082260 06-Aug-2009 John McCall <rjmccall@apple.com> Drop the friend-inner-class diagnostic from an extwarn to an ext and don't
guard its report on GNUMode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
392245a58d4fe55d5c73427c97a8c7b319108880 06-Aug-2009 John McCall <rjmccall@apple.com> Permit a class to friend its members in C++0x, without restriction.
Permit a class to friend its class members in C++ 98, as long as extensions
are enabled (and even when they aren't, only give an extwarn about it).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7f27d92006936b16a29ca0a5c442476b4f585b21 06-Aug-2009 John McCall <rjmccall@apple.com> Permit a class to friend its members in C++0x, without restriction.
Permit a class to friend its class members in C++ 98, as long as extensions
are enabled (and even when they aren't, only give an extwarn about it).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
85f5ff382b3dc2dcd10f40fde21e92d715a1e54a 06-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Silence gcc warning about non-virtual destructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRSubEngine.h
b1e92b3d3a095cd2ca820148a86f7239f82fe6c6 06-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Silence gcc warning about non-virtual destructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRSubEngine.h
96b3631207f0c63c6a4ba35868a4ed3b05ac8fa7 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> I forgot adding this header for r78298.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRSubEngine.h
d91bb0c0c47e2219e94238468f0df0e354bdff29 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> I forgot adding this header for r78298.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78302 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRSubEngine.h
0ace2711397eae9217bda32de87e22ff10450386 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Last step of template cleanup: merge *BuilderImpl to *Builder.
Some Builders need further cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
031ccc0555a82afc2e8afe29e19dd57ff204e2de 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Last step of template cleanup: merge *BuilderImpl to *Builder.
Some Builders need further cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
7e1bad42adc3f4799471245baf55f4af4dd22f63 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Core analysis engine template cleanup step 2:
merge GRCoreEngineImpl and GRCoreEngine.

Introduce a new interface class GRSubEngine as the subengine of GRCoreEngine.
GRExprEngine subclasses GRSubEngine now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
0111f575b968e423dccae439e501225b8314b257 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Core analysis engine template cleanup step 2:
merge GRCoreEngineImpl and GRCoreEngine.

Introduce a new interface class GRSubEngine as the subengine of GRCoreEngine.
GRExprEngine subclasses GRSubEngine now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
37d7fc35659ce92bbe2fbdd3df16dba78a8c3f05 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
bb8e6488bda12b41b32fc22397a44510cacdac50 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
231ea0a935293b674de793a1ea2adb6533ca4c3e 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Core analysis engine template cleanup step 2:
merge ExplodedGraphImpl and ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRState.h
38b02b912e1a55c912f603c4369431264d36a381 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Core analysis engine template cleanup step 2:
merge ExplodedGraphImpl and ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRState.h
e76416737a75369de358bfdbf3751970824aaddb 06-Aug-2009 Ted Kremenek <kremenek@apple.com> Refactor RegionStoreManager::RemoveDeadBindings to also scan the bindings of LazyCompoundSVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
451ac091cd1868433985396a25cbbf2092ae8ca9 06-Aug-2009 Ted Kremenek <kremenek@apple.com> Refactor RegionStoreManager::RemoveDeadBindings to also scan the bindings of LazyCompoundSVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
da61ad2a4875cced61d9a02c2d0ec3b91d463414 06-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Support nested-name-specifiers for C++ member access expressions, e.g.,

this->Base::foo

from James Porter!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
fe85cedd58df7daed29201703cfb8806e12876d0 06-Aug-2009 Douglas Gregor <dgregor@apple.com> Support nested-name-specifiers for C++ member access expressions, e.g.,

this->Base::foo

from James Porter!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
140607b259f8139dcc2db963e44c8a37299d76f5 06-Aug-2009 John McCall <rjmccall@apple.com> First pass at friend semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
67d1a67f3db2f1aa69083c5c94164d6e0ee05b32 06-Aug-2009 John McCall <rjmccall@apple.com> First pass at friend semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
ff71ed00addf14e2245d44045fcd64b77af913f3 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> As GRState seems general enough, it is time to merge some template classes
and their impl base classes. This can greatly simply some code of the core
analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/GRWorkList.h
c5619d901a68dc27a9e310a6a831f03efebcd950 06-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> As GRState seems general enough, it is time to merge some template classes
and their impl base classes. This can greatly simply some code of the core
analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/GRWorkList.h
f1172ab2d77c3390757a71d85f15061384f0cac0 06-Aug-2009 Ted Kremenek <kremenek@apple.com> Implement lazy "copying" of structures and arrays in RegionStore. While
RegionStore already lazily abstracted the contents of arrays and structs, when
doing an assignment from one array/struct to another we did an explicit
element-wise copy, which resulted in a loss of laziness and huge performance
problem when analyzing many code bases.

Now RegionStoreManager handles such assignments using a new SVal could
'LazyCompoundSVal', which basically means the value of a given struct or array
(a MemRegion*) in a specific state (GRState). When we do a load from a field
whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field
lookup in the original structure. This means we have essentially zero copying of
data for structs/arrays and everything stays lazy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
a5e81f1240bcc5b9b0721fc6275075ad7cadaf5e 06-Aug-2009 Ted Kremenek <kremenek@apple.com> Implement lazy "copying" of structures and arrays in RegionStore. While
RegionStore already lazily abstracted the contents of arrays and structs, when
doing an assignment from one array/struct to another we did an explicit
element-wise copy, which resulted in a loss of laziness and huge performance
problem when analyzing many code bases.

Now RegionStoreManager handles such assignments using a new SVal could
'LazyCompoundSVal', which basically means the value of a given struct or array
(a MemRegion*) in a specific state (GRState). When we do a load from a field
whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field
lookup in the original structure. This means we have essentially zero copying of
data for structs/arrays and everything stays lazy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
bdc004c037cabf798e8fc4192b795de5615a2861 06-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
47a434ff3d49e7906eda88e8e8242e4297725b32 06-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
8b82eeb5416860903addcb2244445b909573421f 06-Aug-2009 Mike Stump <mrs@apple.com> Calculate the primary base class better and use that when laying down
the vtable. Still a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/RecordLayout.h
6f376336138ea719e3c4757ae046a5768043b276 06-Aug-2009 Mike Stump <mrs@apple.com> Calculate the primary base class better and use that when laying down
the vtable. Still a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/RecordLayout.h
0063d7392510dc0a567c59415b27bc0a2f299f2c 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
8e9ef0d87dad25f02e5abc6facf528778236115a 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
7c3c0453bc77deb3c95adce7fbe99833c72e1019 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Add support for the -fno-omit-frame-pointer option. Patch by Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
091038cbdeab8933720a4b236ab41590fa02d78a 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Add support for the -fno-omit-frame-pointer option. Patch by Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
c28afc985a8b167225c02ece59dda573f61cbd9f 05-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a comment that trailed off

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
b890f04174d52e41db19b883244abb17a3254ef1 05-Aug-2009 Douglas Gregor <dgregor@apple.com> Fix a comment that trailed off

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CanonicalType.h
cfe6ae592450d8466b4d78b59ff4526266549a9a 05-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce the canonical type smart pointers, and use them in a few places to
tighten up the static type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclarationName.h
lang/AST/Type.h
50d62d1b4a98adbc83de8f8cd1379ea1c25656f7 05-Aug-2009 Douglas Gregor <dgregor@apple.com> Introduce the canonical type smart pointers, and use them in a few places to
tighten up the static type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/CanonicalType.h
lang/AST/DeclarationName.h
lang/AST/Type.h
5f41efcda07c02f9a0e7acaed67c862184e3ddac 05-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> If the UnaryOperator has non-location type, use its type to create the
constant value. If the UnaryOperator has location type, create the
constant with int type and pointer width.

This fixes the bug that all pointer increments 'p++' evaluated to Unknown.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ValueManager.h
a52ad4e1f423bed2e9e0dcb12661268091d20a54 05-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> If the UnaryOperator has non-location type, use its type to create the
constant value. If the UnaryOperator has location type, create the
constant with int type and pointer width.

This fixes the bug that all pointer increments 'p++' evaluated to Unknown.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ValueManager.h
beb68c4546bd8cbd1950ca900fd32b96762eea89 05-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Support for use of default argument in constructors.
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
2eeed7bc4fd457ac57ff32ab3b02674588545f65 05-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Support for use of default argument in constructors.
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
841324a33cb8dd0868bd3102f5ba0b4f10dddf0f 04-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor template instantiation for types into a generic tree
transformation template (TreeTransform) that handles the
transformation and reconstruction of AST nodes. Template instantiation
for types is a (relatively small) customization of the generic tree
transformation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
577f75a7498e9e2536434da0ef0da0eea390d18b 04-Aug-2009 Douglas Gregor <dgregor@apple.com> Refactor template instantiation for types into a generic tree
transformation template (TreeTransform) that handles the
transformation and reconstruction of AST nodes. Template instantiation
for types is a (relatively small) customization of the generic tree
transformation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
26454cfe7d5c8e991a47bcbf07d578737730c48d 04-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Compare matching selectors in current and
super class(s) and warn on any parameter
type mismatch if potentially unsafe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dbdec8bcb5686cd34763db49488f77e88c43eb64 04-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Compare matching selectors in current and
super class(s) and warn on any parameter
type mismatch if potentially unsafe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a2717ea575c0c6d2258746bce5851450171ca3f6 04-Aug-2009 Ted Kremenek <kremenek@apple.com> Per advice that Doug Gregor gave me several months ago, clean up the
implementation of '#pragma unused' by not constructing intermediate
DeclRefExprs, but instead do the name lookup directly. The
implementation is greatly simplified.

Along the way, degrade '#pragma unused(undeclaredvariable)' to a
warning instead of being a hard error. This implements:

<rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
7a02a3733cdd2ca672902d869fda4ef2e3f05052 04-Aug-2009 Ted Kremenek <kremenek@apple.com> Per advice that Doug Gregor gave me several months ago, clean up the
implementation of '#pragma unused' by not constructing intermediate
DeclRefExprs, but instead do the name lookup directly. The
implementation is greatly simplified.

Along the way, degrade '#pragma unused(undeclaredvariable)' to a
warning instead of being a hard error. This implements:

<rdar://problem/6761874> [sema] allow #pragma unused to reference undefined variable (with warning)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
532f2316adafa02fccdb835fcafc7f9dfc62f8dc 03-Aug-2009 Ted Kremenek <kremenek@apple.com> Regression fix: reset 'DisplayedFunction' when a new function/method decl gets analyzed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
98f6f2573e400a4245cfb2d6976ffb8a875d25c7 03-Aug-2009 Ted Kremenek <kremenek@apple.com> Regression fix: reset 'DisplayedFunction' when a new function/method decl gets analyzed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
9f6e097a64d91bbffd8c829783bef8db7e0a1bbe 03-Aug-2009 John McCall <rjmccall@apple.com> Refactor methods on DeclSpec to take a diagnostic& parameter, and reflect this
elsewhere. Very slightly decouples DeclSpec users from knowing the exact
diagnostics to report, and makes it easier to provide different diagnostics in
some places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
fec54013fcd0eb72642741584ca04c1bc292bef8 03-Aug-2009 John McCall <rjmccall@apple.com> Refactor methods on DeclSpec to take a diagnostic& parameter, and reflect this
elsewhere. Very slightly decouples DeclSpec users from knowing the exact
diagnostics to report, and makes it easier to provide different diagnostics in
some places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
0c18019d8d27006e30b6f4db0171bdb7ef85c9dd 03-Aug-2009 John McCall <rjmccall@apple.com> Templatize BadSpecifier and introduce DeclSpec::getSpecifier(T) for the
remaining specifier enums T.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
32d335e63bd287e5c9297532171284cdf4c7888c 03-Aug-2009 John McCall <rjmccall@apple.com> Templatize BadSpecifier and introduce DeclSpec::getSpecifier(T) for the
remaining specifier enums T.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
462d7a223e4248ea3e16f15d93f50f6742069e8b 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> add a bunch of routine methods to AnalysisContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
18c7c06033cafe8c0cdcbe5759c802728688b49f 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> add a bunch of routine methods to AnalysisContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
lang/Analysis/PathSensitive/AnalysisManager.h
9978ebfcc55dc5d3383e3c9d5b84c89f22ac0398 03-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Tweak diagnostic wording; patch by Sean Hunt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d7640905de2f8c81c818785e8e869ed7b75ae849 03-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Tweak diagnostic wording; patch by Sean Hunt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bfae8c9112d0145b69818d26b4982104c0eedd84 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> now we can let AnalysisManager to own the PathDiagnosticClient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
d07a0d0279c09d1017f8450fce575a94dc9703c0 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> now we can let AnalysisManager to own the PathDiagnosticClient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
659e33c1812457c742fb7536f324b9f207e40b26 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Create only one AnalysisManager for each translation unit. In HandleCode(),
reset the current analysis context of the AnalysisManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
c471e7b44e63ff1b46b480e723c4130aeaef5a8a 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Create only one AnalysisManager for each translation unit. In HandleCode(),
reset the current analysis context of the AnalysisManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
b33c1261193d27c85d3c72136e3282d70aa25b79 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add LocationContext classes to enable creation of cross function
ProgramPoints. ProgramPoints will refer to them in the furture.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
2e3124486f343d770a2a5c2b7e78268bfc328a58 03-Aug-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add LocationContext classes to enable creation of cross function
ProgramPoints. ProgramPoints will refer to them in the furture.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
f8e5167d6a3af5a0c152b00973ef33b75912d949 03-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Produce a warning that partial ordering of function templates is not yet supported

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1f561c14edb9c2f54d5f4d0ad0f4b2f4bb6ece5e 03-Aug-2009 Douglas Gregor <dgregor@apple.com> Produce a warning that partial ordering of function templates is not yet supported

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7b0b83f39b4db3fa3c48cc7bb2ca11a365da13f7 03-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of the template arguments deduced when matching a class
template partial specialization. Then, use those template arguments
when instantiating members of that class template partial
specialization. Fixes PR4607.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
37d93e9252026d4fb836d9c05d0122a2d46e56be 03-Aug-2009 Douglas Gregor <dgregor@apple.com> Keep track of the template arguments deduced when matching a class
template partial specialization. Then, use those template arguments
when instantiating members of that class template partial
specialization. Fixes PR4607.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
1ecbf595ee2f85e3c2bc960193c994041cc053ab 02-Aug-2009 Anders Carlsson <andersca@mac.com> Use the correct cast kind for dynamic_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
714179b179a31a0c3769a968ee18ba87b901b13f 02-Aug-2009 Anders Carlsson <andersca@mac.com> Use the correct cast kind for dynamic_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dce26815f1385190e69930048331fd93f5d340a9 02-Aug-2009 Ted Kremenek <kremenek@apple.com> Remove RegionViews and RegionCasts. These are no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
df74e25bf0d82339a28e8a4c5e9413584771363b 02-Aug-2009 Ted Kremenek <kremenek@apple.com> Remove RegionViews and RegionCasts. These are no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
1601b72bedc333c99ba60f1ea057822c6536dce5 02-Aug-2009 Ted Kremenek <kremenek@apple.com> RegionStoreManager::RemoveDeadBindings() now removes dead 'default' bindings as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
093569cfab473e7b461523136a4df30a0473324d 02-Aug-2009 Ted Kremenek <kremenek@apple.com> RegionStoreManager::RemoveDeadBindings() now removes dead 'default' bindings as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
e5c07b875b62f59eb38de313a5ead1c6756e965c 02-Aug-2009 Ted Kremenek <kremenek@apple.com> Generalize the interface of 'StoreManager::RemoveDeadBindings()' to manipulate the entire GRState, not just the Store.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
2f26bc39f3b7bc93b9fdfbb79751b25704e5fdc6 02-Aug-2009 Ted Kremenek <kremenek@apple.com> Generalize the interface of 'StoreManager::RemoveDeadBindings()' to manipulate the entire GRState, not just the Store.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
98137f76c77d0aad264da99253eb2d1012d49fae 01-Aug-2009 Ted Kremenek <kremenek@apple.com> This is a fairly large patch, which resulted from a cascade of changes
made to RegionStore (and related classes) in order to handle some
analyzer failures involving casts and manipulation of symbolic memory.

The root of the change is in StoreManager::CastRegion(). Instead of
using ad hoc heuristics to decide when to layer an ElementRegion on a
casted MemRegion, we now always layer an ElementRegion when the cast
type is different than the original type of the region. This carries
the current cast information associated with a region around without
resorting to the error prone recording of "casted types" in GRState.

Along with this new policy of layering ElementRegions, I added a new
algorithm to strip away existing ElementRegions when they simply
represented casts of a base memory object. This algorithm computes
the raw "byte offset" that an ElementRegion represents from the base
region, and allows the new ElementRegion to be based off that offset.
The added benefit is that this naturally handles a series of casts of
a MemRegion without building up a set of redundant ElementRegions
(thus canonicalizing the region view).

Other related changes that cascaded from this one (as tests were
failing in RegionStore):

- Revamped RegionStoreManager::InvalidateRegion() to completely remove
all bindings and default values from a region and all subregions.
Now invalidated fields are not bound directly to new symbolic
values; instead the base region has a "default" symbol value from
which "derived symbols" can be created. The main advantage of this
approach is that it allows us to invalidate a region hierarchy and
then lazily instantiate new values no matter how deep the hierarchy
went (i.e., regardless of the number of field accesses,
e.g. x->f->y->z->...). The previous approach did not do this.

- Slightly reworked RegionStoreManager::RemoveDeadBindings() to also
incorporate live symbols and live regions that do not have direct
bindings but also have "default values" used for lazy instantiation.
The changes to 'InvalidateRegion' revealed that these were necessary
in order to achieve lazy instantiation of values in the region store
with those bindings being removed too early.

- The changes to InvalidateRegion() and RemoveDeadBindings() revealed
a serious bug in 'getSubRegionMap()' where not all region -> subregion
relationships involved in actually bindings (explicit and implicit)
were being recorded. This has been fixed by using a worklist algorithm
to iteratively fill in the region map.

- Added special support to RegionStoreManager::Bind()/Retrieve() to handle
OSAtomicCompareAndSwap in light of the new 'CastRegion' changes and the
layering of ElementRegions.

- Fixed a bug in SymbolReaper::isLive() where derived symbols were not
being marked live if the symbol they were derived from was also live.
This fix was critical for getting lazy instantiation in RegionStore
to work.

- Tidied up the implementation of ValueManager::getXXXSymbolVal() methods
to use SymbolManager::canSymbolicate() to decide whether or not a
symbol should be symbolicated.

- 'test/Analysis/misc-ps-xfail.m' now passes; that test case has been
moved to 'test/Analysis/misc-ps.m'.

- Tweaked some pretty-printing of MemRegions, and implemented
'ElementRegion::getRawOffset()' for use with the CastRegion changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
19e1f0ba5cec738ce6cebe3fe0e1edc782206494 01-Aug-2009 Ted Kremenek <kremenek@apple.com> This is a fairly large patch, which resulted from a cascade of changes
made to RegionStore (and related classes) in order to handle some
analyzer failures involving casts and manipulation of symbolic memory.

The root of the change is in StoreManager::CastRegion(). Instead of
using ad hoc heuristics to decide when to layer an ElementRegion on a
casted MemRegion, we now always layer an ElementRegion when the cast
type is different than the original type of the region. This carries
the current cast information associated with a region around without
resorting to the error prone recording of "casted types" in GRState.

Along with this new policy of layering ElementRegions, I added a new
algorithm to strip away existing ElementRegions when they simply
represented casts of a base memory object. This algorithm computes
the raw "byte offset" that an ElementRegion represents from the base
region, and allows the new ElementRegion to be based off that offset.
The added benefit is that this naturally handles a series of casts of
a MemRegion without building up a set of redundant ElementRegions
(thus canonicalizing the region view).

Other related changes that cascaded from this one (as tests were
failing in RegionStore):

- Revamped RegionStoreManager::InvalidateRegion() to completely remove
all bindings and default values from a region and all subregions.
Now invalidated fields are not bound directly to new symbolic
values; instead the base region has a "default" symbol value from
which "derived symbols" can be created. The main advantage of this
approach is that it allows us to invalidate a region hierarchy and
then lazily instantiate new values no matter how deep the hierarchy
went (i.e., regardless of the number of field accesses,
e.g. x->f->y->z->...). The previous approach did not do this.

- Slightly reworked RegionStoreManager::RemoveDeadBindings() to also
incorporate live symbols and live regions that do not have direct
bindings but also have "default values" used for lazy instantiation.
The changes to 'InvalidateRegion' revealed that these were necessary
in order to achieve lazy instantiation of values in the region store
with those bindings being removed too early.

- The changes to InvalidateRegion() and RemoveDeadBindings() revealed
a serious bug in 'getSubRegionMap()' where not all region -> subregion
relationships involved in actually bindings (explicit and implicit)
were being recorded. This has been fixed by using a worklist algorithm
to iteratively fill in the region map.

- Added special support to RegionStoreManager::Bind()/Retrieve() to handle
OSAtomicCompareAndSwap in light of the new 'CastRegion' changes and the
layering of ElementRegions.

- Fixed a bug in SymbolReaper::isLive() where derived symbols were not
being marked live if the symbol they were derived from was also live.
This fix was critical for getting lazy instantiation in RegionStore
to work.

- Tidied up the implementation of ValueManager::getXXXSymbolVal() methods
to use SymbolManager::canSymbolicate() to decide whether or not a
symbol should be symbolicated.

- 'test/Analysis/misc-ps-xfail.m' now passes; that test case has been
moved to 'test/Analysis/misc-ps.m'.

- Tweaked some pretty-printing of MemRegions, and implemented
'ElementRegion::getRawOffset()' for use with the CastRegion changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
00df7d348c16573732c70302816164952173d239 01-Aug-2009 Mike Stump <mrs@apple.com> Add beginnigs of rtti generation, wire up more of -fno-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
738f8c278da5950d0d4607de2debe0bdfad64185 01-Aug-2009 Mike Stump <mrs@apple.com> Add beginnigs of rtti generation, wire up more of -fno-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
d067278002fa1cf2e4999da5df9e9e0d23d08ae6 31-Jul-2009 Mike Stump <mrs@apple.com> And now we can generate a simple vtable. Still a work in progress...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
82b56961dcb813674dbda3c5f5aaee703d55741c 31-Jul-2009 Mike Stump <mrs@apple.com> And now we can generate a simple vtable. Still a work in progress...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
1c84ec1acddc60268dcd437aa184ab9469f69834 31-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Allow one to update the type representation of the declaration specifiers. Will be used by an upcoming commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
5296afaa63f7d41fa40fc22fce1382c91ab70daa 31-Jul-2009 Douglas Gregor <dgregor@apple.com> Allow one to update the type representation of the declaration specifiers. Will be used by an upcoming commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
1d680aeba651b7bf2f31b44e45f751d57a5b7a9e 31-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Fix 80-col violation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeVisitor.h
78b89b0ef7f3803cd31df3656f9536bfd6f0dd48 31-Jul-2009 Douglas Gregor <dgregor@apple.com> Fix 80-col violation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeVisitor.h
0c1d966bf0f3c5f7a787840c514c3d92fb4cbb3b 31-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Canonicalize dependent extended vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
2ec09f1dc123e1942ed756e8ee4fef86451eac9e 31-Jul-2009 Douglas Gregor <dgregor@apple.com> Canonicalize dependent extended vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
069c23a8f980c6a76882435fc1b16df5b0eb492e 31-Jul-2009 John McCall <rjmccall@apple.com> Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer
and a name collision.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0f434ecbead44c1f4d5f9dda088f9827fa0dc40f 31-Jul-2009 John McCall <rjmccall@apple.com> Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer
and a name collision.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
fcb32f44203c9e2285f992bf8a023dc753e5e41c 31-Jul-2009 John McCall <rjmccall@apple.com> sp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
5c15fe1f59a08c6e2215f99a3b251e14c73b36e2 31-Jul-2009 John McCall <rjmccall@apple.com> sp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
851869475d149002c1ee0ec6cafab37fb645aea8 31-Jul-2009 Anders Carlsson <andersca@mac.com> Add CK_DerivedToBase and use it PerformObjectMemberConversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3503d041ca8a3535a1c1a30005a6b18ae7aed5db 31-Jul-2009 Anders Carlsson <andersca@mac.com> Add CK_DerivedToBase and use it PerformObjectMemberConversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7ef181c5df246e133e86b97e684f650decc67e37 31-Jul-2009 Anders Carlsson <andersca@mac.com> Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
cdef2b75aa60cde1ca00e0aa3f89139ac89c6ae4 31-Jul-2009 Anders Carlsson <andersca@mac.com> Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
3f87475905a878d00d4f506357c995ad1095c511 31-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix use-after-release bug introduced in r77585 where the PathDiagnosticClient
created by AnalysisConsumer would be released by an instance of AnalysisManager
and then reused by later instances of AnalysisManager. Ownership of the
PathDiagnosticClient now belongs (for now) in AnalysisConsumer.

We also need this layering (for now) because the HTMLDiagnostiClient requires
that the entire translation unit be processed before emitting diagnostics. This
is done in its destructor (which should also be fixed, but that is another
issue).

This fixes PR 4653.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
82ec2e99084996eecbdf3a304f3cbba8c16c2f6b 31-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix use-after-release bug introduced in r77585 where the PathDiagnosticClient
created by AnalysisConsumer would be released by an instance of AnalysisManager
and then reused by later instances of AnalysisManager. Ownership of the
PathDiagnosticClient now belongs (for now) in AnalysisConsumer.

We also need this layering (for now) because the HTMLDiagnostiClient requires
that the entire translation unit be processed before emitting diagnostics. This
is done in its destructor (which should also be fixed, but that is another
issue).

This fixes PR 4653.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
7fc8ed7fb83dd8bcd680756624e290d0702d281d 31-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Build canonical types for dependently-sized array types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
04d4beee4b86af20a9e4457023d3925cab8f9908 31-Jul-2009 Douglas Gregor <dgregor@apple.com> Build canonical types for dependently-sized array types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
d63e16cae1577c934a6637baebd04c2bdcd2ebf8 31-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Canonicalization of dependent C++0x decltype types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
9d702ae1cd5cfa19d884cbef77e1df99395138bb 31-Jul-2009 Douglas Gregor <dgregor@apple.com> Canonicalization of dependent C++0x decltype types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
63d22fa6071690209b339451e4939de120a45e70 31-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Canonicalization for dependent typeof(expr) types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
b197572cf1cd70a817a1f546478cb2cb9112c48e 31-Jul-2009 Douglas Gregor <dgregor@apple.com> Canonicalization for dependent typeof(expr) types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
36a0ec0ea2597d051d6048c623b3885f37ab89a3 30-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for future ir-gen for destructor calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
426cc3828ce07a2cff15c9837f5958e6fc4b7739 30-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for future ir-gen for destructor calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
1930d2011783c0355a37ef2aa5d9e27ad4784f42 30-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Support out-of-line definitions of the members of class template
partial specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
b88e888404ad0a2bdd9bfae457e8530bb38a87c5 30-Jul-2009 Douglas Gregor <dgregor@apple.com> Support out-of-line definitions of the members of class template
partial specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
acdd51e121fdb6e33c8014bc41e89b26fba2e0c6 30-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make AnalysisManager into its own source file and a pure data management class.
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
fda7832b000ff8927386f093b52c067641679469 30-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make AnalysisManager into its own source file and a pure data management class.
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisManager.h
52900801654a2f4b76179dc061cca465d8f03757 30-Jul-2009 Ryan Flynn <pizza@parseerror.com> PR3679 - handle #pragma weak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e25ff83fb7eee9eeda89b6f2371bc33a37bf1028 30-Jul-2009 Ryan Flynn <pizza@parseerror.com> PR3679 - handle #pragma weak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
22f30424e6655ba9d9a7ac81d8d273d2215f64d1 30-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> This patch collects all analysis context data into a new class
AnalysisContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
97ab3941effe1f508c7113d9aa0c2887774f6fa8 30-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> This patch collects all analysis context data into a new class
AnalysisContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisContext.h
3bc07b852eefbbcd83bdfc42010582eddd715e31 30-Jul-2009 Mike Stump <mrs@apple.com> Fix type to be consistent with the rest of the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
f66eab0bc2a181dee341437ad53cddd5a633586e 30-Jul-2009 Mike Stump <mrs@apple.com> Fix type to be consistent with the rest of the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
f745834650d26d6db66153a93fcc79b95cdb6dcf 30-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Add support for -Wno-long-long.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
dbb8d81df3477f37657be53f6df56279a61e2e5f 30-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Add support for -Wno-long-long.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticGroups.td
b359ce1c6530701b69ba8e41c8650f1f85cb1758 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add support for ObjC message expressions, in the Analyzer:

-Accept an ObjC method and find all message expressions that this method may respond to.
-Accept an ObjC message expression and find all methods that may respond to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Analyzer.h
19b732a5461f5023d2335773584ac9aaeb0af514 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add support for ObjC message expressions, in the Analyzer:

-Accept an ObjC method and find all message expressions that this method may respond to.
-Accept an ObjC message expression and find all methods that may respond to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Analyzer.h
2939fed785599e90ea0f37a41b7a0c85c73657c9 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Support ObjC methods as Entities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/GlobalSelector.h
87bcb504f6ea453c50e47beb850258ebe57e9248 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support ObjC methods as Entities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/GlobalSelector.h
efb5fd8b966d59f843e01141992a99f1ca924c9b 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Use a STL helper template 'pair_value_iterator', by both DeclReferenceMap and SelectorMap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/DeclReferenceMap.h
lang/Index/STLExtras.h
lang/Index/SelectorMap.h
b325146ac7f8e197b6d12aa5c11a3f0a7244e870 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use a STL helper template 'pair_value_iterator', by both DeclReferenceMap and SelectorMap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/DeclReferenceMap.h
lang/Index/STLExtras.h
lang/Index/SelectorMap.h
66d14cf34f847b632a6aa479871751235e3298a9 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add ObjCMethodDecl::isThisDeclarationADefinition().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
66570b230941651245accbc5680b60e904eb993c 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add ObjCMethodDecl::isThisDeclarationADefinition().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
046f6540153137f45157e8bcb3986b915a6becd2 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Index the selectors and provide the translation units that contain them
through the IndexProvider.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/IndexProvider.h
lang/Index/Indexer.h
d88284b4386169bb165d70796953ef802f2e90a5 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Index the selectors and provide the translation units that contain them
through the IndexProvider.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/IndexProvider.h
lang/Index/Indexer.h
6e2956ca3c76b16c42534e408b9f05bc30ffefa2 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add TranslationUnit::getSelectorMap().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/TranslationUnit.h
0f3984809f998cdfcdef9880fcdade12c9f9b5f6 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add TranslationUnit::getSelectorMap().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/TranslationUnit.h
d9d35ad44d6b5d5b962e1e33999c788c90e2fd20 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce SelectorMap whose purpose is to map selectors to objc methods and message exprs,
inside a particular ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/SelectorMap.h
557b1d2535cda65f84fe6a802cf1eec3ccf734e0 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce SelectorMap whose purpose is to map selectors to objc methods and message exprs,
inside a particular ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/SelectorMap.h
3e18131e5feff486391ca4b152279153969ca635 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the GlobalSelector class in the Indexing library.

GlobalSelector is an ASTContext-independent way to refer to Objective C selectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/GlobalSelector.h
lang/Index/Program.h
27bd0dcb85cbb5dd3ca3fefc6369f34d6ccaa8b6 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the GlobalSelector class in the Indexing library.

GlobalSelector is an ASTContext-independent way to refer to Objective C selectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/GlobalSelector.h
lang/Index/Program.h
9928abbab36fe066fd249a56bd51bee09e1458c9 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> -Introduce the idx::Analyzer class used for getting indexing information, like finding
references of a declaration across translation units.

-Modify the index-test tool to use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Analyzer.h
7f4656eb6b60a7f3596fb26b9d5aed3731b3109e 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Introduce the idx::Analyzer class used for getting indexing information, like finding
references of a declaration across translation units.

-Modify the index-test tool to use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Analyzer.h
ca17fa94654ffd1574ba6ffb3120dc375b1daf3d 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce TULocation and TULocationHandler classes.

TULocation is like ASTLocation but also contains the TranslationUnit* that
the ASTLocation originated from.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
lang/Index/Handlers.h
40c0e73be6b2508c33f802368080f6b369dc67bc 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce TULocation and TULocationHandler classes.

TULocation is like ASTLocation but also contains the TranslationUnit* that
the ASTLocation originated from.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
lang/Index/Handlers.h
933afdf39fb53828fab7bd96a8771d80c442e93b 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Modify the Indexer class so that it can return the TranslationUnit that internal
decls originated from.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Indexer.h
52f1d4793588af6c5c09ab096818ff942bae3af6 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modify the Indexer class so that it can return the TranslationUnit that internal
decls originated from.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Indexer.h
d0f9ed513355cfd03636f5d60dee8b4741641293 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add Entity::getInternalDecl() to be used only on Entities that refer to internal
(in translation unit) declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
e380c51d6f56a2cc32fa0f5723584224214c5b9f 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add Entity::getInternalDecl() to be used only on Entities that refer to internal
(in translation unit) declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
b942bfe81e712d1f8d6f93aaee063497b06ad252 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Constify ASTLocation::print.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
6dbbc0e20a648cb2a9d520f5a7a394a6c07d6c68 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Constify ASTLocation::print.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
7bd3bad3c2e58da42bac332e5313e407ab331312 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Fix some comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/DeclReferenceMap.h
lang/Index/Entity.h
lang/Index/Program.h
614455cdacdea77cc8ea89efca08f043f65877d7 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix some comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/DeclReferenceMap.h
lang/Index/Entity.h
lang/Index/Program.h
c39d64911896ab6043b465ddd82814ef3c75de33 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/TranslationUnit.h
768a6c94a52ddf4f2f6d0c6d611db6cf224b1a1c 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/TranslationUnit.h
915949fa17fb764ac8d1f3aff5acea3f4d701eab 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce a helper template for the Handler classes and use it instead
of the iterator of the Indexer class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Handlers.h
lang/Index/Indexer.h
94431b5b4ceca8831e1ed6d6f646b99052680a85 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a helper template for the Handler classes and use it instead
of the iterator of the Indexer class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Handlers.h
lang/Index/Indexer.h
c13d3b65526c4a8fb61a54b4ca3c6006eb916bf5 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Accept Handler objects in parameters as references.

Reinforces that they shouldn't be null and it's a bit more natural when
they are passed as stack objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/IndexProvider.h
lang/Index/Indexer.h
lang/Index/Program.h
16d8bcf248f15d0479b3ccf40297f9ed107db3f1 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Accept Handler objects in parameters as references.

Reinforces that they shouldn't be null and it's a bit more natural when
they are passed as stack objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/IndexProvider.h
lang/Index/Indexer.h
lang/Index/Program.h
21f89b954d5636e9c9392edcc51a8a4cbdab8c25 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Rename EntityHandler::HandleEntity to Handle.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Handlers.h
77b4a79dd845fa93027f458049a7f71402006414 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename EntityHandler::HandleEntity to Handle.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Handlers.h
43d4f2e8115481f61fe943be72f004d9c81721d8 30-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> -Make IndexProvider an abstract interface for getting indexing information.
-Introduce Indexer as an IndexProvider implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/EntityHandler.h
lang/Index/Handlers.h
lang/Index/IndexProvider.h
lang/Index/Indexer.h
b17dc46c795d5eceeceb1424b96d63739d12a522 30-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Make IndexProvider an abstract interface for getting indexing information.
-Introduce Indexer as an IndexProvider implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/EntityHandler.h
lang/Index/Handlers.h
lang/Index/IndexProvider.h
lang/Index/Indexer.h
19e567a7f976257558abc106e3ace3cc2c98f561 30-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Make tag declarations redeclarable. This change has three purposes:

1) Allow the Index library (and any other interested client) to walk
the set of declarations for a given tag (enum, union, class,
whatever). At the moment, this information is not readily available.

2) Reduce our dependence on TagDecl::TypeForDecl being mapped down
to a TagType (for which getDecl() will return the tag definition, if
one exists). This property won't exist for class template partial
specializations.

3) Make the canonical declaration of a TagDecl actually canonical,
e.g., so that it does not change when the tag is defined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
8e9e9ef5348bce1a8f0741a5684fac3de9701c28 30-Jul-2009 Douglas Gregor <dgregor@apple.com> Make tag declarations redeclarable. This change has three purposes:

1) Allow the Index library (and any other interested client) to walk
the set of declarations for a given tag (enum, union, class,
whatever). At the moment, this information is not readily available.

2) Reduce our dependence on TagDecl::TypeForDecl being mapped down
to a TagType (for which getDecl() will return the tag definition, if
one exists). This property won't exist for class template partial
specializations.

3) Make the canonical declaration of a TagDecl actually canonical,
e.g., so that it does not change when the tag is defined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
d00cd9ec368acf3e615d55f659eca4639044ba7d 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Change uses of:
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()

And remove Type::getAsReferenceType(), etc.

This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Type.h
6217b80b7a1379b74cced1c076338262c3c980b3 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Change uses of:
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()

And remove Type::getAsReferenceType(), etc.

This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Type.h
d492ebc26c117ddbdffe8566e9d050409344cbbf 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which only
OldCastRegion used), and the associated command line option
'-analyzer-store=old-basic-cast'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
lang/Frontend/Analyses.def
f7a0cf426eddae76e1a71dd2295631a2cf0560af 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which only
OldCastRegion used), and the associated command line option
'-analyzer-store=old-basic-cast'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
lang/Frontend/Analyses.def
6631cb4e3387064a019f6d677356298a8f7b08b9 29-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> [llvm up]

A template name can refer to a set of overloaded function
templates. Model this in TemplateName, which can now refer to an
OverloadedFunctionDecl that contains function templates. This removes
an unspeakable hack in Sema::isTemplateName.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
d99cbe66403ee39c2ee58024b9582b95649a4fc5 29-Jul-2009 Douglas Gregor <dgregor@apple.com> [llvm up]

A template name can refer to a set of overloaded function
templates. Model this in TemplateName, which can now refer to an
OverloadedFunctionDecl that contains function templates. This removes
an unspeakable hack in Sema::isTemplateName.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TemplateName.h
fa498ae9c875a2c2d2c7db39cc7a61e1bc818193 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Make StoreManager::InvalidateRegion() virtual, move the current implementation
in StoreManager to RegionStoreManager, and create a special, highly reduced
version in BasicStoreManager.

These changes are in preparation for future RegionStore-specific changes to
InvalidateRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
1004a9f2b9eaf885e55ad8656194ef2a341db0f5 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Make StoreManager::InvalidateRegion() virtual, move the current implementation
in StoreManager to RegionStoreManager, and create a special, highly reduced
version in BasicStoreManager.

These changes are in preparation for future RegionStore-specific changes to
InvalidateRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
ce563192fb43688225a5c0c36bf31cbcf9cd6d3c 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Add 'MemRegion::getBaseRegion()', a utility method to strip ElementRegions with
index 0. This will be used for refinements to InvalidateRegion and CastRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
0e3ec3ff2477e60f0ceda922cc2e3a25a59d81f2 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Add 'MemRegion::getBaseRegion()', a utility method to strip ElementRegions with
index 0. This will be used for refinements to InvalidateRegion and CastRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
07c6c9a52871a5ec52caae374b40465ef5581d3c 29-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Check for identical types in C++ catch expression. Patch by Erik Verbruggen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c447aba04527a71d254b151f79f444d1cbe83ce9 29-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Check for identical types in C++ catch expression. Patch by Erik Verbruggen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
99eef4a6d3632a78155e7639a9f91d10b33e8218 29-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Use the new statement/expression profiling code to unique dependent
template arguments, as in template specialization types. This permits
matching out-of-line definitions of members for class templates that
involve non-type template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/Type.h
828e226ab7ed08b3eb766549e9d3306432137460 29-Jul-2009 Douglas Gregor <dgregor@apple.com> Use the new statement/expression profiling code to unique dependent
template arguments, as in template specialization types. This permits
matching out-of-line definitions of members for class templates that
involve non-type template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/Type.h
bbe4f96aaf32fad56812cec2f536256a6554209f 29-Jul-2009 Steve Naroff <snaroff@apple.com> Incorporate feedback from Chris (on r76979).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
99b10be143e3148b9499af4c0e9ebaf46757cfe6 29-Jul-2009 Steve Naroff <snaroff@apple.com> Incorporate feedback from Chris (on r76979).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
9350cfc90eb9979ee0730f9537159967f130a583 29-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> delete an undefined method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
5a5c60d273130990a7da770d7f5dc809920d3b65 29-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> delete an undefined method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
90e18745436d0889e8bb7fba650263b38f05694e 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring to define getCXXRecordDeclForPointerType
and use it in several places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a91d6a6619a91d0ca7102d8ab5678d855f04d850 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring to define getCXXRecordDeclForPointerType
and use it in several places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
06cac85d7ff58a3fb08f792f457471eddf2de02f 29-Jul-2009 Mike Stump <mrs@apple.com> Some minor cleanups, thanks Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f711c41dd9412a8182793259d355c4f6979ed5ed 29-Jul-2009 Mike Stump <mrs@apple.com> Some minor cleanups, thanks Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
04580fbca3a91f56c0af18e831ca5b2702e5529d 29-Jul-2009 Mike Stump <mrs@apple.com> Some style fixes, thanks Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fd612dbb23cd31c03c898ae53ff18d0dfd8488f9 29-Jul-2009 Mike Stump <mrs@apple.com> Some style fixes, thanks Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6edde614a8ee027693598fd8a97d8c403a92b505 29-Jul-2009 Mike Stump <mrs@apple.com> Add support for -Wmissing-noreturn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4d9d51ae3b868268082f94d84d0dff4c0b1ad435 29-Jul-2009 Mike Stump <mrs@apple.com> Add support for -Wmissing-noreturn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4262bc9b6a07a78efce52344577130936d1f4296 29-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor the code that produces a TemplateSpecializationType, so that
canonicalization for dependent TemplateSpecializationTypes occurs
within ASTContext::getTemplateSpecializationType. Also, move template
argument canonicalization into ASTContext::getCanonicalTemplateArgument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1275ae098acda31fe0e434510c729fcfed0458a1 29-Jul-2009 Douglas Gregor <dgregor@apple.com> Refactor the code that produces a TemplateSpecializationType, so that
canonicalization for dependent TemplateSpecializationTypes occurs
within ASTContext::getTemplateSpecializationType. Also, move template
argument canonicalization into ASTContext::getCanonicalTemplateArgument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8e288f43956d355114ad904c78cebc2b1183aeda 29-Jul-2009 Mike Stump <mrs@apple.com> Add noreturn support for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5692586ae59be8d49edd7b45dd52c1ffa920ba5e 29-Jul-2009 Mike Stump <mrs@apple.com> Add noreturn support for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4ac7d6980e3c906f469df2504aa64b73ce58fdc9 28-Jul-2009 Ted Kremenek <kremenek@apple.com> Add missing break statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.h
c4e4acb774ee4437227154215e1f602393eb1389 28-Jul-2009 Ted Kremenek <kremenek@apple.com> Add missing break statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/CheckerVisitor.h
827f93d0d67a9fd2e35119196a6a4b67ca943b4a 28-Jul-2009 Mike Stump <mrs@apple.com> Update comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8fad9941a635a42ee644e7396ca84cbaaa5c1b6e 28-Jul-2009 Mike Stump <mrs@apple.com> Update comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
15308cdd038979bf62ce23e63e1a2e04a3ba5d7b 28-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix regression in attribute 'nonnull' checking when a transition node
was created but not added to the destination NodeSet. This fixes PR 4630.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
bb977228e642e0d12365862a3838dd5005ef783b 28-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix regression in attribute 'nonnull' checking when a transition node
was created but not added to the destination NodeSet. This fixes PR 4630.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
f2221dfb6c649cdda22c56112e55c5ee6f397908 28-Jul-2009 Anders Carlsson <andersca@mac.com> Add a field for C++ specific data to ASTRecordLayout. Use it to store the non-virtual size and alignment + base offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77352 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
b2fafd4978166114c54748a73738d8b2c3a37e2b 28-Jul-2009 Anders Carlsson <andersca@mac.com> Add a field for C++ specific data to ASTRecordLayout. Use it to store the non-virtual size and alignment + base offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77352 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
fda7da669298c7428a1c963013d9a8c71cbedbc5 28-Jul-2009 John McCall <rjmccall@apple.com> Bounds checking for address spaces.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
efadb7768e7c7418185f5a4010ecd8b21ca9731b 28-Jul-2009 John McCall <rjmccall@apple.com> Bounds checking for address spaces.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
b230eac0d43ae1952dc1c5fa8754f0dd7dce1496 28-Jul-2009 John McCall <rjmccall@apple.com> Reimplement QualifierSet using a single word, as requested by dgregor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7a1bcdf26d48c2c40e900a973f7ffca45f451526 28-Jul-2009 John McCall <rjmccall@apple.com> Reimplement QualifierSet using a single word, as requested by dgregor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
029f78742367275bc5d895d6cbe88922d8d4dcfa 28-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Implement ObjCMethodDecl::getCanonicalDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e7f9d301a10b4b3223e91d9be4362b44cba0a212 28-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement ObjCMethodDecl::getCanonicalDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0f3b8429f32a51c2bff25198295f1c155bfabffe 28-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> -Add ObjCCategoryImplDecl::getCategoryClass() which returns the category interface decl.
-Correct ObjCMethodDecl::getNextRedeclaration(); A method in a ObjCCategoryImplDecl should point to
a method in the associated ObjCCategoryDecl, not the ObjCInterfaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
4292073a858f72769fa405b48390620c8932f8ae 28-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Add ObjCCategoryImplDecl::getCategoryClass() which returns the category interface decl.
-Correct ObjCMethodDecl::getNextRedeclaration(); A method in a ObjCCategoryImplDecl should point to
a method in the associated ObjCCategoryDecl, not the ObjCInterfaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ed2f9296431718d81ff66ebb5e677a07f870b87f 28-Jul-2009 Mike Stump <mrs@apple.com> Make longjmp a real builtin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/PCHBitCodes.h
782fa308a765aeac2acb39c4e697c937ec21185b 28-Jul-2009 Mike Stump <mrs@apple.com> Make longjmp a real builtin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/PCHBitCodes.h
065e8c860559b117e8a32181d1f2e15d8c249722 28-Jul-2009 John McCall <rjmccall@apple.com> Allow functions to be marked "implicit return zero" and so mark main().
Codegen by initializing the return value with its LLVM type's null value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0cfeb63f532973777f6fe75d3468c3acad4adfe3 28-Jul-2009 John McCall <rjmccall@apple.com> Allow functions to be marked "implicit return zero" and so mark main().
Codegen by initializing the return value with its LLVM type's null value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5c088cbc435fd831c7585faea59c8c7e1d06fc8a 28-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Add a Profile function for statements so that we can (eventually) determine
when statements and expressions are equivalent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
41ef0c3472a3d09c29bc1792f3d26842f2b8a695 28-Jul-2009 Douglas Gregor <dgregor@apple.com> Add a Profile function for statements so that we can (eventually) determine
when statements and expressions are equivalent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
b81611bdd79f6b0a43e8f2cea48545074fb23164 28-Jul-2009 Mike Stump <mrs@apple.com> Make sure to move the comment with the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
523a8fddefee7836d6317f6dc265acb4ee84a0d4 28-Jul-2009 Mike Stump <mrs@apple.com> Make sure to move the comment with the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
d0f1a339494d5c181b9e93640d458b79a77f0cfe 28-Jul-2009 Ted Kremenek <kremenek@apple.com> (1) Enable PlistDiagnostics to take an option "PathDiagnosticClientFactory"
object that it can use to forward PathDiagnostics for further processing. Along
with this feature, the PlistDiagnostics object logs which files are created by
the forwarding of the PathDiagnostics.

(2) Create a new PathDiagnosticClientFactory object for HTMLDiagnostics,
allowing other PathDiagnosticClients to forward PathDiagnostics through an
opaque interface.

(3) Create a "plist-html" diagnostics option in AnalysisConsumer to allow the
logging of HTML files created in a hybrid Plist+HTML diagnostic client.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
lang/Frontend/PathDiagnosticClients.h
f75560670bcdd59b051149bdece3eac14e313853 28-Jul-2009 Ted Kremenek <kremenek@apple.com> (1) Enable PlistDiagnostics to take an option "PathDiagnosticClientFactory"
object that it can use to forward PathDiagnostics for further processing. Along
with this feature, the PlistDiagnostics object logs which files are created by
the forwarding of the PathDiagnostics.

(2) Create a new PathDiagnosticClientFactory object for HTMLDiagnostics,
allowing other PathDiagnosticClients to forward PathDiagnostics through an
opaque interface.

(3) Create a "plist-html" diagnostics option in AnalysisConsumer to allow the
logging of HTML files created in a hybrid Plist+HTML diagnostic client.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
lang/Frontend/PathDiagnosticClients.h
b56fd0b9080fae81e36cfd73dd740f0e06a4815d 27-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.h
bc0a2226c7fcd18b29b6846049e2cfcb872d3593 27-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.h
67356ae8e55d11c4d3e69f3651d5cb923a36e517 27-Jul-2009 Mike Stump <mrs@apple.com> Add noreturn for exit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
0feecbb3165b06ff34663a8c233316aaf7f84ce1 27-Jul-2009 Mike Stump <mrs@apple.com> Add noreturn for exit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.def
lang/Basic/Builtins.h
b2082e1c1199d8499f7a75e914ffbcf60c6c1d1e 27-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Make ObjCImplDecl inherit from ObjCContainerDecl.

ObjCContainerDecl now is the root class for objc decls that contain methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
aecae629269fae3bf484baf1d109e9a89d14eead 27-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make ObjCImplDecl inherit from ObjCContainerDecl.

ObjCContainerDecl now is the root class for objc decls that contain methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
ebc4ebcdfd28074267e2918d9faa69861b929022 27-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Fix typo in error message

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
550b73275069725dbd78f8608305ef23410670f0 27-Jul-2009 Douglas Gregor <dgregor@apple.com> Fix typo in error message

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
51301abc49f28c078a78e9745109d3848430b00d 26-Jul-2009 Ryan Flynn <pizza@parseerror.com> PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
478fbc68b1873678edfb2a3c420749635db100e6 26-Jul-2009 Ryan Flynn <pizza@parseerror.com> PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
088f18a9adf05f57136cdc993b67b2cf84cb34fa 26-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
ObjCImplDecl::getMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
16f06bb41b1b02ff0847bc41b89818472053d672 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
ObjCImplDecl::getMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9ac39f328184ba1cb6602497408741d984a53590 26-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCInterfaceDecl::lookupMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
aa5420c1e36ab8e0e4bb87239d8b73a3a8ce75db 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCInterfaceDecl::lookupMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
aba400caab2a1606f17710b609141f530adb368e 26-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCProtocolDecl::lookupMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
094e2bb6730d63e0f6919e4839522a43b7644181 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCProtocolDecl::lookupMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7a7757baeb9e59c543cccbc3c5c0aafeeea8b041 26-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
ObjCContainerDecl::getMethod.

Avoids code duplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
467c0b165072689ef87fe8d9cd47a5b63485bcdc 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
ObjCContainerDecl::getMethod.

Avoids code duplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0f95d329cc0ba37faa0f3d522991a581a407482c 26-Jul-2009 Mike Stump <mrs@apple.com> Improve comments (Thanks Fariborz).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ae92140b542d5c1c096e39e74e59526184819b30 26-Jul-2009 Mike Stump <mrs@apple.com> Improve comments (Thanks Fariborz).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1bb806498909a43a7829edb21c42606335d69694 25-Jul-2009 Mike Stump <mrs@apple.com> Add noreturn as a type attribute, handle printing for them and handle
calls to noreturn function pointers when CFG building.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
2455636163fdd18581d7fdae816433f886d88213 25-Jul-2009 Mike Stump <mrs@apple.com> Add noreturn as a type attribute, handle printing for them and handle
calls to noreturn function pointers when CFG building.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
0e35d04dc95cc25f96f6ddf9436910f1c3b8e07c 25-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
Add custom conversions to static_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9cc11e70031365972424b43f439021d88096b146 25-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
Add custom conversions to static_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
43d2805a83b01e6938928a6da5184bc8da963b2d 25-Jul-2009 John McCall <rjmccall@apple.com> Semantic checking for main().

Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
13591ed054d1b2d6d392151ba05cbc883e640648 25-Jul-2009 John McCall <rjmccall@apple.com> Semantic checking for main().

Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d484def4535a53f2ecfaf28410727773cb01c8da 25-Jul-2009 John McCall <rjmccall@apple.com> Flesh out the QualifierSet API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8fceb57f6980c67bb8f12e29d75736cf057951e8 25-Jul-2009 John McCall <rjmccall@apple.com> Flesh out the QualifierSet API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
181fe794b8945defefc63443b15fe99a15f0a28b 24-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for static data members that are defined out-of-line.

Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
7caa6825f42a0f7e97d6fc06233133c42b218e46 24-Jul-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for static data members that are defined out-of-line.

Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
4cbc09206c5b65ecc7dc08a9764cfb1a10d32172 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More Sema check for constructor's member initializer along
with type conversion to fix ir-gen crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7252f5110de3163a465aa50a2114c1fef9e848e8 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More Sema check for constructor's member initializer along
with type conversion to fix ir-gen crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
56bacebf94f7cce59d0719a4678416204df295ba 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward initialization of objects
in constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
50b8eea3f36881a988a5757e0f6e15d45900324b 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward initialization of objects
in constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
29d293b79901491af6da2e2368ea8e506402e1fe 24-Jul-2009 Steve Naroff <snaroff@apple.com> Allow front-end 'isa' access on object's of type 'id'.
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).

Still need back-end CodeGen for ObjCIsaExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
f242b1b0c4e998911cb96b2ba7e27ab4a5abaed3 24-Jul-2009 Steve Naroff <snaroff@apple.com> Allow front-end 'isa' access on object's of type 'id'.
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).

Still need back-end CodeGen for ObjCIsaExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
4fd3d0be19bc2962293d11a1d8375d810332efdd 24-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add getDecl() to CallGraph and CallGraphNode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
e3e643f12cc65a70e440bcdbb37b81d5fd022143 24-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add getDecl() to CallGraph and CallGraphNode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
c910a0dd5a2371bd9249184b1dbb4183926cabb9 24-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Constify methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
6d8f56f4799042c897831318326d8be55a879cb8 24-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Constify methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
77740582868469e4de5437ae285f628d5bbfbcf0 24-Jul-2009 Mike Stump <mrs@apple.com> Implement new warning for functions declared 'noreturn' when they fall off the end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5f28a1edf6decac64ca12e51ca4a929d26fc21f2 24-Jul-2009 Mike Stump <mrs@apple.com> Implement new warning for functions declared 'noreturn' when they fall off the end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6b98c5818acddb2e6f799db3209c3f3cd372cb6b 24-Jul-2009 Ted Kremenek <kremenek@apple.com> Mark destructor of Checker virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
3111218bc7ec7ff8b0ab8fdd15a6949904ef698e 24-Jul-2009 Ted Kremenek <kremenek@apple.com> Mark destructor of Checker virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
4af0523edc341c6e7bb4499c45ce45397f2dc979 24-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> This patch fixes the implementations of the __has_trivial_destructor
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/Type.h
5e03f9ea8174ae588c5e69ec6b5ef4c68f8fd766 24-Jul-2009 Douglas Gregor <dgregor@apple.com> This patch fixes the implementations of the __has_trivial_destructor
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/Type.h
7c1771cc1016fac539b364f350f0e33ce11aadb2 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
87595e46ccd61c9b7c08074c2c64b66b5c0fc694 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
95254bc9257d9bcb425c84bbb94a0b47d5e8ee0a 23-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Clean up the ActOnTag action, so that there is only a single entry
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.

Removed the ActOnClassTemplate action, which is no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
bd1099efde211cbb63fce3feee4ebcc6bac58781 23-Jul-2009 Douglas Gregor <dgregor@apple.com> Clean up the ActOnTag action, so that there is only a single entry
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.

Removed the ActOnClassTemplate action, which is no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a754eb2b71b0e1e84844bdd8ae34bb1cb8e754f1 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add two nodes to the call graph:
- Root is the main function or 0.
- ExternalCallingNode has edges to all external functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
56a5d8087735438fcedea4ce3e22eb07d1d27e75 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add two nodes to the call graph:
- Root is the main function or 0.
- ExternalCallingNode has edges to all external functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
e0c993f0e4a0b09f96d2c274abb354aac6866ead 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add template specializations to view the call graph in dot format.
- change the DenseMap used in callgraph to std::map, since DenseMap cannot
be used with mapped_iterator and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
16a705f26d069a0c9e391bf064bcd1bc3496ca83 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add template specializations to view the call graph in dot format.
- change the DenseMap used in callgraph to std::map, since DenseMap cannot
be used with mapped_iterator and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
97443df414298cb0060f3c0956a2cb6ce7596504 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> constify methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
f7856437cfcf49523d81ebe1fc2351e3284dedfa 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> constify methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
cef9bcd1ca491aa26f2a15232fe0292a2d86cd60 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add getter methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
b85bca2676b433ae555db09de4dd2823ff13b856 23-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add getter methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
b77e00431c304bcdac06df03950b658b2fd388a6 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add newline at EOF.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/SaveAndRestore.h
25c155abc154a23ff59e8def196441a2fbf20270 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Add newline at EOF.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/SaveAndRestore.h
506543653ddbcd3fb8b6fd514f841e4af29353a9 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Revert r76831, there are many Analyzer test failures on multiple platforms.

--- Reverse-merging r76831 into '.':
U include/clang/Analysis/PathSensitive/GRExprEngine.h
U lib/Analysis/GRExprEngine.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
36292550118ebdd5e0fe8e46df74f7202046d316 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Revert r76831, there are many Analyzer test failures on multiple platforms.

--- Reverse-merging r76831 into '.':
U include/clang/Analysis/PathSensitive/GRExprEngine.h
U lib/Analysis/GRExprEngine.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
076d84ef05463f175fcb1377e16e7dab78ca5c1a 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Add initial implementation of checking for uses of floating point as a loop counter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/Analyses.def
dbfb5f853547c4cc2b4b39e90f01537dd317457a 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Add initial implementation of checking for uses of floating point as a loop counter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Frontend/Analyses.def
234e410417536afad6519b6e37b9305c656a7dd8 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Add instance predicate method to match static method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a4e70568ae8902d48aad215c16b0fc8b40308106 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Add instance predicate method to match static method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5d97ae754c9a9c5035a489468d7981385939a7d4 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Add 'previsit' Checker pass for ObjCMessageExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
7a2d953224e51b2b7d7cbf9194a1dbc1ca0be4a0 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Add 'previsit' Checker pass for ObjCMessageExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
99eb86b296883b55bb49b7c56c7ffa50039b351c 23-Jul-2009 Steve Naroff <snaroff@apple.com> Remove a bunch of FIXME's related to ObjC type checking.

- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4084c306635b70f37029dca938444e6013f08684 23-Jul-2009 Steve Naroff <snaroff@apple.com> Remove a bunch of FIXME's related to ObjC type checking.

- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
898f5745d68202867f72ccbc9fb4156fc43d26a7 23-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Add constructor used to initialize base/member in
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d7b27e1c17d40c72a1ccf8868315bf0c5271aa54 23-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Add constructor used to initialize base/member in
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
fa5209bec23edb26ae6c52f87b13418fed37224e 23-Jul-2009 Mike Stump <mrs@apple.com> Add warning for falling off the end of a function that should return a
value. This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall). I believe there should be very few false positives, though
the most interesting case would be:

int() { bar(); }

when bar does:

bar() { while (1) ; }

Here, we assume functions return, unless they are marked with the
noreturn attribute. I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.

If anyone spots other false positives, let me know!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b1682c50d26e0f12130d35b7b9b77d40542c4540 23-Jul-2009 Mike Stump <mrs@apple.com> Add warning for falling off the end of a function that should return a
value. This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall). I believe there should be very few false positives, though
the most interesting case would be:

int() { bar(); }

when bar does:

bar() { while (1) ; }

Here, we assume functions return, unless they are marked with the
noreturn attribute. I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.

If anyone spots other false positives, let me know!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
84a20812c8204f2210622729b8a41e53170baaad 23-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for out-of-line definitions of the class members of class
templates, e.g.,

template<typename T>
struct Outer {
struct Inner;
};

template<typename T>
struct Outer<T>::Inner {
// ...
};

Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.

There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
7cdbc5832084f45721693dfb1d93284c3e08efee 23-Jul-2009 Douglas Gregor <dgregor@apple.com> Implement support for out-of-line definitions of the class members of class
templates, e.g.,

template<typename T>
struct Outer {
struct Inner;
};

template<typename T>
struct Outer<T>::Inner {
// ...
};

Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.

There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
97f69d63fda7364d1eb465dfbe9a696cc1c63165 23-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Change Preprocessor to keep a copy of LangOptions instead of reference, like ASTContext.

Now when creating a Preprocessor we can pass it a temporary LangOptions object instead of having to remember to keep it around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ba1e898c64048e25cb65afec3807ad463e41914b 23-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change Preprocessor to keep a copy of LangOptions instead of reference, like ASTContext.

Now when creating a Preprocessor we can pass it a temporary LangOptions object instead of having to remember to keep it around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
c08c21e37a2f7f29d68bd464d07cfca0acf4b122 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.

Educate GRExprEngine::VisitGraph() about 'PreStmt'.

Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.

Constify a bunch of arguments, which falls out of the changes to ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/ProgramPoint.h
5f85e17df3f5b0a8021443f2b590daecfb2cbd17 23-Jul-2009 Ted Kremenek <kremenek@apple.com> Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.

Educate GRExprEngine::VisitGraph() about 'PreStmt'.

Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.

Constify a bunch of arguments, which falls out of the changes to ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/ProgramPoint.h
1e7aa5dc080d033b963fd4fa39944da93fe5bc89 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Use SaveAndRestore in 'clang/Analysis/Support/SaveAndRestore.h'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
6621bcf2a8ee0ff6d4b7c3df64407279d52ed23e 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Use SaveAndRestore in 'clang/Analysis/Support/SaveAndRestore.h'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
af4df4b3de20f4a2aac122f1f8e7ac25a29502d9 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add AssumeDual method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
67afec15ddbea77d9560165282542cbe1b413d01 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add AssumeDual method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
40035e215be90fbf8555364ac9a892be8d3ee705 22-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix the parsing of default arguments for inline member function
definitions.

I'm not very familiar with this code, so please review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d33133cdc1af466f9c276249b2621be03867888b 22-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix the parsing of default arguments for inline member function
definitions.

I'm not very familiar with this code, so please review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5131a00973c451344f40268d93fc94b1f6fca798 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Make 'SaveAndRestore' and friends reusable classes in libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/SaveAndRestore.h
bd0487825751230a4396952b770349d2beac60b3 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Make 'SaveAndRestore' and friends reusable classes in libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/SaveAndRestore.h
c905836f6173bc5b0491e5a6c8875347effefe8c 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add support for registering 'Checker' objects with GRExprEngine.
Add a 'previsit' stage (that dispatches to registered Checkers) when evaluating the effects of CallExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
5a5d98bc6962dc2d1aaa5e0e522f1bf84273b9c1 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add support for registering 'Checker' objects with GRExprEngine.
Add a 'previsit' stage (that dispatches to registered Checkers) when evaluating the effects of CallExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
8f592c492f8d7b95ff5ccd280fa13e48789bfca2 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add new 'Checker' and 'CheckerVisitor' classes, which represent a more powerful
interface to plug in domain-specific checker logic than the current
GRSimpleAPICheck interface. The new 'Checker' interface can actually generate
new nodes, allowing it to modify the state and refine the analysis (which
GRSimpleAPIChecks could not).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
29e543cc4cacfec24ccb888b1d82b92a98ffe99b 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add new 'Checker' and 'CheckerVisitor' classes, which represent a more powerful
interface to plug in domain-specific checker logic than the current
GRSimpleAPICheck interface. The new 'Checker' interface can actually generate
new nodes, allowing it to modify the state and refine the analysis (which
GRSimpleAPIChecks could not).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Checker.h
lang/Analysis/PathSensitive/CheckerVisitor.def
lang/Analysis/PathSensitive/CheckerVisitor.h
377ec10fbb8dfa678da9a501d49b6ef0b575effc 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
e01ac5712a94279db2404134817fe6bbf16c1f7c 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
54885ccbc0da28e0be4d1e4e4478704659c533e8 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add 'PreStmt' program point. This will be used to represent checking for
preconditions (in GRExprEngine) before the statement itself is evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
cdd4f1783da7c7565be2376d14ca6ab2625aa4b6 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Add 'PreStmt' program point. This will be used to represent checking for
preconditions (in GRExprEngine) before the statement itself is evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
c7a0e979e87a3821a5c286bd7266c9eba6a95fd1 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Implement operator= for ExplodedNodeSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
cc2c6eb04d882466c7cfbb544c251d7e0ba0f356 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Implement operator= for ExplodedNodeSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
22294412060d7af091b5fd44498693e3527a2113 22-Jul-2009 Mike Stump <mrs@apple.com> Make -Wreturn-type be part of -Wmost and therefore -Wall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
cd0c073cb7935dc7b468bd9c190535a46659bd74 22-Jul-2009 Mike Stump <mrs@apple.com> Make -Wreturn-type be part of -Wmost and therefore -Wall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
f73c851b2b05f4a5eabed6227179b49802ddc53c 22-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> "This patch implements the restrictions on union members detailed in
[class.union]p1", from John McCall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
1f2023ab8b35e0f665eb6c0f11dd6d9b9bca12b8 22-Jul-2009 Douglas Gregor <dgregor@apple.com> "This patch implements the restrictions on union members detailed in
[class.union]p1", from John McCall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
f375fe22015c77278945d0e05b79df5888808f49 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Move bug reporter "visitors" to their own file and make them part of the public
BugReporter API. No real functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
5350066e7b19d17a5b137caa6c039ab9626dbfa5 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Move bug reporter "visitors" to their own file and make them part of the public
BugReporter API. No real functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
3f03d52d973c6e2fd267163d416d6b3b642a84fe 22-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Implement parsing and semantic analysis for out-of-line definitions of static
data members of class templates. We don't instantiate the definitions yet,
however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dfe3f2d8ba49f03d01f42570e640d9a6755e6c08 22-Jul-2009 Douglas Gregor <dgregor@apple.com> Implement parsing and semantic analysis for out-of-line definitions of static
data members of class templates. We don't instantiate the definitions yet,
however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c862eb17e54cfd7a379ce941fbccbc841d39f1bc 22-Jul-2009 Mike Stump <mrs@apple.com> Add some documentation, to make it so the next person doens't select
the wrong function. :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
0c8c5365be0176e8399e97d7da3293c79bc9da24 22-Jul-2009 Mike Stump <mrs@apple.com> Add some documentation, to make it so the next person doens't select
the wrong function. :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
27bc49f518604f310aca9ed21be0bee12bdc6237 22-Jul-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6770276> Support Class<Proto> syntax.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76741 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
470301bac9c8abfc6b451b3b669c6695a9fd1518 22-Jul-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6770276> Support Class<Proto> syntax.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76741 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
26fe8b057b942827325911a819d126e9f930f6a4 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Restructure ProgramPoint to have the 'Kind' value be its own instance
variable. This gives us much more flexibility with defining more
ProgramPoints, which is the direction we are heading. The removal of
various bit-mangling of pointers also cleans up the logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
d6b9e37311013bdf24fd709f7e9962e3b141e6fb 22-Jul-2009 Ted Kremenek <kremenek@apple.com> Restructure ProgramPoint to have the 'Kind' value be its own instance
variable. This gives us much more flexibility with defining more
ProgramPoints, which is the direction we are heading. The removal of
various bit-mangling of pointers also cleans up the logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
01e249d790c57e1646f63bad466075a623e02f1b 22-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Minor mod. per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
cf1831204b2b575fc57b851172f0426559ae482c 22-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Minor mod. per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
179bcef0720c75c9efdd617e74f53306fd36eab1 22-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Complain if we're entering the context of a dependent nested-name-specifier but
cannot match that nested-name-specifier to a class template or class template
partial specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7551c183e8d788b5254e9c6f8bd8d719cea47da8 22-Jul-2009 Douglas Gregor <dgregor@apple.com> Complain if we're entering the context of a dependent nested-name-specifier but
cannot match that nested-name-specifier to a class template or class template
partial specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b462c32207196f76f3b2eb0b6bcaa11fbb2f3397 22-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Basic parsing and semantic analysis for out-of-line definitions of the
member functions of class templates, e.g.,

template<typename T>
struct X {
void f(T);
};

template<typename T> X<T>::f(T) { /* ... */ }



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f59a56e180bf54528d7d1d5afa68fcc13300965a 22-Jul-2009 Douglas Gregor <dgregor@apple.com> Basic parsing and semantic analysis for out-of-line definitions of the
member functions of class templates, e.g.,

template<typename T>
struct X {
void f(T);
};

template<typename T> X<T>::f(T) { /* ... */ }



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4e1272381cf2553bcc4394bc1690be1b954f6be6 22-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to accomodate Doug's comment on default
destruction of base/members for each destructor AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
393612e6c7727f1fee50039254d9f434364cc0b2 22-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to accomodate Doug's comment on default
destruction of base/members for each destructor AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
60ed82d28f0048e57ff0015e3a8bfc6e743ddbbc 21-Jul-2009 Ted Kremenek <kremenek@apple.com> Update stale comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
e38158de9236dfcded7da56126134e5e3e49cb01 21-Jul-2009 Ted Kremenek <kremenek@apple.com> Update stale comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
6cd3107b3d729dcba9ab57c2b0a50c0d7ed0a0cb 21-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
to SValuator::EvalCast. In the process, the StoreManagers now use this new cast
machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts
involving OSAtomicCompareAndSwap and friends has been removed (and replaced with
logic closer to the logic specific to those functions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
32c3fa4195762ba93f0b7114ab36c0941bc34432 21-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
to SValuator::EvalCast. In the process, the StoreManagers now use this new cast
machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts
involving OSAtomicCompareAndSwap and friends has been removed (and replaced with
logic closer to the logic specific to those functions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SValuator.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
e00f1cd9586335e759d978ab82a2942cd307f2d4 21-Jul-2009 Daniel Dunbar <daniel@zuster.org> driver: Print --version on stdout, to match gcc.
- Patch by Jean-Daniel Dupas


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
793007242ba209b68ce14ec7547ac70ee981303a 21-Jul-2009 Daniel Dunbar <daniel@zuster.org> driver: Print --version on stdout, to match gcc.
- Patch by Jean-Daniel Dupas


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
c495faafe8fdc1bae552bc53f9e16d547af9106d 21-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
the declaration context, as occurs with out-of-line class template member
definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3fdbed594f4cb238fe37cad2ec3fefa3b6f67125 21-Jul-2009 Douglas Gregor <dgregor@apple.com> Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
the declaration context, as occurs with out-of-line class template member
definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
48e539966b6ab97c12a5a39a4aff21d1bbf35feb 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when a destructor uses a unrelated class type as its name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c19f959d7fa5303f2fff5fa7a4968361cb7ef068 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when a destructor uses a unrelated class type as its name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9060d0e1f3cf3feccdc9022a33b79b4063fe7cd4 21-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Add the location of the tag keyword into TagDecl. From Enea
Zaffanella, with tweaks from Abramo Bagnara.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
741dd9a7e1d63e4e385b657e4ce11c5d96d44f72 21-Jul-2009 Douglas Gregor <dgregor@apple.com> Add the location of the tag keyword into TagDecl. From Enea
Zaffanella, with tweaks from Abramo Bagnara.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
0d0b565367d14559294a8340ca6f0dd6d28d8abb 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from Entity::getPrintableName().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/Entity.h
4c7c5a1d01d5e35aa6fb7724336c9506a88b6b62 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from Entity::getPrintableName().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/Entity.h
122ae34213e558eaf1c488d7213fd5c234ae7d08 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add an assert for safety check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
2bcb3439b50c7f227a21d7118a2a76904ec60331 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add an assert for safety check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3adf26a7ebec30e19b3b3a357c90b6e3c1680663 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Fix a crash that occurs in this C++ case:

struct foo {
static bool value;
};
bool (foo::value); // crash because of parens

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f37006bc8a9d398d40d6ce329f023ed1a92fe484 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a crash that occurs in this C++ case:

struct foo {
static bool value;
};
bool (foo::value); // crash because of parens

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
fc02c8218c90fe1ec183fea7ba82eeed9b90bd07 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Keep only canonical Decls in Entities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
1f717270d0ef91918413a05d513474db7a9b4c3e 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep only canonical Decls in Entities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
ff08826d5f83fbf105ab043a18d515e55e32ab1f 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Change the semantics for Entity.

Entity can now refer to declarations that are not visible outside the translation unit.
It is a wrapper of a pointer union, it's either a Decl* for declarations that don't
"cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl.

Included is a test case for handling fields across translation units.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/Entity.h
lang/Index/EntityHandler.h
lang/Index/IndexProvider.h
f7cf15ca3c9bee7c0348f549e7a8f0af32b5fa54 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change the semantics for Entity.

Entity can now refer to declarations that are not visible outside the translation unit.
It is a wrapper of a pointer union, it's either a Decl* for declarations that don't
"cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl.

Included is a test case for handling fields across translation units.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/Entity.h
lang/Index/EntityHandler.h
lang/Index/IndexProvider.h
29c3387a826f2efea0882bb304a9699744a3f8f4 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Implement the virtual getNextRedeclaration() for ObjCMethodDecl.

If it's in an ObjCContainerDecl, its "redeclaration" is the method definition in the corresponding ObjCImplDecl.
If it's in an ObjCImplDecl, its "redeclaration" is the method in the interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
57ea6bee79cc60ba20c7886b453f40f380dce1b1 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement the virtual getNextRedeclaration() for ObjCMethodDecl.

If it's in an ObjCContainerDecl, its "redeclaration" is the method definition in the corresponding ObjCImplDecl.
If it's in an ObjCImplDecl, its "redeclaration" is the method in the interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
467a23c408c93a9c92e65fe1d99146c3c82c8e93 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add an assertion for the return value of Decl::getNextRedeclaration().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
22cbd2b794676c3b29c2b401c26730ed7047809e 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add an assertion for the return value of Decl::getNextRedeclaration().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
200968606a3c72e1e53efc2a8ebe48f1e1510706 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the ObjCCategoryImpls vector from Sema class.
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
1cb35dd4840d21cec58648361180d5688446a9ca 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ObjCCategoryImpls vector from Sema class.
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
3a4d98341a3b016f6bf2559dde5f3d9d8bf5f358 21-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> - Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate
an interface/category with its implementation (if one exists).

- Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods.

- Add a compiler error for when a category is reimplemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
8a1d722f13df383600f36d77f842957c8adb5f1b 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> - Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate
an interface/category with its implementation (if one exists).

- Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods.

- Add a compiler error for when a category is reimplemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.td
bf560028f96f190fa27059ae1b414dd02705f0dd 21-Jul-2009 Mike Stump <mrs@apple.com> Add yet more analysis for CFGs involving conditionals that are actually constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
e5af3ce53ec58995b09381ba645ab2117a46647b 21-Jul-2009 Mike Stump <mrs@apple.com> Add yet more analysis for CFGs involving conditionals that are actually constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
87cffe3629e0dfb40d611fd50a30ef4ee423beac 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Improve message for bad destructor decl. Per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
76ed9cb1d7398bb721cb9df67b3004c14dae8aa8 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Improve message for bad destructor decl. Per Doug's comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
9c2aefb2845f600a09a8046072bae296d8eff565 21-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Reuse VarDecl::Init to store the default argument of a ParmVarDecl,
reducing the size of ParmVarDecl by one pointer. Also means that we'll
properly (de-)serialize default arguments in C++ PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
75f1af02091235a21180cf22ac9f7dd0025577f6 21-Jul-2009 Douglas Gregor <dgregor@apple.com> Reuse VarDecl::Init to store the default argument of a ParmVarDecl,
reducing the size of ParmVarDecl by one pointer. Also means that we'll
properly (de-)serialize default arguments in C++ PCH files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
275c49779bf240c26fa4e1c05ac970a53de69da5 20-Jul-2009 Mike Stump <mrs@apple.com> Remove an apparently unused forward class decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
02f43e71121d1c9cc4baed7b21770b66fe1f4305 20-Jul-2009 Mike Stump <mrs@apple.com> Remove an apparently unused forward class decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFG.h
feac54e7fa947812980016cef743955432e6c11e 20-Jul-2009 Ted Kremenek <kremenek@apple.com> Update DataflowSolver to handle the case where a successor/predecessor block
could be NULL. This allows the solver to handle optimized CFGs where branches
can be determined during CFG-construction to be infeasible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
0b5a07d3a08e84f5c73aedacdda176c5cdb77c4e 20-Jul-2009 Ted Kremenek <kremenek@apple.com> Update DataflowSolver to handle the case where a successor/predecessor block
could be NULL. This allows the solver to handle optimized CFGs where branches
can be determined during CFG-construction to be infeasible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
1dcc023ca7043b6951647492a40aad894ec25695 20-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Improve GCC compatibility by allowing static tentative definitions of
incomplete type (with a warning), from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ec8b59ffc30c65051070e6d6cbb8e4b419210d18 20-Jul-2009 Douglas Gregor <dgregor@apple.com> Improve GCC compatibility by allowing static tentative definitions of
incomplete type (with a warning), from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5f3021960ff0e3a3c789de9a4462da07c3b46edf 20-Jul-2009 Ted Kremenek <kremenek@apple.com> Enhance GRBranchNodeBuilderImpl (part of GRCoreEngine) to understand the case
where the true or false CFGBlock* for a branch could be NULL. This will handle
the case where we can determine during CFG construction that a branch is
infeasible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
520035439d7133064325c4df6378c5a8f2f05539 20-Jul-2009 Ted Kremenek <kremenek@apple.com> Enhance GRBranchNodeBuilderImpl (part of GRCoreEngine) to understand the case
where the true or false CFGBlock* for a branch could be NULL. This will handle
the case where we can determine during CFG construction that a branch is
infeasible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
1b8fd7590f37696e93b65e4b2122c19f29fc1cf2 20-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a more descriptive diagnostics when mis-declaring
a destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
d33c868d386ef47c2942e2dbff0d9955a8591fa9 20-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a more descriptive diagnostics when mis-declaring
a destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
d6fee63e73bad455647d9218cf6236cf515bd537 19-Jul-2009 Ted Kremenek <kremenek@apple.com> Improve debug pretty-printing for ObjCIVarRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
bcfe03a0beb61082fa2f40887216d8dbca19a024 19-Jul-2009 Ted Kremenek <kremenek@apple.com> Improve debug pretty-printing for ObjCIVarRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
f90b6d72a924303412b3099afcae6765034e732d 19-Jul-2009 Chris Lattner <sabre@nondot.org> enhance the goto checker to reject jumps across __block variable definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
be6d259a375bbec49659d54a302c4758058f2eef 19-Jul-2009 Chris Lattner <sabre@nondot.org> enhance the goto checker to reject jumps across __block variable definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a035994089b81de429a362590714c89d6097c331 18-Jul-2009 Anders Carlsson <andersca@mac.com> Rename NextOffset to DataSize, which better matches the Itanium C++ ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
243a68551ac9ec71bf341e062418e33eb4f286ff 18-Jul-2009 Anders Carlsson <andersca@mac.com> Rename NextOffset to DataSize, which better matches the Itanium C++ ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
5d3825891051fa6009e63f4862c33b4090442b81 18-Jul-2009 Anders Carlsson <andersca@mac.com> Migrate over to the record layout builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
29445a0542d128cd7ee587ee52229670b9b54a12 18-Jul-2009 Anders Carlsson <andersca@mac.com> Migrate over to the record layout builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
ec63557566268ece37c917d484995199202f3964 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
dc50c64c13322dd81b10263cbb023fb1f7eae1fd 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
1f11cc7e6599307202352c905cd3fc7dbd8da47b 18-Jul-2009 Anders Carlsson <andersca@mac.com> More layout builder work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
93fab9d67ca62e3e291803e5a1309473d6e00344 18-Jul-2009 Anders Carlsson <andersca@mac.com> More layout builder work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
eba0868ee14aec8b1d137feac786ffc5322132f4 18-Jul-2009 Anders Carlsson <andersca@mac.com> Add a new ASTRecordLayoutBuilder class. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
bda4c1015e27ac82d31afb4519dd53586e61a51a 18-Jul-2009 Anders Carlsson <andersca@mac.com> Add a new ASTRecordLayoutBuilder class. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
63f1ad9bb3a6330182b1d2e6477e316ce499ccd5 18-Jul-2009 Anders Carlsson <andersca@mac.com> Revert r75641.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTRecordLayout.h
lang/AST/RecordLayout.h
19cc4abea06a9b49e0e16a50d335c064cd723572 18-Jul-2009 Anders Carlsson <andersca@mac.com> Revert r75641.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTRecordLayout.h
lang/AST/RecordLayout.h
77763c58e3b7783c8e54671c2b696ecd81ed524f 18-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ObjCQualifiedInterfaceType:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
c15cb2af27514ecc879daba9aa01389c5203685d 18-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ObjCQualifiedInterfaceType:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
efece9a9f7d61b7892dd1370a97429114b1eb5e2 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ac4e3794c60fc194fb2bd9764aa81d4cae530ecc 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
4253ec52f603b100f545440d74a737f0e42e2bdc 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce a redecl_iterator in Decl class, so that we can do a "iterate over all declarations of the same decl" without knowing the exact type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
1e4bc099882626059f14d687ed7a1a5518b7f3c2 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce a redecl_iterator in Decl class, so that we can do a "iterate over all declarations of the same decl" without knowing the exact type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
80ad73bad9b360387336ef4c87d98b66f97b6926 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the Redeclarable template class, which serves as a base type defining the common interface for Decls that can be redeclared.
Make FunctionDecl and VarDecl use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Redeclarable.h
f23e839e9ddea324c743d26da43fb767f90ca223 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the Redeclarable template class, which serves as a base type defining the common interface for Decls that can be redeclared.
Make FunctionDecl and VarDecl use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Redeclarable.h
e9d5bb076ba865bb636c7271cd5d104cb5655134 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove getFirstDeclaration/getLatestDeclaration from FunctionDecl and VarDecl.

Their usefulness is questionable since redecl_iterator was introduced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f00068bd7540639405130ff658025d863da41744 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove getFirstDeclaration/getLatestDeclaration from FunctionDecl and VarDecl.

Their usefulness is questionable since redecl_iterator was introduced.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
17c7cab301f05a9e88924b00f5988eecdca2c12f 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
97fbaa2a38804268a024f1a104b43fcf8b4411b0 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e3fb785e3bed062f3d0fe49b6beead5ba27d7136 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move the functionality of ASTContext::getCanonicalDecl(), into a virtual method Decl::getCanonicalDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclTemplate.h
b57a4fe73b8227c0dba651818b8495dfca61e530 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the functionality of ASTContext::getCanonicalDecl(), into a virtual method Decl::getCanonicalDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclTemplate.h
c5c807c17608381e6019f714fe594a49ee9cc955 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Set ObjCMethodDecl's EndLoc to the '}' when it's a definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a2e85ada1dfef36201a31f6646bc4ea3bd76a89a 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set ObjCMethodDecl's EndLoc to the '}' when it's a definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f856701d5116b235e2ea551f81212dab24cfa0d4 18-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add getSourceRange() methods for ObjC Decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ddfd4c9eda34765b08fae4cb31ad5a365face107 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add getSourceRange() methods for ObjC Decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d9b39bfecbc4faec367c3b2b53b8a3c7f71bdc3b 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Type.h
lang/Analysis/PathSensitive/MemRegion.h
35366a67baa970c287c714c957cf78a4131cf60d 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Type.h
lang/Analysis/PathSensitive/MemRegion.h
c2bc147fbf50fb8d3caf93744f25719aea739dca 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename Entity::getName() to Entity::getPrintableName() to make its purpose
more obvious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/Entity.h
56aac3f6c2d23c68f527c8225c74d833e534a262 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename Entity::getName() to Entity::getPrintableName() to make its purpose
more obvious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
lang/Index/Entity.h
95ed5d0eb6e1c2186c740f2e84b1cae0d7e52aba 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> As suggested by Argyrios, revert r76159 and make "FindImmediateParent"
a public static method of ASTLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
7f66bd28b5e9016f2f6f4ddc52e083352f90ed11 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> As suggested by Argyrios, revert r76159 and make "FindImmediateParent"
a public static method of ASTLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
c2aab6fc972d6f5f1d32897768ab9673f930d3c1 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor code into a new CallExpr::getDirectCallee() method. Simplify some
code with the new method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a00425414e8c209cabc25d1826b200aeb94259af 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Refactor code into a new CallExpr::getDirectCallee() method. Simplify some
code with the new method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
05654fb2f2cfff69006b4ba95bd3f37368024232 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Relax the assertion in ASTLocation's ctor: if the decl is not the immediate
parent of the stmt, find the immediate parent for the stmt.

This is because sometimes we cannot get the immediate decl of the stmt when
creating the ASTLocation. We can only get a parent of the stmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
adfc8d14ce2e5611aa366cb9135fa20095b7d191 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Relax the assertion in ASTLocation's ctor: if the decl is not the immediate
parent of the stmt, find the immediate parent for the stmt.

This is because sometimes we cannot get the immediate decl of the stmt when
creating the ASTLocation. We can only get a parent of the stmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
ba64f383fb78804eb87fe2c237285d2bc24d9fc1 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> CallGraph:
- add IfStmt visitor.
- print information only when a function has callee. Otherwise its ASTContext
map is NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
24ff030f400b261c142bab748bf2d26e5aaa948c 17-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> CallGraph:
- add IfStmt visitor.
- print information only when a function has callee. Otherwise its ASTContext
map is NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
60d5671481f35143349d08261af20f08facbde17 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5cad1f74469d4d8b4fc51fe53a7837778aeb6107 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8a9cddd2edc7f89ebba24b63435fcb62769614f5 17-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> ObjCCategoryImplDecl and ObjCImplementation do not derive directly from DeclContext but from a new abstract ObjCImplDecl.
Reflect this change on the "DeclContext hierarchy".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
bfb498d0996ef049efe9476f2802976fd145cd60 17-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> ObjCCategoryImplDecl and ObjCImplementation do not derive directly from DeclContext but from a new abstract ObjCImplDecl.
Reflect this change on the "DeclContext hierarchy".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/AST/DeclObjC.h
6a6c0971f29d9fb7cb5e7318a4a493ed1331258c 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
808825cd08704d1cccef605f8cd3ef83c93eac78 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Replace Type::getAsReferenceType() with Type::getAs<ReferenceType>().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f5de0a3cbaa216daf2ea7e42611bbd1ebad42fa7 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.

The motivation behind this change is twofold:

1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.

2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.

Along with this patch:

a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Type.h
lang/Analysis/PathSensitive/MemRegion.h
1a1a6e2bd4c5aefd7fd643cf25915f9623a02e59 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.

The motivation behind this change is twofold:

1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.

2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.

Along with this patch:

a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Type.h
lang/Analysis/PathSensitive/MemRegion.h
ba927fcab0eb1748bed5bf8af58507116a9dc522 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Move the source-level CFG from libAST to libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
e41611aa2237d06a0ef61db4528fb2883a8defcd 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Move the source-level CFG from libAST to libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramPoint.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
a960479e82ebf6c28dfc5843f0d8bf34db5702e3 16-Jul-2009 Steve Naroff <snaroff@apple.com> Cleanup a couple loops and improve a comment (based on feedback from Fariborz).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8f16756441450ed9fb39316e47d107fc2a1ef35b 16-Jul-2009 Steve Naroff <snaroff@apple.com> Cleanup a couple loops and improve a comment (based on feedback from Fariborz).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ad75bd277827709b7597fb94de498548bff4ee23 16-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f49545602089be5b1f744e04326b8a566f6d8773 16-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fa011bdce0fb4da854bbaee2e9038cad8470598b 16-Jul-2009 Chris Lattner <sabre@nondot.org> codegen string literals using private linkage now like llvm-gcc, eliminating
some target hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
95b851e55c328af4b69da7bfc1124bf258c0ffe5 16-Jul-2009 Chris Lattner <sabre@nondot.org> codegen string literals using private linkage now like llvm-gcc, eliminating
some target hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
369239cdd9a2dc7b9044064d1404fc36cf378925 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Move RegionStoreManager over to using new
ValueManager::makeArrayIndex()/convertArrayIndex() methods. This
handles yet another crash case when reasoning about array indices of
different bitwidth and signedness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SValuator.h
465373946b5ae84f7c3d890cc25cb23fd88dd650 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Move RegionStoreManager over to using new
ValueManager::makeArrayIndex()/convertArrayIndex() methods. This
handles yet another crash case when reasoning about array indices of
different bitwidth and signedness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SValuator.h
40d9c5882878c29f607470d529ac2a1d2db5c054 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Two changes:

(1) Moved the SValuator object from GRExprEngine to ValueManager. This
allows ValueManager to use the SValuator when creating SVals.

(2) Added ValueManager::makeArrayIndex() and
ValueManager::convertToArrayIndex(), two SVal creation methods
that will help RegionStoreManager always have a consistent set of
SVals with the same integer size and type when reasoning about
array indices.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueManager.h
06669c8e5c24251f6b140298148fbe53ab70a936 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Two changes:

(1) Moved the SValuator object from GRExprEngine to ValueManager. This
allows ValueManager to use the SValuator when creating SVals.

(2) Added ValueManager::makeArrayIndex() and
ValueManager::convertToArrayIndex(), two SVal creation methods
that will help RegionStoreManager always have a consistent set of
SVals with the same integer size and type when reasoning about
array indices.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueManager.h
be36bb28e6e97f1ea660027648ff6a88aa4d1c1a 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Generate error on declaration containing 'static' and '__attribute__((weak))'
Patch by Ryan Flynn


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f23ecd91bf0205b776dfab2c5231e895019a7400 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Generate error on declaration containing 'static' and '__attribute__((weak))'
Patch by Ryan Flynn


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a62ad24ee357721a7f5d6d4111ae5ef563a8aab9 16-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Commit the initial implementation of call graph building.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
6bd8fb50acadeeafd923e98cd6a94efeb75693dc 16-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Commit the initial implementation of call graph building.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CallGraph.h
0a51a999d5088c470c6714522231076dbd1c684d 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a stinko which caused an ast-print test failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
a8ded8be82f7d5f5fc93c8626cfa9ca9cee4199e 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a stinko which caused an ast-print test failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
21e25e780b1a6a44bedef0dae4e89ebb982cacd1 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Added ASTs to destructor decl AST for default destruction of object's
base/members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
560de45ccbf21c5e4dbeef3fc49f932e499cc181 16-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Added ASTs to destructor decl AST for default destruction of object's
base/members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
578a5f91b5d5d58d61b2896c88bcf3baca29964e 15-Jul-2009 Steve Naroff <snaroff@apple.com> Remove default argument, since it isn't being used (suggested by Fariborz).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c02397509bb4057f3a7d6f5f4d764d122ed2381f 15-Jul-2009 Steve Naroff <snaroff@apple.com> Remove default argument, since it isn't being used (suggested by Fariborz).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9f324ae90f87c56d3c1fc87b27bb9b6ebdf277b0 15-Jul-2009 Steve Naroff <snaroff@apple.com> Add a "t".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f6265efe7e35fb0fba315da6391368aeee1e57c9 15-Jul-2009 Steve Naroff <snaroff@apple.com> Add a "t".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75810 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7bffd37bd2642e9d1bf0d093e9c1a7b3467f3014 15-Jul-2009 Steve Naroff <snaroff@apple.com> Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective).

This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-).

This patch also adds Type::isObjCBuiltinType().

This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/PCHBitCodes.h
de2e22d33afec98324a66a358dfe0951b3c7259a 15-Jul-2009 Steve Naroff <snaroff@apple.com> Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective).

This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-).

This patch also adds Type::isObjCBuiltinType().

This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.td
lang/Frontend/PCHBitCodes.h
6ae4efab37c530a2a9d4a21f512614e9bc3e7f6c 15-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add getName() method to Entity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
53363b26d2bd5ae7890957d7acabfd407bd362b7 15-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add getName() method to Entity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
2b5c5a04c880f80c2249678baf7f8378134d9a00 15-Jul-2009 Ted Kremenek <kremenek@apple.com> More test cases revealed that the logic in StoreManager::InvalidateRegion() needs more finesse when handling the invalidation of pointers. Pointers that were invalidated as integers could later cause problems for clients using them as pointers. It is easier for us to model a symbolic value as a pointer rather than modeling a non-symbolic value as a pointer.

This patch causes:
- StoreManager::InvalidateRegion() to not used the casted type of a region if
it would cause a pointer type to be invalidated as a non-pointer type.
- Pushes RegionStore::RetrieveElement() further by handling retrievals from
symbolic arrays that have been invalidated. This uses the new SymbolDerived
construct that was recently introduced.

The result is that the failing test in misc-ps-region-store-x86_64.m now passes.
Both misc-ps-region-store-x86_64.m and misc-ps-region-store-i386.m contain a
test case that motivated this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
a6275a534da701f37d19a068e6361e5f10f983a1 15-Jul-2009 Ted Kremenek <kremenek@apple.com> More test cases revealed that the logic in StoreManager::InvalidateRegion() needs more finesse when handling the invalidation of pointers. Pointers that were invalidated as integers could later cause problems for clients using them as pointers. It is easier for us to model a symbolic value as a pointer rather than modeling a non-symbolic value as a pointer.

This patch causes:
- StoreManager::InvalidateRegion() to not used the casted type of a region if
it would cause a pointer type to be invalidated as a non-pointer type.
- Pushes RegionStore::RetrieveElement() further by handling retrievals from
symbolic arrays that have been invalidated. This uses the new SymbolDerived
construct that was recently introduced.

The result is that the failing test in misc-ps-region-store-x86_64.m now passes.
Both misc-ps-region-store-x86_64.m and misc-ps-region-store-i386.m contain a
test case that motivated this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
9787675acb4aabc9e8eea8350dbd5faaffe27f93 15-Jul-2009 Ted Kremenek <kremenek@apple.com> Introduced the notion of a "derived symbol" using the class SymbolDerived.
SymbolDerived allows us to model symbolic values that are related to other
symbols via a region hierarchy. For example, SymbolDerived can be used to model
individual values of a symbolic array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
fb91c70e24e20f8704edf9bc5049ffbe7e234a38 15-Jul-2009 Ted Kremenek <kremenek@apple.com> Introduced the notion of a "derived symbol" using the class SymbolDerived.
SymbolDerived allows us to model symbolic values that are related to other
symbols via a region hierarchy. For example, SymbolDerived can be used to model
individual values of a symbolic array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
7e92d3516490f5edfc60903e573342020d54ef4c 14-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Remove -ftraditional option, which gcc doesn't actually support. Make
using -traditional and -traditional-cpp with clang an error because
it's unsupported in clang and causes a significant change in the
semantics of the language.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
ceb5c5b7f67a30fae305d1d19b478b623e4fbced 14-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Remove -ftraditional option, which gcc doesn't actually support. Make
using -traditional and -traditional-cpp with clang an error because
it's unsupported in clang and causes a significant change in the
semantics of the language.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
79ae19a7c9421e17ba26ea9cbf5a7f4dcc015cde 14-Jul-2009 Steve Naroff <snaroff@apple.com> Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).

I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Analysis/PathSensitive/SVals.h
58f9f2c884af6b72d036b746a016d8031d31cb7a 14-Jul-2009 Steve Naroff <snaroff@apple.com> Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).

I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Analysis/PathSensitive/SVals.h
9294d19c99e38be44342f84051431c371ccd4983 14-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build AST for ctor's initializer list according to
semantics of order of construction [class.init].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d01c915dda27bb0045687f0a08bbcab1dd40e652 14-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build AST for ctor's initializer list according to
semantics of order of construction [class.init].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7558ec6134e0291f6aa01a31d737848423fe642a 14-Jul-2009 Anders Carlsson <andersca@mac.com> Rename RecordLayout.h to ASTRecordLayout.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTRecordLayout.h
lang/AST/RecordLayout.h
3d598a5ab3c8aabce0a03a2f5dea65eee643e5ac 14-Jul-2009 Anders Carlsson <andersca@mac.com> Rename RecordLayout.h to ASTRecordLayout.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTRecordLayout.h
lang/AST/RecordLayout.h
b79574e54f3e1b135b87511399ea63363654c2ad 14-Jul-2009 Steve Naroff <snaroff@apple.com> Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.

Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ea218b8e8f9ba82d1c76bcb7e86d121a5f65ebed 14-Jul-2009 Steve Naroff <snaroff@apple.com> Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.

Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2bcacb61cf94b71e5c87f29d517f8dc29fe3993e 14-Jul-2009 Alisdair Meredith <public@alisdairm.net> Basic support for C++0x unicode types. Support for literals will follow in an incremental patch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/TargetInfo.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
lang/Parse/DeclSpec.h
f5c209d23b20ada4a9b6235db50317239cbf6ae1 14-Jul-2009 Alisdair Meredith <public@alisdairm.net> Basic support for C++0x unicode types. Support for literals will follow in an incremental patch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/TargetInfo.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
lang/Parse/DeclSpec.h
1d2f3a31ce12054cf7ef8b20822c0c533cba783c 14-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce redecl_iterator, used for iterating over the redeclarations of a FunctionDecl or VarDecl.

It iterates over all the redeclarations, regardless of the starting point. For example:

1) int f();
2) int f();
3) int f();

if you have the (2) FunctionDecl and call redecls_begin/redecls_end to iterate, you'll get this sequence:
(2)
(1)
(3)

The motivation to introduce this was that, previously, if (3) was a function definition,
and you called getBody() at (2), it would not return it, since getBody() iterated over the previous declarations only,
so it would only check (2) and (1).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c37929c9e0dba89770dc5f0fbcfa0c9046da0b06 14-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce redecl_iterator, used for iterating over the redeclarations of a FunctionDecl or VarDecl.

It iterates over all the redeclarations, regardless of the starting point. For example:

1) int f();
2) int f();
3) int f();

if you have the (2) FunctionDecl and call redecls_begin/redecls_end to iterate, you'll get this sequence:
(2)
(1)
(3)

The motivation to introduce this was that, previously, if (3) was a function definition,
and you called getBody() at (2), it would not return it, since getBody() iterated over the previous declarations only,
so it would only check (2) and (1).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
349185b29adbc4d043a4be22853f59c611cf22db 14-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce FunctionDecl::getLatestDeclaration() and VarDecl::getLatestDeclaration().

For multiple redeclarations they return the last one.

Also, add some non const versions of methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
03d5e3d03117a56097cea98f53198fb20de1eb35 14-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce FunctionDecl::getLatestDeclaration() and VarDecl::getLatestDeclaration().

For multiple redeclarations they return the last one.

Also, add some non const versions of methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9f000a334de72476b5dd0cf4548b845f751fe469 14-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce FunctionDecl::getFirstDeclaration() and VarDecl::getFirstDeclaration().

For multiple redeclarations they return the first one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7bf792fdde4641d865eba4a068d862d5300bd1e4 14-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce FunctionDecl::getFirstDeclaration() and VarDecl::getFirstDeclaration().

For multiple redeclarations they return the first one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a06a9dab263393b51d684461338946c552e1e23c 14-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Read/write a CXXOperatorCallExpr from/to PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
ba0a9006dbc4814e1e35f82812cb5a1dad65e8b8 14-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Read/write a CXXOperatorCallExpr from/to PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Frontend/PCHBitCodes.h
eb92564b8e5ab9eaadb835b0bf6aee735aa4f370 14-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Pass the right brace SourceLocation from the Parser to the TagDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
07a5b282fbe719986df9ed05543081ea0ed94aa5 14-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass the right brace SourceLocation from the Parser to the TagDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b929dccf22b22a9e9dd09758a7d95227e8a19633 14-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add the SourceLocation for the right brace in TagDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f602c8b6ce1a269c0bf8b3f049e923f4ea5c18e2 14-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add the SourceLocation for the right brace in TagDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
92be7ce342ce6e07cd3a3ba3920193fa284cd279 14-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Instead of recovering from a wrong invalidation, this patch aims to
invalidate the region correctly. It uses the cast-to type to invalidate
the region when available. To avoid invalid cast-to type like 'void*' or 'id',
region store now only records non-generic casts of regions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
8203725f37fbb45ded343e4378247fee3389c0da 14-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Instead of recovering from a wrong invalidation, this patch aims to
invalidate the region correctly. It uses the cast-to type to invalidate
the region when available. To avoid invalid cast-to type like 'void*' or 'id',
region store now only records non-generic casts of regions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
42d8d0ec56ba6586e201d715611fa11299d99ad7 14-Jul-2009 Ted Kremenek <kremenek@apple.com> Tidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', and implementing operator<< support for llvm::raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
6f9b3a4d7143362d3c2ac1f843d76971799f5b97 14-Jul-2009 Ted Kremenek <kremenek@apple.com> Tidy pretty-printing for SVals, using 'dump()' instead of 'printStdErr()', and implementing operator<< support for llvm::raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
faf9487df365a8494f67e5884b88abdf1c3c8ada 14-Jul-2009 Ted Kremenek <kremenek@apple.com> Change pretty-printing API for SymExprs and MemRegions to use a naming convention and style similar to other elements in Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SymbolManager.h
8800ad4eaa1621f6d23c8264971063b9f8da6a2e 14-Jul-2009 Ted Kremenek <kremenek@apple.com> Change pretty-printing API for SymExprs and MemRegions to use a naming convention and style similar to other elements in Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SymbolManager.h
898111463b64a26d55af56474ad8cca1fdb76268 13-Jul-2009 Steve Naroff <snaroff@apple.com> - Improve comment for Type::getPointeeType().
- Remove a couple redundant casts/returns.
- Fix 80 column violations for all getAsStringInternal() methods.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f8910df57799256c1897a8610dc52685729ae90e 13-Jul-2009 Steve Naroff <snaroff@apple.com> - Improve comment for Type::getPointeeType().
- Remove a couple redundant casts/returns.
- Fix 80 column violations for all getAsStringInternal() methods.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
280333958656d52ff846058f4aa996f119bba560 13-Jul-2009 Daniel Dunbar <daniel@zuster.org> Match declaration to definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/PCHReader.h
eb19485625c7529ffa644e10829533157a8e8d4f 13-Jul-2009 Daniel Dunbar <daniel@zuster.org> Match declaration to definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/PCHReader.h
198e8e46d0bfe535f044df35d1b87da86a148a84 13-Jul-2009 Daniel Dunbar <daniel@zuster.org> Match declaration to definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/AST/TemplateName.h
lang/AST/Type.h
3b4ea54acf01f72f6eb74d96689dda86d950228f 13-Jul-2009 Daniel Dunbar <daniel@zuster.org> Match declaration to definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/AST/TemplateName.h
lang/AST/Type.h
ec3e0d638fc7b8c38deeb6bb8795e45dd6e1c078 13-Jul-2009 Chris Lattner <sabre@nondot.org> fix typo in file headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/IndexProvider.h
lang/Index/TranslationUnit.h
56a906cb66ee5729ce2c291e3f310531b8ebabd1 13-Jul-2009 Chris Lattner <sabre@nondot.org> fix typo in file headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/IndexProvider.h
lang/Index/TranslationUnit.h
a27827a75d464ad4c4020ecd51b7d3a275865f97 13-Jul-2009 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Program.h
176e8d404f49952104a136635a4bbfe31a927a50 13-Jul-2009 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Program.h
dab77f1143e8bb77b9107a81fa311af5355f87c5 12-Jul-2009 Chris Lattner <sabre@nondot.org> add push/pop semantics for diagnostics. Patch by Louis Gerbarg!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticLexKinds.td
04ae2df026b275aae5dddfc0db5ca55ff4e62179 12-Jul-2009 Chris Lattner <sabre@nondot.org> add push/pop semantics for diagnostics. Patch by Louis Gerbarg!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticLexKinds.td
68acecb4d2a3aa824de5551c16d9bdcecd854188 11-Jul-2009 Anders Carlsson <andersca@mac.com> Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
6a75cd9c1d54625fca7b5477ab9545bcdbd85ea4 11-Jul-2009 Anders Carlsson <andersca@mac.com> Implement more of C++0x 'auto'. A variable with an auto type specifier must have an initializer. Also, move some tests around to match the C++0x draft better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
329ec22704eee011640ebf37c29343e82fb984c6 11-Jul-2009 Steve Naroff <snaroff@apple.com> This patch includes a conceptually simple, but very intrusive/pervasive change.

The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Analysis/PathSensitive/SVals.h
14108da7f7fc059772711e4ffee1322a27b152a7 11-Jul-2009 Steve Naroff <snaroff@apple.com> This patch includes a conceptually simple, but very intrusive/pervasive change.

The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Analysis/PathSensitive/SVals.h
c1ce61b59d6d0c462133d0d375679bf822866e14 10-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build list of inherited virtual base classes
in their order of construction for each class and use it
to to check on propery order of base class construction
under -Wreorder option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
40c072f44ff081293f79909ecc518af23938108e 10-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build list of inherited virtual base classes
in their order of construction for each class and use it
to to check on propery order of base class construction
under -Wreorder option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
42f394e67047624dcc15d22239f615885ad712ac 10-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a problem that Eli noticed, and that Doug helped me fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
563a03b1338d31c2462def43253a722bc885d384 10-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a problem that Eli noticed, and that Doug helped me fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
72d1f3992e22da89b2e0afa3ca09b539955c5e01 10-Jul-2009 Ted Kremenek <kremenek@apple.com> Rename potentially ambiguous member template 'getRegion' to 'getSubRegion' to hopefully resolve template lookup ambiguities on some compilers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
eeea45611d45238c34474c183cee96d47ae79e24 10-Jul-2009 Ted Kremenek <kremenek@apple.com> Rename potentially ambiguous member template 'getRegion' to 'getSubRegion' to hopefully resolve template lookup ambiguities on some compilers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
35ad6206c3fda6fa2ca126162b43970702759d4c 10-Jul-2009 Ted Kremenek <kremenek@apple.com> Switch BasicStoreManager to use the new CastRegion implementation by default,
and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with
'-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation
around for a little while for regression testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
lang/Frontend/Analyses.def
c037eac3bda3c636c961aab6377beea3242e81e4 10-Jul-2009 Ted Kremenek <kremenek@apple.com> Switch BasicStoreManager to use the new CastRegion implementation by default,
and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with
'-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation
around for a little while for regression testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
lang/Frontend/Analyses.def
4732543017ef10cfadaeffb3e677d6e09d326108 10-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> don't crash if class is using itself as its super class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fdee089b11e0bb57aa2c7291dd5e4201c2f906ff 10-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> don't crash if class is using itself as its super class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cca8d8d5d553dabed70e2d11dd18ccfd33bb2703 09-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Sema check on out of order object initialization of
class object's base and members under -Wreorder flag.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
eb96e1275206b888eee484aac8b1b693417c6521 09-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Sema check on out of order object initialization of
class object's base and members under -Wreorder flag.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
4e8d569581255e2749e578cf357dc58630ce4ebc 09-Jul-2009 Anders Carlsson <andersca@mac.com> Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
9b31df4acdeeb61bb084a03fc37bc5bd570a659e 09-Jul-2009 Anders Carlsson <andersca@mac.com> Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a142a05732cac5218bd4f1a53880abce9a66bbea 09-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Implement the simple form of overload resolution used when taking the
address of an overloaded function (which may involve both functions
and function templates).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
00aeb52314ec0b1902bb15aef9c62259296fbc29 09-Jul-2009 Douglas Gregor <dgregor@apple.com> Implement the simple form of overload resolution used when taking the
address of an overloaded function (which may involve both functions
and function templates).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
49196be83bcd535ecfa9d7bb6bf8ffea450dd457 09-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should return a 'Loc' when 'T' is a pointer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
599788806ada4be1d635304104165500d6f9668d 09-Jul-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should return a 'Loc' when 'T' is a pointer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
6437147bf6c28b9b08130662c6380b9a654cbd28 08-Jul-2009 Anders Carlsson <andersca@mac.com> It's not allowed to form member pointers to members that have reference type. Add a test for this and the rest of [dcl.mptr]p3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f9e48bdea6e56404deb0776bf2d0eddedb77dce3 08-Jul-2009 Anders Carlsson <andersca@mac.com> It's not allowed to form member pointers to members that have reference type. Add a test for this and the rest of [dcl.mptr]p3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b1cebe7694eef21fb7b580e62f8089aa58d23098 08-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Bump the PCH version number

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
1bbeec7eca9030f2efa6c690d5edf7b533a87c1f 08-Jul-2009 Douglas Gregor <dgregor@apple.com> Bump the PCH version number

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
456cd0600204b9bfbf8927927c9612897a2d720f 08-Jul-2009 Chris Lattner <sabre@nondot.org> fix PR4513, a build problem with VC++, patch by James Abbatiello!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
cb3f20ded288518be8559d2057d5059fadcf3bb6 08-Jul-2009 Chris Lattner <sabre@nondot.org> fix PR4513, a build problem with VC++, patch by James Abbatiello!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
6e2641067adfb98bab5adceeccd380bb5be36c27 08-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a corner case with argument-dependent lookup and overloaded function sets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
daa439a6c47d3299157b94a496bf22389bbc77a3 08-Jul-2009 Douglas Gregor <dgregor@apple.com> Fix a corner case with argument-dependent lookup and overloaded function sets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
33b1a9542bf9dbe0e0fc6b9b7a0b404ac4a1777e 08-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class.

It contained garbage since the constructor didn't initialize it and caused test/Sema/array-constraint.c to randomly fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
bbb3128b449b6c5e7822e8b781445e348a9117dc 08-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class.

It contained garbage since the constructor didn't initialize it and caused test/Sema/array-constraint.c to randomly fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
614e8f099b8334e2307d26d45cb066f01c4fd71b 08-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented memmove_collectable API for Next runtime
when struct variables with GC'able members are copied into.
Will provide a test case later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
082b02e8403d3ee9d2ded969fbe0e5d472f04cd8 08-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented memmove_collectable API for Next runtime
when struct variables with GC'able members are copied into.
Will provide a test case later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d1c0b682af81784cb991a5479097e795b5868bc4 08-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> The canonical type of typeof or decltype with a dependent type is itself,
not Context.DependentTy. I'll let Anders check in the test case for this one...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
dd0257c77719a13d4acd513df40b04300cbfc871 08-Jul-2009 Douglas Gregor <dgregor@apple.com> The canonical type of typeof or decltype with a dependent type is itself,
not Context.DependentTy. I'll let Anders check in the test case for this one...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
953d12aabb8cb25f0713a0913c837d2fdf8996b2 07-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement checking of exception spec compatibility for overriding virtual functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
23c7d061367dd2fc1631e867cffc3d6aae24e799 07-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement checking of exception spec compatibility for overriding virtual functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1b749a01660141c6af12b074f50556c2fed91ffe 07-Jul-2009 Anders Carlsson <andersca@mac.com> Some (most) type trait expressions require that the argument passed in is a complete type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3292d5ce510061ea50152f53b7ab462b622176f4 07-Jul-2009 Anders Carlsson <andersca@mac.com> Some (most) type trait expressions require that the argument passed in is a complete type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
151fac73d9d9dd2f14606c124f54abbce2e19144 07-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Make ASTContext explicitly keep track of the declaration for the C
FILE type, rather than using name lookup to find FILE within the
translation unit. Within precompiled headers, FILE is treated as yet
another "special type" (like __builtin_va_list).

This change should provide a performance improvement (not verified),
since the lookup into the translation unit declaration
forces the (otherwise unneeded) construction of a large hash table.
More importantly, with precompiled headers, the construction
of that table requires deserializing most of the top-level
declarations from the precompiled header, which are then unused.

Fixes PR 4509.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
c29f77b769bcc5b6dc85e72c8e3cc2e348e5cf25 07-Jul-2009 Douglas Gregor <dgregor@apple.com> Make ASTContext explicitly keep track of the declaration for the C
FILE type, rather than using name lookup to find FILE within the
translation unit. Within precompiled headers, FILE is treated as yet
another "special type" (like __builtin_va_list).

This change should provide a performance improvement (not verified),
since the lookup into the translation unit declaration
forces the (otherwise unneeded) construction of a large hash table.
More importantly, with precompiled headers, the construction
of that table requires deserializing most of the top-level
declarations from the precompiled header, which are then unused.

Fixes PR 4509.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
b29c9b2f9e7fd23d65bfdbafb8787579d04e2108 07-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> A few change per Doug's feedback.
- Fariborz



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0d3c26c76997688eaf7e51764a66815652e09642 07-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> A few change per Doug's feedback.
- Fariborz



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3ee12aed6dce6dab954485b4f6e6d391bab96588 07-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/Options.def
lang/Frontend/ASTConsumers.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
e650c8c3bca2f58cad8ffa8aab63126d26e890cd 07-Jul-2009 Douglas Gregor <dgregor@apple.com> Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Driver/Options.def
lang/Frontend/ASTConsumers.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
6da24e57c82d551117a0b8c178635301741f7338 07-Jul-2009 Ted Kremenek <kremenek@apple.com> Unbreak build by including header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
0307cd59e0a48adeb9b69e3270dfe3625e7e2954 07-Jul-2009 Ted Kremenek <kremenek@apple.com> Unbreak build by including header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
872094b08ac9aedfe6784dd4aeccb7a36979cc06 06-Jul-2009 Ted Kremenek <kremenek@apple.com> Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line using '-analyzer-store=basic-new-cast'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
lang/Frontend/Analyses.def
e1cea75e70d76f55157749a7bcad319050492945 06-Jul-2009 Ted Kremenek <kremenek@apple.com> Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line using '-analyzer-store=basic-new-cast'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
lang/Frontend/Analyses.def
d45d1129c9dbf71765d9d4e6a670a550f7bdce31 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Some changes to ASTLocation's methods

-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
755c6b42154e7c2225d973babf84eb2587576bcd 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Some changes to ASTLocation's methods

-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
aa5c4899b315cd8897b25220729d885a395430f3 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add some comments to the ASTLocation class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
8fb3333d45ab3b327766e26310581cacf43fb374 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add some comments to the ASTLocation class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/ASTLocation.h
98eec710d45954ac3c74ed8cedd85fd0dac4a0db 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move the 'ResolveLocationInAST' function from the Frontend library to the Index library.

Also, cut down its comments; more comments will be added to ASTLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
lang/Index/Utils.h
818e15b89facfe0b62c8c22c18fde383a17455eb 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the 'ResolveLocationInAST' function from the Frontend library to the Index library.

Also, cut down its comments; more comments will be added to ASTLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
lang/Index/Utils.h
75abd9c49cd26ed18bc99eafa34e3e733f92f3ca 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move ASTLocation and DeclReferenceMap from the AST library to the Index library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTLocation.h
lang/AST/DeclReferenceMap.h
lang/Frontend/Utils.h
lang/Index/ASTLocation.h
lang/Index/DeclReferenceMap.h
ccbcb70ee96cb67ed6c8b4142d050f3a6764edd7 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move ASTLocation and DeclReferenceMap from the AST library to the Index library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTLocation.h
lang/AST/DeclReferenceMap.h
lang/Frontend/Utils.h
lang/Index/ASTLocation.h
lang/Index/DeclReferenceMap.h
2fcbc1e545a47bc3cd1da08944516f17a6e08c56 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Rename 'ASTNode' -> 'ASTLocation'.

ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTLocation.h
lang/AST/ASTNode.h
lang/AST/DeclReferenceMap.h
lang/Frontend/Utils.h
874012b1fb80dff2ec227c726a0c63d55e3db63f 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename 'ASTNode' -> 'ASTLocation'.

ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTLocation.h
lang/AST/ASTNode.h
lang/AST/DeclReferenceMap.h
lang/Frontend/Utils.h
026c5f8fb847f374c71ae6e49440381de48cd9d0 06-Jul-2009 Ted Kremenek <kremenek@apple.com> Move the new 'CastRegion' implementation from RegionStoreManager to StoreManager
(its superclass). This will allow us to experiment with using the new CastRegion
with BasicStoreManager, and gradually phase out the old implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
48ce7deb86ffb1e028ac9a8e7cddffc32843c26c 06-Jul-2009 Ted Kremenek <kremenek@apple.com> Move the new 'CastRegion' implementation from RegionStoreManager to StoreManager
(its superclass). This will allow us to experiment with using the new CastRegion
with BasicStoreManager, and gradually phase out the old implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
1e78281bbb8d614637a102e77c2f3288e30b9f8d 06-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Fix PR 4489, a crash in PCH loading that occurs when loading the name
of a top-level declaration loads another top-level declaration of the
same name whose type depends on the first declaration having been
completed. This commit breaks the circular dependency by delaying
loads of top-level declarations triggered by loading a name until we
are no longer recursively loading types or declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
d89275bc865e2b552836c7b33e636d4f86b8de6d 06-Jul-2009 Douglas Gregor <dgregor@apple.com> Fix PR 4489, a crash in PCH loading that occurs when loading the name
of a top-level declaration loads another top-level declaration of the
same name whose type depends on the first declaration having been
completed. This commit breaks the circular dependency by delaying
loads of top-level declarations triggered by loading a name until we
are no longer recursively loading types or declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
1d381135f0c9dcbac521112b3f6936caf871b91a 06-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/PrettyPrinter.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Parse/DeclSpec.h
7e7eb3da052a6d80ddf2377cab0384c798f73f75 06-Jul-2009 Douglas Gregor <dgregor@apple.com> Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/PrettyPrinter.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Parse/DeclSpec.h
3f2b378e88273310d46293a9799cb597c12e1c28 06-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Further cleanup of region invalidation code. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
313b6dab9efcce465b68da0fed7bf422b6e5c375 06-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Further cleanup of region invalidation code. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
41cbb47e2c6202547e26edf09a58c1accc99c296 06-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> AllocaRegion and SymbolicRegion are both boundable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
9852b5bf94d4934de63da6356c651c61e81f58d9 06-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> AllocaRegion and SymbolicRegion are both boundable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
760d5423f0984df6ae0930c71eafe96c678f5eb0 06-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Start to gradually move region invalidation code into store manager.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
43e2aafea1cdeca3a3fc849b41a92cc18e001ac0 06-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> Start to gradually move region invalidation code into store manager.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
e58db189f39804e2f774563439d34cfa822e823a 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the 'Index' library.

Its purpose is to provide the basic infrastructure for cross-translation-unit analysis like indexing, refactoring, etc.

Currently it is very "primitive" and with no type-names support. It can provide functionality like
"show me all references of this function from these translation units".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
lang/Index/EntityHandler.h
lang/Index/IndexProvider.h
lang/Index/Program.h
lang/Index/TranslationUnit.h
9eec4ed6ca0dcf098580da9146b97e0841556d12 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the 'Index' library.

Its purpose is to provide the basic infrastructure for cross-translation-unit analysis like indexing, refactoring, etc.

Currently it is very "primitive" and with no type-names support. It can provide functionality like
"show me all references of this function from these translation units".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Index/Entity.h
lang/Index/EntityHandler.h
lang/Index/IndexProvider.h
lang/Index/Program.h
lang/Index/TranslationUnit.h
4054a66c33880360183bb6e48efe11dfbf2a0f52 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the DeclReferenceMap class inside the AST library.

DeclReferenceMap (similar to ParentMap) is a helper class for mapping Decls to the AST nodes that reference them.
A client will initialize it by passing an ASTContext to its constructor and later use it to iterate over
the references of a Decl.
References are mapped and retrieved using the primary declaration (Decl::getPrimaryDecl()) of a particular Decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclReferenceMap.h
2c2ba3e258961dd98cacffe3a2167bb6d958fd53 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the DeclReferenceMap class inside the AST library.

DeclReferenceMap (similar to ParentMap) is a helper class for mapping Decls to the AST nodes that reference them.
A client will initialize it by passing an ASTContext to its constructor and later use it to iterate over
the references of a Decl.
References are mapped and retrieved using the primary declaration (Decl::getPrimaryDecl()) of a particular Decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclReferenceMap.h
5ea54f629ae53a1be581920b98e90370e09d5fc4 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the virtual method Decl::getPrimaryDecl().

When a Decl subclass can have multiple re-declarations in the same declaration context (like FunctionDecl),
getPrimaryDecl() will return a particular Decl that all of them will point to as the "primary" declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
fc7e2a8fbb08f0f496ac6cea0721fe72db8ce240 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the virtual method Decl::getPrimaryDecl().

When a Decl subclass can have multiple re-declarations in the same declaration context (like FunctionDecl),
getPrimaryDecl() will return a particular Decl that all of them will point to as the "primary" declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
85837dbd7c835c29804518b269c9d329784ccc43 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Make use of ASTNode for return value of clang::ResolveLocationInAST() and in the index-test tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
49dd5851c463963a8a78f5222ea72cfaa6db1029 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make use of ASTNode for return value of clang::ResolveLocationInAST() and in the index-test tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
970cfe1c503f4e7d8dcf0581fb6ec7d0a94b8910 06-Jul-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce ASTNode class into the AST library.

ASTNode is an immutable pair of a Decl and Stmt. If Stmt is not null, Decl should be its immediate parent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTNode.h
c0824634334ff0bb66cf8fb260101a5faaebf4b7 06-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTNode class into the AST library.

ASTNode is an immutable pair of a Decl and Stmt. If Stmt is not null, Decl should be its immediate parent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTNode.h
8761a5b9c2b84011a3d2184064783ef1baad59ac 04-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> CompoundLiteralRegion is boundable when it is not in the file scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
9a08fee80a34938b8c11c7166e009a89ced4c2b4 04-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> CompoundLiteralRegion is boundable when it is not in the file scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
5e1e0a089240eb47560dc0785e53e2dcf4ec82fa 04-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Catch function redeclarations with incompatible exception specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4994d2d50ceacdc8908f750c55589c0a20942a0a 04-Jul-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Catch function redeclarations with incompatible exception specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a95c0dfb9861da7f010b19e74194e24dcdb0fa4b 04-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> StringRegion is not boundable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
0a51f1c6cec6032bcf64ce205bc4edfdc3cb3a2f 04-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> StringRegion is not boundable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
da3466c3298eb1906989f97fe8d5beed441a29d4 03-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> remove utility methods that are not very useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
8834af3f8e85c0a7e309e5be9b41e438f51b9b36 03-Jul-2009 Zhongxing Xu <xuzhongxing@gmail.com> remove utility methods that are not very useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
c84c3b04105e2850811e1e7aebf472f789f74de3 03-Jul-2009 Ted Kremenek <kremenek@apple.com> Replace guarded calls in RegionStoreManager to
ValueManager::getRegionValueSymbolVal() with unguarded calls to
ValueManager::getRegionValueSymbolValOrUnknown(). This changes centralizes the
decision of what values to symbolicate in SymbolManager rather than having it
scatter in RegionStoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
bb2b433ae14ca18e88a46032096ce5ec5c05c8e7 03-Jul-2009 Ted Kremenek <kremenek@apple.com> Replace guarded calls in RegionStoreManager to
ValueManager::getRegionValueSymbolVal() with unguarded calls to
ValueManager::getRegionValueSymbolValOrUnknown(). This changes centralizes the
decision of what values to symbolicate in SymbolManager rather than having it
scatter in RegionStoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
9cd0a3c6b68570a1c2788c5fec0ef4371fb48d81 02-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allocate list of bases in CXXRecordDecl
using ASTContxt allocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5ffcd7b1ba8bfcb253f0a0bdf7c94c4d0270a4ab 02-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allocate list of bases in CXXRecordDecl
using ASTContxt allocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8f1e373697573b405ee5a0033b2ffb05894c35fb 02-Jul-2009 Ted Kremenek <kremenek@apple.com> StoreManagers: Use 'hasGlobalsStorage()' and 'hasParametersStorage()' instead of
directly consulting if a VarDecl is an implicit or actual parameter, a global,
etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
1508636e99faddf569a57fce82c0fb3aa2124396 02-Jul-2009 Ted Kremenek <kremenek@apple.com> StoreManagers: Use 'hasGlobalsStorage()' and 'hasParametersStorage()' instead of
directly consulting if a VarDecl is an implicit or actual parameter, a global,
etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
4f8ae75b96d8d89ee0469944830997f6725ebb04 02-Jul-2009 Ted Kremenek <kremenek@apple.com> Add a separate MemSpaceRegion for function/method arguments passed on the stack.
This will simplify the logic of StoreManagers that want to specially reason
about the values of parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
d05552a21377f493c882298c59e8829040b01d34 02-Jul-2009 Ted Kremenek <kremenek@apple.com> Add a separate MemSpaceRegion for function/method arguments passed on the stack.
This will simplify the logic of StoreManagers that want to specially reason
about the values of parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b80d8578f831724662eabc1afc2b20dccac58c1a 02-Jul-2009 Ted Kremenek <kremenek@apple.com> Remove commented methods. Add MemRegion::printStdErr().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
7f39d29cb69e7488f994870800d548008e50e1cb 02-Jul-2009 Ted Kremenek <kremenek@apple.com> Remove commented methods. Add MemRegion::printStdErr().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
a252b23fb4318b2bf84fa86bd9c55fd15a85b588 02-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Add support for retrieving the Doxygen comment associated with a given
declaration in the AST.

The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment,
which may be composed of several comment blocks.

Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).

Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile).

The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.

Some notes:
- We don't actually attempt to parse the comment blocks themselves,
beyond identifying them as Doxygen comment blocks to associate them
with a declaration.
- We won't find comment blocks that aren't adjacent to the
declaration, because we start our search based on the location of
the declaration.
- We don't go through the necessary hops to find, for example,
whether some redeclaration of a declaration has comments when our
current declaration does not. Similarly, we don't attempt to
associate a \param Foo marker in a function body comment with the
parameter named Foo (although that is certainly possible).
- Verification of my "no performance impact" claims is still "to be
done".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/Parser.h
2e22253e03e175144aeb9d13350a12fd83f858be 02-Jul-2009 Douglas Gregor <dgregor@apple.com> Add support for retrieving the Doxygen comment associated with a given
declaration in the AST.

The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment,
which may be composed of several comment blocks.

Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).

Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile).

The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.

Some notes:
- We don't actually attempt to parse the comment blocks themselves,
beyond identifying them as Doxygen comment blocks to associate them
with a declaration.
- We won't find comment blocks that aren't adjacent to the
declaration, because we start our search based on the location of
the declaration.
- We don't go through the necessary hops to find, for example,
whether some redeclaration of a declaration has comments when our
current declaration does not. Similarly, we don't attempt to
associate a \param Foo marker in a function body comment with the
parameter named Foo (although that is certainly possible).
- Verification of my "no performance impact" claims is still "to be
done".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/Parser.h
bb70eb307c83d870333b8d6567cc7df61b4dcbc1 02-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Use Destroy for member initializer list clean up.
Per Doug's comments. Doug please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
73b85f3d7ccdff37bab7adafc6b06dfd03740058 02-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Use Destroy for member initializer list clean up.
Per Doug's comments. Doug please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6602e71406e3dee6998a2687024bf63aaa641717 02-Jul-2009 Owen Anderson <resistor@mac.com> Update for changes in LLVM. Hopefully this is the last one for a while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
8f1ca78009ca1bdb66903c51b9bbaa81f58ea72a 02-Jul-2009 Owen Anderson <resistor@mac.com> Update for changes in LLVM. Hopefully this is the last one for a while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
4c8b2b33016f55eda96d69f638c93b3dc7e5a9f4 02-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of more information within the template instantiation stack, e.g.,
by distinguishing between substitution that occurs for template
argument deduction vs. explicitly-specifiad template arguments. This
is used both to improve diagnostics and to make sure we only provide
SFINAE in those cases where SFINAE should apply.

In addition, deal with the sticky issue where SFINAE only considers
substitution of template arguments into the *type* of a function
template; we need to issue hard errors beyond this point, as
test/SemaTemplate/operator-template.cpp illustrates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
cca9e9674a5e50a283185d8e9d8a5c3414eb008e 02-Jul-2009 Douglas Gregor <dgregor@apple.com> Keep track of more information within the template instantiation stack, e.g.,
by distinguishing between substitution that occurs for template
argument deduction vs. explicitly-specifiad template arguments. This
is used both to improve diagnostics and to make sure we only provide
SFINAE in those cases where SFINAE should apply.

In addition, deal with the sticky issue where SFINAE only considers
substitution of template arguments into the *type* of a function
template; we need to issue hard errors beyond this point, as
test/SemaTemplate/operator-template.cpp illustrates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
900fe062fcfd74f60ae171a0eb247aaec1c00929 01-Jul-2009 Owen Anderson <resistor@mac.com> Hold the LLVMContext by reference instead of by pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
c93f49832d2dae19a24d644c8021388fc5b099ee 01-Jul-2009 Owen Anderson <resistor@mac.com> Hold the LLVMContext by reference instead of by pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
28b9c88a99fa93d03bd82455b498de9c77e50854 01-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Updated CXXConstructorDecl AST node for ctor-initilaizer list.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d45c36308e563e1fac1cd124d606f403f9a39a29 01-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Updated CXXConstructorDecl AST node for ctor-initilaizer list.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
26ad3cc5525b6b1f0b976d40c87e92f683e6aaa5 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Mark some Compilation members const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
df35d7f1916140bfed5ab0bad2d5e2bc62c667e5 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Mark some Compilation members const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
9fbdc88d76875026f396eda8715ad38c95f248e8 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
- The Compilation is just a helper class, it shouldn't have that amount of
logic in it.

- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
c88a88f6f7672b6bb831dce9da4acfa0c846975f 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
- The Compilation is just a helper class, it shouldn't have that amount of
logic in it.

- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
2b2b736550746280d96b8c49a0462c7b7b6c1408 01-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement template types in ctor-initializer list.
Also has fix for bugzilla-4469.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
961743326fd18776f897bf4461345dba680ef637 01-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement template types in ctor-initializer list.
Also has fix for bugzilla-4469.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c78c5f628d39cd289dbab82e119310116c2d6072 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Improve diagnostics for failed commands.
- Not all tools give good error messages, and sometimes the tool can fail w/o
any error (for example, when signalled).

- We suppress this message when the failing command is the compiler and it
failed normally (exit code == 1), under the assumption that it gave a good
diagnostic.

For example, for a linker failure we now get:
--
ddunbar@lordcrumb:tmp$ clang a.c b.c
ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--

For a compiler crash we get:
--
ddunbar@lordcrumb:tmp$ clang t.i
Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573.
0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38
... stack trace and virtual stack trace follow ...
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
--

But for a regular compilation failure we get the usual:
--
ddunbar@lordcrumb:tmp$ clang c.c
c.c:1:6: error: invalid token after top level declarator
int x
^
1 diagnostic generated.
--

- No test case, not amenable to non-executable testing. :/

- <rdar://problem/6945613>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Action.h
lang/Driver/Compilation.h
31c11ebdaab0acfa10e231730ae95e32c0e39e1f 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Improve diagnostics for failed commands.
- Not all tools give good error messages, and sometimes the tool can fail w/o
any error (for example, when signalled).

- We suppress this message when the failing command is the compiler and it
failed normally (exit code == 1), under the assumption that it gave a good
diagnostic.

For example, for a linker failure we now get:
--
ddunbar@lordcrumb:tmp$ clang a.c b.c
ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--

For a compiler crash we get:
--
ddunbar@lordcrumb:tmp$ clang t.i
Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573.
0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38
... stack trace and virtual stack trace follow ...
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
--

But for a regular compilation failure we get the usual:
--
ddunbar@lordcrumb:tmp$ clang c.c
c.c:1:6: error: invalid token after top level declarator
int x
^
1 diagnostic generated.
--

- No test case, not amenable to non-executable testing. :/

- <rdar://problem/6945613>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Action.h
lang/Driver/Compilation.h
0d34d4298cdd3eef01b933e199d2ba2191a90963 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Source argument for Commands to hold the Action which caused a
Command to be generated, to support more advanced diagnostics.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
cae087e164e94e4286c11bf694dd0ff88f295302 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Source argument for Commands to hold the Action which caused a
Command to be generated, to support more advanced diagnostics.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
ab960bac45b692b11867953f222e92bc9380ea4b 01-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVMContext+Module change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
42253cc3bc006661da1287aafef93d52d00dfed1 01-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVMContext+Module change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/ASTConsumers.h
937331fdd6b863ec5ed0725405fb5b1666d588a1 01-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Two fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
a3844922f685620002412df0a88d22393e5c1241 01-Jul-2009 Douglas Gregor <dgregor@apple.com> Two fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
5ca84bccd83982d3941d68dd88139ca43f6322a0 01-Jul-2009 Steve Naroff <snaroff@apple.com> Rework Sema::CheckConditionalOperands(). No functionality change.

This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups).

The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause).

Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7154a77e7c1f23418342d3b72836ab504aa7821e 01-Jul-2009 Steve Naroff <snaroff@apple.com> Rework Sema::CheckConditionalOperands(). No functionality change.

This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups).

The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause).

Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
38e3180fb0d08290be62eb24c84a27e5ccdc5110 01-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4192: fix the definition of int64_t on x86_64 Linux.

Note that I'm guessing that *BSD and Solaris do the same thing as Linux
here, but it's quite possible I'm wrong; if the following testcase
gives an error on x86-64 with gcc for any of those operating systems, please
tell me:

#include <stdint.h>

int64_t x; long x;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3c7b6e46c5f9bdbe0676c52d80df98b68b02be99 01-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4192: fix the definition of int64_t on x86_64 Linux.

Note that I'm guessing that *BSD and Solaris do the same thing as Linux
here, but it's quite possible I'm wrong; if the following testcase
gives an error on x86-64 with gcc for any of those operating systems, please
tell me:

#include <stdint.h>

int64_t x; long x;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c37d3069b7b0968fad902995dc368400d983fa90 01-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to support optional nested-name-specifier in in ctor-initializer
list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
bcfad54a43e5570e09daddd976bd4545933e75b1 01-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to support optional nested-name-specifier in in ctor-initializer
list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2885775090f6b4b011ce8b1cb6045e3b2202e9a1 01-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Preliminary parsing and ASTs for template-ids that refer to function
templates, such as make<int&>. These template-ids are only barely
functional for function calls; much more to come.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
edce4dd44732dfad69f28822dddcf2b8e92b4483 01-Jul-2009 Douglas Gregor <dgregor@apple.com> Preliminary parsing and ASTs for template-ids that refer to function
templates, such as make<int&>. These template-ids are only barely
functional for function calls; much more to come.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
c13953a7594505b86f57434d0a1a1db14e0c0a18 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> More diagnostics related to initialization of direct bases
in ctor-initializer list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9da7201adeab345fc7da72bcfcf30e11774fb8c4 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> More diagnostics related to initialization of direct bases
in ctor-initializer list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
08b72bdac1e14abad47abbfb390205b8938064ed 30-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> add utility method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
edb883cabf32ef39a3f2ce7a7437894e176a740b 30-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> add utility method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
a371090145a133221cfd1eeee9a499d15b9c0413 30-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> add utility methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
7859cc6f2f88ebdb09b5df6fac8c185301d6bf51 30-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> add utility methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
f350c6e27365226d2c84eded38805ed25c4a0c8a 30-Jun-2009 Chris Lattner <sabre@nondot.org> Implement PR4175, catching some questionable comparisons. Patch by
David Majnemer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
149f1386c60aa07de0f6a5d43ab524b22af68059 30-Jun-2009 Chris Lattner <sabre@nondot.org> Implement PR4175, catching some questionable comparisons. Patch by
David Majnemer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ab6e38adbcdbdb4e7d211b4ff7a52d871ea0e994 30-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> De-ASTContext-ify DeclContext.

Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
17945a0f64fe03ff6ec0c2146005a87636e3ac12 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> De-ASTContext-ify DeclContext.

Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
89e4c0af9fd45f9107a599e6cf104a3d30c2e9ed 30-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce DeclContext::getParentASTContext().

It's not getASTContext() to avoid "getASTContext is ambiguous" compiler errors for subclasses of both Decl and DeclContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
048f30a483ca352ee7f235a5be181b9dcc5f9d9c 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclContext::getParentASTContext().

It's not getASTContext() to avoid "getASTContext is ambiguous" compiler errors for subclasses of both Decl and DeclContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ccb9efea4c1a88ccf62ac49d60f98b754897695a 30-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.

Timings showed no significant difference before and after the commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
6fb0aee4f9dc261bbec72e1283ad8dc0557a6d96 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.

Timings showed no significant difference before and after the commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
9a6fb96f74f39d19180dc87f4232ad3617f3f2de 30-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the printing related methods of Decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f1d60eaf3f70975ee262852af2d6aeabd140ed58 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the printing related methods of Decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
fe5f9736723cbaae5423f98ebbd0f0f537b51de4 30-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/Expr.h
40b598eea1310ec9ed554d56ce3e25b34c585458 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/Expr.h
7099c789f054f1e7480f498d60aa94b0326c285f 30-Jun-2009 Chris Lattner <sabre@nondot.org> Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.

This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control. There are many fixme's, but I think things are slightly
better than they were before.

One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/NestedNameSpecifier.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
lang/AST/Type.h
lang/Basic/LangOptions.h
lang/Basic/TokenKinds.def
e4f2142d00fa5fdb580c4e2413da91882d955381 30-Jun-2009 Chris Lattner <sabre@nondot.org> Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.

This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control. There are many fixme's, but I think things are slightly
better than they were before.

One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/NestedNameSpecifier.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
lang/AST/Type.h
lang/Basic/LangOptions.h
lang/Basic/TokenKinds.def
4b61ba63888136f05791f8e47172927451c6a9f3 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Take care of Chris's comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
16dbdce02366c372fe934c0528148fc38906f21a 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Take care of Chris's comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9cfad75f2f0554fbcf43421b18fd0430fc77bfec 30-Jun-2009 Anders Carlsson <andersca@mac.com> Make an error message more clear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d4655d3b966da02fe0588767160448594cddd61 30-Jun-2009 Anders Carlsson <andersca@mac.com> Make an error message more clear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
89f61bd06f28e7898456433248f569a1cd67d02c 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> A more detailed diagnosis of ill-formed ctor-initializer
list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
47deacfa43625c6cc1b2008a0396ccb3af725fde 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> A more detailed diagnosis of ill-formed ctor-initializer
list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
0040e0cb507668263a58fc3647a3ec3d41c921a3 30-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to decltype. We now don't crash anymore when the expr is an overloaded function decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
af017e682918f7a1a95ff08d9ab7ae3426436ca3 30-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to decltype. We now don't crash anymore when the expr is an overloaded function decl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
696780627b917bb683cfcc196e370fc6ed620b12 30-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Improve code generation for function template specializations:
- Track implicit instantiations vs. the not-yet-supported explicit
specializations
- Give implicit instantiations of function templates (and member
functions of class templates) linkonce_odr linkage.
- Improve name mangling for function template specializations,
including the template arguments of the instantiation and the return
type of the function.

Note that our name-mangling is improved, but not correct: we still
don't mangle substitutions, although the manglings we produce can be
demangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
1fd2dd145d9bcdf0b8d60a88e1795b6ae83656f5 30-Jun-2009 Douglas Gregor <dgregor@apple.com> Improve code generation for function template specializations:
- Track implicit instantiations vs. the not-yet-supported explicit
specializations
- Give implicit instantiations of function templates (and member
functions of class templates) linkonce_odr linkage.
- Improve name mangling for function template specializations,
including the template arguments of the instantiation and the return
type of the function.

Note that our name-mangling is improved, but not correct: we still
don't mangle substitutions, although the manglings we produce can be
demangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
4e0aba8010d63c1d6bcd9770088864b9c0cc0751 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose multiple initialzation of data-member/base
in the ctor-initializer list. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
7881a0565893f1da6faafbd86377f5b50e4376a5 30-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose multiple initialzation of data-member/base
in the ctor-initializer list. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
27b6d2b2671814fd94f2f70f58feb68cefe609d1 29-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of function template specializations, to eliminate
redundant, implicit instantiations of function templates and provide a
place where we can hang function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
127102b5196ffe04bdb70fd553fe62c265ab10a9 29-Jun-2009 Douglas Gregor <dgregor@apple.com> Keep track of function template specializations, to eliminate
redundant, implicit instantiations of function templates and provide a
place where we can hang function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
64c77a1c70299f698a657361a247f12a503782fb 29-Jun-2009 Daniel Dunbar <daniel@zuster.org> OpenBSD support.
- Patch by Jonathan Gray!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
f7b8eec37c8c8012fa525c71fb29a58c9f29beef 29-Jun-2009 Daniel Dunbar <daniel@zuster.org> OpenBSD support.
- Patch by Jonathan Gray!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
2a6dca1f553de927e0872e010f6935b6e8a10fa1 29-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> -Keep a reference to the ASTContext inside the TranslationUnitDecl.
-Introduce Decl::getASTContext() which returns the reference from the TranslationUnitDecl that it is contained in.

The general idea is that Decls can point to their own ASTContext so that it is no longer required to "manually" keep track and make sure that you pass the correct ASTContext to Decls' methods, e.g. methods like Decl::getAttrs should eventually not require a ASTContext parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
3708b3df2e86998dca4c006939014ea1174da834 29-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Keep a reference to the ASTContext inside the TranslationUnitDecl.
-Introduce Decl::getASTContext() which returns the reference from the TranslationUnitDecl that it is contained in.

The general idea is that Decls can point to their own ASTContext so that it is no longer required to "manually" keep track and make sure that you pass the correct ASTContext to Decls' methods, e.g. methods like Decl::getAttrs should eventually not require a ASTContext parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
ff1bf1a70cb5d6f8428727aa26994b6572347717 29-Jun-2009 Chris Lattner <sabre@nondot.org> Fix the FloatingLiteral API to take the isexact flag by value instead of
by pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
001d64dd2947c1ce06e3eac257a9a21c65ae4ff3 29-Jun-2009 Chris Lattner <sabre@nondot.org> Fix the FloatingLiteral API to take the isexact flag by value instead of
by pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2ed1a54888348f8056fd20fec3dd3bbd050c6a36 29-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
16e8be2ac532358d4e413fdfa2643b1876edda78 29-Jun-2009 Douglas Gregor <dgregor@apple.com> Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
979f8f0ed481821f2b2bf9e196d4c0024803d5b7 29-Jun-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::getObjCQualifiedIdType().
Convert clients to use ASTContext::getObjCObjectPointerType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
683087ffcf21d2a22cd2d0424b7f119168b47a8e 29-Jun-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::getObjCQualifiedIdType().
Convert clients to use ASTContext::getObjCObjectPointerType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
193586077386138c8d1c0e89c5f25a2319f32046 29-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> The default answer for isBoundable() should be false.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
f0f0605c87739c906861f73d4287798a4969b1e0 29-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> The default answer for isBoundable() should be false.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
39e99a4bd7d690178f494899078d0723522d5247 29-Jun-2009 Bill Wendling <isanbard@gmail.com> Make the StackProtector bitfield use enums instead of obscure numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
4ebe3e4c811a376c423a544f5e76ee2e96533324 29-Jun-2009 Bill Wendling <isanbard@gmail.com> Make the StackProtector bitfield use enums instead of obscure numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
e1d4f5d6840e99b8345dd755ec4a335ff4539fcf 28-Jun-2009 Bill Wendling <isanbard@gmail.com> Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/ArgList.h
lang/Driver/Options.def
45483f7a1b3e57b4603b141bee80596b2d4dd443 28-Jun-2009 Bill Wendling <isanbard@gmail.com> Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/ArgList.h
lang/Driver/Options.def
993a060816aa82ca90fc6ccab23000cd2803a9f2 27-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Improve support for overloaded operator templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
364e021e8cbbeebd4d2544053268a008cf9ee5a9 27-Jun-2009 Douglas Gregor <dgregor@apple.com> Improve support for overloaded operator templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e8c36f2e5582270b336bdf73fd217bd1682b92ac 27-Jun-2009 Anders Carlsson <andersca@mac.com> Make it possible for using decls to point to operators. Fixes PR4441.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0c6139d0c2497c4e8780340e0dc097de041f248e 27-Jun-2009 Anders Carlsson <andersca@mac.com> Make it possible for using decls to point to operators. Fixes PR4441.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b674e078950e9a774ed640ee50ee22a7e467e0dd 27-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove the last 'GetXXX' methods from GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
4f596c2263e2e3be3000e10017cc0351eb8bb399 27-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove the last 'GetXXX' methods from GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
368cc6cb678d50a643f60905c645e52ac846da2f 27-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to mark destructors when they are used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8d2b35630d4afc474b766eeab1f1bef469cf633a 27-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to mark destructors when they are used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
953555049465feac39bd1be20efb8a560f2acf28 27-Jun-2009 Anders Carlsson <andersca@mac.com> More auto work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
baf45d31f18e6d5b3d2a33695c2af6e6cbc4ee29 27-Jun-2009 Anders Carlsson <andersca@mac.com> More auto work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ad538e5150e7248e49066e917db2620bd8af8825 26-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Template argument deduction is no longer responsible for checking
non-dependent parameter types. Instead, class template partial
specializations perform a final check of all of the instantiated
arguments. This model is cleaner, and works better for function
templates where the "final check" occurs during overload resolution.

Also, cope with cv-qualifiers when the parameter type was originally a
reference type, so that the deduced argument can be more qualified
than the transformed argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
f670c8cfa58b4c224eb8fb566130dc47844dd3de 26-Jun-2009 Douglas Gregor <dgregor@apple.com> Template argument deduction is no longer responsible for checking
non-dependent parameter types. Instead, class template partial
specializations perform a final check of all of the instantiated
arguments. This model is cleaner, and works better for function
templates where the "final check" occurs during overload resolution.

Also, cope with cv-qualifiers when the parameter type was originally a
reference type, so that the deduced argument can be more qualified
than the transformed argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
f679ea8b9a9786591e2a25ac11a382c4175d19e8 26-Jun-2009 Anders Carlsson <andersca@mac.com> Can't have arrays of auto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e7cf07d8df83e083505c7105c50b2797493008a6 26-Jun-2009 Anders Carlsson <andersca@mac.com> Can't have arrays of auto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9bd48664107071827487fbefaf5d94db5fcb7c9b 26-Jun-2009 Anders Carlsson <andersca@mac.com> An auto variable can't appear in its own initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e2bb224dee15d07bc9843acd4f3ded8eb0f835ed 26-Jun-2009 Anders Carlsson <andersca@mac.com> An auto variable can't appear in its own initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4a8498cc0f251e839912285112a014a5d1248648 26-Jun-2009 Anders Carlsson <andersca@mac.com> Implement enough of the 'auto' keyword so we can claim to support N2546.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Parse/DeclSpec.h
e89d15944dd3be750a09805ad21222d2fa9321fa 26-Jun-2009 Anders Carlsson <andersca@mac.com> Implement enough of the 'auto' keyword so we can claim to support N2546.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Parse/DeclSpec.h
607021675efc13cdaa93bbe22fa4526307d48cd3 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 support: attributes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
6f3d838867538638b9bbf412028e8537ae12f3e5 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 support: attributes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
df5ab84157d78afb51148bb8e6aa7c1ee309c58a 26-Jun-2009 Anders Carlsson <andersca@mac.com> Add NamedDecl::getUnderlyingDecl that can see through UsingDecl and ObjCCompatibleAliasDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e136e0e1b74760d7ec3ede38e0e739d5c52a3c0a 26-Jun-2009 Anders Carlsson <andersca@mac.com> Add NamedDecl::getUnderlyingDecl that can see through UsingDecl and ObjCCompatibleAliasDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5847da50f7f3595bda61ec44776eadfcaa4da736 26-Jun-2009 Anders Carlsson <andersca@mac.com> See through UsingDecls in more places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
58badb7a655d021fc67bb7ed0af95d6ea0c63eb1 26-Jun-2009 Anders Carlsson <andersca@mac.com> See through UsingDecls in more places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5768cbc281deeaaa1428858c6818de679522abb1 26-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix build break.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
1730ce496e8f8d6a50b2af7afa5d65016e3b8384 26-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix build break.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
8eabc06e142a9f95b958bd6eed1aba9264a0378b 26-Jun-2009 Chris Lattner <sabre@nondot.org> fix PR4452, a crash on invalid. The error recovery is still terrible in this case
but at least we don't crash :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
c8e27cc402043ec86c1698c09e4ee9e415b16207 26-Jun-2009 Chris Lattner <sabre@nondot.org> fix PR4452, a crash on invalid. The error recovery is still terrible in this case
but at least we don't crash :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bd42e02d833f1876b2bc67b47f7c2ea82c6e476e 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 support: explicit casts to ext-vector types


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
58d29a41271d96509f464716f79b0ab2e815b6b1 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 support: explicit casts to ext-vector types


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9c8a5396f99d5f069e12c18172f867e13c9b03d7 26-Jun-2009 Ted Kremenek <kremenek@apple.com> Add missing header file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SValuator.h
e74eaef9b550c002e59dfc57c0dd640a5f129e8e 26-Jun-2009 Ted Kremenek <kremenek@apple.com> Add missing header file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SValuator.h
6f5e054b35aed3e4d22d4bc29bc74e5003dd2038 26-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Implicit instantiation for function template specializations.

For a FunctionDecl that has been instantiated due to template argument
deduction, we now store the primary template from which it was
instantiated and the deduced template arguments. From this
information, we can instantiate the body of the function template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
1637be727f2a0434c1ed7aa385ea1c18328b0ccd 26-Jun-2009 Douglas Gregor <dgregor@apple.com> Implicit instantiation for function template specializations.

For a FunctionDecl that has been instantiated due to template argument
deduction, we now store the primary template from which it was
instantiated and the deduced template arguments. From this
information, we can instantiate the body of the function template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
d1c53ffd5f0af6258181e026c0ef6c202990495c 26-Jun-2009 Ted Kremenek <kremenek@apple.com> Introduce a new concept to the static analyzer: SValuator.

GRTransferFuncs had the conflated role of both constructing SVals (symbolic
expressions) as well as handling checker-specific logic. Now SValuator has the
role of constructing SVals from expressions and GRTransferFuncs just handles
checker-specific logic. The motivation is by separating these two concepts we
will be able to much more easily create richer constraint-generating logic
without coupling it to the main checker transfer function logic.

We now have one implementation of SValuator: SimpleSValuator.

SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
(which is removed in this patch). This includes the logic for EvalBinOp,
EvalCast, etc. Because SValuator has a narrower role than the old
GRTransferFuncs, the interfaces are much simpler, and so is the implementation
of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
SimpleSValuator.

As a consequence of removing GRSimpleVals, there is no longer a
'-checker-simple' option. The '-checker-cfref' did everything that option did
but also ran the retain/release checker. Of course a user may not always wish to
run the retain/release checker, nor do we wish core analysis logic buried in the
checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
to separate out these pieces into the core analysis engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Frontend/Analyses.def
6c07bdba93b095b66e2c8c82dd5ed458fa8285ea 26-Jun-2009 Ted Kremenek <kremenek@apple.com> Introduce a new concept to the static analyzer: SValuator.

GRTransferFuncs had the conflated role of both constructing SVals (symbolic
expressions) as well as handling checker-specific logic. Now SValuator has the
role of constructing SVals from expressions and GRTransferFuncs just handles
checker-specific logic. The motivation is by separating these two concepts we
will be able to much more easily create richer constraint-generating logic
without coupling it to the main checker transfer function logic.

We now have one implementation of SValuator: SimpleSValuator.

SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
(which is removed in this patch). This includes the logic for EvalBinOp,
EvalCast, etc. Because SValuator has a narrower role than the old
GRTransferFuncs, the interfaces are much simpler, and so is the implementation
of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
SimpleSValuator.

As a consequence of removing GRSimpleVals, there is no longer a
'-checker-simple' option. The '-checker-cfref' did everything that option did
but also ran the retain/release checker. Of course a user may not always wish to
run the retain/release checker, nor do we wish core analysis logic buried in the
checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
to separate out these pieces into the core analysis engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Frontend/Analyses.def
2a310fe1518af351c8f64a1dc828c3f21e881129 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 Support: support "bool, true, false" tokens when compiling for OpenCL


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
72b60e35600f5789056f73eca35713a1b83b6594 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 Support: support "bool, true, false" tokens when compiling for OpenCL


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
31f83514430c650800e656aa67555f0960e65f44 26-Jun-2009 Nate Begeman <natebegeman@mac.com> PCH support for OpenCL language options


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
69cfb9be9bd3feab96e844bf0edf1b7546c48a02 26-Jun-2009 Nate Begeman <natebegeman@mac.com> PCH support for OpenCL language options


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
006f78ad4b68561a20068d4993fda8e6ae94142c 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 patch 2/N: Language options & file extension


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
4e3629e676c7d86d988df29dfeeaa3a8c9f0cf29 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 patch 2/N: Language options & file extension


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
b60eb759cc2de7125e3554b7f48b2452ca807d82 26-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Improved semantic analysis and AST respresentation for function
templates.

For example, this now type-checks (but does not instantiate the body
of deref<int>):

template<typename T> T& deref(T* t) { return *t; }

void test(int *ip) {
int &ir = deref(ip);
}

Specific changes/additions:
* Template argument deduction from a call to a function template.
* Instantiation of a function template specializations (just the
declarations) from the template arguments deduced from a call.
* FunctionTemplateDecls are stored directly in declaration contexts
and found via name lookup (all forms), rather than finding the
FunctionDecl and then realizing it is a template. This is
responsible for most of the churn, since some of the core
declaration matching and lookup code assumes that all functions are
FunctionDecls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
e53060fa78ad7e98352049f72787bdb7543e2a48 26-Jun-2009 Douglas Gregor <dgregor@apple.com> Improved semantic analysis and AST respresentation for function
templates.

For example, this now type-checks (but does not instantiate the body
of deref<int>):

template<typename T> T& deref(T* t) { return *t; }

void test(int *ip) {
int &ir = deref(ip);
}

Specific changes/additions:
* Template argument deduction from a call to a function template.
* Instantiation of a function template specializations (just the
declarations) from the template arguments deduced from a call.
* FunctionTemplateDecls are stored directly in declaration contexts
and found via name lookup (all forms), rather than finding the
FunctionDecl and then realizing it is a template. This is
responsible for most of the churn, since some of the core
declaration matching and lookup code assumes that all functions are
FunctionDecls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
d67364cad8b6e5b06f54ebeb8d5932eca79a4d84 25-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose and Mark use of implicit default assignment operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74205 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c75bc2d1f6f637098abc5db4caf0551f9437471e 25-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose and Mark use of implicit default assignment operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74205 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e2ed6f7a96d7cc444f4a7f15775164b3eccc3c34 25-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
131f4658249b2a7d2d7e30fe07e84c484f79ef99 25-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
40bf2835dac05cd3701487bf0b6ba0440befecb4 25-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the ResolveLocationInAST function which takes an ASTContext and a SourceLocation and it resolves it into a <Decl*, Stmt*> pair.

Decl* is the declaration associated with this source location and Stmt* is the statement/expression that the location points to.
If the location does not point to a statement node, Stmt* is null.

ResolveLocationInAST (along with converting a file:line:column triplet to a SourceLocation) will be useful for an IDE client and for clang's test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
53d4c14a989523afc6aa8fff275ec3ab26eb6c18 25-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the ResolveLocationInAST function which takes an ASTContext and a SourceLocation and it resolves it into a <Decl*, Stmt*> pair.

Decl* is the declaration associated with this source location and Stmt* is the statement/expression that the location points to.
If the location does not point to a statement node, Stmt* is null.

ResolveLocationInAST (along with converting a file:line:column triplet to a SourceLocation) will be useful for an IDE client and for clang's test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
dd04ed620d6e07d6fec4f1ba244f8e0615296870 25-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove uses of std::ostream from libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
53ba0b636194dbeaa65a6f85316c9397a0c5298b 25-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove uses of std::ostream from libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
b470a3017a49ea9d3c7dd05e61acb7c811990ffb 25-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::GetSValAsScalarOrLoc()/GetSVal().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
233e913eec6c178ab58d901a212318bae95dbebd 25-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::GetSValAsScalarOrLoc()/GetSVal().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
93ab533a2e9522a2e9a7695cb7446812fc9e70a6 24-Jun-2009 Anders Carlsson <andersca@mac.com> Add a DecltypeType type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
395b475a4474f1c7574d927ad142ca0c7997cbca 24-Jun-2009 Anders Carlsson <andersca@mac.com> Add a DecltypeType type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
eed418bc4a3a68aa20dfa8c76f5c04bfa3d32936 24-Jun-2009 Anders Carlsson <andersca@mac.com> Parse the C++0x decltype specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
6fd634f4ac59f5923cffadadb99d19f23c18707a 24-Jun-2009 Anders Carlsson <andersca@mac.com> Parse the C++0x decltype specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
19d1065e4ff54f822017982570d56fbddcc1a46f 24-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that the template parameter lists get from the parser down to ActOnFunctionDeclarator for function template definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
52591bf224b2c43e2b00e265bb8599a620081925 24-Jun-2009 Douglas Gregor <dgregor@apple.com> Make sure that the template parameter lists get from the parser down to ActOnFunctionDeclarator for function template definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
6fb069ce903558b7eb06b556f57a35e43c8cfeef 24-Jun-2009 Anders Carlsson <andersca@mac.com> Support for [class.local]p4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e98da2e7af16056a53db327b520d4b53b4be5e7a 24-Jun-2009 Anders Carlsson <andersca@mac.com> Support for [class.local]p4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4571d8171bac6b734fbfab217db433a1605d6b61 24-Jun-2009 Anders Carlsson <andersca@mac.com> [class.local] p1 and p3. Also, add back the xcodeproj file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
e41590d2504d73453d58f22e9176088990555cc1 24-Jun-2009 Anders Carlsson <andersca@mac.com> [class.local] p1 and p3. Also, add back the xcodeproj file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
2ae1d770afc17f52a4434b492cf6ea685a724092 24-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Start propagating template parameter lists to the right places to
handle function templates. There's no actual code for function
templates yet, but at least we complain about typedef templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
e542c862bdf9a9bcb4f468be8fa6561372430611 24-Jun-2009 Douglas Gregor <dgregor@apple.com> Start propagating template parameter lists to the right places to
handle function templates. There's no actual code for function
templates yet, but at least we complain about typedef templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
a9e9e0089d7fd4e5dc737a870b519a411a81fbdd 24-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce SourceManager::ísBeforeInTranslationUnit() which can compare 2 source locations and determine which one comes before the other, relative to the translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2aa03d588bd2d3c73deb662880c2244bf2e384b9 24-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce SourceManager::ísBeforeInTranslationUnit() which can compare 2 source locations and determine which one comes before the other, relative to the translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
eab61813924dfc3e35bff6a173da3c4d3a6e3bba 24-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move the command line source location parsing from clang-cc.cpp into "include/Frontend/CommandLineSourceLoc.h".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
34d25d85d6abead0fa6337080449609a2a4f4404 24-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the command line source location parsing from clang-cc.cpp into "include/Frontend/CommandLineSourceLoc.h".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CommandLineSourceLoc.h
657b7f098932544581c4a68fe4075f5a9278e210 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Fix build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
d696aa50200fda369b9031b80d1570688fc9b0be 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Fix build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
f6f0a87015833aef219ad443409de8198a340212 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::getRegion/getSelfRegion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
25e751a6c9ceb13f313c36facff93be30a057d97 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::getRegion/getSelfRegion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
49b6a8ef1c1d430b8212527352c974ffcd1e29a6 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::BindLoc() and GRStateManager::Unbind().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
76500d072e97b5256c496304b40deb035ca1e375 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::BindLoc() and GRStateManager::Unbind().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
1a01dca37e195528cbce2d682a4b88812cc0b8fc 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::BindDecl() and GRStateManager::BindDeclWithInit().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
f3b097523614608537f3cc235585a426a0dd6117 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateManager::BindDecl() and GRStateManager::BindDeclWithInit().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
7e5d292be8a287cd7aa99b78c357568e481eb416 23-Jun-2009 Ted Kremenek <kremenek@apple.com> - Add MemRegion::getMemorySpace()
- Change implementation of MemRegion::hasStackStorage()/hasHeapStorage() to use
'getMemorySpace()'. This avoids a double traversal up the region hierarchy
and is simpler.
- Add MemRegion::hasHeapOrStackStorage() as a slightly more efficient
alternative to 'hasStackStorage() || hasHeapStorage()'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
bb7c96f290453104ec35ca17111a5165f68a4697 23-Jun-2009 Ted Kremenek <kremenek@apple.com> - Add MemRegion::getMemorySpace()
- Change implementation of MemRegion::hasStackStorage()/hasHeapStorage() to use
'getMemorySpace()'. This avoids a double traversal up the region hierarchy
and is simpler.
- Add MemRegion::hasHeapOrStackStorage() as a slightly more efficient
alternative to 'hasStackStorage() || hasHeapStorage()'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
dd2ec499d7f26e556478b1725be6b80e088bc417 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Move 'hasStackStorage()' and 'hasHeapStorage()' from MemRegionManager to MemRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
ea20cd74793d257679267032419a9ff7fc89dc05 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Move 'hasStackStorage()' and 'hasHeapStorage()' from MemRegionManager to MemRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
8b6b9201dd657917e6c4c33eb182049f12736bd4 23-Jun-2009 Ted Kremenek <kremenek@apple.com> API cleanup: move more methods from GRStateManager to GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
dbc2afc5fbafcffff06da0b875ce62f364cf11e0 23-Jun-2009 Ted Kremenek <kremenek@apple.com> API cleanup: move more methods from GRStateManager to GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
e32c7650a056ee59db4cbd3cba4a25dcaf966cf8 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move all factory methods from SVal to ValueManager. API cleanup!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
d91ee27950ef5c321db1ac2aa5becb75ffe7cb14 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Move all factory methods from SVal to ValueManager. API cleanup!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
a3a5a282fb70a82e18273b7182e0bd17b7d74e66 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Split ValueManager method definitions into its own source file.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
2ace5cd1dc3340a4a12a3e0d3df51f094cbfde97 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Split ValueManager method definitions into its own source file.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
3c2828d465a11dc15787a66feac39995682e6cc1 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> ValueManager::makeNonLoc -> ValueManager::makeIntVal
Clean up code with ValueManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
3038c5a44fbe7e3260a538f7dd1ace7fa13c90ae 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> ValueManager::makeNonLoc -> ValueManager::makeIntVal
Clean up code with ValueManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
8a385165f5da3f31edb7715ef09d7c6198041409 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Instead of setting the default value of the array region, bind the rest of the
array elements to 0 explicitly. Create 0 values with the element type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
087d6c20876ced37d544552b43cf33332687f074 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Instead of setting the default value of the array region, bind the rest of the
array elements to 0 explicitly. Create 0 values with the element type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
54cd81244f01040fc696f2c0f30af78610265cad 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> MemRegionManager: Migrate logic for getCodeTextRegion() over to using
trait-based MemRegion creation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
0dea5241bca707789d706ed1fda3a29a8fedc4c0 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> MemRegionManager: Migrate logic for getCodeTextRegion() over to using
trait-based MemRegion creation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
04b97b8277fee81a2825448cd725405dd58bcde9 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove duplicated methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
dd198f04897df87c52fef66398035cbf67fdc33d 23-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove duplicated methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b0fc999fb07646e67aab2a6bb3bb4ab0c95be384 23-Jun-2009 Anders Carlsson <andersca@mac.com> Check in a new template argument list builder that should work better for variadic templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
fb25052736439d72a557cddd41dfb927bcb3d3e5 23-Jun-2009 Anders Carlsson <andersca@mac.com> Check in a new template argument list builder that should work better for variadic templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
4b5874bb063c92f63cda8a65866849ca5dfb9680 23-Jun-2009 Chris Lattner <sabre@nondot.org> switch Warnings.cpp to use the diagnostics machinery to print diagnostics, not *fprintf*!
Among other things, this makes the warning about unknown warning options mappable.
For example:

$ clang t.c -Werror -Wfoo
error: unknown warning option '-Wfoo' [-Wunknown-warning-option]

For another thing, they are properly color coded now too :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
8ea841b1152308ae11c23a7836dead36e47d96e3 23-Jun-2009 Chris Lattner <sabre@nondot.org> switch Warnings.cpp to use the diagnostics machinery to print diagnostics, not *fprintf*!
Among other things, this makes the warning about unknown warning options mappable.
For example:

$ clang t.c -Werror -Wfoo
error: unknown warning option '-Wfoo' [-Wunknown-warning-option]

For another thing, they are properly color coded now too :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
d8f4cefc3f1661f5bf714cf651e55edae2238479 23-Jun-2009 Ted Kremenek <kremenek@apple.com> MemRegions:
- Embed a reference to MemRegionManager objects in MemSpaceRegion objects
- Use this embedded reference for MemRegion objects to access ASTContext objects without external help
- Use this access to ASTContext to simplify 'isBoundable' (no ASTContext& argument required)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
a43484afda4c4fb4b23a53a2dc91d985d39dc2c4 23-Jun-2009 Ted Kremenek <kremenek@apple.com> MemRegions:
- Embed a reference to MemRegionManager objects in MemSpaceRegion objects
- Use this embedded reference for MemRegion objects to access ASTContext objects without external help
- Use this access to ASTContext to simplify 'isBoundable' (no ASTContext& argument required)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
1fd0e02a1e6207928c143bbec92f0b5472029276 23-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove operator '<=' overload for SourceLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
6cd4d8795b8058d289d92c0698c0012cd313fa5c 23-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove operator '<=' overload for SourceLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
0dba8f2175f6b47f40547b6dacaf980a52c9d870 23-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Don't use operator overload '<' for SourceLocation, it has not semantic meaning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cb5f8f59322c352f51714c3de5d8047e70895165 23-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't use operator overload '<' for SourceLocation, it has not semantic meaning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3680b4533bf8609f001d0342aafa1807f17dff77 23-Jun-2009 Ted Kremenek <kremenek@apple.com> MemRegionManager: Migrate logic for getAllocaRegion() over to using trait-based MemRegion creation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
7ae7ad9951f032d0a33b64c964f7cdcb9cc6f59b 23-Jun-2009 Ted Kremenek <kremenek@apple.com> MemRegionManager: Migrate logic for getAllocaRegion() over to using trait-based MemRegion creation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
599778ef5106277527d60a7cc9c3d8f0756a40c7 23-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> patch to mark use of implicit copy constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
485f087407849a8989053122f52b8c07d1191b45 23-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> patch to mark use of implicit copy constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
31839f0296c1553f64ee82f3fd703c0da96b53c6 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Migrate factory methods for FieldRegion and ObjCIVarRegion creation to use the
new generalized region-construction code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
6304b08daee27b25ae2e2bdb8bffd67dfad74b3c 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Migrate factory methods for FieldRegion and ObjCIVarRegion creation to use the
new generalized region-construction code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
1b85d8e3865c3c6aa6ab07ae452da84dc35864a6 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Refactor some of the logic in MemRegionManager for constructing regions using
member template functions and traits. The idea is to allow MemRegionManager to
construct subclasses of MemRegion that aren't declared in MemRegion.h (e.g.,
checker-specific regions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
250101353b711a409b075f1bc11070dddec7100b 23-Jun-2009 Ted Kremenek <kremenek@apple.com> Refactor some of the logic in MemRegionManager for constructing regions using
member template functions and traits. The idea is to allow MemRegionManager to
construct subclasses of MemRegion that aren't declared in MemRegion.h (e.g.,
checker-specific regions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
e17a4d69e605b17289c0713a905326dc232f565c 23-Jun-2009 Chris Lattner <sabre@nondot.org> add a warning group for unavailable decls that mirrors the one for
deprecated decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2f96a0679a8d9c05fd3634340421f2d360701059 23-Jun-2009 Chris Lattner <sabre@nondot.org> add a warning group for unavailable decls that mirrors the one for
deprecated decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a8b2fbf69432805ecb555d89a6e98aa50da9766a 22-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Rework the way we track which declarations are "used" during
compilation, and (hopefully) introduce RAII objects for changing the
"potentially evaluated" state at all of the necessary places within
Sema and Parser. Other changes:

- Set the unevaluated/potentially-evaluated context appropriately
during template instantiation.
- We now recognize three different states while parsing or
instantiating expressions: unevaluated, potentially evaluated, and
potentially potentially evaluated (for C++'s typeid).
- When we're in a potentially potentially-evaluated context, queue
up MarkDeclarationReferenced calls in a stack. For C++ typeid
expressions that are potentially evaluated, we will play back
these MarkDeclarationReferenced calls when we exit the
corresponding potentially potentially-evaluated context.
- Non-type template arguments are now parsed as constant
expressions, so they are not potentially-evaluated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
ac7610dad6653bad02dd42de198ca358b6fb1f1d 22-Jun-2009 Douglas Gregor <dgregor@apple.com> Rework the way we track which declarations are "used" during
compilation, and (hopefully) introduce RAII objects for changing the
"potentially evaluated" state at all of the necessary places within
Sema and Parser. Other changes:

- Set the unevaluated/potentially-evaluated context appropriately
during template instantiation.
- We now recognize three different states while parsing or
instantiating expressions: unevaluated, potentially evaluated, and
potentially potentially evaluated (for C++'s typeid).
- When we're in a potentially potentially-evaluated context, queue
up MarkDeclarationReferenced calls in a stack. For C++ typeid
expressions that are potentially evaluated, we will play back
these MarkDeclarationReferenced calls when we exit the
corresponding potentially potentially-evaluated context.
- Non-type template arguments are now parsed as constant
expressions, so they are not potentially-evaluated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
8915a3dcd08b890239dc943d38892183f570da20 22-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Remove ImplicitMustBeDefined, use universal 'Used' flag
instead. Do the implicit default ctor checking in MarkDeclarationReferenced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b7f4cc09ead099c1306d06db53e258d648d0f652 22-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Remove ImplicitMustBeDefined, use universal 'Used' flag
instead. Do the implicit default ctor checking in MarkDeclarationReferenced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
25822a01aed8142e2c3c60045cf92b6beb53fabf 22-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Addressing Doug's suggestions:

-Added comment for FunctionDecl::EndRangeLoc
-Removed a redundant check from FunctionDecl::setBody

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1a5364e0fa0482d8d477d6f136d52e503bbe13f4 22-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Addressing Doug's suggestions:

-Added comment for FunctionDecl::EndRangeLoc
-Removed a redundant check from FunctionDecl::setBody

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4010f8e48263991a109e5f4670d962faf5b13147 22-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed text of a diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c1005ac71f48ac8637ff1193a2ad9d6eb67fcf3d 22-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed text of a diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
77e15a5489d3ae286101e253c99d25581c5d73be 21-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed Protocol as TheProtocol so people can use clang header for
building obj-c++ clients. "Protocol" is a class name in Cocoa.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
262f9cf85294a1a0713420abc79d40f64aef7240 21-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed Protocol as TheProtocol so people can use clang header for
building obj-c++ clients. "Protocol" is a class name in Cocoa.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
1644360a5795ace4ff2cc15db4b1ff5669690b17 20-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Made improvements in c++'s object model patch on Doug's review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3da83eb7bcfa6bd476ab804ecb6cf755b39a6f92 20-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Made improvements in c++'s object model patch on Doug's review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b2b5a7a5844d19ff1d33b19e5ebb47ef494c5964 20-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add the license part to the new source files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
4b562cf889bc59e1914dd2c5d9fbd7e7bfa1ad77 20-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add the license part to the new source files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
af0d4d517b43b7dd7dde06d27c5055b49f5fe0f5 20-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce SourceManager::getLocation() to get a source location out of a "file:line:column" triplet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
10b46d2f0b976676d10681d73fe061b5ae409b36 20-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce SourceManager::getLocation() to get a source location out of a "file:line:column" triplet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
545473e26c6df9a7d683436aba6f778f3637853c 20-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce Decl::getSourceRange() which, like Stmt::getSourceRange(), represents the range that the declaration covers.

Add initial support for NamespaceDecl, VarDecl, and FunctionDecl:
-NamespaceDecl range is from name to '}'
-VarDecl is from name to possible init expression
-FunctionDecl is from name to last parameter name or to end of its function body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
55d608cbadf1e9c05064f9287c057d50b7df65b4 20-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Decl::getSourceRange() which, like Stmt::getSourceRange(), represents the range that the declaration covers.

Add initial support for NamespaceDecl, VarDecl, and FunctionDecl:
-NamespaceDecl range is from name to '}'
-VarDecl is from name to possible init expression
-FunctionDecl is from name to last parameter name or to end of its function body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
f82550bab5b24a51bea992fc85b8e08308f9b301 20-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Add operator '<=' for comparing SourceLocations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
06c27ee259dc8dbd20a3c4a7e7dec8de2844f895 20-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add operator '<=' for comparing SourceLocations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
dbfe01e9e1119e2e691101e914fbf8b577a0cd7d 20-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce the ASTUnit class.

ASTUnit is a helper class to allow easy loading of an ASTContext from a PCH file. No users for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
0853a02c3b04d96a3c432b883e403175c954cd81 20-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the ASTUnit class.

ASTUnit is a helper class to allow easy loading of an ASTContext from a PCH file. No users for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTUnit.h
683a1144296b0d866dea5b8bee2c2948ad0b6312 20-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Parsing and AST support for using declarations, from John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
9cfbe48a7a20a217fdb2920b29b67ae7941cb116 20-Jun-2009 Douglas Gregor <dgregor@apple.com> Parsing and AST support for using declarations, from John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
981892622a7fbb6d0e7eb7759ed7e8039e46bef9 20-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of when declarations are "used" according to C and
C++. This logic is required to trigger implicit instantiation of
function templates and member functions of class templates, which will
be implemented separately.

This commit includes support for -Wunused-parameter, printing warnings
for named parameters that are not used within a function/Objective-C
method/block. Fixes <rdar://problem/6505209>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
e0762c92110dfdcdd207db461a4ea17afd168f1e 20-Jun-2009 Douglas Gregor <dgregor@apple.com> Keep track of when declarations are "used" according to C and
C++. This logic is required to trigger implicit instantiation of
function templates and member functions of class templates, which will
be implemented separately.

This commit includes support for -Wunused-parameter, printing warnings
for named parameters that are not used within a function/Objective-C
method/block. Fixes <rdar://problem/6505209>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
89942a084af119f82b4e99adde48afef1561f8ce 20-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Use QualType to represent block's implicit return type as
to not lose its 'const/volatile' qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7d5c74ecbbd8719436c071f38657bc8e97ee4a24 20-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Use QualType to represent block's implicit return type as
to not lose its 'const/volatile' qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3603e0c11af0d958225d8db2f25ed2683d652436 19-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for implementation of C++'s object model. This is
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
f8dcb866d344aa9355595e14c429852830b63095 19-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for implementation of C++'s object model. This is
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
4ea6a18dba1e0cee19c35039d73f5c96800e26f8 19-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove more GetSVal/GetLValue methods in GRExprEngine/GRState, instead
preferring to use their replacements in GRState. This further unifies the code
paths for such logic and leads to some code reduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
3ff12591494a3cb3d3a24427975df58714ac3b2f 19-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove more GetSVal/GetLValue methods in GRExprEngine/GRState, instead
preferring to use their replacements in GRState. This further unifies the code
paths for such logic and leads to some code reduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
d4f3f3ddf479a0d5cc571bbae730ff85704ab458 19-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> A further step of r73690: associate the cast-to type with the created symbol,
because the type of the symbol is used to create the default range. We need the
sign to be consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
45257c37a4e9a8f915661e0f964aec375909eb4c 19-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> A further step of r73690: associate the cast-to type with the created symbol,
because the type of the symbol is used to create the default range. We need the
sign to be consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
e3f4bda53544f2a5a8fe31ab7c86bed1e4e66b01 19-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Make changes to PCHReader to allow reading a PCH file without having a pre-initialized Preprocessor.

-Introduce 'PCHReaderListener' which is an abstract interface for getting various information from the PCHReader.
-If PCHReader is constructed without a Preprocessor, it can still load the file and invoke the callbacks of PCHReaderListener.
-If PCHReader is constructed with an initialized Preprocessor, PCHValidator is used as a PCHReaderListener to validate the contents of the PCH file against the given Preprocessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73741 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
11e51106329c550d008fad2c657c053d81611ea8 19-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make changes to PCHReader to allow reading a PCH file without having a pre-initialized Preprocessor.

-Introduce 'PCHReaderListener' which is an abstract interface for getting various information from the PCHReader.
-If PCHReader is constructed without a Preprocessor, it can still load the file and invoke the callbacks of PCHReaderListener.
-If PCHReader is constructed with an initialized Preprocessor, PCHValidator is used as a PCHReaderListener to validate the contents of the PCH file against the given Preprocessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73741 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
c0cccca3b053c9e86800f7f990ec609e4546bcb2 19-Jun-2009 Ted Kremenek <kremenek@apple.com> Move clients over from using GRStateManager::BindXXX and friends to
GRState->bindXXX and friends (and constify some arguments along the way).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
23ec48cd3369c8d7d1ab3c3f2226cfcffd2cd3d3 19-Jun-2009 Ted Kremenek <kremenek@apple.com> Move clients over from using GRStateManager::BindXXX and friends to
GRState->bindXXX and friends (and constify some arguments along the way).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
70970bf6c7757c2e326971ffe98888498180a9ef 19-Jun-2009 Ted Kremenek <kremenek@apple.com> libAnalysis:
- Remove the 'isFeasible' flag from all uses of 'Assume'.
- Remove the 'Assume' methods from GRStateManager. Now the only way to
create a new GRState with an assumption is to use the new 'assume' methods
in GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
a591bc04d21fa62ebffcb2c7814d738ca8f5e2f9 19-Jun-2009 Ted Kremenek <kremenek@apple.com> libAnalysis:
- Remove the 'isFeasible' flag from all uses of 'Assume'.
- Remove the 'Assume' methods from GRStateManager. Now the only way to
create a new GRState with an assumption is to use the new 'assume' methods
in GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
68a7a6db3693e6df54a2198f3ee4e3f87e7f9ac0 18-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Some cleanups suggested by Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f6ddb737cb882ffbf0b75a9abd50b930cc2b9068 18-Jun-2009 Douglas Gregor <dgregor@apple.com> Some cleanups suggested by Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
98da6aed9fbc7fc82dd581c7bb647412f7864299 18-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Expr.h
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 18-Jun-2009 Douglas Gregor <dgregor@apple.com> Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Expr.h
e539995508a92a4e3a97c6ba22a17a1e7ce4158e 18-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> When casting region, if we do not create an element region, record the cast-to
type.

When retrieving the region value, if we are going to create a symbol value, use
the cast-to type if possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
88c675f001e046b7264e2a2d4174dacf3781ce5f 18-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> When casting region, if we do not create an element region, record the cast-to
type.

When retrieving the region value, if we are going to create a symbol value, use
the cast-to type if possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
32163dd204fda0daa4dca79e58e3d17659bf07b4 18-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> More GRStateRef removal fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
4d5d994a069d6f7513cc025266afcfa73b020405 18-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> More GRStateRef removal fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
34d6450ab829780307bb5be0d0f4b0077ff517ea 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
47fed90f77a3644b2224d9c34e9bae74d8625332 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove GRStateRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
18a636d2c9aa63129038e71643a8e6b2ede74038 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove more dependencies on GRStateRef. As a consequence, we can now
pretty-print a GRState object anywhere it is referenced (instead of
needing a GRStateRef of a GRStateManager handy).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
b65be70779bdaf75e91731bfd89362bf4118ae31 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove more dependencies on GRStateRef. As a consequence, we can now
pretty-print a GRState object anywhere it is referenced (instead of
needing a GRStateRef of a GRStateManager handy).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
d2d7e18f66887ecf47774feb3e2844692d5f4b52 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove another dependency on GRStateRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
3a7720368937e69c3d1ddab353667f256827717f 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove another dependency on GRStateRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
6837059a1bcf1dc4da5667e69c6203e4110def34 18-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Implement correct name lookup inside an initializer of a C++ class static data member.

Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0ffd9ffb633ca4886c7db4dd12dc36bdad3d797c 18-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement correct name lookup inside an initializer of a C++ class static data member.

Fixes "test/CXX/basic/basic.lookup/basic.lookup.unqual/p13.cpp" test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
38bc2b568f9a179119f196f7bcebd87b37c6355e 18-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
f5cecfbdcd20be224861f9e67c5973a9a2b61512 18-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
c75c1a882cad91f2edc6a926eb8cd725abad2262 18-Jun-2009 Steve Naroff <snaroff@apple.com> First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.

Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).

This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bc 18-Jun-2009 Steve Naroff <snaroff@apple.com> First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.

Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).

This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
lang/Frontend/TypeXML.def
2a15c5930802f70e4a6114eda9f9891179af19be 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove more uses of GRStateRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
c87813824896a7124d2dd1c08e4661bbe119abf5 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Remove more uses of GRStateRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
49f8fa612dc057fd645f1f15b65ee92acf541e21 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Class 'Environment' no longer should subclass llvm::FoldingSetNode.
Environment hasn't been uniqued in a FoldingSet for some time, so this
was just wasting a pointer in GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
fdf6a56339b3df94d46a49c4977e0a21e8922cf3 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Class 'Environment' no longer should subclass llvm::FoldingSetNode.
Environment hasn't been uniqued in a FoldingSet for some time, so this
was just wasting a pointer in GRState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
5c9b454401ecc8ccee2a6d7e59e35992a7ec7008 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Start moving in the direction of removing GRStateRef. Now each
GRState object has a direct reference to its GRStateManager, making
the functionality of GRStateRef redunandant. This will lead to some
nice API cleanup and code shrinking across libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
67f28534c090650ffa123afa84ff4a96f56de14e 18-Jun-2009 Ted Kremenek <kremenek@apple.com> Start moving in the direction of removing GRStateRef. Now each
GRState object has a direct reference to its GRStateManager, making
the functionality of GRStateRef redunandant. This will lead to some
nice API cleanup and code shrinking across libAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
2a2e0405001f22e9026cb0dec219146996d1e7b6 17-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Support dependent extended vector types and template instantiation
thereof. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
9cdda0cf8528e3d595be9bfa002f0450074beb4d 17-Jun-2009 Douglas Gregor <dgregor@apple.com> Support dependent extended vector types and template instantiation
thereof. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
7739d8407b317ad76645a3d06419ca508c5090e7 17-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Added missing @endcode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
54481f194b6ac5c49f9220ca8d4f9f38d4d53c86 17-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Added missing @endcode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
b6d226f16c36fa694fda3b3f21cfbd102dc124c1 17-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose the use of attributes on namespace aliases, from Anis Ahmad

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
6a588dd230c14a364d222d6057bbcf11afbd9ffd 17-Jun-2009 Douglas Gregor <dgregor@apple.com> Diagnose the use of attributes on namespace aliases, from Anis Ahmad

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
5a95923ba25c50c96348bb7d2e45ca121c76736f 17-Jun-2009 Anders Carlsson <andersca@mac.com> Remove all non-const getters from TemplateArgumentList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
6f10d48b7da44da324247ddbf54e2ddda8e22dd3 17-Jun-2009 Anders Carlsson <andersca@mac.com> Remove all non-const getters from TemplateArgumentList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
ebd94c2e6773213ae1ac9e9b482e80e9487592f4 17-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Place -Wreadonly-setter-attrs under -Wmost option group.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
1fe5ffd005953bc1208267127b00d6be71a44ca6 17-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Place -Wreadonly-setter-attrs under -Wmost option group.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
329aa991e15f0092bc0685f9d57748a9450db18c 17-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fake support for -print-multi-*
- I think we will eventually need to support this for realz, and some build
processes seem to depend on these options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/ToolChain.h
12cfe036d809173a25af0104844d4bb66a92252b 17-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fake support for -print-multi-*
- I think we will eventually need to support this for realz, and some build
processes seem to depend on these options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/ToolChain.h
b45c92068b9d6fb460074dcdcb3930f3b66f0229 17-Jun-2009 Ted Kremenek <kremenek@apple.com> Add utility method GRStateRef::makeWithStore().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
cb7835f4f9b681c548f256b62b0810289d4856cd 17-Jun-2009 Ted Kremenek <kremenek@apple.com> Add utility method GRStateRef::makeWithStore().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
b4232810cdd0bcbfee961c56355f290b872df089 17-Jun-2009 Ted Kremenek <kremenek@apple.com> RegionStoreManager:
- Add "sections" to RegionStoreManager.cpp to delineate functionality.
- Add new function "CreateFieldsOnlyRegionStoreManager" that uses the new
RegionStoreFeatures class to use a reduced set of features from
RegionStoreManager (in this case, only field-sensitivity). This isn't
completely hooked up yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
9af46f59242cfaec74fa491a66724970478263eb 17-Jun-2009 Ted Kremenek <kremenek@apple.com> RegionStoreManager:
- Add "sections" to RegionStoreManager.cpp to delineate functionality.
- Add new function "CreateFieldsOnlyRegionStoreManager" that uses the new
RegionStoreFeatures class to use a reduced set of features from
RegionStoreManager (in this case, only field-sensitivity). This isn't
completely hooked up yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
62733928a9d16dfa37120a20587a3b824959d603 17-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Don't warn about -Winvalid-pch or -Wno-invalid-pch. Since we don't
search for PCH files that correspond to header inclusions, this option
does not make sense. Fixes <rdar://problem/6970322>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
97596b9e7cddfd8e931edc6b3685fe64693d2173 17-Jun-2009 Douglas Gregor <dgregor@apple.com> Don't warn about -Winvalid-pch or -Wno-invalid-pch. Since we don't
search for PCH files that correspond to header inclusions, this option
does not make sense. Fixes <rdar://problem/6970322>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
67f6cd73ff2c5b608227927123cfb1cfc6fe7338 16-Jun-2009 Chris Lattner <sabre@nondot.org> simplify .td file


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
530a417110e2fd9e1cc7f7c4f8d84461abe0b606 16-Jun-2009 Chris Lattner <sabre@nondot.org> simplify .td file


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
888a11db2c97c17a01fc490487e94ba18f8cf8ef 16-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Add -Wundeclared-selector to -Wmost options group.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
aa1234a537a032bf1082be4a4ed4688230cc2353 16-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Add -Wundeclared-selector to -Wmost options group.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
c4bdfcd19df88bd75cc31bdca20a359711f4ae8f 16-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Implements -Wundeclared-selector for ObjC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7ff22ded2221f442b1f8ff78172938d04ec8c926 16-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Implements -Wundeclared-selector for ObjC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2b323a09520aeefc657a5be52d45dd286380b789 16-Jun-2009 Chris Lattner <sabre@nondot.org> my refactoring of builtins changed target-specific builtins to only be
registered when PCH wasn't being used. We should always install (in BuiltinInfo)
information about target-specific builtins, but we shouldn't register any builtin
identifier infos. This fixes the build of apps that use PCH and target specific
builtins together.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
030e8fe5aabe6a50ed7da3182df8cbce446bfeab 16-Jun-2009 Chris Lattner <sabre@nondot.org> my refactoring of builtins changed target-specific builtins to only be
registered when PCH wasn't being used. We should always install (in BuiltinInfo)
information about target-specific builtins, but we shouldn't register any builtin
identifier infos. This fixes the build of apps that use PCH and target specific
builtins together.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Builtins.h
fe483ee196b58d11e91586e8ec59b9944a985d93 16-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Use canonical type for building ElementRegion. Otherwise ElementRegions cannot
be unique.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
143b2fc6fd3945c250b333383749010c2c8e3a4c 16-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Use canonical type for building ElementRegion. Otherwise ElementRegions cannot
be unique.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
37bb2bd63d6a2dfeb4b8f2e07205e501e96e49e1 16-Jun-2009 Anders Carlsson <andersca@mac.com> Handle temporaries in default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f54741e6465692d3bdbae974ac3beeeab92e4a95 16-Jun-2009 Anders Carlsson <andersca@mac.com> Handle temporaries in default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
4e3d355931542dc1a40c35c108f7e0b72876584c 16-Jun-2009 Anders Carlsson <andersca@mac.com> Keep track of whether a type parameter type is a parameter pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
76e4ce42a30cee4dc40ce7c6014874fbc4f9baa7 16-Jun-2009 Anders Carlsson <andersca@mac.com> Keep track of whether a type parameter type is a parameter pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
02dc3edc7f0eb2b8c86eb31011781faa0839ec3f 16-Jun-2009 Chris Lattner <sabre@nondot.org> accept and ignore -Wdiv-by-zero


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
187c22b79320cfec9c024c2f2f4b2aa367662f83 16-Jun-2009 Chris Lattner <sabre@nondot.org> accept and ignore -Wdiv-by-zero


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
84802eb7168db69179f7fa73aa45bfee0be66104 15-Jun-2009 Anders Carlsson <andersca@mac.com> Include <limits>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
3f3ce82674b44a58a2af7d90feb55acd906dd762 15-Jun-2009 Anders Carlsson <andersca@mac.com> Include <limits>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
86e20d021b955f83db4494ef577f045560b97864 15-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> More XML output support, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeVisitor.h
lang/Frontend/DeclContextXML.def
lang/Frontend/DeclXML.def
lang/Frontend/DocumentXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/StmtXML.def
lang/Frontend/TypeXML.def
038f75abf5abd1e35736dd5c751ba20df1158aaa 15-Jun-2009 Douglas Gregor <dgregor@apple.com> More XML output support, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeVisitor.h
lang/Frontend/DeclContextXML.def
lang/Frontend/DeclXML.def
lang/Frontend/DocumentXML.def
lang/Frontend/DocumentXML.h
lang/Frontend/StmtXML.def
lang/Frontend/TypeXML.def
023cbac100a3d7efe76337de307fee5b181d07e4 15-Jun-2009 Anders Carlsson <andersca@mac.com> More parameter pack work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
3b36b66a00b7d5bab71b486a54694f0ae397bddb 15-Jun-2009 Anders Carlsson <andersca@mac.com> More parameter pack work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
584b50610476aa300c4b648d860c8938cc7f23cb 15-Jun-2009 Anders Carlsson <andersca@mac.com> Add a new 'Pack' argument kind to TemplateArgument. This is not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
d01b1da213aeb71fd40ff7fb78a194613cc1ece7 15-Jun-2009 Anders Carlsson <andersca@mac.com> Add a new 'Pack' argument kind to TemplateArgument. This is not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
95d6c95238d03080803549be81139f03a098016e 14-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Update LLVM.

Implement support for C++ Substitution Failure Is Not An Error
(SFINAE), which says that errors that occur during template argument
deduction do *not* produce diagnostics and do not necessarily make a
program ill-formed. Instead, template argument deduction silently
fails. This is currently implemented for template argument deduction
during matching of class template partial specializations, although
the mechanism will also apply to template argument deduction for
function templates. The scheme is simple:

- If we are in a template argument deduction context, any diagnostic
that is considered a SFINAE error (or warning) will be
suppressed. The error will be propagated up the call stack via the
normal means.
- By default, all warnings and errors are SFINAE errors. Add the
NoSFINAE class to a diagnostic in the .td file to make it a hard
error (e.g., for access-control violations).

Note that, to make this fully work, every place in Sema that emits an
error *and then immediately recovers* will need to check
Sema::isSFINAEContext() to determine whether it must immediately
return an error rather than recovering.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
5e9f35c7cb61aea46f56d46c77cbcf47c0cf28ba 14-Jun-2009 Douglas Gregor <dgregor@apple.com> Update LLVM.

Implement support for C++ Substitution Failure Is Not An Error
(SFINAE), which says that errors that occur during template argument
deduction do *not* produce diagnostics and do not necessarily make a
program ill-formed. Instead, template argument deduction silently
fails. This is currently implemented for template argument deduction
during matching of class template partial specializations, although
the mechanism will also apply to template argument deduction for
function templates. The scheme is simple:

- If we are in a template argument deduction context, any diagnostic
that is considered a SFINAE error (or warning) will be
suppressed. The error will be propagated up the call stack via the
normal means.
- By default, all warnings and errors are SFINAE errors. Add the
NoSFINAE class to a diagnostic in the .td file to make it a hard
error (e.g., for access-control violations).

Note that, to make this fully work, every place in Sema that emits an
error *and then immediately recovers* will need to check
Sema::isSFINAEContext() to determine whether it must immediately
return an error rather than recovering.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
c46fcddc0bb2256110a710801f34a560453e3549 14-Jun-2009 Chris Lattner <sabre@nondot.org> Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Builtins.h
lang/Lex/Preprocessor.h
1b63e4f732dbc73d90abf886b4d21f8e3a165f6d 14-Jun-2009 Chris Lattner <sabre@nondot.org> Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Builtins.h
lang/Lex/Preprocessor.h
99ca9d64d362891c197bfda097e4994c41a67690 14-Jun-2009 Chris Lattner <sabre@nondot.org> move the various builtins stuff from libast to libbasic. This
fixes a layering violation in lib/Basic/Targets.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/PPCBuiltins.def
lang/AST/TargetBuiltins.h
lang/AST/X86Builtins.def
lang/Basic/Builtins.def
lang/Basic/Builtins.h
lang/Basic/BuiltinsPPC.def
lang/Basic/BuiltinsX86.def
lang/Basic/TargetBuiltins.h
6b15cdc1312f8fc45c86ee75e2a85106700e97f6 14-Jun-2009 Chris Lattner <sabre@nondot.org> move the various builtins stuff from libast to libbasic. This
fixes a layering violation in lib/Basic/Targets.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/PPCBuiltins.def
lang/AST/TargetBuiltins.h
lang/AST/X86Builtins.def
lang/Basic/Builtins.def
lang/Basic/Builtins.h
lang/Basic/BuiltinsPPC.def
lang/Basic/BuiltinsX86.def
lang/Basic/TargetBuiltins.h
950921c2eb50de386231062f91c88ff8adbd53b9 14-Jun-2009 Chris Lattner <sabre@nondot.org> prune #includes, Builtins.h/cpp no longer depends on libast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
f6c2a2a3ff0533334d15c96c24b22b57e13d4dd9 14-Jun-2009 Chris Lattner <sabre@nondot.org> prune #includes, Builtins.h/cpp no longer depends on libast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
260ad501d479ae610259272ad5ce13910b0cc0ac 14-Jun-2009 Chris Lattner <sabre@nondot.org> move GetBuiltinType from Builtin::Context to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.h
86df27bbdbb98c39ec2184695c0561209f91bedd 14-Jun-2009 Chris Lattner <sabre@nondot.org> move GetBuiltinType from Builtin::Context to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.h
cb9057e888b28ff7f12a3bf52d1293bbca193acf 14-Jun-2009 Chris Lattner <sabre@nondot.org> improve localizability by not passing english phrases into
diagnostics in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
6869d8ea1bb7d191b5b290f5a55ee74f2174829a 14-Jun-2009 Chris Lattner <sabre@nondot.org> improve localizability by not passing english phrases into
diagnostics in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
449eb1c6720c470df8fb12437e282aea14db4ff2 14-Jun-2009 Chris Lattner <sabre@nondot.org> add a handy predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
0d456588acac0713a7c33063922d35a8cc8c658e 14-Jun-2009 Chris Lattner <sabre@nondot.org> add a handy predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
81cb862d85f9e46753a01d12cf46e0604ee184b5 13-Jun-2009 Chris Lattner <sabre@nondot.org> declare an 'operator delete' to match operator new, this avoids many many
warnings when building with VC++, patch by AlisdairM!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
9509108b3dde280dca1999b5c054f5b789581e68 13-Jun-2009 Chris Lattner <sabre@nondot.org> declare an 'operator delete' to match operator new, this avoids many many
warnings when building with VC++, patch by AlisdairM!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
13fac3fcba7f8ad212cefb9a2a784c72a6cb3c74 13-Jun-2009 Anders Carlsson <andersca@mac.com> Have CheckClassTemplatePartialSpecializationArgs take a TemplateArgumentListBuilder. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
6360be748e494d35784834d39b2c2bc6cd187d0c 13-Jun-2009 Anders Carlsson <andersca@mac.com> Have CheckClassTemplatePartialSpecializationArgs take a TemplateArgumentListBuilder. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
7803aad2474c04bf356acf005a9d544248b5f739 13-Jun-2009 Chris Lattner <sabre@nondot.org> implement and document a new __has_feature and __has_builtin magic
builtin preprocessor macro. This appears to work with two caveats:
1) builtins are registered in -E mode, and 2) target-specific builtins
are unconditionally registered even if they aren't supported by the
target (e.g. SSE4 builtin when only SSE1 is enabled).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
148772a841cae6f32db16d890e788b92a763bb3f 13-Jun-2009 Chris Lattner <sabre@nondot.org> implement and document a new __has_feature and __has_builtin magic
builtin preprocessor macro. This appears to work with two caveats:
1) builtins are registered in -E mode, and 2) target-specific builtins
are unconditionally registered even if they aren't supported by the
target (e.g. SSE4 builtin when only SSE1 is enabled).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
4ffb581f6eb74e56c74dd3566c68ee53da004b20 13-Jun-2009 Anders Carlsson <andersca@mac.com> More work on type parameter packs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
0ceffb51b28b09db67404058c642dcb1f877f6e8 13-Jun-2009 Anders Carlsson <andersca@mac.com> More work on type parameter packs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
f90c2134cb342a33f4b112806052269fe847d5b2 13-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> When some template parameters of a class template partial
specialization cannot be deduced, produce a warning noting that the
affected class template partial specialization will never be used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
031a5880e19d06624551aed9d74594356f4f9db1 13-Jun-2009 Douglas Gregor <dgregor@apple.com> When some template parameters of a class template partial
specialization cannot be deduced, produce a warning noting that the
affected class template partial specialization will never be used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c2018a7038b1bc6f2b8866472e4508d45f4139e1 13-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to TemplateArgumentListBuilder to make it work better with parameter packs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclTemplate.h
67e332009c6e349dc34700f539747afcff990336 13-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to TemplateArgumentListBuilder to make it work better with parameter packs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclTemplate.h
b19295070a3ed69e36a57086ff9bb997a06f6aee 13-Jun-2009 Anders Carlsson <andersca@mac.com> A parameter pack must always come last in a class template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
49d2557addafd2f43b6d2ff54cf77b4f250d1544 13-Jun-2009 Anders Carlsson <andersca@mac.com> A parameter pack must always come last in a class template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
647d1ab319e47965daf56196b051725cf59c193b 13-Jun-2009 Anders Carlsson <andersca@mac.com> Address more comments from Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
ce5635a1008b3aedaecb1a3b29bb77e1b71080d1 13-Jun-2009 Anders Carlsson <andersca@mac.com> Address more comments from Doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
0485d88ad80aec19d42e079659f2ccf7a636b791 13-Jun-2009 Chris Lattner <sabre@nondot.org> add the location of the ')' in a do/while statement to DoStmt.
This fixes a source range problem reported by Olaf Krzikalla.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
989135901c750af61ef012b6b0a0368be415bc46 13-Jun-2009 Chris Lattner <sabre@nondot.org> add the location of the ')' in a do/while statement to DoStmt.
This fixes a source range problem reported by Olaf Krzikalla.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
a2333785cb39c5dc9e80b8d79d1ddc8ba65bbe42 13-Jun-2009 Anders Carlsson <andersca@mac.com> Parameter packs can't have default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9c4c5c8e174e203da5f841f187bd290a76b34710 13-Jun-2009 Anders Carlsson <andersca@mac.com> Parameter packs can't have default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eebbf9aa9b9bd0f9e61f5e622dbf36a60836161b 13-Jun-2009 Anders Carlsson <andersca@mac.com> Keep track of whether a type parameter is actually a type parameter pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
6d845ae1baf77691bca080e0762a1d45ee017f70 13-Jun-2009 Anders Carlsson <andersca@mac.com> Keep track of whether a type parameter is actually a type parameter pack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
4faa4269490ed6448711e3e0ae8792e6823ae354 13-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Finish implementing checking of class template partial specializations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
16df850bb73e8e2a3dece830b59785ff167428bc 13-Jun-2009 Douglas Gregor <dgregor@apple.com> Finish implementing checking of class template partial specializations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
424764408d9ba3a0b6a3f2b71650ab841bedeb67 13-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose C++ [temp.class.spec]p9b3, where a class template partial
specialization's arguments are identical to the implicit template
arguments of the primary template. Typically, this is meant to be a
declaration/definition of the primary template, so we give that
advice.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6aa75cfbdd473cb8fb2a2261abf7e9d3c8389bca 13-Jun-2009 Douglas Gregor <dgregor@apple.com> Diagnose C++ [temp.class.spec]p9b3, where a class template partial
specialization's arguments are identical to the implicit template
arguments of the primary template. Typically, this is meant to be a
declaration/definition of the primary template, so we give that
advice.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
76e7995d72d3966590e97e8897629c0b5b967536 12-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose the incorrect use of non-type template arguments for class
template partial specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e94866ffc12d33d30b351f30aac4aa3828bc05d7 12-Jun-2009 Douglas Gregor <dgregor@apple.com> Diagnose the incorrect use of non-type template arguments for class
template partial specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9c85fa039d98db5210fce90c6128938b93bfeff6 12-Jun-2009 Anders Carlsson <andersca@mac.com> Parse support for C++0x type parameter packs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
941df7dac2c733bad57342a01ca4c8dac956ef63 12-Jun-2009 Anders Carlsson <andersca@mac.com> Parse support for C++0x type parameter packs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
fbcc9e972aa713321e69b184e01c62976101b4ad 12-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Verify that the template parameters of a class template partial
specialization do not have default arguments
(C++ [temp.class.spec]p10).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ba1ecb564c05c2b749193e8deef1df3b69ea3f54 12-Jun-2009 Douglas Gregor <dgregor@apple.com> Verify that the template parameters of a class template partial
specialization do not have default arguments
(C++ [temp.class.spec]p10).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
623e2e07723aeb17b86146036f0ddec2a70fb93a 12-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Improve template argument deduction to keep track of why template
argument deduction failed. For example, given

template<typename T> struct is_same<T, T> { ... };

template argument deduction will fail for is_same<int, float>, and now
reports enough information

Right now, we don't do anything with this extra information, but it
can be used for informative diagnostics that say, e.g., "template
argument deduction failed because T was deduced to 'int' in one
context and 'float' in another".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
f67875d5addf36b951ad37fb04509ab2b572c88a 12-Jun-2009 Douglas Gregor <dgregor@apple.com> Improve template argument deduction to keep track of why template
argument deduction failed. For example, given

template<typename T> struct is_same<T, T> { ... };

template argument deduction will fail for is_same<int, float>, and now
reports enough information

Right now, we don't do anything with this extra information, but it
can be used for informative diagnostics that say, e.g., "template
argument deduction failed because T was deduced to 'int' in one
context and 'float' in another".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
a116e6e7d544e9e9680fc917709147ea71069877 12-Jun-2009 Anders Carlsson <andersca@mac.com> It's an error to use a function declared in a class definition as a default argument before the function has been declared.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
5e300d1a8e37f24e71f8cf204b982f20f85cf91a 12-Jun-2009 Anders Carlsson <andersca@mac.com> It's an error to use a function declared in a class definition as a default argument before the function has been declared.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
c5e01af856aca7fbacdf4835edd32a054a6328b2 11-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Template argument deduction for member pointers.

Also, introduced some of the framework for performing instantiation as
part of template argument deduction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
637a4097f61b09d6ccf619298d9d121fafa044e4 11-Jun-2009 Douglas Gregor <dgregor@apple.com> Template argument deduction for member pointers.

Also, introduced some of the framework for performing instantiation as
part of template argument deduction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a39e830d4f32b349943d6f3441e7a8c3407ef606 10-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Handle member pointer types with dependent class types (e.g., int
T::*) and implement template instantiation for member pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
949bf69136e07fb7968d84bc21d9272ff343ffdb 10-Jun-2009 Douglas Gregor <dgregor@apple.com> Handle member pointer types with dependent class types (e.g., int
T::*) and implement template instantiation for member pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
891d82f6cec99543735d2b4cd6354352862532be 09-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add more parser support for Microsoft extensions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
290eeb0ec2b6b91f3621e05ef541deb257fbea73 09-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add more parser support for Microsoft extensions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3575e26e2b42bbd30d1d4a46ec193b104e408f0a 08-Jun-2009 Daniel Dunbar <daniel@zuster.org> PR4016: Forward -fno-show-source-location to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
75eb1d64784946a37fc0b27596e2d92b6cf7033b 08-Jun-2009 Daniel Dunbar <daniel@zuster.org> PR4016: Forward -fno-show-source-location to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
cd2318453814adf1b1e57c7d85e72be39d6549d0 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add real parsing for __declspec. It doesn't make much of a difference
at the moment because we ignore the result.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
lang/Parse/Parser.h
a23b4856476320435e1ae59f71f19fc30b1c9992 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add real parsing for __declspec. It doesn't make much of a difference
at the moment because we ignore the result.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
lang/Parse/Parser.h
6b6ca949df5444625f4b527ae2da1d3cb8fc03fe 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Misc minor fixes for clang for the Windows target.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
abc4e32603bd9d3e392e23762cc366e45d772685 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Misc minor fixes for clang for the Windows target.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
b6eed6e84d81efeeda9e405fd6ec440b81510b14 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Delete method which is now trivial.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
26784c1dd1f3e395f024fd594646790421b3bbf3 08-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Delete method which is now trivial.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d2aaf78da4bd31653cf6d0cd378d1f520fd3069d 08-Jun-2009 Chris Lattner <sabre@nondot.org> teach clang that -Wunused turns on all unused warnings, even though most
of these are not implemented yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
f3a16608711f6b08f54b6e17395155df6b6568a1 08-Jun-2009 Chris Lattner <sabre@nondot.org> teach clang that -Wunused turns on all unused warnings, even though most
of these are not implemented yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
0ebbcba04c95cd6fc8033a862ddaebdc98875c26 07-Jun-2009 Anders Carlsson <andersca@mac.com> Instantiation support for more Obj-C expressions, string literals, @selector and @protocol expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
02d95baf23cbb29ea4ca58b3e8f54f92f845b900 07-Jun-2009 Anders Carlsson <andersca@mac.com> Instantiation support for more Obj-C expressions, string literals, @selector and @protocol expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
7e2e967f7df16c8f9b3cf75ff243765dc7d8ad3a 07-Jun-2009 Anders Carlsson <andersca@mac.com> Template instantiation support for Obj-C @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
fc0f021b492cf28ee7b3a6bd4445ae569e6f15de 07-Jun-2009 Anders Carlsson <andersca@mac.com> Template instantiation support for Obj-C @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
79488fc6abfbe7dba27b9bd924048904840d3cc0 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Remove a few more vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
8fff25719eb9363ac197ac4b375699a9afe9d36d 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Remove a few more vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
8faaf944d56cb82000a7378eae1fc4d466f35207 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
e0ae8bdadc4fef56db7f0e3336d0379a89eb462f 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
cac5494abf318f05bbf2355df0f7eff0ff999341 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of a bunch of dead builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
a311be7ddb3f6d732fce2ea09c8ffbeabaa94984 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of a bunch of dead builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
d2e57d9154d55251a4e94439dcdc96ab74f882ae 06-Jun-2009 Anders Carlsson <andersca@mac.com> Make ParmVarDecl::getDefaultArg() more robust, it now asserts that the argument is not unparsed. Add a new hasDefaultArg() and use it in places where getDefaultArg() was called when the argument was unparsed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ae0b4e7be78cf0dc2a6a333e865c2be9265774f9 06-Jun-2009 Anders Carlsson <andersca@mac.com> Make ParmVarDecl::getDefaultArg() more robust, it now asserts that the argument is not unparsed. Add a new hasDefaultArg() and use it in places where getDefaultArg() was called when the argument was unparsed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
62c2cca67194cb05e2c66a6637cb21e433726f1c 06-Jun-2009 Devang Patel <dpatel@apple.com> Set function Attribute::NoImplicitFloat appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
acebb397fa5d63835a0de9cee144987057ec1333 06-Jun-2009 Devang Patel <dpatel@apple.com> Set function Attribute::NoImplicitFloat appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
074cf971ecca9fb93427f5e2b044858570bdd9ba 05-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Use of DeclContext for objc's ivars. No functionality
change. More to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
496b5a894c5ec5425de53909f5aac3fb4771a2ec 05-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Use of DeclContext for objc's ivars. No functionality
change. More to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
8f75fbcdd758570d095dde0ecbe1c42facacbac6 05-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to CXXExprWithTemporaries in preparation for fixing a bug with default arguments that have temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
99ba36de0d5b34624e74e77bffa73929617976cb 05-Jun-2009 Anders Carlsson <andersca@mac.com> Improvements to CXXExprWithTemporaries in preparation for fixing a bug with default arguments that have temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
17e7b22caa9f6688c9ba2622ed02dfe7efda5644 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR3443: Add stpcpy builtin (plus a few other related builtins). Yes,
we're still missing a mechanism to disable these in strict mode, but
that's not a new issue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
c292b22a64682050b2b16fced68dd3784f3e4fb9 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR3443: Add stpcpy builtin (plus a few other related builtins). Yes,
we're still missing a mechanism to disable these in strict mode, but
that's not a new issue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
c395f022aa8dd748f3c82a1cbdddddbf41de0949 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add driver support for -fsigned-char/-funsigned-char.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
5a77973d9bc2c9cdbdb7860dcf3ac795abe258ec 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add driver support for -fsigned-char/-funsigned-char.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d9389beef9a889d95ea8417cc44db22e30ad9523 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Move CharIsSigned from TargetInfo to LangOptions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Basic/TargetInfo.h
15b91764d08e886391c865c4a444d7b51141c284 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Move CharIsSigned from TargetInfo to LangOptions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
lang/Basic/TargetInfo.h
f28d669407012f5e9914a7297d014ca2f423a472 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add a couple of FreeBSD-specific command-line options.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
145c6090752187228340edc9a2bec8f6b74841cf 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add a couple of FreeBSD-specific command-line options.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
590b5683fd7f7f5dbcaf5efd2178e5bc5bf2efed 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Address review comments for #pragma weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
dec7c76981a4624b6f40f2bf2375b174d1e90039 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Address review comments for #pragma weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
558a3a34d4a317592ea7ec74dafb7e15debe64ad 05-Jun-2009 Anders Carlsson <andersca@mac.com> Make TemplateArgumentListBuilder take an ASTContext (because we're probably going to need it later). Move push_back to the .cpp file. If the passed in template argument is a type, assert that it's canonical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
9ba41645892da0000fe8a7832b80208f44dafeda 05-Jun-2009 Anders Carlsson <andersca@mac.com> Make TemplateArgumentListBuilder take an ASTContext (because we're probably going to need it later). Move push_back to the .cpp file. If the passed in template argument is a type, assert that it's canonical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
0233eb600f22b2023000778205f3ae1dfa3f5292 05-Jun-2009 Anders Carlsson <andersca@mac.com> Make the TemplateArgumentList take a TemplateArgumentListBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
e9c904b082ac3299831704a69066b86ab0f78bec 05-Jun-2009 Anders Carlsson <andersca@mac.com> Make the TemplateArgumentList take a TemplateArgumentListBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
6e9d02f2456d21fb4e377d781d3d81dffe5fb30c 05-Jun-2009 Anders Carlsson <andersca@mac.com> Change the specialization decls to take a TemplateArgumentListBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
91fdf6f576b91f023c3bebb0d3786aab555cb3c5 05-Jun-2009 Anders Carlsson <andersca@mac.com> Change the specialization decls to take a TemplateArgumentListBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
a35faf97e36ffb4974f3f5f3ee6182fbbd9172c7 05-Jun-2009 Anders Carlsson <andersca@mac.com> Add a helper class for building template argument lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
1c5976e5e933c0d74f7e04e8f907a93f5edbfec1 05-Jun-2009 Anders Carlsson <andersca@mac.com> Add a helper class for building template argument lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
9758c0b0cc4683cd03e008f2a1469ee9b4c52076 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Start of a Sema implementation for #pragma weak. This isn't really the
right approach, but I'm still not sure what the best way to go about this is.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c49f19b6d39c5de71755a4be7c41f835c3e132f8 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Start of a Sema implementation for #pragma weak. This isn't really the
right approach, but I'm still not sure what the best way to go about this is.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ab9f71a3121ae99e85e09a34a8a35824d0ba0694 05-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Several improvements to template argument deduction:
- Once we have deduced template arguments for a class template partial
specialization, we use exactly those template arguments for instantiating
the definition of the class template partial specialization.
- Added template argument deduction for non-type template parameters.
- Added template argument deduction for dependently-sized array types.

With these changes, we can now implement, e.g., the remove_reference
type trait. Also, Daniel's Ackermann template metaprogram now compiles
properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
199d99192fbcca9f043596c40ead4afab4999dba 05-Jun-2009 Douglas Gregor <dgregor@apple.com> Several improvements to template argument deduction:
- Once we have deduced template arguments for a class template partial
specialization, we use exactly those template arguments for instantiating
the definition of the class template partial specialization.
- Added template argument deduction for non-type template parameters.
- Added template argument deduction for dependently-sized array types.

With these changes, we can now implement, e.g., the remove_reference
type trait. Also, Daniel's Ackermann template metaprogram now compiles
properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
7e8364db0fc9083f8e95d21ed1070aece054a37d 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add parser support for #pragma weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
9991479ad5dde617168cc1e4b18425cdbbfd9fa9 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add parser support for #pragma weak.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
a3707f1acc6077cd574ff75fed8bfb772f72dd52 05-Jun-2009 Devang Patel <dpatel@apple.com> Set function attribute llvm::Attribute::NoRedZone appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
24095dad88dd9d48aa16afa6416417073af251b5 05-Jun-2009 Devang Patel <dpatel@apple.com> Set function attribute llvm::Attribute::NoRedZone appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
69d7d6fc461240866c4c6882a44123cc69cb5f7f 04-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Clean up builtin lists, add a few new builtins. (I re-sorted the
string.h builtins to be in the same order as the list in the C99
standard.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
0b308ad34ffb29e508b681b155696f8f999532bb 04-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Clean up builtin lists, add a few new builtins. (I re-sorted the
string.h builtins to be in the same order as the list in the C99
standard.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
cca1e501443ff060a8a30949de27c281e3dd115e 04-Jun-2009 Edwin Török <edwintorok@gmail.com> forward -fno-color-diagnostics to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
a46c71abb1dc2f9758ad1abe3378534fe138e802 04-Jun-2009 Torok Edwin <edwintorok@gmail.com> forward -fno-color-diagnostics to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
eff3712dc7206a3819b1f01a27d4834ae13977f3 04-Jun-2009 Edwin Török <edwintorok@gmail.com> Add ANSI color support for clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
603fca728136f0e5d258a84e7bd4a0e1e9bd0803 04-Jun-2009 Torok Edwin <edwintorok@gmail.com> Add ANSI color support for clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
b290be02fc9148b81c17b27df39d34b7cb8ab674 04-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup/Refactoring of ivar collection. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8e6ac1d80055fa37b9b84029c7e751624ba7f84c 04-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup/Refactoring of ivar collection. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bf23a8a69def861809aaa2e0adb35be3920cacea 04-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> When performing template argument deduction, ensure that multiple
deductions of the same template parameter are equivalent. This allows
us to implement the is_same type trait (!).

Also, move template argument deduction into its own file and update a
few build systems with this change (grrrr).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
0b9247f129401b4849682b2e2bcdea8fc977068a 04-Jun-2009 Douglas Gregor <dgregor@apple.com> When performing template argument deduction, ensure that multiple
deductions of the same template parameter are equivalent. This allows
us to implement the is_same type trait (!).

Also, move template argument deduction into its own file and update a
few build systems with this change (grrrr).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72819 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
32690c128823c16dfd655c4e5cb3409b7e4c2588 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4308: Fix support for -m32/-m64 on Linux.

I'll look into cleaning this up a bit as a followup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
4e2567d6b1d9d046ca98aa3ab6a6b06ea5ea398b 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4308: Fix support for -m32/-m64 on Linux.

I'll look into cleaning this up a bit as a followup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
a67ac1e5d9f51606b13c5ce7f0052cd33b8fd056 03-Jun-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -mllvm; this just forwards options to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
e5280286573d4fe1220cdd66e147b572a05536a8 03-Jun-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -mllvm; this just forwards options to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
ae671cfac12c6f9b25dc0204f60fa0984e789d30 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for implicit int warnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fcff57751247d534159e0b51177cad5cc3e18ae7 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for implicit int warnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
09e747eb70fc16be89d0164a184c86d32d7449cc 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Fix up a bunch of warnings to use ExtWarn so they interact with
-pedantic-errors correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ecdb389dd38d4ae5012417464a42873ce280ba59 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Fix up a bunch of warnings to use ExtWarn so they interact with
-pedantic-errors correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a1485482fd58ac038352cfde57d5114636e0854b 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add support for -Wempty-body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
262856434289fcd159e95721ac6eed810bc9f79a 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add support for -Wempty-body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
1afe09b9b5ba10f250b0ba734a992518f8f9bdfb 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4290: Handle vfprintf in a way that doesn't give any diagnostics for
valid declarations and doesn't give an error for autoconf-style invalid
redeclarations. This isn't quite ideal, but I don't see any other way
easy way to handle it. (The only thing I can think of that's reasonably
general is adding a new builtin type FILETy which is only compatible
with a type equivalent to FILE, and that seems like overkill.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
c4db24a96d062b2d3fb1f46c28a75ed728b00030 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4290: Handle vfprintf in a way that doesn't give any diagnostics for
valid declarations and doesn't give an error for autoconf-style invalid
redeclarations. This isn't quite ideal, but I don't see any other way
easy way to handle it. (The only thing I can think of that's reasonably
general is adding a new builtin type FILETy which is only compatible
with a type equivalent to FILE, and that seems like overkill.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
d27b66b72540a65f89a15328b7112f79242439a2 03-Jun-2009 Daniel Dunbar <daniel@zuster.org> Add clang-cc support for -disable-llvm-optzns.
- Avoids running any LLVM optimizations, even at -O2, etc., while still keeping
any language changes these optimizations imply.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72742 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
877db3852e29c5b5a2dc25b3fe4a3b78619aa904 03-Jun-2009 Daniel Dunbar <daniel@zuster.org> Add clang-cc support for -disable-llvm-optzns.
- Avoids running any LLVM optimizations, even at -O2, etc., while still keeping
any language changes these optimizations imply.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72742 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
97d7a93bcfda52995a5f94ebd6dcbea570c54685 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Missing file for __builtin_unwind_init support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
05b65ef3fbcc4b82e9a6527d92efc5f9fbdfa916 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Missing file for __builtin_unwind_init support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72728 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
6a3cb5fc4e59f0e8e2e69891a4f29e9babe0499d 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add builtin declarations for the variants of sin and cos.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
0efa68487696d3cd8ae2f8207e4bfb5995d44951 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add builtin declarations for the variants of sin and cos.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
44ce6156bff4236d7f276b172199a17ccedfe932 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add --shared option.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
ddd1fb674eb54711d2504fe6c7fb9e3d10acff6a 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add --shared option.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
0ceca87a412419986679c121168150d1956fd9bd 01-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> A corner case of objc2 gc's write-barrier generation
for the Next runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
102e390bcb5a1fb1a8fdbc8505e6dfd905374bbd 01-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> A corner case of objc2 gc's write-barrier generation
for the Next runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ac5e9f9de0959d5b1d390dc9bdad2d6f3d77c5cb 01-Jun-2009 Anders Carlsson <andersca@mac.com> Fix a bug in hasEmptyExceptionSpec. (Thanks Sebastian for noticing).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a12823f6c0ec9e0e644a9d0ee153e973f49c63fc 01-Jun-2009 Anders Carlsson <andersca@mac.com> Fix a bug in hasEmptyExceptionSpec. (Thanks Sebastian for noticing).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
54c024ed0e052b08cf9cdbb2670744c4c4351cd5 01-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4283: Don't truncate multibyte character constants in the
preprocessor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
2a1c363f38e59a5044fc349aa7e538a50954c244 01-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4283: Don't truncate multibyte character constants in the
preprocessor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
11269048f03d91e991150c429dc874ae3999acb0 31-May-2009 Anders Carlsson <andersca@mac.com> Improve irgen of 'new' further.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d3fd6bad1249d3f34d71b73e2333fab0db51cce4 31-May-2009 Anders Carlsson <andersca@mac.com> Improve irgen of 'new' further.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
449e7c1de1694b79e5539bda8827edc66efffd5e 31-May-2009 Chris Lattner <sabre@nondot.org> Downgrade an error about "return in a no-return function" from being
an error to being a warning that defaults to error. If you want this to
be a warning, you have to explicitly pass -Winvalid-noreturn to clang to
map it back to a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8662587fa75d3fb04f873e265841c9314c7f5523 31-May-2009 Chris Lattner <sabre@nondot.org> Downgrade an error about "return in a no-return function" from being
an error to being a warning that defaults to error. If you want this to
be a warning, you have to explicitly pass -Winvalid-noreturn to clang to
map it back to a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9fbe9bfcc4bbc42f45936d4dc1dd2e60bb4e12bc 31-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow exception specs on typedefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
3cc9726a493d90bd8faf094986a59352fd3461cb 31-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow exception specs on typedefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
58944acac481a17adc174389c1124892cbdfd979 31-May-2009 Douglas Gregor <doug.gregor@gmail.com> Initial infrastructure for class template partial specialization. Here
we have the basics of declaring and storing class template partial
specializations, matching class template partial specializations at
instantiation time via (limited) template argument deduction, and
using the class template partial specialization's pattern for
instantiation.

This patch is enough to make a simple is_pointer type trait work, but
not much else.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
c8ab2563ac8f7dcc4fdc518b5cc7015ecbb2f003 31-May-2009 Douglas Gregor <dgregor@apple.com> Initial infrastructure for class template partial specialization. Here
we have the basics of declaring and storing class template partial
specializations, matching class template partial specializations at
instantiation time via (limited) template argument deduction, and
using the class template partial specialization's pattern for
instantiation.

This patch is enough to make a simple is_pointer type trait work, but
not much else.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.td
9da59ae5fe60ad4b75251a8ca75c660826a24d23 31-May-2009 Anders Carlsson <andersca@mac.com> Add more getters to the new AST nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f0721fe438d7e40c168e5d664970e7830bc138fb 31-May-2009 Anders Carlsson <andersca@mac.com> Add more getters to the new AST nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
cb8e0c060390e2a97c736aab525eb1127b7d0176 31-May-2009 Anders Carlsson <andersca@mac.com> Clean up the newly added C++ AST nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
88eaf075c56672761b72cc50957db4a35bf24ebd 31-May-2009 Anders Carlsson <andersca@mac.com> Clean up the newly added C++ AST nodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
1d768747ea6bfb2024a247821769c39362484d93 30-May-2009 Anders Carlsson <andersca@mac.com> ActOnReturnStmt should also take a FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a0ab25d2808fe77ffff54f25a015893791dfd4b6 30-May-2009 Anders Carlsson <andersca@mac.com> ActOnReturnStmt should also take a FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f9f05b833a9778ec1405b6c8c79ae9a2e2de65b0 30-May-2009 Anders Carlsson <andersca@mac.com> AddInitializerToDecl needs to take a full expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f5dcd3885865c931fdbd16f36237af70743d53c6 30-May-2009 Anders Carlsson <andersca@mac.com> AddInitializerToDecl needs to take a full expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
5b839c8c9a2867a96fda009b1bcbadbf99034047 30-May-2009 Anders Carlsson <andersca@mac.com> Get rid of CXXTempVarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
1c02101999a576790b433ac4b5195e7ac4197347 30-May-2009 Anders Carlsson <andersca@mac.com> Get rid of CXXTempVarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
5552c80bf4f02f764bb9d8708bbc686845bf9bb4 30-May-2009 Anders Carlsson <andersca@mac.com> Stop using CXXTempVarDecl and use CXXTemporary instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
ff6b3d64c9f07155f1414411b8451d7bf8937c62 30-May-2009 Anders Carlsson <andersca@mac.com> Stop using CXXTempVarDecl and use CXXTemporary instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
7b7b25588fbcda3306d9725d863daed4f54699c2 30-May-2009 Anders Carlsson <andersca@mac.com> Remove VarDecl from CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
8e587a15da6d3457a418239d5eb4146fcbd209f3 30-May-2009 Anders Carlsson <andersca@mac.com> Remove VarDecl from CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
432ba3cd4f8c581555d10660de2f276c6ce58ce3 30-May-2009 Anders Carlsson <andersca@mac.com> Small fixes to CXXTemporary and CXXBindTemporaryExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
b859f35459ae3e1188d1e1b86df08d649695fd86 30-May-2009 Anders Carlsson <andersca@mac.com> Small fixes to CXXTemporary and CXXBindTemporaryExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
873176e53a2e499bfea5568f3a31556d38130b21 30-May-2009 Anders Carlsson <andersca@mac.com> Add a CXXBindTemporaryExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
fceb0a8adba9d25db99a4d73e9655c2831a96ecd 30-May-2009 Anders Carlsson <andersca@mac.com> Add a CXXBindTemporaryExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
29f365d254741434c8e9fa9855e4ae8f8985554a 30-May-2009 Anders Carlsson <andersca@mac.com> Add a CXXTemporary class. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
c1ce477119fed070299668aab24084b17ff5f14b 30-May-2009 Anders Carlsson <andersca@mac.com> Add a CXXTemporary class. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
8d8ddcab753252ea999c37c2b585399bb8a7dfed 30-May-2009 Douglas Gregor <doug.gregor@gmail.com> Pretty printing and improved representation for namespace alias declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6c9c94053132e5ca0655124b70f1c386a332e71d 30-May-2009 Douglas Gregor <dgregor@apple.com> Pretty printing and improved representation for namespace alias declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
1d27d691cda32d632aea9b83f6a57d4caf6ba60b 30-May-2009 Douglas Gregor <doug.gregor@gmail.com> Printing for using directives, e.g.,

using namespace std::debug;

Extended UsingDirectiveDecl to store the nested-name-specifier that
precedes the nominated namespace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
8419fa3af97208eb00f0cd6c62354ce4ff986677 30-May-2009 Douglas Gregor <dgregor@apple.com> Printing for using directives, e.g.,

using namespace std::debug;

Extended UsingDirectiveDecl to store the nested-name-specifier that
precedes the nominated namespace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
4bdae72abaf70019a9acddcb106d56fd33e813b9 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Add a Stmt::printPretty overload which takes an ASTContext; start
transitioning callers over to pass one in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
48d14a222276fad5279e994d1a062f36ae6fcbce 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Add a Stmt::printPretty overload which takes an ASTContext; start
transitioning callers over to pass one in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d73364a1cba83527465133c5575dec4ac8ece3c4 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Expose an API to print a group of decls (like "int a,b;").
Make StmtPrinter use DeclPrinter to print all declarations. Merge
declarations in the limited case of an unnamed TagDecl followed by one
or more declarations using that TagDecl directly. Change
SuppressTypeSpecifiers to the more general SuppressSpecifiers, and
use it to suppress stuff like "typedef" and "extern". Replace
OwnedTag with SuppressTag, since it's more convenient to print
declarations from DeclPrinter at the moment.
improvements to declaration printing. Fix pretty-printing for K&R
function definitions and __builtin_va_arg.

We're now to the point where the pretty-printing output for non-trivial
programs can actually be piped back into clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/PrettyPrinter.h
42f42c0dd5cf71fbfc6fa282d03079a902f6e342 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Expose an API to print a group of decls (like "int a,b;").
Make StmtPrinter use DeclPrinter to print all declarations. Merge
declarations in the limited case of an unnamed TagDecl followed by one
or more declarations using that TagDecl directly. Change
SuppressTypeSpecifiers to the more general SuppressSpecifiers, and
use it to suppress stuff like "typedef" and "extern". Replace
OwnedTag with SuppressTag, since it's more convenient to print
declarations from DeclPrinter at the moment.
improvements to declaration printing. Fix pretty-printing for K&R
function definitions and __builtin_va_arg.

We're now to the point where the pretty-printing output for non-trivial
programs can actually be piped back into clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/PrettyPrinter.h
84bca951282f362c439cc7993fcb4d145384e416 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Add support for PrintingPolicy::SuppressTypeSpecifiers to type printing.
(I have a work-in-progress patch which uses this.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
22b61e937dcd8ba2e14764c367f975a392ec7da0 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Add support for PrintingPolicy::SuppressTypeSpecifiers to type printing.
(I have a work-in-progress patch which uses this.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
996677cffa764e70e85f289a2edd88aa48b57c2d 30-May-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor and clean up the AST printer, so that it uses a DeclVisitor,
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/PrettyPrinter.h
lang/Frontend/ASTConsumers.h
4fe0c8e9c76b96e7aff21696a40dacc09d0237bc 30-May-2009 Douglas Gregor <dgregor@apple.com> Refactor and clean up the AST printer, so that it uses a DeclVisitor,
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/PrettyPrinter.h
lang/Frontend/ASTConsumers.h
d3f6b1658df4f89167a2a6848c3a80c198d67844 29-May-2009 Anders Carlsson <andersca@mac.com> Add code for emitting C++ destructors. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
7267c1693abe7875b0c57268be05005ae013c6c9 29-May-2009 Anders Carlsson <andersca@mac.com> Add code for emitting C++ destructors. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
3bf3bbcb3cf79cc5bc065a011f5ae195667d3a29 29-May-2009 Douglas Gregor <doug.gregor@gmail.com> Create a new PrintingPolicy class, which we pass down through the AST
printing logic to help customize the output. For now, we use this
rather than a special flag to suppress the "struct" when printing
"struct X" and to print the Boolean type as "bool" in C++ but "_Bool"
in C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/NestedNameSpecifier.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
lang/AST/TemplateName.h
lang/AST/Type.h
d249e1d1f1498b81314459ceda19d6ff25c278ad 29-May-2009 Douglas Gregor <dgregor@apple.com> Create a new PrintingPolicy class, which we pass down through the AST
printing logic to help customize the output. For now, we use this
rather than a special flag to suppress the "struct" when printing
"struct X" and to print the Boolean type as "bool" in C++ but "_Bool"
in C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/NestedNameSpecifier.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
lang/AST/TemplateName.h
lang/AST/Type.h
aaacda9e0df28383bf78db72e2a5831cbdd23a08 29-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Reject incomplete types in exception specs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
ef65f06e8e440aec541442cfd73a8a836e9bc842 29-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Reject incomplete types in exception specs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
dfc009f08085c2daa8f74214c966a74950db5d26 29-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow exception specifications on multi-level indirections.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6a7330c20cabf1cf1cd46f5dfc183ec3a72add66 29-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow exception specifications on multi-level indirections.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4d57af2198b8cfe9505c43266383419c1303ecfd 29-May-2009 Eli Friedman <eli.friedman@gmail.com> If a declarator group declares a type, make sure to add that declaration
to the DeclGroup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c1dc653b08226c1d8e1732f9d8b03b82869900bc 29-May-2009 Eli Friedman <eli.friedman@gmail.com> If a declarator group declares a type, make sure to add that declaration
to the DeclGroup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
71f06033638805d6179308b7d574241500d5056f 29-May-2009 Douglas Gregor <doug.gregor@gmail.com> When we parse a tag specifier, keep track of whether that tag
specifier resulted in the creation of a new TagDecl node, which
happens either when the tag specifier was a definition or when the tag
specifier was the first declaration of that tag type. This information
has several uses, the first of which is implemented in this commit:

1) In C++, one is not allowed to define tag types within a type
specifier (e.g., static_cast<struct S { int x; } *>(0) is
ill-formed) or within the result or parameter types of a
function. We now diagnose this.

2) We can extend DeclGroups to contain information about any tags
that are declared/defined within the declaration specifiers of a
variable, e.g.,

struct Point { int x, y, z; } p;

This will help improve AST printing and template instantiation,
among other things.

3) For C99, we can keep track of whether a tag type is defined
within the type of a parameter, to properly cope with cases like,
e.g.,

int bar(struct T2 { int x; } y) {
struct T2 z;
}

We can also do similar things wherever there is a type specifier,
e.g., to keep track of where the definition of S occurs in this
legal C99 code:

(struct S { int x, y; } *)0





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/DeclSpec.h
402abb55fc2e0cdda5fb1ac90009b1f5f6774906 29-May-2009 Douglas Gregor <dgregor@apple.com> When we parse a tag specifier, keep track of whether that tag
specifier resulted in the creation of a new TagDecl node, which
happens either when the tag specifier was a definition or when the tag
specifier was the first declaration of that tag type. This information
has several uses, the first of which is implemented in this commit:

1) In C++, one is not allowed to define tag types within a type
specifier (e.g., static_cast<struct S { int x; } *>(0) is
ill-formed) or within the result or parameter types of a
function. We now diagnose this.

2) We can extend DeclGroups to contain information about any tags
that are declared/defined within the declaration specifiers of a
variable, e.g.,

struct Point { int x, y, z; } p;

This will help improve AST printing and template instantiation,
among other things.

3) For C99, we can keep track of whether a tag type is defined
within the type of a parameter, to properly cope with cases like,
e.g.,

int bar(struct T2 { int x; } y) {
struct T2 z;
}

We can also do similar things wherever there is a type specifier,
e.g., to keep track of where the definition of S occurs in this
legal C99 code:

(struct S { int x, y; } *)0





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/DeclSpec.h
1a6b88e99f3c83f9404cccef65fb38230799a747 28-May-2009 Douglas Gregor <doug.gregor@gmail.com> Introduced DeclContext::isDependentContext, which determines whether a
given DeclContext is dependent on type parameters. Use this to
properly determine whether a TagDecl is dependent; previously, we were
missing the case where the TagDecl is a local class of a member
function of a class template (phew!).

Also, make sure that, when we instantiate declarations within a member
function of a class template (or a function template, eventually),
that we add those declarations to the "instantiated locals" map so
that they can be found when instantiating declaration references.

Unfortunately, I was not able to write a useful test for this change,
although the assert() that fires when uncommenting the FIXME'd line in
test/SemaTemplate/instantiate-declref.cpp tells the "experienced user"
that we're now doing the right thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
bc221637f5ed3538b8495dd13b831c11e821c712 28-May-2009 Douglas Gregor <dgregor@apple.com> Introduced DeclContext::isDependentContext, which determines whether a
given DeclContext is dependent on type parameters. Use this to
properly determine whether a TagDecl is dependent; previously, we were
missing the case where the TagDecl is a local class of a member
function of a class template (phew!).

Also, make sure that, when we instantiate declarations within a member
function of a class template (or a function template, eventually),
that we add those declarations to the "instantiated locals" map so
that they can be found when instantiating declaration references.

Unfortunately, I was not able to write a useful test for this change,
although the assert() that fires when uncommenting the FIXME'd line in
test/SemaTemplate/instantiate-declref.cpp tells the "experienced user"
that we're now doing the right thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
a376cbd55366711bb9dd98b730b3d0f8c80fb2ba 28-May-2009 Douglas Gregor <doug.gregor@gmail.com> Reimplement much of the way that we track nested classes in the
parser. Rather than placing all of the delayed member function
declarations and inline definitions into a single bucket corresponding
to the top-level class, we instead mirror the nesting structure of the
nested classes and place the delayed member functions into their
appropriate place. Then, when we actually parse the delayed member
function declarations, set up the scope stack the same way as it was
when we originally saw the declaration, so that we can find, e.g.,
template parameters that are in scope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
6569d68745c8213709740337d2be52b031384f58 28-May-2009 Douglas Gregor <dgregor@apple.com> Reimplement much of the way that we track nested classes in the
parser. Rather than placing all of the delayed member function
declarations and inline definitions into a single bucket corresponding
to the top-level class, we instead mirror the nesting structure of the
nested classes and place the delayed member functions into their
appropriate place. Then, when we actually parse the delayed member
function declarations, set up the scope stack the same way as it was
when we originally saw the declaration, so that we can find, e.g.,
template parameters that are in scope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
2118b9e0dc68c262cd61cb23917de368a01eaacb 28-May-2009 Eli Friedman <eli.friedman@gmail.com> restrict is not a keyword in gnu89 mode. Change TokenKinds.def to
reflect that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
2073fd555f714e9632d70e9c5a88d140930aeadb 28-May-2009 Eli Friedman <eli.friedman@gmail.com> restrict is not a keyword in gnu89 mode. Change TokenKinds.def to
reflect that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
2767d88f088ce07f489e6a64592950f9c0a91ebd 28-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
465226e23a3008bd68973513dda1f9e3cd27dbdd 28-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the home for exception specs, and make Sema fill it. However, keep the spec out of the canonical type this time. Net effect is currently nothing, because the spec isn't checked anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c4cce788eda845e01907c60e31f7d73ffbed4521 27-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add a big test case for I-C-Es in C++, and a fix to make it work. The fix might not be the right way to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
1590d9c0fec4c710c2962e4bb71f76979b5163d3 27-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add a big test case for I-C-Es in C++, and a fix to make it work. The fix might not be the right way to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
8d71743661227dd7a938d217ae28c55f2b7c1abf 27-May-2009 Douglas Gregor <doug.gregor@gmail.com> Enumeration declarations that were instantiated from an enumeration
within a template now have a link back to the enumeration from which
they were instantiated. This means that we can now find the
instantiation of an anonymous enumeration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8dbc3c64965f99e48830885835b7d2fc26ec3cf5 27-May-2009 Douglas Gregor <dgregor@apple.com> Enumeration declarations that were instantiated from an enumeration
within a template now have a link back to the enumeration from which
they were instantiated. This means that we can now find the
instantiation of an anonymous enumeration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f3345920d34981ccd9e5f496d61252edbf02360e 27-May-2009 Fariborz Jahanian <fjahanian@apple.com> Initialize ObjCSenderDispatch in LangOptions.
Patch by Benjamin Kramer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
355bf958ad2d988d046e16b9bb66647ad01c91fe 27-May-2009 Fariborz Jahanian <fjahanian@apple.com> Initialize ObjCSenderDispatch in LangOptions.
Patch by Benjamin Kramer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
83418529244038b34ae9990b4cf6ac0a92f8c741 27-May-2009 Steve Naroff <snaroff@apple.com> Convert ObjC qualified type clients over to using iterators.

This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
446ee4eb4fc4c705a59365252df7a5c253daafa1 27-May-2009 Steve Naroff <snaroff@apple.com> Convert ObjC qualified type clients over to using iterators.

This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4833ff0f4a21577e2b4d2c870adab24e5199ef7a 26-May-2009 Douglas Gregor <doug.gregor@gmail.com> When evaluating a VarDecl as a constant or determining whether it is
an integral constant expression, maintain a cache of the value and the
is-an-ICE flag within the VarDecl itself. This eliminates
exponential-time behavior of the Fibonacci template metaprogram.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
78d1583d0b36b7d6d8d10234cdc19ab94adf765a 26-May-2009 Douglas Gregor <dgregor@apple.com> When evaluating a VarDecl as a constant or determining whether it is
an integral constant expression, maintain a cache of the value and the
is-an-ICE flag within the VarDecl itself. This eliminates
exponential-time behavior of the Fibonacci template metaprogram.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8cac4352ef388e935be9735fc3b1d75acf8e7d11 26-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4140: Add the start of a Linux toolchain (basically, just
barely enough to get the given usage of -print-file-name working).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
6b3454a219cee5ef36c4668961f93a5c32deab61 26-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4140: Add the start of a Linux toolchain (basically, just
barely enough to get the given usage of -print-file-name working).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
6607090cc24009592efb9bb0be861d7f5230cdc5 26-May-2009 Anders Carlsson <andersca@mac.com> Add a new CallExpr::getCallReturnType and use it in Expr::isLvalueInternal. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6dde78f744382a5627a04f984a97049e0c4b5e73 26-May-2009 Anders Carlsson <andersca@mac.com> Add a new CallExpr::getCallReturnType and use it in Expr::isLvalueInternal. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0a4b3e5e61988bbd23a418f8c5d7aa3bda174ba0 26-May-2009 Anders Carlsson <andersca@mac.com> Remove a bunch of unused constructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtObjC.h
e9263729b701cb02201907c6942cada72d5eefbf 26-May-2009 Anders Carlsson <andersca@mac.com> Remove a bunch of unused constructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtObjC.h
74a53bcdbebce31e1a3ae48ebf3bf9b2db68eb9d 25-May-2009 Chris Lattner <sabre@nondot.org> reword a warning for clarity


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3f76ae12b90f9a911fccc3612c2d4ba79b5a8b55 25-May-2009 Chris Lattner <sabre@nondot.org> reword a warning for clarity


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eb5a9f936f93852404fdd137dce77ab390a07dca 25-May-2009 Chris Lattner <sabre@nondot.org> default -Wnonnull to on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2b68eb342c33cd7b490a89c41ce67e60b2d6058c 25-May-2009 Chris Lattner <sabre@nondot.org> default -Wnonnull to on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c2ae485f3694bd93f0df232955bdbdd51d4e7026 25-May-2009 Chris Lattner <sabre@nondot.org> move some format group options around in the file. Move NonNull group into
DiagnosticGroups.td, and add it as part of -Wformat (which gets it into -Wall).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
abbe2d7324152bb7dc6a6535507e936225f9dff4 25-May-2009 Chris Lattner <sabre@nondot.org> move some format group options around in the file. Move NonNull group into
DiagnosticGroups.td, and add it as part of -Wformat (which gets it into -Wall).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
4cb1cce4045851f6ebfbb6cb7262dee9b313698c 23-May-2009 Ted Kremenek <kremenek@apple.com> Use 'Exprs.data()' instead of 'Exprs.empty() ? NULL : ...'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
15dffd863b4d8f6f7b04b5c80566ea3531a14f41 23-May-2009 Ted Kremenek <kremenek@apple.com> Use 'Exprs.data()' instead of 'Exprs.empty() ? NULL : ...'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8b6324149527bd141346c88b87560775c1514e7b 23-May-2009 Douglas Gregor <doug.gregor@gmail.com> Fix the parent classes in TypeNodes.def, from Olaf Krzikalla

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeNodes.def
02fd8ddba96a529c5868162a13f7bb2c5e36d522 23-May-2009 Douglas Gregor <dgregor@apple.com> Fix the parent classes in TypeNodes.def, from Olaf Krzikalla

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeNodes.def
dcd7a7af67970771e691c49805c7e55e5721f5ba 23-May-2009 Ted Kremenek <kremenek@apple.com> Modify begin()/end() for AsmStmt iterators to handle the case when Exprs.empty()
is true. Because of recent changes to llvm::SmallVector, using these iterators
when Exprs was empty would cause an assertion failure.

This fixes: PR 4245.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d59a5bd0ab7821a643c540df8c84c70fef76a1c2 23-May-2009 Ted Kremenek <kremenek@apple.com> Modify begin()/end() for AsmStmt iterators to handle the case when Exprs.empty()
is true. Because of recent changes to llvm::SmallVector, using these iterators
when Exprs was empty would cause an assertion failure.

This fixes: PR 4245.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
4862e875890b1e27ac474f6ee193753fdb72a776 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> Cannot type cast @selector expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b5ff6bfaf4bff6c70042600ad4070518440cec4a 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> Cannot type cast @selector expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
93b8b0f10bd443028da8d3af67874de578737171 22-May-2009 Douglas Gregor <doug.gregor@gmail.com> Representation of and template instantiation for member
expressions. This change introduces another AST node,
CXXUnresolvedMemberExpr, that captures member references (x->m, x.m)
when the base of the expression (the "x") is type-dependent, and we
therefore cannot resolve the member reference yet.

Note that our parsing of member references for C++ is still quite
poor, e.g., we don't handle x->Base::m or x->operator int.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
1c0ca59416999129d0439c2661d137ef38e86209 22-May-2009 Douglas Gregor <dgregor@apple.com> Representation of and template instantiation for member
expressions. This change introduces another AST node,
CXXUnresolvedMemberExpr, that captures member references (x->m, x.m)
when the base of the expression (the "x") is type-dependent, and we
therefore cannot resolve the member reference yet.

Note that our parsing of member references for C++ is still quite
poor, e.g., we don't handle x->Base::m or x->operator int.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
fefd5e89c5144fec7fdaff9c2c50f3237879261d 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
34e65770ad6142b033d6cec4f476ed20fb248bf3 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
d1cf46726227e8e32829109ff2aa3a8e00d7d5eb 22-May-2009 Daniel Dunbar <daniel@zuster.org> Don't warn about -funit-at-a-time, and reject -fno-unit-at-a-time.
- We could just warn about -fno-unit-at-a-time, but in practice people using it
probably aren't going to get what they want out of clang.

Also, use "clang" specified error for unsupported things instead of driver
unsupported error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.def
e027a4b2399e9b0acfe0f77220c66bbe369067ee 22-May-2009 Daniel Dunbar <daniel@zuster.org> Don't warn about -funit-at-a-time, and reject -fno-unit-at-a-time.
- We could just warn about -fno-unit-at-a-time, but in practice people using it
probably aren't going to get what they want out of clang.

Also, use "clang" specified error for unsupported things instead of driver
unsupported error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Options.def
c0672e4add6bd89aee2bb032b4f91bd1aff100e2 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> (Next runtime only) check to see if class implements forwardInvocation method
and objects of this class are derived from 'NSProxy'.
Under such conditions, which means that every method possible is
implemented in the class, we should not issue "Method definition not found"
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
cd1876207f5564beba74e4b2524b664bdba0ba9f 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> (Next runtime only) check to see if class implements forwardInvocation method
and objects of this class are derived from 'NSProxy'.
Under such conditions, which means that every method possible is
implemented in the class, we should not issue "Method definition not found"
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
785299bacb3e98a508bb24e23bb0f2466d094586 22-May-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Handle correctly a very ugly part of the C++ syntax. We cannot disambiguate between a parenthesized type-id and
a paren expression without considering the context past the parentheses.

Behold:
(T())x; - type-id
(T())*x; - type-id
(T())/x; - expression
(T()); - expression

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f58f45e6d76792df8c643ce1c6d364dce5db4826 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle correctly a very ugly part of the C++ syntax. We cannot disambiguate between a parenthesized type-id and
a paren expression without considering the context past the parentheses.

Behold:
(T())x; - type-id
(T())*x; - type-id
(T())/x; - expression
(T()); - expression

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
70c9582bc0b6975dfb3f27cef53499195e82b463 22-May-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Factor the compound literal parsing out from ParseParenExpression and into a new ParseCompoundLiteralExpression.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d974a7b72eb84cdc735b189bcea56fd37e13ebf6 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Factor the compound literal parsing out from ParseParenExpression and into a new ParseCompoundLiteralExpression.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
32d6d1016a868a9c4eb0a64992c1b65b8a4bf23b 22-May-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Modification to ParseParenExpression.
Now it parses the cast expression unless 'stopIfCastExpr' is true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0350ca519405051e8d45d12ee7d09569a6a9c4c9 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modification to ParseParenExpression.
Now it parses the cast expression unless 'stopIfCastExpr' is true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d61a2f7617c1afb4b041a679f0d6790c5285a705 22-May-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove ParseSimpleParenExpression.
Embed its functionality into it's only user, ParseCXXCasts.
CXXCasts now get the "actual" expression directly, they no longer always receive a ParenExpr. This is better since the
parentheses are always part of the C++ casts syntax.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
21e7ad24099965acfa801e4abdd91e3d94106428 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove ParseSimpleParenExpression.
Embed its functionality into it's only user, ParseCXXCasts.
CXXCasts now get the "actual" expression directly, they no longer always receive a ParenExpr. This is better since the
parentheses are always part of the C++ casts syntax.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4c90fb27d4353b6971fefdd5cd008f91d9bf3e69 22-May-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Refactor the common code of 'ParseTypeofSpecifier' and 'ParseSizeofAlignofExpression' into a new
'ParseExprAfterTypeofSizeofAlignof' method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5ab0640efb436a721d408c853b771932d1a6ffce 22-May-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor the common code of 'ParseTypeofSpecifier' and 'ParseSizeofAlignofExpression' into a new
'ParseExprAfterTypeofSizeofAlignof' method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
08303652626519a0d29a48a483803f0dd3f2383d 22-May-2009 Daniel Dunbar <daniel@zuster.org> (llvm up) Use llvm::Triple for storing target triples.
- This commit has some messy stuff in it to extend string lifetimes, but that
will go away once we switch to using the enum'd Triple interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
lang/Driver/ToolChain.h
cb8ab23f7c800b041aeb6fc38c341d1aa0da86bf 22-May-2009 Daniel Dunbar <daniel@zuster.org> (llvm up) Use llvm::Triple for storing target triples.
- This commit has some messy stuff in it to extend string lifetimes, but that
will go away once we switch to using the enum'd Triple interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
lang/Driver/ToolChain.h
f8d02dae5a4f12c8fd07ade677e111d8df089c68 22-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyzer-no-default-checks and --analyzer-output options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d8fc0f2e7751cf31cec5c2f3cc6a0b447e9debb3 22-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyzer-no-default-checks and --analyzer-output options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
3a7a06edafb1c7474a7b41ee760101e433639273 22-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for C99 designated initializers, because we
can. Also, delay semantic analysis of initialization for
value-dependent as well as type-dependent expressions, since we can't
always properly type-check a value-dependent expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9ea62768fca25d829d80199cf4f8cf0f4dd39251 22-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for C99 designated initializers, because we
can. Also, delay semantic analysis of initialization for
value-dependent as well as type-dependent expressions, since we can't
always properly type-check a value-dependent expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8987c0341afa395e09d29ae5439d2d814ca87121 21-May-2009 Douglas Gregor <doug.gregor@gmail.com> AST XML dump, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/DocumentXML.h
ee75c05c1a0218369cac26ab1c847d9a04e4db88 21-May-2009 Douglas Gregor <dgregor@apple.com> AST XML dump, from Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
lang/Frontend/DocumentXML.h
5440d2f8d6fd39f16510de5086a707df4e3664ab 21-May-2009 Fariborz Jahanian <fjahanian@apple.com> Check on null arguments in the presense of nonnull attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e898f8a94947c6074d76ff83943b47d5bbdf210d 21-May-2009 Fariborz Jahanian <fjahanian@apple.com> Check on null arguments in the presense of nonnull attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c378232fae7e00cd6cd43af493c219e769fc316a 21-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for C++ throw expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
42e5b50f4dc897f252e0d476063a7f9846d96624 21-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for C++ throw expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
de3011ccf5cc0b45f26024445b4facf8afcae942 21-May-2009 Douglas Gregor <doug.gregor@gmail.com> Merge the ASTVector and ASTOwningVector templates, since they offered
redundant functionality. The result (ASTOwningVector) lives in
clang/Parse/Ownership.h and is used by both the parser and semantic
analysis. No intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
45db71d295cfda888a6187d950bba695ce21a287 21-May-2009 Douglas Gregor <dgregor@apple.com> Merge the ASTVector and ASTOwningVector templates, since they offered
redundant functionality. The result (ASTOwningVector) lives in
clang/Parse/Ownership.h and is used by both the parser and semantic
analysis. No intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
9e6bef4fb5efb19c7286fa24d8aedab9c3d625fc 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
beaaccd8e2a8748f77b66e2b330fb9136937e14c 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
1f280197fe37c7e05c6bdb4d6c320ec7925c6d02 21-May-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new kind of RAII class, ASTOwningVector, which is an
llvm::SmallVector that owns all of the AST nodes inside of it. This
RAII class is used to ensure proper destruction of AST nodes when
template instantiation fails.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
d7e2705961bacb9df5d9119403c01c9b04aff97f 21-May-2009 Douglas Gregor <dgregor@apple.com> Introduce a new kind of RAII class, ASTOwningVector, which is an
llvm::SmallVector that owns all of the AST nodes inside of it. This
RAII class is used to ensure proper destruction of AST nodes when
template instantiation fails.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
66c3cf00b06119ec4141d1e54d5e7cd7b03a2e6f 20-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for the various kinds of AST nodes that occur
due to C++ type construction of the form T(a1, a2, ..., aN).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d94546a0a1deef7286c13e49b9584621ae81cc9a 20-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for the various kinds of AST nodes that occur
due to C++ type construction of the form T(a1, a2, ..., aN).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f27b765e5a5e06ff637e0ef35fdc1bfead9040a4 20-May-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new expression type, CXXUnresolvedConstructExpr, to
describe the construction of a value of a given type using function
syntax, e.g.,

T(a1, a2, ..., aN)

when the type or any of its arguments are type-dependent. In this
case, we don't know what kind of type-construction this will be: it
might construct a temporary of type 'T' (which might be a class or
non-class type) or might perform a conversion to type 'T'. Also,
implement printing of and template instantiation for this new
expression type. Due to the change in Sema::ActOnCXXTypeConstructExpr,
our existing tests cover template instantiation of this new expression
node.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
d81e6ca6e378c3996a139066a5c4b7fc1869630c 20-May-2009 Douglas Gregor <dgregor@apple.com> Introduce a new expression type, CXXUnresolvedConstructExpr, to
describe the construction of a value of a given type using function
syntax, e.g.,

T(a1, a2, ..., aN)

when the type or any of its arguments are type-dependent. In this
case, we don't know what kind of type-construction this will be: it
might construct a temporary of type 'T' (which might be a class or
non-class type) or might perform a conversion to type 'T'. Also,
implement printing of and template instantiation for this new
expression type. Due to the change in Sema::ActOnCXXTypeConstructExpr,
our existing tests cover template instantiation of this new expression
node.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
306d7251d0fe8749f2a6a8cb67546830be520f0c 20-May-2009 Fariborz Jahanian <fjahanian@apple.com> implementation of format_arg for ObjC methods/functions.
Still more to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
5b160927672440076aa53c31d84149f70fd8d40e 20-May-2009 Fariborz Jahanian <fjahanian@apple.com> implementation of format_arg for ObjC methods/functions.
Still more to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
c890e3373b77bd2bd0c5394e313b8a2932897a97 20-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> * API change: we need to pass GRState to GRExprEngine::EvalBinOp() because
RegionStore needs to know the type of alloca region.
* RegionStoreManager::EvalBinOp() now converts the alloca region to its first
element region, as what is done to symbolic region.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/Store.h
262fd03ee934bebfbbfaabc14744427dd2e7a231 20-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> * API change: we need to pass GRState to GRExprEngine::EvalBinOp() because
RegionStore needs to know the type of alloca region.
* RegionStoreManager::EvalBinOp() now converts the alloca region to its first
element region, as what is done to symbolic region.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/Store.h
110536d7d0a3f15ce50fb93800718d9311a42cf7 20-May-2009 Anders Carlsson <andersca@mac.com> Create a temporary if the lvalue is a bitfield. Reported by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
38d068e8f13a119b89a3b8b0f79f35cab1ffd09a 20-May-2009 Anders Carlsson <andersca@mac.com> Create a temporary if the lvalue is a bitfield. Reported by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e621150f8912706269f94b652d974107176f7ab3 20-May-2009 Douglas Gregor <doug.gregor@gmail.com> Ban the use of __builtin_types_compatible_p in C++; g++ doesn't support it,
and it isn't clear exactly what it's supposed to mean. Thanks Eli!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c12a9c5e552825c2b7d2e4352a9f70e061ebb367 20-May-2009 Douglas Gregor <dgregor@apple.com> Ban the use of __builtin_types_compatible_p in C++; g++ doesn't support it,
and it isn't clear exactly what it's supposed to mean. Thanks Eli!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d870a2c80634f4ae6373c2ddefddac04577724cf 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove finished FIXME.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
d1f22e1f73b67116393720739d3ab8116ae301bc 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove finished FIXME.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/AnalysisConsumer.h
7efefa5a73ae01e3abb862d530bc8d59f11dbb87 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Move AnalysisConsumer.h and Analyses.def from tools/clang-cc to
include/clang/Frontend, and move AnalysisConsumer.cpp from
tools/clang-cc to lib/Frontend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
lang/Frontend/AnalysisConsumer.h
0ec78fa2c92b714de41cc87cfa79e4877ab5479e 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Move AnalysisConsumer.h and Analyses.def from tools/clang-cc to
include/clang/Frontend, and move AnalysisConsumer.cpp from
tools/clang-cc to lib/Frontend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Analyses.def
lang/Frontend/AnalysisConsumer.h
b4245188f28d3942f42380a803755acabe4f3aec 19-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for __builtin_types_compatible_p.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dc241b42c7588f99027b035a09b71557a6db219e 19-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for __builtin_types_compatible_p.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e0513a3d92d53cd06fe37b48a31b5b86d63b8ed6 19-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for cast expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a3a7b8eea87c90a5a257f685749222b212ddaf36 19-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for cast expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
536f73dd0285c8830454234935df46c8a715e07d 19-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch finishes off application of printf attribute on blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d66f22d9f8423579322a6dd16587ed52b0a58834 19-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch finishes off application of printf attribute on blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7e1d637529268aecf06e0a5f270265b213cf1218 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
files to lib/Frontend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
b09f6e15c59b89d5820db8ef40598eb1d1323c1f 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
files to lib/Frontend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/Utils.h
532291e93b3e9b52ae9be59e34031cac29c7afb0 19-May-2009 Anders Carlsson <andersca@mac.com> Add comment about FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b4685713856cab28aeeb4afd640a8bbfb662a8b8 19-May-2009 Anders Carlsson <andersca@mac.com> Add comment about FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e1f8c0ab26edd816d905e766aefd7023ea4878cf 19-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for call expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
4a2487aeacf9f35ce553318c2eb39c20ec23845e 19-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for call expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d98d887e5b8d58db5bf26444466d487f210ce25f 19-May-2009 Daniel Dunbar <daniel@zuster.org> Remove -fprintf-source-range-info from the Driver (this was renamed)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
f4e2486145b426e84175c8e34b0f200d74daa98b 19-May-2009 Daniel Dunbar <daniel@zuster.org> Remove -fprintf-source-range-info from the Driver (this was renamed)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
22a4efdff773597c4dc620f7fa2e5b720c8840af 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Move ASTConsumers.h to include/clang/Frontend, and move the associated
.cpp files to lib/Frontend. (As proposed on cfe-dev.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
39d7c4d2d980651c4263b67cf0ab61dec34cd76b 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Move ASTConsumers.h to include/clang/Frontend, and move the associated
.cpp files to lib/Frontend. (As proposed on cfe-dev.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/ASTConsumers.h
4a95134918f5492e363a44868e3473299e0562ce 19-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for imaginary literals, because they were next in Expr.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d8ac436c8c10c52c937ba323db582259ceb06197 19-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for imaginary literals, because they were next in Expr.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
57420b4ca8a98a4c81b7a55338ad0b6a8d993b4e 18-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for C++ try/catch statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
d308e6201afd3a8a198c52ba034d35ed19d4bafe 18-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for C++ try/catch statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
2c82f46840555ba0ced3abaa22d526b6a2c5a2d7 18-May-2009 Anders Carlsson <andersca@mac.com> Remove an unused builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
409bf46742e2f38b2f4cec53c86b109bed42840d 18-May-2009 Anders Carlsson <andersca@mac.com> Remove an unused builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
d657fd86fc1c4de8e7ca9f2670796f3713c1c1be 18-May-2009 Anders Carlsson <andersca@mac.com> Add 'cmp' SSE builtins and get rid of a bunch of other builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
79dcf5f96ad75259867d19bbf69512f320032fce 18-May-2009 Anders Carlsson <andersca@mac.com> Add 'cmp' SSE builtins and get rid of a bunch of other builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
728451428126809d3fd1d3c60e937d61c58fd4c7 18-May-2009 Douglas Gregor <doug.gregor@gmail.com> Simplify struct/class tag mismatch warning, per Sebastian's suggestion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
52b2fe2d70d83f73ee59e9ad3d0ba8ac154acfda 18-May-2009 Douglas Gregor <dgregor@apple.com> Simplify struct/class tag mismatch warning, per Sebastian's suggestion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b12249d254535d4b156c9dc5bfa9f0b9a0ccc548 18-May-2009 Douglas Gregor <doug.gregor@gmail.com> When instantiating the definition of a member function of a class
template, introduce that member function into the template
instantiation stack. Also, add diagnostics showing the member function
within the instantiation stack and clean up the qualified-name
printing so that we get something like:

note: in instantiation of member function 'Switch1<int, 2, 2>::f'
requested here

in the template instantiation backtrace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f3e7ce4bd9837cdab6a096235922865f95467d3d 18-May-2009 Douglas Gregor <dgregor@apple.com> When instantiating the definition of a member function of a class
template, introduce that member function into the template
instantiation stack. Also, add diagnostics showing the member function
within the instantiation stack and clean up the qualified-name
printing so that we get something like:

note: in instantiation of member function 'Switch1<int, 2, 2>::f'
requested here

in the template instantiation backtrace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fbc3ed48e5f4447e32e66effaf4eff546854b52a 18-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR2386: distinguish between insertion and replacements in the
delta tree.

The issue is roughly a conflict in ReplaceText between two kinds of
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression. Two, it should be possible to
replace text that already has text inserted before it: for example, the
HTML rewriter inserts a bunch of tags at the beginning of the line, then
tries to escape the first character on the line. This patch
distinguishes the two cases by storing the deltas separately;
essentially, replacements and insertions no longer interfere with
each other.

Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.

There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added. Another is that an insertion
and replacing a string of length zero are distinct operations; I'm not
sure how to resolve this, or whether it will be confusing in practice.

This is relatively sensitive code, so please test and tell me if
anything breaks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
a0978c24829dfd552d38fc3bae2b86e18bb90d49 18-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR2386: distinguish between insertion and replacements in the
delta tree.

The issue is roughly a conflict in ReplaceText between two kinds of
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression. Two, it should be possible to
replace text that already has text inserted before it: for example, the
HTML rewriter inserts a bunch of tags at the beginning of the line, then
tries to escape the first character on the line. This patch
distinguishes the two cases by storing the deltas separately;
essentially, replacements and insertions no longer interfere with
each other.

Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.

There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added. Another is that an insertion
and replacing a string of length zero are distinct operations; I'm not
sure how to resolve this, or whether it will be confusing in practice.

This is relatively sensitive code, so please test and tell me if
anything breaks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
e5a86c263336f1aee07b3fd1f17b06c4d494a6b4 18-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove tabs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
a3306f0b9f988677bf12c3403dd0c0336cb5c246 18-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove tabs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
e934dca8a88f890a67e926c94903fe3dd46bbd54 18-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused parameter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
f086e3bef1d98d3fb6c17c8d6b62f3eedd9eb78c 18-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused parameter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
3ee2dae8b70bb32bd5d7caa71b1d498a650735b0 17-May-2009 Anders Carlsson <andersca@mac.com> Make ActOnWhileStmt take a FullExprArg for the condition expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7f537c18c7029e73f0bd555be3782c066e7e2c1e 17-May-2009 Anders Carlsson <andersca@mac.com> Make ActOnWhileStmt take a FullExprArg for the condition expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
18ca477e291542fcb9e1beb50cacf32e67498f13 17-May-2009 Anders Carlsson <andersca@mac.com> Make ActOnExprStmt take a FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6b1d283fe879fb11d7ce7a69feecf66e77b0eaf3 17-May-2009 Anders Carlsson <andersca@mac.com> Make ActOnExprStmt take a FullExprArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
934d176d525bf4236770f8c474e32586f1cc78de 17-May-2009 Anders Carlsson <andersca@mac.com> Fix DISABLE_SMART_POINTERS build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
df3b2089692dae0ef00b79e9240b2ccf9b36ff94 17-May-2009 Anders Carlsson <andersca@mac.com> Fix DISABLE_SMART_POINTERS build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e4d378906a83376e6167b0428f6c082d1b4a894b 17-May-2009 Anders Carlsson <andersca@mac.com> Add the FullExprArg wrapper and use it for if statement conditions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
a99fad8ff134273fe85f2970c7d89133d1218900 17-May-2009 Anders Carlsson <andersca@mac.com> Add the FullExprArg wrapper and use it for if statement conditions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
7624471afa349dd73419a4ff5643a0e7c6664344 17-May-2009 Anders Carlsson <andersca@mac.com> Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
05eb24474218d70366b4d7d6b5b19dda2473a163 17-May-2009 Anders Carlsson <andersca@mac.com> Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
f80e261d943ecbef3036c769e492dcda0012c67d 16-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
8b0b475b3464b0f70b91ba7d679d23c424677d5e 16-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
5055ab95ebb0cc1271b1bb37f766eac0b479613b 16-May-2009 Eli Friedman <eli.friedman@gmail.com> Missing change for r71941 (PR2044).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c55666fb05f2e9c628911291ac12f8d006468d70 16-May-2009 Eli Friedman <eli.friedman@gmail.com> Missing change for r71941 (PR2044).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
155750e17d2489f702f22bc0250cef953b1d2913 16-May-2009 Mike Stump <mrs@apple.com> Implement a FIXME, we now pass in the locations of the braces for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c6e35aae23bc3cea7daf5ee075fa695c01c0f66f 16-May-2009 Mike Stump <mrs@apple.com> Implement a FIXME, we now pass in the locations of the braces for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
83df82a4b8272c846b2b24350784793b57f8f561 16-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for IndirectGotoStmt. Now my life is complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5f1b9e689fa5c101512aef99225f2afea1673449 16-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for IndirectGotoStmt. Now my life is complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
34712db615418b178dff09ba45112bc44c4e1993 16-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for switch statements


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
dbb26db1d426fb6caaaf1b4fa47b46d1947c12c9 16-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for switch statements


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
72d3c669ed7257bf3c169dabc2316d04c416a959 16-May-2009 Anders Carlsson <andersca@mac.com> Basic support for member exprs where the base expr type is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ffce2df6ae280d354d51371282a579df1eb86876 16-May-2009 Anders Carlsson <andersca@mac.com> Basic support for member exprs where the base expr type is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
777cc7a08e55e0b027ee4c7dd9caa6481b23b034 16-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for break and continue statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
861ce3178c70cfb0fa50baf685e1ad363538eaa9 16-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for break and continue statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
821a2a4a652b423d422fa3ea44f8d24165c38f59 16-May-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce the EXPR macro into StmtNodes.def, so that we can
distinguish between expression and statement nodes. No functionality
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
20ecb9eec281184cfb2c7110b2f6d86fa446761f 16-May-2009 Douglas Gregor <dgregor@apple.com> Introduce the EXPR macro into StmtNodes.def, so that we can
distinguish between expression and statement nodes. No functionality
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
1401330b1c620dd8e14af4e2c1b1589cf68dc2c3 16-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for "for" loops

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5831c6a1efc47e6a19d82fe3dd25b5b8fef6979d 16-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for "for" loops

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ef482764777252110a1095e7f5b7a300ccb26d4e 15-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for do-while statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9f3ca2a7747bd47f14d7693f333103fac29a24d2 15-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for do-while statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
cbe3be67e42644ed596a4cc4444ea0cae48b39e6 15-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for WhileStmt and CXXConditionDeclExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
4a2e2041edc63db687677325e113b39b9d123c40 15-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for WhileStmt and CXXConditionDeclExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
6dac16d54fef437e5f8adceb0ab5d89fa6029d96 15-May-2009 Fariborz Jahanian <fjahanian@apple.com> improved on diagnosing misplacement of sentinel attributes.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3bba33d6f58844d4924ab1e221dc2ff44c521624 15-May-2009 Fariborz Jahanian <fjahanian@apple.com> improved on diagnosing misplacement of sentinel attributes.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c10357dff31d7acfd4be986958629d05f91993d9 15-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch finishes off the sentinel attribute handling for
blocks and function pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
daf0415583e33d5d279197c65e9227c1ed92474b 15-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch finishes off the sentinel attribute handling for
blocks and function pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
12aed0be9db50a396a9163bea1ee466a8e2c2b5e 15-May-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that the type associated with a class template is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
aafc0ccfcf860d921a86423c6c9a738301987abf 15-May-2009 Douglas Gregor <dgregor@apple.com> Make sure that the type associated with a class template is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
30033494eab58aefa22eb275c00ef458b8e6a538 15-May-2009 Douglas Gregor <doug.gregor@gmail.com> Template instantiation for "if" statements. Also:

- Skip semantic analysis of the "if" condition if it is type-dependent.
- Added the location of the "else" keyword into IfStmt, so that we can
provide it for type-checking after template instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d06f6ca61062f85926eb9d409eb3d4f8afcf93c7 15-May-2009 Douglas Gregor <dgregor@apple.com> Template instantiation for "if" statements. Also:

- Skip semantic analysis of the "if" condition if it is type-dependent.
- Added the location of the "else" keyword into IfStmt, so that we can
provide it for type-checking after template instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
328b9dfb017589eae55f21859ac3e0b373dcef1d 15-May-2009 Anders Carlsson <andersca@mac.com> Add NullStmt::Clone and use it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d19cd90b266181c4a8d186adfa20ccebe73336cc 15-May-2009 Anders Carlsson <andersca@mac.com> Add NullStmt::Clone and use it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
f98556020bc7f248ac17c9804e4e5af1a636f514 15-May-2009 Anders Carlsson <andersca@mac.com> Check that the function being overridden is virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
77b7f1d4fb782c9152f91b76f9f8b1d1af21bd35 15-May-2009 Anders Carlsson <andersca@mac.com> Check that the function being overridden is virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
d9d6d50992923eeb0c0ac0a2ec2d227867d35787 14-May-2009 Anders Carlsson <andersca@mac.com> Improvements to the FunctionDecl getters/setters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a75e8534f2b7c2480c48f31f301bd00b241c5499 14-May-2009 Anders Carlsson <andersca@mac.com> Improvements to the FunctionDecl getters/setters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
260059cab5bab4960880bc9155b32618201d7994 14-May-2009 Douglas Gregor <doug.gregor@gmail.com> Link FunctionDecls instantiated from the member functions of a class
template to the FunctionDecls from which they were instantiated. This
is a necessary first step to support instantiation of the definitions
of such functions, but by itself does essentially nothing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
1eee0e753fb390b04848846e837714ec774b7bfd 14-May-2009 Douglas Gregor <dgregor@apple.com> Link FunctionDecls instantiated from the member functions of a class
template to the FunctionDecls from which they were instantiated. This
is a necessary first step to support instantiation of the definitions
of such functions, but by itself does essentially nothing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
aad078bd35fb22678e4a0c42d1fd4653c18dc3ab 14-May-2009 Anders Carlsson <andersca@mac.com> Fix a speling error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
67a1eadcf7c20cd5534645468eca458902e31add 14-May-2009 Anders Carlsson <andersca@mac.com> Fix a speling error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
157c4264aef499b146c6258bcba34b2ea88a29a3 14-May-2009 Fariborz Jahanian <fjahanian@apple.com> Adds recognition of sentinel attribute on block declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2f7c39246a968b921a6d95c7f8037fb3429e9501 14-May-2009 Fariborz Jahanian <fjahanian@apple.com> Adds recognition of sentinel attribute on block declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ee7177b01a43b5cbd7591a411729eff304a82ddc 14-May-2009 Anders Carlsson <andersca@mac.com> Better diagnostics for covariance when checking overriding return types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c3a68b25cdd687d4beb59f083fcb22afe173286f 14-May-2009 Anders Carlsson <andersca@mac.com> Better diagnostics for covariance when checking overriding return types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
09f2e3fab4800bc6ba7579e180778b8e9c452795 14-May-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose missing sentinel argument on a funciton call
with sentinel attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
236673e8fbd391cc7827efcaa64320344900d348 14-May-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose missing sentinel argument on a funciton call
with sentinel attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
625185c386e0117a1e2b19117e23f07235a006e8 14-May-2009 Douglas Gregor <doug.gregor@gmail.com> In C++, warn when something previously declared as a "struct" is later
declared as a "class", or vice-versa. This warning is under the
control of -Wmismatched-tags, which is off by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
501c5ce63c2ff54c103fbab8c1c45234d5a82a57 14-May-2009 Douglas Gregor <dgregor@apple.com> In C++, warn when something previously declared as a "struct" is later
declared as a "class", or vice-versa. This warning is under the
control of -Wmismatched-tags, which is off by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
85f0a464a4c4ab57c148ac372cf07e8beb32d274 14-May-2009 Douglas Gregor <doug.gregor@gmail.com> Add forward declaration of Token. Thanks to Martin Doucha for pointing this out

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
7633ab80454147ab4892b8de5fd16582a1f221e8 14-May-2009 Douglas Gregor <dgregor@apple.com> Add forward declaration of Token. Thanks to Martin Doucha for pointing this out

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
e80e29c17b537cadb1d9d6d306508a10379f1f79 14-May-2009 Anders Carlsson <andersca@mac.com> Add return type checking for overriding virtual functions. We currently don't check covariance but that's next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d7ba27dc562e1837703fa8696531c1f21a5fdb36 14-May-2009 Anders Carlsson <andersca@mac.com> Add return type checking for overriding virtual functions. We currently don't check covariance but that's next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
96b6df95c32cc11fdc3bae59e01d7ecb594f66e0 14-May-2009 Douglas Gregor <doug.gregor@gmail.com> Implement explicit instantiations of member classes of class templates, e.g.,

template<typename T>
struct X {
struct Inner;
};

template struct X<int>::Inner;

This change is larger than it looks because it also fixes some
a problem with nested-name-specifiers and tags. We weren't requiring
the DeclContext associated with the scope specifier of a tag to be
complete. Therefore, when looking for something like "struct
X<int>::Inner", we weren't instantiating X<int>.

This, naturally, uncovered a problem with member pointers, where we
were requiring the left-hand side of a member pointer access
expression (e.g., x->*) to be a complete type. However, this is wrong:
the semantics of this expression does not require a complete type (EDG
agrees).

Stuart vouched for me. Blame him.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
3f5b61c394f4f205bcb4d316eb2a7a0a68b8af86 14-May-2009 Douglas Gregor <dgregor@apple.com> Implement explicit instantiations of member classes of class templates, e.g.,

template<typename T>
struct X {
struct Inner;
};

template struct X<int>::Inner;

This change is larger than it looks because it also fixes some
a problem with nested-name-specifiers and tags. We weren't requiring
the DeclContext associated with the scope specifier of a tag to be
complete. Therefore, when looking for something like "struct
X<int>::Inner", we weren't instantiating X<int>.

This, naturally, uncovered a problem with member pointers, where we
were requiring the left-hand side of a member pointer access
expression (e.g., x->*) to be a complete type. However, this is wrong:
the semantics of this expression does not require a complete type (EDG
agrees).

Stuart vouched for me. Blame him.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
79d29e764fd8f8fefda3cdf61dc959d56a0c1fa1 14-May-2009 Fariborz Jahanian <fjahanian@apple.com> Look for and diagnose missing sentinel argument on message
dispatch arguments which have sentinel attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
88f1ba0f0439e31ab57ffc088aa91137cadee585 14-May-2009 Fariborz Jahanian <fjahanian@apple.com> Look for and diagnose missing sentinel argument on message
dispatch arguments which have sentinel attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4330d8d82e4de280c6dca4f202b8cc53db26960f 13-May-2009 Ted Kremenek <kremenek@apple.com> Add some basic type checking for attributes ns_returns_retained and
cf_returns_retained. Currently this attribute can now be applied to any
Objective-C method or C function that returns a pointer or Objective-C object
type.

Modify the tablegen definition of diagnostic 'warn_attribute_wrong_decl_type' to
expect that the diagnostics infrastructure will add quotes around the attribute
name when appropriate. Alonq with this change, I modified the places where this
warning is issued to passed the attribute's IdentifierInfo* instead of having a
hard-coded C constant string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5dc53c9c2328b5bea5422005b04960c18afd83ad 13-May-2009 Ted Kremenek <kremenek@apple.com> Add some basic type checking for attributes ns_returns_retained and
cf_returns_retained. Currently this attribute can now be applied to any
Objective-C method or C function that returns a pointer or Objective-C object
type.

Modify the tablegen definition of diagnostic 'warn_attribute_wrong_decl_type' to
expect that the diagnostics infrastructure will add quotes around the attribute
name when appropriate. Alonq with this change, I modified the places where this
warning is issued to passed the attribute's IdentifierInfo* instead of having a
hard-coded C constant string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f23101418d1c1844893aa52420f5ba19742aaf9f 13-May-2009 Anders Carlsson <andersca@mac.com> Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
a33d9b4ebf732a5da6d56fd7319ff6c020789b1c 13-May-2009 Anders Carlsson <andersca@mac.com> Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/LangOptions.h
29cf6d6cb367ca10d0c4c4c7f3f6c140aa3647b4 13-May-2009 Ted Kremenek <kremenek@apple.com> Add PostStmt::getStmtAs(). This unbreaks the build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
6bad354120ce0d35901e86ca63e5534b7b9ed092 13-May-2009 Ted Kremenek <kremenek@apple.com> Add PostStmt::getStmtAs(). This unbreaks the build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
fd8c6340db0e3c9ccb04ca764a41d378ace65e11 13-May-2009 Ted Kremenek <kremenek@apple.com> Add ExplodedNode utility methods 'getLocationAs()' and 'getFirstPred()'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71699 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
52c3196a89a26cebcf069dd140c3396b743b8e33 13-May-2009 Ted Kremenek <kremenek@apple.com> Add ExplodedNode utility methods 'getLocationAs()' and 'getFirstPred()'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71699 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
162736b1d5e8bbb6aa8a2321a61aa5ce5e9eaf31 13-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Emit an unsupported error on -iframework.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
95a0da7b263777e6f97e5a08b6eb893681a234ba 13-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Emit an unsupported error on -iframework.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
9017791815e42a07864bccf7b1517f445e491400 13-May-2009 Douglas Gregor <doug.gregor@gmail.com> Improve the semantic checking for explicit instantiations of
templates. In particular:
- An explicit instantiation can follow an implicit instantiation (we
were improperly diagnosing this as an error, previously).
- In C++0x, an explicit instantiation that follows an explicit
specialization of the same template specialization is ignored. In
C++98, we just emit an extension warning.
- In C++0x, an explicit instantiation must be in a namespace
enclosing the original template. C++98 has no such requirement.

Also, fixed a longstanding FIXME regarding the integral type that is
used for the size of a constant array type when it is being instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ff66803b43f2ea9206637dceb793e9505f3b9c48 13-May-2009 Douglas Gregor <dgregor@apple.com> Improve the semantic checking for explicit instantiations of
templates. In particular:
- An explicit instantiation can follow an implicit instantiation (we
were improperly diagnosing this as an error, previously).
- In C++0x, an explicit instantiation that follows an explicit
specialization of the same template specialization is ignored. In
C++98, we just emit an extension warning.
- In C++0x, an explicit instantiation must be in a namespace
enclosing the original template. C++98 has no such requirement.

Also, fixed a longstanding FIXME regarding the integral type that is
used for the size of a constant array type when it is being instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
180f341a528dd5608704b40de48620720e6a9dc7 13-May-2009 Fariborz Jahanian <fjahanian@apple.com> Some early declarations to support sentinel attribute on
message dispatches (and function calls later). No change in
functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
5b53005fb9ef24b8bdfe995f29b4662de468128a 13-May-2009 Fariborz Jahanian <fjahanian@apple.com> Some early declarations to support sentinel attribute on
message dispatches (and function calls later). No change in
functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
57278230bfb1f257ee245aa0d158bd1a692bcdd6 13-May-2009 Chris Lattner <sabre@nondot.org> reject use of the GNU _Decimal32 extension with a diagnostic, not an abort.
rdar://6880104


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8f12f65fad7bfbbdbd4234efe0d484f68c3924b6 13-May-2009 Chris Lattner <sabre@nondot.org> reject use of the GNU _Decimal32 extension with a diagnostic, not an abort.
rdar://6880104


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
077fed531835769c12eed0ccfe8d14b92b5336ae 13-May-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6881069, a crash on a form of vector_size that we
don't support. While it would be nice to support this eventually,
this form is not common at all (just seen in gcc testsuite) and
it might be better to model vector_size as a type attribute anyway.
For now just emit a nice error on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2db15bdd945163eacfa4623fd2e32a536ed2dd3b 13-May-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6881069, a crash on a form of vector_size that we
don't support. While it would be nice to support this eventually,
this form is not common at all (just seen in gcc testsuite) and
it might be better to model vector_size as a type attribute anyway.
For now just emit a nice error on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
62c71461220583adbd80e7458c0fe40be85cabed 13-May-2009 Fariborz Jahanian <fjahanian@apple.com> Changed wording of warning when attribute is on
method definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
09d04e5097034d8dfb9fcfceb457f6924cdd2417 13-May-2009 Fariborz Jahanian <fjahanian@apple.com> Changed wording of warning when attribute is on
method definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fd79ac64fa4467e575ffd1960c168f33d3b875cf 13-May-2009 Douglas Gregor <doug.gregor@gmail.com> Semantic analysis for explicit instantiation of class templates. We
still aren't instantiating the definitions of class template members,
and core issues 275 and 259 will both affect the checking that we do
for explicit instantiations (but are not yet implemented).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
93dfdb1299ef740df854f4a745dc87e5e43f0c30 13-May-2009 Douglas Gregor <dgregor@apple.com> Semantic analysis for explicit instantiation of class templates. We
still aren't instantiating the definitions of class template members,
and core issues 275 and 259 will both affect the checking that we do
for explicit instantiations (but are not yet implemented).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a9db0faf0eab240dc1808ffe597fa88af3b4bdea 13-May-2009 Douglas Gregor <doug.gregor@gmail.com> Implement parsing for explicit instantiations of class templates, e.g.,

template class X<int>;

This also cleans up the propagation of template information through
declaration parsing, which is used to improve some diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
4d9a16f36d3b768672d50e6d02000f982ae448d7 13-May-2009 Douglas Gregor <dgregor@apple.com> Implement parsing for explicit instantiations of class templates, e.g.,

template class X<int>;

This also cleans up the propagation of template information through
declaration parsing, which is used to improve some diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
edf8844f2e68617892c6883fedd343efd987df68 12-May-2009 Chris Lattner <sabre@nondot.org> improve the diagnostic for uses of the GCC "global variable in a register" extension.
This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d4b19d52416c3a04a1740ab5e766d9537c8ea00e 12-May-2009 Chris Lattner <sabre@nondot.org> improve the diagnostic for uses of the GCC "global variable in a register" extension.
This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7640620cae7dd446679061857d940033b45655c1 12-May-2009 Douglas Gregor <doug.gregor@gmail.com> Parser::ParseDeclarationOrFunctionDefinition no longer needs to accept
template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
709131972f67190edd310ef72bd5e8c9a7764823 12-May-2009 Douglas Gregor <dgregor@apple.com> Parser::ParseDeclarationOrFunctionDefinition no longer needs to accept
template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
060f70719c14c3dc6bd30c96b96fad5d7e336643 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Method attributes may only be specified on method
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5d36ac2cc91125134fd8e1f0a0f1c2f888fb0566 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Method attributes may only be specified on method
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e3298aa09c6d9f183e193d844db4b164c47b8d7b 12-May-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor the parsing of declarations so that template declarations can
parse just a single declaration and provide a reasonable diagnostic
when the "only one declarator per template declaration" rule is
violated. This eliminates some ugly, ugly hackery where we used to
require thatn the layout of a DeclGroup of a single element be the
same as the layout of a single declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
1426e534b4fca6a05b1120d634aae46be79ca17c 12-May-2009 Douglas Gregor <dgregor@apple.com> Refactor the parsing of declarations so that template declarations can
parse just a single declaration and provide a reasonable diagnostic
when the "only one declarator per template declaration" rule is
violated. This eliminates some ugly, ugly hackery where we used to
require thatn the layout of a DeclGroup of a single element be the
same as the layout of a single declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
453d36ac79eef281dd247fb7c1713385a47c8d0d 12-May-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnostic wording fix, from Anders Johnsen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2df0716635965580ac3f63a1799332e6c02d86d9 12-May-2009 Douglas Gregor <dgregor@apple.com> Diagnostic wording fix, from Anders Johnsen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
02ebfa86912fe41b011d5898881704f2e842cb91 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9820074dd47d37681085e964cd3392ac0b3e67b9 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
35edd9a98e42fce32d60fbc02e829666850ca34b 12-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add logic for invalidating array region to CFRefCount.cpp. When invalidating
array region, set its default value to conjured symbol. When retrieving its
element, create new region value symbol for the element.

Also fix some 80 columns violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
264e93799c891c03d60cf0b09a032b0a9935d3b5 12-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add logic for invalidating array region to CFRefCount.cpp. When invalidating
array region, set its default value to conjured symbol. When retrieving its
element, create new region value symbol for the element.

Also fix some 80 columns violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
eccf0d1b36ba01b1465076bad8ed54d859ffa0e3 12-May-2009 Douglas Gregor <doug.gregor@gmail.com> Make precompiled headers work with -E. When we're only preprocessing
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
b64c19365deab788753d29c9bc881253c3f16f37 12-May-2009 Douglas Gregor <dgregor@apple.com> Make precompiled headers work with -E. When we're only preprocessing
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
f9e7d3d4e672391f649336eb425129dccc9a2fed 12-May-2009 Douglas Gregor <doug.gregor@gmail.com> Encapsulate template arguments lists in a new class,
TemplateArgumentList. This avoids the need to pass around
pointer/length pairs of template arguments lists, and will eventually
make it easier to introduce member templates and variadic templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
7e06390f8a60440d6fc5f0e633acdc2edd8ee924 12-May-2009 Douglas Gregor <dgregor@apple.com> Encapsulate template arguments lists in a new class,
TemplateArgumentList. This avoids the need to pass around
pointer/length pairs of template arguments lists, and will eventually
make it easier to introduce member templates and variadic templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71517 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
873c389ee6c2480bcfca3c85adf6d2ac0b9a1f7d 12-May-2009 Ted Kremenek <kremenek@apple.com> BugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEventPiece if the BugReport contained no explicit ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
3ef538dd1bb1001fa1a1d50594d13f480a8dfa21 12-May-2009 Ted Kremenek <kremenek@apple.com> BugReport::getEndPath() - Only add a Stmt's range to the constructed PathDiagnosticEventPiece if the BugReport contained no explicit ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
b56d8b3cf44cf14cd17b8e2a6f5cb97015f85551 12-May-2009 Anders Carlsson <andersca@mac.com> Friend declarations are only valid inside class definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0033836b3c4bb578ef999813de4f5f1a24862d18 12-May-2009 Anders Carlsson <andersca@mac.com> Friend declarations are only valid inside class definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ef3fa4fd96ca26bd41e0b05e5145de474e594926 12-May-2009 Anders Carlsson <andersca@mac.com> Add an ActOnFriendDecl and call it for friend class decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
66e9977ddd6b197317d149213b76a9af0d3df4de 12-May-2009 Anders Carlsson <andersca@mac.com> Add an ActOnFriendDecl and call it for friend class decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
3eb207002be2bdffddc850aafd21a0a5710ca1c7 11-May-2009 Douglas Gregor <doug.gregor@gmail.com> Implement the notions of the "current instantiation" and "unknown
specialization" within a C++ template, and permit name lookup into the
current instantiation. For example, given:

template<typename T, typename U>
struct X {
typedef T type;

X* x1; // current instantiation
X<T, U> *x2; // current instantiation
X<U, T> *x3; // not current instantiation
::X<type, U> *x4; // current instantiation
X<typename X<type, U>::type, U>: *x5; // current instantiation
};



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
42af25f865a82022a04bedeb483ac251c4412e29 11-May-2009 Douglas Gregor <dgregor@apple.com> Implement the notions of the "current instantiation" and "unknown
specialization" within a C++ template, and permit name lookup into the
current instantiation. For example, given:

template<typename T, typename U>
struct X {
typedef T type;

X* x1; // current instantiation
X<T, U> *x2; // current instantiation
X<U, T> *x3; // not current instantiation
::X<type, U> *x4; // current instantiation
X<typename X<type, U>::type, U>: *x5; // current instantiation
};



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
4dadcec817a4dbe4f829973c31df00d776aea82a 11-May-2009 Ted Kremenek <kremenek@apple.com> Add ParentMap:getParentIgnoreParens().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
b1b9f680f5fc65230de877baccae50820a969a94 11-May-2009 Ted Kremenek <kremenek@apple.com> Add ParentMap:getParentIgnoreParens().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
9054f9878dbe2b1b8384c951ad07759d9de9dc8c 11-May-2009 Douglas Gregor <doug.gregor@gmail.com> Implement the semantics of the injected-class-name within a class
template. The injected-class-name is either a type or a template,
depending on whether a '<' follows it. As a type, the
injected-class-name's template argument list contains its template
parameters in declaration order.

As part of this, add logic for canonicalizing declarations, and be
sure to canonicalize declarations used in template names and template
arguments.

A TagType is dependent if the declaration it references is dependent.

I'm not happy about the rather complicated protocol needed to use
ASTContext::getTemplateSpecializationType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
7da97d0f31e1ec16998d3de2cfd2e88fe3736673 11-May-2009 Douglas Gregor <dgregor@apple.com> Implement the semantics of the injected-class-name within a class
template. The injected-class-name is either a type or a template,
depending on whether a '<' follows it. As a type, the
injected-class-name's template argument list contains its template
parameters in declaration order.

As part of this, add logic for canonicalizing declarations, and be
sure to canonicalize declarations used in template names and template
arguments.

A TagType is dependent if the declaration it references is dependent.

I'm not happy about the rather complicated protocol needed to use
ASTContext::getTemplateSpecializationType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
5d0ead717d57405b4a3b34a55b77579ea8b2774e 10-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++0x nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
lang/Parse/Action.h
6e8ed16ffef02b82995a90bdcf10ffff7d63839a 10-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++0x nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
lang/Parse/Action.h
9381004c77f7b7870095f643a9d01474b493e7dd 09-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename:
SymbolRegionRValue => SymbolRegionValue
SymExpr::RegionRValue => SymExpr::RegionValueKind


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
d9b6ad609ef0b90527e848ba69dc2e492771be4f 09-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Rename:
SymbolRegionRValue => SymbolRegionValue
SymExpr::RegionRValue => SymExpr::RegionValueKind


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
2036270d5517b051840f4d0900c2f3676cb6e1c0 09-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> As discussed with Ted, rename TypedRegion::getObjectType() to
TypedRegion::getValueType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
a82d8aa5b3b3d24998b4d98b9f45a43cc84cac6f 09-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> As discussed with Ted, rename TypedRegion::getObjectType() to
TypedRegion::getValueType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
13ddd1af28133402e076d9d446f4f21152fe92fa 09-May-2009 Ted Kremenek <kremenek@apple.com> Add back Parse/Sema support for attributes cf_returns_retained and
ns_returns_retained, but do not include the other ownership attributes
we previously had.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
b71368d28532908ae1c2dc23f91761781205b3d0 09-May-2009 Ted Kremenek <kremenek@apple.com> Add back Parse/Sema support for attributes cf_returns_retained and
ns_returns_retained, but do not include the other ownership attributes
we previously had.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
b00edf0d4dea0b10695eb6c0a11f856ab015fb74 09-May-2009 Ted Kremenek <kremenek@apple.com> Fix lurking bug in one of the versions of
GRStmtNodeBuilder::generateNode() where the HasGeneratedNode flag
wouldn't properly be set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
c1c739bd4b7b2d6d8eca62579e2b18ac0261be08 09-May-2009 Ted Kremenek <kremenek@apple.com> Fix lurking bug in one of the versions of
GRStmtNodeBuilder::generateNode() where the HasGeneratedNode flag
wouldn't properly be set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
b02c85274d78775b8998c03f12f1b6d4199cfbfb 09-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> rename: MemRegion:
RValueType => ObjectType
LValueType => LocationType

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
ff6978263439e21d795b0602fabcb38488ef8441 09-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> rename: MemRegion:
RValueType => ObjectType
LValueType => LocationType

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
f366d51179f775531c88c7040f00cecc58cdffd0 09-May-2009 Fariborz Jahanian <fjahanian@apple.com> We want to diagnose sending message to a forward class
and we also want to tell which message is actually
being sent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9f8f026fc1cd1aa2942a2850a037398415128f8a 09-May-2009 Fariborz Jahanian <fjahanian@apple.com> We want to diagnose sending message to a forward class
and we also want to tell which message is actually
being sent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
18274116b9806df96b85f32d059f13919d918151 09-May-2009 Ted Kremenek <kremenek@apple.com> Make BlockEntrace program points taggable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/ProgramPoint.h
ab422d17dce198f2af9851340ea7384771a2a8c5 09-May-2009 Ted Kremenek <kremenek@apple.com> Make BlockEntrace program points taggable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71280 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/ProgramPoint.h
1f21fd022a8d03e4b88a7414ee54bd8969212fca 09-May-2009 Ted Kremenek <kremenek@apple.com> Fix typo in method name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
cbc8c791fd1ab18330161e5d73b831a82422b201 09-May-2009 Ted Kremenek <kremenek@apple.com> Fix typo in method name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
243f60435b67ae3a20d0e93998f8a2939c8192fe 09-May-2009 Fariborz Jahanian <fjahanian@apple.com> Warn if forward class is used as a receiver.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
89bc314c6ddf3b851ccf68bc34d3f1b5927a10f6 09-May-2009 Fariborz Jahanian <fjahanian@apple.com> Warn if forward class is used as a receiver.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a996bb05da29e060822af6f3fc675903811e7dd3 08-May-2009 Fariborz Jahanian <fjahanian@apple.com> More type checking for properties, accessors and
use of dot-syntax expression. This is to match gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4c2743f0afe601b0e8ea7bd9b3cd0fb09083a181 08-May-2009 Fariborz Jahanian <fjahanian@apple.com> More type checking for properties, accessors and
use of dot-syntax expression. This is to match gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f084b0ae1f63ac979e9472bf1e320e27b813e4f4 08-May-2009 Ted Kremenek <kremenek@apple.com> Remove experimental ownership attributes from Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
008fc73ac971e5d30c8710e37e1f5f8a843052f1 08-May-2009 Ted Kremenek <kremenek@apple.com> Remove experimental ownership attributes from Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
822adfe2333425ef0c6233d82ca99154eee6f168 08-May-2009 Chris Lattner <sabre@nondot.org> reimplement __sync_* builtins to be variadic and to follow the same
semantic rules that gcc and icc use. This implements the variadic
and concrete versions as builtins and has sema do the
disambiguation. There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
5caa370ea6f70bd3e7e4a9cc3b69ac1a849c8534 08-May-2009 Chris Lattner <sabre@nondot.org> reimplement __sync_* builtins to be variadic and to follow the same
semantic rules that gcc and icc use. This implements the variadic
and concrete versions as builtins and has sema do the
disambiguation. There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticSemaKinds.td
d94f546b4b88bb7d3b8ff3d1665de2ec2629270d 08-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Revert r71079.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a15f7ac7729b74d1d8bef0c009b803a4bbef20d3 08-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Revert r71079.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2f567c6af5628f719abc6aa9518aa18b62e560bb 08-May-2009 Mike Stump <mrs@apple.com> Add a warning for a missing copy attribute on a property that is a
block pointer. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
046efd92714dce712ad47bedfbdbb64e6eb35eec 08-May-2009 Mike Stump <mrs@apple.com> Add a warning for a missing copy attribute on a property that is a
block pointer. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b5dc2946050484c5cd067bb4453fcfd4ab95b403 07-May-2009 Daniel Dunbar <daniel@zuster.org> Remove -fobjc-tight-layout, seems to work!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
913af35741b55fe854bc26c9dddc312cd991e24d 07-May-2009 Daniel Dunbar <daniel@zuster.org> Remove -fobjc-tight-layout, seems to work!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
9245cf263f395161cc12a3c5664f6d0895967b2a 07-May-2009 Ted Kremenek <kremenek@apple.com> More attribute renaming:
- Rename 'ns_returns_owned' -> 'ns_returns_retained'.
- Rename 'cf_returns_owned' -> 'cf_returns_retained'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
7704a33fb398a4352a18bd3fcb18218d3dc5cc60 07-May-2009 Ted Kremenek <kremenek@apple.com> More attribute renaming:
- Rename 'ns_returns_owned' -> 'ns_returns_retained'.
- Rename 'cf_returns_owned' -> 'cf_returns_retained'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
facdba6bf02217aa4a586e7757613ae0851ab1a7 07-May-2009 Anders Carlsson <andersca@mac.com> add isFriendSpecified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
908116859ed8c166c1c0712992e504edd0c5a6e1 07-May-2009 Anders Carlsson <andersca@mac.com> add isFriendSpecified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
0441f118afa1d2445bc66f881bcad31b7dc3272a 07-May-2009 Ted Kremenek <kremenek@apple.com> analyzer: Add ProgramPoint 'PostLValue' just to distinguish (for
analysis introspection) when we computed an lvalue. This shouldn't
effect the current analysis results in any way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
7090d5465de7ca620da16211cf886edf1edc1f1f 07-May-2009 Ted Kremenek <kremenek@apple.com> analyzer: Add ProgramPoint 'PostLValue' just to distinguish (for
analysis introspection) when we computed an lvalue. This shouldn't
effect the current analysis results in any way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
b88ba4173268f00ef39cfa6c6804d43ef510646d 07-May-2009 Douglas Gregor <doug.gregor@gmail.com> Start canonicalizing template names. This is not yet complete, but it
improves type identity with dependent types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
25a3ef7cc5fd55dc8cc67c6e6770c8595657e082 07-May-2009 Douglas Gregor <dgregor@apple.com> Start canonicalizing template names. This is not yet complete, but it
improves type identity with dependent types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e97a8545b03a4c1ca89774aca20185d70f9ed03b 07-May-2009 Mike Stump <mrs@apple.com> Improve semantic checking for blocks. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dd3e1664b5a0996115ef141ad2396168b3a1d288 07-May-2009 Mike Stump <mrs@apple.com> Improve semantic checking for blocks. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e6d852aefdb05fb2f100b5028048f6ca3ef27a63 07-May-2009 Ted Kremenek <kremenek@apple.com> Add preliminary support for enhancing null-pointer dereference diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
dd986cc9989f665370cef0917ba8ba3b4871e3e6 07-May-2009 Ted Kremenek <kremenek@apple.com> Add preliminary support for enhancing null-pointer dereference diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
1aaad9c304a4eae98d935872673cd757eb541ae9 07-May-2009 Ted Kremenek <kremenek@apple.com> Bug fix: Not all ConstraintManagers always return a null state when setting
isFeasible to false. This is something we may wish to do further validation on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
46a54eb500aa1f841308ad78ef356d28b1bbb0cc 07-May-2009 Ted Kremenek <kremenek@apple.com> Bug fix: Not all ConstraintManagers always return a null state when setting
isFeasible to false. This is something we may wish to do further validation on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
ba9a371cb3438f165ff6191c42732f699968eea2 07-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Back out r70506 (exception spec in AST) again. We won't have exception specs until we've had a lot more discussion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
bfa2fcba545fb270f31205d616846c2bfaf4e47e 07-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Back out r70506 (exception spec in AST) again. We won't have exception specs until we've had a lot more discussion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c3bc6c8cd7f70810fd7343307071c1e88b17b0d9 06-May-2009 Ted Kremenek <kremenek@apple.com> Refactor BugReporter interface to have a new 'BugReporterContext' and
'BugReporterVisitor'. This simplifies callbacks from BugReporter to BugReports
(via VisitNode). It also lays the foundation for arbitrary visitor "call backs"
that can be registered to a BugReporterContext as a PathDiagnostic is
constructed. These call backs can help operate as separate "experts" that can
work on constructed pieces of a PathDiagnostic for which they possess special
knowledge.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
8966bc1c8ce271c09936c0eaf6c841aef4a0af1b 06-May-2009 Ted Kremenek <kremenek@apple.com> Refactor BugReporter interface to have a new 'BugReporterContext' and
'BugReporterVisitor'. This simplifies callbacks from BugReporter to BugReports
(via VisitNode). It also lays the foundation for arbitrary visitor "call backs"
that can be registered to a BugReporterContext as a PathDiagnostic is
constructed. These call backs can help operate as separate "experts" that can
work on constructed pieces of a PathDiagnostic for which they possess special
knowledge.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
0838f96643db1611a52e015733f94b19b8a5d52d 06-May-2009 Daniel Dunbar <daniel@zuster.org> More x86 target feature support.
- Apologies for the extremely gross code duplication, I want to get
this working and then decide how to get this information out of the
back end.

- This replaces -m[no-]sse4[12] by -m[no-]sse4, it appears gcc
doesn't distinguish them?

- -msse, etc. now properly disable/enable related features.

- Don't always define __SSE3__...

- The main missing functionality bit here is that we don't initialize
the features based on the CPU for all -march options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Driver/Options.def
17ca3638e852ba81f389e9f896ed0420b52ae606 06-May-2009 Daniel Dunbar <daniel@zuster.org> More x86 target feature support.
- Apologies for the extremely gross code duplication, I want to get
this working and then decide how to get this information out of the
back end.

- This replaces -m[no-]sse4[12] by -m[no-]sse4, it appears gcc
doesn't distinguish them?

- -msse, etc. now properly disable/enable related features.

- Don't always define __SSE3__...

- The main missing functionality bit here is that we don't initialize
the features based on the CPU for all -march options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Driver/Options.def
a6e5bbebae136f9e5c031d89654d9d8160e9cefa 06-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> add getTargetInfo() method to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
33c37b9b87453c835cd0e32a4a65db329da20356 06-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> add getTargetInfo() method to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
94f63377e9040fad7a5614afec6ccdc26a45abf9 06-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> The super region of ElementRegion no longer needs to be TypedRegion. In the
future we would create ElementRegion directly on top of typeless regions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
4c44e243e36aaaab3fee24ba1190ca65d33bf2ca 06-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> The super region of ElementRegion no longer needs to be TypedRegion. In the
future we would create ElementRegion directly on top of typeless regions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
6c2ad5a7e4992be094d881130b1892cff9841006 06-May-2009 Anders Carlsson <andersca@mac.com> Add parsing of friend specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
f47f7a1c4082b42b21f1c7dc211ff90f4b38258a 06-May-2009 Anders Carlsson <andersca@mac.com> Add parsing of friend specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
0c0b436adcd305637545448d4fb383edf8185966 06-May-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate extra vertical space in Clang diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
2cc2b9ca22d21cd855f06f545b8720f6a7a965b4 06-May-2009 Douglas Gregor <dgregor@apple.com> Eliminate extra vertical space in Clang diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
07181d709860d06026afa3b4ee5b6a65b48c9005 06-May-2009 Daniel Dunbar <daniel@zuster.org> Improve handling of (X86) target features.
- This is a WIP...

- This adds -march= handling to the driver, and fixes the defaulting
of -mcpu on Darwin (which was using the wrong test).

Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as
-target-feature [+-]name

In clang-cc, communicate with the (clang) target to discover the legal
features of a target, and the features which are enabled based on
-mcpu. This is currently hardcoded just enough to not be a feature
regression, we need to get this information from the backend's
TableGen information somehow.

This is used to construct the full list of features which are being
used, which is in turn used to initialize the predefines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Driver/Options.def
868bd0aa9281929ef50d2e9a8c82a036906f53f5 06-May-2009 Daniel Dunbar <daniel@zuster.org> Improve handling of (X86) target features.
- This is a WIP...

- This adds -march= handling to the driver, and fixes the defaulting
of -mcpu on Darwin (which was using the wrong test).

Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as
-target-feature [+-]name

In clang-cc, communicate with the (clang) target to discover the legal
features of a target, and the features which are enabled based on
-mcpu. This is currently hardcoded just enough to not be a feature
regression, we need to get this information from the backend's
TableGen information somehow.

This is used to construct the full list of features which are being
used, which is in turn used to initialize the predefines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Driver/Options.def
7953f245d3c7d22957fe3a1f2d8fd916491af1b2 06-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make StoreManager::CastRegion() virtual and implement a new CastRegion() for
RegionStore.

This CastRegion() performs casts according to the kind of the region being
cast instead of the type that is cast to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
889805931bdffe5eaf770bb9f926f738ccd18c0f 06-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make StoreManager::CastRegion() virtual and implement a new CastRegion() for
RegionStore.

This CastRegion() performs casts according to the kind of the region being
cast instead of the type that is cast to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
6e3de3d0ca8b90214d1d8de2252516ff1a99c310 06-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyze-auto.
- Currently just an alias for --analyze, eventually we want to refit
--analyze so that it is less automatic (i.e., does not force plist
output and does not hard code the list of checks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Options.def
63be57a832b2dab70592d1d9b37a5cd9a627356e 06-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyze-auto.
- Currently just an alias for --analyze, eventually we want to refit
--analyze so that it is less automatic (i.e., does not force plist
output and does not hard code the list of checks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Options.def
03d242e18e54faad6da12eab590ddd5e261d077a 05-May-2009 Ted Kremenek <kremenek@apple.com> Implement attribute 'ns_autorelease'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
69aa08072decc20094bd1f75f4f9842e9bd357ad 05-May-2009 Ted Kremenek <kremenek@apple.com> Implement attribute 'ns_autorelease'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
0c535276de28f633182ef1f29834426e7f485d6b 05-May-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a warning in odd case of instance method used
in a 'Class' receiver which is not a root instance
method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
041f2fd6237c7ce72864e42c66c6b12b52f35f9c 05-May-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a warning in odd case of instance method used
in a 'Class' receiver which is not a root instance
method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
60da2715e386e1f87513fc8596a0e267ca8e977b 05-May-2009 Chris Lattner <sabre@nondot.org> remove some incorrect and unimplemented atomic builtins (e.g.
__sync_umin_and_fetch), add some missing atomic builtins (e.g.
__sync_fetch_and_nand) and reorder the list to match the GCC
documentation. The builtins still need work and codegen
implementation, more patches coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
b0ed3029d96e31dfa71a61ac5aa8d04710e0fb12 05-May-2009 Chris Lattner <sabre@nondot.org> remove some incorrect and unimplemented atomic builtins (e.g.
__sync_umin_and_fetch), add some missing atomic builtins (e.g.
__sync_fetch_and_nand) and reorder the list to match the GCC
documentation. The builtins still need work and codegen
implementation, more patches coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
fed3c098f6345dfd908c0c27583db7140996ad8b 05-May-2009 Ted Kremenek <kremenek@apple.com> Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
e351aa10dab6eb8b9b502166c7035dc7b0e723e0 05-May-2009 Ted Kremenek <kremenek@apple.com> Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
bf3b1f068f5d5ccd9fcd287acbe245b575e257e7 05-May-2009 Ted Kremenek <kremenek@apple.com> Rename ownership attributes:
ns_ownership_returns -> ns_returns_owned
ns_ownership_retain -> ns_retains
ns_ownership_release -> ns_releases
cf_ownership_retain -> cf_retains
cf_ownership_release -> cf_releases


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
d331dd7fa43f547197efcd757e4a7b477c29fd6e 05-May-2009 Ted Kremenek <kremenek@apple.com> Rename ownership attributes:
ns_ownership_returns -> ns_returns_owned
ns_ownership_retain -> ns_retains
ns_ownership_release -> ns_releases
cf_ownership_retain -> cf_retains
cf_ownership_release -> cf_releases


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
b63a77eea1644d4747c16bab240945069d977a9b 05-May-2009 Ted Kremenek <kremenek@apple.com> Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
6a08469ebe3e15262733841a9c29e2e563d78ba5 05-May-2009 Ted Kremenek <kremenek@apple.com> Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
a8d6fd978099620a754b62c590c39ca0dc0068a7 05-May-2009 Ted Kremenek <kremenek@apple.com> Remove experimental attribute 'ns_ownership_make_collectable.'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
d99b345a1ae77c746ef025e6a050908d69e2c543 05-May-2009 Ted Kremenek <kremenek@apple.com> Remove experimental attribute 'ns_ownership_make_collectable.'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
2c5710cb5f812255a8fc3bd8338139f5e72bf259 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add ASTRecordLayout::getFieldCount accessor, change NextOffset field to 64-bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
c2e57bfc7f784e8f2d6026ec6b03259c1109f120 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add ASTRecordLayout::getFieldCount accessor, change NextOffset field to 64-bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
514acdd174654fa8bc5bd20fb4582cb6057d2010 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add ASTRecordLayout::getNextOffset accessor, and some doxygen comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
f773737e35b5a7c35ea75d5092249b7ba260cec3 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add ASTRecordLayout::getNextOffset accessor, and some doxygen comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
eadf90ee4332b964f026c9f6dc74d803eb7cdbd9 04-May-2009 Daniel Dunbar <daniel@zuster.org> Initialize NextOffset correctly, otherwise tight layout fails for
empty classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
bc6ea8125afbab8635f5c319229d1ba8aa2e25e2 04-May-2009 Daniel Dunbar <daniel@zuster.org> Initialize NextOffset correctly, otherwise tight layout fails for
empty classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
028e811124293fa0c0f670ce16d102bbf76cf1c9 04-May-2009 Ted Kremenek <kremenek@apple.com> Rename attributes 'objc_ownership...' to 'ns_ownership...'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
75494ffb4ed3964fa22fb9ab15fddecedbc9fe10 04-May-2009 Ted Kremenek <kremenek@apple.com> Rename attributes 'objc_ownership...' to 'ns_ownership...'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
03d27943db8899157cd8aa4fcfb56abcba229435 04-May-2009 Ted Kremenek <kremenek@apple.com> Rename attributes:
'objc_ownership_cfretain' -> 'cf_ownership_retain'
'objc_ownership_cfrelease' -> 'cf_ownership_release'

Motivation: Core Foundation objects can be used in isolation from Objective-C,
and this forces users to reason about the separate semantics of CF objects. More
Sema support pending.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
31c215e62031b14e85c2f695c261817c044b465b 04-May-2009 Ted Kremenek <kremenek@apple.com> Rename attributes:
'objc_ownership_cfretain' -> 'cf_ownership_retain'
'objc_ownership_cfrelease' -> 'cf_ownership_release'

Motivation: Core Foundation objects can be used in isolation from Objective-C,
and this forces users to reason about the separate semantics of CF objects. More
Sema support pending.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
61ccd5c7d016fa7f39c74444a2326ddffcebfac3 04-May-2009 Ted Kremenek <kremenek@apple.com> Remove support for ObjCMethodDecl attributes that appear between the
return type and the selector. This is inconsistent with C functions
(where such attributes would be placed on the return type, not the the
FunctionDecl), and is inconsistent with what people are use to seeing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1c6a3cc88177c67498fccdf14cfdf09959214e41 04-May-2009 Ted Kremenek <kremenek@apple.com> Remove support for ObjCMethodDecl attributes that appear between the
return type and the selector. This is inconsistent with C functions
(where such attributes would be placed on the return type, not the the
FunctionDecl), and is inconsistent with what people are use to seeing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d8ccb2b48c5fb43ef106f307bc08f836ac91a3c2 04-May-2009 Ted Kremenek <kremenek@apple.com> Rename 'makeZeroIndex' to 'makeZeroArrayIndex'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
cd9392ff7336a2cd5547305ba83a65e63b4f6ff8 04-May-2009 Ted Kremenek <kremenek@apple.com> Rename 'makeZeroIndex' to 'makeZeroArrayIndex'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
398d8f8b1fe6453a5e6e3c50cd5e2fba3b54d360 04-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> array indexes are unsigned integers of the same width as pointer.
no-outofbounds.c still fails. Previously it passed because the array index
is mistakenly a loc::ConcreteInt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
b5b848e046e1899a3ebab4ca3822ae97eef36b1e 04-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> array indexes are unsigned integers of the same width as pointer.
no-outofbounds.c still fails. Previously it passed because the array index
is mistakenly a loc::ConcreteInt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueManager.h
af81ece1812e05d74973d3fff1293995b937a49d 04-May-2009 Ted Kremenek <kremenek@apple.com> Per conversations with Zhongxing, add an 'element type' to
ElementRegion. I also removed 'ElementRegion::getArrayRegion',
although we may need to add this back.

This breaks a few test cases with RegionStore:
- 'array-struct.c' triggers an infinite recursion in RegionStoreManager. Need to investigate.
- misc-ps.m triggers a failure with RegionStoreManager as we now get the diagnostic:
'Line 159: Uninitialized or undefined return value returned to caller.'

There were a bunch of places that needed to be edit
RegionStoreManager, and we may not be passing all the correct 'element
types' down from GRExprEngine.

Zhongxing: When you get a chance, could you review this? I could have
easily screwed up something basic in RegionStoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
f936f4568700d799e7d92eecef67b0e2b822ae7e 04-May-2009 Ted Kremenek <kremenek@apple.com> Per conversations with Zhongxing, add an 'element type' to
ElementRegion. I also removed 'ElementRegion::getArrayRegion',
although we may need to add this back.

This breaks a few test cases with RegionStore:
- 'array-struct.c' triggers an infinite recursion in RegionStoreManager. Need to investigate.
- misc-ps.m triggers a failure with RegionStoreManager as we now get the diagnostic:
'Line 159: Uninitialized or undefined return value returned to caller.'

There were a bunch of places that needed to be edit
RegionStoreManager, and we may not be passing all the correct 'element
types' down from GRExprEngine.

Zhongxing: When you get a chance, could you review this? I could have
easily screwed up something basic in RegionStoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
30eed0fc54c3ac046a7cf9e41aaf75c2a177640b 04-May-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for comparing pointers with <, >, <=, >=, ==, and !=
in C++, taking into account conversions to the "composite pointer
type" so that we can compare, e.g., a pointer to a derived class to a
pointer to a base class.

Also, upgrade the "comparing distinct pointer types" from a warning to
an error for C++, since this is clearly an error. Turns out that we
hadn't gone through and audited this code for C++, ever.

Fixes <rdar://problem/6816420>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0c6db9417dceeb082296c4e097be5de3ee1c5eb7 04-May-2009 Douglas Gregor <dgregor@apple.com> Implement support for comparing pointers with <, >, <=, >=, ==, and !=
in C++, taking into account conversions to the "composite pointer
type" so that we can compare, e.g., a pointer to a derived class to a
pointer to a base class.

Also, upgrade the "comparing distinct pointer types" from a warning to
an error for C++, since this is clearly an error. Turns out that we
hadn't gone through and audited this code for C++, ever.

Fixes <rdar://problem/6816420>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5523e86616bc17c9092af47012c9df4b962788a7 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add -fobjc-tight-layout.
- This implements gcc style Objective-C interface layout (I
think). Currently it is always off, there is no functionality
change unless this is passed.

For the curious, the deal is that gcc lays out the fields of a
subclass as if they were part of the superclass. That is, the
subclass fields immediately follow the super class fields instead
of being padded to the alignment of the superclass structure.

- Currently gcc uses the tight layout in 32-bit and 64-bit modes, and
llvm-gcc uses it in 32-bit only, for reasons which aren't clear
yet. We probably want to switch to matching gcc, once this makes it
through testing... my hope is that we can also fix llvm-gcc in
order to maintain compatibility between the compilers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
lang/Basic/LangOptions.h
lang/Driver/Options.def
d6884a0b90091a063478ec7fa31f6d76c94e4917 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add -fobjc-tight-layout.
- This implements gcc style Objective-C interface layout (I
think). Currently it is always off, there is no functionality
change unless this is passed.

For the curious, the deal is that gcc lays out the fields of a
subclass as if they were part of the superclass. That is, the
subclass fields immediately follow the super class fields instead
of being padded to the alignment of the superclass structure.

- Currently gcc uses the tight layout in 32-bit and 64-bit modes, and
llvm-gcc uses it in 32-bit only, for reasons which aren't clear
yet. We probably want to switch to matching gcc, once this makes it
through testing... my hope is that we can also fix llvm-gcc in
order to maintain compatibility between the compilers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
lang/Basic/LangOptions.h
lang/Driver/Options.def
e7e4dacd5a6e929e982867a02109ddaf608535cd 04-May-2009 Eli Friedman <eli.friedman@gmail.com> PR2524: downgrade taking address of expression of type 'void' to an
extension warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
53202857c60214d80950a975e6e52aebf30bd16a 04-May-2009 Eli Friedman <eli.friedman@gmail.com> PR2524: downgrade taking address of expression of type 'void' to an
extension warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
d42baac9eb44438034448f1edbaa7bef081b3ad3 03-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4134: Implement __builtin_extract_return_addr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
3b660efb9f9fa3e87096f4a96a2093cd17c43c2e 03-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4134: Implement __builtin_extract_return_addr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
6ff4f4b4636e13a68f7087f26b83c2c4ba816430 03-May-2009 Daniel Dunbar <daniel@zuster.org> Remove ASTContext::addRecordToClass.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
ee1ec39f54a759a1c0858b608e02d70e0d7f54bc 03-May-2009 Daniel Dunbar <daniel@zuster.org> Remove ASTContext::addRecordToClass.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
1fbaef1ce5cf60ffe766da428c1e25d546f8c252 03-May-2009 Daniel Dunbar <daniel@zuster.org> Split out getASTObjCImplementationLayout
- The difference from getASTObjCInterfaceLayout is that the computes
the layout including synthesized ivars.

- No functionality change, they currently both compute the same thing
-- whether that includes synthesized ivars or not depends on when
they get called!!!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b2dbbb99e12806eaaf53b7ccabc32f42b5719443 03-May-2009 Daniel Dunbar <daniel@zuster.org> Split out getASTObjCImplementationLayout
- The difference from getASTObjCInterfaceLayout is that the computes
the layout including synthesized ivars.

- No functionality change, they currently both compute the same thing
-- whether that includes synthesized ivars or not depends on when
they get called!!!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d7162fcabb2b668260cb28858cfb9f2b50f4dd36 03-May-2009 Daniel Dunbar <daniel@zuster.org> PR4063, with feeling: Chain PP callbacks by default.
- This is somewhat cleaner and also fixes PR4063 for real, I had the
order wrong so we were just creating an empty dependency file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/Preprocessor.h
e5393fb93eb879d9ebbef102ae9311fa77e023cc 03-May-2009 Daniel Dunbar <daniel@zuster.org> PR4063, with feeling: Chain PP callbacks by default.
- This is somewhat cleaner and also fixes PR4063 for real, I had the
order wrong so we were just creating an empty dependency file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
lang/Lex/Preprocessor.h
42853ed3f8a56e79c2363379348c47e09522048f 03-May-2009 Chris Lattner <sabre@nondot.org> add a flag to output asm constraints so that we efficiently know
if there is an input constraint that is tied to it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
fa780fc4a4983003633c9b560387266101839923 03-May-2009 Chris Lattner <sabre@nondot.org> add a flag to output asm constraints so that we efficiently know
if there is an input constraint that is tied to it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c82f9948dd69d09ff05c01e1689212c03e0d08ab 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Add diagnostic for r70658.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3c77f728d287f38894a9b07ad210d68dda538568 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Add diagnostic for r70658.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6277e4095e523d8a20d1eff82df66191ecd37487 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Add Sema support for __builtin_setjmp/__builtin_longjmp. The primary
reason for adding these is to error out in CodeGen when trying to generate
them instead of silently emitting a call to a non-existent function.

(Note that it is not valid to lower these to setjmp/longjmp; in addition
to that lowering being different from the intent, setjmp and longjmp
require a larger buffer.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
d875fed28578835de89cd407e9db4be788596d7c 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Add Sema support for __builtin_setjmp/__builtin_longjmp. The primary
reason for adding these is to error out in CodeGen when trying to generate
them instead of silently emitting a call to a non-existent function.

(Note that it is not valid to lower these to setjmp/longjmp; in addition
to that lowering being different from the intent, setjmp and longjmp
require a larger buffer.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
20a4fd85d1239db1be2bedf6861375c2d443b23a 03-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Treat -m32 and -m64 as "driver-only" arguments.
- In particular, don't forward them to gcc; these participate in the
selection of the tool chain, which should know how to talk to gcc
and be fixed if it doesn't.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
08617b1b475e5ae9c61c9b3536cf712283647284 03-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Treat -m32 and -m64 as "driver-only" arguments.
- In particular, don't forward them to gcc; these participate in the
selection of the tool chain, which should know how to talk to gcc
and be fixed if it doesn't.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
f7d893fe3bf25a7c7d2b6ab27371fc1a9b6540b7 02-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Generate an error when trying to pass an LLVM bc input to a
non-Darwin linker (sorry Gold + LTO-plugin users).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
a8304f67291b0182fb64f3afc621615288dd1d31 02-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Generate an error when trying to pass an LLVM bc input to a
non-Darwin linker (sorry Gold + LTO-plugin users).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
46363f5fc56d60238e4ad73b83e3b987f9041ea7 02-May-2009 Daniel Dunbar <daniel@zuster.org> DragonFly ToolChain definition for driver.
- Patch by Alex Hornung!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
lang/Driver/Options.def
11e1b40d759a643086f590f6ffbd9d68360bad46 02-May-2009 Daniel Dunbar <daniel@zuster.org> DragonFly ToolChain definition for driver.
- Patch by Alex Hornung!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
lang/Driver/Options.def
bbceaea1fd99e0790688e27880f18667e5842d46 02-May-2009 Anders Carlsson <andersca@mac.com> Downgrade the invalid offsetof error to a warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
f9b8bc662a84bb89a2d98530592f5d8fb6bee761 02-May-2009 Anders Carlsson <andersca@mac.com> Downgrade the invalid offsetof error to a warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
531434b0b3e12757c57f776e42083b269bc72b3b 02-May-2009 Douglas Gregor <doug.gregor@gmail.com> When determining whether an expression refers to a bit-field, look
into the left-hand side of an assignment expression. This completes
most of PR3500; the only remaining part is to deal with the
GCC-specific implementation-defined behavior for "unsigned long" (and
other) bit-fields.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
33bbbc5ec8269bc2cde5b84f970fa49319a30267 02-May-2009 Douglas Gregor <dgregor@apple.com> When determining whether an expression refers to a bit-field, look
into the left-hand side of an assignment expression. This completes
most of PR3500; the only remaining part is to deal with the
GCC-specific implementation-defined behavior for "unsigned long" (and
other) bit-fields.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8813477d35efbfe22f9bb0436ec948e72913fb45 02-May-2009 Chris Lattner <sabre@nondot.org> explicitly know that the alignment of Type* is 3 bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
bfadf55ba5b736b13cc3e0fbc2b184569bc9f304 02-May-2009 Chris Lattner <sabre@nondot.org> explicitly know that the alignment of Type* is 3 bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
21f220e79450ee703952b1bd95c8c075dfd7dffa 02-May-2009 Mike Stump <mrs@apple.com> Add Sema checking for __block on vm declarations. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c975bb04da88323fded43e71ff1839e8640fe878 02-May-2009 Mike Stump <mrs@apple.com> Add Sema checking for __block on vm declarations. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f2ab4fbb4ad8b1c6c2ad21a865c2605a86d4ff2a 02-May-2009 Douglas Gregor <doug.gregor@gmail.com> When printing a source line as part of a diagnostic, the source line
might be wider than we're supposed to print. In this case, we try to
select the "important" subregion of the source line, which contains
everything that we want to show (e.g., with underlining and the caret
itself) and tries to also contain some of the context.

From the fantastically long line in the test case, we get an error
message that slices down to this:

message-length.c:18:120: warning: comparison of distinct pointer types
('int *' and 'float *')
a_func_to_call(ip == FloatPointer, ip[ALongIndexName],
~~ ^ ~~~~~~~~~~~~

There are a bunch of gee-it-sounds-good heuristics in here, which seem
to do well on the various simple tests I've thrown at it. However,
we're going to need to look at a bunch more diagnostics to tweak these
heuristics.

This is the second part of <rdar://problem/6711348>. Almost there!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
47f717788082cdc38b899faf18acc8d1cda1b9c5 02-May-2009 Douglas Gregor <dgregor@apple.com> When printing a source line as part of a diagnostic, the source line
might be wider than we're supposed to print. In this case, we try to
select the "important" subregion of the source line, which contains
everything that we want to show (e.g., with underlining and the caret
itself) and tries to also contain some of the context.

From the fantastically long line in the test case, we get an error
message that slices down to this:

message-length.c:18:120: warning: comparison of distinct pointer types
('int *' and 'float *')
a_func_to_call(ip == FloatPointer, ip[ALongIndexName],
~~ ^ ~~~~~~~~~~~~

There are a bunch of gee-it-sounds-good heuristics in here, which seem
to do well on the various simple tests I've thrown at it. However,
we're going to need to look at a bunch more diagnostics to tweak these
heuristics.

This is the second part of <rdar://problem/6711348>. Almost there!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
356946ee30f0a12becabe19e956eb3f4d3933c96 02-May-2009 Anders Carlsson <andersca@mac.com> It's an error to call offsetof on a non-POD type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
6d7f149b0bff12e8f74c372e50b6e9a9ea980425 02-May-2009 Anders Carlsson <andersca@mac.com> It's an error to call offsetof on a non-POD type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d79b70158ad775b9a6e642347b61f51b3ee57fe1 02-May-2009 Anders Carlsson <andersca@mac.com> Get rid of CXXDestroyExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
55674acc0331f96bf9e2074e9853c9a1fa96857b 02-May-2009 Anders Carlsson <andersca@mac.com> Get rid of CXXDestroyExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
2199ed357ac48a98487dc395d12d3eeb8d9f634d 02-May-2009 Ted Kremenek <kremenek@apple.com> Add a new BFS GRWorkList and make it the default worklist model for
GRCoreEngine. This tends to result in shorter paths for pathological cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRWorkList.h
8ff59e832591eaa5f3be9885857e71bbcb3da77c 02-May-2009 Ted Kremenek <kremenek@apple.com> Add a new BFS GRWorkList and make it the default worklist model for
GRCoreEngine. This tends to result in shorter paths for pathological cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRWorkList.h
9f4aef73b4f98d9ca8650575a5934f89c4fe44ec 02-May-2009 Anders Carlsson <andersca@mac.com> Rename CXXExprWithCleanup to CXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
2d44e8a41de8a33c0f04ac198714f71dc841bab0 02-May-2009 Anders Carlsson <andersca@mac.com> Rename CXXExprWithCleanup to CXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
a4eb3e7ad4c72d6783145f023a2cdea9b9421a18 01-May-2009 Douglas Gregor <doug.gregor@gmail.com> Implement -fmessage-length=N, which word-wraps diagnostics to N columns.

Also, put a line of whitespace between the diagnostic and the source
code/caret line when the start of the actual source code text lines up
(or nearly lines up) with the most recent line of the diagnostic. For
example, here it's okay for the last line of the diagnostic to be
(vertically) next to the source line, because there is horizontal
whitespace to separate them:

decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin
type can only take one argument
typeof(int)(a,5)<<a;

However, here is a case where we need the vertical separation (since
there is no horizontal separation):

message-length.c:10:46: warning: incompatible pointer types initializing 'void
(int, float, char, float)', expected 'int (*)(int, float, short,
float)'

int (*fp1)(int, float, short, float) = f;

This is part one of <rdar://problem/6711348>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Frontend/TextDiagnosticPrinter.h
fffd93f38340d4d2ca7ee78a8c91c890b2ff3fa0 01-May-2009 Douglas Gregor <dgregor@apple.com> Implement -fmessage-length=N, which word-wraps diagnostics to N columns.

Also, put a line of whitespace between the diagnostic and the source
code/caret line when the start of the actual source code text lines up
(or nearly lines up) with the most recent line of the diagnostic. For
example, here it's okay for the last line of the diagnostic to be
(vertically) next to the source line, because there is horizontal
whitespace to separate them:

decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin
type can only take one argument
typeof(int)(a,5)<<a;

However, here is a case where we need the vertical separation (since
there is no horizontal separation):

message-length.c:10:46: warning: incompatible pointer types initializing 'void
(int, float, char, float)', expected 'int (*)(int, float, short,
float)'

int (*fp1)(int, float, short, float) = f;

This is part one of <rdar://problem/6711348>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Frontend/TextDiagnosticPrinter.h
7265ef3835d81d9bf18beb2c4c2b896733459995 01-May-2009 Eli Friedman <eli.friedman@gmail.com> Add support for -Wno-format-zero-length.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
e917aa31d3e042e135abce4b6b183eb27f58b79a 01-May-2009 Eli Friedman <eli.friedman@gmail.com> Add support for -Wno-format-zero-length.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
970e56cbb567add16945688cff5404fb2c30aea9 01-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4013 and PR4105: pointer-like types can only be cast to/from integers
and other pointer-like types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
41826bb59d2ef5e8c8a4a0cd2b06a7a011b67b4d 01-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4013 and PR4105: pointer-like types can only be cast to/from integers
and other pointer-like types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c181f5a19dd78208c6632dfd59f92a7b7ea7e9b9 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Use of super class ivar to synthesize property is back to being error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e2f2c16047a0165cbfbdba84c74bd4fb814d7c3e 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Use of super class ivar to synthesize property is back to being error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
74942cde3da623741b60c2524fc44ef0cb35724b 30-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make a home for exception specs in the AST. Now Sema can hook them up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
7b9a2ee5a4393001bdec7dec841eb7c811da492c 30-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make a home for exception specs in the AST. Now Sema can hook them up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
6f05fb06f19a9a11cd3c9c440b3309d8e3efdd5b 30-Apr-2009 Ted Kremenek <kremenek@apple.com> Allow attributes 'objc_ownership_retain' and 'objc_ownership_release' to be
applied to ObjCMethodDecls, not just parameters. This allows one to specific
side-effects on the receiver of a message expression. No checker support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
72c9dcd9dbc1ee65d7863d1ea04c2cc928007cc9 30-Apr-2009 Ted Kremenek <kremenek@apple.com> Allow attributes 'objc_ownership_retain' and 'objc_ownership_release' to be
applied to ObjCMethodDecls, not just parameters. This allows one to specific
side-effects on the receiver of a message expression. No checker support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2b0e6da5e1448a5feac5a9f79e1e3a35b68807c7 30-Apr-2009 Ted Kremenek <kremenek@apple.com> Hook up Sema support for attributes on Objective-C method declarations that
appear between the return type and the selector. This is a separate code path
from regular attribute processing, as we only want to (a) accept only a specific
set of attributes in this place and (b) want to distinguish to clients the
context in which an attribute was added to an ObjCMethodDecl.

Currently, the attribute 'objc_ownership_returns' is the only attribute that
uses this new feature. Shortly I will add a warning for 'objc_ownership_returns'
to be placed at the end of a method declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b27d1174673d457e2ee7906c14a92bba35242cea 30-Apr-2009 Ted Kremenek <kremenek@apple.com> Hook up Sema support for attributes on Objective-C method declarations that
appear between the return type and the selector. This is a separate code path
from regular attribute processing, as we only want to (a) accept only a specific
set of attributes in this place and (b) want to distinguish to clients the
context in which an attribute was added to an ObjCMethodDecl.

Currently, the attribute 'objc_ownership_returns' is the only attribute that
uses this new feature. Shortly I will add a warning for 'objc_ownership_returns'
to be placed at the end of a method declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
bb7e290fba3de10a6231359d0202427af9978581 30-Apr-2009 Steve Naroff <snaroff@apple.com> Name the "return-type" DiagGroup and reference it in a few places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
940ab971c580ca03da2e68ec92b9c0f7acfe6988 30-Apr-2009 Steve Naroff <snaroff@apple.com> Name the "return-type" DiagGroup and reference it in a few places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
3cd4584d333ed18e5009c6e1ed55a0714f074574 30-Apr-2009 Steve Naroff <snaroff@apple.com> Warn about invalid return statements by default.

This fixes <rdar://problem/6839489> 10A345: Clang does not warm about mismatched returns (void return from a bool function)

Will implement -Wreturn-type, -Wno-return-type in another commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2c0ccd045514ae4dc951fb45b7c29216ba109bf7 30-Apr-2009 Steve Naroff <snaroff@apple.com> Warn about invalid return statements by default.

This fixes <rdar://problem/6839489> 10A345: Clang does not warm about mismatched returns (void return from a bool function)

Will implement -Wreturn-type, -Wno-return-type in another commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
441a56966b66468c53659e192303d59464044667 30-Apr-2009 Chris Lattner <sabre@nondot.org> accept and ignore two new warning specifiers. -Wno-discard-qual seems easy
to hook up if someone was interested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
09c43d1e4dc7e0d2e80f2158bd1a03f7c793eb4f 30-Apr-2009 Chris Lattner <sabre@nondot.org> accept and ignore two new warning specifiers. -Wno-discard-qual seems easy
to hook up if someone was interested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
6cc7e415d42291bf01e0295d9d6344e106613c48 30-Apr-2009 Chris Lattner <sabre@nondot.org> initial support for __[u]int128_t, which should be basically
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
2df9ced9fd1e8c7d7b38443db07e0e811de22571 30-Apr-2009 Chris Lattner <sabre@nondot.org> initial support for __[u]int128_t, which should be basically
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Frontend/PCHBitCodes.h
64bce08a34d6925f0c4fe4c9c42cbe0e6f6bcd0a 30-Apr-2009 Mike Stump <mrs@apple.com> Sema checking for incorrect placement of __block. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ea000bf621552252e41fc870346e7048646709dc 30-Apr-2009 Mike Stump <mrs@apple.com> Sema checking for incorrect placement of __block. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ec9294532291dcd5d5ab9248c79bb420d05e7066 30-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Make DISABLE_SMART_POINTERS work, again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
e06600c5cf184775d2161a4f7b5557a0d13c8653 30-Apr-2009 Douglas Gregor <dgregor@apple.com> Make DISABLE_SMART_POINTERS work, again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
745bc3af4f61d7ee1df002b9cb71ab3412cfa4f3 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Change to warning when property uses an ivar in super class
in an @synthesize diective, as it breaks few projects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9cd6f0f58570a98a6d6acee8803c73986c6846b4 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Change to warning when property uses an ivar in super class
in an @synthesize diective, as it breaks few projects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
144b06c28e50e3bdec286c4fc74c3edf5553f88e 30-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Implement semantic analysis for transparent unions. This is largely
based on a patch from Anders Johnsen. CodeGen support is incomplete,
in that we do not properly coerce to the first field's type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
0c74e8a4e8865ec9ebb8efc0af247a3c077236c4 30-Apr-2009 Douglas Gregor <dgregor@apple.com> Implement semantic analysis for transparent unions. This is largely
based on a patch from Anders Johnsen. CodeGen support is incomplete,
in that we do not properly coerce to the first field's type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
b8d8c4b797ae9dbc67c5af93b81aab696d4edfff 29-Apr-2009 Ted Kremenek <kremenek@apple.com> BugReporter/PathDiagnostics:
- Add an (optional) short description for BugReports for clients that want
to distinguish between long and short descriptions for bugs
- Make the bug report for VLA less obscene for Plist diagnostics by using
the short description


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
d49967f8764135ae65658e354b6d38e3637c9de3 29-Apr-2009 Ted Kremenek <kremenek@apple.com> BugReporter/PathDiagnostics:
- Add an (optional) short description for BugReports for clients that want
to distinguish between long and short descriptions for bugs
- Make the bug report for VLA less obscene for Plist diagnostics by using
the short description


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
115a0725f647accbecf08ccc0c920320c6531edb 29-Apr-2009 Mike Stump <mrs@apple.com> Sema and CodeGen support for attributes on blocks. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
19c30c00e5e01e4608a43c7deb504f343f09e46d 29-Apr-2009 Mike Stump <mrs@apple.com> Sema and CodeGen support for attributes on blocks. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0543e8465bd59e7f43f8626165e4b5840bd79fe6 29-Apr-2009 Chris Lattner <sabre@nondot.org> accept and ignore two new warning options. PR410[45]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
8901139cb6fb9af7fe36157500d44df405a0bc0b 29-Apr-2009 Chris Lattner <sabre@nondot.org> accept and ignore two new warning options. PR410[45]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
1653e238707eef9cbcc85109af0fa66aeb6593a8 29-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR4103: improve source location information for members of the current
class. This isn't perfect, but it's a big improvement over not having
any location information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
72527137c521ad9330ecb81ccd841159719dc8cd 29-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR4103: improve source location information for members of the current
class. This isn't perfect, but it's a big improvement over not having
any location information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
35f3a5b8d2e4314171e6e3fff96847e765cbceb1 29-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Have the parser communicate the exception specification to the action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
7dc813462dd9fd3f6f4296f896a12de14264fef8 29-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Have the parser communicate the exception specification to the action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70389 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
8ba7cc776433a5d7f3f83ae63ac2a1a04cfdb972 29-Apr-2009 Chris Lattner <sabre@nondot.org> implement -Wformat-security properly, which is enabled by default.
This enables one specific class of non-literal format warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
655f141f4d4c92eeebcc880211313e84c0a8b2f2 29-Apr-2009 Chris Lattner <sabre@nondot.org> implement -Wformat-security properly, which is enabled by default.
This enables one specific class of non-literal format warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
f970c3984907ceae1c90a84db9e17f1eb1987e53 29-Apr-2009 Chris Lattner <sabre@nondot.org> add a bunch of individual warnings to -Wformat (which is
on by default).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8746414a93c2d7f73c1ae50a8d005de7ee0743d6 29-Apr-2009 Chris Lattner <sabre@nondot.org> add a bunch of individual warnings to -Wformat (which is
on by default).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e588be9e0053c38508a1eec59b37ce257ad227f7 29-Apr-2009 Chris Lattner <sabre@nondot.org> Wire up -Wformat=2 and -Wformat-extra-args


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
5f6cfd22f6b59590859acda48a7d55bca9578298 29-Apr-2009 Chris Lattner <sabre@nondot.org> Wire up -Wformat=2 and -Wformat-extra-args


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
3ce13a7ee9a1b2339fb0cc1bd8c444111d82532d 29-Apr-2009 Chris Lattner <sabre@nondot.org> -Wformat should depend on format-extra-args so that -Wformat implies
the extra argument warnings, and -Wformat -Wno-format-extra-args
turns on -Wformat but not the extra-args warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
02c2e1fef53183a37cb9128863edbf620688abc3 29-Apr-2009 Chris Lattner <sabre@nondot.org> -Wformat should depend on format-extra-args so that -Wformat implies
the extra argument warnings, and -Wformat -Wno-format-extra-args
turns on -Wformat but not the extra-args warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
ea9c2eb0f4b2fdb85d1a9d735e76a2afe6b66e53 29-Apr-2009 Chris Lattner <sabre@nondot.org> tweak warning options to be more like gcc:

1. All all variants of -Wformat*, make them imply -Wformat. GCC warns
if you use -Wformatfoo without -Wformat. We just make one imply the
other.
2. Make -Wformat-nonliteral default to off, like gcc. It is an incredible
nuisance.
3. Accept but currently ignore -Wformat-extra-args.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
be8434a0cc0355f652d59553f8aaa3c88bfe3c94 29-Apr-2009 Chris Lattner <sabre@nondot.org> tweak warning options to be more like gcc:

1. All all variants of -Wformat*, make them imply -Wformat. GCC warns
if you use -Wformatfoo without -Wformat. We just make one imply the
other.
2. Make -Wformat-nonliteral default to off, like gcc. It is an incredible
nuisance.
3. Accept but currently ignore -Wformat-extra-args.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
e81596c5342ef612bc6fe8306c72be3cd3c1f9b4 29-Apr-2009 Mike Stump <mrs@apple.com> Implement sema checking for noreturn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f7c41dab1a8de29b0991e853b8822bb0d1ddc01c 29-Apr-2009 Mike Stump <mrs@apple.com> Implement sema checking for noreturn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ff8648dfaac35f96f8b59bf84ac2cd60cbe9d995 29-Apr-2009 Ted Kremenek <kremenek@apple.com> Implement ownership attribute 'objc_ownership_make_collectable'. This allows one
to add 'CFMakeCollectable' semantics to a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
bf20dbdec6ab7d02e96fac937ad57b2b95c0675c 29-Apr-2009 Ted Kremenek <kremenek@apple.com> Implement ownership attribute 'objc_ownership_make_collectable'. This allows one
to add 'CFMakeCollectable' semantics to a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
7b6d46902216ac0c5a845d7262c9278def70ec7d 29-Apr-2009 Chris Lattner <sabre@nondot.org> add support for -Wendif-labels, PR4101


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
0292d99c51ea4dc8737cb7fc5909ade011d374b3 29-Apr-2009 Chris Lattner <sabre@nondot.org> add support for -Wendif-labels, PR4101


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
9ea9b16b3a393848e22a5618e6ce5e09335ec2ec 29-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Make all PCH-incompatibility warnings into errors, and abort
compilation if the user requested a PCH file but no such PCH file
exists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
1ab86ac92282a92ab847e2ea36c124152c52911d 29-Apr-2009 Douglas Gregor <dgregor@apple.com> Make all PCH-incompatibility warnings into errors, and abort
compilation if the user requested a PCH file but no such PCH file
exists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
eae710dbfdd50a4e38a16abab06cebaec36f733a 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Make the PCH reader use the diagnostics system for its complaints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
a02b147b66ff9f1a22bac4ec7fd1b0d54a40e5bf 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Make the PCH reader use the diagnostics system for its complaints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
78d2a5c808f1c8c1d0f58caec233773d176f5126 28-Apr-2009 Chris Lattner <sabre@nondot.org> Implement -Wfour-char-constants, which is an extension, not an extwarn,
and apparently not part of -Wall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
e3ad881e4e9620e941dabd4e78dacdb028b85682 28-Apr-2009 Chris Lattner <sabre@nondot.org> Implement -Wfour-char-constants, which is an extension, not an extwarn,
and apparently not part of -Wall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
f061b6ef315877a8b87256134708256d1d86e9a4 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a typo noticed by Gabor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
13c8aa7a6c3605dd3c9588977b4809bb5128e6e0 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Fix a typo noticed by Gabor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
1c6d8cc2aa707c53740b36f68e6905ec27d998d1 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Replace a lame fprintf with a slightly-less lame diagnostic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
af1795be18cbb522a8b45ca3664457f281ce348d 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Replace a lame fprintf with a slightly-less lame diagnostic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
9113781d8b352804637adcee35f508728db3000e 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Implement checking for macro definitions that occur on the command
line when using a PCH that were not provided when building the PCH
file. If those names were used as identifiers somewhere in the PCH
file, reject the PCH file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
92b059ea944adaa3e00bb53d63a09868a4752547 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Implement checking for macro definitions that occur on the command
line when using a PCH that were not provided when building the PCH
file. If those names were used as identifiers somewhere in the PCH
file, reject the PCH file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
32de63123fdd5d3a0bb1a552d8830eafb6150d4c 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Allow some differences between the predefines buffer used to build a
PCH file and the predefines buffer used when including the PCH
file. We (explicitly) detect conflicting macro definitions (rejecting
the PCH file) and about missing macro definitions (they'll be
automatically pulled from the PCH file anyway).

We're missing some checking to make sure that new macro definitions
won't have any impact on the PCH file itself (e.g., #define'ing an
identifier that the PCH file used).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
e721f95069d42b899c20c1caabdc6184dd42b820 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Allow some differences between the predefines buffer used to build a
PCH file and the predefines buffer used when including the PCH
file. We (explicitly) detect conflicting macro definitions (rejecting
the PCH file) and about missing macro definitions (they'll be
automatically pulled from the PCH file anyway).

We're missing some checking to make sure that new macro definitions
won't have any impact on the PCH file itself (e.g., #define'ing an
identifier that the PCH file used).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
19ab088b6a11bba6a8f4f2ff5167b040aed3f48c 28-Apr-2009 Chris Lattner <sabre@nondot.org> implement -Wmultichar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
b77f41e66f736e9e67a9d39c47c747804b22c6b9 28-Apr-2009 Chris Lattner <sabre@nondot.org> implement -Wmultichar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
3ad0ab6248ba0a250846e02a8e1cb7848b0afb29 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Fix additional issues pointed out in PR4088.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
8a31774e1e18ff08a5ce0486bdf1c7a51be7a1e8 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Fix additional issues pointed out in PR4088.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
67e1144edd7fde23b60c1b9359ac6160b50b837f 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Improve compatibility with GCC regarding inline semantics in GNU89
mode and in the presence of __gnu_inline__ attributes. This should fix
both PR3989 and PR4069.

As part of this, we now keep track of all of the attributes attached
to each declaration even after we've performed declaration
merging. This fixes PR3264.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/AST/Decl.h
9f9bf258f8ebae30bfb70feb9d797d6eb67b0460 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Improve compatibility with GCC regarding inline semantics in GNU89
mode and in the presence of __gnu_inline__ attributes. This should fix
both PR3989 and PR4069.

As part of this, we now keep track of all of the attributes attached
to each declaration even after we've performed declaration
merging. This fixes PR3264.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/AST/Decl.h
26583b607ad9493cb75d245e9979063505a30430 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused LangOptions NoExtensions and Boolean.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
c71133f0cf820f0708b9dd141563b910530498c1 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused LangOptions NoExtensions and Boolean.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
e695d8c916919c401f324e02d1c1b3675ddf9f2c 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Simplify the scheme used for keywords, and change the classification
scheme to be more useful.

The new scheme introduces a set of categories that should be more
readable, and also reflects what we want to consider as an extension
more accurately. Specifically, it makes the "what is a keyword"
determination accurately reflect whether the keyword is a GNU or
Microsoft extension.

I also introduced separate flags for keyword aliases; this is useful
because the classification of the aliases is mostly unrelated to the
classification of the original keyword.

This patch treats anything that's in the implementation
namespace (prefixed with "__", or "_X" where "X" is any upper-case
letter) as a keyword without marking it as an extension. This is
consistent with the standards in that an implementation is allowed to define
arbitrary extensions in the implementation namespace without violating
the standard. This gets rid of all the nasty "extension used" warnings
for stuff like __attribute__ in -pedantic mode. We still warn for
extensions outside of the the implementation namespace, like typeof.
If someone wants to implement -Wextensions or something like that, we
could add additional information to the keyword table.

This also removes processing for the unused "Boolean" language option;
such an extension isn't supported on any other C implementation, so I
don't see any point to adding it.

The changes to test/CodeGen/inline.c are required because previously, we
weren't actually disabling the "inline" keyword in -std=c89 mode.

I'll remove Boolean and NoExtensions from LangOptions in a follow-up
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
eb32fde032a250091134db56a3aeaea6b09f6594 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Simplify the scheme used for keywords, and change the classification
scheme to be more useful.

The new scheme introduces a set of categories that should be more
readable, and also reflects what we want to consider as an extension
more accurately. Specifically, it makes the "what is a keyword"
determination accurately reflect whether the keyword is a GNU or
Microsoft extension.

I also introduced separate flags for keyword aliases; this is useful
because the classification of the aliases is mostly unrelated to the
classification of the original keyword.

This patch treats anything that's in the implementation
namespace (prefixed with "__", or "_X" where "X" is any upper-case
letter) as a keyword without marking it as an extension. This is
consistent with the standards in that an implementation is allowed to define
arbitrary extensions in the implementation namespace without violating
the standard. This gets rid of all the nasty "extension used" warnings
for stuff like __attribute__ in -pedantic mode. We still warn for
extensions outside of the the implementation namespace, like typeof.
If someone wants to implement -Wextensions or something like that, we
could add additional information to the keyword table.

This also removes processing for the unused "Boolean" language option;
such an extension isn't supported on any other C implementation, so I
don't see any point to adding it.

The changes to test/CodeGen/inline.c are required because previously, we
weren't actually disabling the "inline" keyword in -std=c89 mode.

I'll remove Boolean and NoExtensions from LangOptions in a follow-up
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
458287df784699a4d283ae4479f5d3988f46317c 28-Apr-2009 Mike Stump <mrs@apple.com> Don't allow blocks to be declared as returning an array. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4eeab84b6527feba5c63b819a74417677c9977a0 28-Apr-2009 Mike Stump <mrs@apple.com> Don't allow blocks to be declared as returning an array. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ca7cdcfd86e00775a907db955f78b6ff5e496a7d 28-Apr-2009 Ted Kremenek <kremenek@apple.com> CFG:
- Add 'LoopTarget' pointer field to CFGBlock. This records if the block is used
as the 'loop back' path back to the head of a loop.
- For ForStmt, encode the loop back target as the increment code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
3575f84e459033d6427b84b4b795b22c85c4d27d 28-Apr-2009 Ted Kremenek <kremenek@apple.com> CFG:
- Add 'LoopTarget' pointer field to CFGBlock. This records if the block is used
as the 'loop back' path back to the head of a loop.
- For ForStmt, encode the loop back target as the increment code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
cdf5974cf74ba53f296cc1f51954d4a53cf1dc8d 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> A couple more small changes which are probably required for Cygwin
builds to work (PR4088).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
b0156ea412df1c2eb12d620054a404da71784cf5 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> A couple more small changes which are probably required for Cygwin
builds to work (PR4088).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
28bfa2ad282b02a1ecd1166892b5edf411dc5534 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Attempt to fix reported build error on Cygwin, PR4088.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
4e14823581407a5c7aa78c42b7af387a6c2322a0 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Attempt to fix reported build error on Cygwin, PR4088.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
b706474bce78d4c9349eca8699401495f3425fe9 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add a header containing the Clang version; make the driver use this
Clang version value rather than hard-coding "1.0".

Add PCH and Clang version information into the PCH file. Reject PCH
files with the wrong version information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/Version.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
ab41e63821dc60ad144d0684df8d79a9eef86b75 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Add a header containing the Clang version; make the driver use this
Clang version value rather than hard-coding "1.0".

Add PCH and Clang version information into the PCH file. Reject PCH
files with the wrong version information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/Version.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
270d29a011a26eb1470fe0124007cbc9e173692c 27-Apr-2009 Chris Lattner <sabre@nondot.org> Teach PCH that ASTContext is optional. Move -parse-noop and -Eonly (so far)
processing to after PCH is loaded. -Eonly and -parse-noop are close to working
with PCH now but are not quite there yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
d1d64a027554b635d644957ef071ec04ea1f7063 27-Apr-2009 Chris Lattner <sabre@nondot.org> Teach PCH that ASTContext is optional. Move -parse-noop and -Eonly (so far)
processing to after PCH is loaded. -Eonly and -parse-noop are close to working
with PCH now but are not quite there yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
3b1ef31607fd4abed5555c5e4a04b31337518015 27-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Track down return statements in the handlers of a function-try-block of constructors. Meh ...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
13e8854b186265a601545ca88f8f495fb3fb5654 27-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Track down return statements in the handlers of a function-try-block of constructors. Meh ...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
578851959507ebbfcbfc14a795f0ec9bda8a4462 27-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Be more careful in our teardown of the PCHReader after deciding to
ignore a PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2bf1eb09f06a9792fa94dff0703f2aa2c4bace2a 27-Apr-2009 Douglas Gregor <dgregor@apple.com> Be more careful in our teardown of the PCHReader after deciding to
ignore a PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
9949a5e6e5218e31c460b1d48009c6c0c163659a 27-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
972041f45bdf8df7ea447221292d7827466ba94b 27-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b36b20d3f53ca48e995a8810dfcc0c6f205699ea 27-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add Sema::ExtVectorDecls and Sema::ObjCCategoryImpls to the PCH file. Since these vectors are very, very rarely used and, when used in headers, and even when used are relatively small, we load them eagerly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
b81c17092039f39be60e9656a37cffbdf2e2c783 27-Apr-2009 Douglas Gregor <dgregor@apple.com> Add Sema::ExtVectorDecls and Sema::ObjCCategoryImpls to the PCH file. Since these vectors are very, very rarely used and, when used in headers, and even when used are relatively small, we load them eagerly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
203169f80fe7bb3fbc52921019983206230afc01 27-Apr-2009 Ted Kremenek <kremenek@apple.com> Add two new checker-specific attributes: 'objc_ownership_release' and
'objc_ownership_cfrelease'. These are the 'release' equivalents of
'objc_ownership_retain' and 'objc_ownership_cfretain' respectively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
c6a59e4bf225c7f8152faca72897321f0f6cabd1 27-Apr-2009 Ted Kremenek <kremenek@apple.com> Add two new checker-specific attributes: 'objc_ownership_release' and
'objc_ownership_cfrelease'. These are the 'release' equivalents of
'objc_ownership_retain' and 'objc_ownership_cfretain' respectively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
93307da4b35dc38cdde60a3cffdb326a3f78fffd 27-Apr-2009 Chris Lattner <sabre@nondot.org> shrink SOURCE_LOCATION_OFFSETS to use 4-byte entries instead of 8-byte
entries, shaving 100K off the PCH file for cocoa.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
090d9b53e32bb30d9e74de895bb59b409bd49e00 27-Apr-2009 Chris Lattner <sabre@nondot.org> shrink SOURCE_LOCATION_OFFSETS to use 4-byte entries instead of 8-byte
entries, shaving 100K off the PCH file for cocoa.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
6cc5d1953169b8efbb5a86fff4d2b18de3b77579 27-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Implement caching of stat() calls for precompiled headers, which is
essentially the same thing we do with pretokenized headers. stat()
caching improves performance of the Cocoa-prefixed "Hello, World" by
45%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
4fed3f47f6b9e31d603c5c2d1f6d8ec2e1241e57 27-Apr-2009 Douglas Gregor <dgregor@apple.com> Implement caching of stat() calls for precompiled headers, which is
essentially the same thing we do with pretokenized headers. stat()
caching improves performance of the Cocoa-prefixed "Hello, World" by
45%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
15830ed32a2bdfd4d16bdedd4f155d013a5f6720 27-Apr-2009 Ted Kremenek <kremenek@apple.com> Add new checker-specific attribute 'objc_ownership_cfretain'. This is the same
as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead
of a [... retain] (important in GC modes). Checker support is wired up, but
currently only for Objective-C message expressions (not function calls).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
4064de959853503d9b87065adac1b277fff8af20 27-Apr-2009 Ted Kremenek <kremenek@apple.com> Add new checker-specific attribute 'objc_ownership_cfretain'. This is the same
as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead
of a [... retain] (important in GC modes). Checker support is wired up, but
currently only for Objective-C message expressions (not function calls).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
ea332f372ec042d2de10c6939972199210d8b08b 27-Apr-2009 Chris Lattner <sabre@nondot.org> encode the type and decl offsets with 32-bits for entry instead
of 64 bits. This cuts 400KB off the PCH file for cocoa (7.1 ->
6.7MB):

Before:

Record Histogram:
Count # Bits % Abv Record Kind
1 14296 SOURCE_LOCATION_PRELOADS
1 1699598 100.00 SOURCE_LOCATION_OFFSETS
1 1870766 100.00 METHOD_POOL
1 212988 100.00 SELECTOR_OFFSETS
1 88 STATISTICS
1 106 SPECIAL_TYPES
1 18033788 100.00 IDENTIFIER_TABLE
1 1806428 100.00 IDENTIFIER_OFFSET
1 170 100.00 TARGET_TRIPLE
1 268 LANGUAGE_OPTIONS
1 5168252 100.00 DECL_OFFSET
1 952700 100.00 TYPE_OFFSET

After:

Record Histogram:
Count # Bits % Abv Record Kind
1 14296 SOURCE_LOCATION_PRELOADS
1 1699598 100.00 SOURCE_LOCATION_OFFSETS
1 1870766 100.00 METHOD_POOL
1 212988 100.00 SELECTOR_OFFSETS
1 88 STATISTICS
1 106 SPECIAL_TYPES
1 18033788 100.00 IDENTIFIER_TABLE
1 1806428 100.00 IDENTIFIER_OFFSET
1 170 100.00 TARGET_TRIPLE
1 268 LANGUAGE_OPTIONS
1 2584156 100.00 DECL_OFFSET
1 476380 100.00 TYPE_OFFSET



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
c732f5a4ae13a75b5dfa8f640a50f94db2d3092c 27-Apr-2009 Chris Lattner <sabre@nondot.org> encode the type and decl offsets with 32-bits for entry instead
of 64 bits. This cuts 400KB off the PCH file for cocoa (7.1 ->
6.7MB):

Before:

Record Histogram:
Count # Bits % Abv Record Kind
1 14296 SOURCE_LOCATION_PRELOADS
1 1699598 100.00 SOURCE_LOCATION_OFFSETS
1 1870766 100.00 METHOD_POOL
1 212988 100.00 SELECTOR_OFFSETS
1 88 STATISTICS
1 106 SPECIAL_TYPES
1 18033788 100.00 IDENTIFIER_TABLE
1 1806428 100.00 IDENTIFIER_OFFSET
1 170 100.00 TARGET_TRIPLE
1 268 LANGUAGE_OPTIONS
1 5168252 100.00 DECL_OFFSET
1 952700 100.00 TYPE_OFFSET

After:

Record Histogram:
Count # Bits % Abv Record Kind
1 14296 SOURCE_LOCATION_PRELOADS
1 1699598 100.00 SOURCE_LOCATION_OFFSETS
1 1870766 100.00 METHOD_POOL
1 212988 100.00 SELECTOR_OFFSETS
1 88 STATISTICS
1 106 SPECIAL_TYPES
1 18033788 100.00 IDENTIFIER_TABLE
1 1806428 100.00 IDENTIFIER_OFFSET
1 170 100.00 TARGET_TRIPLE
1 268 LANGUAGE_OPTIONS
1 2584156 100.00 DECL_OFFSET
1 476380 100.00 TYPE_OFFSET



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
cd4da47cb7b56df43204438af87a838b91bc3e4f 27-Apr-2009 Chris Lattner <sabre@nondot.org> add an abbreviation for common PARM_VAR_DECL. All but 9 of the
parm var decls in leopard cocoa.h end up using this abbreviation,
which shrinks the bitcode file by about 50K: 7217736->7167120.

Before:
Block ID #12 (DECLS_BLOCK):
Num Instances: 1
Total Size: 2.23595e+07b/2.79494e+06B/698736W
% of file: 38.7233
Num SubBlocks: 0
Num Abbrevs: 0
Num Records: 139387
% Abbrev Recs: 0

After:
Block ID #12 (DECLS_BLOCK):
Num Instances: 1
Total Size: 2.02405e+07b/2.53006e+06B/632516W
% of file: 35.301
Num SubBlocks: 0
Num Abbrevs: 1
Num Records: 139387
% Abbrev Recs: 19.2902



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHWriter.h
ea5ce4705df0743093925585d8edc80e0d8fe3ff 27-Apr-2009 Chris Lattner <sabre@nondot.org> add an abbreviation for common PARM_VAR_DECL. All but 9 of the
parm var decls in leopard cocoa.h end up using this abbreviation,
which shrinks the bitcode file by about 50K: 7217736->7167120.

Before:
Block ID #12 (DECLS_BLOCK):
Num Instances: 1
Total Size: 2.23595e+07b/2.79494e+06B/698736W
% of file: 38.7233
Num SubBlocks: 0
Num Abbrevs: 0
Num Records: 139387
% Abbrev Recs: 0

After:
Block ID #12 (DECLS_BLOCK):
Num Instances: 1
Total Size: 2.02405e+07b/2.53006e+06B/632516W
% of file: 35.301
Num SubBlocks: 0
Num Abbrevs: 1
Num Records: 139387
% Abbrev Recs: 19.2902



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHWriter.h
32e231c5db47643c2d0b131ce193289613b3f361 27-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Load most of the source manager's information lazily from the PCH
file. In particular, only eagerly load source location entries for
files and for the predefines buffer. Other buffers and
macro-instantiation source location entries are loaded lazily.

With the Cocoa-prefixed "Hello, World", we only load 815/26555 source
location entities. This halves the amount of user time we spend in
this "Hello, World" program with -fsyntax-only (down to .007s).

This optimization is part 1 of 2 for the source manager. This
eliminates most of the user time in loading a PCH file. We still spend
too much time initialize File structures (especially in the calls to
stat), so we need to either make the loading of source location
entries for files lazy or import the stat cache from the PTH
implementation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
7f94b0b0c6791013d2f72ced9b4bedd3b23673a6 27-Apr-2009 Douglas Gregor <dgregor@apple.com> Load most of the source manager's information lazily from the PCH
file. In particular, only eagerly load source location entries for
files and for the predefines buffer. Other buffers and
macro-instantiation source location entries are loaded lazily.

With the Cocoa-prefixed "Hello, World", we only load 815/26555 source
location entities. This halves the amount of user time we spend in
this "Hello, World" program with -fsyntax-only (down to .007s).

This optimization is part 1 of 2 for the source manager. This
eliminates most of the user time in loading a PCH file. We still spend
too much time initialize File structures (especially in the calls to
stat), so we need to either make the loading of source location
entries for files lazy or import the stat cache from the PTH
implementation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
0526d1a8f431f3adeda122ca7940e9827e19f369 27-Apr-2009 Chris Lattner <sabre@nondot.org> unclone SavedStreamPosition


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
02602be3ccc3b29da5b91d2502c3419404992409 27-Apr-2009 Chris Lattner <sabre@nondot.org> unclone SavedStreamPosition


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
3ef219654679759209eb61e7ac047f2ff1038e27 27-Apr-2009 Chris Lattner <sabre@nondot.org> read all decls (and attributes and stmts/exprs referenced by the decl)
from the DeclsCursor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
da93061f56d5820725b01a140879d047554e7d32 27-Apr-2009 Chris Lattner <sabre@nondot.org> read all decls (and attributes and stmts/exprs referenced by the decl)
from the DeclsCursor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
77055f6ac2f8f9975ce75657b6719eca7500fc17 27-Apr-2009 Chris Lattner <sabre@nondot.org> rename GetStmt -> GetDeclStmt to make it clear that the stmt read
is part of a decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
887e2b375fc5e00084ec7bf3dd050c2ca399a6d2 27-Apr-2009 Chris Lattner <sabre@nondot.org> rename GetStmt -> GetDeclStmt to make it clear that the stmt read
is part of a decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
3282c39104c4c3618151e31715f0253668ad7034 27-Apr-2009 Chris Lattner <sabre@nondot.org> change the interface to ReadStmt to force clients to pass a cursor in to read from.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
52e97d1afc98cf4cf0a6cb8f43769dfd8acbab20 27-Apr-2009 Chris Lattner <sabre@nondot.org> change the interface to ReadStmt to force clients to pass a cursor in to read from.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
283c061970f55172d62ef6505b12789397de8217 27-Apr-2009 Chris Lattner <sabre@nondot.org> split decl reading out to its own PCHReaderDecl.cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
698f925dedd956cf7c2d7f77ba6192eb04b31e60 27-Apr-2009 Chris Lattner <sabre@nondot.org> split decl reading out to its own PCHReaderDecl.cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
095479470190b1e987673f2164206c9987041dbf 27-Apr-2009 Chris Lattner <sabre@nondot.org> split stmt/expr deserialization out to PCHReaderStmt.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
4c6f952b70abd69e52fa567393c60295edb8a1a5 27-Apr-2009 Chris Lattner <sabre@nondot.org> split stmt/expr deserialization out to PCHReaderStmt.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
4b89fff51d907afc08ab306f0b1a62b89213773f 27-Apr-2009 Chris Lattner <sabre@nondot.org> rdar://6827200 - [sema] reject statically allocated arrays of interface types

Upgrade "array of interface" warning to an error. In addition to being a
terrible idea, this crashes codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c7c11b1ba6a110f2416889cc3576fe33277b2a33 27-Apr-2009 Chris Lattner <sabre@nondot.org> rdar://6827200 - [sema] reject statically allocated arrays of interface types

Upgrade "array of interface" warning to an error. In addition to being a
terrible idea, this crashes codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fdb164f9803ba8b0c8fb1a8c25069841c951183e 27-Apr-2009 Chris Lattner <sabre@nondot.org> Change our silencing of C typedef redefinition handling to what we had
before r69391: typedef redefinition is an error by default, but if
*either* the old or new definition are from a system header, we silence
it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d0359af5113c1936ff3f699c7d700adff59351f2 27-Apr-2009 Chris Lattner <sabre@nondot.org> Change our silencing of C typedef redefinition handling to what we had
before r69391: typedef redefinition is an error by default, but if
*either* the old or new definition are from a system header, we silence
it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4fc71ebb2461b40b9ccddd3ae4bec5148f491be3 27-Apr-2009 Chris Lattner <sabre@nondot.org> Set up DeclsCursor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
6367f6d06308ef29c28d2c1604ded45625caeec9 27-Apr-2009 Chris Lattner <sabre@nondot.org> Set up DeclsCursor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
8e520d2f8fea4250a6e725494cb7ed683fc5b667 27-Apr-2009 Chris Lattner <sabre@nondot.org> fix a comment by starting stmts/exprs after types and decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
5947ca29a619725b8a9ea2e58a6c9df9e7db139b 27-Apr-2009 Chris Lattner <sabre@nondot.org> fix a comment by starting stmts/exprs after types and decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
ffe8f20706a5cde7fe914a454ab02815f26a082e 27-Apr-2009 Chris Lattner <sabre@nondot.org> make -Wtypedef-redefinition an extwarn instead of defaulting
to error, doing this breaks too many programs (e.g. Adium).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
04ad9b278c27319e873e9f6ccf991f68f5fcc8a3 27-Apr-2009 Chris Lattner <sabre@nondot.org> make -Wtypedef-redefinition an extwarn instead of defaulting
to error, doing this breaks too many programs (e.g. Adium).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
920673ad289a21844df0394223f94c89731f3f30 27-Apr-2009 Chris Lattner <sabre@nondot.org> make llvm-bcanalyzer dump out PCH files symbolically. We should probably
eventually get an option to turn this off, but it is nice for looking at
statistics. For example, the types block now prints:

Block ID #11 (TYPES_BLOCK_ID):
Num Instances: 1
Total Size: 895100b/111888B/27971.9W
% of file: 1.55801
Num SubBlocks: 0
Num Abbrevs: 0
Num Records: 14899
% Abbrev Recs: 0

Code Histogram:
5478 TYPE_FUNCTION_PROTO
2683 TYPE_TYPEDEF
2460 TYPE_POINTER
2047 TYPE_ENUM
1553 TYPE_RECORD
283 TYPE_CONSTANT_ARRAY
274 TYPE_OBJC_INTERFACE
76 TYPE_INCOMPLETE_ARRAY
10 TYPE_VECTOR
9 TYPE_OBJC_QUALIFIED_ID
5 TYPE_FUNCTION_NO_PROTO
5 TYPE_EXT_QUAL
3 TYPE_TYPEOF_EXPR



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
b145b1e9de866e79fb386e4a074dc0b41853acf3 27-Apr-2009 Chris Lattner <sabre@nondot.org> make llvm-bcanalyzer dump out PCH files symbolically. We should probably
eventually get an option to turn this off, but it is nice for looking at
statistics. For example, the types block now prints:

Block ID #11 (TYPES_BLOCK_ID):
Num Instances: 1
Total Size: 895100b/111888B/27971.9W
% of file: 1.55801
Num SubBlocks: 0
Num Abbrevs: 0
Num Records: 14899
% Abbrev Recs: 0

Code Histogram:
5478 TYPE_FUNCTION_PROTO
2683 TYPE_TYPEDEF
2460 TYPE_POINTER
2047 TYPE_ENUM
1553 TYPE_RECORD
283 TYPE_CONSTANT_ARRAY
274 TYPE_OBJC_INTERFACE
76 TYPE_INCOMPLETE_ARRAY
10 TYPE_VECTOR
9 TYPE_OBJC_QUALIFIED_ID
5 TYPE_FUNCTION_NO_PROTO
5 TYPE_EXT_QUAL
3 TYPE_TYPEOF_EXPR



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
ce066715485bcbaef75127726123466f334ae488 27-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Some fixes for PCH (de-)serialization of Objective-C AST nodes:
- Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr
- Implement PCH support for ImplicitParamDecl
- Fix the handling of the body of an ObjCMethodDecl
- Several cast -> cast_or_null fixes
- Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL
selectors.
- Make Selector::getAsString() work with NULL selectors.
- Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt
in the PCH reader and writer; these were never getting called.

At this point, all of the pch-test tests pass for C and Objective-C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Basic/IdentifierTable.h
lang/Frontend/PCHBitCodes.h
405bad07391494d2eb025f8222c256c66b56e5f8 27-Apr-2009 Douglas Gregor <dgregor@apple.com> Some fixes for PCH (de-)serialization of Objective-C AST nodes:
- Deal with the Receiver/ClassInfo shared storage in ObjCMessageExpr
- Implement PCH support for ImplicitParamDecl
- Fix the handling of the body of an ObjCMethodDecl
- Several cast -> cast_or_null fixes
- Make Selector::getIdentifierInfoForSlot work for 1-argument, NULL
selectors.
- Make Selector::getAsString() work with NULL selectors.
- Fix the names of VisitObjCAtCatchStmt and VisitObjCAtFinallyStmt
in the PCH reader and writer; these were never getting called.

At this point, all of the pch-test tests pass for C and Objective-C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Basic/IdentifierTable.h
lang/Frontend/PCHBitCodes.h
4203db84bf725b48a335c8008a60892b6b22953b 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Add a bit more handling for declarations like "int a[*]".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f91f5c8a66ffd812f61819836529f8ad437f7e2b 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Add a bit more handling for declarations like "int a[*]".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
587788acb2b8676ab19fa2d3ce36201b5ecd68b1 26-Apr-2009 Chris Lattner <sabre@nondot.org> Adjust to LLVM API changes that went into r70157.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
b9fa917e90d5d70d2d84c8cb7e7470b3828f957d 26-Apr-2009 Chris Lattner <sabre@nondot.org> Adjust to LLVM API changes that went into r70157.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
bc9ef257b887506228e86a7f4c933aecc8f554a9 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
d3a413d3b8eb39bcee5944bc545d9997c1abe492 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Parser.h
5255e7ae5cde3039284ca49a4c03f7bd4869894f 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9a901bb63990574ff0bcc12ff851d7a71cff8ddb 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
79762bd703e2b04ae7b723e036ccc73760f4b1b4 26-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH read/write support for ObjC statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtObjC.h
lang/Frontend/PCHBitCodes.h
1eb5540760dc79502e32d4fe9c28217476ea14b9 26-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH read/write support for ObjC statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtObjC.h
lang/Frontend/PCHBitCodes.h
11970f9a95dbd1a5829148449a59e8c17c74dfc8 26-Apr-2009 Chris Lattner <sabre@nondot.org> implement PR4077: [Linux kernel] inscrutable error on inline asm input/output constraint mismatch
Before we emitted:

$ clang t.c -S -m64
llvm: error: Unsupported asm: input constraint with a matching output constraint of incompatible type!

Now we produce:
$ clang t.c -S -m64
t.c:5:40: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'int'
asm volatile("foo " : "=a" (a) :"0" (b));
~~~ ~^~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
49ac88166d36f8c436780694f2ce955acde87c6a 26-Apr-2009 Chris Lattner <sabre@nondot.org> implement PR4077: [Linux kernel] inscrutable error on inline asm input/output constraint mismatch
Before we emitted:

$ clang t.c -S -m64
llvm: error: Unsupported asm: input constraint with a matching output constraint of incompatible type!

Now we produce:
$ clang t.c -S -m64
t.c:5:40: error: unsupported inline asm: input with type 'unsigned long' matching output with type 'int'
asm volatile("foo " : "=a" (a) :"0" (b));
~~~ ~^~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9eb395f7173bcde053cafd7b575f12f973f583b5 26-Apr-2009 Chris Lattner <sabre@nondot.org> in a tied operand, don't copy over the name or constraint string, just the flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
d68876176a0d2c19e3864e7d38f6036c4f72f0a3 26-Apr-2009 Chris Lattner <sabre@nondot.org> in a tied operand, don't copy over the name or constraint string, just the flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0cd323da459fbce4e19d1bbf2923afe80bb39e44 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull operands names "[foo]" into ConstraintInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
2819fa85651526d59ade4fdc9da2cadd7b132973 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull operands names "[foo]" into ConstraintInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
9f8e50205526b02ae170d4e0f0b10bf0b3e66f87 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
432c86969eced2ce658b3f3f2aa7407c8864f21b 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c6fd00a463f00f05093394a3a5b28b3b43ef88ac 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Update StmtNodes.def with the new base class of CXXTemporaryObjectExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
e38be7c18249b03159fb052b785d0cf500eda693 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Update StmtNodes.def with the new base class of CXXTemporaryObjectExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
2c763c8688ce2be52f71245988a5f6f6ec3d879a 26-Apr-2009 Edwin Török <edwintorok@gmail.com> Add missing include. This fixes the build with gcc 4.3.3.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
5414fbac5f1749c0e85a8c4eeb5dfece59c3e30a 26-Apr-2009 Torok Edwin <edwintorok@gmail.com> Add missing include. This fixes the build with gcc 4.3.3.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c49cc1a57583d78783137ff7914526617d032af7 26-Apr-2009 Chris Lattner <sabre@nondot.org> change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
44def070435a2b5d67f0534f7a3a85a7389d60f2 26-Apr-2009 Chris Lattner <sabre@nondot.org> change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e43f09701f8318d58bbfb83b4f729f4ee71a550b 26-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> When writing a PCH file, write multiple type and declaration blocks as
necessary and iterate until all types and declarations have been
written. This reduces the Cocoa.h PCH file size by about 4% (since we
don't write types we don't need), and fixes problems where writing a
declaration generates a new type.

This doesn't seem to have any impact on performance either way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
366809a4e9340b3458b471e2294a75a9f09ea304 26-Apr-2009 Douglas Gregor <dgregor@apple.com> When writing a PCH file, write multiple type and declaration blocks as
necessary and iterate until all types and declarations have been
written. This reduces the Cocoa.h PCH file size by about 4% (since we
don't write types we don't need), and fixes problems where writing a
declaration generates a new type.

This doesn't seem to have any impact on performance either way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
8116b4b7d01741680a098d6dd17e47c1c9ac6713 26-Apr-2009 Chris Lattner <sabre@nondot.org> Split C++ statements out to their own file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
43c98041f7746f8d9445bdea873d86eca966b2b8 26-Apr-2009 Chris Lattner <sabre@nondot.org> Split C++ statements out to their own file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtCXX.h
4a9e927b03ecc65ca47cc4e1cd7b8d5c1fae1cf9 26-Apr-2009 Chris Lattner <sabre@nondot.org> split ObjC and C++ Statements out into their own headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtObjC.h
lang/AST/StmtVisitor.h
lang/Analysis/PathSensitive/GRExprEngine.h
16f0049415ec596504891259e2a83e19871c0d52 26-Apr-2009 Chris Lattner <sabre@nondot.org> split ObjC and C++ Statements out into their own headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtObjC.h
lang/AST/StmtVisitor.h
lang/Analysis/PathSensitive/GRExprEngine.h
0dbf5ce733d057ce23c805c4cbd9c97be8033770 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -std-default= option.
- This can be used to supply a default value for -std=; the idea is
that this can be used in conjunction with CCC_ADD_ARGS or
QA_OVERRIDE_GCC3_OPTIONS to change the default without having to
modify the build system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
a3ff202ee4fb21728e930d5d029ba4925129912c 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -std-default= option.
- This can be used to supply a default value for -std=; the idea is
that this can be used in conjunction with CCC_ADD_ARGS or
QA_OVERRIDE_GCC3_OPTIONS to change the default without having to
modify the build system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
2e6c74cbe908e8055014845a2ff33cf2798fac60 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add option for AddAllArgsTranslated to control whether output argument
should be joined or separate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
4df9a664b7a0bfbd065253349cc5ead88b50b9a2 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add option for AddAllArgsTranslated to control whether output argument
should be joined or separate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
c0478bf9526f9b16badd70a153f86409ca8fd024 26-Apr-2009 Chris Lattner <sabre@nondot.org> implement PCH support for the rest of ExprObjC.h, including
the missing bits of ObjCMessageExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
0389e6bd0159bfdd08f7c50a37543b6e3adf0c33 26-Apr-2009 Chris Lattner <sabre@nondot.org> implement PCH support for the rest of ExprObjC.h, including
the missing bits of ObjCMessageExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
f6e1fb2133ca91ae39c2a7534387fc906df92405 26-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Don't read all of the records in the PCH file's preprocessor block,
most of which are ignored. Instead, move the __COUNTER__ value out to
a PCH-level record (since it is handled eagerly) and move the header
file information into the SourceManager block (which is also,
currently, loaded eagerly).

This results in another 17% performance improvement in the
Cocoa-prefixed "Hello, World" with PCH.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
2eafc1b56347f772729e082e6bac824b0ef1b585 26-Apr-2009 Douglas Gregor <dgregor@apple.com> Don't read all of the records in the PCH file's preprocessor block,
most of which are ignored. Instead, move the __COUNTER__ value out to
a PCH-level record (since it is handled eagerly) and move the header
file information into the SourceManager block (which is also,
currently, loaded eagerly).

This results in another 17% performance improvement in the
Cocoa-prefixed "Hello, World" with PCH.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
d461407636aaec91dcc76dcab2600b04857aa742 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.

I wasn't originally going to use this approach, but cases like
test/Sema/expr-comma.c make things difficult.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7c32f8e9be486f8f8ec2e75eba36903f7cb1b73a 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4074: allow subscripting non-lvalue arrays in C90 mode.

I wasn't originally going to use this approach, but cases like
test/Sema/expr-comma.c make things difficult.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70096 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eccb51d39a22a7cd1b4c61fedf43416a42990542 26-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Lazily load the controlling macros for all of the headers known in the
PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes
us from reading 503 identifiers down to 37 and from 470 macros down to
4. It also results in an 8% performance improvement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
lang/Lex/HeaderSearch.h
8c5a760b82e73ed90b560090772db97e2ae27b09 26-Apr-2009 Douglas Gregor <dgregor@apple.com> Lazily load the controlling macros for all of the headers known in the
PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes
us from reading 503 identifiers down to 37 and from 470 macros down to
4. It also results in an 8% performance improvement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
lang/Lex/HeaderSearch.h
7264d2112313ab9b0268f137d5afa3ad01c03ea6 26-Apr-2009 Chris Lattner <sabre@nondot.org> minor diagnostics improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
338395d31eecbf99bc1b15ef5631d1359bb96083 26-Apr-2009 Chris Lattner <sabre@nondot.org> minor diagnostics improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eec8ae2c3665db2d293850a695e5a3b3cb57a50a 25-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4073 by making designated initializer checking code use
VerifyIntegerConstantExpression instead of isIntegerConstantExpr.
This makes it ext-warn but tolerate things that fold to a constant
but that are not valid i-c-e's.

There must be a bug in the i-c-e computation though, because it
doesn't catch this case even with pedantic.

This also switches the later code to use EvaluateAsInt which is
simpler and handles everything that evaluate does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3bf6893b77c30cb774100e0fa7ae029331675ec1 25-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4073 by making designated initializer checking code use
VerifyIntegerConstantExpression instead of isIntegerConstantExpr.
This makes it ext-warn but tolerate things that fold to a constant
but that are not valid i-c-e's.

There must be a bug in the i-c-e computation though, because it
doesn't catch this case even with pedantic.

This also switches the later code to use EvaluateAsInt which is
simpler and handles everything that evaluate does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4bb24884988d2b074aa2e12fd47bea5e348ce716 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Revert my changes that try to avoid creating StringMap entries for
identifiers. They don't yet work, but will inhibit future
optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
5f8e3302242cf94de2f8e46d10167f57fcf747c3 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Revert my changes that try to avoid creating StringMap entries for
identifiers. They don't yet work, but will inhibit future
optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
9966411847ba573e826c4df17c0d46507b6a5c10 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Start implementing the PTH IdentifierInfo-saving trick in PCH,
allocating IdentifierInfos with a pointer into the string data stored
in the PCH file rather than having an entry in the identifier table's
string map. However, we don't actually get these savings at the
moment, because we go through the IdentifierTable when loading
identifiers from the on-disk hash table.

This commit is for record-keeping purposes only. I'll be reverting
this change (and the PCH layout tweak that preceded it) because it
appears that implementing this optimization will collide with another,
future optimization to reduce the size of the on-disk hash table for
identifiers. That optimization is likely to provide more benefit (with
less voodoo).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
5da8161bdff1c81ab93b55ddd0fd45dc2123ef85 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Start implementing the PTH IdentifierInfo-saving trick in PCH,
allocating IdentifierInfos with a pointer into the string data stored
in the PCH file rather than having an entry in the identifier table's
string map. However, we don't actually get these savings at the
moment, because we go through the IdentifierTable when loading
identifiers from the on-disk hash table.

This commit is for record-keeping purposes only. I'll be reverting
this change (and the PCH layout tweak that preceded it) because it
appears that implementing this optimization will collide with another,
future optimization to reduce the size of the on-disk hash table for
identifiers. That optimization is likely to provide more benefit (with
less voodoo).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
de44c9f1baf170c98ccc534c653d3f1ff24b0426 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Write the identifier offsets array into the PCH file as a blob, so
that the PCH reader does not have to decode the VBR encoding at PCH
load time.

Also, reduce the size of the identifier offsets from 64 bits down to
32 bits. The identifier table itself isn't going to grow to more than
4GB :)

Overall, this results in a 13% speedup in the Cocoa-prefixed "Hello,
World" benchmark.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
2b3a5a83ea30bde7fa8f9d8e9a0cb12623759bfb 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Write the identifier offsets array into the PCH file as a blob, so
that the PCH reader does not have to decode the VBR encoding at PCH
load time.

Also, reduce the size of the identifier offsets from 64 bits down to
32 bits. The identifier table itself isn't going to grow to more than
4GB :)

Overall, this results in a 13% speedup in the Cocoa-prefixed "Hello,
World" benchmark.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
354abb45be477445dede57ec6993ed2d1e1139e7 25-Apr-2009 Chris Lattner <sabre@nondot.org> improve a diagnostic to make more sense.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
740782a78386ad3c64c670ba9b1619545bbb4901 25-Apr-2009 Chris Lattner <sabre@nondot.org> improve a diagnostic to make more sense.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c305c34650968a494de752a9e2bd454f9708929d 25-Apr-2009 Chris Lattner <sabre@nondot.org> accept an ignore the no_instrument_function attribute. Since we don't
support -pg, we never instrument :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
5e204486a7dd1e5f7e14e941a2c7e707a8ad1a3b 25-Apr-2009 Chris Lattner <sabre@nondot.org> accept an ignore the no_instrument_function attribute. Since we don't
support -pg, we never instrument :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
24a224c9dd91b2a8c673f170f343b7884a5c68de 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Write the declaration and type offset arrays into the bitstream as
blobs, so that we don't need to do any work to get these arrays into
memory at PCH load time.

This gives another 19% performance improvement to the Cocoa-prefixed
"Hello, World!".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
8f5dc7fe4d42cea78fa92d1638f753cf65b54cb5 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Write the declaration and type offset arrays into the bitstream as
blobs, so that we don't need to do any work to get these arrays into
memory at PCH load time.

This gives another 19% performance improvement to the Cocoa-prefixed
"Hello, World!".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
2d71183cd5b0a6bd39cab83e42ab182b0ab445d6 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Load the selector table lazily from the PCH file.

This results in a 10% speedup on the Cocoa-prefixed "Hello, World!",
all of which is (not surprisingly) user time. There was a tiny
reduction in the size of the PCH file for Cocoa.h, because certain
selectors aren't being written twice.

I'm using two new tricks here that I'd like to replicate elsewhere:
(1) The selectors not used in the global method pool are packed into
the blob after the global method pool's on-disk hash table and
stored as keys, so that all selectors are in the same blob.
(2) We record the offsets of each selector key when we write it into
the global method pool (or after it, in the same blob). The offset
table is written as a blob, so that we don't need to pack/unpack a
SmallVector with its contents.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
83941df2745d69c05acee3174c7a265c206f70d9 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Load the selector table lazily from the PCH file.

This results in a 10% speedup on the Cocoa-prefixed "Hello, World!",
all of which is (not surprisingly) user time. There was a tiny
reduction in the size of the PCH file for Cocoa.h, because certain
selectors aren't being written twice.

I'm using two new tricks here that I'd like to replicate elsewhere:
(1) The selectors not used in the global method pool are packed into
the blob after the global method pool's on-disk hash table and
stored as keys, so that all selectors are in the same blob.
(2) We record the offsets of each selector key when we write it into
the global method pool (or after it, in the same blob). The offset
table is written as a blob, so that we don't need to pack/unpack a
SmallVector with its contents.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
fb3e40219796596ee5d29f90929ff05c4df4f77e 25-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH support for ObjCMessageExpr (needed to build Mail).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
c4f0bbdb166fbc31ab2cf0f6ff573fde9fa307b3 25-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH support for ObjCMessageExpr (needed to build Mail).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
34c61337c548fc848d250993d7cf6851a2b38f3f 25-Apr-2009 Chris Lattner <sabre@nondot.org> This is a pretty big cleanup for how invalid decl/type are handle.
This gets rid of a bunch of random InvalidDecl bools in sema, changing
us to use the following approach:

1. When analyzing a declspec or declarator, if an error is found, we
set a bit in Declarator saying that it is invalid.
2. Once the Decl is created by sema, we immediately set the isInvalid
bit on it from what is in the declarator. From this point on, sema
consistently looks at and sets the bit on the decl.

This gives a very clear separation of concerns and simplifies a bunch
of code. In addition to this, this patch makes these changes:

1. it renames DeclSpec::getInvalidType() -> isInvalidType().
2. various "merge" functions no longer return bools: they just set the
invalid bit on the dest decl if invalid.
3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator
methods now set invalid on the decl returned instead of returning an
invalid bit byref.
4. In SemaType, refering to a typedef that was invalid now propagates the
bit into the resultant type. Stuff declared with the invalid typedef
will now be marked invalid.
5. Various methods like CheckVariableDeclaration now return void and set the
invalid bit on the decl they check.


There are a few minor changes to tests with this, but the only major bad
result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this
next.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
eaaebc7cf10dc1a2016183a262ad3256bc468759 25-Apr-2009 Chris Lattner <sabre@nondot.org> This is a pretty big cleanup for how invalid decl/type are handle.
This gets rid of a bunch of random InvalidDecl bools in sema, changing
us to use the following approach:

1. When analyzing a declspec or declarator, if an error is found, we
set a bit in Declarator saying that it is invalid.
2. Once the Decl is created by sema, we immediately set the isInvalid
bit on it from what is in the declarator. From this point on, sema
consistently looks at and sets the bit on the decl.

This gives a very clear separation of concerns and simplifies a bunch
of code. In addition to this, this patch makes these changes:

1. it renames DeclSpec::getInvalidType() -> isInvalidType().
2. various "merge" functions no longer return bools: they just set the
invalid bit on the dest decl if invalid.
3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator
methods now set invalid on the decl returned instead of returning an
invalid bit byref.
4. In SemaType, refering to a typedef that was invalid now propagates the
bit into the resultant type. Stuff declared with the invalid typedef
will now be marked invalid.
5. Various methods like CheckVariableDeclaration now return void and set the
invalid bit on the decl they check.


There are a few minor changes to tests with this, but the only major bad
result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this
next.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
d21120294f4fef96d2954897e1af6eaf6b2f34e7 25-Apr-2009 Chris Lattner <sabre@nondot.org> rename getNumParmVarDeclsFromType back to getNumParams(),
remove a special case that was apparently for typeof() and
generalize the code in SemaDecl that handles typedefs to
handle any sugar type (including typedef, typeof, etc).
Improve comment to make it more clear what is going on.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1ad9b28e3217c2349a04f3d3bf14f9c73a99afa7 25-Apr-2009 Chris Lattner <sabre@nondot.org> rename getNumParmVarDeclsFromType back to getNumParams(),
remove a special case that was apparently for typeof() and
generalize the code in SemaDecl that handles typedefs to
handle any sugar type (including typedef, typeof, etc).
Improve comment to make it more clear what is going on.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9d957cbf5b5488063e8279493a1367ef5ccff361 25-Apr-2009 Chris Lattner <sabre@nondot.org> add a new helper function to FunctionDecl instead of it being
static in Decl.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
11ddb7dc22bb398a6727318729680630bfcefaae 25-Apr-2009 Chris Lattner <sabre@nondot.org> add a new helper function to FunctionDecl instead of it being
static in Decl.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f93cfeefb4604d8d5a6c657111659a95a5538d0b 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that the consumer sees all interested decls. This fixes Preview

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
c62a2fe1957626bc4b29402b2d0a3694dfaa3280 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Make sure that the consumer sees all interested decls. This fixes Preview

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
b98860c39ac5162b4b628962bdc08dd3571cdc3a 25-Apr-2009 Ted Kremenek <kremenek@apple.com> Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked up
to the checker yet, but essentially it allows a user to specify that an
Objective-C method or C function increments the reference count of a passed
object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
de9a81b92e9098daa8ca19df138e4807b4d8afe8 25-Apr-2009 Ted Kremenek <kremenek@apple.com> Add new checker-specific attribute 'objc_ownership_retain'. This isn't hooked up
to the checker yet, but essentially it allows a user to specify that an
Objective-C method or C function increments the reference count of a passed
object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
184f92d5e05df4089f17f49bfbcfe9f6405d4593 25-Apr-2009 Chris Lattner <sabre@nondot.org> reject explicit pointer arithmetic on interface pointers in 64-bit objc ABI


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b5f1562d7b57a3dbe27a39b45995f59862973820 25-Apr-2009 Chris Lattner <sabre@nondot.org> reject explicit pointer arithmetic on interface pointers in 64-bit objc ABI


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
aa6e3187858164dac3c4d950b07d5b7b63f2e3bd 25-Apr-2009 Ted Kremenek <kremenek@apple.com> Add new checker-specific attribute 'objc_ownership_returns'. This isn't hooked
up to the checker yet, but essentially it allows a user to specify that an
Objective-C method or C function returns an owned an Objective-C object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
0fc169e864aef7fc9a782e60b222a360f406704a 25-Apr-2009 Ted Kremenek <kremenek@apple.com> Add new checker-specific attribute 'objc_ownership_returns'. This isn't hooked
up to the checker yet, but essentially it allows a user to specify that an
Objective-C method or C function returns an owned an Objective-C object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
b5d9c47705901b475fd3e095f0779a336940f908 25-Apr-2009 Anders Carlsson <andersca@mac.com> Add CXXExprWithCleanup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
02bbfa33590dfe3107e801fb526b7ab0bdfd00ee 25-Apr-2009 Anders Carlsson <andersca@mac.com> Add CXXExprWithCleanup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
c3221aae610fea665bf76ddee6ea3fc260c3fd6d 24-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for the global method pool (= instance and factory method
pools, combined). The methods in the global method pool are lazily
loaded from an on-disk hash table when Sema looks into its version of
the hash tables.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/OnDiskHashTable.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Sema/ExternalSemaSource.h
f0aaf7a59729a4ae0146e3464ee987745be95829 24-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for the global method pool (= instance and factory method
pools, combined). The methods in the global method pool are lazily
loaded from an on-disk hash table when Sema looks into its version of
the hash tables.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/OnDiskHashTable.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Sema/ExternalSemaSource.h
cda68f24c5d807d6e7d3cc6bf267bbd56d1b8861 24-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH support for #import.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Lex/HeaderSearch.h
83d63c78810556d26b62ac4cbae2eda6cdd2570c 24-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH support for #import.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Lex/HeaderSearch.h
e1c08f72b214fb638cd4566cb572decaae4d204c 24-Apr-2009 Anders Carlsson <andersca@mac.com> Make CXXTemporaryObjectExpr inherit from CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
524fa13fd81e88533c7a1d4b1232c0de2c97dc7c 24-Apr-2009 Anders Carlsson <andersca@mac.com> Make CXXTemporaryObjectExpr inherit from CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
af443ed8faff337a131a2dbf527717f3fb2aaaa7 24-Apr-2009 Anders Carlsson <andersca@mac.com> Add an ASTContext parameter to CXXTemporaryObjectExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
09c4abb1057f0eb53a9c2b5c2f22b1472362156e 24-Apr-2009 Anders Carlsson <andersca@mac.com> Add an ASTContext parameter to CXXTemporaryObjectExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69959 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
ebbd7cd73877cc313f40e652958602ae290f6d78 24-Apr-2009 Anders Carlsson <andersca@mac.com> Add a VarDecl parameter to the CXXTemporaryObjectExpr constructor. It's unused for now, so no functionality change yet. Also, create CXXTempVarDecls to pass to the CXXTemporaryObjectExpr ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
26de54983e7977fad615c94012f2f67d0d1cf404 24-Apr-2009 Anders Carlsson <andersca@mac.com> Add a VarDecl parameter to the CXXTemporaryObjectExpr constructor. It's unused for now, so no functionality change yet. Also, create CXXTempVarDecls to pass to the CXXTemporaryObjectExpr ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
9cda7a2a8ab3c05739f3a28d5815f9f34a3e3477 24-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that ObjCCompatibleAlias and ObjCImplementation decls are considered NamedDecls

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
76b329177a0bdf05641f74705692a59733090c53 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Make sure that ObjCCompatibleAlias and ObjCImplementation decls are considered NamedDecls

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
94c73aa16e151fec942ad3aa8605544b3ad86694 24-Apr-2009 Anders Carlsson <andersca@mac.com> Make the CXXConstructExpr public and add a StmtClass to it. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
bd6734e5f6432ce0cc07171c490ffaa094796198 24-Apr-2009 Anders Carlsson <andersca@mac.com> Make the CXXConstructExpr public and add a StmtClass to it. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
e684ff2a2d6b66da7fe90e19434659d87f2997e7 24-Apr-2009 Anders Carlsson <andersca@mac.com> Move the CXXConstructExpr before the CXXTemporaryObjectExpr so that the temporary object expr can inherit from the construct expr. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
15ef2b5820f9daccc44b9e847163b705b6f5863b 24-Apr-2009 Anders Carlsson <andersca@mac.com> Move the CXXConstructExpr before the CXXTemporaryObjectExpr so that the temporary object expr can inherit from the construct expr. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
95933c17fa9f631b86cb17745a1642817378f5ad 24-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode

Several changes here:
1. We change Type::isIncompleteType to realize that forward declared
interfaces are incomplete. This eliminate special case code for this
from the sizeof path, and starts us rejecting P[4] when P is a pointer
to an incomplete interface.
2. Explicitly reject P[4] when P points to an interface in non-fragile ABI
mode.
3. Switch the sizeof(interface) diagnostic back to an error instead of a
warning in non-fragile abi mode.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1efaa9594a81709a17658fd80ae7e783e1026407 24-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode

Several changes here:
1. We change Type::isIncompleteType to realize that forward declared
interfaces are incomplete. This eliminate special case code for this
from the sizeof path, and starts us rejecting P[4] when P is a pointer
to an incomplete interface.
2. Explicitly reject P[4] when P points to an interface in non-fragile ABI
mode.
3. Switch the sizeof(interface) diagnostic back to an error instead of a
warning in non-fragile abi mode.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
afd5eb3af38dafa1ca646d8a12946d6b74e02404 24-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?).

As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
8fc463adf0116fdcbff86e9cca11955aad1649fe 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?).

As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
bb21d4b846f28e38fd204faca328dccd74eb4fa5 24-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for all of the predefined Objective-C types, such as id,
SEL, Class, Protocol, CFConstantString, and
__objcFastEnumerationState. With this, we can now run the Objective-C
methods and properties PCH tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
319ac896a0fef7365d5589b8021db7e41207fe42 24-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for all of the predefined Objective-C types, such as id,
SEL, Class, Protocol, CFConstantString, and
__objcFastEnumerationState. With this, we can now run the Objective-C
methods and properties PCH tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Frontend/PCHBitCodes.h
acd3a331998f02a511e4602e36cbdb097ef53486 23-Apr-2009 Chris Lattner <sabre@nondot.org> accept and ignore -Wconversion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
e9de8eb2f279a3191d898aa9720d1b5bc70853de 23-Apr-2009 Chris Lattner <sabre@nondot.org> accept and ignore -Wconversion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
9b6348dcc3aaa88b9b04dd51acb0d4c0bb35cf9b 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Fix handling of C99 "extern inline" semantics when dealing with
multiple declarations of the function. Should fix PR3989 and
<rdar://problem/6818429>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b3efa98e320590e8be9d62818e89e599303e65b4 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Fix handling of C99 "extern inline" semantics when dealing with
multiple declarations of the function. Should fix PR3989 and
<rdar://problem/6818429>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
57a03e18ce2c296fcf400c578728dc9ddb999804 23-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6819438 - -Wmissing-noreturn not recognised by clang,
by accepting and ignoring it for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
08f537f475901f766de003c25ad1c32b3a13cfc1 23-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6819438 - -Wmissing-noreturn not recognised by clang,
by accepting and ignoring it for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
9e84d784a1500c536defc79dd1977b519d3d3a46 23-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH read/write support for Objective-C Selectors.

Note: This support is non-lazy. Once we get "Cocoa.h" humming, we can optimize this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
90cd1bb1baac2a0221f3642de0cbea3244b116e5 23-Apr-2009 Steve Naroff <snaroff@apple.com> Add PCH read/write support for Objective-C Selectors.

Note: This support is non-lazy. Once we get "Cocoa.h" humming, we can optimize this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
ab3d373c38a05fcc0d74ee7fcacdf48d3ea2ceab 23-Apr-2009 Chris Lattner <sabre@nondot.org> fix a problem producing debug info with global blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4863db4266d066617a1e5ad7c0f3f28c7995c61b 23-Apr-2009 Chris Lattner <sabre@nondot.org> fix a problem producing debug info with global blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c86c2c8330edd6ea862c94dde080125881d25fb5 23-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add implicit definition of objc_msgSend.
- As with malloc and friends, this is important where the return type
on a 64-bit platform would otherwise end up discarding the upper
32-bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
9396dcf9699541f54bc3990c0dfbaa929464f5df 23-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add implicit definition of objc_msgSend.
- As with malloc and friends, this is important where the return type
on a 64-bit platform would otherwise end up discarding the upper
32-bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
f6279ae5cf4070f1ff869efd99de24f86f1c4c30 23-Apr-2009 Chris Lattner <sabre@nondot.org> the logic for computing __func__ and friends is really broken:
the type assigned by sema (and is visible with sizeof(__func__) for
example) has nothing to do with what codegen ends up producing.
We should eventually add a method on PredefinedExpr to handle this.
In the meantime, just set up some framework and add some fixme's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b5437d238752dc297e42410e98d38d5250fe0463 23-Apr-2009 Chris Lattner <sabre@nondot.org> the logic for computing __func__ and friends is really broken:
the type assigned by sema (and is visible with sizeof(__func__) for
example) has nothing to do with what codegen ends up producing.
We should eventually add a method on PredefinedExpr to handle this.
In the meantime, just set up some framework and add some fixme's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
991a315cd571cc1594aabb2c7d04ef67d40c1fd6 23-Apr-2009 Chris Lattner <sabre@nondot.org> Silence warnings about common forms of -Wstrict-aliasing etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
2432cd3ada3e511b44bea1438c4ba5ca0bce35ef 23-Apr-2009 Chris Lattner <sabre@nondot.org> Silence warnings about common forms of -Wstrict-aliasing etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
37a54fd84c8eee22873f71728a07377185fa1799 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH (de-)serialization of the protocols in an ObjCInterfaceDecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
291be393aa33759e6e34b6429c5ffa206ba50115 23-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH (de-)serialization of the protocols in an ObjCInterfaceDecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3f2c50557dc32075200f8fcb01dcfebfafa1a3ec 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for ObjCPropertyImplDecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8818c4fb69cb2a4eec94b217a90f94f9e075296e 23-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ObjCPropertyImplDecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
087dbf396b59df6b944ef48f1fe55d5c15b8deb2 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> The ivars in an ObjCImplementationDecl are now stored in the
DeclContext rather than in a separate list. This makes PCH
(de-)serialization trivial, so that ivars can be loaded lazily.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8f36aba016c2d236a90f9ecf0a66904209202202 23-Apr-2009 Douglas Gregor <dgregor@apple.com> The ivars in an ObjCImplementationDecl are now stored in the
DeclContext rather than in a separate list. This makes PCH
(de-)serialization trivial, so that ivars can be loaded lazily.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
58e7ce47236aad981c16afe395717dc1cd487fe5 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for ObjCCategoryImplDecl (which can't be tested now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
10b0e1fa3aabd8877dbbc0df1f2414e04afd5fdd 23-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ObjCCategoryImplDecl (which can't be tested now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
bd336c56bd4b95167487c8a74a385650c01f417c 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH (de-)serialization for ObjCImplDecl. This can't be tested yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2c2d43c557beca1b4ba4bd743f33978aecb46a97 23-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH (de-)serialization for ObjCImplDecl. This can't be tested yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
dbbab8c1204c94cf6bd6b232641547eddadde817 23-Apr-2009 Anders Carlsson <andersca@mac.com> Add a CXXConstructExpr that represents an implicit call to a C++ constructor. I think CXXTemporaryObjectExpr is going to become a subclass of CXXConstructExpr, since CXXTemporaryObjectExpr represents a syntactic temporary, for example T()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
e349bea668622ef31bd51a229960a73d69940709 23-Apr-2009 Anders Carlsson <andersca@mac.com> Add a CXXConstructExpr that represents an implicit call to a C++ constructor. I think CXXTemporaryObjectExpr is going to become a subclass of CXXConstructExpr, since CXXTemporaryObjectExpr represents a syntactic temporary, for example T()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
cd19b57e8c03a742954680830bc440b8b0e08965 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate the three SmallVectors in ObjCImplDecl (for instance
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.

This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
653f1b1bf293a9bd96fd4dd6372e779cc7af1597 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate the three SmallVectors in ObjCImplDecl (for instance
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.

This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3839f1c3e2fa6dd5a0482a7d948037c4d03ef4de 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for Objective-C property declarations (UNTESTED!)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
70e5a14c6076d63833c62d1d6d628c26309897c1 23-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for Objective-C property declarations (UNTESTED!)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
af136d9f428db2566b8b0a4eabf5d3efa785884c 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add PCH statistics for the number/percent of lexical/visible declcontexts read

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
2512308525ff328aa992da0b5ee14a488d2ea93a 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Add PCH statistics for the number/percent of lexical/visible declcontexts read

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
070be452f47b7b9275b2a58521776f3c54753ea4 23-Apr-2009 Ted Kremenek <kremenek@apple.com> Add PathDiagnosticRange to PathDiagnostics. These simply wrap SourceRange and
indicate whether or not the range represents an absolute range or should be
extended by lexing to the end of the token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
4c5fcd946971756bd644fe76511f292e10225981 23-Apr-2009 Ted Kremenek <kremenek@apple.com> Add PathDiagnosticRange to PathDiagnostics. These simply wrap SourceRange and
indicate whether or not the range represents an absolute range or should be
extended by lexing to the end of the token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
062d9488c9023deaad365aa3e866648958d9e199 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Support locally-declared external declarations in PCH files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
14c22f20c077cecd68581952a0c227f8c180be03 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Support locally-declared external declarations in PCH files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
77b2cd556f47fcfd22ed1748565a2a71d441df21 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Support tentative definitions in precompiled headers. This isn't likely
to happen (ever), but at least we'll do the right thing when it does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
4c0e86b392c5fb0cb771551fc877edb6979be69c 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Support tentative definitions in precompiled headers. This isn't likely
to happen (ever), but at least we'll do the right thing when it does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
608ff6223083952584ba0ada6d70070bbc2f045f 22-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Remove the serialization code that predates precompiled
headers. Future approaches to (de-)serializing ASTs will be based on
the PCH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclGroup.h
lang/AST/DeclTemplate.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Stmt.h
lang/AST/Type.h
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
370187c8a3e96517c943329f2511737a04b85450 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Remove the serialization code that predates precompiled
headers. Future approaches to (de-)serializing ASTs will be based on
the PCH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclGroup.h
lang/AST/DeclTemplate.h
lang/AST/DeclarationName.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
lang/AST/Stmt.h
lang/AST/Type.h
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
2554cf263da9a23af8664d438de44c02dbb76422 22-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate some FIXMEs in the PCH reader that were either already fixed or aren't actually things to fix

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
6cfc1a8b7582b8433b61222502effb018c534393 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate some FIXMEs in the PCH reader that were either already fixed or aren't actually things to fix

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
405b6430b88da6b23b37ec9de82c905b9e919314 22-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Minimize the number and kind of "external definitions" that the PCH
file needs to store. CodeGen needs to see these definitions (via
HandleTopLevelDecl), otherwise it won't be able to generate code for
them.

This patch notifies the consumer (e.g., CodeGen) about function
definitions and variable definitions when the corresponding
declarations are deserialized. Hence, we don't eagerly deserialize the
declarations for every variable or function that has a definition in
the PCH file. This gives another 5% speedup for the Carbon-prefixed
"Hello, World!", and brings our PCH statistics down to something far
more reasonable:

*** PCH Statistics:
13/20693 types read (0.062823%)
17/59230 declarations read (0.028702%)
54/44914 identifiers read (0.120230%)
0/32954 statements read (0.000000%)
5/6187 macros read (0.080815%)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
0af2ca4b6ddc788658069a0994941268ce250fc7 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Minimize the number and kind of "external definitions" that the PCH
file needs to store. CodeGen needs to see these definitions (via
HandleTopLevelDecl), otherwise it won't be able to generate code for
them.

This patch notifies the consumer (e.g., CodeGen) about function
definitions and variable definitions when the corresponding
declarations are deserialized. Hence, we don't eagerly deserialize the
declarations for every variable or function that has a definition in
the PCH file. This gives another 5% speedup for the Carbon-prefixed
"Hello, World!", and brings our PCH statistics down to something far
more reasonable:

*** PCH Statistics:
13/20693 types read (0.062823%)
17/59230 declarations read (0.028702%)
54/44914 identifiers read (0.120230%)
0/32954 statements read (0.000000%)
5/6187 macros read (0.080815%)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
da38c6ca35b4fb57a2638f0fa2bdf9226fa51ce9 22-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Lazy loading of builtins for precompiled headers.

PCH files now contain complete information about builtins, including
any declarations that have been synthesized as part of building the
PCH file. When using a PCH file, we do not initialize builtins at all;
when needed, they'll be found in the PCH file.

This optimization translations into a 9% speedup for "Hello, World!"
with Carbon.h as a prefix header and roughly a 5% speedup for 403.gcc
with its prefix header. We're also reading less of the PCH file for
"Hello, World!":

*** PCH Statistics:
286/20693 types read (1.382110%)
1630/59230 declarations read (2.751984%)
764/44914 identifiers read (1.701029%)
1/32954 statements read (0.003035%)
5/6187 macros read (0.080815%)

down from

*** PCH Statistics:
411/20693 types read (1.986179%)
2553/59230 declarations read (4.310316%)
1093/44646 identifiers read (2.448148%)
1/32954 statements read (0.003035%)
21/6187 macros read (0.339421%)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.h
lang/Frontend/PCHWriter.h
2deaea37a637dd01221d0cced343702a39d8132c 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Lazy loading of builtins for precompiled headers.

PCH files now contain complete information about builtins, including
any declarations that have been synthesized as part of building the
PCH file. When using a PCH file, we do not initialize builtins at all;
when needed, they'll be found in the PCH file.

This optimization translations into a 9% speedup for "Hello, World!"
with Carbon.h as a prefix header and roughly a 5% speedup for 403.gcc
with its prefix header. We're also reading less of the PCH file for
"Hello, World!":

*** PCH Statistics:
286/20693 types read (1.382110%)
1630/59230 declarations read (2.751984%)
764/44914 identifiers read (1.701029%)
1/32954 statements read (0.003035%)
5/6187 macros read (0.080815%)

down from

*** PCH Statistics:
411/20693 types read (1.986179%)
2553/59230 declarations read (4.310316%)
1093/44646 identifiers read (2.448148%)
1/32954 statements read (0.003035%)
21/6187 macros read (0.339421%)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.h
lang/Frontend/PCHWriter.h
fb65bfb53f9f9a9f00f129d0fb98f2b4c62a2318 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.
- This is only used by CGObjCRuntime now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a24357887dc2e6971fb84286be4484953565dc4d 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.
- This is only used by CGObjCRuntime now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b64206c5f93e51a1857706eeab24cf945491ef42 22-Apr-2009 Chris Lattner <sabre@nondot.org> ObjCQualifiedClass is dead, remove it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
068360e16fa4504a6fb80affebae5c5713629a96 22-Apr-2009 Chris Lattner <sabre@nondot.org> ObjCQualifiedClass is dead, remove it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Frontend/PCHBitCodes.h
9b9f23586594572ec4c581b15c883f2a84a44ff1 22-Apr-2009 Chris Lattner <sabre@nondot.org> pch support for protocol qualified id's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
d7a3fcd48cb308074cc95031252bc64966f0703d 22-Apr-2009 Chris Lattner <sabre@nondot.org> pch support for protocol qualified id's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
c49bbe72221ca7cde0d45c52ae6a72374b2d8529 22-Apr-2009 Chris Lattner <sabre@nondot.org> add three new objc expression types. @selector doesn't work because we have no
way to serialize selectors yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
3a57a3765b6192a94ff4e5997ae0489a1471b308 22-Apr-2009 Chris Lattner <sabre@nondot.org> add three new objc expression types. @selector doesn't work because we have no
way to serialize selectors yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
80f83c6f299e76871b6b4f63b20de18197cd0cdc 22-Apr-2009 Chris Lattner <sabre@nondot.org> implement serialization support for @encode,
fix a couple of bugs in reader support for ObjCInterfaceDecl,
and add support for reading ObjCInterfaceType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
4dcf151a555ff51e4d643e8e6eeb80f121d11d1b 22-Apr-2009 Chris Lattner <sabre@nondot.org> implement serialization support for @encode,
fix a couple of bugs in reader support for ObjCInterfaceDecl,
and add support for reading ObjCInterfaceType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Frontend/PCHBitCodes.h
37f477ebbb9755380e3d8849e6281d5239157431 22-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Reorganize built-in initialization to separate the creation of target builtins from marking IdentifierInfos as builtins. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
71dfdb9bc91b5d81b124e6091c903e4efd87149d 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Reorganize built-in initialization to separate the creation of target builtins from marking IdentifierInfos as builtins. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
be1ff27081f5dda61e46171ccdcd46970a173fae 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark another TypeForDecl const and make getObjCInterfaceType's argument const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Analysis/PathSensitive/MemRegion.h
3b3a45858c6b2a45114e91902c3bf3c4b7f5f302 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark another TypeForDecl const and make getObjCInterfaceType's argument const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
lang/Analysis/PathSensitive/MemRegion.h
11ac02512fb47e253ae0c72f7e3b60bb940aa960 22-Apr-2009 Chris Lattner <sabre@nondot.org> Fix some mishandling of the attr(gnu_inline) mode when used with
extern. Previously we would warn about it and ignore the attribute.
This is incorrect, it should be handled as a c89 "extern inline"
function. Many thanks to Matthieu Castet for pointing this out and
beating me over the head until I got it.

PR3988: extern inline function are not externally visible




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d55a71d852d4d8b785122b8d033a0c06b187067b 22-Apr-2009 Chris Lattner <sabre@nondot.org> Fix some mishandling of the attr(gnu_inline) mode when used with
extern. Previously we would warn about it and ignore the attribute.
This is incorrect, it should be handled as a c89 "extern inline"
function. Many thanks to Matthieu Castet for pointing this out and
beating me over the head until I got it.

PR3988: extern inline function are not externally visible




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e0ad2dd12bdb710fe5ae52da85066aba9e35d927 22-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Lazy deserialization of macro definitions for precompiled headers.

This optimization improves performance on the Carbon-prefixed "Hello,
World!" example by 57%. For reference, we're now about 2.25x faster
than GCC PCH. We're also pulling in far less of the PCH file:

*** PCH Statistics:
411/20693 types read (1.986179%)
2553/59230 declarations read (4.310316%)
1093/44646 identifiers read (2.448148%)
1/32954 statements read (0.003035%)
21/6187 macros read (0.339421%)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
37e2684abfe38207fdb90620da062bb18c23f29a 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Lazy deserialization of macro definitions for precompiled headers.

This optimization improves performance on the Carbon-prefixed "Hello,
World!" example by 57%. For reference, we're now about 2.25x faster
than GCC PCH. We're also pulling in far less of the PCH file:

*** PCH Statistics:
411/20693 types read (1.986179%)
2553/59230 declarations read (4.310316%)
1093/44646 identifiers read (2.448148%)
1/32954 statements read (0.003035%)
21/6187 macros read (0.339421%)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
d331e75761638e0fdb33d3531acc45988a60e8f1 22-Apr-2009 Mike Stump <mrs@apple.com> Tighten up blocks type checking. This was discussed back in the
r56595 timeframe, but left undone. Radar 6812711


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
25efa107ae8381458ffa464c5fc7d21135bbe52d 22-Apr-2009 Mike Stump <mrs@apple.com> Tighten up blocks type checking. This was discussed back in the
r56595 timeframe, but left undone. Radar 6812711


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c713da9e66dd3c47ee7b0011172e03b59ff02420 22-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Lazy deserialization of the declaration chains associated with
identifiers from a precompiled header.

This patch changes the primary name lookup method for entities within
a precompiled header. Previously, we would load all of the names of
declarations at translation unit scope into a large DenseMap (inside
the TranslationUnitDecl's DeclContext), and then perform a special
"last resort" lookup into this DeclContext when we knew there was a
PCH file (see Sema::LookupName). Now, when we see an identifier named
for the first time, we load all of the declarations with that name
that are visible from the translation unit into the IdentifierInfo's
chain of declarations. Thus, the explicit "look into the translation
unit's DeclContext" code is gone, and Sema effectively uses the same
IdentifierInfo-based name lookup mechanism whether we are using a PCH
file or not.

This approach should help PCH scale with the size of the input program
rather than the size of the PCH file. The "Hello, World!" application
with Carbon.h as a PCH file now loads 20% of the identifiers in the
PCH file rather than 85% of the identifiers.

90% of the 20% of identifiers loaded are actually loaded when we
deserialize the preprocessor state. The next step is to make the
preprocessor load macros lazily, which should drastically reduce the
number of types, declarations, and identifiers loaded for "Hello,
World".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Basic/IdentifierTable.h
lang/Basic/OnDiskHashTable.h
lang/Frontend/PCHReader.h
lang/Sema/ExternalSemaSource.h
lang/Sema/SemaConsumer.h
668c1a4fdcc56bdd050256b1688e116fe84b72db 22-Apr-2009 Douglas Gregor <dgregor@apple.com> Lazy deserialization of the declaration chains associated with
identifiers from a precompiled header.

This patch changes the primary name lookup method for entities within
a precompiled header. Previously, we would load all of the names of
declarations at translation unit scope into a large DenseMap (inside
the TranslationUnitDecl's DeclContext), and then perform a special
"last resort" lookup into this DeclContext when we knew there was a
PCH file (see Sema::LookupName). Now, when we see an identifier named
for the first time, we load all of the declarations with that name
that are visible from the translation unit into the IdentifierInfo's
chain of declarations. Thus, the explicit "look into the translation
unit's DeclContext" code is gone, and Sema effectively uses the same
IdentifierInfo-based name lookup mechanism whether we are using a PCH
file or not.

This approach should help PCH scale with the size of the input program
rather than the size of the PCH file. The "Hello, World!" application
with Carbon.h as a PCH file now loads 20% of the identifiers in the
PCH file rather than 85% of the identifiers.

90% of the 20% of identifiers loaded are actually loaded when we
deserialize the preprocessor state. The next step is to make the
preprocessor load macros lazily, which should drastically reduce the
number of types, declarations, and identifiers loaded for "Hello,
World".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Basic/IdentifierTable.h
lang/Basic/OnDiskHashTable.h
lang/Frontend/PCHReader.h
lang/Sema/ExternalSemaSource.h
lang/Sema/SemaConsumer.h
4d107bccf19ce4a94f3efba4c853f4f85e48c9a9 22-Apr-2009 Chris Lattner <sabre@nondot.org> this is a warning now, return a well formed ast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5b54b88c4082bb81b8b341b622fda9a85cbd5fad 22-Apr-2009 Chris Lattner <sabre@nondot.org> this is a warning now, return a well formed ast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4c91a40f3c880d0e1c5a676db48dee8e0e6d8830 21-Apr-2009 Ted Kremenek <kremenek@apple.com> Refactor 'BasicStoreManager::CastRegion' and 'RegionStoreManager::CastRegion'
into StoreManager::CastRegion. Both methods were practically identical, and this
is core logic that is common to all StoreManagers since it defines the basic
invariants of the abstract memory model.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
c62abc1012feb0b15eff091b02c176649766a347 21-Apr-2009 Ted Kremenek <kremenek@apple.com> Refactor 'BasicStoreManager::CastRegion' and 'RegionStoreManager::CastRegion'
into StoreManager::CastRegion. Both methods were practically identical, and this
is core logic that is common to all StoreManagers since it defines the basic
invariants of the abstract memory model.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
afb4c2a2718f3f41d24f62979ff5c72cfaf8c956 21-Apr-2009 Chris Lattner <sabre@nondot.org> temporarily downgrade to a warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f365d5b3b3e27129443cca7ca64b0f849910b574 21-Apr-2009 Chris Lattner <sabre@nondot.org> temporarily downgrade to a warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
51ba3b8da2cd039ab20c2d24b432295479f64703 21-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose use of objc's @defs in nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0468fb99068c40990a3b1451938fee5b90daf941 21-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose use of objc's @defs in nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
398efb58c66291f72259289385374731380ecafa 21-Apr-2009 Ted Kremenek <kremenek@apple.com> Recommit 69694 but this time also include the header changes (sorry for breaking
the build).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
72e032004b0d2c2c298e8e4f7027f23a21c0cc7d 21-Apr-2009 Ted Kremenek <kremenek@apple.com> Recommit 69694 but this time also include the header changes (sorry for breaking
the build).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69702 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
e1127c4fa41b0ccc7fa5777aa6ba866549fb0aa2 21-Apr-2009 Chris Lattner <sabre@nondot.org> reject sizeof(itf) when itf is a forward declared interface, or when
in non-fragile abi mode. rdar://6811884


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ca790923930ca8df23bc1473fe925586e27387a6 21-Apr-2009 Chris Lattner <sabre@nondot.org> reject sizeof(itf) when itf is a forward declared interface, or when
in non-fragile abi mode. rdar://6811884


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9cdb4a1f7769e97892b7b6ccb54b6f6914cd29ae 21-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Explictly track tentative definitions within Sema, then hand those
tentative definitions off to the ASTConsumer at the end of the
translation unit.

Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.

Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
b6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2 21-Apr-2009 Douglas Gregor <dgregor@apple.com> Explictly track tentative definitions within Sema, then hand those
tentative definitions off to the ASTConsumer at the end of the
translation unit.

Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.

Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
97b53bda541230096b4966b4ae44d02b1756dad5 21-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for most of DeclObjC.h. Very close to reading/writing all ObjC AST nodes that we will encounter in header files (still a few FIXME's).

Once selector support is in place, we should be able to take this for a spin (and add test cases).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
30833f8d77c08f8f16371776fde85a9fde3d9b6e 21-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for most of DeclObjC.h. Very close to reading/writing all ObjC AST nodes that we will encounter in header files (still a few FIXME's).

Once selector support is in place, we should be able to take this for a spin (and add test cases).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
08d892fa735a012d19ebf06c24a9aa53e341ab25 21-Apr-2009 Chris Lattner <sabre@nondot.org> implement semantic analysis for @synchronized, fixing a crash on invalid
rdar://6810940 - @synchronized has no sema checks


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a868a203a18571d091e5d226f5f100d4440f3d94 21-Apr-2009 Chris Lattner <sabre@nondot.org> implement semantic analysis for @synchronized, fixing a crash on invalid
rdar://6810940 - @synchronized has no sema checks


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3f3d40ed12bf642798b8f8f2c02ccb606020c819 21-Apr-2009 Chris Lattner <sabre@nondot.org> add support for goto checking and @synchronized blocks,
rdar://6810106


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
46c3c4ba78766ac0f1c5ec631b424773e21f5271 21-Apr-2009 Chris Lattner <sabre@nondot.org> add support for goto checking and @synchronized blocks,
rdar://6810106


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
94269d741940b43053feb62986cf97a487032829 21-Apr-2009 Chris Lattner <sabre@nondot.org> Split preprocessor initialization logic out of clang-cc into
libfrontend. Patch by Alexei Svitkine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
e116ccf140b813ecd20e3fb4041d7d0b8a967c0b 21-Apr-2009 Chris Lattner <sabre@nondot.org> Split preprocessor initialization logic out of clang-cc into
libfrontend. Patch by Alexei Svitkine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/InitPreprocessor.h
13bac9ed8736c3d07fd47bf6fb78c62681995c58 21-Apr-2009 Chris Lattner <sabre@nondot.org> rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Temporarily accept both of them, I'll rip out the old one after awhile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
182e09240a33c6f1d303deecabec6e0e9c9d109d 21-Apr-2009 Chris Lattner <sabre@nondot.org> rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Temporarily accept both of them, I'll rip out the old one after awhile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
556d1c28b3182d84cd1a5acf079858733cadbdcb 21-Apr-2009 Chris Lattner <sabre@nondot.org> downgrade from extwarn to warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69660 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
ce84c16a9560b424d109e74126e45f99c6a08fcd 21-Apr-2009 Chris Lattner <sabre@nondot.org> downgrade from extwarn to warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69660 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
ca97af8f196cae612198ecfd283f48c283f912bd 21-Apr-2009 Chris Lattner <sabre@nondot.org> improve MacroInfo to track the source range of the macro definition,
patch by Alexei Svitkine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
2451b528fe114595d0f10ef2c05047928558ab0f 21-Apr-2009 Chris Lattner <sabre@nondot.org> improve MacroInfo to track the source range of the macro definition,
patch by Alexei Svitkine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
4b4e1eb946dcdd1df1111ade301886f87e9022b0 21-Apr-2009 Chris Lattner <sabre@nondot.org> add a preprocessor callback function for #undef, patch by
Alexei Svitkine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
41c17473e3ece9e60d97c5d9397866b7730cf7ee 21-Apr-2009 Chris Lattner <sabre@nondot.org> add a preprocessor callback function for #undef, patch by
Alexei Svitkine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
350edcf8219cfcf5392522f795bfc190ade02f8d 21-Apr-2009 Anders Carlsson <andersca@mac.com> Add a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
19d28a650ca6d98f7907ad891557fccca7baaea8 21-Apr-2009 Anders Carlsson <andersca@mac.com> Add a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
6678aacfd5bfaa90a0be90f76ca678db13e3a1b1 21-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Use an APInt of target int size to detect overflow while parsing multichars.
So 'abc' on i16 platforms will warn but not on i32 platforms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
4bc11af9bed1d4a247e3db1fcb754d410ad99099 21-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Use an APInt of target int size to detect overflow while parsing multichars.
So 'abc' on i16 platforms will warn but not on i32 platforms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
9373ea65895ec7b047211ea999079a05dfed19b0 21-Apr-2009 Anders Carlsson <andersca@mac.com> Add the beginnings of a CXXTempVarDecl class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
86fa7502706b993ebbe5b5be147604c3bed0fcad 21-Apr-2009 Anders Carlsson <andersca@mac.com> Add the beginnings of a CXXTempVarDecl class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
f5254bda2945bd427acad4a0f0f62026333b66ce 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
525c9b7baeeff022127cd1b167579f3bda73b3ed 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7ff82e7e864ca1825cef56a84b80a7999aa70316 21-Apr-2009 Mike Stump <mrs@apple.com> Fixup codegen for write barriers for block variables. Radar 6786715


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/DeclSpec.h
75b163f4c832696edf4d66d8ac1ec0ed5ea59e17 21-Apr-2009 Mike Stump <mrs@apple.com> Fixup codegen for write barriers for block variables. Radar 6786715


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/DeclSpec.h
4bcc73af80ea01c73079f1f08cffdb0fca8fc476 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark TypeForDecl mutable.
- Let the const propogation begin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3bfb885583f8816bf296b61c5886b97a81158bab 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark TypeForDecl mutable.
- Let the const propogation begin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ff9a6098a9ae0ccd6ef60b0cb8fcee9caa5b0a42 20-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Write the identifier table into the PCH file as an on-disk hash table
that also includes the contents of the IdentifierInfo itself (the
various fields and flags, along with the chain of identifiers visible
at the top level that have that name).

We don't make any use of the hash table yet, except that our
identifier ID -> string mapping points into the hash table now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
3251ceb90b3fec68e86d6dcfa58836e20a7205c3 20-Apr-2009 Douglas Gregor <dgregor@apple.com> Write the identifier table into the PCH file as an on-disk hash table
that also includes the contents of the IdentifierInfo itself (the
various fields and flags, along with the chain of identifiers visible
at the top level that have that name).

We don't make any use of the hash table yet, except that our
identifier ID -> string mapping points into the hash table now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
59f28e9c704f31430f9670572fd04417f12ca4dc 20-Apr-2009 Steve Naroff <snaroff@apple.com> Fix spelling error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
28e71cf851b73a67604735a9a95aef800b144e2e 20-Apr-2009 Steve Naroff <snaroff@apple.com> Fix spelling error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7333b4925d5032304792f8b0a268549bbbc3a6ef 20-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl.

Next step: Add selector support to PCHWriter::AddDeclarationName().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
33feeb019a5742b286eededd5446ec0fe87c5a61 20-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl.

Next step: Add selector support to PCHWriter::AddDeclarationName().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
15ce6cc75018b69a2fc849c9ee5bceb30e0e67c1 20-Apr-2009 Chris Lattner <sabre@nondot.org> the __gnuc_inline__ attribute is actually named __gnu_inline__,
PR4023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
cf2a7211b4785068c7efa836baab90b198a4d2a6 20-Apr-2009 Chris Lattner <sabre@nondot.org> the __gnuc_inline__ attribute is actually named __gnu_inline__,
PR4023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/AttributeList.h
ac896d6f7a1167948262414f22d967fbf67f386c 20-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Allow the Info type used in the on-disk hash table generator to have state

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
24022803af76734534d7b506137142d8df5b457d 20-Apr-2009 Douglas Gregor <dgregor@apple.com> Allow the Info type used in the on-disk hash table generator to have state

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
cfe5157a5e74dbaa8d7c018c7b41dca582f21b61 20-Apr-2009 Chris Lattner <sabre@nondot.org> clean up anonymous bitfield diagnostics, PR4017


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
df9bcd568c79779d92b2f8d04a24ca822c56523d 20-Apr-2009 Chris Lattner <sabre@nondot.org> clean up anonymous bitfield diagnostics, PR4017


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
87887da76ef2e4c5d22ce9bb45623b6b9a24cf19 20-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce the notion of a SemaConsumer, which is an ASTConsumer that
also gets access to the Sema object performing semantic analysis. This
will be used by the PCH writer to serialize Sema state.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Frontend/PCHWriter.h
lang/Sema/SemaConsumer.h
e7785040107266d01ebdcc066365f70b7ace371f 20-Apr-2009 Douglas Gregor <dgregor@apple.com> Introduce the notion of a SemaConsumer, which is an ASTConsumer that
also gets access to the Sema object performing semantic analysis. This
will be used by the PCH writer to serialize Sema state.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Frontend/PCHWriter.h
lang/Sema/SemaConsumer.h
79ea0e0d94f7bbe2f26ac0eaf995e420bb7298c9 20-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for ObjCMethodDecl.

Test will be enabled with ObjCInterfaceDecl is added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
53c9d8a4b8f0a76cb9dd2fdd8c433ccf110f2eec 20-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for ObjCMethodDecl.

Test will be enabled with ObjCInterfaceDecl is added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Frontend/PCHBitCodes.h
5271586cd31409625617b202d9401407ffef17c6 20-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Make the on-disk hash table usable with non-file
raw_ostreams. Requires LLVM r69583.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
3432fa591ca896e5828bbcc83807353b9b6fba2b 20-Apr-2009 Douglas Gregor <dgregor@apple.com> Make the on-disk hash table usable with non-file
raw_ostreams. Requires LLVM r69583.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
4e58a6d2fe2cac2f743c9f54e7c22f8f47a07ac5 20-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Move the on-disk hash table code into its own header. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
9378ba44b3f46d697653003c784be87746e138d2 20-Apr-2009 Douglas Gregor <dgregor@apple.com> Move the on-disk hash table code into its own header. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OnDiskHashTable.h
701c850caafa406bf8217cbeb32ee8d6da34b2b3 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make FieldDecl parameter to getObjCEncodingForType... const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
153bfe5795e2c1a5a738e73d3784964e082237fc 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make FieldDecl parameter to getObjCEncodingForType... const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c5d0d047367ebacf27b7300ab11de11999bd5dd3 20-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove loc::FuncVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
5cbe5f9105eae5968229fa2d82fc258e61e27153 20-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove loc::FuncVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
8f56a6dad89b550b3517c34336fad5bcce9cc09e 20-Apr-2009 Chris Lattner <sabre@nondot.org> Add option groups for -Wimplicit-int and -Wimplicit.
remove special case hack for -Werror-implicit-function-declaration



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
9da8a683f29a1780f1e0e59d392affedb759bb14 20-Apr-2009 Chris Lattner <sabre@nondot.org> Add option groups for -Wimplicit-int and -Wimplicit.
remove special case hack for -Werror-implicit-function-declaration



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
cac107ad72067922b197790a0183d1dadfbdae37 20-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> get a CodeTextRegion when visiting FunctionDecl reference.
get FunctionDecl with more general utility method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
369f447eded97e6048ced02c0c2be3842f61fc1c 20-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> get a CodeTextRegion when visiting FunctionDecl reference.
get FunctionDecl with more general utility method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
6092d38bffc21b223742e42b6c06a8fe78494c25 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Hook up -Wunused-value to the unused expression warning. This is
useful for macro-heavy codebases that tend to trigger this warning a
lot.

Note that a make clean is required to get the option working; the
dependencies for DiagnosticGroups.inc appear to be broken.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
0272b56daef094f74613c7838f48de8ebd1c6e79 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Hook up -Wunused-value to the unused expression warning. This is
useful for macro-heavy codebases that tend to trigger this warning a
lot.

Note that a make clean is required to get the option working; the
dependencies for DiagnosticGroups.inc appear to be broken.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f0587c6ee2d465d64c0f64fda81cfb665f400a43 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove non-const form of lookupFieldDeclForIvar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
60952f94cf67ddb566600434857cad7a48264c3b 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove non-const form of lookupFieldDeclForIvar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5dd80064fc52268f96d03a28d474ab1156517355 20-Apr-2009 Chris Lattner <sabre@nondot.org> implement "#pragma GCC diagnostic". Besides being a nice feature, this
will let us test for multiple different warning modes in the same
file in regression tests.

This implements rdar://2362963, a 10-year old feature request :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
edaf877d2469147ba818187a3e57a00b3f73b123 20-Apr-2009 Chris Lattner <sabre@nondot.org> implement "#pragma GCC diagnostic". Besides being a nice feature, this
will let us test for multiple different warning modes in the same
file in regression tests.

This implements rdar://2362963, a 10-year old feature request :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
9b343070dcd19f948a392caf8a1b6cd8ed0a8b8d 20-Apr-2009 Chris Lattner <sabre@nondot.org> move group twiddling options into Diagnostic.cpp instead of
Warnings.cpp. Warnings.cpp now doesn't need to #include
tblgen produced output directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
3bc172bc6a787842db6fea351cf6929539fca70d 20-Apr-2009 Chris Lattner <sabre@nondot.org> move group twiddling options into Diagnostic.cpp instead of
Warnings.cpp. Warnings.cpp now doesn't need to #include
tblgen produced output directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
fa661e0578bb7e6a5b60afd48b01e113383c48ac 19-Apr-2009 Chris Lattner <sabre@nondot.org> Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't
support it. I don't know what evaluation method we use for complex
arithmetic, so I don't know whether/if we should warn about use of
CX_LIMITED_RANGE.

This concludes my planned hacking on STDC pragmas, flame away :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
4d8aac3778b40c161bed9964125948ee01c08821 19-Apr-2009 Chris Lattner <sabre@nondot.org> Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't
support it. I don't know what evaluation method we use for complex
arithmetic, so I don't know whether/if we should warn about use of
CX_LIMITED_RANGE.

This concludes my planned hacking on STDC pragmas, flame away :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
6f7bb267206298ab332bb8ec207193024595eafb 19-Apr-2009 Chris Lattner <sabre@nondot.org> diagnose invalid syntax of STDC pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
6c5cf4a2e234923ab66127de0874a71cb6bfdd83 19-Apr-2009 Chris Lattner <sabre@nondot.org> diagnose invalid syntax of STDC pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
b34382785e1b8bafe77e52998e11a9bc0e7daad3 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Print an error for uses of __thread on targets which don't support it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4fb71b0cc3c199cc0c736b4ec4fabdd01f56f4e8 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Print an error for uses of __thread on targets which don't support it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8f5751758930cdecf2768a506c1614df44a598ea 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Add target property for whether thread-local storage is supported.
Let me know if I messed up for some target. Note that for Windows, we
should be able to support it (MSVC supports "__declspec(thread)"), but
I'm pretty sure LLVM doesn't know how to generate the correct code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
b030f0272500c6c5602f587ac029ee0dc0e5a05c 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Add target property for whether thread-local storage is supported.
Let me know if I messed up for some target. Note that for Windows, we
should be able to support it (MSVC supports "__declspec(thread)"), but
I'm pretty sure LLVM doesn't know how to generate the correct code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
cc848420d12e5f670b908f6d71fde498d36632be 19-Apr-2009 Chris Lattner <sabre@nondot.org> reject invalid stuff in the STDC namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
f545be5552b6fd40a4c766fbf82dab0ab5305790 19-Apr-2009 Chris Lattner <sabre@nondot.org> reject invalid stuff in the STDC namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
ca63e1c0301e1abeabf77b9ae36f429e7072b764 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward f[no-]dollars-in-identifiers to clang, when specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
7695fba30221613b7cf31276456217c41bb90960 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward f[no-]dollars-in-identifiers to clang, when specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d65e0141a566fdef42f9be21026148f41cab0f4c 19-Apr-2009 Chris Lattner <sabre@nondot.org> basic support for -Wunknown-pragmas, more coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
af7cdf45da4925f788e87a4c318ee67404646088 19-Apr-2009 Chris Lattner <sabre@nondot.org> basic support for -Wunknown-pragmas, more coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
4bd8a7ff789dbaf423fb1bd7e9754495344bdc04 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward -fno-diagnostics-fixit-info to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
49138fc59eeac2aacd3b7e04c2642180d5baefd7 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward -fno-diagnostics-fixit-info to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
1a3e74ccb00a3b0e61cf8debec8a20d274ab031f 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Add more thorough/correct checking for invalid __thread specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
63054b39a27ff333487e88247d495a444838b44a 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Add more thorough/correct checking for invalid __thread specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
041bd734664c2ce26c8c1fbf7c0403309dd0764b 19-Apr-2009 Chris Lattner <sabre@nondot.org> implement compiler support for -fno-diagnostics-fixit-info,
rdar://6805442


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
aa5bf2e8dc01f9835efef76222dc440a5c18b160 19-Apr-2009 Chris Lattner <sabre@nondot.org> implement compiler support for -fno-diagnostics-fixit-info,
rdar://6805442


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
a2eb46453acb0578d4bf6a4f455383031bf79df7 19-Apr-2009 Chris Lattner <sabre@nondot.org> second half of indirect jump checking: make sure that any
address taken labels are in function scope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b5cf1ea6f410f72290b9c7767a63717a944c7a8f 19-Apr-2009 Chris Lattner <sabre@nondot.org> second half of indirect jump checking: make sure that any
address taken labels are in function scope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
578689d178efcaf8ece43554c1bdd6e8abf28372 19-Apr-2009 Chris Lattner <sabre@nondot.org> First half of jump scope checking for indirect goto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
04ea2b633a1f8ee662b8a99d2903a11c1b68e1ed 19-Apr-2009 Chris Lattner <sabre@nondot.org> First half of jump scope checking for indirect goto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9ef9c284e6791a48278b3b76cfa85b05cc0c5a20 19-Apr-2009 Chris Lattner <sabre@nondot.org> Add location info for indirect goto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ad56d684259f706b7c0ae5ad9c23adb4f2926817 19-Apr-2009 Chris Lattner <sabre@nondot.org> Add location info for indirect goto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
218c7abd63c51aa2e8a15524319b4f510cfca3d9 19-Apr-2009 Chris Lattner <sabre@nondot.org> add a new Lexer::SkipEscapedNewLines method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
033749571f8d4c804eeb357c70b06424aa24503b 19-Apr-2009 Chris Lattner <sabre@nondot.org> add a new Lexer::SkipEscapedNewLines method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
f5ae880a433437e9447afda709556959df61cc40 19-Apr-2009 Chris Lattner <sabre@nondot.org> factor escape newline measuring out into its own helper function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
24f0e48c0aa62f2268e061aad70f9b19a59e7b52 19-Apr-2009 Chris Lattner <sabre@nondot.org> factor escape newline measuring out into its own helper function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
0ec3c6ad603fb0128360c59e7bad8cc1118bd33e 18-Apr-2009 Chris Lattner <sabre@nondot.org> reject invalid jumps among pieces of @try blocks. This seems to work
reasonably well except for the problem that @catches are nested within
each other in the AST, giving the ugly diagnostics in L8.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
07e775d5a1d5262a9cfe1ff333af713535b8cbab 18-Apr-2009 Chris Lattner <sabre@nondot.org> reject invalid jumps among pieces of @try blocks. This seems to work
reasonably well except for the problem that @catches are nested within
each other in the AST, giving the ugly diagnostics in L8.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.td
6c892e4acce59e8caeccaf69e08dd4449870e3f5 18-Apr-2009 Anders Carlsson <andersca@mac.com> Add functions for iterating over the argument types of an ObjCMethodDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6ea8e2152e1ba93b4c80e7268403a582896dc3dc 18-Apr-2009 Anders Carlsson <andersca@mac.com> Add functions for iterating over the argument types of an ObjCMethodDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2c8f7ce1c7bf941ba219bfef249e44084c0b0f9b 18-Apr-2009 Chris Lattner <sabre@nondot.org> Improve switch diagnostic to emit the "jump" message on the
specific bad case instead of on the switch. Putting it on the
switch means you don't know what case is the problem. For
example:

scope-check.c:54:3: error: illegal switch case into protected scope
case 2:
^
scope-check.c:53:9: note: jump bypasses initialization of variable length array
int a[x];
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a9768b72bb5ea061c9f10d6aa51b3be3241f3ec2 18-Apr-2009 Chris Lattner <sabre@nondot.org> Improve switch diagnostic to emit the "jump" message on the
specific bad case instead of on the switch. Putting it on the
switch means you don't know what case is the problem. For
example:

scope-check.c:54:3: error: illegal switch case into protected scope
case 2:
^
scope-check.c:53:9: note: jump bypasses initialization of variable length array
int a[x];
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
69a480e7fedc19bb8fb33db261bc1e36100e9246 18-Apr-2009 Chris Lattner <sabre@nondot.org> first step to getting switches giving "jump into vla scope" errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
366920a45e3e278d35cbc3bc74d9d0676ae87dfe 18-Apr-2009 Chris Lattner <sabre@nondot.org> first step to getting switches giving "jump into vla scope" errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
930cc9adca0effdf3586012fa6916254b21f8e3f 18-Apr-2009 Chris Lattner <sabre@nondot.org> improve wording of scope violation error messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
5ce71c99cf00f24f876548d7f0dd0eefac47b168 18-Apr-2009 Chris Lattner <sabre@nondot.org> improve wording of scope violation error messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2b57963a5c0b7643ddf0382d7e674c791ad59abd 18-Apr-2009 Chris Lattner <sabre@nondot.org> more fun with line markers: the digit string is required to be interpreted
as decimal, even if it starts with 0. Also, since things like 0x1 are
completely illegal, don't even bother using numericliteralparser for them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
dc8c90da158030c0d0c62539e2da0adccc09f271 18-Apr-2009 Chris Lattner <sabre@nondot.org> more fun with line markers: the digit string is required to be interpreted
as decimal, even if it starts with 0. Also, since things like 0x1 are
completely illegal, don't even bother using numericliteralparser for them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
e44e5cc7af9dd85746abdb6397446f0565e9d9d6 18-Apr-2009 Chris Lattner <sabre@nondot.org> rewrite the goto scope checking code to be more efficient, simpler,
produce better diagnostics, and be more correct in ObjC cases (fixing
rdar://6803963).

An example is that we now diagnose:

int test1(int x) {
goto L;
int a[x];
int b[x];
L:
return sizeof a;
}

with:

scope-check.c:15:3: error: illegal goto into protected scope
goto L;
^
scope-check.c:17:7: note: scope created by variable length array
int b[x];
^
scope-check.c:16:7: note: scope created by variable length array
int a[x];
^

instead of just saying "invalid jump". An ObjC example is:

void test1() {
goto L;
@try {
L: ;
} @finally {
}
}

t.m:6:3: error: illegal goto into protected scope
goto L;
^
t.m:7:3: note: scope created by @try block
@try {
^

There are a whole ton of fixme's for stuff to do, but I believe that this
is a monotonic improvement over what we had.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a5251fcf79ae9707680d656377a6e43dcbff6c25 18-Apr-2009 Chris Lattner <sabre@nondot.org> rewrite the goto scope checking code to be more efficient, simpler,
produce better diagnostics, and be more correct in ObjC cases (fixing
rdar://6803963).

An example is that we now diagnose:

int test1(int x) {
goto L;
int a[x];
int b[x];
L:
return sizeof a;
}

with:

scope-check.c:15:3: error: illegal goto into protected scope
goto L;
^
scope-check.c:17:7: note: scope created by variable length array
int b[x];
^
scope-check.c:16:7: note: scope created by variable length array
int a[x];
^

instead of just saying "invalid jump". An ObjC example is:

void test1() {
goto L;
@try {
L: ;
} @finally {
}
}

t.m:6:3: error: illegal goto into protected scope
goto L;
^
t.m:7:3: note: scope created by @try block
@try {
^

There are a whole ton of fixme's for stuff to do, but I believe that this
is a monotonic improvement over what we had.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8c1d5fd953f214f47ca73a8b514b0baccfebd4c9 18-Apr-2009 Chris Lattner <sabre@nondot.org> add accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8f4e18fce5ef11a4e1bcb9dd7adcd2e20a21ef0a 18-Apr-2009 Chris Lattner <sabre@nondot.org> add accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
00b6c184715a0fa8e1af74b063f9cc05a9b60884 18-Apr-2009 Chris Lattner <sabre@nondot.org> __builtin_prefetch should be declared as "void __builtin_prefetch(const void *)",
not "const void __builtin_prefetch(void *)". This fixes PR3912.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
40c56f7129bdaf8a01e2ffe7ddde714a586eb45d 18-Apr-2009 Chris Lattner <sabre@nondot.org> __builtin_prefetch should be declared as "void __builtin_prefetch(const void *)",
not "const void __builtin_prefetch(void *)". This fixes PR3912.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
ac014be617010f3fe5c7d7a4cd4911b71aee83f9 18-Apr-2009 Chris Lattner <sabre@nondot.org> second half of PR3940: #line requires simple digit sequence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
bc81682756a2406e1788b14c576b3c8b515d97a3 18-Apr-2009 Chris Lattner <sabre@nondot.org> second half of PR3940: #line requires simple digit sequence.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
e01ad449597f9ae32fda68a1991ed1fd0bece9e3 18-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Store the type ID for __builtin_va_list in the PCH file, so that the
AST context's __builtin_va_list type will be set when the PCH file is
loaded. This fixes the crash when CodeGen'ing a va_arg expression
pulled in from a PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
ad1de006ea080b540e480efc6b86c2e201dbf1ec 18-Apr-2009 Douglas Gregor <dgregor@apple.com> Store the type ID for __builtin_va_list in the PCH file, so that the
AST context's __builtin_va_list type will be set when the PCH file is
loaded. This fixes the crash when CodeGen'ing a va_arg expression
pulled in from a PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
21d14d0db92940b316d2923bc8ef23280013ed60 18-Apr-2009 Chris Lattner <sabre@nondot.org> this is really just a recommendation, not a requirement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
d92fa477d54e42c1f0cf9a785b53659a638b8eeb 18-Apr-2009 Chris Lattner <sabre@nondot.org> this is really just a recommendation, not a requirement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
3c665db9c1af6ed5787ec2b7f31e5e6ea45d69b0 18-Apr-2009 Chris Lattner <sabre@nondot.org> enforce requirements imposed by C90 6.8 TC1, fixing PR3919.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
6272bcfe5dc148d293ccce9db19df9e71c991cde 18-Apr-2009 Chris Lattner <sabre@nondot.org> enforce requirements imposed by C90 6.8 TC1, fixing PR3919.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
95734503e030e934c4e082ee2ff44d7106bb8c7b 18-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Preliminary PCH support in the driver

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
df91ef3d6c55692a0236f67b6c6b134a3bf84098 18-Apr-2009 Douglas Gregor <dgregor@apple.com> Preliminary PCH support in the driver

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
3b9a7c8115604645e51bd272985603fa4f3c6d61 18-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Lazy deserialization of function bodies for PCH files. For the Carbon
"Hello, World!", this takes us from deserializing 6469
statements/expressions down to deserializing 1
statement/expression. It only translated into a 1% improvement on the
Carbon-prefixed 403.gcc, but (a) it's the right thing to do, and (b)
we expect this to matter more once we lazily deserialize identifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
250fc9c859fdeed3f200ae911a7e7ea338f38436 18-Apr-2009 Douglas Gregor <dgregor@apple.com> Lazy deserialization of function bodies for PCH files. For the Carbon
"Hello, World!", this takes us from deserializing 6469
statements/expressions down to deserializing 1
statement/expression. It only translated into a 1% improvement on the
Carbon-prefixed 403.gcc, but (a) it's the right thing to do, and (b)
we expect this to matter more once we lazily deserialize identifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
e3241e9ede65d127bd9e98fa29d8aa7546288434 18-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> FunctionDecl::getBody() is getting an ASTContext argument for use in
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
7297134f128423fce2e88f92421ed135bded7d4e 18-Apr-2009 Douglas Gregor <dgregor@apple.com> FunctionDecl::getBody() is getting an ASTContext argument for use in
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHReader.h
3e8b99c43069c25c1de5461543f2220cb0142696 18-Apr-2009 Chris Lattner <sabre@nondot.org> remove dead diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
95d0281798d837041272c4dbeed37b33ca0f2b0d 18-Apr-2009 Chris Lattner <sabre@nondot.org> remove dead diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
c042efff9868728a019f55a3cca1622725443451 18-Apr-2009 Chris Lattner <sabre@nondot.org> implement PR3940: #line numbers not fully checked


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
58e91d57510a5ce4fd424fe7fd1cdfa86701ef35 18-Apr-2009 Chris Lattner <sabre@nondot.org> implement PR3940: #line numbers not fully checked


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
882d285565daf61297ec8726283d3242e6c1cd3e 18-Apr-2009 Chris Lattner <sabre@nondot.org> #line is allowed to have macros that expand to nothing after them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ab82f41b217ce588a9456c0b4411f219d3ed0df8 18-Apr-2009 Chris Lattner <sabre@nondot.org> #line is allowed to have macros that expand to nothing after them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
456e095968a54d21f42ddbbc666e7afbeb2265b6 18-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of the number of statements/expressions written to and read
from a PCH file. It turns out that "Hello, World!" is bringing in 19%
of all of the statements in Carbon.h, so we need to be lazy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
3e1af84bb0092a1aafb49deaa4ab6664c9a9071b 18-Apr-2009 Douglas Gregor <dgregor@apple.com> Keep track of the number of statements/expressions written to and read
from a PCH file. It turns out that "Hello, World!" is bringing in 19%
of all of the statements in Carbon.h, so we need to be lazy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
5d231e397238feb9ea2f7e6903fbfdce0cde9dff 18-Apr-2009 Chris Lattner <sabre@nondot.org> tweak redefinition of a typedef a bit to fix a couple of problems:
1. We had logic in sema to decide whether or not to emit the error
based on manually checking whether in a system header file.
2. we were allowing redefinitions of typedefs in class scope in C++
if in header file.
3. there was no way to force typedef redefinitions to be accepted
by the C compiler, which annoys me when stripping linemarkers out
of .i files.

The fix is to split the C++ class typedef redefinition path from the
C path, and change the C path to be a warning that normally maps to
error. This causes it to properly be ignored in system headers,
etc. and gives us a way to control it. Passing
-Wtypedef-redefinition now turns the error into a warning.

One behavior change is that we now diagnose cases where you redefine
a typedef in your .c file that was defined in a header file. This
seems like reasonable behavior, and the diagnostic now indicates that
it can be controlled with -Wtypedef-redefinition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
32b06752d05630996b43c543c80796e1e16dadde 18-Apr-2009 Chris Lattner <sabre@nondot.org> tweak redefinition of a typedef a bit to fix a couple of problems:
1. We had logic in sema to decide whether or not to emit the error
based on manually checking whether in a system header file.
2. we were allowing redefinitions of typedefs in class scope in C++
if in header file.
3. there was no way to force typedef redefinitions to be accepted
by the C compiler, which annoys me when stripping linemarkers out
of .i files.

The fix is to split the C++ class typedef redefinition path from the
C path, and change the C path to be a warning that normally maps to
error. This causes it to properly be ignored in system headers,
etc. and gives us a way to control it. Passing
-Wtypedef-redefinition now turns the error into a warning.

One behavior change is that we now diagnose cases where you redefine
a typedef in your .c file that was defined in a header file. This
seems like reasonable behavior, and the diagnostic now indicates that
it can be controlled with -Wtypedef-redefinition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b9f636426bb01df0ab7e2216d2bbcb6cf12b3f07 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Fix two embarrassing PCH bugs:
1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator
2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s.

403.gcc builds and links properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
88c9a46f0b84f1ee83e01917825346551ee540d0 17-Apr-2009 Douglas Gregor <dgregor@apple.com> Fix two embarrassing PCH bugs:
1) Accidentally used delete [] on an array of statements that was allocated with ASTContext's allocator
2) Deserialization of names with multiple declarations (e.g., a struct and a function) used the wrong mangling constant, causing it to view declaration IDs as Decl*s.

403.gcc builds and links properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
3e1f9fb48943b37644188d83a59cc0bf4d666462 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for inline assembly statements.

This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
cd7d5a9dc558178ed7a66032f888781b3c592e4f 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for inline assembly statements.

This completes support for all of C (+ extensions). We can (again)
build a PCH file for Carbon.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
5f7937dc4f4b2513881265a8cb78f5629ad1fadc 17-Apr-2009 Chris Lattner <sabre@nondot.org> refactor htmldiags to be created up front like the other diag clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Frontend/PathDiagnosticClients.h
409d4e716a01a71c4fecfaec59ca8348c8a5d275 17-Apr-2009 Chris Lattner <sabre@nondot.org> refactor htmldiags to be created up front like the other diag clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Frontend/PathDiagnosticClients.h
2961dc55ecc216dce4bb45877dd6a16067a77fa5 17-Apr-2009 Chris Lattner <sabre@nondot.org> add a virtual method to DiagnosticClient to get rid of some fragile
casting in clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
40469651a3f8379dc0f32df69e9bade06a2aad36 17-Apr-2009 Chris Lattner <sabre@nondot.org> add a virtual method to DiagnosticClient to get rid of some fragile
casting in clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
e246b741a2f4b00a690b9e975201b7ced23f68cf 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for blocks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
84af7c27cdc615ff917a501d61256b4049383c97 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for blocks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
d33a0d6afa38bd128cf17ea23580fa8ebb98f27f 17-Apr-2009 Chris Lattner <sabre@nondot.org> wire up comment diagnostics to -Wcomment, add it to -Wall. Now
you can silence these with -Wno-all or -Wno-comment, but they
still default to on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
8705b4785a81a942d4633f1628bc0520b060b4e6 17-Apr-2009 Chris Lattner <sabre@nondot.org> wire up comment diagnostics to -Wcomment, add it to -Wall. Now
you can silence these with -Wno-all or -Wno-comment, but they
still default to on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticLexKinds.td
eca12f63c262ab4d44f40b966790c9155518b3ae 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for GNU statement expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
6a2dd55b0b3ae376d449a4b07bbb6b2d30b26330 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for GNU statement expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
95a8fe35717bf897cc9c0bcc47482a4ba3301120 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for indirect gotos and address-of-label expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
7d5c2f241c74e5f8d9ec492e8f9f268e5e9ae41f 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for indirect gotos and address-of-label expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
f9e757c38a35614303a564697c87ab4a0b6052a6 17-Apr-2009 Chris Lattner <sabre@nondot.org> move a vector conversion warning to be diabled by default (like gcc),
but add it to -Wall (unlike gcc) and give it a controlling group
(-Wvector-conversions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
71558924fc13d5b65f72cc9f3bd261c7214098a1 17-Apr-2009 Chris Lattner <sabre@nondot.org> move a vector conversion warning to be diabled by default (like gcc),
but add it to -Wall (unlike gcc) and give it a controlling group
(-Wvector-conversions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticSemaKinds.td
6e411bfd8bc304cf4746140e2ff51d243a564d27 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for labels and goto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
1de05feeeafe5b215fe7617594a7076a5192a6e2 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for labels and goto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
f2513a3ea74dbe4bb3b3e23da44534834857f39a 17-Apr-2009 Chris Lattner <sabre@nondot.org> add basic support for building DiagnosticGroups.inc with cmake


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
995533a10db296db77374df8d8a3b083f34e7230 17-Apr-2009 Chris Lattner <sabre@nondot.org> add basic support for building DiagnosticGroups.inc with cmake


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/CMakeLists.txt
78ff29fdafdbdf8fcf3de07337355aa99eb00cf2 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for declaration statements, and a test for PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
84f2170062014d268951902164bed0d8bdea0e82 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for declaration statements, and a test for PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
22d2dcd05c69e223587fa4f3ce3f356d1631007f 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for return statements.

Optimize PCH encoding for switch-case statements slightly, by making
the switch-case numbering local to a particular statement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
0de9d8857b715c2f45c987651f4ce06d73330d93 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for return statements.

Optimize PCH encoding for switch-case statements slightly, by making
the switch-case numbering local to a particular statement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
d316913addcd81dcae78bef3296ae2e624ec2b33 17-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement lvalue test for conditional expressions.
Add a few commented lines to the test case that point out things that don't work yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
76458501a8963fa11b91c9337a487de6871169b4 17-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement lvalue test for conditional expressions.
Add a few commented lines to the test case that point out things that don't work yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2ccf617abead15547573f284d4841cf1f3bd2f92 17-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Added -print-ivar-layout option. No change in functionality
yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
448f5e6c191b40c90a67c48547df420d16f48b96 17-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Added -print-ivar-layout option. No change in functionality
yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
39a10dbbffb3f5f06c9412b24d32a6c6563d0af1 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for the __has_trivial_destructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
072abefcddea5fb65e435cea60921b3c21c1279d 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for the __has_trivial_destructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
fb5f25baeb2fc7145db78312e05b9e34b39ec4e3 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for do-while and for loops

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
67d8249924ef38a5375ff9c92cd21c1854d6abab 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for do-while and for loops

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69334 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
a6b503f5f754f4c798ce80471cbcdf03a01205a3 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for while and continue statements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
d921cf976b4769af8d06d6763a2547dadf7940ab 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for while and continue statements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
9c4782a93e8963f9b180c851b00a5f3568a5918b 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for the first batch of statements, including null,
compound, case, default, if, switch, and break statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
025452fa0eda63e150cfaeebe64f0a19c96b3a06 17-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for the first batch of statements, including null,
compound, case, default, if, switch, and break statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
6a51bb864f69fdd310f475adcd5e5d75b8789bf0 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add constructor getter to CXXTemporaryObjectExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
d87a5012d174ae5aa076b3fa800aecf55d70bac4 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add constructor getter to CXXTemporaryObjectExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
11ee7dd154bd9d5201df579de85aa832ce20c0c6 17-Apr-2009 Chris Lattner <sabre@nondot.org> -Wall is -Wmost -Wparentheses



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
b00ac07d2582b8bd32b61478970e10a1524b0298 17-Apr-2009 Chris Lattner <sabre@nondot.org> -Wall is -Wmost -Wparentheses



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
c72f6c80b9e2f14ecff2f30ad6f8ba2f8906d17d 17-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Prepare PCH reader and writer for (de-)serialization of statements. No
functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
c9490c000f515c29f200a1215328d8ab9a0f3818 17-Apr-2009 Douglas Gregor <dgregor@apple.com> Prepare PCH reader and writer for (de-)serialization of statements. No
functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
bd26196393e625829ded9aab83e56c39b65c9ed0 16-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/OperatorKinds.def
3201f6beec688ab9fe8750527e28f52d5420e22d 16-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/OperatorKinds.def
77c7d34ab7344a7cb55595cdbc38bc9febe6b11f 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Pass -fdiagnostics-show-option to clang-cc by default.
- <rdar://problem/6796848> implement -fdiagnostics-show-option


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
9e820ee054fefe5422b4db3f681e567a8976747e 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Pass -fdiagnostics-show-option to clang-cc by default.
- <rdar://problem/6796848> implement -fdiagnostics-show-option


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d9c0d24ed777c33ccbe2ba5fecf4acd0f6413966 16-Apr-2009 Chris Lattner <sabre@nondot.org> other half of 69274



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
56dc97a8f27016775f3b2279af42bea1dd492617 16-Apr-2009 Chris Lattner <sabre@nondot.org> other half of 69274



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
cab574ff191f66ef5541c8cdb459c3f7946bd651 16-Apr-2009 Chris Lattner <sabre@nondot.org> split diagnostic group definitions out into their own file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticOptions.td
lang/Basic/Makefile
11bddefe100d439b61cff2d592fa167b7e778ae1 16-Apr-2009 Chris Lattner <sabre@nondot.org> split diagnostic group definitions out into their own file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticGroups.td
lang/Basic/DiagnosticOptions.td
lang/Basic/Makefile
8ee040e4581ec7530eae4b689ab7a4a9c9ce9bbd 16-Apr-2009 Chris Lattner <sabre@nondot.org> tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
19cbb44e3c4f2181dafa2ab92d3e3a26619b71d9 16-Apr-2009 Chris Lattner <sabre@nondot.org> tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
a96ec3bcfecbf4d1a9b4b6523060eb591a905810 16-Apr-2009 Chris Lattner <sabre@nondot.org> implement framework for -fdiagnostics-show-option, but tblgen isn't
passing down the right info yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
d51d74a3e89c5e5fc9bfd2814996a5feab6dc932 16-Apr-2009 Chris Lattner <sabre@nondot.org> implement framework for -fdiagnostics-show-option, but tblgen isn't
passing down the right info yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Frontend/TextDiagnosticPrinter.h
85b1ac8086b3ceaf6602590c5bb0236150ae0d7c 16-Apr-2009 Chris Lattner <sabre@nondot.org> move handling of -pedantic and -pedantic-errors into Diagnostics,
out of Warnings.cpp. This simplifies warnings.cpp and makes it more
efficient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b54b276a920246c595a0498da281821eb9d22996 16-Apr-2009 Chris Lattner <sabre@nondot.org> move handling of -pedantic and -pedantic-errors into Diagnostics,
out of Warnings.cpp. This simplifies warnings.cpp and makes it more
efficient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
8444dd14fb028ecd77751405c8be4ea8686ce6f1 16-Apr-2009 Chris Lattner <sabre@nondot.org> arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
2b07d8fe9e8a8ba12d64066632e17a9a5308a12e 16-Apr-2009 Chris Lattner <sabre@nondot.org> arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
0958cff64be2a6fa11889c64ae54944b85912bce 16-Apr-2009 Chris Lattner <sabre@nondot.org> change mappings to distinguish between "unset", "set by the user" and
"set to the default value".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
691f1ae7164ba78c3dd7ac20c487399935b9544b 16-Apr-2009 Chris Lattner <sabre@nondot.org> change mappings to distinguish between "unset", "set by the user" and
"set to the default value".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
00d3c7987125945b112779784cb8519de47afdb5 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Remove the majority of -W* options, the driver doesn't
generally need to know about these now we don't have to hold
clang-cc's hand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
e5ca82f20860797b5238d0a67f5ed00281370f7a 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Remove the majority of -W* options, the driver doesn't
generally need to know about these now we don't have to hold
clang-cc's hand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
0e9eeea74fa74cc4120dfaa1c7f588a9c99de64a 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -W* to clang, it can handle all these itself now.

Remove clang_W_Group and clang_ignored_W_Group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
06ef3c3e9be4923b8e29c8e267b0c56afaa14ff3 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -W* to clang, it can handle all these itself now.

Remove clang_W_Group and clang_ignored_W_Group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
fe7d902badef88957acc4652baeba2e7497e00e0 16-Apr-2009 Chris Lattner <sabre@nondot.org> switch DiagMappings *back* to 4 bits per diag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
e29cc89f82261ad899791f47d1c1d9ef91e172b6 16-Apr-2009 Chris Lattner <sabre@nondot.org> switch DiagMappings *back* to 4 bits per diag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
28d6d3f8d90d991fc8fb78de251e1a13240a79e0 16-Apr-2009 Chris Lattner <sabre@nondot.org> implement -Wno-#warnings etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
6ac9ffc9f0c07671211484385ab00e4337f27895 16-Apr-2009 Chris Lattner <sabre@nondot.org> implement -Wno-#warnings etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
ceb004d789eb5057182c35d399bbde104dec2fc3 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate pch::TYPE_ATTR, which is never used

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
63f5c2646e75041277657aa1392a5bdd643367a7 16-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate pch::TYPE_ATTR, which is never used

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
b70b48fec5bfeef402757d6ca8034ff879d52a66 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for CompoundLiteralExpr. This is the last C expression
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
ba6d7e7fa5f79959d3eef39adb5620d845ba5198 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for CompoundLiteralExpr. This is the last C expression
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
6710a3cb6c5ecf9a10f118028aac70bffbc42a67 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
d077d759d0c7fceee98f4e77b6423a3f11cfc849 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
2b10743b92e831d19ea39b038d3af55821150f75 16-Apr-2009 Chris Lattner <sabre@nondot.org> add scafolding to represent heirarchical warnings, start with -Wall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
bc583a0e02c39cc84c1392fa89cca8b62b79c3de 16-Apr-2009 Chris Lattner <sabre@nondot.org> add scafolding to represent heirarchical warnings, start with -Wall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
c636371070a906200e74097d5d940c9e29500d11 16-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for the __has_trivial_constructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
347ba89dec89091868982434154c3508085b727a 16-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for the __has_trivial_constructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
725e94b56fd3a575a687ef6aedcb28d8fb614904 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for ShuffleVectorExpr and BlockDeclRefExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
94cd5d1397bb1a8bcd109602aa38dd787b164c22 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ShuffleVectorExpr and BlockDeclRefExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
209d4621adeb4554b5e64a05d53c2fe40b0061d9 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
44cae0c8669cdf83618cbe7fd36ea7a8e51cf97f 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
ec0b8294b6a1a71300f08b0485ba370d4952ee73 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for ExtVectorElementExpr and VAArgExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
d3c98a02c73417689deaaa6671ea6df7f2a8a73c 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ExtVectorElementExpr and VAArgExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
ab98e2fbb6971f7aedf25ad9858b6fb29084f416 16-Apr-2009 Chris Lattner <sabre@nondot.org> add anonymous groups for all the warning command line flags that the clang
driver accepts and discards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
5b43098e90df2822612e9d57380e3228f1becf15 16-Apr-2009 Chris Lattner <sabre@nondot.org> add anonymous groups for all the warning command line flags that the clang
driver accepts and discards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
c599bbf9f6816cbefa2650ab18a4ce610775425f 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for CompoundAssignOperator and ConditionalOperator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
ad90e96fb7eed26d5217dd06ba50ecbbbebb59e6 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for CompoundAssignOperator and ConditionalOperator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
a577ce39abfe27539091d4663721384bdd025d5d 16-Apr-2009 Chris Lattner <sabre@nondot.org> add support for -Wextra and -W



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
c83b60de5d0e76578f913f3fc9f3b0df0748fd83 16-Apr-2009 Chris Lattner <sabre@nondot.org> add support for -Wextra and -W



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
d9fa421867ef9bad5c8a7027c1cc65ad6cb39b45 16-Apr-2009 Chris Lattner <sabre@nondot.org> comment out IsGroup: tblgen isn't instantiating these dependent defs quite right yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
7171825a5f55ce7439d4dfaaa32a7c0d51a7cba7 16-Apr-2009 Chris Lattner <sabre@nondot.org> comment out IsGroup: tblgen isn't instantiating these dependent defs quite right yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
21ddd8cd9f39e8090e6637fc59eec1ead8092060 16-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for ImaginaryLiteral and ArraySubscriptExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
cb2ca73c1d7e76cc1358ce51457d2d5837d84f9b 16-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ImaginaryLiteral and ArraySubscriptExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
dca996f13719dcdff9625b6d7fd0b6f6a567eb13 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add warning when a tentative array definition is assumed to have one element.
- Also, fixed one to actually be one (instead of zero). :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dbb4f21125699f207ce7accfc52fdd99f47ce352 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add warning when a tentative array definition is assumed to have one element.
- Also, fixed one to actually be one (instead of zero). :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1c5078881cbde0e85b487f7f022b91801646d4b5 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for declaration attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
68a2eb0cc76267ba0615992fb5e0977853c397b2 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for declaration attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
43e778bb0fba88ebe9488701b863ef426bd37ff8 15-Apr-2009 Chris Lattner <sabre@nondot.org> generate diagnostic group tables, this requires llvm r69219 or later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
8469c313879bb3deb4af2d501c73e32add4b8e40 15-Apr-2009 Chris Lattner <sabre@nondot.org> generate diagnostic group tables, this requires llvm r69219 or later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
8b5a0529869466355ca3ab6fea17cc7b6e156865 15-Apr-2009 Chris Lattner <sabre@nondot.org> fix a name shadowing problem in tblgen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
cb75e3c27350dca6dafcf16051b033baa1a4c2a1 15-Apr-2009 Chris Lattner <sabre@nondot.org> fix a name shadowing problem in tblgen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
d532345b0be9aa1a98f3d3485d48c219ef25d640 15-Apr-2009 Chris Lattner <sabre@nondot.org> use slightly more verbose to work around a tblgen bug for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
e6cea2c04ba54cc9ea263fb36be7e4509079be30 15-Apr-2009 Chris Lattner <sabre@nondot.org> use slightly more verbose to work around a tblgen bug for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
a5238a0f1567d8e86f4137f7ca08b4d96c49043c 15-Apr-2009 Chris Lattner <sabre@nondot.org> move clang specific makefile goop to clang instead of llvm. This may require
updating the llvm tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
8ee50eaf015e3857c04d0ed229f8165faee5544d 15-Apr-2009 Chris Lattner <sabre@nondot.org> move clang specific makefile goop to clang instead of llvm. This may require
updating the llvm tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Makefile
843d9b3fb3e4556b0362320995271cdc3560fa2d 15-Apr-2009 Chris Lattner <sabre@nondot.org> move some pp diags to the right .td file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
16e48ff5e9c72101904d4422accd91c59f9f653f 15-Apr-2009 Chris Lattner <sabre@nondot.org> move some pp diags to the right .td file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
6a3f5b82ba43d29f4e5d6d82275a7982c29427f7 15-Apr-2009 Chris Lattner <sabre@nondot.org> annotate diagnostics with which groups they belong to. Each
diagnostic can belong to at most one group. Each group can
contain multiple diags, but we have nice syntax for the common
case of "1 diag to one group".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
494571789e4154a0eba645e4d611913ab395adb2 15-Apr-2009 Chris Lattner <sabre@nondot.org> annotate diagnostics with which groups they belong to. Each
diagnostic can belong to at most one group. Each group can
contain multiple diags, but we have nice syntax for the common
case of "1 diag to one group".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
364e5802d19e46d42913107998c5ff6008dd4cd1 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> For source location entries that describe instantiations, encode the
token length in the PCH file rather than trying (and failing) to
reconstruct it be getting the spelling token's length.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
f60e9918690fcf02974bc1ebecd42c99d561855e 15-Apr-2009 Douglas Gregor <dgregor@apple.com> For source location entries that describe instantiations, encode the
token length in the PCH file rather than trying (and failing) to
reconstruct it be getting the spelling token's length.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
7e2b1cd1ea97a4d2ff8096be01d92646715414c2 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for MemberExpr and CallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
1f0d0133b0e8d1f01f63951ee04927796b34740d 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for MemberExpr and CallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
0a1d8a76950c44e548b99a05f37177583f38d2c4 15-Apr-2009 Chris Lattner <sabre@nondot.org> now that we've decoupled diagnostic classes from default mappings,
move the remaining default mapping exceptions from C++ code into
the .td files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
af008839f3ad499b1e6f752b6a324b7bd1de6cea 15-Apr-2009 Chris Lattner <sabre@nondot.org> now that we've decoupled diagnostic classes from default mappings,
move the remaining default mapping exceptions from C++ code into
the .td files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticSemaKinds.td
e5d60a3d4be1eaa0b6349236787e3ee92bbfc8ff 15-Apr-2009 Chris Lattner <sabre@nondot.org> Make diagnostic class explicit in the diag record instead of
implicit from its parenting. Now that diag mapping is
explicit, eliminate the fatal and extwarn classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
8a941e0c71d318430648e24eeca91a464a46eba9 15-Apr-2009 Chris Lattner <sabre@nondot.org> Make diagnostic class explicit in the diag record instead of
implicit from its parenting. Now that diag mapping is
explicit, eliminate the fatal and extwarn classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
13d17ac85da60e14f4dace39d6c438a5ea016757 15-Apr-2009 Chris Lattner <sabre@nondot.org> Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class. This requires an LLVM tree update.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
4ac072aceb9c68f7a023050e2ab9ccacb4fe6e5b 15-Apr-2009 Chris Lattner <sabre@nondot.org> Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class. This requires an LLVM tree update.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
596e093e4eb79a78ceb02d8d3b78d3c6d3088cc0 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for string literals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
673ecd6a4a9f7c12fb6f76f84f654dbdcdc89e76 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for string literals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
a5f09bc964bf16c4ae0ca6587d662b061062b3a2 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add --help-hidden


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Options.def
c35d71f1e0a0c72fd43a73ddecd408bf43d501de 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add --help-hidden


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Options.def
12d7405658246a6252805e4d64f54d4ebef41859 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for UnaryOperator, SizeOfAlignOfExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
0b0b77fa29c74c99a77548ed86ca8a04f7cf6b02 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for UnaryOperator, SizeOfAlignOfExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
321de994c3254612811bff4c705c2db55b41519a 15-Apr-2009 Chris Lattner <sabre@nondot.org> this should be private


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
9faf50e62ddcd2535b472abc8daafd7042120caa 15-Apr-2009 Chris Lattner <sabre@nondot.org> this should be private


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
015b4e1bb608f6c89e6c0daaadae57ff33375766 15-Apr-2009 Chris Lattner <sabre@nondot.org> Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping. In the new scheme, -Wfoo or -Wno-foo or
-Werror=foo all override the -pedantic options, and __extension__
robustly silences all extension diagnostics in their scope.

An added bonus of this change is that MAP_DEFAULT goes away, meaning that
per-diagnostic mapping information can now be stored in 2 bits, doubling
the density of the Diagnostic::DiagMapping array. This also
substantially simplifies Diagnostic::getDiagnosticLevel.

OTOH, this temporarily introduces some "macro intensive" code in
Diagnostic.cpp. This will be addressed in a later patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
27ceb9d77d929f02a8a811d189a96885629c7c0c 15-Apr-2009 Chris Lattner <sabre@nondot.org> Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping. In the new scheme, -Wfoo or -Wno-foo or
-Werror=foo all override the -pedantic options, and __extension__
robustly silences all extension diagnostics in their scope.

An added bonus of this change is that MAP_DEFAULT goes away, meaning that
per-diagnostic mapping information can now be stored in 2 bits, doubling
the density of the Diagnostic::DiagMapping array. This also
substantially simplifies Diagnostic::getDiagnosticLevel.

OTOH, this temporarily introduces some "macro intensive" code in
Diagnostic.cpp. This will be addressed in a later patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
cc94ab72501999e1d61a538f9891523603f9236c 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for designated initializers that refer to members of
anonymous structs or unions. Fixes PR3778.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
ffb4b6e299069139908540ce97be4462e16b53a4 15-Apr-2009 Douglas Gregor <dgregor@apple.com> Implement support for designated initializers that refer to members of
anonymous structs or unions. Fixes PR3778.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.td
a2c28208e848457fe4f8358865bd10e8bfef0c5a 15-Apr-2009 Chris Lattner <sabre@nondot.org> make default diagnostic mapping more explicit in .td file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
839324d564c7263402fb49e73c307817a0e5992c 15-Apr-2009 Chris Lattner <sabre@nondot.org> make default diagnostic mapping more explicit in .td file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
aa3572798c5ccf8e609ee7609d630d4bd5857327 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Switch designated-initializer checking from using designator iterators
to using designator indices. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
711997184366d584c9c437102cae1e9d9927b986 15-Apr-2009 Douglas Gregor <dgregor@apple.com> Switch designated-initializer checking from using designator iterators
to using designator indices. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
86c9cb59c745ad3bdfe8754c509504488c8bf2f2 15-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
3fabc86064359d6de3b9ac25f137eca5d76b7ec0 15-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
c742c4a1289937a08a722cd700824c14acd40e74 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
- <rdar://problem/6790309> ER: Support
-fsigned-bitfields/-funsigned-bitfields


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
70d3c92820f590b10553da9c96eda24e4325ba34 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
- <rdar://problem/6790309> ER: Support
-fsigned-bitfields/-funsigned-bitfields


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
c75d0cbfbe5a6c525a1eaf5d2062a0386e5fc6b4 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for CStyleCastExpr and BinaryOperator expression kinds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
db600c330a37b1c3ab4533310729910ee188f900 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for CStyleCastExpr and BinaryOperator expression kinds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
f7fa9dcd32818f9ed2932c690b460724e2f5c9f2 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Improve "assignment to cast" diagnostic.
- Strip off extra parens when looking for casts.
- Change the location info to point at the cast (instead of the
assignment).

For example, on

int *b;
#define a ((void*) b)
void f0() {
a = 10;
}

we now emit:

/tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported
a = 10;
^ ~
/tmp/t.c:2:12: note: instantiated from:
#define a ((void*) b)
~^~~~~~~~~~

instead of:

/tmp/t.c:4:5: error: expression is not assignable
a = 10;
~ ^


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
44e35f7b2b5da1eb338639e46bf0b5522e75c5f3 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Improve "assignment to cast" diagnostic.
- Strip off extra parens when looking for casts.
- Change the location info to point at the cast (instead of the
assignment).

For example, on

int *b;
#define a ((void*) b)
void f0() {
a = 10;
}

we now emit:

/tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported
a = 10;
^ ~
/tmp/t.c:2:12: note: instantiated from:
#define a ((void*) b)
~^~~~~~~~~~

instead of:

/tmp/t.c:4:5: error: expression is not assignable
a = 10;
~ ^


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4ea0b1fbabc67f7d2a1fe35df8dc0b1bd6bfdf56 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for ParenExpr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
c04db4feefa2b0dbbc6876cb4eeeee108aa6791d 15-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for ParenExpr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
a151ba485fefb14e2237321ba13c346853f765e3 15-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add PCH support for ImplicitCastExprs. This is the first expression
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
087fd536809ebe754d91c641a98917e02dd7452d 15-Apr-2009 Douglas Gregor <dgregor@apple.com> Add PCH support for ImplicitCastExprs. This is the first expression
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
e1be6022a0d3c1b7bc55c74f96edaac22f1da21a 15-Apr-2009 Chris Lattner <sabre@nondot.org> Change Lexer::MeasureTokenLength to take a LangOptions reference.
This allows it to accurately measure tokens, so that we get:

t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~~^

instead of the woefully inferior:

t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^

Most of this is just plumbing to push the reference around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Lex/Lexer.h
lang/Rewrite/Rewriter.h
2c78b873f4f3823ae859c15674cb3d76c8554113 15-Apr-2009 Chris Lattner <sabre@nondot.org> Change Lexer::MeasureTokenLength to take a LangOptions reference.
This allows it to accurately measure tokens, so that we get:

t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~~^

instead of the woefully inferior:

t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^

Most of this is just plumbing to push the reference around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
lang/Frontend/TextDiagnosticPrinter.h
lang/Lex/Lexer.h
lang/Rewrite/Rewriter.h
0a4ea0e386ba03a794973c3d7244bbfb2302275d 15-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose properties which have no implementations;
either unimplemented setter/getter or no
implementation directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
12bac2566e3136d4bd9d42e6aabe27e1038f7793 15-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose properties which have no implementations;
either unimplemented setter/getter or no
implementation directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
52cd762ff8a33a7bbb582138df0253550be7f76a 15-Apr-2009 Chris Lattner <sabre@nondot.org> Make the implicit-int handling error recovery stuff handle C++
nested name specifiers. Now we emit stuff like:

t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^

instead of:

t.cpp:8:16: error: invalid token after top level declarator
static foo::X P;
^

This is inspired by a really awful error message I got from
g++ when I misspelt diag::kind as diag::Kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f4382f50b7ab9f445c3f5b3ddaa59e6da25ea3bb 15-Apr-2009 Chris Lattner <sabre@nondot.org> Make the implicit-int handling error recovery stuff handle C++
nested name specifiers. Now we emit stuff like:

t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^

instead of:

t.cpp:8:16: error: invalid token after top level declarator
static foo::X P;
^

This is inspired by a really awful error message I got from
g++ when I misspelt diag::kind as diag::Kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e2f3720dcee0a0fa77ddffa42a7cd4c88006659e 14-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add PCH support for PredefinedExpr and FloatingLiteral expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
17fc223395d51be582fc666bb6ea21bd1dff26dc 14-Apr-2009 Douglas Gregor <dgregor@apple.com> Add PCH support for PredefinedExpr and FloatingLiteral expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
82353c679e6c84538bb576569366c929f2f4972d 14-Apr-2009 Chris Lattner <sabre@nondot.org> refactor "implicit int error recovery" code out of
ParseDeclarationSpecifiers into its own function, no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e40c295d017a8f75a945fe9ed2aa9d8bb7a7341a 14-Apr-2009 Chris Lattner <sabre@nondot.org> refactor "implicit int error recovery" code out of
ParseDeclarationSpecifiers into its own function, no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
c10f86ffa5a4693fe3f3779305047d260c35d90b 14-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for a few very, very simple kinds of expressions. Hook up
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0b7489194f9f89fac39d57211c1e7953ae50251f 14-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for a few very, very simple kinds of expressions. Hook up
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
9a18310cbcb0d7f99b506cb260e26af6cf302b72 14-Apr-2009 Chris Lattner <sabre@nondot.org> add support for -W[no-]extra-tokens


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
7eba5c9df989632c4dcaf13a20798d33d9ba3186 14-Apr-2009 Chris Lattner <sabre@nondot.org> add support for -W[no-]extra-tokens


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
2a3e43d3efc6ded9f8e6bf87af565cbd931f3823 14-Apr-2009 Chris Lattner <sabre@nondot.org> implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c51974328b3a378c3c40b1fa527ecb928ed2bfda 14-Apr-2009 Chris Lattner <sabre@nondot.org> implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
429e56a918f44f517850a651cbb283d9f9f19fae 14-Apr-2009 Chris Lattner <sabre@nondot.org> recognize the gnuc_inline attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
26e25545b26ec06f5d674dbae00fb168e6688d90 14-Apr-2009 Chris Lattner <sabre@nondot.org> recognize the gnuc_inline attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
e0d5c560565d3a702385b33d790ff2eed6bef62f 14-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> When building a PCH file, don't perform end-of-translation-unit
wrap-up (e.g., turning tentative definitions into definitions). Also,
very that, when we actually use the PCH file, we get the ride code
generation for tentative definitions and definitions that show up in
the PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
f807fe0d1a865f4c6ba7e494cf4ae360c4173521 14-Apr-2009 Douglas Gregor <dgregor@apple.com> When building a PCH file, don't perform end-of-translation-unit
wrap-up (e.g., turning tentative definitions into definitions). Also,
very that, when we actually use the PCH file, we get the ride code
generation for tentative definitions and definitions that show up in
the PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
8394fda08a9d9d837c14da025465d4f169987d36 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Clean up handling of visibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
04d4078425614bf9fd58d606335c1f5f74ee7fa4 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Clean up handling of visibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
1ac90d4f3e2993d5d85e3bc29d9ea9efecd4dfd3 14-Apr-2009 Chris Lattner <sabre@nondot.org> Fix the #import / #include_next "extra tokens at end of #foo directive"
Warning to properly report that it is an import/include_next instead of
claiming it is a #include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
35410d5cbbb18735d76e00496540d416dc49b577 14-Apr-2009 Chris Lattner <sabre@nondot.org> Fix the #import / #include_next "extra tokens at end of #foo directive"
Warning to properly report that it is an import/include_next instead of
claiming it is a #include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
caf78fb050f4870758014c771009095ca71c9366 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add VarDecl::getStorageClassSpecifierString (StorageClass -> const char*).
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b286a78c8cce4592306dae6abc3656daf6379c77 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add VarDecl::getStorageClassSpecifierString (StorageClass -> const char*).
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0df11ba02c3767922c68f0375c806adfb2d1d3a0 14-Apr-2009 Mike Stump <mrs@apple.com> Fix build error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
38c1effc8549af15d5049a684257c7ca8e9c7a87 14-Apr-2009 Mike Stump <mrs@apple.com> Fix build error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
631f6c64882b5254c5e4dbde6ec604dd4b96fd23 14-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> When writing a PCH file, keep track of all of the non-static,
non-inline external definitions (and tentative definitions) that are
found at the top level. The corresponding declarations are stored in a
record in the PCH file, so that they can be provided to the
ASTConsumer (via HandleTopLevelDecl) when the PCH file is read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
fdd0172ca1b3c837f8c2b37d69cc2085234e09fa 14-Apr-2009 Douglas Gregor <dgregor@apple.com> When writing a PCH file, keep track of all of the non-static,
non-inline external definitions (and tentative definitions) that are
found at the top level. The corresponding declarations are stored in a
record in the PCH file, so that they can be provided to the
ASTConsumer (via HandleTopLevelDecl) when the PCH file is read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
2a49179c4c884b49f446728ccf0f306751396255 14-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Partial PCH support for FileScopeAsmDecl and BlockDecl. Both require
expression or statement serialization before we can test them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
1028bc67d56ea088c3a57c4c44c3f6aeff60a031 14-Apr-2009 Douglas Gregor <dgregor@apple.com> Partial PCH support for FileScopeAsmDecl and BlockDecl. Both require
expression or statement serialization before we can test them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
23ce3a5b5e65ff7d43001cd829a99932173a345e 14-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for functions and their parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
3a2f7e42514ddbec983c61826ce85d3071e23e8e 14-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for functions and their parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
982365e249bd61429e7ed4e38556b8cd84dc356e 13-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH support for record decls/types and their fields. Now that we can
handle the definition of __builtin_va_list on x86-64, eliminate the
forced -triple in PCH tests to get better coverage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
8c70006581a9b9e9485570ca727a6c5f7be63521 13-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for record decls/types and their fields. Now that we can
handle the definition of __builtin_va_list on x86-64, eliminate the
forced -triple in PCH tests to get better coverage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
887235921e3eb668326b4a9a208bb2532c5235b6 13-Apr-2009 Chris Lattner <sabre@nondot.org> upgrade "extra tokens at end of directive" to warn by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
db678c6b0c3bdf5b9ba56bb21960cfa2d54c4f87 13-Apr-2009 Chris Lattner <sabre@nondot.org> upgrade "extra tokens at end of directive" to warn by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
1b85c5054320bd3b7d0593a0ab1f43db7ed01bc5 13-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> In objc2's None-Fragile ABI, one cannot use the super class ivar for
setter/getter synthesis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
29da66ec56b56db03ed4d48be3e1415f2dbf8995 13-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> In objc2's None-Fragile ABI, one cannot use the super class ivar for
setter/getter synthesis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
47f1b2cbd21093c1348fe3c59f513cb2abed3255 13-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add PCH support for enumerations and enumerators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0a2b45e5885b6b8477b167042c0f6cd1d99a1f13 13-Apr-2009 Douglas Gregor <dgregor@apple.com> Add PCH support for enumerations and enumerators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
03d555746a43d4c69b2d1e4db808ea2feaa96ec8 13-Apr-2009 Steve Naroff <snaroff@apple.com> Change diagnostic as a result of researching <rdar://problem/6779809> missing interface name in "error: cannot declare variable inside a class, protocol or category ''.

Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
87454161a6377b573d4fc3ff45e7b3ec193e860c 13-Apr-2009 Steve Naroff <snaroff@apple.com> Change diagnostic as a result of researching <rdar://problem/6779809> missing interface name in "error: cannot declare variable inside a class, protocol or category ''.

Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
635f97f496328be23baade4b8c0e2cb5f4215d34 13-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Include the SourceManager's line table in the PCH file. We can now
properly cope with #line directives in PCH files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Frontend/PCHBitCodes.h
bd94500d3aa60092fb0f1e90f53fb0d03fa502a8 13-Apr-2009 Douglas Gregor <dgregor@apple.com> Include the SourceManager's line table in the PCH file. We can now
properly cope with #line directives in PCH files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Basic/SourceManagerInternals.h
lang/Frontend/PCHBitCodes.h
cdad0ba825bd59e5ee9ccd4e5894f15171440208 13-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Factor the internals of SourceManager (specially, LineTableInfo) into a separate Internals header. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManagerInternals.h
d4f77aa7c276be49aee5e59ef509cb91e26aa79f 13-Apr-2009 Douglas Gregor <dgregor@apple.com> Factor the internals of SourceManager (specially, LineTableInfo) into a separate Internals header. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68960 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManagerInternals.h
8fc38c21132d37ff76f624ab1dcfe03ba63e2518 13-Apr-2009 Chris Lattner <sabre@nondot.org> fix rdar://6774906, a crash handling implicit conversions between pointers
in different address spaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ecca7536488e425417dcb005c39cc15ae1947aab 13-Apr-2009 Chris Lattner <sabre@nondot.org> fix rdar://6774906, a crash handling implicit conversions between pointers
in different address spaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4b21c20753389c64f7f0a89e6ef34d0eaaf3e3ce 13-Apr-2009 Chris Lattner <sabre@nondot.org> implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Frontend/PCHBitCodes.h
lang/Lex/Preprocessor.h
c1f9d828c733ec1eba06d01070735d1f36fda733 13-Apr-2009 Chris Lattner <sabre@nondot.org> implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Frontend/PCHBitCodes.h
lang/Lex/Preprocessor.h
d6c780916a75bb1f7a6efb1ed8e36aac2b32168d 13-Apr-2009 Chris Lattner <sabre@nondot.org> fix some out of date comments pointed out by Sebastian


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b6688e02d2cea9a1e2519654133ac2aa81fd8055 13-Apr-2009 Chris Lattner <sabre@nondot.org> fix some out of date comments pointed out by Sebastian


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
197b4343435266ed64cbed114d030078292cdd6f 12-Apr-2009 Chris Lattner <sabre@nondot.org> Diagnose invalid uses of tagged types with a missing tag. For example, in:

struct xyz { int y; };
enum abc { ZZZ };

static xyz b;
abc c;

we used to produce:

t2.c:4:8: error: unknown type name 'xyz'
static xyz b;
^
t2.c:5:1: error: unknown type name 'abc'
abc c;
^

we now produce:

t2.c:4:8: error: use of tagged type 'xyz' without 'struct' tag
static xyz b;
^
struct
t2.c:5:1: error: use of tagged type 'abc' without 'enum' tag
abc c;
^
enum

GCC produces the normal:
t2.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘b’
t2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’

rdar://6783347


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
4c97d762d8c5a84f6554e5bfb31d28c90df64158 12-Apr-2009 Chris Lattner <sabre@nondot.org> Diagnose invalid uses of tagged types with a missing tag. For example, in:

struct xyz { int y; };
enum abc { ZZZ };

static xyz b;
abc c;

we used to produce:

t2.c:4:8: error: unknown type name 'xyz'
static xyz b;
^
t2.c:5:1: error: unknown type name 'abc'
abc c;
^

we now produce:

t2.c:4:8: error: use of tagged type 'xyz' without 'struct' tag
static xyz b;
^
struct
t2.c:5:1: error: use of tagged type 'abc' without 'enum' tag
abc c;
^
enum

GCC produces the normal:
t2.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘b’
t2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’

rdar://6783347


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
cc98d8c25806d02561d5b64cfd78740c8150538f 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement the first set of changes for PR3963 and rdar://6759604,
which tries to do better error recovery when it is "obvious" that an
identifier is a mis-typed typename. In this case, we try to parse
it as a typename instead of as the identifier in a declarator, which
gives us several options for better error recovery and immediately
makes diagnostics more useful. For example, we now produce:

t.c:4:8: error: unknown type name 'foo_t'
static foo_t a = 4;
^

instead of:

t.c:4:14: error: invalid token after top level declarator
static foo_t a = 4;
^

Also, since we now parse "a" correctly, we make a decl for it,
preventing later uses of 'a' from emitting things like:

t.c:12:20: error: use of undeclared identifier 'a'
int bar() { return a + b; }
^

I'd really appreciate any scrutiny possible on this, it
is a tricky area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
c199ab3ea1381e8e9cdd720eb87bb4f65cdf5086 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement the first set of changes for PR3963 and rdar://6759604,
which tries to do better error recovery when it is "obvious" that an
identifier is a mis-typed typename. In this case, we try to parse
it as a typename instead of as the identifier in a declarator, which
gives us several options for better error recovery and immediately
makes diagnostics more useful. For example, we now produce:

t.c:4:8: error: unknown type name 'foo_t'
static foo_t a = 4;
^

instead of:

t.c:4:14: error: invalid token after top level declarator
static foo_t a = 4;
^

Also, since we now parse "a" correctly, we make a decl for it,
preventing later uses of 'a' from emitting things like:

t.c:12:20: error: use of undeclared identifier 'a'
int bar() { return a + b; }
^

I'd really appreciate any scrutiny possible on this, it
is a tricky area.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
5140b9832b2a844ecea92c250bbe95f50d190baa 12-Apr-2009 Chris Lattner <sabre@nondot.org> add a new isNull() method to DeclGroupRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
20401698e3bd93a24bb5d9e18e435895cefe5fd1 12-Apr-2009 Chris Lattner <sabre@nondot.org> add a new isNull() method to DeclGroupRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
d50ecbcdb8e5b76f15a3625dccf03cdb1d620e4e 12-Apr-2009 Chris Lattner <sabre@nondot.org> add a new Decl::hasAttr<T>() predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
115cafcafec3572756635ca81ef83999ae0c8af7 12-Apr-2009 Chris Lattner <sabre@nondot.org> add a new Decl::hasAttr<T>() predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
a55834a91ff6bdf483aba26c5da64669b2464e2f 12-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse deleted member functions. Parsing member declarations goes through a different code path that I forgot previously.
Implement the rvalue reference overload dance for returning local objects. Returning a local object first tries to find a move constructor now.
The error message when no move constructor is defined (or is not applicable) and the copy constructor is deleted is quite ugly, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e2b6833d445c7a4ce64f1816c05f176ba1740aca 12-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse deleted member functions. Parsing member declarations goes through a different code path that I forgot previously.
Implement the rvalue reference overload dance for returning local objects. Returning a local object first tries to find a move constructor now.
The error message when no move constructor is defined (or is not applicable) and the copy constructor is deleted is quite ugly, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f3115080185e00b944e20cfa17abf747d3c9ebb7 12-Apr-2009 Chris Lattner <sabre@nondot.org> call objc interfaces just "interfaces" in diagnostics, not "Objective-C types"
or "Objective-C interface types" etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
05af26216bc704b893dee860cb84de28d801a7f6 12-Apr-2009 Chris Lattner <sabre@nondot.org> call objc interfaces just "interfaces" in diagnostics, not "Objective-C types"
or "Objective-C interface types" etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
81f00ed9267bca789b5074d89a6723631968e500 12-Apr-2009 Chris Lattner <sabre@nondot.org> implement rdar://6780761, making sema reject some code that otherwise
crashes codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
312531a8cd69c562d5687bd69fd334be99d87320 12-Apr-2009 Chris Lattner <sabre@nondot.org> implement rdar://6780761, making sema reject some code that otherwise
crashes codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
346d9e455304edb2eb9f076b322dd26d619b7849 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement support for GCC's -dD mode, which dumps -E output *and*
macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d82df3ad430397d7f9ef511e7c5157f997c41f53 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement support for GCC's -dD mode, which dumps -E output *and*
macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
23b517d8af1485ef3f45e3dab180d628cfa5f63c 12-Apr-2009 Chris Lattner <sabre@nondot.org> add a ppcallback hook for macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
f4a72b07747cd6ae1a9f6974e148ae504c879349 12-Apr-2009 Chris Lattner <sabre@nondot.org> add a ppcallback hook for macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
29241860a38d1db6de4aad454cb74452c265dd53 11-Apr-2009 Chris Lattner <sabre@nondot.org> now that we have an identifier table in the PCH file, finish hooking up
macro deserialization. We now correctly install II's in tokens, handle
function-like macros, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
7356a31327be9b3c3434a0c88746028980da5684 11-Apr-2009 Chris Lattner <sabre@nondot.org> now that we have an identifier table in the PCH file, finish hooking up
macro deserialization. We now correctly install II's in tokens, handle
function-like macros, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
7e4c91b78ac49c43ab16006187b70912bad77e18 11-Apr-2009 Chris Lattner <sabre@nondot.org> improve the 'conflicting types' diagnostics to include correct location info, now
that it is plumbed through Sema. On a file from growl, we used to emit:

t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:1: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

now we produce:

t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:45: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

We still don't have proper loc info for properties, hence the FIXME.

rdar://6782494



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3aff919532fd807ed678b9cfa4b7eca7b04adcf9 11-Apr-2009 Chris Lattner <sabre@nondot.org> improve the 'conflicting types' diagnostics to include correct location info, now
that it is plumbed through Sema. On a file from growl, we used to emit:

t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:1: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

now we produce:

t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:45: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

We still don't have proper loc info for properties, hence the FIXME.

rdar://6782494



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7621073d070b38162151ebfa5464ef9e55d50eec 11-Apr-2009 Chris Lattner <sabre@nondot.org> Improve the 'cannot pass objc interface by value' diagnostic:
1) improve localizability by not passing english strings in.
2) improve location for arguments.
3) print the objc type being passed.

Before:
method-bad-param.m:15:1: error: Objective-C type cannot be passed by value
-(void) my_method:(foo) my_param
^

after:
method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value
-(void) my_method:(foo) my_param
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
2dd979fbd59938babbed76e2376116511b403c93 11-Apr-2009 Chris Lattner <sabre@nondot.org> Improve the 'cannot pass objc interface by value' diagnostic:
1) improve localizability by not passing english strings in.
2) improve location for arguments.
3) print the objc type being passed.

Before:
method-bad-param.m:15:1: error: Objective-C type cannot be passed by value
-(void) my_method:(foo) my_param
^

after:
method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value
-(void) my_method:(foo) my_param
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
612a2f7b260691c0eb74930977f19b78e2b36260 11-Apr-2009 Chris Lattner <sabre@nondot.org> change the interface to ActOnMethodDeclaration to pass down argument
information in a little struct instead of individually. While we're
at it, add per-argument loc info and attribute info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e294d3fbaffcbc0cf5f16067ab31d2b2763d25e9 11-Apr-2009 Chris Lattner <sabre@nondot.org> change the interface to ActOnMethodDeclaration to pass down argument
information in a little struct instead of individually. While we're
at it, add per-argument loc info and attribute info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
551a9d209e93775d7c4d17f9877677afc311048e 11-Apr-2009 Chris Lattner <sabre@nondot.org> sink abstract typedefs like Action::ExprTy from the Action class
down to the ActionBase class. This eliminates dependencies of (e.g.)
DeclSpec.h on Action.h, meaning that action.h can now include these
headers and use their types directly in the actions interfaces.

This is a refactoring to support a future change, no functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
8f823d2d3c557326d22699d66e5d367d0f0e44ef 11-Apr-2009 Chris Lattner <sabre@nondot.org> sink abstract typedefs like Action::ExprTy from the Action class
down to the ActionBase class. This eliminates dependencies of (e.g.)
DeclSpec.h on Action.h, meaning that action.h can now include these
headers and use their types directly in the actions interfaces.

This is a refactoring to support a future change, no functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Ownership.h
d1b0f3b4acee29b25cb5a039477038ed544a727a 11-Apr-2009 Chris Lattner <sabre@nondot.org> rename Parser::ParseObjCSelector -> Parser::ParseObjCSelectorPiece,
since it only parses one identifier out of the selector, not the
whole thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
2fc5c2428ecb450a3256c8316b93b8655cb76a0f 11-Apr-2009 Chris Lattner <sabre@nondot.org> rename Parser::ParseObjCSelector -> Parser::ParseObjCSelectorPiece,
since it only parses one identifier out of the selector, not the
whole thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
484e6f0dc0edbb8b5435324ec6485d170afa9583 11-Apr-2009 Ted Kremenek <kremenek@apple.com> analyzer: We cannot bind values to CodeTextRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
8ec3d7dbff9d526fcdce4fbea683830192340c90 11-Apr-2009 Ted Kremenek <kremenek@apple.com> analyzer: We cannot bind values to CodeTextRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
ab4592f83315373b2b2e88cf94fe8f0a5ce0a7cb 11-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweak wording, input argument isn't necessarily a "file", things like
-lstdc++ are inputs too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
3c69d3dda3af53760526d7897743e0fad68a44dc 11-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweak wording, input argument isn't necessarily a "file", things like
-lstdc++ are inputs too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
7a224cfc5265f1a06cdbabbc3fbfe8387ecc3d02 11-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Store unique IDs for identifiers in the PCH file. Use some bitmangling
so that we only need to perform the lookup and identifier resolution
once per identifier in the PCH file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
afaf308b779cd8e8fc8c42601b9f383423c15c2d 11-Apr-2009 Douglas Gregor <dgregor@apple.com> Store unique IDs for identifiers in the PCH file. Use some bitmangling
so that we only need to perform the lookup and identifier resolution
once per identifier in the PCH file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
8765ebca090282a7025dd46e0c71e45fd0e9b6ec 11-Apr-2009 Ted Kremenek <kremenek@apple.com> Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"
ProgramPoints all the way through to GRCoreEngine.

NSString.m now fails with RegionStoreManager because of the void** cast.
Disabling use of region store for that test for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/ProgramPoint.h
1670e403c48f3af4fceff3f6773a0e1cfc6c4eb3 11-Apr-2009 Ted Kremenek <kremenek@apple.com> Implement analyzer support for OSCompareAndSwap. This required pushing "tagged"
ProgramPoints all the way through to GRCoreEngine.

NSString.m now fails with RegionStoreManager because of the void** cast.
Disabling use of region store for that test for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/ProgramPoint.h
b3a04c8b6ed5c93e1358246ff80dc869ca2a0efd 11-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Compare the predefines buffer in the PCH file with the predefines
buffer generated for the current translation unit. If they are
different, complain and then ignore the PCH file. This effectively
checks for all compilation options that somehow would affect
preprocessor state (-D, -U, -include, the dreaded -imacros, etc.).

When we do accept the PCH file, throw away the contents of the
predefines buffer rather than parsing them, since all of the results
of that parsing are already stored in the PCH file. This eliminates
the ugliness with the redefinition of __builtin_va_list, among other
things.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
lang/Lex/Preprocessor.h
e1d918e9fe55e3b34401fd5d420c47ea0f9572c9 11-Apr-2009 Douglas Gregor <dgregor@apple.com> Compare the predefines buffer in the PCH file with the predefines
buffer generated for the current translation unit. If they are
different, complain and then ignore the PCH file. This effectively
checks for all compilation options that somehow would affect
preprocessor state (-D, -U, -include, the dreaded -imacros, etc.).

When we do accept the PCH file, throw away the contents of the
predefines buffer rather than parsing them, since all of the results
of that parsing are already stored in the PCH file. This eliminates
the ugliness with the redefinition of __builtin_va_list, among other
things.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHReader.h
lang/Lex/Preprocessor.h
9a1c029d139454f15270d4a2a9f993c97a29c5c5 11-Apr-2009 Chris Lattner <sabre@nondot.org> do a dance with predefines, and finally enable reading of macros from
PCH. This works now, except for limitations not being able to do things
with identifiers. The basic example in the testcase works though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
531cc8355608295caa01f31fa4e078d77a3d6470 11-Apr-2009 Chris Lattner <sabre@nondot.org> do a dance with predefines, and finally enable reading of macros from
PCH. This works now, except for limitations not being able to do things
with identifiers. The basic example in the testcase works though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
db1c81b6e4f5129686a794228c7b7c7a3a8a74a5 10-Apr-2009 Chris Lattner <sabre@nondot.org> add support for reading macros. This does all the reading (with a bunch of
fixme's, e.g. for tokens with identifiers) but does not actually install
them. Some details with the predefines buffer needs to be sorted out first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
42d42b5b84603032e57add333b5b44e0ef99bd9e 10-Apr-2009 Chris Lattner <sabre@nondot.org> add support for reading macros. This does all the reading (with a bunch of
fixme's, e.g. for tokens with identifiers) but does not actually install
them. Some details with the predefines buffer needs to be sorted out first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHReader.h
7ff7cb4b755ae86bba2a1dfd9faf56079ec07783 10-Apr-2009 Chris Lattner <sabre@nondot.org> make a method public


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
f908c519c1625e81d9e33d8a2a306a92834fe317 10-Apr-2009 Chris Lattner <sabre@nondot.org> make a method public


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
b5887f3db333427f9e0bb3adcdd46d8df71a6a7b 10-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Encode the target triple in the PCH file, and check that target triple when using the PCH file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
2bec0410d268779f601bd509e0302a500af7ac6a 10-Apr-2009 Douglas Gregor <dgregor@apple.com> Encode the target triple in the PCH file, and check that target triple when using the PCH file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHWriter.h
6340b726fbc89d9dc278ef385c9c2d643bcf8aee 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Add arbitrary "tags" to ProgramPoints. While this fattens up ProgramPoint even
more, it gives us a tremendous amount of flexibility for extending the analyzer
to handle arbitrary program points.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
e8063ae53bd241de10ba1053054d06867a5c56ab 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Add arbitrary "tags" to ProgramPoints. While this fattens up ProgramPoint even
more, it gives us a tremendous amount of flexibility for extending the analyzer
to handle arbitrary program points.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
179cfb1201fb5a1e80f0f65abab334f414210a73 10-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Implement serialization/deserialization of LangOptions in the PCH
file. When de-serializing LangOptions, we check that the
currently-provided language options are consistent with the options
used to compile the PCH file. If they are not, we emit a diagnostic
and ignore the PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0a0428e96c6f1e8bef7a481a9eb69a6f6df38951 10-Apr-2009 Douglas Gregor <dgregor@apple.com> Implement serialization/deserialization of LangOptions in the PCH
file. When de-serializing LangOptions, we check that the
currently-provided language options are consistent with the options
used to compile the PCH file. If they are not, we emit a diagnostic
and ignore the PCH file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
0523c0162c49b9a1d47a7a1fc45521a18b99641b 10-Apr-2009 Chris Lattner <sabre@nondot.org> add a new PP_MACRO_NAME hack so that I can test object-like macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
d14f27053c5d2a9140eed38b9d208b94e7f83b31 10-Apr-2009 Chris Lattner <sabre@nondot.org> add a new PP_MACRO_NAME hack so that I can test object-like macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
84800be4a9bd116c68029223b43877b8fc862b39 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Move a few more NonLoc static functions to ValueManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
fc3388dfddf760cf3484fd99de28e1eb53769554 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Move a few more NonLoc static functions to ValueManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
64a24193dcfd174703d895a41525cb758f466020 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Default initialize 'code' instance variable to NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
83a1d1d1a28aafca1f2a271189b78a299b4c9d65 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Default initialize 'code' instance variable to NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
850eabdc06c965f36bc4dda0e47c4075eec94165 10-Apr-2009 Chris Lattner <sabre@nondot.org> emit tokens, constify the Preprocessor passed down into PCH writer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
df961c28f84666051ad59d2da1f44023f6366d02 10-Apr-2009 Chris Lattner <sabre@nondot.org> emit tokens, constify the Preprocessor passed down into PCH writer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
1b094953f00df1cf46a584cb986fd56d3eff8973 10-Apr-2009 Chris Lattner <sabre@nondot.org> emit function-like and object-like macros to the PCH file.
Note that we don't do anything useful with identifier infos yet
and don't emit the tokens that the macros are defined to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Lex/Preprocessor.h
7c5d24efcd2e505b5739f7def08dfe25ce59a1b2 10-Apr-2009 Chris Lattner <sabre@nondot.org> emit function-like and object-like macros to the PCH file.
Note that we don't do anything useful with identifier infos yet
and don't emit the tokens that the macros are defined to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHBitCodes.h
lang/Lex/Preprocessor.h
ac8f280704e948b8051e8e9bd7f557127d31624b 10-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Various minor fixes to PCH reading and writing, with general
cleanup. Aside from a minor tweak to the PCH file format, no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
8038d5182b72dcdef292f6fb8539ad77f338855a 10-Apr-2009 Douglas Gregor <dgregor@apple.com> Various minor fixes to PCH reading and writing, with general
cleanup. Aside from a minor tweak to the PCH file format, no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
ffc05ed23455aa7ae1e33a8e1d9227015d2666ac 10-Apr-2009 Chris Lattner <sabre@nondot.org> Arrange for the preprocessor to be passed down into the PCH writer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
0b1fb988012da21d996c43e36867787a7a07b889 10-Apr-2009 Chris Lattner <sabre@nondot.org> Arrange for the preprocessor to be passed down into the PCH writer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/PCHWriter.h
ef3fb4c00d0af83997f6a4d4fd2406b831d946e7 10-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add prototype for CodeTextRegion.
A CodeTextRegion wraps two kinds of data: FunctionDecl* or SymbolRef.
The latter comes from the symbolic function pointer that are generated from
function calls or input data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
ec13d9206645af07ef7c571405893b8d901de151 10-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add prototype for CodeTextRegion.
A CodeTextRegion wraps two kinds of data: FunctionDecl* or SymbolRef.
The latter comes from the symbolic function pointer that are generated from
function calls or input data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/ValueManager.h
18bcec095fe0c92a3e6aea95d424042b061c347e 10-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Finally nuke loc::SymbolVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
3330dcb0da654fb06e78dc410ba15ab90c1b08e7 10-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Finally nuke loc::SymbolVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
ea2dce2eb97312b2ceb93ce1f8ff067cd60f7d7a 10-Apr-2009 Anders Carlsson <andersca@mac.com> Add Expr::EvaluateAsLValue which will (believe it or not) try to evaluate an Expr as an LValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1b78276a75a5a0f496a82429c1ff9604d622a76d 10-Apr-2009 Anders Carlsson <andersca@mac.com> Add Expr::EvaluateAsLValue which will (believe it or not) try to evaluate an Expr as an LValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cfbd5a86d2128bce79457e99a58dfce6ffe0eef4 10-Apr-2009 Chris Lattner <sabre@nondot.org> fix indentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
c1da56ef012d02c77c13689f4ca1a2e4f002eb2a 10-Apr-2009 Chris Lattner <sabre@nondot.org> fix indentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
ab1cef74f1dd3666977c3d53645f21306f96e086 10-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> PCH serialization/deserialization of the source manager. With this
improvement, source locations read from the PCH file will properly
resolve to the source files that were used to build the PCH file
itself.

Once we have the preprocessor state stored in the PCH file, source
locations that refer to macro instantiations that occur in the PCH
file should have the appropriate instantiation information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Lex/Preprocessor.h
14f79002e58556798e86168c63e48d533287eda5 10-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH serialization/deserialization of the source manager. With this
improvement, source locations read from the PCH file will properly
resolve to the source files that were used to build the PCH file
itself.

Once we have the preprocessor state stored in the PCH file, source
locations that refer to macro instantiations that occur in the PCH
file should have the appropriate instantiation information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
lang/Lex/Preprocessor.h
1ce91f2da99710e0d14f15efc8c26d0fd8b24c4d 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allows
clients of the analyzer to designate custom assertion routines as "noreturn"
functions from the analyzer's perspective but not the compiler's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
b725232b46e92f3e36b03a32a6fc75748c312122 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Implement attribute "analyzer_noreturn" (<rdar://problem/6777003>). This allows
clients of the analyzer to designate custom assertion routines as "noreturn"
functions from the analyzer's perspective but not the compiler's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
c34897dac02ae4ac32e65601c9b175fa17edf1f6 10-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Implementation of pre-compiled headers (PCH) based on lazy
de-serialization of abstract syntax trees.

PCH support serializes the contents of the abstract syntax tree (AST)
to a bitstream. When the PCH file is read, declarations are serialized
as-needed. For example, a declaration of a variable "x" will be
deserialized only when its VarDecl can be found by a client, e.g.,
based on name lookup for "x" or traversing the entire contents of the
owner of "x".

This commit provides the framework for serialization and (lazy)
deserialization, along with support for variable and typedef
declarations (along with several kinds of types). More
declarations/types, along with important auxiliary structures (source
manager, preprocessor, etc.), will follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
2cf2634ffdb4f7c8d46cef3f8e60a55993f1c57a 10-Apr-2009 Douglas Gregor <dgregor@apple.com> Implementation of pre-compiled headers (PCH) based on lazy
de-serialization of abstract syntax trees.

PCH support serializes the contents of the abstract syntax tree (AST)
to a bitstream. When the PCH file is read, declarations are serialized
as-needed. For example, a declaration of a variable "x" will be
deserialized only when its VarDecl can be found by a client, e.g.,
based on name lookup for "x" or traversing the entire contents of the
owner of "x".

This commit provides the framework for serialization and (lazy)
deserialization, along with support for variable and typedef
declarations (along with several kinds of types). More
declarations/types, along with important auxiliary structures (source
manager, preprocessor, etc.), will follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/ExternalASTSource.h
lang/Frontend/PCHBitCodes.h
lang/Frontend/PCHReader.h
lang/Frontend/PCHWriter.h
e4cb3c885918ee0188495f47d76045831333e641 10-Apr-2009 Ted Kremenek <kremenek@apple.com> - Move ownership of MemRegionManager into ValueManager.
- Pull SVal::GetConjuredSymbol() and friends into ValueManager. This greatly
simplifies the calling interface to clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
8d7f5481a0eeb4c0508202a4bd2b754cfa93c4fe 10-Apr-2009 Ted Kremenek <kremenek@apple.com> - Move ownership of MemRegionManager into ValueManager.
- Pull SVal::GetConjuredSymbol() and friends into ValueManager. This greatly
simplifies the calling interface to clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueManager.h
c55b0b035289cd7702034bad930c71302bc80836 09-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Propagate the ASTContext to various AST traversal and lookup functions.
No functionality change (really).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/DeclObjC.h
lang/AST/DeclarationName.h
6ab3524f72a6e64aa04973fa9433b5559abb3525 09-Apr-2009 Douglas Gregor <dgregor@apple.com> Propagate the ASTContext to various AST traversal and lookup functions.
No functionality change (really).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/DeclObjC.h
lang/AST/DeclarationName.h
13c27cd3b576157bd593b41a8fbb550d4ac569a0 09-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Simple DeclContext's internal representation by always storing a
StoredDeclsMap, instead of using the it's-an-array-or-its-a-map
trick. I'll verify that performance isn't impacted later; for now, I
need the common representation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
c36c540c5bfce941f3d892919394d092491211f2 09-Apr-2009 Douglas Gregor <dgregor@apple.com> Simple DeclContext's internal representation by always storing a
StoredDeclsMap, instead of using the it's-an-array-or-its-a-map
trick. I'll verify that performance isn't impacted later; for now, I
need the common representation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
cda58d2bb87f7b48180e3469fb86b19bb21d34d7 09-Apr-2009 Ted Kremenek <kremenek@apple.com> Remove SVal::MakeZero and replace it with ValueManager::makeZeroVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
8e5fb2849d9a8cb40d008a409273766f8ff8f854 09-Apr-2009 Ted Kremenek <kremenek@apple.com> Remove SVal::MakeZero and replace it with ValueManager::makeZeroVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/ValueManager.h
2d643513564dfe6ce2d2f276514cf874be52ce77 09-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add more builtin definitions, including strcmp.
- PR3964.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
7a0048b3f59b9623e33bda2609c7a9fefc4a65c3 09-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add more builtin definitions, including strcmp.
- PR3964.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
e9e726ebd3b6b17a0a9fc5592bc8a3232340e673 09-Apr-2009 Ted Kremenek <kremenek@apple.com> analyzer: Introduce a new class, ValueManager, that serves as an aggregate
"manager of symbolic values", wrapping BasicValueFactory, SymbolManager, and
MemRegionManager. While these individual managers nicely separate functionality
in the analyzer, constructing symbolic values can sometimes be cumbersome
because it requires using multiple managers at once. The goal of this class is
to create some factory methods to create SVals that require the use of these
different managers, thus (hopefully) simplifying the analyzer API for clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/ValueManager.h
044b6f0417cb98741f277602fabf5f07ec9a02c0 09-Apr-2009 Ted Kremenek <kremenek@apple.com> analyzer: Introduce a new class, ValueManager, that serves as an aggregate
"manager of symbolic values", wrapping BasicValueFactory, SymbolManager, and
MemRegionManager. While these individual managers nicely separate functionality
in the analyzer, constructing symbolic values can sometimes be cumbersome
because it requires using multiple managers at once. The goal of this class is
to create some factory methods to create SVals that require the use of these
different managers, thus (hopefully) simplifying the analyzer API for clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/ValueManager.h
75f459ccb9ae8b7687ffac418d6aee3f8ba5d89b 09-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> stop using loc::SymbolVal and clean up code with new API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
c565b63a7905347a51249fafbcaf41b177a22bf0 09-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> stop using loc::SymbolVal and clean up code with new API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
62b4a2a1fae8b64ddc015b25a90b7ea24a2fa239 09-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a new method because sometimes the type of the conjured symbol is not the
type of the expression where we create the symbol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
fe1635bb27f5a13314169143cfdae6ecc6e4b3e2 09-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add a new method because sometimes the type of the conjured symbol is not the
type of the expression where we create the symbol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
8611215962af8d7ec7c25de0b8ee72659be67978 09-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Create a symbolic region instead of a loc::SymbolVal. This is a continued step
to eliminate the use of loc::SymbolVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
867418fdb53b351f7c88cb0255c4a250ea283c3a 09-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Create a symbolic region instead of a loc::SymbolVal. This is a continued step
to eliminate the use of loc::SymbolVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
49fd7ad55f63f6241e2a1818a5d4b10b925afa33 09-Apr-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6770998> make cast of super illegal (again:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a0c3e9cde1581b1b4d43ca89fdf413cd84eaec1f 09-Apr-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6770998> make cast of super illegal (again:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4f305c44f80bc448374014567021504529221c13 09-Apr-2009 Chris Lattner <sabre@nondot.org> add driver support for -Wno-trigraphs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
247aaa64f03c259a029205c1494d2a062e5629bd 09-Apr-2009 Chris Lattner <sabre@nondot.org> add driver support for -Wno-trigraphs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
0853ac9afc9a748ae037af7cb8381aa87bcf9c64 08-Apr-2009 Chris Lattner <sabre@nondot.org> implement -imacros support in driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
9b2ce37922ef34061cf0c193af7ce295a77d9298 08-Apr-2009 Chris Lattner <sabre@nondot.org> implement -imacros support in driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
f2895871e5f6a3865aaec0973ff293ad1338cbf4 08-Apr-2009 Ted Kremenek <kremenek@apple.com> Enhance analyzer reasoning about sending messages to nil. A nil receiver returns 0 for scalars of size <= sizeof(void*).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
da9ae6088b9543134a6561a412b79530e290408d 08-Apr-2009 Ted Kremenek <kremenek@apple.com> Enhance analyzer reasoning about sending messages to nil. A nil receiver returns 0 for scalars of size <= sizeof(void*).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
f77da7e846ba296384cea237f00f03d43351ca78 08-Apr-2009 Chris Lattner <sabre@nondot.org> reject the #__include_macros directive unless it comes from the
predefines buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
de076650fa79a02743b5fe57a72f991ba24779f9 08-Apr-2009 Chris Lattner <sabre@nondot.org> reject the #__include_macros directive unless it comes from the
predefines buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
lang/Lex/Preprocessor.h
0e004a10bfb9560c7b2507267362672d3e93f3fb 08-Apr-2009 Chris Lattner <sabre@nondot.org> Add initial support for -imacros. Right now it has the same semantics as
-include, but that will be fixed soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
b8e240ed8b8f58c7b7fe82776bd6147b437f5d53 08-Apr-2009 Chris Lattner <sabre@nondot.org> Add initial support for -imacros. Right now it has the same semantics as
-include, but that will be fixed soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
cdd3c76f2e9e6897c185b35559e68cc2bf6506ae 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> More fixes to builtin preprocessor defines.
- Add -static-define option driver can use when __STATIC__ should be
defined (instead of __DYNAMIC__).

- Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.

- Set __NO_INLINE__ following GCC 4.2.

- Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.

- Set __EXCEPTIONS for Objective-C NonFragile ABI.

- Set __STRICT_ANSI__ for standard conforming modes.

- I added a clang style test case in utils for this, but its not
particularly portable and I don't think it belongs in the test
suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
3bbc75302fd43cf13d868b46c94ff8794b302e43 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> More fixes to builtin preprocessor defines.
- Add -static-define option driver can use when __STATIC__ should be
defined (instead of __DYNAMIC__).

- Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.

- Set __NO_INLINE__ following GCC 4.2.

- Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.

- Set __EXCEPTIONS for Objective-C NonFragile ABI.

- Set __STRICT_ANSI__ for standard conforming modes.

- I added a clang style test case in utils for this, but its not
particularly portable and I don't think it belongs in the test
suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
6ba226808459888c545a6a100813e7866169c830 08-Apr-2009 Steve Naroff <snaroff@apple.com> Sema::CheckConditionalOperands(): Soften pointer/integer mismatch from error->warning.

Fixes <rdar://problem/6762239> [sema] gcc incompatibility; error on incompatible operand types in ?:.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9158804749356f88be8c5a3bade75b761846273c 08-Apr-2009 Steve Naroff <snaroff@apple.com> Sema::CheckConditionalOperands(): Soften pointer/integer mismatch from error->warning.

Fixes <rdar://problem/6762239> [sema] gcc incompatibility; error on incompatible operand types in ?:.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dedc94c29b4dd7cec9aa290170f7bb1062a2a9b1 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make debug info work when using -save-temps.
- This is pretty ugly, but the most obvious solution. Chime in if you
have a nicer one.

- The problem is that with -save-temps, clang-cc has no idea what the
name of the original input file is. However, the user expects to be
able to set breakpoints based on the input file name.

- We support this by providing a new option -main-file-name (similar
to -dumpbase used by gcc) which allows the driver to pass in the
original file name.

- <rdar://problem/6753383> building with clang using --save-temps
gets the compile unit name from the .i file...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
c9abc043af88f90d177a5bd147f627b78ca49fde 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make debug info work when using -save-temps.
- This is pretty ugly, but the most obvious solution. Chime in if you
have a nicer one.

- The problem is that with -save-temps, clang-cc has no idea what the
name of the original input file is. However, the user expects to be
able to set breakpoints based on the input file name.

- We support this by providing a new option -main-file-name (similar
to -dumpbase used by gcc) which allows the driver to pass in the
original file name.

- <rdar://problem/6753383> building with clang using --save-temps
gets the compile unit name from the .i file...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
6a150e1c6ce14440d70edf69ecb4ddcf13130635 08-Apr-2009 Chris Lattner <sabre@nondot.org> improve compatibility with VC+, patch by John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
a27e5feaab38b99a0e4473247dbd157f015ea4d1 08-Apr-2009 Chris Lattner <sabre@nondot.org> improve compatibility with VC+, patch by John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclContextInternals.h
e7c6d4fac636e290fa0e3a59adda20c07d7d8ae7 08-Apr-2009 Ted Kremenek <kremenek@apple.com> New static analyzer check by Nikita Zhuk!

"The attached patch generates warnings of cases where an ObjC message is sent to
a nil object and the size of return type of that message is larger than the size
of void pointer. This may result in undefined return values as described in PR
2718. The patch also includes test cases."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
899b3de7bc32434fc406f35255cc828ba8372b3d 08-Apr-2009 Ted Kremenek <kremenek@apple.com> New static analyzer check by Nikita Zhuk!

"The attached patch generates warnings of cases where an ObjC message is sent to
a nil object and the size of return type of that message is larger than the size
of void pointer. This may result in undefined return values as described in PR
2718. The patch also includes test cases."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
e079c717362b860dbad093253e55255ce76321f6 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set __PIC__ (more) correctly.
- Add -pic-level clang-cc option to specify the value for the define,
updated driver to pass this.

- Added __pic__

- Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
9fd0b1f845a61e71dd8099f596532d34c519630a 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set __PIC__ (more) correctly.
- Add -pic-level clang-cc option to specify the value for the define,
updated driver to pass this.

- Added __pic__

- Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
7ad5e312a1f68ead5df0ecefb5cf7811e19a546d 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward remaining -f options to clang manually.
- Groups are really just intended to hold inherent structure of the
options, not be abused for individual tool argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
3aaf082689d3235937a2e56a60f90fc1b3aebfb2 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward remaining -f options to clang manually.
- Groups are really just intended to hold inherent structure of the
options, not be abused for individual tool argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
c7e14460094afb16b2110d132f2140c2d0e4e3be 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Only forward last instance of -mmacosx-version-min= and
-isysroot to clang.
- Don't forward arbitrary -i* options to clang, just the ones we know
about.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
2ac9fc2ad64e16127df8c60caeea2edfe9a400a2 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Only forward last instance of -mmacosx-version-min= and
-isysroot to clang.
- Don't forward arbitrary -i* options to clang, just the ones we know
about.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
9d805ce49ec3f5061b9c6944f9da1693cf701cca 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Manually translate a number of -f with no- variants options to
clang.
- We will eventually want some more driver infrastructre for this
probably.

- For now, the clang-cc interface stays relatively the same, but we
don't accept multiple instances anymore, or the [no-] variants
directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
48d1ef782c8c88066b5febf60f8f456064d7d3f0 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Manually translate a number of -f with no- variants options to
clang.
- We will eventually want some more driver infrastructre for this
probably.

- For now, the clang-cc interface stays relatively the same, but we
don't accept multiple instances anymore, or the [no-] variants
directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
9e5c3953213d392c7892480202dd8625a915a711 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add default for ArgList::hasFlag and simplify implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
9af6668984f1594459a58c381d95272aa7ca7663 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add default for ArgList::hasFlag and simplify implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
f834eaff447215c2bb25961757e7aa0184c6f3a7 07-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Diagnose uses of function specifiers on declarations which don't declare
functions. Fixes PR3941.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
85a5319ea4b5c916d7dd665e84af61e4a8a0b9c2 07-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Diagnose uses of function specifiers on declarations which don't declare
functions. Fixes PR3941.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
31abb2b2bc7607fe83fb161fcf382bb54cab2def 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly warn that -pg isn't supported (even though we
aren't failing the compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
5c1aaafbd6dd25a99ca1960e1c3c98aeefe9d728 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly warn that -pg isn't supported (even though we
aren't failing the compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
1cfd891cf792c46f2b740a074ec2ba716ead3cd8 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add 'q' flag for options which shouldn't be reported as unused.
- <rdar://problem/6756295> warning about '-dynamic' argument unused
during compilation seems incorrect


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.def
1e23f5f963dd6a3cee43ace77578161798e41e2d 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add 'q' flag for options which shouldn't be reported as unused.
- <rdar://problem/6756295> warning about '-dynamic' argument unused
during compilation seems incorrect


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.def
d2b6edce099c2f8888e358bbef10736002d1948a 07-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Move the internal DeclContext data structures into a separate header.

Simplify the addition of a case statement to a switch.

Fix -print-stats for attribute-qualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/DeclVisitor.h
lang/AST/Stmt.h
c2ee10d79f70036af652a395ac1f8273f3d04e12 07-Apr-2009 Douglas Gregor <dgregor@apple.com> Move the internal DeclContext data structures into a separate header.

Simplify the addition of a case statement to a switch.

Fix -print-stats for attribute-qualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclContextInternals.h
lang/AST/DeclVisitor.h
lang/AST/Stmt.h
676c28bb915a6c7f09c12b58c2be65ea47156f0c 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: More verbosity reduction.
- Ignore some more -W options and -[fm] options which we can somewhat
safely ignore.

- Recognize that -W is an alias for -Wextra

W: -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wfour-char-constants -Winit-self -Wmissing-format-attribute -Wno-#warnings -Wno-comment -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wstrict-prototypes -Wunused-parameter

f: -fconstant-cfstrings -fdollars-in-identifiers -finline -finline-functions -fno-inline -fno-keep-inline-functions -fno-strict-aliasing -fobjc-atdefs -fobjc-call-cxx-cdtors -fobjc-new-property -fstack-protector

m: -mconstant-cfstrings -mfix-and-continue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
16fd3a9f5159b74bfdd65cf290b4bd091088de91 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: More verbosity reduction.
- Ignore some more -W options and -[fm] options which we can somewhat
safely ignore.

- Recognize that -W is an alias for -Wextra

W: -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wfour-char-constants -Winit-self -Wmissing-format-attribute -Wno-#warnings -Wno-comment -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wstrict-prototypes -Wunused-parameter

f: -fconstant-cfstrings -fdollars-in-identifiers -finline -finline-functions -fno-inline -fno-keep-inline-functions -fno-strict-aliasing -fobjc-atdefs -fobjc-call-cxx-cdtors -fobjc-new-property -fstack-protector

m: -mconstant-cfstrings -mfix-and-continue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
8654a5b5e407cdc32b1c4ea62363160d37eed055 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Implement __sync_{add,sub,and,or,xor}_and_fetch and
__sync_bool_compare_and_swap.
- <rdar://problem/6762223> [sema/irgen] support
__sync_bool_compare_and_swap and __sync_add_and_fetch


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
0002d23aaf10f307273dab5facda01c137283d22 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Implement __sync_{add,sub,and,or,xor}_and_fetch and
__sync_bool_compare_and_swap.
- <rdar://problem/6762223> [sema/irgen] support
__sync_bool_compare_and_swap and __sync_add_and_fetch


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
6819955c0da56c4ec39f80e83982374dca4cd38d 07-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Warn instead of error on duplicate protocol definitions.
Be kind to so many projects which are doing this (and be
like gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e2573e529d8630e1586e8fb1230938d6e1d799e5 07-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Warn instead of error on duplicate protocol definitions.
Be kind to so many projects which are doing this (and be
like gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
01d9ee4cc963c74f9cfd4030103955962a35112f 07-Apr-2009 Ted Kremenek <kremenek@apple.com> PathDiagnosticLocation now also wraps Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
fea5f5a1e8fe558d716ddeddf1aecf63f2e9a54f 07-Apr-2009 Ted Kremenek <kremenek@apple.com> PathDiagnosticLocation now also wraps Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
a0bd8a94fb46edac5aa60a1373bcd735790cb2f6 07-Apr-2009 Steve Naroff <snaroff@apple.com> Make casting 'super' a deprecated warning (instead of a hard error).

This will simplify clang adoption, and is probably better "etiquette" (since gcc has always accepted this idiom without warning). Once we are over the adoption hurdle, we can turn this into an error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fc479d793b5daa20bbf54651b83a90e77e907949 07-Apr-2009 Steve Naroff <snaroff@apple.com> Make casting 'super' a deprecated warning (instead of a hard error).

This will simplify clang adoption, and is probably better "etiquette" (since gcc has always accepted this idiom without warning). Once we are over the adoption hurdle, we can turn this into an error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
dfd776447509180ce32d1427f5ac7939ed1a9074 06-Apr-2009 Anders Carlsson <andersca@mac.com> Define __OPTIMIZE__ and __OPTIMIZE_SIZE__ if the -O[12] and -Os flags are passed to the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
4ca076fffdfa72ebfab364c8de091b89fc291ae6 06-Apr-2009 Anders Carlsson <andersca@mac.com> Define __OPTIMIZE__ and __OPTIMIZE_SIZE__ if the -O[12] and -Os flags are passed to the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
cb9469d0dff4e2999f5dfb7087a08c0d8e6d7bdd 06-Apr-2009 Chris Lattner <sabre@nondot.org> Daniel convinced me that accepting "const va_list" arguments to va_arg is
a really really bad idea. Now that we emit an error about the unpromoted
type, users should be able to understand what is going on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
3f419761288f6ce8ffc284e9e241c28b536fce35 06-Apr-2009 Chris Lattner <sabre@nondot.org> Daniel convinced me that accepting "const va_list" arguments to va_arg is
a really really bad idea. Now that we emit an error about the unpromoted
type, users should be able to understand what is going on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
89a72c56e87128c3e86051131b510335bc0f09e0 05-Apr-2009 Chris Lattner <sabre@nondot.org> Add a warning for questionable va_args usage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9dc8f19a5394c4268727f0d755623f8d56416e7c 05-Apr-2009 Chris Lattner <sabre@nondot.org> Add a warning for questionable va_args usage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9a553c4c52b949a7b662e781196bb587462c6ea7 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -dumpversion, this is used by some configuration
scripts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
e06dc219a869d73b6c9a398a2dee0aa2d4e2dcf0 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -dumpversion, this is used by some configuration
scripts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
2431e605018b816767570dc53eae345183d9f8e6 04-Apr-2009 Anton Korobeynikov <asl@math.spbu.ru> Basic support for regparm codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
1102f4282ceb430dbc9fcedb9dd2ad25898a09e8 04-Apr-2009 Anton Korobeynikov <asl@math.spbu.ru> Basic support for regparm codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
8fcffeb6ce16ac977e11f965077e8dfbb62dd4bd 04-Apr-2009 Anton Korobeynikov <asl@math.spbu.ru> Provide sema proper values of maximal number of arguments passed in registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TargetInfo.h
264a76cdf382c507f4d43e64c89f1503f003ac95 04-Apr-2009 Anton Korobeynikov <asl@math.spbu.ru> Provide sema proper values of maximal number of arguments passed in registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TargetInfo.h
025de204498d19c7d684769858d86b97667c918b 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -Qunused-arguments option to suppress driver "unused
arguments" warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
bf4a6767a8fd4f81df93c55f88b1b4b7142a04d4 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -Qunused-arguments option to suppress driver "unused
arguments" warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
66549c46330647bceec3c2fb4189e0bb076a254b 03-Apr-2009 Chris Lattner <sabre@nondot.org> improve the string literal comparison warning to not call @encode's "string literals".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
95f49fb26637e0f271bca580e8e20ce3c08ac2e9 03-Apr-2009 Chris Lattner <sabre@nondot.org> improve the string literal comparison warning to not call @encode's "string literals".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
eb4efed0be2f096eb7f2d8a3680d3dff9a278dc7 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly ignore -fpch-preprocess when using clang, we don't
need to do anything special to support this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Options.def
68fb469aeb19144403e703b825854d08353c8eea 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly ignore -fpch-preprocess when using clang, we don't
need to do anything special to support this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Options.def
4c56f99519089cbc022fa69a83bcd876d68e4e28 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reduce Driver verbosity by suppressing unused warning about another
cluster of -W options.

The list: -Waggregate-return -Wbad-function-cast -Wcast-qual
-Wformat-security -Wformat=2 -Wformat -Wmissing-declarations
-Wnewline-eof -Wno-parentheses -Wpacked -Wredundant-decls -Wshadow
-Wsign-compare -Wstrict-overflow= -Wstrict-overflow -Wuninitialized
-Wunknown-pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
93e54836706ba0c4c1bbf23b72e179263f218245 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reduce Driver verbosity by suppressing unused warning about another
cluster of -W options.

The list: -Waggregate-return -Wbad-function-cast -Wcast-qual
-Wformat-security -Wformat=2 -Wformat -Wmissing-declarations
-Wnewline-eof -Wno-parentheses -Wpacked -Wredundant-decls -Wshadow
-Wsign-compare -Wstrict-overflow= -Wstrict-overflow -Wuninitialized
-Wunknown-pragmas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
0a7e2e95566ed952f18bea49f1482ecd955957f2 03-Apr-2009 Chris Lattner <sabre@nondot.org> Fix Clang on VC++, patch by Bixia Zheng!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
ff9b446dd1db0ed3a89403373df83b0da81dc6f5 03-Apr-2009 Chris Lattner <sabre@nondot.org> Fix Clang on VC++, patch by Bixia Zheng!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
cec0374ffa1f3ca65b875506d3a66c434c643aa6 03-Apr-2009 Chris Lattner <sabre@nondot.org> fix some warnings on VC++, patch by John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Stmt.h
fb523e16dd1f860ff02a3ae03e5e3e25327a5860 03-Apr-2009 Chris Lattner <sabre@nondot.org> fix some warnings on VC++, patch by John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Stmt.h
f0377a948e98ffe328a1d58c8b9fc76aa36e2c2d 03-Apr-2009 Chris Lattner <sabre@nondot.org> initialize an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
c83cb1beddb6dab1226ea88c60a0f1e2263f6d48 03-Apr-2009 Chris Lattner <sabre@nondot.org> initialize an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
1f48e436a6b82ca9e0b533771633aa549729e2c8 03-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> This is the first step to gradually remove the use of loc::SymbolVal. Now
when creating symbolic values, we distinguish between location and non-location
values. For location values, we create a symbolic region instead of a
loc::SymbolVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
a1718c78770db93d1b762620f07728a56786f2ae 03-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> This is the first step to gradually remove the use of loc::SymbolVal. Now
when creating symbolic values, we distinguish between location and non-location
values. For location values, we create a symbolic region instead of a
loc::SymbolVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
4bda26203c1f15f56a36989ee82d8b3467f6afb8 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Do we have fixit advice for comments yet?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
6d7d8398e71a8bd121d3b46e250f1dbcfb9679d4 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Do we have fixit advice for comments yet?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f5db69b661b04556c28994e816601902d6129cae 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
23d16b3efb640f0d34d95557c51b82d037d08adc 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68370 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
49343339a8f693f76108e9c84b8a4c3ea48a99e9 03-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Implement -fvisibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
7cd2e93125e2f3b6ca01b24ed0c3fd7e94683fd9 03-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Implement -fvisibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
6a91648fe9226db360759a23c89bb5aec3f3ceab 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add target hook for setting symbol prefix and section of unicode
string literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
a9668e0b4c451a1021fe650c451b54dc98c2d18d 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add target hook for setting symbol prefix and section of unicode
string literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
24b48b064cb801d6f38ad8f7aac0f535bc0be3e0 02-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add a new command-line option "-fixit-at=file:line:column" that only
applies fix-its to error messages that occur at that specific location
in the program.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
26df2f09587ad6978ac8e357ca46b2731d591cc4 02-Apr-2009 Douglas Gregor <dgregor@apple.com> Add a new command-line option "-fixit-at=file:line:column" that only
applies fix-its to error messages that occur at that specific location
in the program.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
f71b7740f3a3544b325cec81205c7e989149f773 02-Apr-2009 Mike Stump <mrs@apple.com> Remove -ftrapu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
035cf8911c2282550411be70f370dfe5d282b5c9 02-Apr-2009 Mike Stump <mrs@apple.com> Remove -ftrapu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
563a251a2b3d640d631c014bea16eda560c27d3e 02-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Provide FIX-IT notes to describe what fix-it is doing behind the
scenes, using the underlying diagnostic client to format the
messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FixItRewriter.h
de4bf6a63219c5b9d3bce1fed3dfe075568098a0 02-Apr-2009 Douglas Gregor <dgregor@apple.com> Provide FIX-IT notes to describe what fix-it is doing behind the
scenes, using the underlying diagnostic client to format the
messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FixItRewriter.h
a8f2ae69c8ca9cfdbce4f7c45709e6d6f22229fa 02-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> When calling a function without a prototype for which we have a
definition, warn if there are too many/too few function call
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
74734d576b1dd082f623abb76ab204d69970dadb 02-Apr-2009 Douglas Gregor <dgregor@apple.com> When calling a function without a prototype for which we have a
definition, warn if there are too many/too few function call
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
00e935b0ffe95a769a5cede65a084aa76d528a04 02-Apr-2009 Chris Lattner <sabre@nondot.org> add TemplateName.cpp/h to the xcode project, minor tidying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
c960ee31c7e22a157a8cd31c92d9a9aa945e1e96 02-Apr-2009 Chris Lattner <sabre@nondot.org> add TemplateName.cpp/h to the xcode project, minor tidying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
899ae67dc06ebe16da389d33b837962a85c6db04 02-Apr-2009 Ted Kremenek <kremenek@apple.com> Hack: Add 'PathDiagnostic::flattenLocations()'. Because PlistDiagnosticClient
can use a PathLocation after any reference Stmts are reclaimed,
flattenLocation() converts those references to statements to source ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
96a69267fc771dcb288bb7b3c5b5b6d49a9542ff 02-Apr-2009 Ted Kremenek <kremenek@apple.com> Hack: Add 'PathDiagnostic::flattenLocations()'. Because PlistDiagnosticClient
can use a PathLocation after any reference Stmts are reclaimed,
flattenLocation() converts those references to statements to source ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
9802a0af70a8ca442ab2646c7d68b42c2e91573d 02-Apr-2009 Chris Lattner <sabre@nondot.org> fix a FIXME, providing accurate source range info for DeclStmt's. The end
of the range is now the ';' location. For something like this:

$ cat t2.c

#define bool int
void f(int x, int y) {
bool b = !x && y;
}

We used to produce:
$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14> <----
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <line:4:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")


Now we produce:

$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14, line:4:17> <------
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <col:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
97144fc41a9419bf6d74fc9450e8ef3f6e11f7e0 02-Apr-2009 Chris Lattner <sabre@nondot.org> fix a FIXME, providing accurate source range info for DeclStmt's. The end
of the range is now the ';' location. For something like this:

$ cat t2.c

#define bool int
void f(int x, int y) {
bool b = !x && y;
}

We used to produce:
$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14> <----
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <line:4:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")


Now we produce:

$ clang-cc t2.c -ast-dump
typedef char *__builtin_va_list;

void f(int x, int y)
(CompoundStmt 0x2201f10 <t2.c:3:22, line:5:1>
(DeclStmt 0x2201ef0 <line:2:14, line:4:17> <------
0x2201a20 "int b =
(BinaryOperator 0x2201ed0 <col:10, col:16> 'int' '&&'
(UnaryOperator 0x2201e90 <col:10, col:11> 'int' prefix '!'
(DeclRefExpr 0x2201c90 <col:11> 'int' ParmVar='x' 0x2201a50))
(DeclRefExpr 0x2201eb0 <col:16> 'int' ParmVar='y' 0x2201e10))")



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
133d2554efb2245f1757becfd369cb298495f0bc 02-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a "-fixit" mode to clang-cc that applies code-modification hints.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
558cb56caf8906e0adbe643e3febbef0b7af1b9f 02-Apr-2009 Douglas Gregor <dgregor@apple.com> Introduce a "-fixit" mode to clang-cc that applies code-modification hints.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/FixItRewriter.h
0f595bbd73ed9dc1ede9d4d9ea597e37a89227ce 02-Apr-2009 Mike Stump <mrs@apple.com> Fixup -ftrapv to be more gcc compatible. -ftrapu (for want of a
better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned. I added some testcases so we don't
break anything.

Also included is another patch from David for += and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
5d8b2cf9fd704f6ca5e33525803a65421c0b440e 02-Apr-2009 Mike Stump <mrs@apple.com> Fixup -ftrapv to be more gcc compatible. -ftrapu (for want of a
better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned. I added some testcases so we don't
break anything.

Also included is another patch from David for += and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68267 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
3faaa81f0ad6ec851c64050c6e10f01b5c623748 02-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add some more code modification hints

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
a3a835149ed4b183e3b009a1f94a6123779d696b 02-Apr-2009 Douglas Gregor <dgregor@apple.com> Add some more code modification hints

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
126da5e5a1461d63cd60121c0c25704fb546f672 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Allow -ccc-gcc-name to specify the name/path to use when
calling gcc in generic configurations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
78d8a089c8f124ba6f47bb37e2c4a36986f60e23 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Allow -ccc-gcc-name to specify the name/path to use when
calling gcc in generic configurations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
1ba5cb396d90db17a6d186891c1776ad0935a4a3 02-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add code modification hints to various parsing-related diagnostics.

Plus, reword a extension warnings to avoid talking about "ISO C" when
the extension might also be available in C++ or C++0x.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
9b3064b55f3c858923734e8b1c9831777fc22554 02-Apr-2009 Douglas Gregor <dgregor@apple.com> Add code modification hints to various parsing-related diagnostics.

Plus, reword a extension warnings to avoid talking about "ISO C" when
the extension might also be available in C++ or C++0x.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Parse/DeclSpec.h
d7cb037d4b143f66083a4bca56b8b9e51606f9f0 01-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Make parsing a semantic analysis a little more robust following Sema
failures that involve malformed types, e.g., "typename X::foo" where
"foo" isn't a type, or "std::vector<void>" that doens't instantiate
properly.

Similarly, be a bit smarter in our handling of ambiguities that occur
in Sema::getTypeName, to eliminate duplicate error messages about
ambiguous name lookup.

This eliminates two XFAILs in test/SemaCXX, one of which was crying
out to us, trying to tell us that we were producing repeated error
messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
31a19b6989bbf326d2de5ae12e712e2a65ca9c34 01-Apr-2009 Douglas Gregor <dgregor@apple.com> Make parsing a semantic analysis a little more robust following Sema
failures that involve malformed types, e.g., "typename X::foo" where
"foo" isn't a type, or "std::vector<void>" that doens't instantiate
properly.

Similarly, be a bit smarter in our handling of ambiguities that occur
in Sema::getTypeName, to eliminate duplicate error messages about
ambiguous name lookup.

This eliminates two XFAILs in test/SemaCXX, one of which was crying
out to us, trying to tell us that we were producing repeated error
messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5e6084cc603111587df403ce188b17e5928e5ac9 01-Apr-2009 Steve Naroff <snaroff@apple.com> CodeGenModule::GetAddrOfConstantCFString():
- Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants.

Remove warning from CheckObjCString.

As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b59212a6e494d2c364b54462f545833902c29158 01-Apr-2009 Steve Naroff <snaroff@apple.com> CodeGenModule::GetAddrOfConstantCFString():
- Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants.

Remove warning from CheckObjCString.

As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
db789919a1dd1af6123a4caff699a40f082b5514 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is and two bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
2add47387d39ee6c40dcb0e9f3d51c27ad1e113c 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is and two bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
789c0106af6dfcd4d614839d2a32c71d77db36d2 01-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Revert r68221, -ftrapv support, which causes several regressions in
Clang's test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
7e203b7f5d894b1969765332e35c6a8b4d45556f 01-Apr-2009 Douglas Gregor <dgregor@apple.com> Revert r68221, -ftrapv support, which causes several regressions in
Clang's test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68230 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
d4b0bd683558291a28dfc5be82f976e31c94230d 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
3fb07bdc32cb301a8438c297fe7d68542a7537b2 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Driver/Options.def
82e5db22dbf69459dc108176bbef86bd1287c151 01-Apr-2009 Steve Naroff <snaroff@apple.com> Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.

#ifdef'd out the 5 conversion routines that we don't currently need.

Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.

Expect to remove the FIXME today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/ConvertUTF.h
e9b7d8ace8674585818990cff585daae7745bd88 01-Apr-2009 Steve Naroff <snaroff@apple.com> Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.

#ifdef'd out the 5 conversion routines that we don't currently need.

Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.

Expect to remove the FIXME today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/ConvertUTF.h
da0c4d26ecb98b02a0f22bde39a1a45dbc2f6d3f 01-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Give Type::getDesugaredType a "for-display" mode that can apply more
heuristics to determine when it's useful to desugar a type for display
to the user. Introduce two C++-specific heuristics:

- For a qualified type (like "foo::bar"), only produce a new
desugred type if desugaring the qualified type ("bar", in this
case) produces something interesting. For example, if "foo::bar"
refers to a class named "bar", don't desugar. However, if
"foo::bar" refers to a typedef of something else, desugar to that
something else. This gives some useful desugaring such as
"foo::bar (aka 'int')".
- Don't desugar class template specialization types like
"basic_string<char>" down to their underlying "class
basic_string<char, char_traits<char>, allocator<char>>, etc.";
it's better just to leave such types alone.

Update diagnostics.html with some discussion and examples of type
preservation in C++, showing qualified names and class template
specialization types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
969c689d893a248eca4f049f5b89f747e66e4bff 01-Apr-2009 Douglas Gregor <dgregor@apple.com> Give Type::getDesugaredType a "for-display" mode that can apply more
heuristics to determine when it's useful to desugar a type for display
to the user. Introduce two C++-specific heuristics:

- For a qualified type (like "foo::bar"), only produce a new
desugred type if desugaring the qualified type ("bar", in this
case) produces something interesting. For example, if "foo::bar"
refers to a class named "bar", don't desugar. However, if
"foo::bar" refers to a typedef of something else, desugar to that
something else. This gives some useful desugaring such as
"foo::bar (aka 'int')".
- Don't desugar class template specialization types like
"basic_string<char>" down to their underlying "class
basic_string<char, char_traits<char>, allocator<char>>, etc.";
it's better just to leave such types alone.

Update diagnostics.html with some discussion and examples of type
preservation in C++, showing qualified names and class template
specialization types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68207 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9a744e58dcfc2ba9a639be2d7a07e806415d206b 01-Apr-2009 Steve Naroff <snaroff@apple.com> More "prep" work for handling UTF16 CFString.

Patch by Jean-Daniel Dupas. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8d4141f83d9de379547cf05bd75d4c6cf894b189 01-Apr-2009 Steve Naroff <snaroff@apple.com> More "prep" work for handling UTF16 CFString.

Patch by Jean-Daniel Dupas. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7573221654c5470c1a708beab7ef4338bfcaeee9 01-Apr-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/6740387>. Sending nil to an object that returns a struct
should only be an error if that value is consumed. This fix was largely
accomplished by moving 'isConsumedExpr' back to ParentMap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
lang/Analysis/PathSensitive/GRExprEngine.h
b930d7adb7cb7642c9c49b39df04ebd5cbfa713a 01-Apr-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/6740387>. Sending nil to an object that returns a struct
should only be an error if that value is consumed. This fix was largely
accomplished by moving 'isConsumedExpr' back to ParentMap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
lang/Analysis/PathSensitive/GRExprEngine.h
46ee0f3f00561293f0dd50eee67083227273113f 01-Apr-2009 Chris Lattner <sabre@nondot.org> remove ASTContext::buildObjCInterfaceType, which breaks canonical
types. It is no longer needed now that the code generator
re-lays-out interfaces if they are defines after being laid out
from a forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
03d9f34a96ea28eaa698cc779462a1ce1dc79105 01-Apr-2009 Chris Lattner <sabre@nondot.org> remove ASTContext::buildObjCInterfaceType, which breaks canonical
types. It is no longer needed now that the code generator
re-lays-out interfaces if they are defines after being laid out
from a forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2fba615a01fdcf27d03c41117bfc266db7955812 01-Apr-2009 Ted Kremenek <kremenek@apple.com> - Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocation
instead of a FullSourceLoc. This resulted in a bunch of small edits in various
clients.
- Updated BugReporter to include an alternate PathDiagnostic generation
algorithm for PathDiagnosticClients desiring more control-flow pieces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
5fb5dfb6646464db3cd6d54a6332375c8fe36b75 01-Apr-2009 Ted Kremenek <kremenek@apple.com> - Changed PathDiagnosticPiece::getLocation() to return a PathDiagnosticLocation
instead of a FullSourceLoc. This resulted in a bunch of small edits in various
clients.
- Updated BugReporter to include an alternate PathDiagnostic generation
algorithm for PathDiagnosticClients desiring more control-flow pieces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
b96c754daae75f88947a2b3d36530c8fd71cf6e7 01-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Follow gcc's example and warn by default on unknown escapes. Inspired
by mailing list message about "\phello" style strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
aec5cabee22888bbc052585bfcfa11eb1d1478cb 01-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Follow gcc's example and warn by default on unknown escapes. Inspired
by mailing list message about "\phello" style strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
ab4f8648d764cf753bcd87a3f8ebbe43e856aa76 01-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Flip diagnostic from Warning to ExtWarn so that it's an error
with -pedantic-errors. This fixes the C99 part of PR3919.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
6c105c403025a42ef49641586ba34c23bbfa7958 01-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Flip diagnostic from Warning to ExtWarn so that it's an error
with -pedantic-errors. This fixes the C99 part of PR3919.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
77da58034d00866f3261d2c657a5823578f73028 01-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Parsing, semantic analysis, and template instantiation for typename
specifiers that terminate in a simple-template-id, e.g.,

typename MetaFun::template apply<T1, T2>

Also, implement template instantiation for dependent
nested-name-specifiers that involve unresolved identifiers, e.g.,

typename T::type::type





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/NestedNameSpecifier.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
1734317845d60307d474b5da8a8d33adbaf5e723 01-Apr-2009 Douglas Gregor <dgregor@apple.com> Parsing, semantic analysis, and template instantiation for typename
specifiers that terminate in a simple-template-id, e.g.,

typename MetaFun::template apply<T1, T2>

Also, implement template instantiation for dependent
nested-name-specifiers that involve unresolved identifiers, e.g.,

typename T::type::type





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/NestedNameSpecifier.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/Basic/DiagnosticParseKinds.td
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
c3a4893262053ed2efc04a6128358cc8f706a5a0 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add Target hooks for IRgen of [cf]string literals.
- Notably, set section on cfstring literal string data (for now, this
is done everywhere because it matches what we were already doing
for the CFString data itself)

- <rdar://problem/6599098> [irgen] linker requires objc string data
to go into cstring


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
8e5c2b8072f4409c7c0004331d1db9652d5209c0 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add Target hooks for IRgen of [cf]string literals.
- Notably, set section on cfstring literal string data (for now, this
is done everywhere because it matches what we were already doing
for the CFString data itself)

- <rdar://problem/6599098> [irgen] linker requires objc string data
to go into cstring


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e627b6808b4f973c64a8b3b5612e8b609a0d1bff 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement basic --help text.
- PR3875.
- <rdar://problem/6615249> [driver] ccc should support some form of
--help


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Options.def
91e28afe3503893c69afd71877f11e3bf03fa4ce 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement basic --help text.
- PR3875.
- <rdar://problem/6615249> [driver] ccc should support some form of
--help


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Options.def
9ea3322dcf04fe44bdd6f0d328cd4648660986c7 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::getOptionKind.

Also, removed default value for getOptionMetaVar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
febdf7d3858539a3533895bdeb3bd5c083fb087a 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::getOptionKind.

Also, removed default value for getOptionMetaVar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
f9ea36b71d12c7dff9b75db5f20001c91884fa84 31-Mar-2009 Ted Kremenek <kremenek@apple.com> Allow two codepaths for PathDiagnostic generation. This patch mainly consists of
refactoring to make this possible (no functionality change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
7dc8664a54f4ede40a5f4adee3f5081a59d7ee1c 31-Mar-2009 Ted Kremenek <kremenek@apple.com> Allow two codepaths for PathDiagnostic generation. This patch mainly consists of
refactoring to make this possible (no functionality change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
aed9804d13f675e5739e1139938bcc2cac8c6e3b 31-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Some cleanup and renaming. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/AST/TemplateName.h
9bde77309fd2f9f7a53446e374472c48c81f5182 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Some cleanup and renaming. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
lang/AST/TemplateName.h
636cccdd9342180597906f56e44179502aec2ef2 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add extra parameters for help text to option definitions.
- Currently unused.

And yes, now may be about the time I want a TableGen backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Options.h
c0d12e93ee244534147960334c095a6d6510d0ae 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add extra parameters for help text to option definitions.
- Currently unused.

And yes, now may be about the time I want a TableGen backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Options.h
15a928580f936a76dc09f5f57c055122d32d763d 31-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for template names, including both
template template parameters and dependent template names. For
example, the oft-mentioned

typename MetaFun::template apply<T1, T2>::type

can now be instantiated, with the appropriate name lookup for "apply".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
lang/Basic/DiagnosticSemaKinds.td
de650ae96b53eb6109f29fdb5ee51c514259e6e4 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for template names, including both
template template parameters and dependent template names. For
example, the oft-mentioned

typename MetaFun::template apply<T1, T2>::type

can now be instantiated, with the appropriate name lookup for "apply".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68128 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TemplateName.h
lang/Basic/DiagnosticSemaKinds.td
ed2a889909b96a10a1d592b353c1398e397dd35c 31-Mar-2009 Steve Naroff <snaroff@apple.com> Add -Wdeprecated-declarations to driver and add a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
cfdee929290b73ae1c4e5896d5cba120bc677661 31-Mar-2009 Steve Naroff <snaroff@apple.com> Add -Wdeprecated-declarations to driver and add a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
2c8a08e939d78d1aff70bdda1f122a200861f4ab 31-Mar-2009 Steve Naroff <snaroff@apple.com> Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.

Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
33fdb738a6c125f4c788733897021b7c1a062b0c 31-Mar-2009 Steve Naroff <snaroff@apple.com> Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.

Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cd7ac6f1cb1dfd52004718038c227ba5e4d28da4 31-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement -Wmissing-prototypes. Fixes PR3911.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/Options.def
8499f3f5ff8d5f95ece8047780030a3daad1b6fa 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement -Wmissing-prototypes. Fixes PR3911.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Driver/Options.def
608c1e3356e6510e979a1af7b22bde37be3eb019 31-Mar-2009 Chris Lattner <sabre@nondot.org> Fix a problem in ASTContext::addRecordToClass handling forward declarations.
In a case like:

@class foo;
foo *P;

addRecordToClass was making an empty shadow struct for the foo interface and
completing it. Later when an:

@interface foo
...
@endif

foo *Q;

was seen, ASTContext::addRecordToClass would think that foo was already laid
out and not lay out the definition. This fixes it to create a forward declared
struct the first time around, then complete it when the definition is seen.

Note that this causes two tests to regress, because something is trying to get
the size of the forward declared structs returned by this. Previously, this
would end up getting a size of zero but now it properly dies. I'm not sure
what the right solution is for this, so I xfailed the tests.

Fariborz, please take a look at this. The testcase in rdar://6676794 now gets
farther, but dies later because the objc ivar is not assigned a field number.

As an aside, I really don't like the fact that the objc front-end is creating
shadow C structs for ObjC types. This seems like an implementation detail of
the code generator that could be fixed by better factoring of the extant code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2349925b505564915f786583238266840801b689 31-Mar-2009 Chris Lattner <sabre@nondot.org> Fix a problem in ASTContext::addRecordToClass handling forward declarations.
In a case like:

@class foo;
foo *P;

addRecordToClass was making an empty shadow struct for the foo interface and
completing it. Later when an:

@interface foo
...
@endif

foo *Q;

was seen, ASTContext::addRecordToClass would think that foo was already laid
out and not lay out the definition. This fixes it to create a forward declared
struct the first time around, then complete it when the definition is seen.

Note that this causes two tests to regress, because something is trying to get
the size of the forward declared structs returned by this. Previously, this
would end up getting a size of zero but now it properly dies. I'm not sure
what the right solution is for this, so I xfailed the tests.

Fariborz, please take a look at this. The testcase in rdar://6676794 now gets
farther, but dies later because the objc ivar is not assigned a field number.

As an aside, I really don't like the fact that the objc front-end is creating
shadow C structs for ObjC types. This seems like an implementation detail of
the code generator that could be fixed by better factoring of the extant code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
41b780c6caa012115bfdcccff94b9965d4de71f0 31-Mar-2009 Chris Lattner <sabre@nondot.org> disable copying of Type objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
16ff705a594697f98b9473f9b7e7d378f331fe4b 31-Mar-2009 Chris Lattner <sabre@nondot.org> disable copying of Type objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9329cf566969b233c3ed0f85132fc718aa7ef812 31-Mar-2009 Chris Lattner <sabre@nondot.org> fill in temporary smallvectors instead of vectors for performance.
Fix BuildAggrIvarLayout to not access vectors out of range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f1690858344968358131f8d5690d9ee458883000 31-Mar-2009 Chris Lattner <sabre@nondot.org> fill in temporary smallvectors instead of vectors for performance.
Fix BuildAggrIvarLayout to not access vectors out of range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
04f4db7847a24ee7ff3074908df8b4bfebd446d9 31-Mar-2009 Chris Lattner <sabre@nondot.org> add a const version of the lookupFieldDeclForIvar method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
da04639a40e01d8d2ee891c075b271fd272d3d53 31-Mar-2009 Chris Lattner <sabre@nondot.org> add a const version of the lookupFieldDeclForIvar method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
10687e3da97d5ffb3a7466acdf19269342f92e4b 31-Mar-2009 Chris Lattner <sabre@nondot.org> Codegen sometimes crashes on comparisons that aren't legal, just
disable this feature for now, to err on the side of rejecting instead
of sometimes crashing. rdar://6326239


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d013aa1ee78d8ead93179c179b7c0746e8d97dbb 31-Mar-2009 Chris Lattner <sabre@nondot.org> Codegen sometimes crashes on comparisons that aren't legal, just
disable this feature for now, to err on the side of rejecting instead
of sometimes crashing. rdar://6326239


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e089063ccbf6f60daab8a2739829430863a9f7a3 31-Mar-2009 Anders Carlsson <andersca@mac.com> Document NamespaceAliasDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68085 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
63840b5fc57b426e156d36e5109b7d418b711f7d 31-Mar-2009 Anders Carlsson <andersca@mac.com> Document NamespaceAliasDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68085 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
aabb850022fc6b16f63f4199e2f5496ccb49ac24 31-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Parsing and AST representation for dependent template names that occur
within nested-name-specifiers, e.g., for the "apply" in

typename MetaFun::template apply<T1, T2>::type

At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TemplateKinds.h
lang/Parse/Action.h
c45c232440dfafedca1a3773b904fb42609b1b19 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Parsing and AST representation for dependent template names that occur
within nested-name-specifiers, e.g., for the "apply" in

typename MetaFun::template apply<T1, T2>::type

At present, we can't instantiate these nested-name-specifiers, so our
testing is sketchy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
lang/Basic/TemplateKinds.h
lang/Parse/Action.h
c625fa9911a35cf67fa0c73b8d0446d2dcbb02fd 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> fe support for objc2's nonfragile-abi synthesized ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
af3e72285238369c2ea4ebd40a1c9a87bd3eabb7 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> fe support for objc2's nonfragile-abi synthesized ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
16476fb11b83d37c93f5bb80adb5a6ceb6b8b560 31-Mar-2009 Steve Naroff <snaroff@apple.com> Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.

From a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn't appear to handle them). Will be investigating.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
0e3e3eb3879d5a7aaca4a393706149ddef8544f1 31-Mar-2009 Steve Naroff <snaroff@apple.com> Implement UCN support for C string literals (C99 6.4.3) and add some very basic tests. Chris Goller has graciously offered to write some test to help validate UCN support.

From a front-end perspective, I believe this code should work for ObjC @-strings. At the moment, I believe we need to tweak the code generation for @-strings (which doesn't appear to handle them). Will be investigating.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.td
dd13e8468462e60971487bcd5915419762dab814 31-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Improve the representation of template names in the AST. This
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").

One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as

std::(vector<int>)

we represent it as

(std::vector)<int>

which more closely follows the C++ grammar.

Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
7532dc66648cfe7432c9fe66dec5225f0ab301c6 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Improve the representation of template names in the AST. This
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").

One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as

std::(vector<int>)

we represent it as

(std::vector)<int>

which more closely follows the C++ grammar.

Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/TemplateName.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
d3934f4545535a2708a3140bec151bf7b124b83d 31-Mar-2009 Ted Kremenek <kremenek@apple.com> Re-apply 68028. The code had drifted enough that the tests would fail without
it. Will discuss offline whether symbolic regions should by typed or typeless.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
e8e86482da4c1872673bbb9c237649229d19793b 31-Mar-2009 Ted Kremenek <kremenek@apple.com> Re-apply 68028. The code had drifted enough that the tests would fail without
it. Will discuss offline whether symbolic regions should by typed or typeless.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b5ed72ad36bfb49a6561c85e6ed8554732266f30 30-Mar-2009 Ted Kremenek <kremenek@apple.com> Revert 68028.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
782582df7b06952e96123b3cde509ef4f5c794a3 30-Mar-2009 Ted Kremenek <kremenek@apple.com> Revert 68028.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b27c69ce0f999f73a75d48e816ea193a0bee5066 30-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Added new info to property impl. AST node to support
objc2's ivar synthesis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d497bae0ed149584636f07b638ba8db6e3f0fcb3 30-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Added new info to property impl. AST node to support
objc2's ivar synthesis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2ca985b4b5ece480bd0d2fa96d8d0fe890d8ccfd 30-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
be65d908d6da886a03cd2b3a47605e10ee0645f2 30-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
d7065a30188ad58a961fcd59c77edc218664829e 30-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Implement -Wno-pointer-sign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
757e0dd411c8b6c9c13a310883457a3372b1795a 30-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Implement -Wno-pointer-sign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68062 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
606f6146e65b52cf4ed6144427b2974f81c153bd 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch FreeBSD tool chain.
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
75358d267256022475371416654b056ad8531cb3 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch FreeBSD tool chain.
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
af69ccc858fd14b1821fdc118b4a1d52ef588e39 30-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Remove a trivial FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
f1e5a9591317d20161aa0638ff36944ae8b89360 30-Mar-2009 Douglas Gregor <dgregor@apple.com> Remove a trivial FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/NestedNameSpecifier.h
9fb9a4bbfd0ac4a5be28dab7a7ef6f73e0efc780 30-Mar-2009 Ted Kremenek <kremenek@apple.com> Add version of GRExprEngine::AddCheck that registered a GRSimpleAPICheck that
will be called for every expression in a basic block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
536aa02b29ea2bdffff2cc507ed04f6b56737116 30-Mar-2009 Ted Kremenek <kremenek@apple.com> Add version of GRExprEngine::AddCheck that registered a GRSimpleAPICheck that
will be called for every expression in a basic block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1c9c8492570033c6287b650ddb38b1b3ac43fe4a 30-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make SymbolicRegion untyped.
Layer the type information with a TypedViewRegion on top of the SymbolicRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
a45fec1a586a3b234d301bb89e26f2e891def0d7 30-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make SymbolicRegion untyped.
Layer the type information with a TypedViewRegion on top of the SymbolicRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
049b7243e866b45eb3ad2f5dc78cf6662a86b6f7 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -M and -MM.
- Not particularly elegant, but my hand is forced by gcc.

Also, tweak -ccc-print-bindings output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
lang/Driver/Types.def
cd8e4c44dd068956e9181381be3ee2d49a0fac52 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -M and -MM.
- Not particularly elegant, but my hand is forced by gcc.

Also, tweak -ccc-print-bindings output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
lang/Driver/Types.def
9ddfd1927cb3cb6785d176576bf0b1da03cf1396 30-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> Implement a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
f1d537f460c529906c73de56d891046b45434fb3 30-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> Implement a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68024 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
ae849528416c7ba91e7e6657f2647dbe95496902 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Track which original arguments an arg is derived from, so that
we can properly claim arguments, even if they have been translated by
the tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
478edc295efc560627053e2320bedd2f696ae028 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Track which original arguments an arg is derived from, so that
we can properly claim arguments, even if they have been translated by
the tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
9a30d7a7bcf151e35f0ef1ce282f7205fcd4e116 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix typo in diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
c77b766d221f6030ae509545d6b7c897707ca655 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix typo in diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
f801604648a392ca8d383c9ff101b75398e8df61 29-Mar-2009 Chris Lattner <sabre@nondot.org> hoist some code for handling objc foreach construct out of Declaration processing
into ParseForStatement. Merge two tests into one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
cd1477562e7cf03279850885583d615e1f631dd4 29-Mar-2009 Chris Lattner <sabre@nondot.org> hoist some code for handling objc foreach construct out of Declaration processing
into ParseForStatement. Merge two tests into one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
2c41d487a6f044bd49a3f4ded9192202d8a8f248 29-Mar-2009 Chris Lattner <sabre@nondot.org> hoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator
into ParseSimpleDeclaration, and improve a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
23c4b1883b13dc17484b7214091b73f3ba29096e 29-Mar-2009 Chris Lattner <sabre@nondot.org> hoist checks for ; and in out of ParseInitDeclaratorListAfterFirstDeclarator
into ParseSimpleDeclaration, and improve a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
a17991fc70d5f5d774a4ea21feefcfc64b1f73a3 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/DeclBase.h
lang/AST/DeclGroup.h
lang/Parse/Action.h
lang/Parse/Parser.h
682bf92db408a6cbc3d37b5496a99b6ef85041ec 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/DeclBase.h
lang/AST/DeclGroup.h
lang/Parse/Action.h
lang/Parse/Parser.h
612f72554ee112c765b3c217ba9e20d0ac1f280f 29-Mar-2009 Chris Lattner <sabre@nondot.org> DeclRefExpr refers to one decl, not all the declarators in a declaration.

Ted, please check this, this change causes no regression tests to fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
827ecb0db9225c98f08cfc991598210bcf0045dd 29-Mar-2009 Chris Lattner <sabre@nondot.org> DeclRefExpr refers to one decl, not all the declarators in a declaration.

Ted, please check this, this change causes no regression tests to fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
19672e47f10cae8382d12246e34c6be64e0c7f8b 29-Mar-2009 Chris Lattner <sabre@nondot.org> Implement PointerLikeTypeTraits for DeclGroupRef.
Make OpaquePtr work with things that are pointer-like but not
necessarily pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/Parse/Ownership.h
d51a183ffd7de05374ef20977e17ab4444bd633c 29-Mar-2009 Chris Lattner <sabre@nondot.org> Implement PointerLikeTypeTraits for DeclGroupRef.
Make OpaquePtr work with things that are pointer-like but not
necessarily pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/Parse/Ownership.h
ecf5fb23106c6d229fc1bca2385053c5473d2e68 29-Mar-2009 Chris Lattner <sabre@nondot.org> remove unused #include


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
b2e57f6b6540644b53c59589b91a12ee1c561e28 29-Mar-2009 Chris Lattner <sabre@nondot.org> remove unused #include


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
cbaf44d34d77c2facbf3740fceda6bc60dfd3231 29-Mar-2009 Chris Lattner <sabre@nondot.org> switch TemplateOrInstantiation to be a PointerUnion, which
simplifies some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
005f92f53c99ce8e701e44115c94216b108ea021 29-Mar-2009 Chris Lattner <sabre@nondot.org> switch TemplateOrInstantiation to be a PointerUnion, which
simplifies some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5ce4f6ddd0a30e2cc65f78119473878943a9a04f 29-Mar-2009 Chris Lattner <sabre@nondot.org> switch DeclBase::DeclCtx to the new happy and type-safe
llvm::PointerUnion class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ee219fd5f2776d8dd39d857f87304297b5ed743a 29-Mar-2009 Chris Lattner <sabre@nondot.org> switch DeclBase::DeclCtx to the new happy and type-safe
llvm::PointerUnion class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
567422c7bf82a952fc5e87bc8cc4d3da6f9e486e 29-Mar-2009 Chris Lattner <sabre@nondot.org> Make the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
4656978783e444bbd4a70ead1946e341587779ca 29-Mar-2009 Chris Lattner <sabre@nondot.org> Make the ActionResult optimization work for non-void*'s and switch DeclPtrTy to use it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
5c3553bf58908eb3c91b25df77808bdbe17e9361 29-Mar-2009 Chris Lattner <sabre@nondot.org> genericize the ActionResult optimization for holding the "ininvalid" bit
in the low bit position a little bit (haha).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
683ad0f3bbf5b686f00431a371ec11835a47c85c 29-Mar-2009 Chris Lattner <sabre@nondot.org> genericize the ActionResult optimization for holding the "ininvalid" bit
in the low bit position a little bit (haha).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
330a05b88b1d39fcef6c65b9387e74b5e8ddb98d 29-Mar-2009 Chris Lattner <sabre@nondot.org> various cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
64540d71b4aaab07d93cb3593ce462d26a83d326 29-Mar-2009 Chris Lattner <sabre@nondot.org> various cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67981 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e41419144a0a01456f5426efcd9b919f68284527 29-Mar-2009 Chris Lattner <sabre@nondot.org> adjust to llvm mainline changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/Type.h
lang/Parse/Ownership.h
0eda3b31a672ea486fa92b9bc49a2c91be856b53 29-Mar-2009 Chris Lattner <sabre@nondot.org> adjust to llvm mainline changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/Type.h
lang/Parse/Ownership.h
797f166cc0cfdbc03895e802ed6087c19286e05f 29-Mar-2009 Chris Lattner <sabre@nondot.org> add fixme


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d59ad42b3e6361259c08d53fe5346960eef840c2 29-Mar-2009 Chris Lattner <sabre@nondot.org> add fixme


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
5e05f29efda155f4505b87eaa54331e45b1833dd 29-Mar-2009 Chris Lattner <sabre@nondot.org> add getNumLowBitsAvailable for OpaquePtr and QualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/Ownership.h
11a7f35c2e3a496342031c2ed721f58e691ebfca 29-Mar-2009 Chris Lattner <sabre@nondot.org> add getNumLowBitsAvailable for OpaquePtr and QualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/Ownership.h
d776b2da9bd694c41f1506e152aeb35d1babeba6 29-Mar-2009 Chris Lattner <sabre@nondot.org> follow llvm mainline, where PointerLikeTypeInfo got renamed
to PointerLikeTypeTraits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/Ownership.h
daae940507f2e93c6fa12e8062fa958e34cc2d1c 29-Mar-2009 Chris Lattner <sabre@nondot.org> follow llvm mainline, where PointerLikeTypeInfo got renamed
to PointerLikeTypeTraits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/Ownership.h
cdd67caf66a2aa1a95da3ed9726bea7a3659b35b 29-Mar-2009 Chris Lattner <sabre@nondot.org> implement the PointerLikeTypeInfo trait for QualType, allowing
it to be stuck into a SmallPtrSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4e7072872e8e2ed76a4c6933424bffa253896e7e 29-Mar-2009 Chris Lattner <sabre@nondot.org> implement the PointerLikeTypeInfo trait for QualType, allowing
it to be stuck into a SmallPtrSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
87e3568d5f286a9d5bcafcef102fd7d875946dc5 29-Mar-2009 Anders Carlsson <andersca@mac.com> Handle the case where the namespace decl is an alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
af9e40f9909d89501617897c7295dff68c3907a3 29-Mar-2009 Anders Carlsson <andersca@mac.com> Handle the case where the namespace decl is an alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
ddb1d8b3f23921c8e46127e9ffe065f1b3618a9b 28-Mar-2009 Anders Carlsson <andersca@mac.com> Create AST nodes for namespace aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
68771c73f4293620dc1a99154ec02111e6490e28 28-Mar-2009 Anders Carlsson <andersca@mac.com> Create AST nodes for namespace aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
26de7885f94c72ffa2df696ecb102a12ea2b0733 28-Mar-2009 Anders Carlsson <andersca@mac.com> Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
03bd5a1e9a54b62b10ae8aeb6eb5245e2031d98b 28-Mar-2009 Anders Carlsson <andersca@mac.com> Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
5261d0c6a3046b35512b0950a247a49d9130da87 28-Mar-2009 Chris Lattner <sabre@nondot.org> Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
lang/Parse/Scope.h
b28317a8e5e0e2953d1e5406d753d6c3c7f1e7d2 28-Mar-2009 Chris Lattner <sabre@nondot.org> Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
lang/Parse/Scope.h
1ecff66a0960967dd192fdebe940526c3fd1f8f4 28-Mar-2009 Ted Kremenek <kremenek@apple.com> Add comparison operators for PathDiagosticLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
3b0868d1da749f7122757016f57f9f4b62b539f4 28-Mar-2009 Ted Kremenek <kremenek@apple.com> Add comparison operators for PathDiagosticLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
0b8be995e023b551c62f403c113546086029bcc3 28-Mar-2009 Ted Kremenek <kremenek@apple.com> Add comparison operators for SourceRange.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
a898283deb689b2454f3a966ef1cbf81bcb3e3e4 28-Mar-2009 Ted Kremenek <kremenek@apple.com> Add comparison operators for SourceRange.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
57e39f0733b4018ad9de923cfbad0ddf20ebc674 28-Mar-2009 Chris Lattner <sabre@nondot.org> add accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
cc1f8693df4c96d7a8db585e5c05e31b8520f6c2 28-Mar-2009 Chris Lattner <sabre@nondot.org> add accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
ffae0dd2cfdc6d66f3e3b83d9104e8a18df0d8da 28-Mar-2009 Chris Lattner <sabre@nondot.org> some random cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/Stmt.h
e66a8cf9117e5fb95a05ff76ec06615e63dd5ade 28-Mar-2009 Chris Lattner <sabre@nondot.org> some random cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/Stmt.h
034a87df6e74f1d1ff8f1ec2e72fad30a49827b4 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate unneeded iterator wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
0632dd6fe068011af5710c0d6a745724021ff620 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate unneeded iterator wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b41cc2a93b6b22eaadaeaabde6072cbe21135e69 28-Mar-2009 Chris Lattner <sabre@nondot.org> change NamespaceDecl to hold its 'NextNamespace' pointer itself
instead of in NextDeclarator. This temporarily increases memory
usage, but simplifies and decouples things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f05ca7df086aa2c176bbc32408fb3f9eaef82c05 28-Mar-2009 Chris Lattner <sabre@nondot.org> change NamespaceDecl to hold its 'NextNamespace' pointer itself
instead of in NextDeclarator. This temporarily increases memory
usage, but simplifies and decouples things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4a9a85e7edac3b86b7bddc70b193de210ae0517a 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7e24e82a70a2c681f4291a3397bcd1e1005f251a 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
1a5b1dffdab1e9c0061a0e922af85dea86f82825 28-Mar-2009 Chris Lattner <sabre@nondot.org> Cleanups for DeclGroup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/Stmt.h
fe95deaf66e4fbd82d44b5f6afa8162fa69cb85c 28-Mar-2009 Chris Lattner <sabre@nondot.org> Cleanups for DeclGroup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/Stmt.h
fb8416a5431d2f959c7ac3a1659fde598a765370 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename NextDeclInScope to NextDeclInContext, since the pointer
points within contexts not scopes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
244a67d911d08c3757a18ad666e4a268cf3ee285 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename NextDeclInScope to NextDeclInContext, since the pointer
points within contexts not scopes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
7954817083ece1f6a9fa6b64118f3799062ce20c 28-Mar-2009 Chris Lattner <sabre@nondot.org> simplify getNextDeclInScope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
96f4468b6b1bf69bb01c1207f716a3ffaeb4a8d3 28-Mar-2009 Chris Lattner <sabre@nondot.org> simplify getNextDeclInScope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
8cffcd6bdefbd5191c07d91f5ff3d027ca91f51d 28-Mar-2009 Anders Carlsson <andersca@mac.com> Add an ActOnNamespaceAliasDef action and have the parser call it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
dbb0094f441d2f15dd6eee581e1569244a26009f 28-Mar-2009 Anders Carlsson <andersca@mac.com> Add an ActOnNamespaceAliasDef action and have the parser call it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
fc318198d083d968069df85b4c972c000b12a4c9 28-Mar-2009 Chris Lattner <sabre@nondot.org> remove TranslationUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
1266eca868fa0ac799291ed04f349c9bbd7a9469 28-Mar-2009 Chris Lattner <sabre@nondot.org> remove TranslationUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
f4fbc448d069f2e72f90f3d94795480eb9f5dac9 28-Mar-2009 Chris Lattner <sabre@nondot.org> push more ASTContext goodness out through interfaces that use
TranslationUnit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TranslationUnit.h
557c5b1717bc8919b1b40cf2064b51491ec53a44 28-Mar-2009 Chris Lattner <sabre@nondot.org> push more ASTContext goodness out through interfaces that use
TranslationUnit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TranslationUnit.h
07b08c010d3d91d378642b1faa5082e6bed4299e 28-Mar-2009 Chris Lattner <sabre@nondot.org> remove TranslationUnit from ParseAST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
3599dbe94ed8229b4a0eca0b066129e381ccb277 28-Mar-2009 Chris Lattner <sabre@nondot.org> remove TranslationUnit from ParseAST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
2a594d0d2a5c1fe506608f75b7d135d743b56911 28-Mar-2009 Chris Lattner <sabre@nondot.org> change HandleTranslationUnit to take an ASTContext instead of TranslationUnit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
dacbc5d46aaeea817742b8c76c987b87d2490c85 28-Mar-2009 Chris Lattner <sabre@nondot.org> change HandleTranslationUnit to take an ASTContext instead of TranslationUnit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
f94cca20b8f30165b5faf7a016b480b25de4eb26 28-Mar-2009 Anders Carlsson <andersca@mac.com> Parse namespace aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f67606ae2febe3bb0718f05040c6c4bc2c2c3276 28-Mar-2009 Anders Carlsson <andersca@mac.com> Parse namespace aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
7bb39bc52a09b80c93d83e6decdaaad862a82df4 28-Mar-2009 Chris Lattner <sabre@nondot.org> simplify away some dead ownership stuff, TranslationUnit is now
just a wrapper around ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
3776d4cea4f15e04f32997742deb4b35b72c9b8c 28-Mar-2009 Chris Lattner <sabre@nondot.org> simplify away some dead ownership stuff, TranslationUnit is now
just a wrapper around ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
8c86cdfe9a2fd82488715fac4be04baafc1e1e8f 28-Mar-2009 Chris Lattner <sabre@nondot.org> hoist TranslationUnit some more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
d2fa67570b363843215f62395b795c1f70e6b85f 28-Mar-2009 Chris Lattner <sabre@nondot.org> hoist TranslationUnit some more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
78e3dd4b8f6006066ba845de5af0ccae5c729852 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate some wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
80a033358d8da09d1f62b0b3ba98cee0346c0a49 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate some wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
06459ae8fe140c4f6cc1a6de2ee2e63f02f5592f 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate ReadASTBitcodeFile


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
5f737ccd3854b55a3eb9ab3aa54f2b1c3212418f 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate ReadASTBitcodeFile


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
b09b31d1abab14413df5e744869200dd1095dc53 28-Mar-2009 Chris Lattner <sabre@nondot.org> move serialization logic from TranslationUnit to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TranslationUnit.h
a9376d470ccb0eac74fe09a6b2a18a890f1d17c4 28-Mar-2009 Chris Lattner <sabre@nondot.org> move serialization logic from TranslationUnit to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TranslationUnit.h
fb88a5f60c9366bcb62fa604e9a49021b6771c6a 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate ASTConsumer::InitializeTU, all clients are
happy with just ASTContext, they don't need a TU.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
7bb0da001fc579410035cec00b6bca499251a318 28-Mar-2009 Chris Lattner <sabre@nondot.org> eliminate ASTConsumer::InitializeTU, all clients are
happy with just ASTContext, they don't need a TU.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
9c18fde756bfdfc5660cf1ebdb0b8d73f68bf2b7 28-Mar-2009 Chris Lattner <sabre@nondot.org> remove TranslationUnit::OwnsDecls, which is only set, never read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
ed0e497efc23ac4b35481a60a80579d355335e07 28-Mar-2009 Chris Lattner <sabre@nondot.org> remove TranslationUnit::OwnsDecls, which is only set, never read.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
143fd6d9ec67b67192ee6661da47820c4771c3ce 28-Mar-2009 Chris Lattner <sabre@nondot.org> simplify ParseAST by sucking -disable-free handling logic up into
clang.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
9ecd26ad19875e410e76476b36f77c47069ba04c 28-Mar-2009 Chris Lattner <sabre@nondot.org> simplify ParseAST by sucking -disable-free handling logic up into
clang.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
3cd92880b42cd67bcb631c769a7ab62068e9aac9 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Change compound assignment operators to keep track of both the promoted
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.

Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.

I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ab3a852ae713189444dcbf75e70accf1e8c2b7f2 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Change compound assignment operators to keep track of both the promoted
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.

Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.

I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a1f7fd4e18c08272aa1c721bbbe69f464c1acb6f 28-Mar-2009 Chris Lattner <sabre@nondot.org> move StatListener out to top level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
52ba870eba17e634339622dbf103434ca31935eb 28-Mar-2009 Chris Lattner <sabre@nondot.org> move StatListener out to top level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
5f34f0ee70302e8ce1fb6dd8ba4c03e873762476 28-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Make our diagnostics about the obsolete GNU designated-initializer
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
eeae8f072748affce25ab4064982626361293390 28-Mar-2009 Douglas Gregor <dgregor@apple.com> Make our diagnostics about the obsolete GNU designated-initializer
syntax into extension warnings, and provide code-modification hints
showing how to fix the problem.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticParseKinds.td
lang/Parse/Action.h
d30226003ea60119b19901b7813821c7ec3d7e55 28-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Initial implementation of parsing, semantic analysis, and template
instantiation for C++ typename-specifiers such as

typename T::type

The parsing of typename-specifiers is relatively easy thanks to
annotation tokens. When we see the "typename", we parse the
typename-specifier and produce a typename annotation token. There are
only a few places where we need to handle this. We currently parse the
typename-specifier form that terminates in an identifier, but not the
simple-template-id form, e.g.,

typename T::template apply<U, V>

Parsing of nested-name-specifiers has a similar problem, since at this
point we don't have any representation of a class template
specialization whose template-name is unknown.

Semantic analysis is only partially complete, with some support for
template instantiation that works for simple examples.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclarationName.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
d57959af02b4af695276f4204443afe6e5d86bd8 28-Mar-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of parsing, semantic analysis, and template
instantiation for C++ typename-specifiers such as

typename T::type

The parsing of typename-specifiers is relatively easy thanks to
annotation tokens. When we see the "typename", we parse the
typename-specifier and produce a typename annotation token. There are
only a few places where we need to handle this. We currently parse the
typename-specifier form that terminates in an identifier, but not the
simple-template-id form, e.g.,

typename T::template apply<U, V>

Parsing of nested-name-specifiers has a similar problem, since at this
point we don't have any representation of a class template
specialization whose template-name is unknown.

Semantic analysis is only partially complete, with some support for
template instantiation that works for simple examples.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclarationName.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
8769fc8cd9d5734b13b457049594183a1631f172 27-Mar-2009 Ted Kremenek <kremenek@apple.com> Add missing header file change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
ced21016cec1f189a695857bed103ecc9e3f3696 27-Mar-2009 Ted Kremenek <kremenek@apple.com> Add missing header file change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
404adca9e6daa75b26b07f23b63b2deedec55b06 27-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Finish off semantic analysis for regparm, and remove the warning. Also
remove a redundant error in CodeGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
55d3aaf9a537888734762170823daf750ea9036d 27-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Finish off semantic analysis for regparm, and remove the warning. Also
remove a redundant error in CodeGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.td
8752fe0e06d1386829890b23416e2be3c1144305 27-Mar-2009 Chris Lattner <sabre@nondot.org> minor cleanups: make getIdentifierNamespace() be a single load
instead of a load + large inlined switch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
769dbdf467681f6020ff248b969c2d41a4fdccd3 27-Mar-2009 Chris Lattner <sabre@nondot.org> minor cleanups: make getIdentifierNamespace() be a single load
instead of a load + large inlined switch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f58df97d6b36f21138a13d63a309f8b859eb3373 27-Mar-2009 Mike Stump <mrs@apple.com> Fixup -fcommon and -fno-common to be more gcc compatible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
1c9b7422dceb5ecdc50bad41e7cf4b635bf89c15 27-Mar-2009 Mike Stump <mrs@apple.com> Fixup -fcommon and -fno-common to be more gcc compatible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
9a502bdc1e0a96b31a52aed1913744b00032fb94 27-Mar-2009 Chris Lattner <sabre@nondot.org> reduce # const_casts, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
0cf2b1990c82121d03a004dafe498ba43bf4b42a 27-Mar-2009 Chris Lattner <sabre@nondot.org> reduce # const_casts, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f5151efd6813a6952094f9d020e9f733f70efc4b 27-Mar-2009 Chris Lattner <sabre@nondot.org> change Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
10d8379676f32b493740a5509e2cd7f0d6433139 27-Mar-2009 Chris Lattner <sabre@nondot.org> change Decl::DeclCtx to use a PointerIntPair instead of hand bitmangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
97703437b51ac8fdbd4adbc8edb33ad6cc161a08 27-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Besides the warning, issue unsupported diagnostics in
ir gen. No intended change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
ee760330a415635369556796a97afcfd6207f4dc 27-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Besides the warning, issue unsupported diagnostics in
ir gen. No intended change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
7e12bd3abf2afd659ab13d7f110501b9e9f1a2bb 27-Mar-2009 Ted Kremenek <kremenek@apple.com> Move declaration of 'PathDiagnostic' to the end of PathDiagnostic.h and add PathDiagnostic::getLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
8a9a26785c3cd8f4fd4e71aa71b4a87b3da2344a 27-Mar-2009 Ted Kremenek <kremenek@apple.com> Move declaration of 'PathDiagnostic' to the end of PathDiagnostic.h and add PathDiagnostic::getLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
e37b539a66af7e71da17b14550f52b92b00a234b 27-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostic: replace 'std::list' with 'std::deque'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
89e65a1fabf5a9569b3358203b8e9e9813209b8f 27-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostic: replace 'std::list' with 'std::deque'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
484d0e265300434bda07397555b5f4b751524a98 27-Mar-2009 Ted Kremenek <kremenek@apple.com> Add iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
multiple location vectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
c3a838bef9565295850923eb8cb622b5b8e861e4 27-Mar-2009 Ted Kremenek <kremenek@apple.com> Add iterators to PathDiagnosticControlFlowDiagnostic for iterating over the
multiple location vectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
501c2a9c75db9c1169e16f50df29593c0d41b6e7 27-Mar-2009 Anders Carlsson <andersca@mac.com> Implement checking for base class access. Right now it's overly conservative but that will change. (Also, protected isn't implemented right now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c4f1e87138bfe5d3aaccff13c86b383a255bca42 27-Mar-2009 Anders Carlsson <andersca@mac.com> Implement checking for base class access. Right now it's overly conservative but that will change. (Also, protected isn't implemented right now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
762da55b1e7d4a95ee2185d49007c19a61aa50e4 27-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> If the user is trying to apply the -> or . member reference operator
to a function or function pointer, it's probably because the user
forgot to put in parentheses () to call the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
214f31a347d7824eb92e6a3f5dce4d4047fd5ae0 27-Mar-2009 Douglas Gregor <dgregor@apple.com> If the user is trying to apply the -> or . member reference operator
to a function or function pointer, it's probably because the user
forgot to put in parentheses () to call the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
149f0d82b1430ec62e86e942fb366da1749f21fd 27-Mar-2009 Ted Kremenek <kremenek@apple.com> BugReporter:
- Added an internal helper class 'PathDiagnosticBuilder' which now bundles the
'ExecutionContinues' methods.
- Added preliminary diagnostics for short-circuit '&&' and '||'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
babdd7b56d02e2b6924a2c93b061d6a48bb5f0ca 27-Mar-2009 Ted Kremenek <kremenek@apple.com> BugReporter:
- Added an internal helper class 'PathDiagnosticBuilder' which now bundles the
'ExecutionContinues' methods.
- Added preliminary diagnostics for short-circuit '&&' and '||'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
c14c7f0fda52d3bb363788b42a38405720a21e48 27-Mar-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway
by changing blocks from being disabled in the parser to being disabled
in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
9af5500f3f132f9a2f9abbe82113a7c7bb751472 27-Mar-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6719156 - clang should emit a better error when blocks are disabled but are used anyway
by changing blocks from being disabled in the parser to being disabled
in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
d26213ce346168ffd740d32242a01051e2fccefd 27-Mar-2009 Ted Kremenek <kremenek@apple.com> - Fix thinko in implementation of PathDiagnosticLocation::asStmt(). Thanks to
Anders Johnsen for pointing this out.
- Have PathDiagnosticControlFlowPiece take PathDiagnosticLocation for the
arguments to its constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
a11982a01d2a239a5132b1871f2b417de11ab80d 27-Mar-2009 Ted Kremenek <kremenek@apple.com> - Fix thinko in implementation of PathDiagnosticLocation::asStmt(). Thanks to
Anders Johnsen for pointing this out.
- Have PathDiagnosticControlFlowPiece take PathDiagnosticLocation for the
arguments to its constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
32b1bbe0a8fc63b3fcde326eeb5b6ea2ac74af77 27-Mar-2009 Mike Stump <mrs@apple.com> Fix searching for gcc, we only want executable files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/ToolChain.h
950bedd8a9f00caabd2f1fc6812d70e08103f847 27-Mar-2009 Mike Stump <mrs@apple.com> Fix searching for gcc, we only want executable files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/ToolChain.h
e615803e1c4a70ba66b6687b2b95e1fdcd16cd3b 27-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Clarify that QualifiedNameType is sugar-only. This will matter once we can parse typename-specifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
119057adf21237d53dcd490cec9700dca2465e3e 27-Mar-2009 Douglas Gregor <dgregor@apple.com> Clarify that QualifiedNameType is sugar-only. This will matter once we can parse typename-specifiers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
041e929321e7b8550735acdcbceef54dde881bd7 27-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
3507369940bfb269551bfa1fec812481f60e3552 27-Mar-2009 Douglas Gregor <dgregor@apple.com> Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
1e589cc31d339860b9df61870930961601d68120 27-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Revamp our representation of C++ nested-name-specifiers. We now have a
uniqued representation that should both save some memory and make it
far easier to properly build canonical types for types involving
dependent nested-name-specifiers, e.g., "typename T::Nested::type".

This approach will greatly simplify the representation of
CXXScopeSpec. That'll be next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
ab452ba8323d1985e08bade2bced588cddf2cc28 27-Mar-2009 Douglas Gregor <dgregor@apple.com> Revamp our representation of C++ nested-name-specifiers. We now have a
uniqued representation that should both save some memory and make it
far easier to properly build canonical types for types involving
dependent nested-name-specifiers, e.g., "typename T::Nested::type".

This approach will greatly simplify the representation of
CXXScopeSpec. That'll be next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprCXX.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
0ebd5fd906e7bc56e481b3934846e7921952d8b8 27-Mar-2009 Anders Carlsson <andersca@mac.com> I said _fix_ the build, don't break it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
5bf17cd277db2a253f6012968471064c4f4537a3 27-Mar-2009 Anders Carlsson <andersca@mac.com> I said _fix_ the build, don't break it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
96ee573215c05d11da43fad65df4409b863a3027 27-Mar-2009 Anders Carlsson <andersca@mac.com> Fix build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
f569cc5d933750bcc4e005280457f111beec5ac1 27-Mar-2009 Anders Carlsson <andersca@mac.com> Fix build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
e8dcd92a726d835d52374e818436a239868d9c19 27-Mar-2009 Anders Carlsson <andersca@mac.com> Add

const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
AccessSpecifier AS);

so we can easily add access specifiers to diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/Diagnostic.h
05bf2c79770927c66ca725e9bb589048ed3f069e 27-Mar-2009 Anders Carlsson <andersca@mac.com> Add

const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
AccessSpecifier AS);

so we can easily add access specifiers to diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/Diagnostic.h
19ff977dc396142701ee5d62ec08181db8329b6e 27-Mar-2009 Ted Kremenek <kremenek@apple.com> - Add class PathDiagosticLocationPair.
- Have PathDiagnosticControlFlowPiece use a vector of PathDiagnosticLocationPairs to represent transitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
6f00204d44dfab30f55c19b744e3ece9f229043f 27-Mar-2009 Ted Kremenek <kremenek@apple.com> - Add class PathDiagosticLocationPair.
- Have PathDiagnosticControlFlowPiece use a vector of PathDiagnosticLocationPairs to represent transitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
335f02cce33fafae392afc40e916ca8153a6dc2c 26-Mar-2009 Ted Kremenek <kremenek@apple.com> Implement PathDiagnosticLocation::asRange() and PathDiagnosticLocation::asStmt().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
becf8886d10c41a4605c5e66cd806492eb8b864c 26-Mar-2009 Ted Kremenek <kremenek@apple.com> Implement PathDiagnosticLocation::asRange() and PathDiagnosticLocation::asStmt().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
9c4eb9cfbb8fda9ae8d0292d29e53180a2c62eda 26-Mar-2009 Ted Kremenek <kremenek@apple.com> - Implement PathDiagnosticLocation::asLocation.
- Switch PathDiagnosticEventPiece and PathDiagnosticMacroPiece to use
PathDiagnosticLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
97b40036d4d4d1bf4e7be71fc2bce009de4e8c0c 26-Mar-2009 Ted Kremenek <kremenek@apple.com> - Implement PathDiagnosticLocation::asLocation.
- Switch PathDiagnosticEventPiece and PathDiagnosticMacroPiece to use
PathDiagnosticLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
d76d7716fdda8042ef062c060de3992c87ee4b25 26-Mar-2009 Ted Kremenek <kremenek@apple.com> Because of the use of 'cast<TagDecl>', ASTContext.h now depends on Decl.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ad75653f81dece1c806e9c28dd7e7582c9929a27 26-Mar-2009 Ted Kremenek <kremenek@apple.com> Because of the use of 'cast<TagDecl>', ASTContext.h now depends on Decl.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1dd45ce966e279d3e9c82d6dacee915a0d75d05a 26-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics (analyzer):
- Added a new class, 'PathDiagnosticLocation', that is a variant for
SourceLocation, SourceRange, or Stmt*. This will be used soon by
PathDiagnosticPieces to describe locations for targets of branches, locations
of events, etc.
- Did some prep. refactoring of PathDiagnosticPieces to prepare them for
adopting the new PathDiagnosticLocation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
1f9bd0fbf5894b41bba5f2fdb0c6546a7a6ef3d8 26-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics (analyzer):
- Added a new class, 'PathDiagnosticLocation', that is a variant for
SourceLocation, SourceRange, or Stmt*. This will be used soon by
PathDiagnosticPieces to describe locations for targets of branches, locations
of events, etc.
- Did some prep. refactoring of PathDiagnosticPieces to prepare them for
adopting the new PathDiagnosticLocation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
0451d5191ee9f5f2d0ab7e5729f264a23d6b0d7d 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -fno-common to clang.
- <rdar://problem/6710978> ccc/clang-driver ignore -fno-common


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
069afd5c8c515ce483fd2f2a91daa355f66ff478 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -fno-common to clang.
- <rdar://problem/6710978> ccc/clang-driver ignore -fno-common


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
eb1be3fea0e2f41f3bc6a708a8c38b00c0888739 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add darwin::Link tool.
- <rdar://problem/6717381> [driver] implement ld argument translation
in new driver


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
02633b541b04ad5ffc1c70f4c2feeeb13e607057 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add darwin::Link tool.
- <rdar://problem/6717381> [driver] implement ld argument translation
in new driver


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
55e34e3bf9f92e3fc23bfa0ac7fbe382dc7b2710 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix a number of option definition mismatches (flags instead of
separate, or vice versa).

Also, fix initialization of LinkingOutput variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d7b88c2cb8986217f164203747d35c8f596e38c2 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix a number of option definition mismatches (flags instead of
separate, or vice versa).

Also, fix initialization of LinkingOutput variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
0ded7ded3be29d0c36e652da31e6bf1d9ea994b5 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print the correct target when printing the version.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
70c8db1003af49d3627aeef41fcdd7c6c6a7df79 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print the correct target when printing the version.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
9cdd4d47dbc12191aa8b2f700b3438613fb4b7ff 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
d73fe9b70c5f6738d004744562287a62831f39bf 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
7d3f8852b069805fbdc02e1d782a5c088191e7c0 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::AddAllArgsTranslated; for forwarding options to
tools with the name of the option replace, and arguments rendered
separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
524b9fb54564ab8bc437118ed55ee7c9e8c1247d 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::AddAllArgsTranslated; for forwarding options to
tools with the name of the option replace, and arguments rendered
separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
f04a7561dc267ed9c54670386d9b5dfebc84d416 26-Mar-2009 Chris Lattner <sabre@nondot.org> most of this is plumbing to get CompileOptions down into
CodeGenModule. Once there, add a new NoCommon option to
it and implement -fno-common.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/CompileOptions.h
bd3606426d389370616126af969904ec493cb105 26-Mar-2009 Chris Lattner <sabre@nondot.org> most of this is plumbing to get CompileOptions down into
CodeGenModule. Once there, add a new NoCommon option to
it and implement -fno-common.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Frontend/CompileOptions.h
54122d8d9195830b6a7085c40965eec939826df9 26-Mar-2009 Chris Lattner <sabre@nondot.org> make this self contained, declare everything as 'class'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
e062533e298f72d970b2aa99cd0e3818b20d73df 26-Mar-2009 Chris Lattner <sabre@nondot.org> make this self contained, declare everything as 'class'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
74556a1d8d84f6cb45f8331c8ba9be05f15edb68 26-Mar-2009 Ted Kremenek <kremenek@apple.com> analyzer infrastructure: make a bunch of changes to symbolic expressions that
Zhongxing and I discussed by email.

Main changes:
- Removed SymIntConstraintVal and SymIntConstraint
- Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr
- Added nonloc::SymExprVal to wrap SymExpr
- SymbolRef is now just a typedef of 'const SymbolData*'
- Bunch of minor code cleanups in how some methods were invoked (no functionality change)

This changes are part of a long-term plan to have full symbolic expression
trees. This will be useful for lazily evaluating complicated expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
e0e4ebf6bfca5a71b2344d8a1b748b852509279c 26-Mar-2009 Ted Kremenek <kremenek@apple.com> analyzer infrastructure: make a bunch of changes to symbolic expressions that
Zhongxing and I discussed by email.

Main changes:
- Removed SymIntConstraintVal and SymIntConstraint
- Added SymExpr as a parent class to SymbolData, SymSymExpr, SymIntExpr
- Added nonloc::SymExprVal to wrap SymExpr
- SymbolRef is now just a typedef of 'const SymbolData*'
- Bunch of minor code cleanups in how some methods were invoked (no functionality change)

This changes are part of a long-term plan to have full symbolic expression
trees. This will be useful for lazily evaluating complicated expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
ed20fb93b83794139c15c9914ffb0cc4739855c1 26-Mar-2009 Anders Carlsson <andersca@mac.com> Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate.

Doug, Sebastian: Plz review! :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
5aeccdbb4bdc94e48c04cacc59fa812af32109b2 26-Mar-2009 Anders Carlsson <andersca@mac.com> Handle parsing of templates in member declarations. Pass the AccessSpecifier all the way down to ActOnClassTemplate.

Doug, Sebastian: Plz review! :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
bccb4bce64483b3e5f9305d8c3df64ca7f4e7e95 26-Mar-2009 Anders Carlsson <andersca@mac.com> Check that the access specifier of a member redeclaration is the same as the original declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
50713450f61b85805e1ca97e547a4082b7798bd3 26-Mar-2009 Anders Carlsson <andersca@mac.com> Check that the access specifier of a member redeclaration is the same as the original declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
55216ac1d698c5d24c5d6a9f0986404cdc703762 26-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> The injected-class-name of class templates and class template
specializations can be treated as a template. Finally, we can parse
and process the first implementation of Fibonacci I wrote!

Note that this code does not handle all of the cases where
injected-class-names can be treated as templates. In particular,
there's an ambiguity case that we should be able to handle (but
can't), e.g.,

template <class T> struct Base { };
template <class T> struct Derived : Base<int>, Base<char> {
typename Derived::Base b; // error: ambiguous
typename Derived::Base<double> d; // OK
};




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
befc20e1dc869edb0e7b560e69f32d5c71f867ab 26-Mar-2009 Douglas Gregor <dgregor@apple.com> The injected-class-name of class templates and class template
specializations can be treated as a template. Finally, we can parse
and process the first implementation of Fibonacci I wrote!

Note that this code does not handle all of the cases where
injected-class-names can be treated as templates. In particular,
there's an ambiguity case that we should be able to handle (but
can't), e.g.,

template <class T> struct Base { };
template <class T> struct Derived : Base<int>, Base<char> {
typename Derived::Base b; // error: ambiguous
typename Derived::Base<double> d; // OK
};




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8ea6a3293085bfc0d8bae39057dd918f839ab424 26-Mar-2009 Anders Carlsson <andersca@mac.com> Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl.

Also, fix fallout from the change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1329c274628cc8c4e8ad472b41d1a78c8123f611 26-Mar-2009 Anders Carlsson <andersca@mac.com> Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl.

Also, fix fallout from the change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
0c793bb0ab1ed0c1265ccfb77904fd247a11f209 25-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Pass access specifiers through to member classes and member enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
06c0fecd197fef21e265a41bca8dc5022de1f864 25-Mar-2009 Douglas Gregor <dgregor@apple.com> Pass access specifiers through to member classes and member enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
cc88797aac66319a370847d204aef5de70c43f65 25-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.

This change also introduces the injected-class-name into a class
template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
d475b8d9e6f5ff0e6ab8d15667ce8a64c7cb9a4d 25-Mar-2009 Douglas Gregor <dgregor@apple.com> Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.

This change also introduces the injected-class-name into a class
template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticSemaKinds.td
0f60b3201cfbd32a43939cd26f128932d73a0421 25-Mar-2009 Anders Carlsson <andersca@mac.com> It doesn't make sense to set the access specifier to AS_none (I think)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
b8547e800f9553a72c2f3635ae2371692bd4411a 25-Mar-2009 Anders Carlsson <andersca@mac.com> It doesn't make sense to set the access specifier to AS_none (I think)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
43bfaafb142657ceee76b65396075a57e195d8d1 25-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Predicate to detect when a RecordDecl is really the injected-class-name

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c9b5b4074bd73d4af76e69cccf8ecd365fdd1008 25-Mar-2009 Douglas Gregor <dgregor@apple.com> Predicate to detect when a RecordDecl is really the injected-class-name

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67687 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0752a102f3abe787f38772c8a7269bfb909692f5 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -Xarch_, including warning for nasty -Xarch_ use cases
we aren't going to support. For example:
clang -Xarch_i386 -S -Xarch_i386 -o -Xarch_i386 myi386asm.s ...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
4e7e9cff2e3b1bf15da06a4284a936da15e19578 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -Xarch_, including warning for nasty -Xarch_ use cases
we aren't going to support. For example:
clang -Xarch_i386 -S -Xarch_i386 -o -Xarch_i386 myi386asm.s ...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67680 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
f2f1f9de712de6ec5ee5d49f56973e97f7ab5c8e 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
matches the flag in Options.def).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
f6dd66b7b80e2fb42628df2593b3948149a53a5f 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
matches the flag in Options.def).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
02bb0349b9f6faf3de9adc08813c1ab7899bbe5a 25-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> This patch adds two more SymbolData subclasses: SymIntExpr and SymSymExpr, for
representing symbolic expressions like 'x'+3 and 'x'+'y'. The design is
subjected to change later when we fix the class hierarchy of symbolic
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
a129eb974d8ff0ad4a4dd94ad1e6c5f98897ddb4 25-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> This patch adds two more SymbolData subclasses: SymIntExpr and SymSymExpr, for
representing symbolic expressions like 'x'+3 and 'x'+'y'. The design is
subjected to change later when we fix the class hierarchy of symbolic
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
a16e4fe637c9098d7aa334262b8394c1a8afd857 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList.

- This is not a great decomposition, but it does embed the
translation into the type system, and keep things efficient for
tool chains that don't want to do any translation.

- No intended functionality change.

Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/Option.h
lang/Driver/Options.h
lang/Driver/ToolChain.h
f3cad36e59a41b5767fe662b5ac8911ee174b801 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList.

- This is not a great decomposition, but it does embed the
translation into the type system, and keep things efficient for
tool chains that don't want to do any translation.

- No intended functionality change.

Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
lang/Driver/Compilation.h
lang/Driver/Driver.h
lang/Driver/Option.h
lang/Driver/Options.h
lang/Driver/ToolChain.h
c7f8720d22f898d5885f872b060e270f9d464e16 25-Mar-2009 Anders Carlsson <andersca@mac.com> Improve handling of base initializers. We now parse initializers in out of line decls, such as:

class C {
C() { }

int a;
};

C::C() : a(10) { }

We also diagnose when initializers are used on declarations that aren't constructors:

t.cpp:1:10: error: only constructors take base initializers
void f() : a(10) { }
^

Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a7b3521ef52d983bd0e7fa562bb9ef1393f14634 25-Mar-2009 Anders Carlsson <andersca@mac.com> Improve handling of base initializers. We now parse initializers in out of line decls, such as:

class C {
C() { }

int a;
};

C::C() : a(10) { }

We also diagnose when initializers are used on declarations that aren't constructors:

t.cpp:1:10: error: only constructors take base initializers
void f() : a(10) { }
^

Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
c5d6fa7539cdd5f00ca102783df46f68ae82da18 25-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> In Parser::ParseClassSpecifier, don't conflate a NULL declaration with
failure to perform a declaration. Instead, explicitly note semantic
failures that occur during template parsing with a DeclResult. Fixes
PR3872.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
212e81cc5151b3c42346e43cfd42499a53ffd39a 25-Mar-2009 Douglas Gregor <dgregor@apple.com> In Parser::ParseClassSpecifier, don't conflate a NULL declaration with
failure to perform a declaration. Instead, explicitly note semantic
failures that occur during template parsing with a DeclResult. Fixes
PR3872.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a8cecf66e3d8ebbd30501d92692c912cc843160b 24-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse deleted function definitions and hook them up to Doug's machinery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
50de12f5783b57c74fd30ebfa3945181313625ff 24-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parse deleted function definitions and hook them up to Doug's machinery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
26ea122d7b08fc76c2135ef2609af311d951dac3 24-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Type::isObjectType now implements the (more sensible) C++ definition
of "object type" rather than the C definition of "object type". The
difference is that C's "object type" excludes incomplete types such as

struct X;

However, C's definition also makes it far too easy to use isObjectType
as a means to detect incomplete types when in fact we should use other
means (e.g., Sema::RequireCompleteType) that cope with C++ semantics,
including template instantiation.

I've already audited every use of isObjectType and isIncompleteType to
ensure that they are doing the right thing for both C and C++, so this
is patch does not change any functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
bad0e656c3732e3539a9cd6525de721d7e47408b 24-Mar-2009 Douglas Gregor <dgregor@apple.com> Type::isObjectType now implements the (more sensible) C++ definition
of "object type" rather than the C definition of "object type". The
difference is that C's "object type" excludes incomplete types such as

struct X;

However, C's definition also makes it far too easy to use isObjectType
as a means to detect incomplete types when in fact we should use other
means (e.g., Sema::RequireCompleteType) that cope with C++ semantics,
including template instantiation.

I've already audited every use of isObjectType and isIncompleteType to
ensure that they are doing the right thing for both C and C++, so this
is patch does not change any functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
dec1445fa095364e7c94bfe7bb8f4ad1dbfc17a1 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -flto, -O4, and tweak -emit-llvm to match llvm-gcc.
- -emit-llvm no longer changes what compilation steps are done.

- -emit-llvm and -emit-llvm -S write output files with .o and .s
suffixes, respectively.

- <rdar://problem/6714125> clang-driver should support -O4 and -flto,
like llvm-gcc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Types.def
337a6271b98c4c183f7eaad1563a75260b4f2871 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -flto, -O4, and tweak -emit-llvm to match llvm-gcc.
- -emit-llvm no longer changes what compilation steps are done.

- -emit-llvm and -emit-llvm -S write output files with .o and .s
suffixes, respectively.

- <rdar://problem/6714125> clang-driver should support -O4 and -flto,
like llvm-gcc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Types.def
05e28f67bcd6f3da0eb2cf9916a9fbadcde4257d 24-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure to use RequireCompleteType rather than testing for
incomplete types. RequireCompleteType is needed when the type may be
completed by instantiating a template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
e7450f5dbd5bed63b8ef9db86350a8fc3db011e8 24-Mar-2009 Douglas Gregor <dgregor@apple.com> Make sure to use RequireCompleteType rather than testing for
incomplete types. RequireCompleteType is needed when the type may be
completed by instantiating a template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b1ae14d18ce75793676b6992da4d2053a18ef9d1 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Warn when 'clang' is used to compile a source file we could
conceivably handle, but are defaulting to not using clang for.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
6256d3654533547a7996170647c21a859cb441e1 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Warn when 'clang' is used to compile a source file we could
conceivably handle, but are defaulting to not using clang for.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
0ea85f7b9233049174bd3c494a1ac26122874279 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Change default use of "clang" compiler.
- Don't default to using clang for C++ (use -ccc-clang-cxx to
override).

- Default to only using clang on i386 and x86_64 (use
-ccc-clang-archs "" to override).

- <rdar://problem/6712350> [driver] clang should not be used on
powerpc by default
- <rdar://problem/6705767> driver should default to -ccc-no-clang-cxx

I plan to add a warning that we are not using the clang compiler for
the given compilation so that users do not think clang is being used
in situations it isn't.

This change is motivated by the desire to be able to drop clang into a
build and have things "just work", even if it happens to get used to
compile C++ code or code for an architecture we don't support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
0f99d2e57d8e3cf2508e7f9f868d41eccdc229c9 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Change default use of "clang" compiler.
- Don't default to using clang for C++ (use -ccc-clang-cxx to
override).

- Default to only using clang on i386 and x86_64 (use
-ccc-clang-archs "" to override).

- <rdar://problem/6712350> [driver] clang should not be used on
powerpc by default
- <rdar://problem/6705767> driver should default to -ccc-no-clang-cxx

I plan to add a warning that we are not using the clang compiler for
the given compilation so that users do not think clang is being used
in situations it isn't.

This change is motivated by the desire to be able to drop clang into a
build and have things "just work", even if it happens to get used to
compile C++ code or code for an architecture we don't support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
1a9c8ca241f576c87e0230fc7c9103bc93d61a08 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Move ToolChain::ShouldUseClangCompiler to
Driver::ShouldUseClangCompiler.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/ToolChain.h
af80e1ffafeb77929cc0b9ba8940a7f1c0b80d51 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Move ToolChain::ShouldUseClangCompiler to
Driver::ShouldUseClangCompiler.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/ToolChain.h
fdf1552e33e7fc30b558c688e7829009b6f10e11 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Translate -fverbose-asm for LLVM backend.
- <rdar://problem/6715707> driver should translate -fverbose-asm into
-asm-verbose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
b3fd500a1c486e9fb82d82e28828ead025462aeb 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Translate -fverbose-asm for LLVM backend.
- <rdar://problem/6715707> driver should translate -fverbose-asm into
-asm-verbose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
7c952c9d27956f78b4a5dfb39f3edb2189b0f762 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList::getLastArg was in fact returning the first matching arg.
- <rdar://problem/6715818> clang doesn't honor gcc semantic that last
-O optimization option wins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
fe2e04a979205c1f395b699a24d74adb82bb4833 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList::getLastArg was in fact returning the first matching arg.
- <rdar://problem/6715818> clang doesn't honor gcc semantic that last
-O optimization option wins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
412c34014b576ee253e5026e1e74a5ef62a41135 24-Mar-2009 Anders Carlsson <andersca@mac.com> More work on diagnosing abstract classes. We can now handle cases like

class C {
void g(C c);

virtual void f() = 0;
};

In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclVisitor.h
8211effbd3abc5948a5d6924c87e72323016a376 24-Mar-2009 Anders Carlsson <andersca@mac.com> More work on diagnosing abstract classes. We can now handle cases like

class C {
void g(C c);

virtual void f() = 0;
};

In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclVisitor.h
87050400219c4e5fb53f1729e19f3990e34c5835 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: -r option doesn't take an argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
d3dfdb8d98c39b400894e40ee679c1e7a3a57bf5 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: -r option doesn't take an argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
86a631bda5c8483192c6f7674a60d0df5016d855 23-Mar-2009 Ted Kremenek <kremenek@apple.com> Implement '#pragma unused'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
4726d03ab3abce41911c31d1354a18f1258cae4d 23-Mar-2009 Ted Kremenek <kremenek@apple.com> Implement '#pragma unused'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
lang/Parse/Action.h
lang/Parse/Parser.h
ec0b90f275751a7fd00222b64970a25fe3b80e05 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually
these should disappear.

Here is a more readable list than is in the diff:

W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts,
-Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces,
-Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants,
-Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas,
-Wno-unused-parameter, -Wparentheses, -Wpointer-arith,
-Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch,
-Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable,
-Wwrite-strings.

f options: -fasm-blocks, -fmessage-length=.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
a880db0b0fc028abf754c290d921d809eec0518a 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually
these should disappear.

Here is a more readable list than is in the diff:

W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts,
-Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces,
-Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants,
-Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas,
-Wno-unused-parameter, -Wparentheses, -Wpointer-arith,
-Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch,
-Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable,
-Wwrite-strings.

f options: -fasm-blocks, -fmessage-length=.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
b1f0c697c8eee172eeb9de05a77b75c9b0975679 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Check that options are ordered properly (outside of
Release-Asserts mode).

Also, avoid searching through option groups (which will never match).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
b355692a7f9349e9af747b6b444ce56e9228a696 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Check that options are ordered properly (outside of
Release-Asserts mode).

Also, avoid searching through option groups (which will never match).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
d5a949898d4547babb07823bae45ed8324bef9de 23-Mar-2009 Anders Carlsson <andersca@mac.com> It's an error to try to allocate an abstract object using new.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
b9bbe49f513080b3307e88bdee0d383f4b8c1d4e 23-Mar-2009 Anders Carlsson <andersca@mac.com> It's an error to try to allocate an abstract object using new.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
1e23a5fcf5d96f1504fbf57860d2709b1628c1fc 23-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Fix PR3855. When we encounter an incompatible redeclaration of a
library function, accept this declaration and pretend that we do not
know that this is a library function. autoconf depends on this
(broken) behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
374e156647e4250274eb66102839abf0ee9d7fe8 23-Mar-2009 Douglas Gregor <dgregor@apple.com> Fix PR3855. When we encounter an incompatible redeclaration of a
library function, accept this declaration and pretend that we do not
know that this is a library function. autoconf depends on this
(broken) behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
bf090d3919592058433b1c01da77a159ce48deda 23-Mar-2009 Ted Kremenek <kremenek@apple.com> analyzer: Fix embarrassing regression in BasicStore when invalidating struct
values passed-by-reference to unknown functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
693de5d7feb92c096431c98ea6ee637494bfe6fb 23-Mar-2009 Ted Kremenek <kremenek@apple.com> analyzer: Fix embarrassing regression in BasicStore when invalidating struct
values passed-by-reference to unknown functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
4e67adbb167e43b884cb1ab9c957382c73af5840 23-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Recognize rvalue references in C++03, but complain about them. This leads to far better error recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
743de1f671ee0ef213c7404cfdc85579dd12c56e 23-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Recognize rvalue references in C++03, but complain about them. This leads to far better error recovery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.td
6ca28cbcda9115d6063e293c24e4905dda9c8248 23-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Partial implementation of PR3342: break out pointer sign
incompatibilities in assignments from other pointer incompatibilities.
Based off of the patch in PR3342. (This doesn't implement -Wno-pointer-sign,
but I don't know the driver code very well.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f05c05d2e1a2952e6cc7c3e54366fb8d99ff579c 23-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Partial implementation of PR3342: break out pointer sign
incompatibilities in assignments from other pointer incompatibilities.
Based off of the patch in PR3342. (This doesn't implement -Wno-pointer-sign,
but I don't know the driver code very well.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
8a8b351ed149696f31d5a115e65493667031ad52 23-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow catching exceptions by rvalue reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
f2e21e5ad5e816d88e048c89dc775a9d4547c089 23-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Disallow catching exceptions by rvalue reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
fb88ce0e495979d0b663e98e82308e06dd6a11cb 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement 'missing argument' error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/ArgList.h
lang/Driver/Option.h
lang/Driver/Options.h
b0c4df5c4df69a003f26b378eb95961bc7c486e5 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement 'missing argument' error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/ArgList.h
lang/Driver/Option.h
lang/Driver/Options.h
71612c0a2ed07ad310a735723114cd67b782fd25 22-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> .td files have been used for a few days without complaint. Kill the .def files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
acddd2e5b91123ab43cef0dd74f7a1829f652458 22-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> .td files have been used for a few days without complaint. Kill the .def files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
103c6c7d5921f42e2fa3d72ed1ec59a626e7ed8c 22-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement static_cast from lvalue to rvalue reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
157be839ade8312389b20d02a3d470c0487fd756 22-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement static_cast from lvalue to rvalue reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
83dec9e0a6adc212e3a07dc68eb176165fa6f597 22-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Check that the return/argument types of calls are complete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
e7c6f7aa7e8ee1f0acacc314dcf59d5dadff1524 22-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Check that the return/argument types of calls are complete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
e1299b3edca565a8418a88828d4f7357abed772a 22-Mar-2009 Anders Carlsson <andersca@mac.com> Disallow abstract types where appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
4681ebd429846ed98e7beaf49934fa347ff22152 22-Mar-2009 Anders Carlsson <andersca@mac.com> Disallow abstract types where appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a6fe878ddf8804734de57b1bbd1c8a25ff963024 22-Mar-2009 Chris Lattner <sabre@nondot.org> add some missing type predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
26d1a40edc612f4c53399427480592101acb0dbe 22-Mar-2009 Chris Lattner <sabre@nondot.org> add some missing type predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6348cc6d948ad64b63e4ebdf64d489568e3a9f77 22-Mar-2009 Ted Kremenek <kremenek@apple.com> PTHManager::Create():
- Make the Diagnostic::Level for PTH errors to be specified by the caller

clang (driver):
- Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth
(a hard error) and Diagnostic::Warning for -token-cache (we can still
proceed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
22f0d09298ef05136f1ef6ebc4469b482cbd73e7 22-Mar-2009 Ted Kremenek <kremenek@apple.com> PTHManager::Create():
- Make the Diagnostic::Level for PTH errors to be specified by the caller

clang (driver):
- Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth
(a hard error) and Diagnostic::Warning for -token-cache (we can still
proceed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
1dae87f4b8750e107fde542377d457e462b6c9b1 22-Mar-2009 Anders Carlsson <andersca@mac.com> Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
67e4dd2e9936d828d68b20e01922b6442c6ce31b 22-Mar-2009 Anders Carlsson <andersca@mac.com> Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
ca277321b9f701b45abbd450657bdbfb72428d0f 21-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Issue error if variables are defined inside an objc class,
category or protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
b31cb7f1752ea011fd06ac9574ce24667d11cbdb 21-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Issue error if variables are defined inside an objc class,
category or protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
5db77cd6276bbca3a44db218d6989f516552654b 21-Mar-2009 Chris Lattner <sabre@nondot.org> continue dancing around the obvious algorithm issues in PR3810:
This speeds up getAsIdentifierInfo from being a call to a function
with a big switch to a single testl instruction. This speeds up
the example in PR3810 by 6.2%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
91058ff73fd3b00275348dd4d49f83501dfc0542 21-Mar-2009 Chris Lattner <sabre@nondot.org> continue dancing around the obvious algorithm issues in PR3810:
This speeds up getAsIdentifierInfo from being a call to a function
with a big switch to a single testl instruction. This speeds up
the example in PR3810 by 6.2%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
86913d435f38b466d301682e07798acdb46b7202 21-Mar-2009 Chris Lattner <sabre@nondot.org> add an assertion for unreachable code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
ac8d75fe94f2aefde5179d53e230b99a1fe1201a 21-Mar-2009 Chris Lattner <sabre@nondot.org> add an assertion for unreachable code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
004a9bbb54964500d98c0a3d8d94a2cc35daf267 21-Mar-2009 Chris Lattner <sabre@nondot.org> partially inline getAttrs() to speed up PR3810 (and lots of
other code presumably) by 4.3%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
81abbdd848aa02c30242bd22dcc6ffe024ae2957 21-Mar-2009 Chris Lattner <sabre@nondot.org> partially inline getAttrs() to speed up PR3810 (and lots of
other code presumably) by 4.3%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
37dda8b6017b14ada6e5a563d3b3b4474312d111 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Give Compilation::Execute total control over the Driver result
code; and don't return an error code when -### is present, even if
errors occur.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
af96def468042cfbed55a4cc12b1bb917ead4f33 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Give Compilation::Execute total control over the Driver result
code; and don't return an error code when -### is present, even if
errors occur.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
ee0792c36716c6104957542be022949d99629d62 21-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> When building the structured initializer list, pre-allocate storage in
its vectors based on the subobject type we're initializing and the
(unstructured) initializer list. This eliminates some malloc thrashing
when parsing initializers (from 117 vector reallocations down to 0
when parsing Cocoa.h). We can't always pre-allocate the right amount
of storage, since designated initializers can cause us to initialize
in non-predictable patterns.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fa2192042f223b5122a9e17719930f77634fd31f 21-Mar-2009 Douglas Gregor <dgregor@apple.com> When building the structured initializer list, pre-allocate storage in
its vectors based on the subobject type we're initializing and the
(unstructured) initializer list. This eliminates some malloc thrashing
when parsing initializers (from 117 vector reallocations down to 0
when parsing Cocoa.h). We can't always pre-allocate the right amount
of storage, since designated initializers can cause us to initialize
in non-predictable patterns.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
73e8e03359a46f97b4c2ec586501205376e619e2 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
9f9768c1ee1242ca0e665a070038b53f1f0c6799 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
7b6dfbddac482c9b8a1deaf7d7236c2758418d74 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.
- <rdar://problem/6669441> ccc doesn't handle assembler-with-cpp
semantics correctly (but clang supports it)

- This is sad, because it requires a fairly useless target
hook. C'est la vie.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
e33bea4ef34598e7a4a6a3a117392268998552d4 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.
- <rdar://problem/6669441> ccc doesn't handle assembler-with-cpp
semantics correctly (but clang supports it)

- This is sad, because it requires a fairly useless target
hook. C'est la vie.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
3a45f668dfd4187637ef83ddac66efd2a34f2e56 21-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> InitListDesignations hasn't been used (ever). Eliminate it, and
simplify the parsing and action interface for designated
initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Designator.h
lang/Parse/Parser.h
5908a9293b88a3da57ae59b522275d05e1ab11e0 21-Mar-2009 Douglas Gregor <dgregor@apple.com> InitListDesignations hasn't been used (ever). Eliminate it, and
simplify the parsing and action interface for designated
initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Designator.h
lang/Parse/Parser.h
46970ed35b8989a3c1b787beab82125493ccbd1a 20-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate post-diagnostic hooks. Instead, implement a Sema-specific
variant of DiagnosticBuilder that emits the template instantiation
backtrace when needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
25a88bbf042317976f0d9cbfa87dfe89426e8393 20-Mar-2009 Douglas Gregor <dgregor@apple.com> Eliminate post-diagnostic hooks. Instead, implement a Sema-specific
variant of DiagnosticBuilder that emits the template instantiation
backtrace when needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
51787c77ed35d2d402efb8bc97c3dcf09aedda89 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix <rdar://problem/6704086> by allowing the format string checking in Sema to
allow non-literal format strings that are variables that (a) permanently bind to
a string constant and (b) whose string constants are resolvable within the same
translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
082d936a5b8323ac2c04558d8bca277a647831a3 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix <rdar://problem/6704086> by allowing the format string checking in Sema to
allow non-literal format strings that are variables that (a) permanently bind to
a string constant and (b) whose string constants are resolvable within the same
translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
831c834f4de9c9db16fd7259cde3f310f98bbd88 20-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Improve documentation for MemberExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
57e8b05fe9ba03d410db9c161e032cb79c9ab5ba 20-Mar-2009 Douglas Gregor <dgregor@apple.com> Improve documentation for MemberExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
607415e5b4dee1385ae937dc1f54dd3ddcedb3d2 20-Mar-2009 Ted Kremenek <kremenek@apple.com> GRExprEngine:
- Conjure symbols at '--' and '++' unary operations
- Add utility method SVal::GetConjuredSymbolVal() and constify some arguments
along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
bb9b2711ded08d39f9c9aa08b06ac5e288f32c62 20-Mar-2009 Ted Kremenek <kremenek@apple.com> GRExprEngine:
- Conjure symbols at '--' and '++' unary operations
- Add utility method SVal::GetConjuredSymbolVal() and constify some arguments
along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
d9be90970ec5cfd2f132f66343b949e431adec19 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Parse Darwin version out of target triple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
fc6a89964badf45cbe8e907cd1e1ea1765f5357b 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Parse Darwin version out of target triple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
0008f9d76b2b450fc9e782e7aaa718dc044ec6fa 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Allow profiling of "invalid" Symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
def1a888f999725dba7184e4fae7b94f8978032f 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Allow profiling of "invalid" Symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
eefd914ea5580cc0e615e2c1bc18b09a386d020e 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option overload for AddAllArgValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
ee51031c3734176d00723054c765538fcffc0984 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option overload for AddAllArgValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67377 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
796824014e267eb99d8e80b01eff55f3d5be8b44 20-Mar-2009 Chris Lattner <sabre@nondot.org> pass LangOptions into TargetInfo::getTargetDefines, so that targets
can have language-specific defines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
33328642a7a8a126918814ddcbcebf83c121ad54 20-Mar-2009 Chris Lattner <sabre@nondot.org> pass LangOptions into TargetInfo::getTargetDefines, so that targets
can have language-specific defines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
31e7f6f42abbb965248663fec5ae2a299a1c1d5b 20-Mar-2009 Chris Lattner <sabre@nondot.org> add a new LangOptions::GNUMode bit to distinguish between GNU99 and C99 etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
7e9c90b1a7402dfeca87980cb07e36bedc1a42b8 20-Mar-2009 Chris Lattner <sabre@nondot.org> add a new LangOptions::GNUMode bit to distinguish between GNU99 and C99 etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
7322593f4890c9389c81182a0a4afaf46415e027 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::getAsString and use when dumping arguments to
diagnostics.
- This ensures that the whole argument and values are printed,
instead of just the option name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
38dd3d54186cf44ea9d37f463c3f2800ab526b82 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::getAsString and use when dumping arguments to
diagnostics.
- This ensures that the whole argument and values are printed,
instead of just the option name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
91b9e20fc3c4eecbe548f150fe10263a2589cd78 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -print-search-dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
ca3459e95f552cfae6c9c5fb4ed161e3a662c25e 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -print-search-dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
8fcc087dc28be73e4dc15f354a311f6bc757c964 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Unbreak ToolChain::get{File,Program}Paths (which should return
reference, not copy).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
bbafc5c7645e41a52af688ef8f71a28b19fe4326 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Unbreak ToolChain::get{File,Program}Paths (which should return
reference, not copy).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
cd2c52736917f6a0abc8604413e0ddfd48fbe9b1 20-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Allow flexible array initializers that are not surrounded by
braces. We now build the appropriate fully-structured initializer list
for such things. Per PR3618, verified that we're getting the right
code generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
a6457963cf7ffe71498c408dd590d9d1acb9513c 20-Mar-2009 Douglas Gregor <dgregor@apple.com> Allow flexible array initializers that are not surrounded by
braces. We now build the appropriate fully-structured initializer list
for such things. Per PR3618, verified that we're getting the right
code generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
716abb33028907efa4832c2bcbf7d04b83b55054 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Add accessor Preprocessor::getPTHManager().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
880dcf21dfdb3ff763c60195b6794bab0d913095 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Add accessor Preprocessor::getPTHManager().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
23974ac63841eada280bdd4821091d1b127242a5 20-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Bindir and Win32 builds work, so switch to .inc files. Leave the .def files in the tree for a day or so longer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
4d7a089144f336b11e5e8ce437b3b27bce2b310d 20-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Bindir and Win32 builds work, so switch to .inc files. Leave the .def files in the tree for a day or so longer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
6dca3d20ec3f2000a57a0b2f15a93f40151b3451 19-Mar-2009 Ted Kremenek <kremenek@apple.com> Add PTHManager::getOriginalSourceFile(), a method that returns the name of the
original source file (if any) that was used to generate the PTH cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
68228634016f644a1164fa1f024a9ce2093656bf 19-Mar-2009 Ted Kremenek <kremenek@apple.com> Add PTHManager::getOriginalSourceFile(), a method that returns the name of the
original source file (if any) that was used to generate the PTH cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
3d3732e278ed7586870606c96175e43d6326e2cc 19-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Variables marked as "extern" can actually have internal linkage if
there is a previous declaration marked "static". This fixes PR3645.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5ef122e9449a86e4a6466ea07ed7f5ba5f6a48bc 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Variables marked as "extern" can actually have internal linkage if
there is a previous declaration marked "static". This fixes PR3645.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
47bde7c68e2935358db5cffa7d6a3986bb5bcec8 19-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new expression type, UnresolvedDeclRefExpr, that describes
dependent qualified-ids such as

Fibonacci<N - 1>::value

where N is a template parameter. These references are "unresolved"
because the name is dependent and, therefore, cannot be resolved to a
declaration node (as we would do for a DeclRefExpr or
QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to
DeclRefExprs, QualifiedDeclRefExprs, etc.

Also, be a bit more careful about keeping only a single set of
specializations for a class template, and instantiating from the
definition of that template rather than a previous declaration. In
general, we need a better solution for this for all TagDecls, because
it's too easy to accidentally look at a declaration that isn't the
definition.

We can now process a simple Fibonacci computation described as a
template metaprogram.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/DeclSpec.h
5953d8b37f92f0cf548941f617c9b0a7703df33b 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Introduce a new expression type, UnresolvedDeclRefExpr, that describes
dependent qualified-ids such as

Fibonacci<N - 1>::value

where N is a template parameter. These references are "unresolved"
because the name is dependent and, therefore, cannot be resolved to a
declaration node (as we would do for a DeclRefExpr or
QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to
DeclRefExprs, QualifiedDeclRefExprs, etc.

Also, be a bit more careful about keeping only a single set of
specializations for a class template, and instantiating from the
definition of that template rather than a previous declaration. In
general, we need a better solution for this for all TagDecls, because
it's too easy to accidentally look at a declaration that isn't the
definition.

We can now process a simple Fibonacci computation described as a
template metaprogram.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/DeclSpec.h
3c27dbc90645d3d5b77786c0d4dddf8b8be7c0b2 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Executing piped jobs with a single command is easy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
ceafbc8f55e00345a85d5e6674d3339a45cbbf76 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Executing piped jobs with a single command is easy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
79ba44da3437146a9cc3fec5cd16443ec2e361a1 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::renderAsInput; this is a messy area and something I
was hoping to clean up in the rewrite, but I don't see it yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Options.def
42f7fc23044cc736db77878734258d35ad3dfe66 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::renderAsInput; this is a messy area and something I
was hoping to clean up in the rewrite, but I don't see it yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Options.def
76485a9d630813a9320e494b7e5b9e67d9e025ca 19-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Print the context of tag types as part of pretty-printing, e.g.,

struct N::M::foo



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
24c46b3133b03e254877a680f92f035e56058a39 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Print the context of tag types as part of pretty-printing, e.g.,

struct N::M::foo



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7e50826d3559f284eee6659f0aa159c68f504b34 19-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Generalize printing of nested-name-specifier sequences for use in both
QualifiedNameType and QualifiedDeclRefExpr. We now keep track of the
exact nested-name-specifier spelling for a QualifiedDeclRefExpr, and
use that spelling when printing ASTs. This fixes PR3493.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
bad351822117eaf280081494e3dbe4a06c0dbfcf 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Generalize printing of nested-name-specifier sequences for use in both
QualifiedNameType and QualifiedDeclRefExpr. We now keep track of the
exact nested-name-specifier spelling for a QualifiedDeclRefExpr, and
use that spelling when printing ASTs. This fixes PR3493.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
734b4baa8e7677d03085a3d3716fa550fb40be63 19-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a representation for types that we referred to via a
qualified name, e.g.,

foo::x

so that we retain the nested-name-specifier as written in the source
code and can reproduce that qualified name when printing the types
back (e.g., in diagnostics). This is PR3493, which won't be complete
until finished the other tasks mentioned near the end of this commit.

The parser's representation of nested-name-specifiers, CXXScopeSpec,
is now a bit fatter, because it needs to contain the scopes that
precede each '::' and keep track of whether the global scoping
operator '::' was at the beginning. For example, we need to keep track
of the leading '::', 'foo', and 'bar' in

::foo::bar::x

The Action's CXXScopeTy * is no longer a DeclContext *. It's now the
opaque version of the new NestedNameSpecifier, which contains a single
component of a nested-name-specifier (either a DeclContext * or a Type
*, bitmangled).

The new sugar type QualifiedNameType composes a sequence of
NestedNameSpecifiers with a representation of the type we're actually
referring to. At present, we only build QualifiedNameType nodes within
Sema::getTypeName. This will be extended to other type-constructing
actions (e.g., ActOnClassTemplateId).

Also on the way: QualifiedDeclRefExprs will also store a sequence of
NestedNameSpecifiers, so that we can print out the property
nested-name-specifier. I expect to also use this for handling
dependent names like Fibonacci<I - 1>::value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Parse/DeclSpec.h
e4e5b054b4917f0ee493bb2fda5b1ec749bfb9a1 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Introduce a representation for types that we referred to via a
qualified name, e.g.,

foo::x

so that we retain the nested-name-specifier as written in the source
code and can reproduce that qualified name when printing the types
back (e.g., in diagnostics). This is PR3493, which won't be complete
until finished the other tasks mentioned near the end of this commit.

The parser's representation of nested-name-specifiers, CXXScopeSpec,
is now a bit fatter, because it needs to contain the scopes that
precede each '::' and keep track of whether the global scoping
operator '::' was at the beginning. For example, we need to keep track
of the leading '::', 'foo', and 'bar' in

::foo::bar::x

The Action's CXXScopeTy * is no longer a DeclContext *. It's now the
opaque version of the new NestedNameSpecifier, which contains a single
component of a nested-name-specifier (either a DeclContext * or a Type
*, bitmangled).

The new sugar type QualifiedNameType composes a sequence of
NestedNameSpecifiers with a representation of the type we're actually
referring to. At present, we only build QualifiedNameType nodes within
Sema::getTypeName. This will be extended to other type-constructing
actions (e.g., ActOnClassTemplateId).

Also on the way: QualifiedDeclRefExprs will also store a sequence of
NestedNameSpecifiers, so that we can print out the property
nested-name-specifier. I expect to also use this for handling
dependent names like Fibonacci<I - 1>::value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/NestedNameSpecifier.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Parse/DeclSpec.h
96969e234609db1d2d27a07d99084352b3d0804e 19-Mar-2009 Gabor Greif <ggreif@gmail.com> Add a sugared version of ASTOwningResult::take,
that does a downcast. It is named takeAs<T>().
The plain-pointer version is also added, but
that side seems to be seriously bitrotten.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
fb5cab24e271d35e2476c5f60d28ddbabc6ac492 19-Mar-2009 Gabor Greif <ggreif@gmail.com> Add a sugared version of ASTOwningResult::take,
that does a downcast. It is named takeAs<T>().
The plain-pointer version is also added, but
that side seems to be seriously bitrotten.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
1fef88d69733424179f5b90632e116101d7010e0 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Execute jobs; no pipe support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Compilation.h
49b98e700e300b8a61b2f7fbb0bb22264e8ec27a 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Execute jobs; no pipe support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Compilation.h
2c7de6dabb766d0ab8350090fc9afc18743378de 18-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> objc: Implemented variables declared in class interface
whose sema decl is at the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
38e24c782c17b6058bf61d635747bbde19fb1bc7 18-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> objc: Implemented variables declared in class interface
whose sema decl is at the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
31a76e3eee82b52694c3f7e2b8fcb89fb364f407 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Cleanup temporary/result files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Compilation.h
e530ad407af4a8904377592bfdb236acd320c6c2 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Cleanup temporary/result files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Compilation.h
6182bb6ee658dd94902c209e708a6d7ab0e9fc86 18-Mar-2009 Ted Kremenek <kremenek@apple.com> Add stub TableGen file for diagnostic options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticOptions.td
c1ce194ea5e2a3e6ab2f27edad93fd680c381246 18-Mar-2009 Ted Kremenek <kremenek@apple.com> Add stub TableGen file for diagnostic options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticOptions.td
cc7600c5c957e9c6fe15b9fc947ec6a2b8af25e6 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support ToolChain specific path lists to search for files and
programs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
0edefebc10fbc627d55d53936fc66178d1c08da1 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support ToolChain specific path lists to search for files and
programs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
b6ddc9573ba61f8d06b522c512c1f78f5b9dbea1 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Construct temporary file names.
- This is still suboptimal, but should at least be workable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
214399ebd73545dde02b4a45872e7ca9e1d9e742 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Construct temporary file names.
- This is still suboptimal, but should at least be workable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
4c31702d942cb5b00c02a999202b4dadad506341 18-Mar-2009 Ted Kremenek <kremenek@apple.com> HTML rewriter: Don't replace tabs with spaces by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
9a688659ed6bb3f6a3e4d76a88c2c626616e3c90 18-Mar-2009 Ted Kremenek <kremenek@apple.com> HTML rewriter: Don't replace tabs with spaces by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
374511f867e2b07197cb2847d96a3f28b4add859 18-Mar-2009 Ted Kremenek <kremenek@apple.com> Refactor 'Warning', 'Extension', and 'ExtWarn' TableGen classes to subclass
'DiagnosticControlled'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
dd62beb8f7004c14c6f7731cb57e2c188051208e 18-Mar-2009 Ted Kremenek <kremenek@apple.com> Refactor 'Warning', 'Extension', and 'ExtWarn' TableGen classes to subclass
'DiagnosticControlled'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67209 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
b4266ea0b557935691f48e591577b6edf65c4900 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Port Clang argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
1d46033f760ba5fd266ce59fe391fac473f04f52 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Port Clang argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
3a4dcdff6934a670b6ed4f4ced3d56945eb6a8d7 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add argument translation utilities to ArgList.
- Support things like telling which -ffoo -fno-foo option won, and
forwarding all arguments matching a certain set of options to the
tool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
18a7f33af877fca8f72cfde00d52f4aef600547f 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add argument translation utilities to ArgList.
- Support things like telling which -ffoo -fno-foo option won, and
forwarding all arguments matching a certain set of options to the
tool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
790b1e66aa0b0167ea3d8e8bff68241ebc761fe3 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forgot to mark -### as a driver option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
e324ffe33e179f6167d18834e15c48c49e314bb4 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forgot to mark -### as a driver option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
5591e8d604aba4163994f2906f906fda4ab9ef86 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add "d" flag to Options.def for options which are completely
handled by driver.
- This is not very precise, we use it to drive the "forward-to-gcc"
predicate, when trying to talk to a generic gcc tool.

- Slightly better than what ccc was doing, and should be good
enough. Platforms which want a robust driver should implement a
proper tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.def
6d954d788925e6b80077ef379c8eeb028cc31d0e 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add "d" flag to Options.def for options which are completely
handled by driver.
- This is not very precise, we use it to drive the "forward-to-gcc"
predicate, when trying to talk to a generic gcc tool.

- Slightly better than what ccc was doing, and should be good
enough. Platforms which want a robust driver should implement a
proper tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.def
933ac4568614ff525639e2d077b721b80c453154 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ConstructJob also needs to know the destination (where to put
its commands).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
lang/Driver/Tool.h
871adcf4e41285e3f4c3b62eaa1b2e05b60b92da 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ConstructJob also needs to know the destination (where to put
its commands).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
lang/Driver/Tool.h
1b265978eb3a9b001c15f39cec70c63cb2a05c44 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -### (hard to tell, since we don't actually
construct any jobs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
24b5560b6ea51b8a260194710468fa060775fc01 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -### (hard to tell, since we don't actually
construct any jobs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
7b9e5b6c72c0db181d33670a4f1c425cbc8cb055 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add forwarding methods to underlying list for PipedJob and
JobList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
cfcb96f610d6354234e8c33f3a25e340f6cd3a80 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add forwarding methods to underlying list for PipedJob and
JobList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
4d093fa5555c845a5742baaac91cb95cb4f5386d 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make Arg::Claimed mutable.
- This is unfortunate but necessary to retain any utility for const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
456422c7eccee0e74893eb52b7fcd9171b6ea079 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make Arg::Claimed mutable.
- This is unfortunate but necessary to retain any utility for const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
7e4387447ed822f95f47bb4847a5e6dee2f93064 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rename Command::Argv to Command::Arguments to make it clearer
that this does not include the implicit first argument (the executable
name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
d57ac5990d22592665a67a28fc5d39f1155424d3 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rename Command::Argv to Command::Arguments to make it clearer
that this does not include the implicit first argument (the executable
name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
be4533875746acc5b7ea98de41b9ea4051819920 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add a dash of const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
62cf601812e03dd9bc5df42b8ef06a0cdedc38bf 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add a dash of const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
00fd37960476697fe729a16f8c2c55213d6ef1d4 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Tool::ConstructJob.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
lang/Driver/Util.h
47ac7d27c44bd64a7d0fc03d4babc196cf2b8230 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Tool::ConstructJob.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
lang/Driver/Util.h
2b856ce04ee93882c46e6642314d98d7e4f14a83 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Ditch Driver::DefaultToolChain, this can vary between compilations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
lang/Driver/Driver.h
10ffa9a4887d9376e3eb3598e40523d1b58773c9 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Ditch Driver::DefaultToolChain, this can vary between compilations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
lang/Driver/Driver.h
c42a0f42b5288f847eb4f83a9470021939d58afa 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Err, didn't mean to commit this part yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
d9c834f6af12ab21d5d4af8150e6fb94eadda043 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Err, didn't mean to commit this part yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
73f7b8c73ad89e96bfdea06b56528f102a431b88 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move actions into Compilation, and construct the compilation
earlier.

- This gives us a simple ownership model, and allows clients access
to more information should they ever want it.

- We now free Actions correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
21549237f14505cfc2a18a06416372a36229d0ce 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move actions into Compilation, and construct the compilation
earlier.

- This gives us a simple ownership model, and allows clients access
to more information should they ever want it.

- We now free Actions correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
1925278b252f9d2674f59271558d8e2aa775458e 18-Mar-2009 Chris Lattner <sabre@nondot.org> don't crash when sentinel attribute is used on function without a prototype,
discovered as part of PR3817


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
897cd90fef4cd5139999585f3af31d85c2d07720 18-Mar-2009 Chris Lattner <sabre@nondot.org> don't crash when sentinel attribute is used on function without a prototype,
discovered as part of PR3817


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
835327293da59eb16667ae5a2b7158131865a079 17-Mar-2009 Chris Lattner <sabre@nondot.org> Fix Type::getDesugaredType() to remove all direct sugar on
a type. For example, if we have a typedef of a typeof of
int, we strip all the say down to int. This allows us to
simplify the getAs* methods, and is the first step towards
fixing PR3817


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2fa8c2598c2615da4639b4e42e9079647bd3aea4 17-Mar-2009 Chris Lattner <sabre@nondot.org> Fix Type::getDesugaredType() to remove all direct sugar on
a type. For example, if we have a typedef of a typeof of
int, we strip all the say down to int. This allows us to
simplify the getAs* methods, and is the first step towards
fixing PR3817


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
07c9a1d3de9711e052206cee39d26d26dccc9c31 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -ccc-print-bindings option (for testing); the Python
driver has no corresponding option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
5c3c1d7b494660ba5e8983ee4584622750725ac2 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -ccc-print-bindings option (for testing); the Python
driver has no corresponding option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
eed1b4206be7cc0df6e18db75ea00263adbd7b5b 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add name to Tool (for testing/debugging) and move GCC_* tools
into gcc:: namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
31b1e5437e7435879fc044afb77ff27096008e72 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add name to Tool (for testing/debugging) and move GCC_* tools
into gcc:: namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
b5d3e9547d8ce2d566cacac0ddf5708689ef1f24 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool selection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
670b7f4fe6720e91520ec5a993b33c00058ed77a 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool selection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Tool.h
cd5386954ad3146ac973237c909d9c21759d30c9 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass HostInfo reference into ToolChain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
fa0cda430f7324404ddd74f41a3b8f5f749d7ec1 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass HostInfo reference into ToolChain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ToolChain.h
1b39ef49e647e821486916cafab07d641277c054 17-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor instantiation of declarations within a template into a much
cleaner visitor framework.

Added a visitor for declarations, which is quite similar to the
visitor for statatements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclVisitor.h
8dbc2694424b4e842b1d5ea39744a137b58600c3 17-Mar-2009 Douglas Gregor <dgregor@apple.com> Refactor instantiation of declarations within a template into a much
cleaner visitor framework.

Added a visitor for declarations, which is quite similar to the
visitor for statatements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclVisitor.h
08966caa2b46f3a963299ef50102cf7a28312825 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass Driver reference down into Host info, which will need it
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/HostInfo.h
e504952bc89f79fc9ff54d5641ab30bb07ec435e 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass Driver reference down into Host info, which will need it
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/HostInfo.h
7424b8a2c4d6ecb1f6b0360f146a84862f2354aa 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Hide HostInfo implementations.
- Also, normalize arch names a tad and stub out getToolChain
implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/HostInfo.h
1fd6c4b8abbbdcbae0e221f35100102112dabff2 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Hide HostInfo implementations.
- Also, normalize arch names a tad and stub out getToolChain
implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/HostInfo.h
35f55a2724cd51049cb7303144ee27c0fab34dc8 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option form of ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
cd4e186cdc1db0dcac937eb20afe8b5f5ff1a38d 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option form of ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
01fb26a9fd7a5550d736b70f9ac8462a764b66f3 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add logic for computing where to put job outputs (pipe,
temporary file, user provided name, derived name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
441d060838a5797691777dfcc992ff836b73dcd1 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add logic for computing where to put job outputs (pipe,
temporary file, user provided name, derived name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
290bb3d3948fbea6650944ce880a2b276eb361b9 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add list of temporary and result files to Compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
df78a9515c108677ed42c2b982c612362f18c277 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add list of temporary and result files to Compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
019b241c8b5d6929f15168bb97eeb614a2729d73 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add ArgList::MakeArgString and make ArgList::Make* const.
- Slightly strange, but the idea is that the ArgList data structure
is primarily a list of arguments; we want to allow clients to still
add argument strings to an ArgList to avoid worrying about string
lifetimes (or unnecessary string copying).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
3494bb1e01eb5f90d4dc9c91b912daf945da4ff5 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add ArgList::MakeArgString and make ArgList::Make* const.
- Slightly strange, but the idea is that the ArgList data structure
is primarily a list of arguments; we want to allow clients to still
add argument strings to an ArgList to avoid worrying about string
lifetimes (or unnecessary string copying).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
ce6fff0486d0e15bc969fb0e3e4850c0784e997f 17-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd 17-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/DiagnosticSemaKinds.td
026a2ef889178bbf6707465b73909aa38aaf7e6b 17-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
lang/Basic/CMakeLists.txt
lang/Basic/Makefile
lang/CMakeLists.txt
lang/Makefile
a393e9eedcc28b25f521a4feceb3b56e3d0d360f 17-Mar-2009 Douglas Gregor <dgregor@apple.com> Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
lang/Basic/CMakeLists.txt
lang/Basic/Makefile
lang/CMakeLists.txt
lang/Makefile
7ce6adde549f61daff167128dadfc0fad8a9c11f 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement majority tool binding logic.
- Still need code for determining proper output location.

- Doesn't work yet, of course, as the host isn't providing real
tool chains.

- Interface still has a few warts, but has gotten a nice bit of
polish during the rewrite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
f353c8cc2ee1cc16ff194b399a8d951f707fb129 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement majority tool binding logic.
- Still need code for determining proper output location.

- Doesn't work yet, of course, as the host isn't providing real
tool chains.

- Interface still has a few warts, but has gotten a nice bit of
polish during the rewrite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
9d625e1c4e1e2931bad73515d051e0f2a090ceec 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Migrate some data into the Compilation; after pipelining
access to most data should go through the current Compilation, not the
Driver (which shouldn't be specialized on variables for a single
compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
586dc233bb88f2920c9f3638f69cef0ccd55dced 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Migrate some data into the Compilation; after pipelining
access to most data should go through the current Compilation, not the
Driver (which shouldn't be specialized on variables for a single
compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
e1cef7d00e0f9ac3afeac2284bbcfd1abda7c5ff 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Tool and ToolChain classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Tool.h
lang/Driver/ToolChain.h
2ba38ba9a18b8ec88e2509fad622eeec01562769 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Tool and ToolChain classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Tool.h
lang/Driver/ToolChain.h
44710a5db41b3c30bdf35f59117792492c090d7f 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Include Casting header definitions in a few places, add
Action::getInputs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
lang/Driver/Job.h
a1ead48a4e9961c7eb22592310c7e9c30cb56794 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Include Casting header definitions in a few places, add
Action::getInputs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
lang/Driver/Job.h
9951dbcaa76733b05b910a5c3e61d3c1ce67e4c1 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for rvalue references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
05532f2a88161eb6d9b796614f1b82dca541ff22 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for rvalue references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
c45057a4b1aae40e5b63424444cb2615a1bc4399 15-Mar-2009 Anders Carlsson <andersca@mac.com> Handle static_asserts when instantiating structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
94b15fbc3a10cdfb1639528a8a773b66a1e7cd9e 15-Mar-2009 Anders Carlsson <andersca@mac.com> Handle static_asserts when instantiating structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
7f2e7440faa9260d23fcbc0a0368d10f9538b462 15-Mar-2009 Anders Carlsson <andersca@mac.com> Add the ability to clone integer and string literals. Use it when instantiating template expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a135fb43eb94524a6529768596a4533eed9aa70d 15-Mar-2009 Anders Carlsson <andersca@mac.com> Add the ability to clone integer and string literals. Use it when instantiating template expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67030 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
76bb8ec9aab1ccfcf2b5665ce7e8ed9e591ad143 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f53597fb16142bdb4a66901f8c0b768db4f2a548 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67029 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
de92817bd6070904a4e24e8b5e35c4836a38a96e 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Keep diagnostic td in sync with r67015.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
8afc3da10f9bdf3036ee2b8253d329f97a15219b 15-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Keep diagnostic td in sync with r67015.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
cd695c24f602ea3adea7316d7a891bf48594369a 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix comment typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
4abaed07d1b8037870a1c0de75746aa74d56c428 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix comment typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
114ec035530be59bc6f8dab46e8bd89d8e916158 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Typo fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
223476833a3aa5f383529e914ac28b5aa627aac5 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Typo fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
c413f8223307f9578ddb67eb184e794205d6c9f7 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start warning about unused arguments.
- This has a number of current flaws, enabling now to flush out
problems while bringing up other parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Driver/Arg.h
8d2554a2c3201aa664cbf2108cf9d57aa0aa4b0a 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start warning about unused arguments.
- This has a number of current flaws, enabling now to flush out
problems while bringing up other parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Driver/Arg.h
e9c70fa179dff6bd5e0c8c9efb5d347c2ff985eb 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
arguments if they exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
8022fd46d45005de63306a7513aece20a1be16ed 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
arguments if they exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
eee67792c8f4abd48c28e7b3267022fda25bca8d 14-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Revert the switch to the tablegen diags. It fails for seperate objdir builds and cmake builds, and I have no clue what to do about it. Revisit this after someone with a clue about the build systems has looked at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67009 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/CMakeLists.txt
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/Makefile
lang/CMakeLists.txt
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Makefile
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
e89b6b272f9f3b15afa56a701a4d7a6b1001ed34 14-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Revert the switch to the tablegen diags. It fails for seperate objdir builds and cmake builds, and I have no clue what to do about it. Revisit this after someone with a clue about the build systems has looked at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67009 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/CMakeLists.txt
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/Makefile
lang/CMakeLists.txt
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Makefile
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
fa70786a0bc7a28c23c389fbe538038e1ea97ce2 14-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Switch diagnostics from .def to tablegen files. Please validate the Windows build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67007 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/CMakeLists.txt
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/Makefile
lang/CMakeLists.txt
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Makefile
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
3801d71fbeb6e74a22cdd6a858e10d887bc29c7a 14-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Switch diagnostics from .def to tablegen files. Please validate the Windows build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67007 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
akefile
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/CMakeLists.txt
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/Makefile
lang/CMakeLists.txt
lang/Driver/DriverDiagnostic.h
lang/Frontend/FrontendDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Makefile
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
3776eb10d9ca9b2d46fa85af87e1119af2272d71 14-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Update tablegen diagnostic files to be in sync with the def files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticAnalysisKinds.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
f4dc83c6377fc14d230ccc3e82dc24d03b14f725 14-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Update tablegen diagnostic files to be in sync with the def files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticAnalysisKinds.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
c5f6de063c95e74de9f6d52ce7332cc260320ad6 14-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove dead DeclarationName constructors that involving knowing about the
internal implementation of Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
3eb8dd78a622d257a7fed279714428c3de906f93 14-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove dead DeclarationName constructors that involving knowing about the
internal implementation of Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
ed69156f9911f1107f284a0b62bdc62295979867 14-Mar-2009 Anders Carlsson <andersca@mac.com> More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
fb311762bb52dc015c02cb257d2913f104b556f8 14-Mar-2009 Anders Carlsson <andersca@mac.com> More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
afc86944eda447fb5bb71ab1a664e594b712f8c7 14-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Check for overflow and signedness problems with template
arguments. Eliminates a FIXME.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
f80a9d5c2ccc465211178223799217f7a42774ae 14-Mar-2009 Douglas Gregor <dgregor@apple.com> Check for overflow and signedness problems with template
arguments. Eliminates a FIXME.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
7c568a445f1fa9278ff887e4a5ffd19ad05ee0f7 14-Mar-2009 Ted Kremenek <kremenek@apple.com> Make Selector::getIdentifierInfo() private. I took a first attempt at this last
week in:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013580.html

That patch caused the output of the diagnostics to change. Since
'DeclarationName' can already reason about Selectors and the Diagnostics logic
reasons about DeclarationName, there is no additional code needed to get the
diagnostics working by making Selector::getIdentifierInfo() private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
8af2c16571f3aade6d47ce81fa3857d01d375719 14-Mar-2009 Ted Kremenek <kremenek@apple.com> Make Selector::getIdentifierInfo() private. I took a first attempt at this last
week in:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013580.html

That patch caused the output of the diagnostics to change. Since
'DeclarationName' can already reason about Selectors and the Diagnostics logic
reasons about DeclarationName, there is no additional code needed to get the
diagnostics working by making Selector::getIdentifierInfo() private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
544cda6467e24d0ced693fbb52f800405de610e7 14-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that the canonical representation of integral template arguments uses the bitwidth and signedness of the template parameter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
5b0f752655cc94b970113235110b56a722eb40d4 14-Mar-2009 Douglas Gregor <dgregor@apple.com> Make sure that the canonical representation of integral template arguments uses the bitwidth and signedness of the template parameter

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
c78182dea4396fba411d2526a1386ca994eee6c0 14-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for the prefix unary operators. As
always, refactored the existing logic to tease apart the parser action
and the semantic analysis shared by the parser and template
instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bc736fceca6f0bca31d16003a7587857190408fb 14-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for the prefix unary operators. As
always, refactored the existing logic to tease apart the parser action
and the semantic analysis shared by the parser and template
instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
50e035e408ae0217c0cb0fe8f142cd37ae886230 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::{isAcceptedByClang,isCXX} predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
4db938ceb72dbaa5f7b50f6420a72629acbf29eb 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::{isAcceptedByClang,isCXX} predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
56085246b0e1ea62320c484df82c4397f45eb41b 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add simple Job classes, simple wrappers for information about
what processes to execute during a compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
789e220d481371d52bd6265b5c414c5fe277f76b 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add simple Job classes, simple wrappers for information about
what processes to execute during a compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Job.h
a24e8d5003c83020e9cb821a9f6b2cbc10915b2b 14-Mar-2009 Anders Carlsson <andersca@mac.com> Pass more sane arguments to ActOnStaticAssertDeclaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ad5f960f9e42568a87bf5e03dce7ad878f9ba6da 14-Mar-2009 Anders Carlsson <andersca@mac.com> Pass more sane arguments to ActOnStaticAssertDeclaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d436b8ed860b2bebce2906fa734766b890c801c9 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Provide food and shelter for Action vtables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
f40ed17472a39097cc5039ed437445289487c9bf 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Provide food and shelter for Action vtables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
911b867858e37e8c5fcf105f75423cff911c0c09 13-Mar-2009 Chris Lattner <sabre@nondot.org> wire up a new -fno-builtin option, make it control things like simplifylibcalls,
etc and make freestanding imply it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
lang/Basic/LangOptions.h
7644f0726c310ec4224085eaea5f9aff8b957d90 13-Mar-2009 Chris Lattner <sabre@nondot.org> wire up a new -fno-builtin option, make it control things like simplifylibcalls,
etc and make freestanding imply it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
lang/Basic/LangOptions.h
50f45b6375f57078e247fa75dce10b5dc70dbed0 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Include component warning TableGen files in Diagnostic.td.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
0527bcc36d67c4475d95669944d667c6f19f4ea4 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Include component warning TableGen files in Diagnostic.td.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
47d762ee90d6d91fb851a41d833b4bdc2ad480ea 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sprinkle some consts in, stub out BuildJobs method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
57b704d8d8f49bcaf856a3e37941d5ac6456eb50 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sprinkle some consts in, stub out BuildJobs method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
c8e528ee11acaa9d8320d752820d09e579c5e4b0 13-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3798 by ignoring all diagnostics generated while repreprocessing a file in rewrite macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
7c175fb196a2bc3dbc86ea3865c713e1875f3f6d 13-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3798 by ignoring all diagnostics generated while repreprocessing a file in rewrite macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
f1e7b79fc7d42da912a08ea8f09089f9bc12712c 13-Mar-2009 Chris Lattner <sabre@nondot.org> make Preprocessor::Diags be a pointer instead of a reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
836040f9eafe862fb1607df5c30cd3df0c22c832 13-Mar-2009 Chris Lattner <sabre@nondot.org> make Preprocessor::Diags be a pointer instead of a reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
396f114b5e704ed6d0ca7f89caf377322f287ead 13-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for several more kinds of expressions:
- C++ function casts, e.g., T(foo)
- sizeof(), alignof()

More importantly, this allows us to verify that we're performing
overload resolution during template instantiation, with
argument-dependent lookup and the "cached" results of name lookup from
the template definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
ba49817c5b9f502602672861cf369fd0e53966e8 13-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for several more kinds of expressions:
- C++ function casts, e.g., T(foo)
- sizeof(), alignof()

More importantly, this allows us to verify that we're performing
overload resolution during template instantiation, with
argument-dependent lookup and the "cached" results of name lookup from
the template definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
be54e2ad1f57b0cce18fd7288992e61143e1d109 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
e8463ef889be035312c2e40fa318bbbcfce02a3e 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticFrontendKinds.td
2da0d0df43c875938cbf58cb466b0f1cf63bce66 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Add missing ';'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
88ef4c48277cb2444d57e67fd5234d9b0509d7e9 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Add missing ';'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.td
00fe3f63604d2be2fafbf42fe5df0795d7d29116 13-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Refactor the way we handle operator overloading and template
instantiation for binary operators. This change moves most of the
operator-overloading code from the parser action ActOnBinOp to a new,
parser-independent semantic checking routine CreateOverloadedBinOp.

Of particular importance is the fact that CreateOverloadedBinOp does
*not* perform any name lookup based on the current parsing context (it
doesn't take a Scope*), since it has to be usable during template
instantiation, when there is no scope information. Rather, it takes a
pre-computed set of functions that are visible from the context or via
argument-dependent lookup, and adds to that set any member operators
and built-in operator candidates. The set of functions is computed in
the parser action ActOnBinOp based on the current context (both
operator name lookup and argument-dependent lookup). Within a
template, the set computed by ActOnBinOp is saved within the
type-dependent AST node and is augmented with the results of
argument-dependent name lookup at instantiation time (see
TemplateExprInstantiator::VisitCXXOperatorCallExpr).

Sadly, we can't fully test this yet. I'll follow up with template
instantiation for sizeof so that the real fun can begin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Type.h
063daf6e196c51f162e0485478355d8e280eef5c 13-Mar-2009 Douglas Gregor <dgregor@apple.com> Refactor the way we handle operator overloading and template
instantiation for binary operators. This change moves most of the
operator-overloading code from the parser action ActOnBinOp to a new,
parser-independent semantic checking routine CreateOverloadedBinOp.

Of particular importance is the fact that CreateOverloadedBinOp does
*not* perform any name lookup based on the current parsing context (it
doesn't take a Scope*), since it has to be usable during template
instantiation, when there is no scope information. Rather, it takes a
pre-computed set of functions that are visible from the context or via
argument-dependent lookup, and adds to that set any member operators
and built-in operator candidates. The set of functions is computed in
the parser action ActOnBinOp based on the current context (both
operator name lookup and argument-dependent lookup). Within a
template, the set computed by ActOnBinOp is saved within the
type-dependent AST node and is augmented with the results of
argument-dependent name lookup at instantiation time (see
TemplateExprInstantiator::VisitCXXOperatorCallExpr).

Sadly, we can't fully test this yet. I'll follow up with template
instantiation for sizeof so that the real fun can begin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Type.h
2b30d91cc05f0698d885464bbe07b03727d2528c 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Forward -fheinous-gnu-extensions to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
13135a6171e5eb1dd0b10f49305bb757b8f8b20c 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Forward -fheinous-gnu-extensions to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
dd863aa6f9b9514480ff6b7e6f927eb6cc9835ff 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Some minor bug fixes.
- language recognition was recognizing prefixes incorrectly.
- -x none wasn't working.
- test for "can lipo" was backwords.
- missed a '"' in -ccc-print-phases


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
3dbd6c51bcd8a730c3fe58e29d7e0d999a94fa91 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Some minor bug fixes.
- language recognition was recognizing prefixes incorrectly.
- -x none wasn't working.
- test for "can lipo" was backwords.
- missed a '"' in -ccc-print-phases


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.def
1e3eedb7a8ef93f39107d9da4a5bba25899ab50d 13-Mar-2009 Chris Lattner <sabre@nondot.org> introduce a new -fheinous-gnu-extensions flag that enables really
really horrible extensions that are disabled by default but that can
be accepted by -fheinous-gnu-extensions (but which always emit a
warning when enabled).

As our first instance of this, implement PR3788/PR3794, which allows
non-lvalues in inline asms in contexts where lvalues are required. bleh.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/LangOptions.h
810f6d5d6223adaab0ccf0139f40de6484ad1bb5 13-Mar-2009 Chris Lattner <sabre@nondot.org> introduce a new -fheinous-gnu-extensions flag that enables really
really horrible extensions that are disabled by default but that can
be accepted by -fheinous-gnu-extensions (but which always emit a
warning when enabled).

As our first instance of this, implement PR3788/PR3794, which allows
non-lvalues in inline asms in contexts where lvalues are required. bleh.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/LangOptions.h
ab0b8b17cf7b4eb4e367e8ed9ed23b7139b4be62 13-Mar-2009 Chris Lattner <sabre@nondot.org> add a helper function to strip noop casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ecdd84147c0765caa999ddc22dde25b42712bb4d 13-Mar-2009 Chris Lattner <sabre@nondot.org> add a helper function to strip noop casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
216ee1868363f079762ac59370fd1e5f7d8c3810 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
36c233837a37e295ecef133739d2b6429c72b960 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
494cb0fa1fd613f3dff87a25ab47049f1d9201f9 13-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector.

Also changed BlockDecl API to be more consistent (wrt FunctionDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e78b809bbcd92928a63da81f2cd843faad3e4dfd 13-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector.

Also changed BlockDecl API to be more consistent (wrt FunctionDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b88d81c0e720bd43335c2776841fa7597c3ca66d 13-Mar-2009 Steve Naroff <snaroff@apple.com> Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741).

Will replace with something better today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
caaacecb2b64e6d2e402533baffda4cb540f4145 13-Mar-2009 Steve Naroff <snaroff@apple.com> Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741).

Will replace with something better today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
61705c15dcc579c0c51454de85a4881d9f88df61 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix failure reported by Sebastian of test/Analysis/ptr-arith.c when the target
is 64-bit. I used his suggestion of doing a direct bitwidth/signedness
conversion of the 'offset' instead of just changing the sign. For more
information, see:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-March/004587.html


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
610e81d6b7248ce4be4be2252b03a5d4052c9835 13-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix failure reported by Sebastian of test/Analysis/ptr-arith.c when the target
is 64-bit. I used his suggestion of doing a direct bitwidth/signedness
conversion of the 'offset' instead of just changing the sign. For more
information, see:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-March/004587.html


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
494646bbd807879ba5ec2d7209adf188f091a42c 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -ccc-print-phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
ba1021388e6839b76c8968b931189361c7286674 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -ccc-print-phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
612bd74ddac1eb9e71e06aac65c3fb165fc617f5 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add cast<> support for Action, and some other accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
85da0071a4ab7d6f06831d20bad79122d7407df7 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add cast<> support for Action, and some other accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
85cb359c04709148c2ef29c4c5c204fc7bd53e85 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Complete "pipelining" (building the list of abstract actions
to perform). Still doesn't do anything interesting.
- This code came out much cleaner than in ccc with the reworked
phases & mapping of types to lists of compilation steps (phases) to
perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Driver/Driver.h
ad2a9af666efdd9afe3bb5f886bcb0d1c9a0f0c3 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Complete "pipelining" (building the list of abstract actions
to perform). Still doesn't do anything interesting.
- This code came out much cleaner than in ccc with the reworked
phases & mapping of types to lists of compilation steps (phases) to
perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Driver/Driver.h
d205a6ce25c57520d30c7097857c1633f2215e13 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add remaining Action classes we need.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
7ab25d5c03db34ca5cbca466a4caa224c4879ec6 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add remaining Action classes we need.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
7c32db8a63b30571b5d5b5cfa9f9e2d2dfb84803 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::getNumCompilationPhases, getCompilationPhase to
provide information about what steps should be done for a particular
file type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
c1b5fa81a2dfa4fea2e25bf057363658e7b43681 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::getNumCompilationPhases, getCompilationPhase to
provide information about what steps should be done for a particular
file type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
d6a1554f3f1e1c0be8591c4838e12e8951da5345 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pull Phase info into separate file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Phases.h
b1efcd824cad12284037cbb63e0312d16ac5c95a 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pull Phase info into separate file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Phases.h
4f4d6bda03c16c45e754e731cfd28d42ac7e5cf8 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Forward -fprint-source-range-info to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
3bf8224fa3818b5afab529915018facffcb215ea 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Forward -fprint-source-range-info to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
695a4f5758026f41a046aa9182252c2736048cb4 13-Mar-2009 Chris Lattner <sabre@nondot.org> implement a new -fprint-source-range-info option, which
defaults to off. When enabled, it emits range info along
with the file/line/col information for a diagnostic. This
allows tools that textually parse the output of clang to know
where the ranges are, even if they span multiple lines. For
example, with:

$ clang exprs.c -fprint-source-range-info

We now produce:

exprs.c:21:11:{21:12-21:13}: warning: use of unary operator that may be intended as compound assignment (+=)
var =+ 5; // expected-warning {{use of unary operator that may be intended as compound assignment (+=)}}
^~
exprs.c:22:11:{22:12-22:13}: warning: use of unary operator that may be intended as compound assignment (-=)
var =- 5; // expected-warning {{use of unary operator that may be intended as compound assignment (-=)}}
^~
exprs.c:36:13:{36:3-36:12}: error: assignment to cast is illegal, lvalue casts are not supported
(float*)X = P; // expected-error {{assignment to cast is illegal, lvalue casts are not supported}}
~~~~~~~~~ ^
exprs.c:41:4:{41:3-41:4}: error: called object type 'int' is not a function or function pointer
X(); // expected-error {{called object type 'int' is not a function or function pointer}}
~^
exprs.c:45:15:{45:8-45:14}{45:17-45:24}: error: invalid operands to binary expression ('int *' and '_Complex float')
P = (P-42) + Gamma*4; // expected-error {{invalid operands to binary expression ('int *' and '_Complex float')}}
~~~~~~ ^ ~~~~~~~
exprs.c:61:7:{61:16-61:22}: error: invalid application of '__alignof' to bitfield
R = __alignof(P->x); // expected-error {{invalid application of '__alignof' to bitfield}} expected-warning {{extension used}}
^ ~~~~~~

Note the range info after the column in the initial diagnostic.

This is obviously really annoying if you're not a tool parsing the
output of clang, which is why it is off by default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
1fbee5d02860d3c72a713d3dfb4179fa9f400cb3 13-Mar-2009 Chris Lattner <sabre@nondot.org> implement a new -fprint-source-range-info option, which
defaults to off. When enabled, it emits range info along
with the file/line/col information for a diagnostic. This
allows tools that textually parse the output of clang to know
where the ranges are, even if they span multiple lines. For
example, with:

$ clang exprs.c -fprint-source-range-info

We now produce:

exprs.c:21:11:{21:12-21:13}: warning: use of unary operator that may be intended as compound assignment (+=)
var =+ 5; // expected-warning {{use of unary operator that may be intended as compound assignment (+=)}}
^~
exprs.c:22:11:{22:12-22:13}: warning: use of unary operator that may be intended as compound assignment (-=)
var =- 5; // expected-warning {{use of unary operator that may be intended as compound assignment (-=)}}
^~
exprs.c:36:13:{36:3-36:12}: error: assignment to cast is illegal, lvalue casts are not supported
(float*)X = P; // expected-error {{assignment to cast is illegal, lvalue casts are not supported}}
~~~~~~~~~ ^
exprs.c:41:4:{41:3-41:4}: error: called object type 'int' is not a function or function pointer
X(); // expected-error {{called object type 'int' is not a function or function pointer}}
~^
exprs.c:45:15:{45:8-45:14}{45:17-45:24}: error: invalid operands to binary expression ('int *' and '_Complex float')
P = (P-42) + Gamma*4; // expected-error {{invalid operands to binary expression ('int *' and '_Complex float')}}
~~~~~~ ^ ~~~~~~~
exprs.c:61:7:{61:16-61:22}: error: invalid application of '__alignof' to bitfield
R = __alignof(P->x); // expected-error {{invalid application of '__alignof' to bitfield}} expected-warning {{extension used}}
^ ~~~~~~

Note the range info after the column in the initial diagnostic.

This is obviously really annoying if you're not a tool parsing the
output of clang, which is why it is off by default.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/TextDiagnosticPrinter.h
9cef867c7ab92c31928c448895ff0ed24ad2e1dd 13-Mar-2009 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
668ab1a36d6a5731c71a75a5f388ecafd538a896 13-Mar-2009 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
cc006894663904e265ab3337042eb8910250f3a0 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle "immediate" options.

Also, add some FIXMEs, improve doxygen & comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/HostInfo.h
cb881672c2c46142ec1bdfa401c9818ae805db0f 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle "immediate" options.

Also, add some FIXMEs, improve doxygen & comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/HostInfo.h
3fc092fead94ef6753b163765fce8219cfa3b8b8 13-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Improve the representation of operator expressions like "x + y" within
C++ templates. In particular, keep track of the overloaded operators
that are visible from the template definition, so that they can be
merged with those operators visible via argument-dependent lookup at
instantiation time.

Refactored the lookup routines for argument-dependent lookup and for
operator name lookup, so they can be called without immediately adding
the results to an overload set.

Instantiation of these expressions is completely wrong. I'll work on
that next.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
3fd95ce225393fe4a3623e429766a8c3f487ff9d 13-Mar-2009 Douglas Gregor <dgregor@apple.com> Improve the representation of operator expressions like "x + y" within
C++ templates. In particular, keep track of the overloaded operators
that are visible from the template definition, so that they can be
merged with those operators visible via argument-dependent lookup at
instantiation time.

Refactored the lookup routines for argument-dependent lookup and for
operator name lookup, so they can be called without immediately adding
the results to an overload set.

Instantiation of these expressions is completely wrong. I'll work on
that next.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
5a5ec5cb087bf87e189c5d9c5a7cedc71f5f0d9a 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Mark {dump{machine,specs,version},
print-{multi-{directory,lib,os-directory}, search-dirs} as unsupported
instead of handling separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
8b1604ece7bf6dc2ba811cd7d8767557e55e2ec2 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Mark {dump{machine,specs,version},
print-{multi-{directory,lib,os-directory}, search-dirs} as unsupported
instead of handling separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
f4e3740db90d57db4a2a07390ff4e4d7d7af1dcb 13-Mar-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Bring in std::string to fix compilation on GCC 4.3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
7517ac00e40da7a0ee4ebf7451e7dc9da74f15d9 13-Mar-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Bring in std::string to fix compilation on GCC 4.3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
207a56d26e8d96126acab5314f33411b7c7b083b 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Determine which compilation stages to run.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Driver/Driver.h
lang/Driver/Options.def
af61c71137d1f7239d6b9d7425ce083db7ba31df 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Determine which compilation stages to run.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Driver/Driver.h
lang/Driver/Options.def
5b5b669715b9a820c1a10cb4fbfa017f10854006 12-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for builtin binary operators

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
df0325110bb07ab62b808c8db8be2f6eee9b3476 12-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for builtin binary operators

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
63f5d6002bbb0d6b594e320c5522ac03cfb1b6e8 12-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Store the type of the integral value within a TemplateArgument, so that we can more efficiently reconstruct an IntegerLiteral from it during template instantiation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
c971f8694661776ecdec2ccc33fbe0333eeaf191 12-Mar-2009 Douglas Gregor <dgregor@apple.com> Store the type of the integral value within a TemplateArgument, so that we can more efficiently reconstruct an IntegerLiteral from it during template instantiation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
dcfaf606be2852b892acc4a45a2c06171b444fa6 12-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix crash when using TypedViewRegions and ObjCQualifiedIdTypes (TypedViewRegion::getLValueType() was not implemented).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
e6fbdf538bc50122876639e08a1401e2bc9555ba 12-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix crash when using TypedViewRegions and ObjCQualifiedIdTypes (TypedViewRegion::getLValueType() was not implemented).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
cdea9de1b915a3a4ccdc738f5c38c6da1a9ced48 12-Mar-2009 Ted Kremenek <kremenek@apple.com> Add file I forgot to commit in previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
dc192323e740eec20d6d7c3162067242403aa37b 12-Mar-2009 Ted Kremenek <kremenek@apple.com> Add file I forgot to commit in previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b11cd810cc59b9e037d8217c3c3bf6ddfe161267 12-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics:
- PathDiagnosticControlFlowPiece now consists of a "start" and "end" location
to indicating the branch location and where the branch goes.

BugReporter:
- Updated BugReporter to construct PathDiagnosticControlFlowPiece objects with
"end" locations.

PlistDiagnostics:
- Plists now contain the bug "type" (not just bug "category")
- Plists now encode control-flow pieces differently than events; now the
"start" and "end" locations are recorded


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
082cb8d7bd9bdb3fe58e8e1a2897c79c4ebcc3a7 12-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics:
- PathDiagnosticControlFlowPiece now consists of a "start" and "end" location
to indicating the branch location and where the branch goes.

BugReporter:
- Updated BugReporter to construct PathDiagnosticControlFlowPiece objects with
"end" locations.

PlistDiagnostics:
- Plists now contain the bug "type" (not just bug "category")
- Plists now encode control-flow pieces differently than events; now the
"start" and "end" locations are recorded


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
fba157b8beb4597864d34b3ae4f6c795dc7a2be0 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add majority of driver-driver implementation.
- Compare to driverdriver.c if bored; not completely fair since the
driver gets a bit more code in other places to handle binding archs
(for Xarch) but not completely unfair either.

Fear not, extra Action classes will have a happy home for their
vtables soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Action.h
2fe63e6adac0b9e5f52bcc3100b545e379417e6e 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add majority of driver-driver implementation.
- Compare to driverdriver.c if bored; not completely fair since the
driver gets a bit more code in other places to handle binding archs
(for Xarch) but not completely unfair either.

Fear not, extra Action classes will have a happy home for their
vtables soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Action.h
95ba1285f8e6e161f171f7fce558d3cff983666c 12-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Use StmtVisitor to handle the decoding of expressions for
instantiation. This is roughly the structure we want to expression
instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
313a81dd820c9b2c0203bdcd974c781a81e4f0cf 12-Mar-2009 Douglas Gregor <dgregor@apple.com> Use StmtVisitor to handle the decoding of expressions for
instantiation. This is roughly the structure we want to expression
instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
309160771eaf06afd1159cc299a2d462924bd040 12-Mar-2009 Ted Kremenek <kremenek@apple.com> API fix: All "bodies" for functions, Objective-C methods, blocks, are assumed to
be CompoundStmts. I think this is a valid assumption, and felt that the API
should reflect it. Others please validate this assumption to make sure I didn't
break anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
eaab20669b6a9910a5deb0110fdd8f7581d86a36 12-Mar-2009 Ted Kremenek <kremenek@apple.com> API fix: All "bodies" for functions, Objective-C methods, blocks, are assumed to
be CompoundStmts. I think this is a valid assumption, and felt that the API
should reflect it. Others please validate this assumption to make sure I didn't
break anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
a790d3751be0fcf7bc0b0cffa74c1237ef9555df 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce ActionList typedef, tweak some constness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Util.h
d65bddcbe1385a4de212ecbbdc8919c54b3efeb0 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce ActionList typedef, tweak some constness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
lang/Driver/Util.h
1c41167bd9e6bea4ff21968785d873142e3bcb76 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::canLipoType helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
9f5ef9426fee383cb42b72cee1d6dc949c8c0189 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::canLipoType helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66807 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Types.h
a8564774c9d6feb22a9cca4b7a83d3c8d39ecdef 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add some HostInfo accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
1e2d081e8073934ddc1198b6556c2e2f51c99eec 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add some HostInfo accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
72cac2064e7d199b3032ada8dca88e1ac034d22b 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList support for synthesizing arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
bca58cb5100a4fdff63165af6a1742f5160ec73b 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList support for synthesizing arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
643e01055d009e7c508c7a4664fad3471b27c1b0 12-Mar-2009 Chris Lattner <sabre@nondot.org> add a callback for macro expansion, based on a patch by Paolo Bolzoni!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
ba9eee326434ba62b180271d3cc2999d94ee0de4 12-Mar-2009 Chris Lattner <sabre@nondot.org> add a callback for macro expansion, based on a patch by Paolo Bolzoni!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
08a0ae49b107c1a974a281399c11cec4d72d7d1b 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
0c562a23a6560b5736077226ab31d6a9a216ccd3 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
f45afe6bcfe63fc672f2311cc62e80275a857e9d 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add Diagnostic files for Frontend and move a couple errors over.
- Notably, clang now exits with an error if it can't find a
file. This flushed out a bug in the CGColorSpace.c test case. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FrontendDiagnostic.h
50f4f469024928670f2d634c445686d00eeb89b7 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add Diagnostic files for Frontend and move a couple errors over.
- Notably, clang now exits with an error if it can't find a
file. This flushed out a bug in the CGColorSpace.c test case. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticDriverKinds.td
lang/Basic/DiagnosticFrontendKinds.def
lang/Basic/DiagnosticFrontendKinds.td
lang/Frontend/FrontendDiagnostic.h
d724e335b1724f9978e688a957355daf463e4203 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak diag names to be more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
b897f5d3ebfb62c2745e2e2af7faa9920c882438 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak diag names to be more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticDriverKinds.def
93468495c02e53c3e6a9f92335496a6fd32bb9fd 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Use standard Diagnostic interface for diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
lang/Driver/DriverDiagnostic.h
4ad4b3ebbe5769143389dccfcfadb666a4ba5940 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Use standard Diagnostic interface for diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticDriverKinds.def
lang/Basic/DiagnosticDriverKinds.td
lang/Driver/Driver.h
lang/Driver/DriverDiagnostic.h
db62cc311476c2eb2bcdb6305db83be64de7b295 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start sketching construction of abstract built actions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
lang/Driver/Driver.h
53ec55215075c8f4ddd47ca6ed7d382f16beb670 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start sketching construction of abstract built actions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Action.h
lang/Driver/Driver.h
dda962937192c35fc0c63b93ff3b7432c240bdc1 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add information on Driver input/temporary types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Types.def
lang/Driver/Types.h
e9fba573bd9433b89a12f747f2c4ccfa490a79cb 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add information on Driver input/temporary types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Types.def
lang/Driver/Types.h
5a860da2b9208b5f092333a53748357ac7b81be8 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
644eade617a4e2e665455accf18c455e8d025699 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
8df072fa2482e3d2c9fbc6d8c65e5c11cd95e6fe 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add definitions for all the gcc options the current ccc
understands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
83293d268ee496a55423566a88a8af5630e22462 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add definitions for all the gcc options the current ccc
understands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
52bf2d4eebdda3762feb22f24e1501ce82752141 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak option naming/def:
- Use OPT_ prefix for ids.

- Reference groups and aliases by shortend id (on the theory that
this is more readable).

- Rename the special option ids to more protected names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Options.h
b349fccc4a6e416483b0b36b4f74e39787c62344 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak option naming/def:
- Use OPT_ prefix for ids.

- Reference groups and aliases by shortend id (on the theory that
this is more readable).

- Rename the special option ids to more protected names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Options.h
ff7aa37801a61b1be92012d3c33b59a1205ac044 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Reorder arguments in Options.def so option name is first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Options.h
e1495eced887466e235f6a034953adf5ee1e14e6 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Reorder arguments in Options.def so option name is first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.def
lang/Driver/Options.h
f01869c9151325005739f900cf3996af656134d7 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::hasArg, for testing for the presence of an
argument matching some Option::ID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
d8cadd4f250d1b69373fc80477f67375d2c54820 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::hasArg, for testing for the presence of an
argument matching some Option::ID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
214bf9dd6c2d72cdcfa937b75af4509d289dacfd 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option::getId and Option::matches taking an option
identifier; we will want to use the latter in situations where we just
want to check for a match, but not load options unnecessarily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
cf0dd156e7b9d6a70b7290f5af9646859631bd9a 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option::getId and Option::matches taking an option
identifier; we will want to use the latter in situations where we just
want to check for a match, but not load options unnecessarily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
d558211ac953a0ca57c3211ed6e8f9d949a4e837 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add default index (=0) for Arg::getValue and add Arg::claim
(will be used to emit "command line argument unused" diagnostics).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
d377522ba694e52128b419c98dabae7086ccf9c6 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add default index (=0) for Arg::getValue and add Arg::claim
(will be used to emit "command line argument unused" diagnostics).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
8c4ecbc17014d6782ae8d808c5dae6b4ac5f9ab7 12-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Fix various problems with matching out-of-line definitions of static
class members to the corresponding in-class declaration.

Diagnose the erroneous use of 'static' on out-of-line definitions of
class members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
656de633acefb7ced01a4b573dbd4f70b4300097 12-Mar-2009 Douglas Gregor <dgregor@apple.com> Fix various problems with matching out-of-line definitions of static
class members to the corresponding in-class declaration.

Diagnose the erroneous use of 'static' on out-of-line definitions of
class members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
8f53bb70407ca1f3f4d769b7a1bc2eb7a2592c6e 12-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Move most of the checking from ActOnCXXMemberDeclarator to other, more general routines. This is a step toward separating the checking logic from Declarators, which in turn is required for template instantiation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
021c3b372c58f5423b4fa2a5be6933d1c7ecc663 12-Mar-2009 Douglas Gregor <dgregor@apple.com> Move most of the checking from ActOnCXXMemberDeclarator to other, more general routines. This is a step toward separating the checking logic from Declarators, which in turn is required for template instantiation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
d71d13aba473fa0abbf03d6140fa48331dc6c952 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add TypedViewRegion::isBoundable() to indicate whether or not the
TypedViewRegion has a valid rvalue type. Also renamed instance variable 'T' to
'LvalueType' to make it unambiguous of its purpose.

This fixes some crashes I was seeing after:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090309/013771.html

This is because 'isBoundable()' is defined in TypedRegion (the parent class) in
terms of the rvalue type (which could be null), while for TypedViewRegion it
should be defined in terms of the lvalue type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b2dea734527ae75281642a1c6ace28f9e00cab11 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add TypedViewRegion::isBoundable() to indicate whether or not the
TypedViewRegion has a valid rvalue type. Also renamed instance variable 'T' to
'LvalueType' to make it unambiguous of its purpose.

This fixes some crashes I was seeing after:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090309/013771.html

This is because 'isBoundable()' is defined in TypedRegion (the parent class) in
terms of the rvalue type (which could be null), while for TypedViewRegion it
should be defined in terms of the lvalue type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
26561a01cea14e8e768bd616fe764dd8e8727154 11-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXClassMemberWrapper

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
ff7fea809bab2badd0cb241703b14ac20ac258cb 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXClassMemberWrapper

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
006605882f997a37ee104cd5f30d0b523ef32d44 11-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXClassVarDecl. It doesn't add anything

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
2d2e9cfdc1dbb6e4a22f8c0b1abcd30437e3795d 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXClassVarDecl. It doesn't add anything

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
0e518af1dd811e427394b66efe3f488c7c4394b4 11-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement basic template instantiation for fields. Reshuffle checking
for FieldDecls so that the parser and the template instantiation make
use of the same semantic checking module.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
3cf538d5c49bbebac1afa6f4a5010e3d877440bb 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement basic template instantiation for fields. Reshuffle checking
for FieldDecls so that the parser and the template instantiation make
use of the same semantic checking module.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
6e7c27cbc6917fcf9507e9d68d051c5c01275484 11-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Add basic, hackish support for instantiation of typedefs in a class
template. More importantly, start to sort out the issues regarding
complete types and nested-name-specifiers, especially the question of:
when do we instantiate a class template specialization that occurs to
the left of a '::' in a nested-name-specifier?




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
4fdf1faedbca40787fd277a6fbd5061fd69b2708 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Add basic, hackish support for instantiation of typedefs in a class
template. More importantly, start to sort out the issues regarding
complete types and nested-name-specifiers, especially the question of:
when do we instantiate a class template specialization that occurs to
the left of a '::' in a nested-name-specifier?




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
ab0419820d5ccd202f1561ddaa74964ac9ef5674 11-Mar-2009 Anders Carlsson <andersca@mac.com> Add parser support for static_assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
511d7aba3b12853fdb88729a0313b80a60eab8ad 11-Mar-2009 Anders Carlsson <andersca@mac.com> Add parser support for static_assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
96cd182703619441a5516854ec95fa1a5e0ed9a7 11-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> The RValueType of a TypedViewRegion should be the pointee type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
2e3f73b963b5831d6230f69e157b0964b11eff91 11-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> The RValueType of a TypedViewRegion should be the pointee type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
1fe94246c16c1756776c6b2436973d963bbc6742 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add utility method to BasicValueFactory to convert an APSInt to one of a different sign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
672e408f14b528fe5e41c5dc99e95e671149a1e9 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add utility method to BasicValueFactory to convert an APSInt to one of a different sign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66637 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
4168375470e8b79f1a10422b26ed15e9ea344f63 11-Mar-2009 Chris Lattner <sabre@nondot.org> Improve the "bad receiver" warning for ObjC message sends to be less confusing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
4018a28ba12c9cbc0e41101bc5d8c1c2d78e355e 11-Mar-2009 Chris Lattner <sabre@nondot.org> Improve the "bad receiver" warning for ObjC message sends to be less confusing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
e07e7027fd6ab89de7b754d57cb5759ae925543f 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add accessor method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
a516ce16b472e61924f5dd10d181c3e8330979af 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add accessor method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c43ff4a75bc4c8118aad2288646adbf7745ce98e 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add accessor method to return a GRStateManager's internal ConstraintManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
78a5361ae7cb6f468a6dc721f34883072cf11b34 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add accessor method to return a GRStateManager's internal ConstraintManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
c91c6be5481e8c51765200dbe826dc0c401e767b 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Added method "canReasonAbout" to ConstraintManager. This method returns true if
a ConstraintManager can usefully reason about the given SVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
66b527193aa6f3aa94c03f6769c42d7642e1e147 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Added method "canReasonAbout" to ConstraintManager. This method returns true if
a ConstraintManager can usefully reason about the given SVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
87fd9dffd2ae2ccb4db8edc69f99b274c559b02c 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add some iterators to BugReporter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
3aa1ab27c14d16c853ccb61f17a4a75d8e366806 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Add some iterators to BugReporter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
5b13243f6374ef628e5bfec63ffcfcf6bdeed5fa 11-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3258 by rejecting invalid numeric operands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticASTKinds.def
85759278332404e96d4bb89d0e976e46158cd026 11-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3258 by rejecting invalid numeric operands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticASTKinds.def
635c52e3ce3dbee5f58c80e0f472cb0664029773 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove space-break that interrupts one string literal. This is fine in C, but not in TableGen files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
ed6c17617998e38b146479fc0b7a3baa636c7e61 11-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove space-break that interrupts one string literal. This is fine in C, but not in TableGen files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.td
7c0c17b528295299020428f583a480a6dcb4c7e0 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More Next objc2's gc ivar layout bitmap work.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
820e0203079afd64b0de422832f9e0b31a27c0c8 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More Next objc2's gc ivar layout bitmap work.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a7f227075d47ea681488d3713bdf8a54db021a5e 11-Mar-2009 Chris Lattner <sabre@nondot.org> checking for symbolic operands as well as % at end of string.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
eab8cfbf4b2e85b66cea6e0fea3b7f8fd2685722 11-Mar-2009 Chris Lattner <sabre@nondot.org> checking for symbolic operands as well as % at end of string.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
7f71b065f4d541a3cc3d86ce4134ad5dbfdfb952 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
f58e44caf071d81c8d38423978cd420c018c69e1 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
d4dd42cf8a6b5ed3b295663d9e548eddb9b0eee9 11-Mar-2009 Chris Lattner <sabre@nondot.org> reject invalid escape characters in extended-asm strings with a nice diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticSemaKinds.def
3182db1c8e456c4cd2180fac9d77d331b2c0621f 11-Mar-2009 Chris Lattner <sabre@nondot.org> reject invalid escape characters in extended-asm strings with a nice diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticSemaKinds.def
fbb897a4f1ce5869d60af2e75103d0751923da1e 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info (add new files).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
bf5fc320c8d772d44768413602dc82fd197552ea 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info (add new files).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HostInfo.h
2f728b2144bb3e5cfc3b954a95b17f8da81d1448 11-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Add type checking for tentative definitions at the end of the
translation unit.

Thread the various declarations of variables via
VarDecl::getPreviousDeclaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
275a369f003f25bd22c00c1c0fc0251c7208caf4 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Add type checking for tentative definitions at the end of the
translation unit.

Thread the various declarations of variables via
VarDecl::getPreviousDeclaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
d25acaab6d1969eb4fc2ff187667947ffd795e57 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info.
- Replace assorted -ccc-host-* options by -ccc-host-triple which is
more sane.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
dd98e2cad165ca73c769e4f105a4e47c2216387a 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info.
- Replace assorted -ccc-host-* options by -ccc-host-triple which is
more sane.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
c516473346d49d9613d2931fc3caa64e52a5d17c 11-Mar-2009 Chris Lattner <sabre@nondot.org> add plumbing to report diagnostics back through sema for malformed asmstrings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
fb5058ef67c054296c88db18ab1b3717845cb71d 11-Mar-2009 Chris Lattner <sabre@nondot.org> add plumbing to report diagnostics back through sema for malformed asmstrings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5c6a6c5f5756bb9b4902b4db4dbc023c73197f52 11-Mar-2009 Chris Lattner <sabre@nondot.org> move the asm string analysis code out of codegen into common
code where Sema can get to it. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
458cd9c8a79b25b87dcea43c9d97a4c59f194799 11-Mar-2009 Chris Lattner <sabre@nondot.org> move the asm string analysis code out of codegen into common
code where Sema can get to it. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b282ced133d3ca061cfff3fafbad11d00bde9039 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle magic -ccc- options.
- Follows ccc currently, but this functionality should eventually be
outside the Driver lib.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
365c02f65be026f90e67a8e00e7b827cee60e228 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle magic -ccc- options.
- Follows ccc currently, but this functionality should eventually be
outside the Driver lib.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Driver.h
56d25a726f0bdb4db08021b9e98782ada5241eaf 10-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Extend the notion of active template instantiations to include the
context of a template-id for which we need to instantiate default
template arguments.

In the TextDiagnosticPrinter, don't suppress the caret diagnostic if
we are producing a non-note diagnostic that follows a note diagnostic
with the same location, because notes are (conceptually) a part of the
warning or error that comes before them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.def
lang/Frontend/TextDiagnosticPrinter.h
df667e71b1daadeacb230cf94fc717843f1a138a 10-Mar-2009 Douglas Gregor <dgregor@apple.com> Extend the notion of active template instantiations to include the
context of a template-id for which we need to instantiate default
template arguments.

In the TextDiagnosticPrinter, don't suppress the caret diagnostic if
we are producing a non-note diagnostic that follows a note diagnostic
with the same location, because notes are (conceptually) a part of the
warning or error that comes before them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticSemaKinds.def
lang/Frontend/TextDiagnosticPrinter.h
043857897d48206826fd57f10060d7e9eee0657c 10-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Add pretty-printing for class template specializations, e.g.,

'struct A<double, int>'

In the "template instantiation depth exceeded" message, print
"-ftemplate-depth-N" rather than "-ftemplate-depth=N".

An unnamed tag type that is declared with a typedef, e.g.,

typedef struct { int x, y; } Point;

can be used as a template argument. Allow this, and check that we get
sensible pretty-printing for such things.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
98137534e612c274ba270af99d73429043957e53 10-Mar-2009 Douglas Gregor <dgregor@apple.com> Add pretty-printing for class template specializations, e.g.,

'struct A<double, int>'

In the "template instantiation depth exceeded" message, print
"-ftemplate-depth-N" rather than "-ftemplate-depth=N".

An unnamed tag type that is declared with a typedef, e.g.,

typedef struct { int x, y; } Point;

can be used as a template argument. Allow this, and check that we get
sensible pretty-printing for such things.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
fee85d6b7303d9a7ac28836141ded2fcf9bd07a9 10-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Add a notion of "post-diagnostic hooks", which are callbacks attached
to a diagnostic that will be invoked after the diagnostic (if it is
not suppressed). The hooks are allowed to produce additional
diagnostics (typically notes) that provide more information. We should
be able to use this to help diagnostic clients link notes back to the
diagnostic they clarify. Comments welcome; I'll write up documentation
and convert other clients (e.g., overload resolution failures) if
there are no screams of protest.

As the first client of post-diagnostic hooks, we now produce a
template instantiation backtrace when a failure occurs during template
instantiation. There's still more work to do to make this output
pretty, if that's even possible.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66557 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.def
ee1828a6b5ae1bc4ea300e48f3840ac1ec5be295 10-Mar-2009 Douglas Gregor <dgregor@apple.com> Add a notion of "post-diagnostic hooks", which are callbacks attached
to a diagnostic that will be invoked after the diagnostic (if it is
not suppressed). The hooks are allowed to produce additional
diagnostics (typically notes) that provide more information. We should
be able to use this to help diagnostic clients link notes back to the
diagnostic they clarify. Comments welcome; I'll write up documentation
and convert other clients (e.g., overload resolution failures) if
there are no screams of protest.

As the first client of post-diagnostic hooks, we now produce a
template instantiation backtrace when a failure occurs during template
instantiation. There's still more work to do to make this output
pretty, if that's even possible.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66557 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.def
a5dfc18d3700f95c6f48790977d609e7e79e4099 10-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for class getter/setter call
using property dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
3523d4f59eb0aa1f200dcb943093ecfe75008735 10-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for class getter/setter call
using property dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
a60a4005a980c01741cb5b01b8b904b51b54fa59 10-Mar-2009 Steve Naroff <snaroff@apple.com> Simplify SelectorTable::constructSetterName() usage...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
fdc92b7877535e6264fe43cfbdc8f01e9b224f81 10-Mar-2009 Steve Naroff <snaroff@apple.com> Simplify SelectorTable::constructSetterName() usage...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
fdaed4c5837a0e7e66e063705a5b8c1e57fbca34 10-Mar-2009 Anders Carlsson <andersca@mac.com> Address Doug's comments wrt the mangler and fix Eli's test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4843e584b54460973b8445d38907bab0401ebb0c 10-Mar-2009 Anders Carlsson <andersca@mac.com> Address Doug's comments wrt the mangler and fix Eli's test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
20ac04cc4d10990aa85513d44ba748302f6c1f5a 10-Mar-2009 Chris Lattner <sabre@nondot.org> move matching of named operands into AsmStmt class. At the same
time handle + operands in operand counting, fixing asm.c:t7 to
expand into $2 instead of $1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
10ca96ae9aed6906c3302403ef1a146a8d4c6b74 10-Mar-2009 Chris Lattner <sabre@nondot.org> move matching of named operands into AsmStmt class. At the same
time handle + operands in operand counting, fixing asm.c:t7 to
expand into $2 instead of $1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e1fa84b29f24110b09b76b9174eafe70f0035088 10-Mar-2009 Ted Kremenek <kremenek@apple.com> Add FullSourceLoc::getDecomposedLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
321abd4583dc02a254489132c5ccbe125d18ce4f 10-Mar-2009 Ted Kremenek <kremenek@apple.com> Add FullSourceLoc::getDecomposedLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
e8625110518534a980a44226f0f7c249604b22f4 10-Mar-2009 Chris Lattner <sabre@nondot.org> add some helper methods to AsmStmt and add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b327793860737d1c103a73aeda8057dd628a101d 10-Mar-2009 Chris Lattner <sabre@nondot.org> add some helper methods to AsmStmt and add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
70b54b6ba072dab1aff0c21a52f2977aa824b649 10-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnosticControlFlowPiece:
- Correctly set "ControlFlow" kind (fix regression)

PathDiagnosticMacroPiece:
- add method "containsEvent" to determine if a PathDiagnosticMacroPiece
transitively contains a PathDiagnosticEvent


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
83d889b6e8b5b0bb7305cc1d1749780d205a6c9b 10-Mar-2009 Ted Kremenek <kremenek@apple.com> PathDiagnosticControlFlowPiece:
- Correctly set "ControlFlow" kind (fix regression)

PathDiagnosticMacroPiece:
- add method "containsEvent" to determine if a PathDiagnosticMacroPiece
transitively contains a PathDiagnosticEvent


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
375733c3941a6107c2c2c971a0fbf1a8dd7f8d0d 10-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Limit the template instantiation depth to some user-configurable value
(default: 99). Beyond this limit, produce an error and consider the
current template instantiation a failure.

The stack we're building to track the instantiations will, eventually,
be used to produce instantiation backtraces from diagnostics within
template instantiation. However, we're not quite there yet.

This adds a new Clang driver option -ftemplate-depth=NNN, which should
eventually be generated from the GCC command-line operation
-ftemplate-depth-NNN (note the '-' rather than the '='!). I did not
make the driver changes to do this mapping.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/LangOptions.h
26dce44534602660ea9f4152bffc5436fc5fe3b2 10-Mar-2009 Douglas Gregor <dgregor@apple.com> Limit the template instantiation depth to some user-configurable value
(default: 99). Beyond this limit, produce an error and consider the
current template instantiation a failure.

The stack we're building to track the instantiations will, eventually,
be used to produce instantiation backtraces from diagnostics within
template instantiation. However, we're not quite there yet.

This adds a new Clang driver option -ftemplate-depth=NNN, which should
eventually be generated from the GCC command-line operation
-ftemplate-depth-NNN (note the '-' rather than the '='!). I did not
make the driver changes to do this mapping.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/LangOptions.h
f9ff4b14cfc4ee2c4e43dbb71242aa85446ecc2a 10-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement template instantiation for ClassTemplateSpecializationTypes,
such as replacing 'T' in vector<T>. There are a few aspects to this:

- Extend TemplateArgument to allow arbitrary expressions (an
Expr*), and switch ClassTemplateSpecializationType to store
TemplateArguments rather than it's own type-or-expression
representation.

- ClassTemplateSpecializationType can now store dependent types. In
that case, the canonical type is another
ClassTemplateSpecializationType (with default template arguments
expanded) rather than a declaration (we don't build Decls for
dependent types).

- Split ActOnClassTemplateId into ActOnClassTemplateId (called from
the parser) and CheckClassTemplateId (called from
ActOnClassTemplateId and InstantiateType). They're smart enough to
handle dependent types, now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
40808ce6ac04b102c3b56244a635d6b98eed6d97 10-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement template instantiation for ClassTemplateSpecializationTypes,
such as replacing 'T' in vector<T>. There are a few aspects to this:

- Extend TemplateArgument to allow arbitrary expressions (an
Expr*), and switch ClassTemplateSpecializationType to store
TemplateArguments rather than it's own type-or-expression
representation.

- ClassTemplateSpecializationType can now store dependent types. In
that case, the canonical type is another
ClassTemplateSpecializationType (with default template arguments
expanded) rather than a declaration (we don't build Decls for
dependent types).

- Split ActOnClassTemplateId into ActOnClassTemplateId (called from
the parser) and CheckClassTemplateId (called from
ActOnClassTemplateId and InstantiateType). They're smart enough to
handle dependent types, now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
29a90b6684c3eb304f0a93d134755e815806f6db 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Reapply r66316, it got accidentally reverted in r66317.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
d43b333be82438102ff4c459b1fb5dfb764e5f0d 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Reapply r66316, it got accidentally reverted in r66317.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
88cbb9b6a24545104d330d9a23f29b1150ef8bec 09-Mar-2009 Chris Lattner <sabre@nondot.org> move debug info generation flag into CompileOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
20126046221404b81cdd8de192bd72fdc7b0a670 09-Mar-2009 Chris Lattner <sabre@nondot.org> move debug info generation flag into CompileOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
8ccad8aaaa92ac2e92df235a78e03acbfeae07e8 09-Mar-2009 Chris Lattner <sabre@nondot.org> Fix PR3766, a really nasty silent miscompilation case where we emitted
a warning and then threw away the AST. While I'm in there, tighten up the
code to actually reject completely bogus cases (sending a message to a
struct). We still allow sending a message to an int, which doesn't make
sense but GCC allows it and is easy to support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
0c73f37f0a48a1512bc0477a71f0d6cffcb78fc0 09-Mar-2009 Chris Lattner <sabre@nondot.org> Fix PR3766, a really nasty silent miscompilation case where we emitted
a warning and then threw away the AST. While I'm in there, tighten up the
code to actually reject completely bogus cases (sending a message to a
struct). We still allow sending a message to an int, which doesn't make
sense but GCC allows it and is easy to support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
73ec9325c26807fae7e2d7271229cf5ba37d547c 09-Mar-2009 Steve Naroff <snaroff@apple.com> Implement property '.' notation on Factory/Class objects. Parser changes aren't very pretty:-(

This fixes <rdar://problem/6496506> Implement class setter/getter for properties.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
61f72cbd037e58f12cfe90cd442373f44092f030 09-Mar-2009 Steve Naroff <snaroff@apple.com> Implement property '.' notation on Factory/Class objects. Parser changes aren't very pretty:-(

This fixes <rdar://problem/6496506> Implement class setter/getter for properties.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
1e4baad7a6032a1e9aa9a0aa9490f680c7fc7f9e 09-Mar-2009 Ted Kremenek <kremenek@apple.com> Add member template "MemRegion::getAs<RegionType>" that dynamically casts a
given MemRegion object to a target region type. This differs from dyn_cast<> in
that it also ignores TypedViewRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
ed65d3d97132fbcdd124aef4d2478e348dfbd36b 09-Mar-2009 Ted Kremenek <kremenek@apple.com> Add member template "MemRegion::getAs<RegionType>" that dynamically casts a
given MemRegion object to a target region type. This differs from dyn_cast<> in
that it also ignores TypedViewRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
d526ac51ffc6994618c972231bf01970bcb0174e 08-Mar-2009 Chris Lattner <sabre@nondot.org> the macro redefinition ext warning should default to on, to match gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.def
4e9990b63518b9ca63d6585dfbd492f452f794c2 08-Mar-2009 Chris Lattner <sabre@nondot.org> the macro redefinition ext warning should default to on, to match gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.def
6b6513d6b3578b5b970b48db98ac62e1599147e9 08-Mar-2009 Chris Lattner <sabre@nondot.org> undefined -> unspecified. Thanks Mike.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
466a7f8aa61ca0d1df1f11ed2dfb2510a386cfa6 08-Mar-2009 Chris Lattner <sabre@nondot.org> undefined -> unspecified. Thanks Mike.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
4e479f95909a4edc651fbecc3100d138d26fa5e9 08-Mar-2009 Chris Lattner <sabre@nondot.org> implement PR3753, warning about comparisons with a string literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
55660a74897bf42111a8ae61c1f617645e5a9274 08-Mar-2009 Chris Lattner <sabre@nondot.org> implement PR3753, warning about comparisons with a string literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
d6d3febe3c9e5dfc6f70c96e00a41a375d9370e0 08-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some logic by making ScratchBuffer handle the application of trailing
\0's to created tokens instead of making all clients do it. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
1fa495304c81e03f07f278a47b5efe9317104aab 08-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some logic by making ScratchBuffer handle the application of trailing
\0's to created tokens instead of making all clients do it. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
42291e51b5d5ac9f263a13afdb0aa08788801d6a 08-Mar-2009 Chris Lattner <sabre@nondot.org> Update DeclNodes.def to reflect the move of ObjCCategoryImpl
from being a NamedDecl to being and ObjCImplDecl. This fixes
some valgrind issues where ObjCCategoryImpl's were being cast
to NamedDecl and then stuck on name lookup datastructures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
6b5e4f0cc5672c7d5449db28d5ead94d32407cb2 08-Mar-2009 Chris Lattner <sabre@nondot.org> Update DeclNodes.def to reflect the move of ObjCCategoryImpl
from being a NamedDecl to being and ObjCImplDecl. This fixes
some valgrind issues where ObjCCategoryImpl's were being cast
to NamedDecl and then stuck on name lookup datastructures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66372 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclNodes.def
8fc7dd955011ead87c968121f1085332fed8ccdf 08-Mar-2009 Chris Lattner <sabre@nondot.org> improve comments for MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ddca44e86281bb7dcf5fdcaf1563434c524e3861 08-Mar-2009 Chris Lattner <sabre@nondot.org> improve comments for MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9cc59542e9852e097b6563c46ceda2c734f0a3e6 07-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Some struct/class mismatch fixes, to silence MSVC warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Parse/DeclSpec.h
43af76e845c95be160c088ec11ba3c43e2527fa8 07-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Some struct/class mismatch fixes, to silence MSVC warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
lang/Parse/DeclSpec.h
8be6f744bc18836256beffedd2440a67b6a229c2 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Revert my last couple patches until I can get them to not make the tests fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/IdentifierTable.h
d42ffbd22fc7eb61321f6a88173ee424991f01c6 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Revert my last couple patches until I can get them to not make the tests fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/IdentifierTable.h
883e3391eb234d5e19dc91177b475229038074d2 07-Mar-2009 Daniel Dunbar <daniel@zuster.org> Cleanup/comment IdentifierInfo::get.
- Shaves off a few instructions on x86_64.

One notable change: this intentionally stops setting the II->Entry
field of IdentifierInfo's retrieved by the ExternalLookup method. This
is to maintain the invariant that .getName() has a constant value for
any given IdentifierInfo. IRgen currently relies on this; which is
quite questionable but will be cleaned up in time.

Apologies for the lack of a test case; there really isn't a good way
to make one. As IRgen will eventually be fixed to not rely on this, we
can survive without one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
ccb9bac3adb35a2dc78c1737e7b2dc6537a16393 07-Mar-2009 Daniel Dunbar <daniel@zuster.org> Cleanup/comment IdentifierInfo::get.
- Shaves off a few instructions on x86_64.

One notable change: this intentionally stops setting the II->Entry
field of IdentifierInfo's retrieved by the ExternalLookup method. This
is to maintain the invariant that .getName() has a constant value for
any given IdentifierInfo. IRgen currently relies on this; which is
quite questionable but will be cleaned up in time.

Apologies for the lack of a test case; there really isn't a good way
to make one. As IRgen will eventually be fixed to not rely on this, we
can survive without one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
a732e852da1662171989ebccaa025bc3170efa8e 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Teach Diagnostic about Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/IdentifierTable.h
b9eb3afc9eafbb1c6815c8b63633065f370be6a5 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Teach Diagnostic about Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/IdentifierTable.h
a05c34b7b0c4c529ac9349c28cd0996d384ba8c3 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Selector: (changes made after discussing this more with Steve Naroff)
- Make Selector::getAsIdentifierInfo() private. Using IdentifierInfo* in
Selector is an implementation detail that clients shouldn't think about.
- Modify diagnostic emission in Sema::ProcessPropertyDecl to not use
Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is
null) and instead use Selector::getAsString().
- Tidy up Selector::getAsString() implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
150ec292a6e7995a711cedbe7a10a25d664a6c6b 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Selector: (changes made after discussing this more with Steve Naroff)
- Make Selector::getAsIdentifierInfo() private. Using IdentifierInfo* in
Selector is an implementation detail that clients shouldn't think about.
- Modify diagnostic emission in Sema::ProcessPropertyDecl to not use
Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is
null) and instead use Selector::getAsString().
- Tidy up Selector::getAsString() implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
23563643692a4b2af535de22b053d04c68d2f9c0 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Create PathDiagnosticPiece subclasses PathDiagnosticEventPiece and
PathDiagnosticControlFlowPiece to distinguish (in the class hierarchy) between
events and control-flow diagnostic pieces. Clients must now use these directly
when constructing PathDiagnosticPieces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
1fbfd5b9b8b82aea084773b76dd1ec6796a7000c 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Create PathDiagnosticPiece subclasses PathDiagnosticEventPiece and
PathDiagnosticControlFlowPiece to distinguish (in the class hierarchy) between
events and control-flow diagnostic pieces. Clients must now use these directly
when constructing PathDiagnosticPieces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
2caa7439b509b9d3d732fe11fb3b5eb82e4c2bef 07-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Tweak warning text from the last commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
177f708abadfca856b83f1c540c66667d167a4e8 07-Mar-2009 Douglas Gregor <dgregor@apple.com> Tweak warning text from the last commit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
df4ae57a422ec2e608718336a4ba78655796d3df 07-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Downgrade complaints about the use of variable-sized types within a
struct to an extension warning to match the behavior of GNU C, which
addresses the Sema part of PR3671.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
e4f3e069e5e43d466954989dd7509ed371914bd0 07-Mar-2009 Douglas Gregor <dgregor@apple.com> Downgrade complaints about the use of variable-sized types within a
struct to an extension warning to match the behavior of GNU C, which
addresses the Sema part of PR3671.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
5ea79e6c3e40d61cfdcc3799eabec49906416512 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove false assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
126c011f0f00e9221ce3cd5350ac75da2d2c239d 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Remove false assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
f03265d7e713a48189c04a55b1c6f51e51e232f4 07-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Clean up some error messages with anonymous structs/unions and member declaration parsing. Fixes PR3680

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
e950d4bbb7c785c7a7abdd0ad98f372b8c7980b8 07-Mar-2009 Douglas Gregor <dgregor@apple.com> Clean up some error messages with anonymous structs/unions and member declaration parsing. Fixes PR3680

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
b37be77b47309720ca95336bfbf91a44a0188f80 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Re-order contents of file. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
6d3dee9f9deda0dbe8e71d4228322ed82da70ff7 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Re-order contents of file. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
95818139d5e8ae2b98a8b53b3852f45b76cc37e7 07-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Use the 'declaration does not declare anything' error when we see an anonymous struct/union declaration outside of a struct or union in C

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
a71c129fb8052a143cbf548963a8db2150b0078e 07-Mar-2009 Douglas Gregor <dgregor@apple.com> Use the 'declaration does not declare anything' error when we see an anonymous struct/union declaration outside of a struct or union in C

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
6a83969807530ebdb24ed97917eb644a4e724b14 06-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement GNU C semantics for K&R function definitions that follow a
prototype of the same function, where the promoted parameter types in
the K&R definition are not compatible with the types in the
prototype. Fixes PR2821.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
c837656ca6d2a5b434923d7e2fd11d3a3c3bfa74 06-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement GNU C semantics for K&R function definitions that follow a
prototype of the same function, where the promoted parameter types in
the K&R definition are not compatible with the types in the
prototype. Fixes PR2821.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
dcdfa7d6ca1cebec4ad717895c7833e9b86b15df 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Start work on subclassing PathDiagnosticPiece to distinguish more between control-flow pieces, events, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
4e06387c2d6d00c7a30167d4c2206756992dde38 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Start work on subclassing PathDiagnosticPiece to distinguish more between control-flow pieces, events, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
305d8bcba55d2d91ab299cc5e146530600d989a0 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Add null-check assertion in the constructor of Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
9540717470121f8912c72f6d8ae4ab40a6e45c94 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Add null-check assertion in the constructor of Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
dfd78349aaacaa77299c9b48134f7d8ba28ca4f6 06-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement the GNU semantics for forward declarations of enum types in
C and C++. Fixes PR3688.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
80711a22fa06b734a68d719ac85d4e443a51cb09 06-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement the GNU semantics for forward declarations of enum types in
C and C++. Fixes PR3688.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
5a17c1ba23ecb8b0be5ec9cce6cc155e1d169297 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Use list instead of vector for storing strings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
a15a81c45b44d9949be6ce16682a405cbb9b4228 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Use list instead of vector for storing strings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
077cd647f5ae4184f0db861775a0dbc1344d0b66 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix regression: initialize 'size' for PathDiagnostic to 0.
Add some assertions along the way...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
4850451c8e93789c099d907dd469898ea9561ecb 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix regression: initialize 'size' for PathDiagnostic to 0.
Add some assertions along the way...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
28379f37c4bd8ac5a1a5608a5cebaee9035510c3 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Like PathDiagnosticPieces, strip trailing periods at the end of PathDiagnostic descriptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
a127ccaa38a23dbd9bd3884a2627c091075a7227 06-Mar-2009 Ted Kremenek <kremenek@apple.com> Like PathDiagnosticPieces, strip trailing periods at the end of PathDiagnostic descriptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
42e4139c17210534e71cf72b9a7a2f8b5a972fd4 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add Parse/Sema support for weak_import attribute.
- Also, diagnose weak applied to types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
6e775dbafba2ab6634decc489eb3b4301b4b506b 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add Parse/Sema support for weak_import attribute.
- Also, diagnose weak applied to types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
432780cf116423246d49f5f08384fb4a96d7a2a7 06-Mar-2009 Chris Lattner <sabre@nondot.org> refactor C++ bitfield checking a bit (haha)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
8b963ef99be6235f1e9fe866180fff7dbbe5e85b 06-Mar-2009 Chris Lattner <sabre@nondot.org> refactor C++ bitfield checking a bit (haha)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
9cffefc74e12b59d4148d0d875ef29386f328a59 05-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3607 and a fixme, by checking bitfield constraints
more consistently.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
247936605913c718f4141f845aec6cb6e169fb37 05-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3607 and a fixme, by checking bitfield constraints
more consistently.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66210 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
a2c97df8ac195681e0a0976138daa63fd1df9c91 05-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Moved CollectObjCIvars to more commonly available place
for future use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
88e469cf4240d4b898eacc0ad092019b022e0e50 05-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Moved CollectObjCIvars to more commonly available place
for future use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b6b0bb83a70be6f053e5d2cfeccf14b2f0e5ac26 05-Mar-2009 Ted Kremenek <kremenek@apple.com> BasicStore:
- Store bindings using a MemRegion -> SVal binding instead of VarDecl -> SVal
binding. This mirrors some of the idea of RegionStore, but is far simpler and
not nearly as functional. This leads to some code simplification and
some potential for some minor precision hacks.

Along the way...
- constify the use of MemRegion* in a few places
- add operator<<(llvm::raw_ostream, const MemRegion*)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
be91224894e1501133e224934285ba6440bf5b59 05-Mar-2009 Ted Kremenek <kremenek@apple.com> BasicStore:
- Store bindings using a MemRegion -> SVal binding instead of VarDecl -> SVal
binding. This mirrors some of the idea of RegionStore, but is far simpler and
not nearly as functional. This leads to some code simplification and
some potential for some minor precision hacks.

Along the way...
- constify the use of MemRegion* in a few places
- add operator<<(llvm::raw_ostream, const MemRegion*)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
f16c1def93371cb18a92150ec666ceed34096b00 05-Mar-2009 Steve Naroff <snaroff@apple.com> Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
fbffca65a95e26b198c084a81a33b9cdfcd01101 05-Mar-2009 Steve Naroff <snaroff@apple.com> Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
fe56a63075f2a8407d61a8766e52ab822841a629 05-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
61d6852f67b4416bb96f1613c1aa589c8cbc17db 05-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66161 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
c309adee68d2bf896d62a62257a9e1c73f2da041 05-Mar-2009 Chris Lattner <sabre@nondot.org> rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in
Backend.cpp to stack traces. We now get crashes like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
Abort

for IR generation crashes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
49f28ca787d8db7cac3c8898334f70ea55374c98 05-Mar-2009 Chris Lattner <sabre@nondot.org> rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.
Introduce a new PrettyStackTraceDecl.
Use it to add the top level LLVM IR generation stuff in
Backend.cpp to stack traces. We now get crashes like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
Abort

for IR generation crashes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
4d6c272ab7f08ea24b3fc8224654e7be8b27dfa1 05-Mar-2009 Chris Lattner <sabre@nondot.org> remove unneeded forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
c3b401d314c21f9561c4411d23956d76aece6133 05-Mar-2009 Chris Lattner <sabre@nondot.org> remove unneeded forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
6b3833cd5b2cbaf7705018ae93e2b5850892a3c6 05-Mar-2009 Chris Lattner <sabre@nondot.org> When the parser is live, print out the location and spelling of its current token.
For example:

Stack dump:
0. Program arguments: clang t.cpp
1. t.cpp:4:8: current parser token: ';'
2. t.cpp:3:1: parsing struct/union/class body 'x'
Abort

It is weird that the parser is always "underneath" any parse context
actions, but the parser is created first.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0102c30896c83f70cf6b6519fd5c674cb981c0b5 05-Mar-2009 Chris Lattner <sabre@nondot.org> When the parser is live, print out the location and spelling of its current token.
For example:

Stack dump:
0. Program arguments: clang t.cpp
1. t.cpp:4:8: current parser token: ';'
2. t.cpp:3:1: parsing struct/union/class body 'x'
Abort

It is weird that the parser is always "underneath" any parse context
actions, but the parser is created first.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f259e8e9f79cb37a5fdf7ea84a86fc400debfdbd 05-Mar-2009 Chris Lattner <sabre@nondot.org> finish comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PrettyStackTrace.h
741e73efbf2ef0b7187358e5f62d79ebd78d21e0 05-Mar-2009 Chris Lattner <sabre@nondot.org> finish comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PrettyStackTrace.h
7dc2a04e65423b263e6270f0907e06b7d3dfa435 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Basic argument parsing.
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Driver.h
lang/Driver/Options.def
0648262df75d97b464c2be0ed867da3615659785 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Basic argument parsing.
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/Driver.h
lang/Driver/Options.def
d042d0f0e2c699e6ea045c34d564974c6416b01e 05-Mar-2009 Chris Lattner <sabre@nondot.org> When parsing a function body, add it to the crash stack, giving us something
like:

Stack dump:
0. t.c:5:10: in compound statement ('{}')
1. t.c:3:12: in compound statement ('{}')
2. t.c:3:12: parsing function body 'foo'
3. clang t.c
Abort



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
21ff9c99d3df1e4a13e6820fc2aa7a8cc6673198 05-Mar-2009 Chris Lattner <sabre@nondot.org> When parsing a function body, add it to the crash stack, giving us something
like:

Stack dump:
0. t.c:5:10: in compound statement ('{}')
1. t.c:3:12: in compound statement ('{}')
2. t.c:3:12: parsing function body 'foo'
3. clang t.c
Abort



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
02bfeebd3959645df949819fca98fb71e48fcf9d 05-Mar-2009 Chris Lattner <sabre@nondot.org> fix some 80 col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7833ed2a6eb10750572fb7b7dbb16741fe1b00ec 05-Mar-2009 Chris Lattner <sabre@nondot.org> fix some 80 col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0818a7a0bebaab332e53e569325e15335c4f27c5 05-Mar-2009 Chris Lattner <sabre@nondot.org> Simplify the interface to ParseFunctionStatementBody to not take
locations that are the current tok loc. Note that inline C++ methods
have a big fixme that could cause a crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
40e9bc84a2ab49fc33c2b1a95c6674ab2b820e9e 05-Mar-2009 Chris Lattner <sabre@nondot.org> Simplify the interface to ParseFunctionStatementBody to not take
locations that are the current tok loc. Note that inline C++ methods
have a big fixme that could cause a crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
15c04bd8111843ce92eaa9fb3199c62de5163676 05-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Use LLVM type header rather than using stdint.h directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
852157601505e0a641f1b66c9e2fb028f77bb7d1 05-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Use LLVM type header rather than using stdint.h directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
c24b889ca4ac3c0af96c30cbf5d4db8165ff2dfe 05-Mar-2009 Chris Lattner <sabre@nondot.org> Include information about compound statements when crashing in sema or the
parser. For example, we now print out:

0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PrettyStackTrace.h
lang/Basic/SourceLocation.h
ae50fa0a9e7217b043ed4ffe175af4b26dc90f34 05-Mar-2009 Chris Lattner <sabre@nondot.org> Include information about compound statements when crashing in sema or the
parser. For example, we now print out:

0. t.c:5:10: in compound statement {}
1. t.c:3:12: in compound statement {}
2. clang t.c -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/PrettyStackTrace.h
lang/Basic/SourceLocation.h
79d02158839dd73138e54caa30bd7b022c6ce1d3 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::dump and SeparateArg stubs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
f781c4192ee51a55c08ec53f054284ad1cdb2043 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::dump and SeparateArg stubs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
315b113a044dfbb59edd6f598e09b451026fffa2 04-Mar-2009 Ted Kremenek <kremenek@apple.com> MemRegion:
- Have 'TypedRegion::getRValueType()' return a null QualType for 'id<...>'
instead of aborting.
- Change 'TypedRegion::isBoundable()' to return true for all objects with a
non-null RValueType (this may not be the final behavior).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
1b9b883a95215e38e153d253a46a2a2fcac25896 04-Mar-2009 Ted Kremenek <kremenek@apple.com> MemRegion:
- Have 'TypedRegion::getRValueType()' return a null QualType for 'id<...>'
instead of aborting.
- Change 'TypedRegion::isBoundable()' to return true for all objects with a
non-null RValueType (this may not be the final behavior).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
6d6bcec9007af667c8760d214c388e886056a874 04-Mar-2009 Ted Kremenek <kremenek@apple.com> Add an optional "tag" to conjured symbols that allows us to distinguish between
multiple symbols conjured at the same location. All that is required of the tag
is that it is a fixed void* value that points to an memory address that remains
valid throughout the remainder of the lifetime of the SymbolManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
a880b66d6e0e446501fcbc27b87a1ec0e4ecde4c 04-Mar-2009 Ted Kremenek <kremenek@apple.com> Add an optional "tag" to conjured symbols that allows us to distinguish between
multiple symbols conjured at the same location. All that is required of the tag
is that it is a fixed void* value that points to an memory address that remains
valid throughout the remainder of the lifetime of the SymbolManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
36a43f8d678ae5fe291c7b95fa946ae4a34c0438 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::ParseOneArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
70a0dbbfbd933c80722549fef2d56de85c32d752 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::ParseOneArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Options.h
12d474a91d360191f28134c96627213170f69f57 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::{append, getArgString}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
9358dc8d1edae6f9279647084e768c6da5715f73 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::{append, getArgString}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
866fc41172773bfd04f688fcab5af85eafe187a5 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Arg implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
fb36caee244b9954caf9d4dda73608980e9c45b8 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Arg implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
0cc2ac1a06a920ac92d88f0376a0f379277792a6 04-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented access check for ivars accessed inside
c-style functions declared inside objc @implementations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a6e3ac514c924879699c6b0b1201028f0091044f 04-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented access check for ivars accessed inside
c-style functions declared inside objc @implementations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0d96a83bcbb5a0f53c6ffb70dcac86c1cac0e781 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Option's need to know their ID.
- Also, add Input and Unknown opts to OptTable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.h
30b055f553ffa50ae5413ecf0f0ac8061c58f475 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Option's need to know their ID.
- Also, add Input and Unknown opts to OptTable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.h
3ac95838d63dcd8098bd1e3cafe6aede7a016b7d 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pull intrusive list out of Arg; this isn't going to suffice. I
will make this efficient later (if it even matters)...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
3e894bc92c3f7e6eaaa49c2ea3871be8ee43a100 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pull intrusive list out of Arg; this isn't going to suffice. I
will make this efficient later (if it even matters)...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
a33adb7c7892e4ad440186a953cbf3359052632b 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Return reference for Arg::getOption().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
eec991a7041ce0142dc326c3ebe627119e3cae2e 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Return reference for Arg::getOption().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
ec0f2fa749b5c1a2d681aed9f185d28fdba46734 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
0f9098e093089e935066729ea06bc86c23d9a432 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
0119ee4ba9c6fd8f423afd506e9740c053a394a0 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak Option::accept interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
3c9cc6bfe933766a8b4177a3f69841b2344ec48a 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak Option::accept interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
b25c25c942bc8e8462a6e64f380f19ed89a3a2f0 04-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticAnalysisKinds.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
4b1c875351958a765339850cfb98e332435f847b 04-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> The basic representation of diagnostics information in tablegen format, plus (uncommented and incomplete) test conversions of the existing def files to this format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.td
lang/Basic/DiagnosticASTKinds.td
lang/Basic/DiagnosticAnalysisKinds.td
lang/Basic/DiagnosticCommonKinds.td
lang/Basic/DiagnosticLexKinds.td
lang/Basic/DiagnosticParseKinds.td
lang/Basic/DiagnosticSemaKinds.td
d6f0e37e654ace04dcefa70af2c12d0c302004d6 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sink Driver/Compilation into clang::driver namespace.
- Add OptTable instance to Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
1b3bb6efc59a21f794b534078f9ae7e95393f510 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sink Driver/Compilation into clang::driver namespace.
- Add OptTable instance to Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
9e4b3be7a1e0aac6702a5580fb1af61a7701d5c7 04-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix typo in diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
3a084b6093d67a00fa4bb0ab6a988f0e5a6770b0 04-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix typo in diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
d77aac9273ca922a06aeabd1c6b431ec23bc9312 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
6ac1e2252b1a16fd8841c4b1af8fe41b820aa41d 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ArgList.h
ff6c8029fd774de17d64b83fa522955fe00015dd 04-Mar-2009 Steve Naroff <snaroff@apple.com> Finish up some fixes related to <rdar://problem/6497631> Message lookup is sometimes different than gcc's.

- Disallow casting 'super'. GCC allows this, however it doesn't make sense (super isn't an expression and the cast won't alter lookup/dispatch).
- Tighten up lookup when messaging 'self'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
6b9dfd4257b85c388a9e3cd345cf28acb7351006 04-Mar-2009 Steve Naroff <snaroff@apple.com> Finish up some fixes related to <rdar://problem/6497631> Message lookup is sometimes different than gcc's.

- Disallow casting 'super'. GCC allows this, however it doesn't make sense (super isn't an expression and the cast won't alter lookup/dispatch).
- Tighten up lookup when messaging 'self'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
a5aa4b0cb5b37f3afef3b1da4c394987c21c6598 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: More Option implementation.
- Add Options.def file, collects option information.

- Actual option instantiation is handled lazily by OptTable to allow
the driver to not need to instantiate all options.

- cast<> support for Option, other minor tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.def
lang/Driver/Options.h
2c6f6f3c170502c5b810102cf85f05732a2aa9d0 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: More Option implementation.
- Add Options.def file, collects option information.

- Actual option instantiation is handled lazily by OptTable to allow
the driver to not need to instantiate all options.

- cast<> support for Option, other minor tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
lang/Driver/Options.def
lang/Driver/Options.h
c003cb20921831dbee63d498475975d54353870e 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Check that the return type for function definitions is complete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
7f0f5dce3adcfce88d5c9a0ad0146a33c01a1e8f 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Check that the return type for function definitions is complete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
5990afdc890dc289a902761c83959fb9399a339d 04-Mar-2009 Chris Lattner <sabre@nondot.org> make the token lexer allocate its temporary token buffers for
preexpanded macro arguments from the preprocessor's bump pointer.
This reduces # mallocs from 12444 to 11792.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
32fca722dd974b8202d0fb9c71b6c185c0767da6 04-Mar-2009 Chris Lattner <sabre@nondot.org> make the token lexer allocate its temporary token buffers for
preexpanded macro arguments from the preprocessor's bump pointer.
This reduces # mallocs from 12444 to 11792.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
16ded577897389958dd317b6c743b046ecad77fd 04-Mar-2009 Chris Lattner <sabre@nondot.org> Switch attributes to be allocated from the declcontext bump pointer just like
decls. This reduces the number of calls to malloc on cocoa.h with pth and
-disable-free from 15958 to 12444 times (down ~3500).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
0b2b6e1cb1573bb295c0a65813dc4df8d57f305b 04-Mar-2009 Chris Lattner <sabre@nondot.org> Switch attributes to be allocated from the declcontext bump pointer just like
decls. This reduces the number of calls to malloc on cocoa.h with pth and
-disable-free from 15958 to 12444 times (down ~3500).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
0fc6d64bb2d40359557cf2ba7dc1c19aeb39ca02 04-Mar-2009 Chris Lattner <sabre@nondot.org> add an a Attr::Destroy method and force clients to go through it. As part of
this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
cc5814732edc0c382d0136ab57ec6149566043e2 04-Mar-2009 Chris Lattner <sabre@nondot.org> add an a Attr::Destroy method and force clients to go through it. As part of
this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
d540c115b24af3e5bd17f1b49b0b8bd9af2c6b33 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for choose expressions: add a helper that returns the
chosen sub-expression, rather than just evaluating the condition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7976932a1c256d447316ffac58e9821417725e34 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for choose expressions: add a helper that returns the
chosen sub-expression, rather than just evaluating the condition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c96f3d932df38c85a3d2589f756fd0ed2643f3f8 04-Mar-2009 Chris Lattner <sabre@nondot.org> allocate MultiKeywordSelector's out of a bump pointer allocator instead of malloc.
This has two advantages 1) no more leaking them, 2) fewer calls to malloc.

This changes us from calling malloc 3685/1390/883/2974/1185 times respectively on
16/20/24/28/32 byte objects when parsing cocoa.h with pth and -disable-free to
calling it 2816/1020/702/2903/1168 times each respectively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
5f7d2284c4b2f08d155732454002e68dc40c33ef 04-Mar-2009 Chris Lattner <sabre@nondot.org> allocate MultiKeywordSelector's out of a bump pointer allocator instead of malloc.
This has two advantages 1) no more leaking them, 2) fewer calls to malloc.

This changes us from calling malloc 3685/1390/883/2974/1185 times respectively on
16/20/24/28/32 byte objects when parsing cocoa.h with pth and -disable-free to
calling it 2816/1020/702/2903/1168 times each respectively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
4db0f9a68d8b980b3d08afc3120bd373252aaa30 04-Mar-2009 Chris Lattner <sabre@nondot.org> fix infinite recursion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
91ee0140ecb60b5c1402edc9e577257636c4ca60 04-Mar-2009 Chris Lattner <sabre@nondot.org> fix infinite recursion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
edde56f5dab14ff4678e633a25323ba35782d891 04-Mar-2009 Chris Lattner <sabre@nondot.org> make CaseStmt::getSourceRange() iterative for deeply
nested cases instead of recursive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
3fb94a4918bd427fdb12df997dd87fd1017f0388 04-Mar-2009 Chris Lattner <sabre@nondot.org> make CaseStmt::getSourceRange() iterative for deeply
nested cases instead of recursive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
daac694b37c04664d2626d708c1faf3458cf4fce 04-Mar-2009 Chris Lattner <sabre@nondot.org> Change Parser::ParseCaseStatement to use an iterative approach to parsing
multiple sequential case statements instead of doing it with recursion. This
fixes a problem where we run out of stack space parsing 100K directly nested
cases.

There are a couple other problems that prevent this from being useful in
practice (right now the example only parses correctly with -disable-free and
doesn't work with -emit-llvm), but this is a start.

I'm not including a testcase because it is large and uninteresting for
regtesting.

Sebastian, I would appreciate it if you could scrutinize the smart pointer
gymnastics I do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
24e1e707b4c362f18e371e2bbf054a8345b57bfa 04-Mar-2009 Chris Lattner <sabre@nondot.org> Change Parser::ParseCaseStatement to use an iterative approach to parsing
multiple sequential case statements instead of doing it with recursion. This
fixes a problem where we run out of stack space parsing 100K directly nested
cases.

There are a couple other problems that prevent this from being useful in
practice (right now the example only parses correctly with -disable-free and
doesn't work with -emit-llvm), but this is a start.

I'm not including a testcase because it is large and uninteresting for
regtesting.

Sebastian, I would appreciate it if you could scrutinize the smart pointer
gymnastics I do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
e74bf07f0f8f1be620c57e656e72f27ca1b43ce2 04-Mar-2009 Ted Kremenek <kremenek@apple.com> Added the notion of a "boundable region", which is a region that can have a direct binding in the StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
41168eac256fed59ec5406a75fce91c59cd5dd91 04-Mar-2009 Ted Kremenek <kremenek@apple.com> Added the notion of a "boundable region", which is a region that can have a direct binding in the StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
1fb145b96e5e004c5b7b1cc4e6e55f7dead47c57 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add some more FIXME's about bits we could pack better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
fe133d98fd003db818dcc2a0f0dbf7416a01aaed 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add some more FIXME's about bits we could pack better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d6e68cdd168e321986126f6c52c9cd15e7370842 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Woot, save 8 bytes in Decl on 64-bit by reordering fields. This
reduces allocated Decl size by ~8% on Cocoa.h (~700k).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
39d7650656fdd1be879ed7d0c722cfeae95e56d5 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Woot, save 8 bytes in Decl on 64-bit by reordering fields. This
reduces allocated Decl size by ~8% on Cocoa.h (~700k).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
fa92f34ed590a147cd14ff066c78bc5073a95f91 04-Mar-2009 Ted Kremenek <kremenek@apple.com> Add "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
retrieval from the store/environment for locations or scalar types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
1cb151eadee0ef1944bd9a16aa4348ead7160259 04-Mar-2009 Ted Kremenek <kremenek@apple.com> Add "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
retrieval from the store/environment for locations or scalar types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
e54d4eb6ca0d137b7f8a5c6978c5e6425eb619dc 04-Mar-2009 Steve Naroff <snaroff@apple.com> Change a warning to an error...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
d198abae5938262e501a409e833bf01ca8b8253e 04-Mar-2009 Steve Naroff <snaroff@apple.com> Change a warning to an error...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
ba0041b18b99fc8deb1f98292ff0fd8db65a5995 03-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Implement an important missing warning when a selector
is searched for in the global pool. It already uncovered
a clang bug in message selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
268bc8c1f3a27d2fbd73c3115e4d633d31422ca5 03-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Implement an important missing warning when a selector
is searched for in the global pool. It already uncovered
a clang bug in message selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
9577c1e1137a8dfe4ded7e058fa7d319c76158f2 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Rework use of loc::SymbolVal in the retain/release checker to use the new method
SVal::getAsLocSymbol(). This simplifies the code and allows the retain/release
checker to (I believe) also correctly reason about location symbols wrapped in
SymbolicRegions.

Along the way I cleaned up SymbolRef a little, disallowing implicit casts to
'unsigned'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
94c969804b1f98650316a8f75434b2d24dbe94ea 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Rework use of loc::SymbolVal in the retain/release checker to use the new method
SVal::getAsLocSymbol(). This simplifies the code and allows the retain/release
checker to (I believe) also correctly reason about location symbols wrapped in
SymbolicRegions.

Along the way I cleaned up SymbolRef a little, disallowing implicit casts to
'unsigned'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
30db0042513e2bdd3690e6491ac855fe1ee7d9d2 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
9d40ee50f8a013e5253101648092cf0daa76c335 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
45c237da51b90936307eefdd5a276649800c9995 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
f50cb369273c6bd26c9629df92ee53f1d8af4149 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
f6790a803435e05567812367280879268a962157 03-Mar-2009 Chris Lattner <sabre@nondot.org> implement support for propagating *features* down to the code generator
and defining target-specific macros based on them (like __SSE3__ and
friends). After extensive discussion with Daniel, this work will need
driver support, which will translate things like -msse3 into a -mattr
feature. Until this work is done, the code in clang.cpp is disabled and
the X86TargetInfo ctor still defaults to SSE2. With these two things
changed, this code will work. PR3634


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
6328cc316d7032517399da9230a197cd29f2664d 03-Mar-2009 Chris Lattner <sabre@nondot.org> implement support for propagating *features* down to the code generator
and defining target-specific macros based on them (like __SSE3__ and
friends). After extensive discussion with Daniel, this work will need
driver support, which will translate things like -msse3 into a -mattr
feature. Until this work is done, the code in clang.cpp is disabled and
the X86TargetInfo ctor still defaults to SSE2. With these two things
changed, this code will work. PR3634


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0e8b96abd2515a746cefe47cbc92feacc8c5b841 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify).

Also necessary to fix:

<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
7ba138abd329e591a8f6d5001f60dd7082f71b3b 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify).

Also necessary to fix:

<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
b004b1d1cc85b9a7b287bfbc7d6c2e5572f4eca8 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Don't use std::auto_ptr with getSubRegionMap().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
14453bf723c025034823e4d4005a98ee176753a0 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Don't use std::auto_ptr with getSubRegionMap().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
247049d634ebac44f1edc3641e4d7c59b3347239 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Hush gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
d35e63106d7b4b76275c85c88ee715c4356f2a6b 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Hush gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
2567c9e9d0b0a12f1e8436a9d7b895877569f9be 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6497242> Inherited overridden protocol declared objects don't work.

Change Sema::DiagnosePropertyMismatch() to check for type compatibility (rather than type equivalence, which is too strict).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
15edf0de6b5bc9ae227bcc9658a157ac30efd92e 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6497242> Inherited overridden protocol declared objects don't work.

Change Sema::DiagnosePropertyMismatch() to check for type compatibility (rather than type equivalence, which is too strict).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
58d0d6f5e9f0bfcc00a756946c5898a7e028c558 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
ca33129bb28b05938c3e6c9f8a66165b5cceb4dd 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
eae6c9e77c4bc7e136e3d9ab1a7c2d189e3ae30f 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Arg & ArgList classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/Util.h
0258eeeac5ecbc67b6a09e3497f3d593db01903b 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Arg & ArgList classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Arg.h
lang/Driver/ArgList.h
lang/Driver/Util.h
16090d46b3b9bd2fd97d7278f62755553c0ff9bd 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Sketch Driver Option classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
1eb4e64eed08837b85a375d6a953503daa844f07 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Sketch Driver Option classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Option.h
ed3a398adc9a7745c2acc3fa0ad4a906149ef2de 03-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Implement the basics of implicit instantiation of class templates, in
response to attempts to diagnose an "incomplete" type. This will force
us to use DiagnoseIncompleteType more regularly (rather than looking at
isIncompleteType), but that's also a good thing.

Implicit instantiation is still very simplistic, and will create a new
definition for the class template specialization (as it should) but it
only actually instantiates the base classes and attaches
those. Actually instantiating class members will follow.

Also, instantiate the types of non-type template parameters before
checking them, allowing, e.g.,

template<typename T, T Value> struct Constant;

to work properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
2943aed177b33ae3f14273b11a7b398e5276ec62 03-Mar-2009 Douglas Gregor <dgregor@apple.com> Implement the basics of implicit instantiation of class templates, in
response to attempts to diagnose an "incomplete" type. This will force
us to use DiagnoseIncompleteType more regularly (rather than looking at
isIncompleteType), but that's also a good thing.

Implicit instantiation is still very simplistic, and will create a new
definition for the class template specialization (as it should) but it
only actually instantiates the base classes and attaches
those. Actually instantiating class members will follow.

Also, instantiate the types of non-type template parameters before
checking them, allowing, e.g.,

template<typename T, T Value> struct Constant;

to work properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
fe2e9fabd43740c389ad01eb913f9f0ea0787054 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Implement FIXME: GRStateManager::scanReachableSymbols now supports scanning MemRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
5dc2746b6c759d2fdab050d3d41ba60ad141a0a3 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Implement FIXME: GRStateManager::scanReachableSymbols now supports scanning MemRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
6f718475d17f7b275e268b7bc2b0f4d037715da0 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Add StoreManager::getSubRegionMap(). This method returns an opaque mapping for clients of StoreManagers from MemRegions to their subregions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
59e8f1128019aef95f45c6fa09cc0f8bfea99f13 03-Mar-2009 Ted Kremenek <kremenek@apple.com> Add StoreManager::getSubRegionMap(). This method returns an opaque mapping for clients of StoreManagers from MemRegions to their subregions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
dd71e75bc6811906b458ee93b18a350fa758b00e 03-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Check of ivar access access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
935fd768f95edc21f03c6c61f8b48ee99ff8bab6 03-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Check of ivar access access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
7d6220ca4a53b38673473fd461ff8e983d22225e 02-Mar-2009 Chris Lattner <sabre@nondot.org> improve compatibility with GCC 4.4, patch by Michel Salim (PR3697)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
3daed52a57d03765223021f5f921bdc280c8f3cc 02-Mar-2009 Chris Lattner <sabre@nondot.org> improve compatibility with GCC 4.4, patch by Michel Salim (PR3697)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
738d3f647b8423495cb77a76819f3257ba61a5eb 02-Mar-2009 Chris Lattner <sabre@nondot.org> start wiring up support for target-specific -mfoo options like -msse


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
16167a6e3f7dfb7ed0babc5e0baab9fd140e959d 02-Mar-2009 Chris Lattner <sabre@nondot.org> start wiring up support for target-specific -mfoo options like -msse


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
67502dbd17bc68146a47cbb1db745d047bafac8a 02-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose a variety of access of ivars when they conflict with
local or global variables in instance/class methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
077c1e7377edeef3438ba59cd8151177868b62d4 02-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose a variety of access of ivars when they conflict with
local or global variables in instance/class methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
63c4da9ac2c5683bf6b6a12db8f4772a5748e4ae 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Stub out some structure for C++ driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
3ede8d0a7d1813f678ccc6011a99a0834b1b6116 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Stub out some structure for C++ driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/Compilation.h
lang/Driver/Driver.h
c327eb06e5b43d416f7157f25ee03f9b6f964fdd 02-Mar-2009 Ted Kremenek <kremenek@apple.com> Add a 'kind' field to PathDiagnosticPieces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
d0feed6224d70ed7b1483342ddef4437b80beef2 02-Mar-2009 Ted Kremenek <kremenek@apple.com> Add a 'kind' field to PathDiagnosticPieces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
8dd73e7b7e0b9d41fe5a05be641a85d1d892bf26 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Normalize .h guards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
lang/Frontend/InitHeaderSearch.h
lang/Frontend/ManagerRegistry.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
d37ee16367bbf8058799148d958cbf4fbabc9fb7 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Normalize .h guards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Frontend/CompileOptions.h
lang/Frontend/InitHeaderSearch.h
lang/Frontend/ManagerRegistry.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
7ab4b4cb8730789a55bce6941117e99abc72555c 02-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> Initial support for pointer arithmetic. Only support concrete indexes and
offsets for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
94aa6c16e7404b2ff83a6f0ae7db8a758d389fc4 02-Mar-2009 Zhongxing Xu <xuzhongxing@gmail.com> Initial support for pointer arithmetic. Only support concrete indexes and
offsets for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
68952de6d75d9d1fad97e67eea6deeaeddd2cd6b 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
lang/Driver/InitHeaderSearch.h
lang/Driver/ManagerRegistry.h
lang/Driver/PathDiagnosticClients.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
lang/Frontend/CompileOptions.h
lang/Frontend/InitHeaderSearch.h
lang/Frontend/ManagerRegistry.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
e1bd4e6d7c5b13462f83245865f7d9e9b6ea8486 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
lang/Driver/InitHeaderSearch.h
lang/Driver/ManagerRegistry.h
lang/Driver/PathDiagnosticClients.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
lang/Frontend/CompileOptions.h
lang/Frontend/InitHeaderSearch.h
lang/Frontend/ManagerRegistry.h
lang/Frontend/PathDiagnosticClients.h
lang/Frontend/TextDiagnosticBuffer.h
lang/Frontend/TextDiagnosticPrinter.h
e6b5d1d42712aaf3652b84e433c0488abe2cc193 02-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Rework the way we find locally-scoped external declarations when we
need them to evaluate redeclarations or call a function that hasn't
already been declared. We now keep a DenseMap of these locally-scoped
declarations so that they are not visible but can be quickly found,
e.g., when we're looking for previous declarations or before we go
ahead and implicitly declare a function that's being called. Fixes
PR3672.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6393519272ce727f4d26e71bbefb5de712274d0e 02-Mar-2009 Douglas Gregor <dgregor@apple.com> Rework the way we find locally-scoped external declarations when we
need them to evaluate redeclarations or call a function that hasn't
already been declared. We now keep a DenseMap of these locally-scoped
declarations so that they are not visible but can be quickly found,
e.g., when we're looking for previous declarations or before we go
ahead and implicitly declare a function that's being called. Fixes
PR3672.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
aa3ee07f675338d1618dba1a7947a84fa5130a4c 01-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'.

Downgrade an error to a warning (for GCC compatibility).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
8e2945ad9104f0ce4928c386faf458b6b83d9060 01-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'.

Downgrade an error to a warning (for GCC compatibility).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
98e71b8a4d881646713af99a63c610544ae0b517 01-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6619539> incompatible pointer types sending 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?).

- Reworked ASTContext::canAssignObjCInterfaces().
- Added ObjCProtocolDecl::lookupProtocolNamed().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
91b0b0cf6b537cbcbca0038c7032f87161a41d31 01-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6619539> incompatible pointer types sending 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?).

- Reworked ASTContext::canAssignObjCInterfaces().
- Added ObjCProtocolDecl::lookupProtocolNamed().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6a9b535ba340bf043b41b6c627c88d27affd6a11 01-Mar-2009 Ted Kremenek <kremenek@apple.com> Rename AnonTypedRegion to TypedViewRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
0312c0e09c9de480d78607972ac64a88f4e94a33 01-Mar-2009 Ted Kremenek <kremenek@apple.com> Rename AnonTypedRegion to TypedViewRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
d23d9922e00dd86aab5349208a00c8ea52b556a7 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> ObjCAtCatchStmt's ParamStmt is always a DeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
93b2bdb866d49e3dab4623a822db281042e87382 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> ObjCAtCatchStmt's ParamStmt is always a DeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7cc13bfd6c8f6b0ea1f0989fe87fc3e8428b1c8c 01-Mar-2009 Chris Lattner <sabre@nondot.org> "This patch uses the new ObjCImplDecl class to merge Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods.
And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories).

There is also a test case to check this warning.

This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories."

Patch by Jean-Daniel Dupas!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
cddc88800bbd1213ec70ae5153c6a7f2e380fd8d 01-Mar-2009 Chris Lattner <sabre@nondot.org> "This patch uses the new ObjCImplDecl class to merge Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods.
And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories).

There is also a test case to check this warning.

This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories."

Patch by Jean-Daniel Dupas!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
649b3da43473314f383e8dc091905f287e54c59f 28-Feb-2009 Chris Lattner <sabre@nondot.org> "This patch addresses two FIXME on ObjCCategoryImplDecl:

/// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl!
/// FIXME: Introduce a new common base class for ObjCImplementationDecl and ObjCCategoryImplDecl

It adds an IndentifierInfo ivar to the ObjCCategoryImplDecl, so it can inherits from Decl and not NamedDecl (I'm not sure about the memory management of this ivar).

And now that both ObjCImplementationDecl and ObjCCategoryImplDecl have the same super classes, it allow creation of a common base class: ObjCImplDecl"

Patch by Jean-Daniel Dupas!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3aa1861bd8b5121e53379b1a00f9d6ad8dead4f6 28-Feb-2009 Chris Lattner <sabre@nondot.org> "This patch addresses two FIXME on ObjCCategoryImplDecl:

/// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl!
/// FIXME: Introduce a new common base class for ObjCImplementationDecl and ObjCCategoryImplDecl

It adds an IndentifierInfo ivar to the ObjCCategoryImplDecl, so it can inherits from Decl and not NamedDecl (I'm not sure about the memory management of this ivar).

And now that both ObjCImplementationDecl and ObjCCategoryImplDecl have the same super classes, it allow creation of a common base class: ObjCImplDecl"

Patch by Jean-Daniel Dupas!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
36834a75d9a3daaf87b6ef25a06ccf084eb43561 28-Feb-2009 Anders Carlsson <andersca@mac.com> TargetInfo::validateAsmConstraint now takes a reference to the full constraints string. This will make it possible to support multi-character constraints. No functionality change (for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
066d2ea7521896efc05cce7aa46fdd3a7ba96c28 28-Feb-2009 Anders Carlsson <andersca@mac.com> TargetInfo::validateAsmConstraint now takes a reference to the full constraints string. This will make it possible to support multi-character constraints. No functionality change (for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
8df46020beb7d40a80fecedc59c8435df261ecd1 28-Feb-2009 Steve Naroff <snaroff@apple.com> Minor name change (move the ObjC prefix to a more appropriate place).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65695 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ebf6443a4f493233f7e8d92b3a991848c8b1c00d 28-Feb-2009 Steve Naroff <snaroff@apple.com> Minor name change (move the ObjC prefix to a more appropriate place).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65695 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
313c41696f1ab0f4ed13398c2f425eec421c304c 28-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6451399> problems with labels and blocks.

- Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with.
- Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr().
- Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope.
- Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
f3cf89737965352ee02026992e2dc735824e185e 28-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6451399> problems with labels and blocks.

- Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with.
- Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr().
- Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope.
- Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
9c0e6f93e60bc4cd6e43cb0cdf65bc49b1740dc3 28-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Start of checking for gotos which jump to an illegal destination.
As far as I know, this catches all cases of jumping into the scope of a
variable with a variably modified type (excluding statement
expressions) in C. This is missing some stuff we probably want to check
(other kinds of variably modified declarations, statement expressions,
indirect gotos/addresses of labels in a scope, ObjC @try/@finally, cleanup
attribute), the diagnostics aren't very good, and it's not particularly
efficient, but it's a decent start.

This patch is a slightly modified version of the patch I attached to
PR3259, and it fixes that bug. I was sort of planning on improving
it, but I think it's okay as-is, especially since it looks like CodeGen
doesn't have any use for this sort of data structure. The only
significant change I can think of from the version I attached to PR3259
is that this version skips running the checking code when a function
doesn't contain any labels.

This patch doesn't cover case statements, which also need similar
checking; I'm not sure how we should deal with that. Extending the goto
checking to also check case statements wouldn't be too hard; it's just a
matter of keeping track of the scope of the closest switch and checking that
the scope of every case is the same as the scope of the switch. That said,
it would likely be a performance hit to run this check on every
function (it's an extra pass over the entire function), so we probably want
some other solution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
8f17b66c8d383d458e04cada4c9e2452139b0b39 28-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Start of checking for gotos which jump to an illegal destination.
As far as I know, this catches all cases of jumping into the scope of a
variable with a variably modified type (excluding statement
expressions) in C. This is missing some stuff we probably want to check
(other kinds of variably modified declarations, statement expressions,
indirect gotos/addresses of labels in a scope, ObjC @try/@finally, cleanup
attribute), the diagnostics aren't very good, and it's not particularly
efficient, but it's a decent start.

This patch is a slightly modified version of the patch I attached to
PR3259, and it fixes that bug. I was sort of planning on improving
it, but I think it's okay as-is, especially since it looks like CodeGen
doesn't have any use for this sort of data structure. The only
significant change I can think of from the version I attached to PR3259
is that this version skips running the checking code when a function
doesn't contain any labels.

This patch doesn't cover case statements, which also need similar
checking; I'm not sure how we should deal with that. Extending the goto
checking to also check case statements wouldn't be too hard; it's just a
matter of keeping track of the scope of the closest switch and checking that
the scope of every case is the same as the scope of the switch. That said,
it would likely be a performance hit to run this check on every
function (it's an extra pass over the entire function), so we probably want
some other solution.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
2e0475984442f3da3e8359ca453d430ba7b2b2d1 28-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXRecordType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeNodes.def
c1efaecf0373f1a55c5ef4c234357cf726fc0600 28-Feb-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXRecordType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeNodes.def
50956e4675a87c2f9f81b6f8367146e066e8f8eb 27-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose gc attribute mismatch of property and its ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
9bc77b2423e75b9361f597d6fa7c024a53e504cd 27-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose gc attribute mismatch of property and its ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
bab9de8fa320b9ec4f6537006f0628d2c98d1491 27-Feb-2009 Chris Lattner <sabre@nondot.org> upgrade various 'implicit int' warnings from an ext-warn to warning when not
in C89 mode. This makes it enabled by default instead of only enabled with
-pedantic. Clang defaults to c99 mode, so people will see this more often
than with GCC, but they can always use -std=c89 if they really want c89.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
35d276f443462249b436951c1c663820569e1768 27-Feb-2009 Chris Lattner <sabre@nondot.org> upgrade various 'implicit int' warnings from an ext-warn to warning when not
in C89 mode. This makes it enabled by default instead of only enabled with
-pedantic. Clang defaults to c99 mode, so people will see this more often
than with GCC, but they can always use -std=c89 if they really want c89.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
92eca3e7583fc2eca996308a460a8a496efbf3bd 27-Feb-2009 Chris Lattner <sabre@nondot.org> cleanup


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
2a327d11a07dfbdf20910cebbae38910eda111fd 27-Feb-2009 Chris Lattner <sabre@nondot.org> cleanup


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
61be3601335d62fc5bd59ea89d6efff7576bf58d 27-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Clean up and document code modification hints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/TokenKinds.h
lang/Lex/Preprocessor.h
b2fb6de9070fea9abc56c8e8d5469066e964cefe 27-Feb-2009 Douglas Gregor <dgregor@apple.com> Clean up and document code modification hints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/TokenKinds.h
lang/Lex/Preprocessor.h
c6f830c804fb291d5fd5bfe63d3099c9b0950908 27-Feb-2009 Chris Lattner <sabre@nondot.org> change a diagnostic message from something pedantically correct but
useless to something more vague but hopefully more clear.
rdar://6624173


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
51a75d0cc7651753399efdc3176feaee6214c3ca 27-Feb-2009 Chris Lattner <sabre@nondot.org> change a diagnostic message from something pedantically correct but
useless to something more vague but hopefully more clear.
rdar://6624173


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
342d943fa54d78948ac52237dafdba3629618f42 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Change the AST generated for offsetof a bit so that it looks like a
normal expression, and change Evaluate and IRGen to evaluate it like a
normal expression. This simplifies the code significantly, and fixes
PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
35183aca180a2b9b2c637cd625a40a7e147d6a32 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Change the AST generated for offsetof a bit so that it looks like a
normal expression, and change Evaluate and IRGen to evaluate it like a
normal expression. This simplifies the code significantly, and fixes
PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4fa58905062efa6a12137b1983a1367220182a20 27-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Create a new TypeNodes.def file that enumerates all of the types,
giving them rough classifications (normal types, never-canonical
types, always-dependent types, abstract type representations) and
making it far easier to make sure that we've hit all of the cases when
decoding types.

Switched some switch() statements on the type class over to using this
mechanism, and filtering out those things we don't care about. For
example, CodeGen should never see always-dependent or non-canonical
types, while debug info generation should never see always-dependent
types. More switch() statements on the type class need to be moved
over to using this approach, so that we'll get warnings when we add a
new type then fail to account for it somewhere in the compiler.

As part of this, some types have been renamed:

TypeOfExpr -> TypeOfExprType
FunctionTypeProto -> FunctionProtoType
FunctionTypeNoProto -> FunctionNoProtoType

There shouldn't be any functionality change...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Analysis/PathSensitive/GRExprEngine.h
72564e73277e29f6db3305d1f27ba408abb7ed88 27-Feb-2009 Douglas Gregor <dgregor@apple.com> Create a new TypeNodes.def file that enumerates all of the types,
giving them rough classifications (normal types, never-canonical
types, always-dependent types, abstract type representations) and
making it far easier to make sure that we've hit all of the cases when
decoding types.

Switched some switch() statements on the type class over to using this
mechanism, and filtering out those things we don't care about. For
example, CodeGen should never see always-dependent or non-canonical
types, while debug info generation should never see always-dependent
types. More switch() statements on the type class need to be moved
over to using this approach, so that we'll get warnings when we add a
new type then fail to account for it somewhere in the compiler.

As part of this, some types have been renamed:

TypeOfExpr -> TypeOfExprType
FunctionTypeProto -> FunctionProtoType
FunctionTypeNoProto -> FunctionNoProtoType

There shouldn't be any functionality change...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/AST/TypeNodes.def
lang/Analysis/PathSensitive/GRExprEngine.h
e1dafe76b68e5bf05446411b7edb71b0ccb6f126 27-Feb-2009 Chris Lattner <sabre@nondot.org> make ASTContext::WCharTy a bit more sensical. In C++, it is a disctint type,
but in C99 it is just another int type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3a2503227c3db04a3619735127483263c1075ef7 27-Feb-2009 Chris Lattner <sabre@nondot.org> make ASTContext::WCharTy a bit more sensical. In C++, it is a disctint type,
but in C99 it is just another int type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
14032226751d936ceec4d385eb61853ee9861ff4 27-Feb-2009 Chris Lattner <sabre@nondot.org> fix some sema problems with wide strings and hook up basic codegen for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
dbb1ecc32ca122b07b7c98fd0a8f6f53985adacc 27-Feb-2009 Chris Lattner <sabre@nondot.org> fix some sema problems with wide strings and hook up basic codegen for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
9c7825b737617339724d43bd04960852271f08e2 26-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Make the type associated with a ClassTemplateSpecializationDecl be a
nicely sugared type that shows how the user wrote the actual
specialization. This sugared type won't actually show up until we
start doing instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
fc705b84347e6fb4746a1a7e26949f64c2f2f358 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Make the type associated with a ClassTemplateSpecializationDecl be a
nicely sugared type that shows how the user wrote the actual
specialization. This sugared type won't actually show up until we
start doing instantiations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
951a421c3a18d5425644d182c1f6e28932f5812c 26-Feb-2009 Ted Kremenek <kremenek@apple.com> PathDiagnosticPiece now automatically strips off trailing periods in diagnostic messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
8af2975d50270813ae6366d007e9e1f5b65ddc68 26-Feb-2009 Ted Kremenek <kremenek@apple.com> PathDiagnosticPiece now automatically strips off trailing periods in diagnostic messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
3bb3000049dd841d51cfad730bd056d1467f92f0 26-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce code modification hints into the diagnostics system. When we
know how to recover from an error, we can attach a hint to the
diagnostic that states how to modify the code, which can be one of:

- Insert some new code (a text string) at a particular source
location
- Remove the code within a given range
- Replace the code within a given range with some new code (a text
string)

Right now, we use these hints to annotate diagnostic information. For
example, if one uses the '>>' in a template argument in C++98, as in
this code:

template<int I> class B { };
B<1000 >> 2> *b1;

we'll warn that the behavior will change in C++0x. The fix is to
insert parenthese, so we use code insertion annotations to illustrate
where the parentheses go:

test.cpp:10:10: warning: use of right-shift operator ('>>') in template
argument will require parentheses in C++0x
B<1000 >> 2> *b1;
^
( )


Use of these annotations is partially implemented for HTML
diagnostics, but it's not (yet) producing valid HTML, which may be
related to PR2386, so it has been #if 0'd out.

In this future, we could consider hooking this mechanism up to the
rewriter to actually try to fix these problems during compilation (or,
after a compilation whose only errors have fixes). For now, however, I
suggest that we use these code modification hints whenever we can, so
that we get better diagnostics now and will have better coverage when
we find better ways to use this information.

This also fixes PR3410 by placing the complaint about missing tokens
just after the previous token (rather than at the location of the next
token).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticParseKinds.def
lang/Basic/TokenKinds.h
lang/Driver/TextDiagnosticPrinter.h
lang/Parse/Action.h
lang/Parse/Parser.h
4b2d3f7bcc4df31157df443af1b80bcaa9b58bba 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Introduce code modification hints into the diagnostics system. When we
know how to recover from an error, we can attach a hint to the
diagnostic that states how to modify the code, which can be one of:

- Insert some new code (a text string) at a particular source
location
- Remove the code within a given range
- Replace the code within a given range with some new code (a text
string)

Right now, we use these hints to annotate diagnostic information. For
example, if one uses the '>>' in a template argument in C++98, as in
this code:

template<int I> class B { };
B<1000 >> 2> *b1;

we'll warn that the behavior will change in C++0x. The fix is to
insert parenthese, so we use code insertion annotations to illustrate
where the parentheses go:

test.cpp:10:10: warning: use of right-shift operator ('>>') in template
argument will require parentheses in C++0x
B<1000 >> 2> *b1;
^
( )


Use of these annotations is partially implemented for HTML
diagnostics, but it's not (yet) producing valid HTML, which may be
related to PR2386, so it has been #if 0'd out.

In this future, we could consider hooking this mechanism up to the
rewriter to actually try to fix these problems during compilation (or,
after a compilation whose only errors have fixes). For now, however, I
suggest that we use these code modification hints whenever we can, so
that we get better diagnostics now and will have better coverage when
we find better ways to use this information.

This also fixes PR3410 by placing the complaint about missing tokens
just after the previous token (rather than at the location of the next
token).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticParseKinds.def
lang/Basic/TokenKinds.h
lang/Driver/TextDiagnosticPrinter.h
lang/Parse/Action.h
lang/Parse/Parser.h
fc096bf9d87834466e82482f99b1f6fe7e02bf2a 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::hasPointerRepresentation predicate.
- For types whose native representation is a pointer.

- Use to replace ExprConstant.cpp:HasPointerEvalType,
CodeGenFunction::isObjCPointerType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8958891f5fa1e593c4519a36b3df427ee019d70b 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::hasPointerRepresentation predicate.
- For types whose native representation is a pointer.

- Use to replace ExprConstant.cpp:HasPointerEvalType,
CodeGenFunction::isObjCPointerType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65569 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
554af94c53e3a182233fc4fb0f374a9eb3ae6bf6 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove PointerLikeType.
- Having pointers and references share a base was not a useful
notion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
68694ada8f4d8f6c4b00ea5b900df96428b28fc8 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove PointerLikeType.
- Having pointers and references share a base was not a useful
notion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6fdb28daa0eec6739149b82c275c5720009d628f 26-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make more AST nodes and semantic checkers dependent-expression-aware.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
2850784bda09416fc7e9d57f5baa36c9351c757c 26-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make more AST nodes and semantic checkers dependent-expression-aware.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
1db12931d4f1d1815e80ced651c5ca6a86c1d990 26-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Use RecordFirst/RecordLast range checks in DeclContext

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
65100792a69a16895bd80f1d639b99e7ad903386 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Use RecordFirst/RecordLast range checks in DeclContext

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
7bbed2a11d8fb6537efa17da658ed3e4fa9ea851 26-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implementing parsing of template-ids as class-names, so that we can
derive from a class template specialization, e.g.,

class B : public A<int> { };



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
7f43d6764797ab21216421aeb00f4ec314d503d1 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Implementing parsing of template-ids as class-names, so that we can
derive from a class template specialization, e.g.,

class B : public A<int> { };



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
34a611ba9a97ec8decdb625710654b5d26b28517 26-Feb-2009 Ted Kremenek <kremenek@apple.com> Fix subtle bug in EvalEagerlyAssume: Check if the previous node was at the same statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b293902c5cfa18365ffb0e00763849c9808a2ad1 26-Feb-2009 Ted Kremenek <kremenek@apple.com> Fix subtle bug in EvalEagerlyAssume: Check if the previous node was at the same statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
f2d873958e15fc87bcb297650176c973e96007fb 26-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Cope with use of the token '>>' inside a template argument list, e.g.,

vector<vector<double>> Matrix;

In C++98/03, this token always means "right shift". However, if we're in
a context where we know that it can't mean "right shift", provide a
friendly reminder to put a space between the two >'s and then treat it
as two >'s as part of recovery.

In C++0x, this token is always broken into two '>' tokens.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
3965b7be250de002d8744331631b9901941666a0 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Cope with use of the token '>>' inside a template argument list, e.g.,

vector<vector<double>> Matrix;

In C++98/03, this token always means "right shift". However, if we're in
a context where we know that it can't mean "right shift", provide a
friendly reminder to put a space between the two >'s and then treat it
as two >'s as part of recovery.

In C++0x, this token is always broken into two '>' tokens.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
8f52097b620db03836c1d23748327b607da4b72e 25-Feb-2009 Ted Kremenek <kremenek@apple.com> Add experimental logic in GRExprEngine::EvalEagerlyAssume() to handle
expressions of the form: 'short x = (y != 10);' While we handle 'int x = (y !=
10)' lazily, the cast to another integer type currently loses the symbolic
constraint. Eager evaluation of the constraint causes the paths to bifurcate and
eagerly evaluate 'y != 10' to a constant of 1 or 0. This should address
<rdar://problem/6619921> until we have a better (more lazy approach) for
handling promotions/truncations of symbolic integer values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
48af2a9c1ed3259512f2d1431720add1fbe8fb5f 25-Feb-2009 Ted Kremenek <kremenek@apple.com> Add experimental logic in GRExprEngine::EvalEagerlyAssume() to handle
expressions of the form: 'short x = (y != 10);' While we handle 'int x = (y !=
10)' lazily, the cast to another integer type currently loses the symbolic
constraint. Eager evaluation of the constraint causes the paths to bifurcate and
eagerly evaluate 'y != 10' to a constant of 1 or 0. This should address
<rdar://problem/6619921> until we have a better (more lazy approach) for
handling promotions/truncations of symbolic integer values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65480 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
0d93f69b8f742e1172f65b5843c15c51216d89f0 25-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Perform additional semantic checking of class template
specializations. In particular:

- Make sure class template specializations have a "template<>"
header, and complain if they don't.
- Make sure class template specializations are declared/defined
within a valid context. (e.g., you can't declare a specialization
std::vector<MyType> in the global namespace).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.def
88b7094185b9d4fe9820c731b6936d8d37f6143e 25-Feb-2009 Douglas Gregor <dgregor@apple.com> Perform additional semantic checking of class template
specializations. In particular:

- Make sure class template specializations have a "template<>"
header, and complain if they don't.
- Make sure class template specializations are declared/defined
within a valid context. (e.g., you can't declare a specialization
std::vector<MyType> in the global namespace).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticSemaKinds.def
849196f2754a3460dcc48d7b86d273f18d325189 25-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Include the appropriate header for malloc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
ac1afdc58e6ad5c969f45fd2ff6d140d3b4dd862 25-Feb-2009 Douglas Gregor <dgregor@apple.com> Include the appropriate header for malloc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
0c281a89b43f1e71e906d8b9733c2eb0303e87dc 25-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implement parsing of nested-name-specifiers that involve template-ids, e.g.,

std::vector<int>::allocator_type

When we parse a template-id that names a type, it will become either a
template-id annotation (which is a parsed representation of a
template-id that has not yet been through semantic analysis) or a
typename annotation (where semantic analysis has resolved the
template-id to an actual type), depending on the context. We only
produce a type in contexts where we know that we only need type
information, e.g., in a type specifier. Otherwise, we create a
template-id annotation that can later be "upgraded" by transforming it
into a typename annotation when the parser needs a type. This occurs,
for example, when we've parsed "std::vector<int>" above and then see
the '::' after it. However, it means that when writing something like
this:

template<> class Outer::Inner<int> { ... };

We have two tokens to represent Outer::Inner<int>: one token for the
nested name specifier Outer::, and one template-id annotation token
for Inner<int>, which will be passed to semantic analysis to define
the class template specialization.

Most of the churn in the template tests in this patch come from an
improvement in our error recovery from ill-formed template-ids.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
lang/Basic/TemplateKinds.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
39a8de10c18365bde7062d8959b7ed525449c561 25-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement parsing of nested-name-specifiers that involve template-ids, e.g.,

std::vector<int>::allocator_type

When we parse a template-id that names a type, it will become either a
template-id annotation (which is a parsed representation of a
template-id that has not yet been through semantic analysis) or a
typename annotation (where semantic analysis has resolved the
template-id to an actual type), depending on the context. We only
produce a type in contexts where we know that we only need type
information, e.g., in a type specifier. Otherwise, we create a
template-id annotation that can later be "upgraded" by transforming it
into a typename annotation when the parser needs a type. This occurs,
for example, when we've parsed "std::vector<int>" above and then see
the '::' after it. However, it means that when writing something like
this:

template<> class Outer::Inner<int> { ... };

We have two tokens to represent Outer::Inner<int>: one token for the
nested name specifier Outer::, and one template-id annotation token
for Inner<int>, which will be passed to semantic analysis to define
the class template specialization.

Most of the churn in the template tests in this patch come from an
improvement in our error recovery from ill-formed template-ids.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
lang/Basic/TemplateKinds.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
a6860dddc9656aa27b367cc70b2329d7dd2a3492 25-Feb-2009 Anders Carlsson <andersca@mac.com> Use CheckAssignmentConstraints for checking the cleanup attr function. Fixes PR3656.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
b90052a8cc4745126f7bb2e6573f07e22f24b840 25-Feb-2009 Anders Carlsson <andersca@mac.com> Use CheckAssignmentConstraints for checking the cleanup attr function. Fixes PR3656.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
1f88aa7eb94035348cc67f3071d5882ae4853a3f 25-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> C99 DR #316 implies that the function parameter types that are known
only from a function definition (that does not have a prototype) are
only used to determine the compatible with other declarations of that
same function. In particular, when referencing the function we pretend
as if it does not have a prototype. Implement this behavior, which
fixes PR3626.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2224f84658fb9b3725a31f2680edb64ae73bf705 25-Feb-2009 Douglas Gregor <dgregor@apple.com> C99 DR #316 implies that the function parameter types that are known
only from a function definition (that does not have a prototype) are
only used to determine the compatible with other declarations of that
same function. In particular, when referencing the function we pretend
as if it does not have a prototype. Implement this behavior, which
fixes PR3626.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c218108d946cdb865e2aae2eef9482e4ce21c422 25-Feb-2009 Ted Kremenek <kremenek@apple.com> Implement 'Add' method for GRStatePartialTrait<ImmutableList<T>>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
22017911050544b923302c2bc66563f8f4d32de5 25-Feb-2009 Ted Kremenek <kremenek@apple.com> Implement 'Add' method for GRStatePartialTrait<ImmutableList<T>>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
c5d3263682ab5aa9d7f0b7cb3a46200f6ea23287 24-Feb-2009 Chris Lattner <sabre@nondot.org> first wave of fixes for @encode sema support. This is part of PR3648.

The big difference here is that (like string literal) @encode has
array type, not pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
eaf2bb89eb2aad3b80673de30febe52df43c10ec 24-Feb-2009 Chris Lattner <sabre@nondot.org> first wave of fixes for @encode sema support. This is part of PR3648.

The big difference here is that (like string literal) @encode has
array type, not pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
155f9ce171714305166913e68f4a4fdcb313a214 24-Feb-2009 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c4a09c189981b4561428e4b56fd250718e2717bb 24-Feb-2009 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1c52c63c8a4d5e809b76299d201f8bd4dda392d4 24-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> When we're declaring an object or function with linkage, teach name
lookup to skip over names without linkage. This finishes
<rdar://problem/6127293>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d6f7e9dccd0fa8a5a15d7478324c0ae229fc5e1e 24-Feb-2009 Douglas Gregor <dgregor@apple.com> When we're declaring an object or function with linkage, teach name
lookup to skip over names without linkage. This finishes
<rdar://problem/6127293>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6f8c368336189b34ac8d53373d8a9efda44fc0c2 24-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> In C, when we see a function declaration within a local scope, export
that declaration to global scope so that it can be found from other
scopes. This allows us to diagnose redeclaration errors for external
declarations across scopes. We also warn when name lookup finds such
an out-of-scope declaration. This is part of <rdar://problem/6127293>;
we'll also need to do the same thing for variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
25d944af5d8d665611e09956954f10896c1071f6 24-Feb-2009 Douglas Gregor <dgregor@apple.com> In C, when we see a function declaration within a local scope, export
that declaration to global scope so that it can be found from other
scopes. This allows us to diagnose redeclaration errors for external
declarations across scopes. We also warn when name lookup finds such
an out-of-scope declaration. This is part of <rdar://problem/6127293>;
we'll also need to do the same thing for variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
af6820210f1dcee448b3a0edfdd3d5717d0f5953 24-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Improve merging of function declarations. Specifically:

- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
04495c859f81e440748a9b86baa2913461652bb0 24-Feb-2009 Douglas Gregor <dgregor@apple.com> Improve merging of function declarations. Specifically:

- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
5fd818bec0c21e3072679d1a9a522be2649405d8 23-Feb-2009 Steve Naroff <snaroff@apple.com> - Generate error for protocol qualifiers on 'Class'.
- Generate error for protocol qualifiers on non-ObjC types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
4262a07621043c19292f5fd90b1e426d65cd366c 23-Feb-2009 Steve Naroff <snaroff@apple.com> - Generate error for protocol qualifiers on 'Class'.
- Generate error for protocol qualifiers on non-ObjC types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
6805fc44a1b5179f6390a160c807dfb4480d7138 23-Feb-2009 Steve Naroff <snaroff@apple.com> Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244.

Remove support for "Class<P>". Will be making this an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
d461777e23204fe8c480302d8ff76f5847605da6 23-Feb-2009 Steve Naroff <snaroff@apple.com> Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244.

Remove support for "Class<P>". Will be making this an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
d85ba92f4127367a1d025f50089ae8e1d464dcc0 22-Feb-2009 Steve Naroff <snaroff@apple.com> Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's).

- Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
- Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
- Changed several test cases to jive with the above changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
0de21fd85d79bccd32f04256f5b3328ab5ed7c95 22-Feb-2009 Steve Naroff <snaroff@apple.com> Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's).

- Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
- Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
- Changed several test cases to jive with the above changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
0c195b98f48e29dd5bc19747d9736769b9585e43 22-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc gc work. Match gcc's treatment of ivar access
true a local pointer to objective-c object in generating
write barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
44baa8abba2a1552b6b50bf750a8750ab9da9f76 22-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc gc work. Match gcc's treatment of ivar access
true a local pointer to objective-c object in generating
write barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ec93a395562e5657b247c80a6a6ee1d61f615e15 22-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Sanity fix for PR3642: if we're treating a diagnostic as an error, it's
required to actually be an error for correctness. The attached testcase
now gives an error instead of mysteriously crashing.

Now, it's possible we actually want to support the given usage, but I
haven't looked at the relevant code closely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
85c351551688a101c5ce918e5d60dea5177d72e7 22-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Sanity fix for PR3642: if we're treating a diagnostic as an error, it's
required to actually be an error for correctness. The attached testcase
now gives an error instead of mysteriously crashing.

Now, it's possible we actually want to support the given usage, but I
haven't looked at the relevant code closely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
d305a86f087fd359cf0f033eba0c968e55a61ff4 21-Feb-2009 Steve Naroff <snaroff@apple.com> More work to integrate newly added ObjCQualifiedClassType into the type system.

This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f7f52e7bf5a4dc36d45b98531e0b21e343fc19de 21-Feb-2009 Steve Naroff <snaroff@apple.com> More work to integrate newly added ObjCQualifiedClassType into the type system.

This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
262a5dd7735667460dc4fcf0bef0b5df0ef5335e 21-Feb-2009 Steve Naroff <snaroff@apple.com> Add support for GCC ObjC extension "Class<protocol>". Sigh.

Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's.

Will never be seen in user code. Needed to pass dejagnu testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
15509f4fe73f0e11a8cec602bce4d99d9454b7f6 21-Feb-2009 Steve Naroff <snaroff@apple.com> Add support for GCC ObjC extension "Class<protocol>". Sigh.

Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's.

Will never be seen in user code. Needed to pass dejagnu testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c84582b18e31a5eb250c93935e654fc8daebe1cb 21-Feb-2009 Steve Naroff <snaroff@apple.com> Warn about bogus protocol qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
8dfb0c57ddb700b163afa89e3ab160f1de26753d 21-Feb-2009 Steve Naroff <snaroff@apple.com> Warn about bogus protocol qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
235e0bb2f79c241e48480447301a7e0d19f9ccb8 21-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Warn on use of __weak attribute on local
variable (objc2 gc specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
7b5b3170d9be39f462194d456051a7ca81babe28 21-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Warn on use of __weak attribute on local
variable (objc2 gc specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
184541a6a7d218583d79d408534f77c27b7b8c6e 21-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a bug whereby a pointer to a __weak was not recognized
as __weak (objc2 gc specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4ae1f058902ffd92207af678e1c62e43258127c6 21-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a bug whereby a pointer to a __weak was not recognized
as __weak (objc2 gc specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a442ad9937af48010e6d1716a497c9de5e49c96a 20-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6500554> missing objc error message.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
ccef371a67756233aa97770e4fccdfa868b3e2d0 20-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6500554> missing objc error message.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
89188b2ef0361a97ef5d52761d52068191f49c8d 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch the macroinfo argument lists from being allocated off the heap
to being allocated from the same bumpptr that the MacroInfo objects
themselves are.

This speeds up -Eonly cocoa.h pth by ~4%, fsyntax-only is barely measurable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
685befeb5f6472585bae473a6389e47cab9eac67 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch the macroinfo argument lists from being allocated off the heap
to being allocated from the same bumpptr that the MacroInfo objects
themselves are.

This speeds up -Eonly cocoa.h pth by ~4%, fsyntax-only is barely measurable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
1c9b6b81a3a3cac0ab7afc80674e56584d15915d 20-Feb-2009 Chris Lattner <sabre@nondot.org> detemplatify setArgumentList and some other cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
cf29e0716bb3ecbbc15b74cd648367d6b075fdf0 20-Feb-2009 Chris Lattner <sabre@nondot.org> detemplatify setArgumentList and some other cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
f75665630c47f2c50fc8dd6b38a2b15338492b9f 20-Feb-2009 Chris Lattner <sabre@nondot.org> require the MAcroInfo objects are explcitly destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
0301b3ff132a4d986c092d161cb77d74b04cd2a6 20-Feb-2009 Chris Lattner <sabre@nondot.org> require the MAcroInfo objects are explcitly destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
df6133ba4bc02ffe030dc3941c67514aa837b773 20-Feb-2009 Chris Lattner <sabre@nondot.org> add plumbing to get ASTContext& down to allocation/deallocation points in ObjCList,
but don't start using it yet. Renamed some methods to be more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
38af2deb27cdfa1a95bde96e30dab15dce53fcef 20-Feb-2009 Chris Lattner <sabre@nondot.org> add plumbing to get ASTContext& down to allocation/deallocation points in ObjCList,
but don't start using it yet. Renamed some methods to be more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
217eb8c5fedfc5d09f1bae91231beae4751d75cd 20-Feb-2009 Chris Lattner <sabre@nondot.org> newly factored, we can now move the set and destroy methods out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
11e1e1af2641affb378080a4f3d1a30da1cad082 20-Feb-2009 Chris Lattner <sabre@nondot.org> newly factored, we can now move the set and destroy methods out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
206d79e37a1aeece613d1563c151186c0ebc734c 20-Feb-2009 Chris Lattner <sabre@nondot.org> factor a bunch of common code out of the ObjCList template class
into a new shared ObjCListBase class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
793ccfd646d0388e06c587e962a18fa723b72f02 20-Feb-2009 Chris Lattner <sabre@nondot.org> factor a bunch of common code out of the ObjCList template class
into a new shared ObjCListBase class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
fb15fbfbf66b4d26a0778a4f76cf3f765cb8842e 20-Feb-2009 Chris Lattner <sabre@nondot.org> prune #includes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
68835718c4125f2f66740cd04de7088645ec695d 20-Feb-2009 Chris Lattner <sabre@nondot.org> prune #includes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
c3e7268152d8ca4380bda809e0b833b6c5f82138 20-Feb-2009 Chris Lattner <sabre@nondot.org> rename ObjCList::clear() -> ObjCList::Destroy(). Require that destroy is called
before the dtor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
88cf7a16902a9189d16653e1061cfda333187b58 20-Feb-2009 Chris Lattner <sabre@nondot.org> rename ObjCList::clear() -> ObjCList::Destroy(). Require that destroy is called
before the dtor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
47a5771bb3f71086fa10d8893122d9521266047e 20-Feb-2009 Chris Lattner <sabre@nondot.org> more random cleanups, add some fixme's. ObjCCategoryImplDecl really
shouldn't be a NamedDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a8ff9f455d94d9609766cfd5186b6e21dc2102f1 20-Feb-2009 Chris Lattner <sabre@nondot.org> more random cleanups, add some fixme's. ObjCCategoryImplDecl really
shouldn't be a NamedDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
97e84d6d5c44ee7fbe193b3b2d514e8c0375dfa8 20-Feb-2009 Chris Lattner <sabre@nondot.org> move the @implementation ivar list to being an ObjCList, which prevents
it from being leaked, among other things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7a21bd046fe57629ab074980cf8193f5e0c15735 20-Feb-2009 Chris Lattner <sabre@nondot.org> move the @implementation ivar list to being an ObjCList, which prevents
it from being leaked, among other things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a0fbce253bf7ebbb80cc88915476d91b65d36714 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove dead list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2f0fe337f499c78710b718324b25510670d885b1 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove dead list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5c6b2c638375da5002f93373e5e0f890d300aeb9 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some more methods from objc decls, using the iterator
interfaces more consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
89951a86b594513c2a013532ed45d197413b1087 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some more methods from objc decls, using the iterator
interfaces more consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
179fd52ebca8c731636da35184ab2dc7954b1aeb 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some slow O(n) methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
cafeb35117578585dbbfef0bc79d8aa27712bc0e 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some slow O(n) methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ad446cf86babeb52874440c55bb76cdce97d6259 20-Feb-2009 Chris Lattner <sabre@nondot.org> Change ObjCForwardProtocolDecl to use an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
07fa7749da805969f2ed467a4eb5b405a4ff9a23 20-Feb-2009 Chris Lattner <sabre@nondot.org> Change ObjCForwardProtocolDecl to use an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6a02874b20e4b3e5a23f4550a5fa782ffab357b5 20-Feb-2009 Chris Lattner <sabre@nondot.org> move the interace list of @class to use ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
67956052ea5fb0cd7f443de96a11f9a0176dc681 20-Feb-2009 Chris Lattner <sabre@nondot.org> move the interace list of @class to use ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
38d2ff2bf79635fefb284bf95ab93dd249786b2a 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove a dead list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
4a323d94e50c8f570cbfaf0392e68215b8ca87bf 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove a dead list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e73c1d5d4193081bf658c8fb56ec2b3fcdf8223a 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add some stdlib builtins


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
f8ebb4154e261e34a0c77338fa1faa100ecfb28d 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add some stdlib builtins


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
9408eb1b33ae4bef17163a644df6fad8624de469 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch ObjCMethodDecl's parameter list from being explicitly managed to an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2073216a1075767b5d25c23d1462b7034686d94d 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch ObjCMethodDecl's parameter list from being explicitly managed to an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
922132e4500f7bc481ea95a00de8355074b30621 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch the interface ivar list from being explicitly managed to using ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e881483a3bc22ffad62367501aa09ad8508fe363 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch the interface ivar list from being explicitly managed to using ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3e27e63d1253ab116c7ef19e0191c1d8af5b8231 20-Feb-2009 Chris Lattner <sabre@nondot.org> move more objc destruction out of dtors into Destroy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0b7ebb3dba0df0a6cbf221e5edbc6a4b8848478c 20-Feb-2009 Chris Lattner <sabre@nondot.org> move more objc destruction out of dtors into Destroy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ae53888f057b48a4a51bf1f496bdcc05ebf461cf 20-Feb-2009 Chris Lattner <sabre@nondot.org> move some objc decl destruction out of dtors into Destroy method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
411280e5b25ba7dcd7c8a82a5c23880fe7632a3c 20-Feb-2009 Chris Lattner <sabre@nondot.org> move some objc decl destruction out of dtors into Destroy method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3272e92d52342b3724bfdde0eddc7836f57d6b3c 20-Feb-2009 Chris Lattner <sabre@nondot.org> map source ranges through macro expansions. Before:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^

(no ranges on the second diagnostics)

After:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
~~~ ^ ~~~

(ranges!)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
676f0242a86d7652de586cff360c07c4e752035b 20-Feb-2009 Chris Lattner <sabre@nondot.org> map source ranges through macro expansions. Before:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^

(no ranges on the second diagnostics)

After:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
~~~ ^ ~~~

(ranges!)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
ec52b7d478efc5b1d55614c006c196ccbb1aa3b5 20-Feb-2009 Chris Lattner <sabre@nondot.org> refactor, pass ranges down instead of the whole
DiagnosticInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
ebbbb1b211119e13229c487dfc1713e8d1e77a41 20-Feb-2009 Chris Lattner <sabre@nondot.org> refactor, pass ranges down instead of the whole
DiagnosticInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65088 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
0b53af20d4a56a5ec3bc5072aaa3a14f6d6fecd1 20-Feb-2009 Chris Lattner <sabre@nondot.org> replace a dirty hack with a clean solution. Too bad we can't
use Blocks for our callbacks ;-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Diagnostic.h
92dd386e3f05d176b45a638199d51f536bd9d1c4 20-Feb-2009 Chris Lattner <sabre@nondot.org> replace a dirty hack with a clean solution. Too bad we can't
use Blocks for our callbacks ;-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Diagnostic.h
a11044e5275d0939762526b87677d74e68c496f5 20-Feb-2009 Ted Kremenek <kremenek@apple.com> Added a new method to GRStmtNodeBuilder to build nodes using an arbitrary
PostStmt program point. This allows clients to pass in PostStmtCustom program
points.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
58e899b336c63fa25d4cc8986d97a40933cded9b 20-Feb-2009 Ted Kremenek <kremenek@apple.com> Added a new method to GRStmtNodeBuilder to build nodes using an arbitrary
PostStmt program point. This allows clients to pass in PostStmtCustom program
points.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
cf2da48dae7578d39252d3aae878e9eadd30efb5 20-Feb-2009 Ted Kremenek <kremenek@apple.com> ProgramPoint::Profile now specially handles PostStmtCustom (hashes on tag and data) so that clients don't need a unique address for the pair itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
2680b5f926fad29c1a2b2723a70d189f4b637979 20-Feb-2009 Ted Kremenek <kremenek@apple.com> ProgramPoint::Profile now specially handles PostStmtCustom (hashes on tag and data) so that clients don't need a unique address for the pair itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
ae93d65fa7478040fffc73e3fa11181b527c7aa2 19-Feb-2009 Mike Stump <mrs@apple.com> Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b83d287bc7f47d36fb0751a481e2ef9308b37252 19-Feb-2009 Mike Stump <mrs@apple.com> Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
eb12e78ddbe63baed47cb92fb281d6d1aa689b1c 19-Feb-2009 Anders Carlsson <andersca@mac.com> Add sema support for the noinline attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
5bab788d40026ad6e932a3cd9b86bc13f8a27661 19-Feb-2009 Anders Carlsson <andersca@mac.com> Add sema support for the noinline attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
adcfb6d8a4235056423b452cef3cecf0d6a2f76a 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix PR3609, emit:

t.c:1:10: error: missing terminating '>' character
#include <stdio.h
^

instead of:

t.c:1:10: error: missing terminating " character
#include <stdio.h
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.def
b66158c299786042cd6277b163a2c20fd3d11da5 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix PR3609, emit:

t.c:1:10: error: missing terminating '>' character
#include <stdio.h
^

instead of:

t.c:1:10: error: missing terminating " character
#include <stdio.h
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.def
3f7a8f19e231b74ff3d94754b420ea4eb2107afd 19-Feb-2009 Chris Lattner <sabre@nondot.org> Fix PR3619 by properly considering size modifiers and type quals when
uniquing array types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0be2ef2321b1283ead38ebeb83b451335d90e0fe 19-Feb-2009 Chris Lattner <sabre@nondot.org> Fix PR3619 by properly considering size modifiers and type quals when
uniquing array types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
126949ecf2a1051fa3271b42936129ea0299be99 19-Feb-2009 Gabor Greif <ggreif@gmail.com> fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4b5d486a0a2cb535d8c7e3f5c258eb3cba8cad29 19-Feb-2009 Gabor Greif <ggreif@gmail.com> fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
11a31c902ba609eec9991a48eb7a86b13e65d77f 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::getAsFunctionNoProto


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
afa74448a07a16c3146accbe0ff03e9c8b0995e5 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::getAsFunctionNoProto


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65031 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e2c201b52fb16631676135ba3f93d2ea6464edc1 19-Feb-2009 Chris Lattner <sabre@nondot.org> standardise on bastardised american spelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/InitHeaderSearch.h
d000c9ec6e1562e5e1eed2236a67fa9848bf8201 19-Feb-2009 Chris Lattner <sabre@nondot.org> standardise on bastardised american spelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/InitHeaderSearch.h
99a72657754d99f74b5bdcc5c145ce4785d850ae 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix a bug introduced in my previous patch: moving clang headers to the
"after" group instead of the system group makes it so #include <limits.h>
picks up the *system* limits.h file before clang's. This causes a failure
on linux and is definitely not what we want.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/InitHeaderSearch.h
6858dd3fcc2d3ac6a706a0294be1d3ac51849022 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix a bug introduced in my previous patch: moving clang headers to the
"after" group instead of the system group makes it so #include <limits.h>
picks up the *system* limits.h file before clang's. This causes a failure
on linux and is definitely not what we want.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/InitHeaderSearch.h
acf1649b370eb3eaea3b83d0523a1d8dfeb21688 19-Feb-2009 Chris Lattner <sabre@nondot.org> disable copying and assignment of AttributeList


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
60b2837ba2335b13fc5aaaa6826b1a4710944d92 19-Feb-2009 Chris Lattner <sabre@nondot.org> disable copying and assignment of AttributeList


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
05c9b5f51a43211afcfcb86530a94fa935045cdd 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix a typo gabor noticed


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8bea7c0ee44c71c817de7dc2be932b73bec90c9f 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix a typo gabor noticed


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
95a9825310648bb817deae2bf614ace85a65e265 19-Feb-2009 Ted Kremenek <kremenek@apple.com> Implemented simple check in <rdar://problem/6600344>: When the receiver of a
message expression is nil and the return type is struct then the returned value
is undefined or potentially garbage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
21fe8370f660a30e3a0493c74728dcb369b9c58b 19-Feb-2009 Ted Kremenek <kremenek@apple.com> Implemented simple check in <rdar://problem/6600344>: When the receiver of a
message expression is nil and the return type is struct then the returned value
is undefined or potentially garbage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
85534581967bd50a73c25ae76c96d39b05854a05 19-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Couple of helpers for objc's gc attributes.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f6123ca578eb8aabb76ecce7df6857482017f502 19-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Couple of helpers for objc's gc attributes.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
18b5a9a3396fa4bb6630c5bea19399b101aa3043 18-Feb-2009 Chris Lattner <sabre@nondot.org> fix some subtle bugs handling the mix of cvr qualifiers, addr spaces,
and gc attrs. Add an assert to check that we never
get ExtQualType(ExtQualType(T)).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b7d2553edd2532d29b98b9e76bcf6a62bc48b417 18-Feb-2009 Chris Lattner <sabre@nondot.org> fix some subtle bugs handling the mix of cvr qualifiers, addr spaces,
and gc attrs. Add an assert to check that we never
get ExtQualType(ExtQualType(T)).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7029ee3fdeee514a79eafb2508723d27c97fe158 18-Feb-2009 Chris Lattner <sabre@nondot.org> minor spacing changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
bc5e150b6d94cf131f7d01bc715571b741c5b408 18-Feb-2009 Chris Lattner <sabre@nondot.org> minor spacing changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c25bf6d949f81d248750b1d2289a4b5905e39500 18-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Downgrade the "excess elements in initializer" errors to warnings *in
C*. They're required errors in C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
7c53ca6e03833adab4465462b7d5c888741b715d 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Downgrade the "excess elements in initializer" errors to warnings *in
C*. They're required errors in C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
1fc4791c3be994d661401a4ce134831ba442ebc2 18-Feb-2009 Chris Lattner <sabre@nondot.org> rip out __builtin_overload


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/TokenKinds.def
lang/Parse/Action.h
1e4db7c468c002c58f07e059ff7925384f053e85 18-Feb-2009 Chris Lattner <sabre@nondot.org> rip out __builtin_overload


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/TokenKinds.def
lang/Parse/Action.h
aa57e866832a9a31351214c33de9b40a49510d84 18-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Downgrade complaints about calling unavailable functions to a warning
(as GCC does), except when we've performed overload resolution and
found an unavailable function: in this case, we actually error.

Merge the checking of unavailable functions with the checking for
deprecated functions. This unifies a bit of code, and makes sure that
we're checking for unavailable functions in the right places. Also,
this check can cause an error. We may, eventually, want an option to
make "unavailable" warnings into errors.

Implement much of the logic needed for C++0x deleted functions, which
are effectively the same as "unavailable" functions (but always cause
an error when referenced). However, we don't have the syntax to
specify deleted functions yet :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
48f3bb9f780f6e64ab71ba0202ca04b07473805a 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Downgrade complaints about calling unavailable functions to a warning
(as GCC does), except when we've performed overload resolution and
found an unavailable function: in this case, we actually error.

Merge the checking of unavailable functions with the checking for
deprecated functions. This unifies a bit of code, and makes sure that
we're checking for unavailable functions in the right places. Also,
this check can cause an error. We may, eventually, want an option to
make "unavailable" warnings into errors.

Implement much of the logic needed for C++0x deleted functions, which
are effectively the same as "unavailable" functions (but always cause
an error when referenced). However, we don't have the syntax to
specify deleted functions yet :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
b8ca6ff810e0131a6d6c5cc9875ec10c416e9970 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring and simplificaiotn of objc's gc
ir gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4fd83ea566f4a0c083001c84b75da6cc8c99c1d6 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring and simplificaiotn of objc's gc
ir gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c61a8003b2c69add9fca0ec5064b47251f47c90c 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::isSpecificBuiltinType as a shortcut.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e00d5c00f35163308a18ec1d3d2b9dfa1ecaf234 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::isSpecificBuiltinType as a shortcut.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
be93e79e38e89e164a40892ecee7c22665e79023 18-Feb-2009 Chris Lattner <sabre@nondot.org> Next step toward making string diagnostics correct: handle
escapes in the string for subtoken positioning. This gives
us working examples like:

t.m:5:16: warning: field width should have type 'int', but argument has type 'unsigned int'
printf("\n\n%*d", (unsigned) 1, 1);
^ ~~~~~~~~~~~~

where before the caret pointed two spaces to the left.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
719e61573f27c11057ecfe0dd8f141621602c571 18-Feb-2009 Chris Lattner <sabre@nondot.org> Next step toward making string diagnostics correct: handle
escapes in the string for subtoken positioning. This gives
us working examples like:

t.m:5:16: warning: field width should have type 'int', but argument has type 'unsigned int'
printf("\n\n%*d", (unsigned) 1, 1);
^ ~~~~~~~~~~~~

where before the caret pointed two spaces to the left.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
31804e14ac2c60f459c42367c7c6a1a7424392bb 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Start generating gc'able code using the new
objc gc type attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
5934e75d98d99374f72722a69c5eefe026f35c74 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Start generating gc'able code using the new
objc gc type attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
80ff83cc9136a4737632dc84ad8d124e82f45b76 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup objc's gc attributes code no longer needed.
This make warn-weak-field.m to fail (subject of
a followup patch).
attr-objc-gc.m no passes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Type.h
ba372b85524f712e5b97a176f6ce0197d365835d 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup objc's gc attributes code no longer needed.
This make warn-weak-field.m to fail (subject of
a followup patch).
attr-objc-gc.m no passes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Type.h
f17cb369ac6ed77e876f0b0a3996a12ffb48921a 18-Feb-2009 Chris Lattner <sabre@nondot.org> Start improving diagnostics that relate to subcharacters of string literals.
First step, handle diagnostics in StringLiteral's that are due to token pasting.

For example, we now handle:
id str2 = @"foo"
"bar"
@"baz"
" b\0larg"; // expected-warning {{literal contains NUL character}}

Correctly:

test/SemaObjC/exprs.m:17:15: warning: CFString literal contains NUL character
" b\0larg"; // expected-warning {{literal contains NUL character}}
~~~^~~~~~~

There are several other related issues still to be done.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
60800081361b0ffc114877b8abbc81cb57b4edf6 18-Feb-2009 Chris Lattner <sabre@nondot.org> Start improving diagnostics that relate to subcharacters of string literals.
First step, handle diagnostics in StringLiteral's that are due to token pasting.

For example, we now handle:
id str2 = @"foo"
"bar"
@"baz"
" b\0larg"; // expected-warning {{literal contains NUL character}}

Correctly:

test/SemaObjC/exprs.m:17:15: warning: CFString literal contains NUL character
" b\0larg"; // expected-warning {{literal contains NUL character}}
~~~^~~~~~~

There are several other related issues still to be done.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6c0f406617091070a4a29ff14883057964f8549c 18-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Update Parser::ParseTypeName to return a TypeResult, which also tells
us whether there was an error in trying to parse a type-name (type-id
in C++). This allows propagation of errors further in the compiler,
suppressing more bogus error messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
809070a886684cb5b92eb0e00a6581ab1fa6b17a 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Update Parser::ParseTypeName to return a TypeResult, which also tells
us whether there was an error in trying to parse a type-name (type-id
in C++). This allows propagation of errors further in the compiler,
suppressing more bogus error messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
88a25f851e1fa531a65919ca37abe31b7fb564c8 18-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Allow "overloadable" functions in C to be declared as variadic without
any named parameters, e.g., this is accepted in C:

void f(...) __attribute__((overloadable));

although this would be rejected:

void f(...);

To do this, moved the checking of the "ellipsis without any named
arguments" condition from the parser into Sema (where it belongs anyway).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/DeclSpec.h
965acbb321e94e36aa5365126eee46b97745fdbb 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Allow "overloadable" functions in C to be declared as variadic without
any named parameters, e.g., this is accepted in C:

void f(...) __attribute__((overloadable));

although this would be rejected:

void f(...);

To do this, moved the checking of the "ellipsis without any named
arguments" condition from the parser into Sema (where it belongs anyway).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/DeclSpec.h
2c49963298fba3836a81bfa77b348e67e340a4ee 18-Feb-2009 Chris Lattner <sabre@nondot.org> teach child iterators to walk into the child string of an ObjCStringLiteral,
so it shows up in -ast-dump.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
c6c16af963eddc3e9b75b5d2614d069e1162fe27 18-Feb-2009 Chris Lattner <sabre@nondot.org> teach child iterators to walk into the child string of an ObjCStringLiteral,
so it shows up in -ast-dump.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
8d8199bd0c34741bfdf73349da780c195279838d 18-Feb-2009 Chris Lattner <sabre@nondot.org> add iterators for string token locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b137299ce5bb6c36fbba651858600857fda4dd50 18-Feb-2009 Chris Lattner <sabre@nondot.org> add iterators for string token locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
aa491196c84d3707be32ad06f19c18bfcfbef21a 18-Feb-2009 Chris Lattner <sabre@nondot.org> privatize all of the string literal memory allocation/creation
stuff behind a private static function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2085fd6cd22ec5c268175251db10d7c60caf7aaa 18-Feb-2009 Chris Lattner <sabre@nondot.org> privatize all of the string literal memory allocation/creation
stuff behind a private static function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7f49ea29f8bfec0a3df9eba324f72127880bf496 18-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Don't allow calls to functions marked "unavailable". There's more work
to do in this area, since there are other places that reference
FunctionDecls.

Don't allow "overloadable" functions (in C) to be declared without a
prototype.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
c6666f8e9bbb7f31bf2e52f97137e738c4ca01d0 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Don't allow calls to functions marked "unavailable". There's more work
to do in this area, since there are other places that reference
FunctionDecls.

Don't allow "overloadable" functions (in C) to be declared without a
prototype.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
81f5be228ed67e67c6f74e7678de8f21c27dd447 18-Feb-2009 Chris Lattner <sabre@nondot.org> rename CheckBuiltinCFStringArgument -> CheckObjCString


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
690398188ea5b428f06aa13c7d4ce6eb741ad4f9 18-Feb-2009 Chris Lattner <sabre@nondot.org> rename CheckBuiltinCFStringArgument -> CheckObjCString


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c314474f0e1eb9b9e3c541dbc068b6cc95c74e2c 18-Feb-2009 Chris Lattner <sabre@nondot.org> change the StringLiteral AST node to track all of the SourceLocations of
the various PPTokens that are pasted together to make it. In the course
of working on this, I discovered ParseObjCStringLiteral which needs some
work. I'll tackle it next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
726e168dc09fb23f53c7b004f8e919421ee91806 18-Feb-2009 Chris Lattner <sabre@nondot.org> change the StringLiteral AST node to track all of the SourceLocations of
the various PPTokens that are pasted together to make it. In the course
of working on this, I discovered ParseObjCStringLiteral which needs some
work. I'll tackle it next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
af23809cb5b961cd4624785e94f339e0a0f5f49e 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Representation of objc gc's attribute using ExtQualType.
Note that one test attr-objc-gc.m fails. I will fix this
after removing these attributes from the Decl nodes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
d33d9c0cc0cfdcd0b10f35a6acdfb25da4a64f19 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Representation of objc gc's attribute using ExtQualType.
Note that one test attr-objc-gc.m fails. I will fix this
after removing these attributes from the Decl nodes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c26c46997544fe29588e23d9147c75638ccbdf35 18-Feb-2009 Ted Kremenek <kremenek@apple.com> Hooked up the necessary machinery to allow the retain/release checker reference
back to the summary used when evaluating the statement associated with a
simulation node. This is now being used to help improve the checker's
diagnostics. To get things started, the checker now emits a path diagnostic
indicating that 'autorelease' is a no-op in GC mode.

Some of these changes are exposing further grossness in the interface between
BugReporter and the ExplodedGraph::Trim facilities. These really need to be
cleaned up one day.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
fe9e543a2a363df7fcaa899367d3b2580b63b27c 18-Feb-2009 Ted Kremenek <kremenek@apple.com> Hooked up the necessary machinery to allow the retain/release checker reference
back to the summary used when evaluating the statement associated with a
simulation node. This is now being used to help improve the checker's
diagnostics. To get things started, the checker now emits a path diagnostic
indicating that 'autorelease' is a no-op in GC mode.

Some of these changes are exposing further grossness in the interface between
BugReporter and the ExplodedGraph::Trim facilities. These really need to be
cleaned up one day.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
e8f7071435acbd96d6471a0298cfe6ca9a57a49b 18-Feb-2009 Chris Lattner <sabre@nondot.org> move llvm backend specific #includes into Backend.cpp instead of Clang.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
445026698ca8f97ee7320464dedbe0d077b32d16 18-Feb-2009 Chris Lattner <sabre@nondot.org> move llvm backend specific #includes into Backend.cpp instead of Clang.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
168b20c6e43a58ef05e68201766d293ea9d1af95 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> isICE was evaluating ?: incorrectly with missing-gcc-LHS extension.

Add assert to isICE that, on success, result must be the same as
EvaluateAsInt()... this enforces a minimum level of sanity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2d6744ff04c1690a1485178d550d2fab84a0270b 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> isICE was evaluating ?: incorrectly with missing-gcc-LHS extension.

Add assert to isICE that, on success, result must be the same as
EvaluateAsInt()... this enforces a minimum level of sanity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64865 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
51f06af4822090f4936e0cb08a6254175c0d6fe2 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add ASTContext::MakeIntValue
- Makes an APSInt given a uint64_t and a type, with the appropriate
width and signedness to match the type. Yay for functional over
imperative.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0cd7fc28d4f69b281522b1bc96decd2b92cfd812 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add ASTContext::MakeIntValue
- Makes an APSInt given a uint64_t and a type, with the appropriate
width and signedness to match the type. Yay for functional over
imperative.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8360a9cbcf4054a8fb43bde1e50951e1e4b48f73 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Rename UnaryTypeTraitExpr::Evaluate to EvaluateTrait to not collide
with Expr::Evaluate().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64850 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
c87a282e7b80c055088fc51bdbe8fc73da64d4f8 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Rename UnaryTypeTraitExpr::Evaluate to EvaluateTrait to not collide
with Expr::Evaluate().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64850 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
a08b6c79bf6fc9efef2ae2db8b747bac60ee0fae 18-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implement basic parsing and semantic analysis for explicit
specialization of class templates, e.g.,

template<typename T> class X;

template<> class X<int> { /* blah */ };

Each specialization is a different *Decl node (naturally), and can
have different members. We keep track of forward declarations and
definitions as for other class/struct/union types.

This is only the basic framework: we still have to deal with checking
the template headers properly, improving recovery when there are
failures, handling nested name specifiers, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticParseKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
cc636688c4fd10b1732ce3e33b2b106024d545ca 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement basic parsing and semantic analysis for explicit
specialization of class templates, e.g.,

template<typename T> class X;

template<> class X<int> { /* blah */ };

Each specialization is a different *Decl node (naturally), and can
have different members. We keep track of forward declarations and
definitions as for other class/struct/union types.

This is only the basic framework: we still have to deal with checking
the template headers properly, improving recovery when there are
failures, handling nested name specifiers, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticParseKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
a26c9fa26354ff2f04f65679368c0e649746f921 17-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: getMinValue/getMaxValue can be applied to any location type as specified by Loc::IsLocType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
63eb5878c3d97b002139b7da8ba449592bdef717 17-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: getMinValue/getMaxValue can be applied to any location type as specified by Loc::IsLocType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
3ccaa82ee88c3c6078539775c63720b820b41e29 17-Feb-2009 Ted Kremenek <kremenek@apple.com> Attribute 'iboutlet' can be applied to Objective-C property declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
327426076e1acc8217307cb236269ccf08c18fe6 17-Feb-2009 Ted Kremenek <kremenek@apple.com> Attribute 'iboutlet' can be applied to Objective-C property declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
96d1f1b90da45ccb875227429c26f85728c7e4c6 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Eek! getDeclAlign sometimes returned alignment in bits.
- Renamed to getDeclAlignInBytes since most other query functions
work in bits.

- Fun to track down as isIntegerConstantExpr was getting it right,
but Evaluate() was getting it wrong. Maybe we should assert they
compute the same thing when they succeed?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b7d0844c887a72064b624dc6df12cbe1441f69d0 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Eek! getDeclAlign sometimes returned alignment in bits.
- Renamed to getDeclAlignInBytes since most other query functions
work in bits.

- Fun to track down as isIntegerConstantExpr was getting it right,
but Evaluate() was getting it wrong. Maybe we should assert they
compute the same thing when they succeed?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1e124fe3e31ab37c45b6fbe6a8075e987fc04408 17-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Simplified ExtQualType per Chris's feedback.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4886a4204ff2b20bc226ce70d837de5fcd4a79ab 17-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Simplified ExtQualType per Chris's feedback.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64820 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
bc1f2a636fb123de01a3b158f0c74d416ef681cf 17-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move DeclContext::getParent and getLexicalParent in-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
305ec42f971a2b3e114eb35256c23e955c497a1c 17-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move DeclContext::getParent and getLexicalParent in-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
b50464f6665ba9e50579bb5edc2abc573107dbfc 17-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove some redundant Decl -> Decl castings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d311f376c364e5a6c88b63b1d5c53f560ea5e650 17-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove some redundant Decl -> Decl castings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
96e79bfae502212f22148a4ae4fae85244373245 17-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> All Decls have a DeclContext now, hooray! Fans of consistency rejoice.

Pass the DeclContext to ObjCIvarDecls as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0c00aac5d618f39afc406c5b2e07642930af1d56 17-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> All Decls have a DeclContext now, hooray! Fans of consistency rejoice.

Pass the DeclContext to ObjCIvarDecls as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
dae66edc49dc2ebbb32377e33012fc3a168c5a4e 17-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Added support for objc's gc attribute in ExtQualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
59d16d1402d76a298ab7fc5f362e9d3dfd744aa5 17-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Added support for objc's gc attribute in ExtQualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9101a6356b807dab260e600241a56f22a19dca7f 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Backend: Accept -mcpu and -mattr for use by TargetMachine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
a034ba807be38d9166998d68af71226c64c5c8dd 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Backend: Accept -mcpu and -mattr for use by TargetMachine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
aecbac1ad7b9c4b90a007491789c3be592bcaacb 17-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: getMaxValue and getMinValue now also handle 'block' pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
eca69623c2c942fdb995cecc92a275a189fd731c 17-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: getMaxValue and getMinValue now also handle 'block' pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
b60352aa80d17026f445267940db558ab9cfb92e 17-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ASQualType to ExtQualType to reflect its more
general use; as for, objc2's gc type attributes. No
change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
f11284ac87daa613bc7b30db9f54bd716d123222 17-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ASQualType to ExtQualType to reflect its more
general use; as for, objc2's gc type attributes. No
change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
fe3ccfa91de59de8cd51a6dc063cd72316c2c4fc 17-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Remove the error about redefining library functions. It's causing too
much pain when compiling the Linux kernel (PR3592).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
655753a757b3eae4306cf59e84a63b78ebb2b9a7 17-Feb-2009 Douglas Gregor <dgregor@apple.com> Remove the error about redefining library functions. It's causing too
much pain when compiling the Linux kernel (PR3592).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
f1790ca8a7ece12dcdc11cd91f66bb601c0813f4 17-Feb-2009 Chris Lattner <sabre@nondot.org> add an accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
bff5c512af8ca7ac92e974e04c06ff4f820e4ee1 17-Feb-2009 Chris Lattner <sabre@nondot.org> add an accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
57e5f7e45f23d176cbd610bb2ff16cc307c3df2c 17-Feb-2009 Chris Lattner <sabre@nondot.org> emit:
t.c:4:9: error: invalid type 'short *' to __real operator
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)),
^
instead of:
t.c:4:9: error: invalid type 'short *' to __real or __imag operator
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)),
^

fixing a fixme. It would be even fancier to get the spelling of the token, but I
don't care *that* much :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
ba27e2a5c2ba49c0f3d84118508f761bf8fb762d 17-Feb-2009 Chris Lattner <sabre@nondot.org> emit:
t.c:4:9: error: invalid type 'short *' to __real operator
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)),
^
instead of:
t.c:4:9: error: invalid type 'short *' to __real or __imag operator
__tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)),
^

fixing a fixme. It would be even fancier to get the spelling of the token, but I
don't care *that* much :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
bf9a0e34c7c718081ffeafb79cd510341b2c2927 17-Feb-2009 Chris Lattner <sabre@nondot.org> add an accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
387616edf98739f4a0dd234c907e2b913e6a535d 17-Feb-2009 Chris Lattner <sabre@nondot.org> add an accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
34e6c266ddc055960bc0fcf584fd8ae6e2205ca3 17-Feb-2009 Chris Lattner <sabre@nondot.org> break down EmitCaretDiagnostic to use more primitive calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
b88af81958b4438a04175ea46d3b4c109ad4625e 17-Feb-2009 Chris Lattner <sabre@nondot.org> break down EmitCaretDiagnostic to use more primitive calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
c1303fb99a7b48bc87e6647a27d9fbc924060c57 17-Feb-2009 Chris Lattner <sabre@nondot.org> split caret diagnostic printing out into its own function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
94f55784145e7e3f1414b5368d715fa43ca3b273 17-Feb-2009 Chris Lattner <sabre@nondot.org> split caret diagnostic printing out into its own function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
4a52611fac19ce74b42ba052d332b67f11116cc2 17-Feb-2009 Chris Lattner <sabre@nondot.org> remove "; candidates are/is:" from various ambiguity diagnostics.
2 out of 2 people on irc prefer them gone :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
4330d65797e10618e39817ca59e8772671c3de59 17-Feb-2009 Chris Lattner <sabre@nondot.org> remove "; candidates are/is:" from various ambiguity diagnostics.
2 out of 2 people on irc prefer them gone :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
44b39837bbe5f6543afbe42245eff6957f4fe7c3 17-Feb-2009 Chris Lattner <sabre@nondot.org> fix notes so that they are always filtered with the same logic
as the last non-note diagnostic that preceeded them. This ensures
that diagnostics in main files which have notes with locations in
system headers get all the bits and pieces emitted or not in a
unit. This fixes PR3215.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
f5d2328fc849288c3a62e43d065685f516d57091 17-Feb-2009 Chris Lattner <sabre@nondot.org> fix notes so that they are always filtered with the same logic
as the last non-note diagnostic that preceeded them. This ensures
that diagnostics in main files which have notes with locations in
system headers get all the bits and pieces emitted or not in a
unit. This fixes PR3215.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
ad964b3c41f4fc5fb7e19a0ce28b200e137bab84 17-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Added ClassTemplateSpecializationDecl, which is a subclass of
CXXRecordDecl that is used to represent class template
specializations. These are canonical declarations that can refer to
either an actual class template specialization in the code, e.g.,

template<> class vector<bool> { };

or to a template instantiation. However, neither of these features is
actually implemented yet, so really we're just using (and uniqing) the
declarations to make sure that, e.g., A<int> is a different type from
A<float>. Note that we carefully distinguish between what the user
wrote in the source code (e.g., "A<FLOAT>") and the semantic entity it
represents (e.g., "A<float, int>"); the former is in the sugared Type,
the latter is an actual Decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/AST/Type.h
3e00bad490f1bae8a2c60f934e7eb5dbb9752c5d 17-Feb-2009 Douglas Gregor <dgregor@apple.com> Added ClassTemplateSpecializationDecl, which is a subclass of
CXXRecordDecl that is used to represent class template
specializations. These are canonical declarations that can refer to
either an actual class template specialization in the code, e.g.,

template<> class vector<bool> { };

or to a template instantiation. However, neither of these features is
actually implemented yet, so really we're just using (and uniqing) the
declarations to make sure that, e.g., A<int> is a different type from
A<float>. Note that we carefully distinguish between what the user
wrote in the source code (e.g., "A<FLOAT>") and the semantic entity it
represents (e.g., "A<float, int>"); the former is in the sugared Type,
the latter is an actual Decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/AST/Type.h
3ed413a52fa22c13b72a2be1986f0cfc2400274e 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Diagnose non-power-of-2 arguments to attribute aligned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
396b2a22788b0134018760d6a476de1e20f81334 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Diagnose non-power-of-2 arguments to attribute aligned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
fd46ea2d06cfd25a032c1202d129b8f86f740f66 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.

- Define pow[lf]?, sqrt[lf]? as builtins.

- Add -fmath-errno option which binds to LangOptions.MathErrno

- Add new builtin flag Builtin::Context::isConstWithoutErrno for
functions which can be marked as const if errno isn't respected for
math functions. Sema automatically marks these functions as const
when they are defined, if MathErrno=0.

- IRgen uses const attribute on sqrt and pow library functions to
decide if it can use the llvm intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/Basic/LangOptions.h
ef2abfee3ea16ec74942dc09e9e425f46aeb2582 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.

- Define pow[lf]?, sqrt[lf]? as builtins.

- Add -fmath-errno option which binds to LangOptions.MathErrno

- Add new builtin flag Builtin::Context::isConstWithoutErrno for
functions which can be marked as const if errno isn't respected for
math functions. Sema automatically marks these functions as const
when they are defined, if MathErrno=0.

- IRgen uses const attribute on sqrt and pow library functions to
decide if it can use the llvm intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/Basic/LangOptions.h
ae17c7aa7f431e4c797133f272d47bbd027a957d 16-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Make "implicit int" an error in C++ (unless we're allowing Microsoft
extensions). This caught a couple bugs in our test suite :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
4310f4ee260e6c7ceeaf299e240f4d789ecc730d 16-Feb-2009 Douglas Gregor <dgregor@apple.com> Make "implicit int" an error in C++ (unless we're allowing Microsoft
extensions). This caught a couple bugs in our test suite :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
8b23485d71cc505cd36e6e2dae6ca2c5ce4fefd4 16-Feb-2009 Ted Kremenek <kremenek@apple.com> Modify getMaxValue/getMinValue to take pointer values as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
4b441f057688cf0d3e6d74ac530ce3eb2d965c5e 16-Feb-2009 Ted Kremenek <kremenek@apple.com> Modify getMaxValue/getMinValue to take pointer values as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
98e7fcc0d68043d6f132afcdf4783682b30e42f2 16-Feb-2009 Chris Lattner <sabre@nondot.org> introduce and use a new ExtVectorElementExpr::isArrow method, at Eli's suggestion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2140e904dbe53657339cb5b1cc13de563ca0d1fc 16-Feb-2009 Chris Lattner <sabre@nondot.org> introduce and use a new ExtVectorElementExpr::isArrow method, at Eli's suggestion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7788ab913adcb97e8dff09fb21f35af504ff75e9 16-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: Add utility methods 'Add1' and 'Sub1' to get a persistent APSInt value that is 1 greater or 1 less than the provided value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
6175dc676c515a74e5f41afb4ac2b44cc2367a24 16-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: Add utility methods 'Add1' and 'Sub1' to get a persistent APSInt value that is 1 greater or 1 less than the provided value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64678 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
55815e6d3c3a7bdc7b61fb070af634d492ffd6bb 16-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: Add getMaxValue and getMinValue variants that take QualTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
0d3aeae8bf09fb9cdc536cfa5fefa983bd900dfc 16-Feb-2009 Ted Kremenek <kremenek@apple.com> BasicValueFactory: Add getMaxValue and getMinValue variants that take QualTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64677 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
2e8a7aa7c15274813f876f4b2ca6ce38382c56c4 16-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Supply the header corresponding to a library builtin as a separate argument to the LIBBUILTIN macro

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
b1152d842c6599e41581302a85a0f53928253add 16-Feb-2009 Douglas Gregor <dgregor@apple.com> Supply the header corresponding to a library builtin as a separate argument to the LIBBUILTIN macro

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
aab249137e72bacb5b489879e516c727af1d56c8 16-Feb-2009 Ted Kremenek <kremenek@apple.com> Add getSymbolManager() and getBasicVals() accessors to GRStateRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
f81895f963f0910c7df422709f7f1668eb9f7c4f 16-Feb-2009 Ted Kremenek <kremenek@apple.com> Add getSymbolManager() and getBasicVals() accessors to GRStateRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
09020eed49ea73a177a1ff116c2736065bb000de 16-Feb-2009 Chris Lattner <sabre@nondot.org> enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
73525de7fd9bdd534382dc89a24f1f76db3e04b9 16-Feb-2009 Chris Lattner <sabre@nondot.org> enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
beae78eb8dac8bc954e89d17f9c7fe55faba8981 16-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionally
the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a5afdd0ef9ff4a7a3f26145b6536a84dd340c897 16-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionally
the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e86e3e470060401ec4fe1ab984e4da6ae7adf003 16-Feb-2009 Chris Lattner <sabre@nondot.org> cleanup, add a getMethod() that takes a bool to indicate whether
the caller wants class or instance methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
53df12d1ba68dbd071d067f8236c16fba815aad5 16-Feb-2009 Chris Lattner <sabre@nondot.org> cleanup, add a getMethod() that takes a bool to indicate whether
the caller wants class or instance methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f119670d2ac5fb343b6adf4fdf2544e160f2f747 16-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> When a function with a prototype is redeclared without a prototype,
merge the prototype into the redeclaration (and make a note in the
declaration). Fixes PR3588.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6871981fbccba9e8a63997d58245ec0add114f49 16-Feb-2009 Douglas Gregor <dgregor@apple.com> When a function with a prototype is redeclared without a prototype,
merge the prototype into the redeclaration (and make a note in the
declaration). Fixes PR3588.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
083c23e9acbb8322201e8a318f0fe00823b5d181 16-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Adopt a more principled approach to invalid declarations:
- If a declaration is an invalid redeclaration of an existing name,
complain about the invalid redeclaration then avoid adding it to
the AST (we can still parse the definition or initializer, if any).
- If the declaration is invalid but there is no prior declaration
with that name, introduce the invalid declaration into the AST
(for later error recovery).
- If the declaration is an invalid redeclaration of a builtin that
starts with __builtin_, we produce an error and drop the
redeclaration. If it is an invalid redeclaration of a library
builtin (e.g., malloc, printf), warn (don't error!) and drop the
redeclaration.

If a user attempts to define a builtin, produce an error and (if it's
a library builtin like malloc) suggest -ffreestanding.

This addresses <rdar://problem/6097585> and PR2892. However, PR3588 is
still going to cause some problems when builtins are redeclared
without a prototype.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticSemaKinds.def
cda9c674998aedeb9319e95a0284f4d266dcef32 16-Feb-2009 Douglas Gregor <dgregor@apple.com> Adopt a more principled approach to invalid declarations:
- If a declaration is an invalid redeclaration of an existing name,
complain about the invalid redeclaration then avoid adding it to
the AST (we can still parse the definition or initializer, if any).
- If the declaration is invalid but there is no prior declaration
with that name, introduce the invalid declaration into the AST
(for later error recovery).
- If the declaration is an invalid redeclaration of a builtin that
starts with __builtin_, we produce an error and drop the
redeclaration. If it is an invalid redeclaration of a library
builtin (e.g., malloc, printf), warn (don't error!) and drop the
redeclaration.

If a user attempts to define a builtin, produce an error and (if it's
a library builtin like malloc) suggest -ffreestanding.

This addresses <rdar://problem/6097585> and PR2892. However, PR3588 is
still going to cause some problems when builtins are redeclared
without a prototype.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticSemaKinds.def
d948978fa2ffdc6b014447c17e10d8b88eca73cf 16-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> castToDeclContext/castFromDeclContext are only required to be included in the class of decls that directly derive from DeclContext.
Their subclasses don't need them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
005f6b222dfddc12ada571e479ff2d7a58114d07 16-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> castToDeclContext/castFromDeclContext are only required to be included in the class of decls that directly derive from DeclContext.
Their subclasses don't need them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64632 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
981aa13b401965bcfa5c0d052d07d15e379fd90d 16-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> DeclContext had its "casting machinery" inside the class definition so that if a new declaration context Decl appeared, the necessary changes
would be in one place. Since, now, only DeclNodes.def needs to be modified, move things out-of-line and simplify the DeclContext class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
3d7641e090cf113dec64306a1597d3e4523e2a55 16-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> DeclContext had its "casting machinery" inside the class definition so that if a new declaration context Decl appeared, the necessary changes
would be in one place. Since, now, only DeclNodes.def needs to be modified, move things out-of-line and simplify the DeclContext class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
2d9b76174a00679c24428d95893c993b445bb067 16-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Make DeclContexts maintenance a bit easier.

-In DeclNodes.def, only mark as DeclContexts the top classes that directly derive from DeclContext. If the Decl has subclasses,
it should be marked with DECL_CONTEXT_BASE.

-Use DeclNodes.def to automate the DeclContext::classof and DeclContext::CastTo definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
1ad4dd78ec53c24ea9e752b216035d7aa666fe49 16-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make DeclContexts maintenance a bit easier.

-In DeclNodes.def, only mark as DeclContexts the top classes that directly derive from DeclContext. If the Decl has subclasses,
it should be marked with DECL_CONTEXT_BASE.

-Use DeclNodes.def to automate the DeclContext::classof and DeclContext::CastTo definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
2cb744bafa562600ca2142a262a97a90febe4041 15-Feb-2009 Chris Lattner <sabre@nondot.org> Refactor the deprecated and unavailable checks into a new
DiagnoseUseOfDeprecatedDecl method. This ensures that they
are treated consistently. This gets us 'unavailable' support
on a few new types of decls, and makes sure we consistently
silence deprecated when the caller is also deprecated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
76a642ff4fce7a0648c79a1f01324a8c3880e251 15-Feb-2009 Chris Lattner <sabre@nondot.org> Refactor the deprecated and unavailable checks into a new
DiagnoseUseOfDeprecatedDecl method. This ensures that they
are treated consistently. This gets us 'unavailable' support
on a few new types of decls, and makes sure we consistently
silence deprecated when the caller is also deprecated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1f442bea60ffda36a2403fbbbd0fac33a5cbabf4 15-Feb-2009 Chris Lattner <sabre@nondot.org> don't pass a random english string in as a string argument to Diag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
7b4192c558268fd9007c671e72b4aa59d4f75daa 15-Feb-2009 Chris Lattner <sabre@nondot.org> don't pass a random english string in as a string argument to Diag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64608 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticParseKinds.def
46558bfca05fd9ff0e4aaddb23f51ca6e199524a 15-Feb-2009 Chris Lattner <sabre@nondot.org> add a new SourceManager::getInstantiationRange helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
6678133b8ce642f93e5141f056fa643112041ad0 15-Feb-2009 Chris Lattner <sabre@nondot.org> add a new SourceManager::getInstantiationRange helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
bc7a3cb00cca3dd84c1009ea74df12545747e99c 15-Feb-2009 Chris Lattner <sabre@nondot.org> track "just a little more" location information for macro instantiations.
Now instead of just tracking the expansion history, also track the full
range of the macro that got replaced. For object-like macros, this doesn't
change anything. For _Pragma and function-like macros, this means we track
the locations of the ')'.

This is required for PR3579 because apparently GCC uses the line of the ')'
of a function-like macro as the location to expand __LINE__ to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
e7fb48466afcbf2c4ccdfa658824282fdc3c512c 15-Feb-2009 Chris Lattner <sabre@nondot.org> track "just a little more" location information for macro instantiations.
Now instead of just tracking the expansion history, also track the full
range of the macro that got replaced. For object-like macros, this doesn't
change anything. For _Pragma and function-like macros, this means we track
the locations of the ')'.

This is required for PR3579 because apparently GCC uses the line of the ')'
of a function-like macro as the location to expand __LINE__ to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
91ca7f0bdda2f93b56a94f0f1cf9ac917bc06cd7 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add a test case for -ffreestanding that redefines malloc.

Warn that complex numbers are an extension in a freestanding C99
implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
f244cd7e54753caf6edb76df430dea2f43bb82a8 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Add a test case for -ffreestanding that redefines malloc.

Warn that complex numbers are an extension in a freestanding C99
implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
23d232614940858972080d808959f0645318f74e 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add -ffreestanding to suppress the implicit declaration of library builtins like printf and malloc. Fixes PR3586

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/Basic/LangOptions.h
3573c0c0b44a1ac8f76a00af1bc75e94ca03d704 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Add -ffreestanding to suppress the implicit declaration of library builtins like printf and malloc. Fixes PR3586

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/Basic/LangOptions.h
27ecc6736fbd9a91a710a40719d68934370a700f 14-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a problem caused by foreward @class use
which consequently caused a Seg fault. during meta-data
generation. It also addresses an issue related to
late binding of newly synthesize ivars (when we support it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f3710babc1ba40779c0fc64e6657cfc84dee7545 14-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a problem caused by foreward @class use
which consequently caused a Seg fault. during meta-data
generation. It also addresses an issue related to
late binding of newly synthesize ivars (when we support it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b5af738b7338a799a7885b1fe2eebdba858b96cb 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add hook to add attributes to function declarations that we know
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf, and to translate builtin attributes (from Builtins.def)
into actual attributes on the function declaration.

Use the "printf" format attribute on function declarations to
determine whether we should do format string checking, rather than
looking at an ad hoc list of builtins and "known" function names.

Be a bit more careful about when we consider a function a "builtin" in
C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
lang/AST/Expr.h
3c385e5f8d9008fff18597ca302be19fa86e51f6 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Add hook to add attributes to function declarations that we know
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf, and to translate builtin attributes (from Builtins.def)
into actual attributes on the function declaration.

Use the "printf" format attribute on function declarations to
determine whether we should do format string checking, rather than
looking at an ad hoc list of builtins and "known" function names.

Be a bit more careful about when we consider a function a "builtin" in
C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
lang/AST/Expr.h
b42900d8e7cb447efb9cb7e275a251f2fd345dac 14-Feb-2009 Anders Carlsson <andersca@mac.com> Pass the location of the start of the selector to ActOnClassMessage/ActOnInstanceMessage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ff975cfab9ada27df86038286d1678084aeb3428 14-Feb-2009 Anders Carlsson <andersca@mac.com> Pass the location of the start of the selector to ActOnClassMessage/ActOnInstanceMessage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
dd98483d9b12fbe8d8847f019f5b2efef3bcd4f2 14-Feb-2009 Ted Kremenek <kremenek@apple.com> Patch by Ben Laurie:

ConstraintManager:
- constify getSymVal()

BasicConstraintManager:
- Pull out logic that would be common to ConstraintManagers of a similar nature
and put them in a parent class called 'SimpleConstraintManager'.

RangeConstraintManager:
- Added a new prototype ConstraintManager to track ranges of variables! This
ConstraintManager keeps tracks of ranges of concrete integers that a symbolic
integer may have.

AnalysisConsumer:
- Add driver option to use RangeConstraintManager with GRExprEngine-based
analyses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
4502195fecf399fdbbb9ee2393ad08148c394179 14-Feb-2009 Ted Kremenek <kremenek@apple.com> Patch by Ben Laurie:

ConstraintManager:
- constify getSymVal()

BasicConstraintManager:
- Pull out logic that would be common to ConstraintManagers of a similar nature
and put them in a parent class called 'SimpleConstraintManager'.

RangeConstraintManager:
- Added a new prototype ConstraintManager to track ranges of variables! This
ConstraintManager keeps tracks of ranges of concrete integers that a symbolic
integer may have.

AnalysisConsumer:
- Add driver option to use RangeConstraintManager with GRExprEngine-based
analyses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
c47ed4ab909515b4ba1d3630b8327e8d98743b4a 14-Feb-2009 Cédric Venet <cedric.venet@laposte.net> Fix the build on win32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/SourceManager.h
ea684e699ea84e61711e279f5fa7a1b9f3d46bc2 14-Feb-2009 Cedric Venet <cedric.venet@laposte.net> Fix the build on win32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/SourceManager.h
a9b9846bc55c2ec1f776a553f6e20e588acdebcc 14-Feb-2009 Chris Lattner <sabre@nondot.org> add parser and type checking support for attribute((objc_exception)).
We don't have "zero cost" exceptions for ObjC yet, so there is no codegen
support required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
0db29ece81d360dcefbe912339c34abe5917f6a9 14-Feb-2009 Chris Lattner <sabre@nondot.org> add parser and type checking support for attribute((objc_exception)).
We don't have "zero cost" exceptions for ObjC yet, so there is no codegen
support required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64546 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
d2c6655c7ca33f6985a6b73db0ad7c65d1cf5fae 14-Feb-2009 Chris Lattner <sabre@nondot.org> Several related changes:
1) implement parser and sema support for reading and verifying attribute(warnunusedresult).
2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense
of its result.
3) extend isUnusedResultAWarning to directly return the loc and range
info that should be reported to the user. Make it substantially more
precise in some cases than what was previously reported.
4) teach isUnusedResultAWarning about CallExpr to decls that are
pure/const/warnunusedresult, fixing a fixme.
5) change warn_attribute_wrong_decl_type to not pass in english strings, instead,
pass in integers and use %select.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.def
026dc96ac6ece60da5e1b98e2a71bd0ff0939fd8 14-Feb-2009 Chris Lattner <sabre@nondot.org> Several related changes:
1) implement parser and sema support for reading and verifying attribute(warnunusedresult).
2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense
of its result.
3) extend isUnusedResultAWarning to directly return the loc and range
info that should be reported to the user. Make it substantially more
precise in some cases than what was previously reported.
4) teach isUnusedResultAWarning about CallExpr to decls that are
pure/const/warnunusedresult, fixing a fixme.
5) change warn_attribute_wrong_decl_type to not pass in english strings, instead,
pass in integers and use %select.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Basic/DiagnosticSemaKinds.def
a9aa1204965584023840f9e77a4a4da94b1bae2e 14-Feb-2009 Anders Carlsson <andersca@mac.com> Don't ignore the const attribute - we even have CG support for that. Do ignore the malloc attribute however.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
c41ec23d9f8ef80b8c62df978013c22dcdcbdbe3 14-Feb-2009 Anders Carlsson <andersca@mac.com> Don't ignore the const attribute - we even have CG support for that. Do ignore the malloc attribute however.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
2ddb4b27313b8a0b9b0ad011667e23e556cbabb5 14-Feb-2009 Ted Kremenek <kremenek@apple.com> Added GRStateManager::scanReachableSymbols(), a method which scans the reachable
symbols from an SVal.

- Fixed a bug in EnvironmentManager::RemoveDeadBindings() where it did not mark
live all the symbols reachable from a live block-level expression.

- Fixed a bug in the retain/release checker where it did not stop tracking
symbols that 'escaped' via compound literals being assigned to something the
BasicStoreManager didn't reason about.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SymbolManager.h
5216ad7e095873f19e535ad1efba91973f05d8e8 14-Feb-2009 Ted Kremenek <kremenek@apple.com> Added GRStateManager::scanReachableSymbols(), a method which scans the reachable
symbols from an SVal.

- Fixed a bug in EnvironmentManager::RemoveDeadBindings() where it did not mark
live all the symbols reachable from a live block-level expression.

- Fixed a bug in the retain/release checker where it did not stop tracking
symbols that 'escaped' via compound literals being assigned to something the
BasicStoreManager didn't reason about.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SymbolManager.h
1fa246d43b7a24a18ac4f37e83b962277e6ebbb3 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Make it possible for builtins to expression FILE* arguments, so that
we can define builtins such as fprintf, vfprintf, and
__builtin___fprintf_chk. Give a nice error message when we need to
implicitly declare a function like fprintf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/Basic/DiagnosticSemaKinds.def
370ab3f1373841d70582feac9e35c3c6b3489f63 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Make it possible for builtins to expression FILE* arguments, so that
we can define builtins such as fprintf, vfprintf, and
__builtin___fprintf_chk. Give a nice error message when we need to
implicitly declare a function like fprintf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/Basic/DiagnosticSemaKinds.def
a42be30ac6ecacc33d63ca16c3bb6d50f4bd818c 14-Feb-2009 Ted Kremenek <kremenek@apple.com> Static analyzer:
- Added a new 'node builder' class called GRStmtNodeBuilderRef (name may
change). This is essentially a smart reference to a GRStmtNodeBuilder object
that keeps track of the current context (predecessor node, GRExprEngine
object, etc.) The idea is to gradually simplify the interface between
GRExprEngine and GRTransferFuncs using this new builder (i.e., passing 1
argument instead of 5). It also handles some of the "auto-transition" for node
creation, simplifying some of the logic in GRExprEngine itself.

- Used GRStmtBuilderRef to replace GRTransferFuncs::EvalStore with
GRTransferFuncs::EvalBind. The new EvalBind method will be used at any
arbitrary places where a binding between a location and value takes place.
Moreover, GRTransferFuncs no longer has the responsibility to request
StoreManager to do the binding; this is now in GRExprEngine::EvalBind. All
GRTransferFuncs::EvalBind does is checker-specific logic (which can be a
no-op).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
41573ebf8fb971f40fa8a3e20648362c359b4916 14-Feb-2009 Ted Kremenek <kremenek@apple.com> Static analyzer:
- Added a new 'node builder' class called GRStmtNodeBuilderRef (name may
change). This is essentially a smart reference to a GRStmtNodeBuilder object
that keeps track of the current context (predecessor node, GRExprEngine
object, etc.) The idea is to gradually simplify the interface between
GRExprEngine and GRTransferFuncs using this new builder (i.e., passing 1
argument instead of 5). It also handles some of the "auto-transition" for node
creation, simplifying some of the logic in GRExprEngine itself.

- Used GRStmtBuilderRef to replace GRTransferFuncs::EvalStore with
GRTransferFuncs::EvalBind. The new EvalBind method will be used at any
arbitrary places where a binding between a location and value takes place.
Moreover, GRTransferFuncs no longer has the responsibility to request
StoreManager to do the binding; this is now in GRExprEngine::EvalBind. All
GRTransferFuncs::EvalBind does is checker-specific logic (which can be a
no-op).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRExprEngineBuilders.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
17429039570353adb36354bd873240d037f09343 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Extend builtin "attribute" syntax to include a notation for
printf-like functions, both builtin functions and those in the
C library. The function-call checker now queries this attribute do
determine if we have a printf-like function, rather than scanning
through the list of "known functions IDs". However, there are 5
functions they are not yet "builtins", so the function-call checker
handles them specifically still:

- fprintf and vfprintf: the builtins mechanism cannot (yet)
express FILE* arguments, so these can't be encoded.
- NSLog: the builtins mechanism cannot (yet) express NSString*
arguments, so this (and NSLogv) can't be encoded.
- asprintf and vasprintf: these aren't part of the C99 standard
library, so we really shouldn't be defining them as builtins in
the general case (and we don't seem to have the machinery to make
them builtins only on certain targets and depending on whether
extensions are enabled).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
a316e7b735b12ce6b34961a9dcfaae34f4b08d29 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Extend builtin "attribute" syntax to include a notation for
printf-like functions, both builtin functions and those in the
C library. The function-call checker now queries this attribute do
determine if we have a printf-like function, rather than scanning
through the list of "known functions IDs". However, there are 5
functions they are not yet "builtins", so the function-call checker
handles them specifically still:

- fprintf and vfprintf: the builtins mechanism cannot (yet)
express FILE* arguments, so these can't be encoded.
- NSLog: the builtins mechanism cannot (yet) express NSString*
arguments, so this (and NSLogv) can't be encoded.
- asprintf and vasprintf: these aren't part of the C99 standard
library, so we really shouldn't be defining them as builtins in
the general case (and we don't seem to have the machinery to make
them builtins only on certain targets and depending on whether
extensions are enabled).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
411889e15e0335f6951d2410c5bd67839c4fff66 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implicitly declare certain C library functions (malloc, strcpy, memmove,
etc.) when we perform name lookup on them. This ensures that we
produce the correct signature for these functions, which has two
practical impacts:

1) When we're supporting the "implicit function declaration" feature
of C99, these functions will be implicitly declared with the right
signature rather than as a function returning "int" with no
prototype. See PR3541 for the reason why this is important (hint:
GCC always predeclares these functions).

2) If users attempt to redeclare one of these library functions with
an incompatible signature, we produce a hard error.

This patch does a little bit of work to give reasonable error
messages. For example, when we hit case #1 we complain that we're
implicitly declaring this function with a specific signature, and then
we give a note that asks the user to include the appropriate header
(e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
case #2, we show the type of the implicit builtin that was incorrectly
declared, so the user can see the problem. We could do better here:
for example, when displaying this latter error message we say
something like:

'strcpy' was implicitly declared here with type 'char *(char *, char
const *)'

but we should really print out a fake code line showing the
declaration, like this:

'strcpy' was implicitly declared here as:

char *strcpy(char *, char const *)

This would also be good for printing built-in candidates with C++
operator overloading.

The set of C library functions supported by this patch includes all
functions from the C99 specification's <stdlib.h> and <string.h> that
(a) are predefined by GCC and (b) have signatures that could cause
codegen issues if they are treated as functions with no prototype
returning and int. Future work could extend this set of functions to
other C library functions that we know about.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
3e41d60eb627dc227c770f1c1c87d06909cf05fd 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Implicitly declare certain C library functions (malloc, strcpy, memmove,
etc.) when we perform name lookup on them. This ensures that we
produce the correct signature for these functions, which has two
practical impacts:

1) When we're supporting the "implicit function declaration" feature
of C99, these functions will be implicitly declared with the right
signature rather than as a function returning "int" with no
prototype. See PR3541 for the reason why this is important (hint:
GCC always predeclares these functions).

2) If users attempt to redeclare one of these library functions with
an incompatible signature, we produce a hard error.

This patch does a little bit of work to give reasonable error
messages. For example, when we hit case #1 we complain that we're
implicitly declaring this function with a specific signature, and then
we give a note that asks the user to include the appropriate header
(e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
case #2, we show the type of the implicit builtin that was incorrectly
declared, so the user can see the problem. We could do better here:
for example, when displaying this latter error message we say
something like:

'strcpy' was implicitly declared here with type 'char *(char *, char
const *)'

but we should really print out a fake code line showing the
declaration, like this:

'strcpy' was implicitly declared here as:

char *strcpy(char *, char const *)

This would also be good for printing built-in candidates with C++
operator overloading.

The set of C library functions supported by this patch includes all
functions from the C99 specification's <stdlib.h> and <string.h> that
(a) are predefined by GCC and (b) have signatures that could cause
codegen issues if they are treated as functions with no prototype
returning and int. Future work could extend this set of functions to
other C library functions that we know about.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/Decl.h
lang/Basic/DiagnosticSemaKinds.def
cfd596f9bb31b5325354d7a453455c299a619e06 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add VarDecl::hasExternalStorage (no functionality change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1dd467a111794453e4d97af9907cb29ea72c44e5 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add VarDecl::hasExternalStorage (no functionality change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d9ef724225b3f0edf54a76aae0eda4f5447d5eeb 13-Feb-2009 Chris Lattner <sabre@nondot.org> Give TargetInfo a new IntPtrType to hold the intptr_t type for
a target.

Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this.

On linux/32, set intptr_t to int, instead of long. This fixes PR3563.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
6ad474f82f0cf32e13128d89fa5ad3a37ae73530 13-Feb-2009 Chris Lattner <sabre@nondot.org> Give TargetInfo a new IntPtrType to hold the intptr_t type for
a target.

Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this.

On linux/32, set intptr_t to int, instead of long. This fixes PR3563.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
61e2a2a705ee13282449227c34448c28fe7ac7a8 13-Feb-2009 Chris Lattner <sabre@nondot.org> improve wording in a diagnostic to make it clear that we never intend to support
the vla-in-structure extension that GCC does. PR3562
Also wrap some long lines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
ab0517e6e50f0c01f6acf47954c1d0fa893e0da1 13-Feb-2009 Chris Lattner <sabre@nondot.org> improve wording in a diagnostic to make it clear that we never intend to support
the vla-in-structure extension that GCC does. PR3562
Also wrap some long lines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
b88b4f7a2b97817fe9937dcf1226ca1f5796ecaf 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Sema/AST support for attribute used. Patch by Anders Johnson (with small tweaks & test case)!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
b805dad4aa386aeae0f72512895bd238678d37a5 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Sema/AST support for attribute used. Patch by Anders Johnson (with small tweaks & test case)!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
792b2c4243f1fa4b35a303c925356974ee730d89 13-Feb-2009 Ted Kremenek <kremenek@apple.com> Add some boilerplate to the PTH file to prepare for the caching of stats for directories (and negative stats too).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
a4b44dd9d30929a35c44d85102e5241ee847b2f2 13-Feb-2009 Ted Kremenek <kremenek@apple.com> Add some boilerplate to the PTH file to prepare for the caching of stats for directories (and negative stats too).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
fb0cac21679fcc724c2c0c1f67fe4deed77e3639 13-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Remove DeclGroupOwningRef, since we intend for declarations to be owned
by DeclContexts (always) rather than by statements.

DeclContext currently goes out of its way to avoid destroying any
Decls that might be owned by a DeclGroupOwningRef. However, in an
error-recovery situation, a failure in a declaration statement can
cause all of the decls in a DeclGroupOwningRef to be destroyed after
they've already be added into the DeclContext. Hence, DeclContext is
left with already-destroyed declarations, and bad things happen. This
problem was causing failures that showed up as assertions on x86 Linux
in test/Parser/objc-forcollection-neg-2.m.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/Stmt.h
9653db7bd0e3665b955a0445859285f2e1e7dacd 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Remove DeclGroupOwningRef, since we intend for declarations to be owned
by DeclContexts (always) rather than by statements.

DeclContext currently goes out of its way to avoid destroying any
Decls that might be owned by a DeclGroupOwningRef. However, in an
error-recovery situation, a failure in a declaration statement can
cause all of the decls in a DeclGroupOwningRef to be destroyed after
they've already be added into the DeclContext. Hence, DeclContext is
left with already-destroyed declarations, and bad things happen. This
problem was causing failures that showed up as assertions on x86 Linux
in test/Parser/objc-forcollection-neg-2.m.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
lang/AST/Stmt.h
4c1fac8c5fa4b894589e285efd5fe6c739c18264 13-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Fix capitalization in a diagnostic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
c1ced28c0262698de9877afa74589038c7aad0df 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Fix capitalization in a diagnostic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
402735d4fb6e296334ba1e0a448fd786374db9ce 13-Feb-2009 Anders Carlsson <andersca@mac.com> Add a new Ignored attribute type, and use it for may_alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
05f8e471aae971c9867dbac148eba1275a570814 13-Feb-2009 Anders Carlsson <andersca@mac.com> Add a new Ignored attribute type, and use it for may_alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
f607f531905e9df9f6907cd81fe97a96fb7956c5 13-Feb-2009 Anders Carlsson <andersca@mac.com> Add sema support for the nodebug attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
d87df37e0adaba0d5e33da7b1a14d7f1d94c5eef 13-Feb-2009 Anders Carlsson <andersca@mac.com> Add sema support for the nodebug attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
ff3fcdf47370a4577d971a2adefd259807152078 13-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Initial implementation of arbitrary fixed-width integer types.
Currently only used for 128-bit integers.

Note that we can't use the fixed-width integer types for other integer
modes without other changes because glibc headers redefines (u)int*_t
and friends using the mode attribute. For example, this means that uint64_t
has to be compatible with unsigned __attribute((mode(DI))), and
uint64_t is currently defined to long long. And I have a feeling we'll
run into issues if we try to define uint64_t as something which isn't
either long or long long.

This doesn't get the alignment right in most cases, including
the 128-bit integer case; I'll file a PR shortly. The gist of the issue
is that the targets don't really expose the information necessary to
figure out the alignment outside of the target description, so there's a
non-trivial amount of work involved in getting it working right. That
said, the alignment used is conservative, so the only issue with the
current implementation is ABI compatibility.

This makes it trivial to add some sort of "bitwidth" attribute to make
arbitrary-width integers; I'll do that in a followup.

We could also use this for stuff like the following for compatibility
with gcc, but I have a feeling it would be a better idea for clang to be
consistent between C and C++ modes rather than follow gcc's example for
C mode.
struct {unsigned long long x : 33;} x;
unsigned long long a(void) {return x.x+1;}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
f98aba35e6c3da5aae61843fc01334939e4e12ec 13-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Initial implementation of arbitrary fixed-width integer types.
Currently only used for 128-bit integers.

Note that we can't use the fixed-width integer types for other integer
modes without other changes because glibc headers redefines (u)int*_t
and friends using the mode attribute. For example, this means that uint64_t
has to be compatible with unsigned __attribute((mode(DI))), and
uint64_t is currently defined to long long. And I have a feeling we'll
run into issues if we try to define uint64_t as something which isn't
either long or long long.

This doesn't get the alignment right in most cases, including
the 128-bit integer case; I'll file a PR shortly. The gist of the issue
is that the targets don't really expose the information necessary to
figure out the alignment outside of the target description, so there's a
non-trivial amount of work involved in getting it working right. That
said, the alignment used is conservative, so the only issue with the
current implementation is ABI compatibility.

This makes it trivial to add some sort of "bitwidth" attribute to make
arbitrary-width integers; I'll do that in a followup.

We could also use this for stuff like the following for compatibility
with gcc, but I have a feeling it would be a better idea for clang to be
consistent between C and C++ modes rather than follow gcc's example for
C mode.
struct {unsigned long long x : 33;} x;
unsigned long long a(void) {return x.x+1;}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
e66ba680dc0cff6648b52cceb6f402cf8d01b20b 13-Feb-2009 Ted Kremenek <kremenek@apple.com> GRExprEngine:
- Add 'EvalBind', which will be used by 'EvalStore' to pull much of the value binding logic out of GRTransferFuncs.
- Rename many cases of 'St' to 'state'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
a8538d902fce9cfec20f39b34492268b51643819 13-Feb-2009 Ted Kremenek <kremenek@apple.com> GRExprEngine:
- Add 'EvalBind', which will be used by 'EvalStore' to pull much of the value binding logic out of GRTransferFuncs.
- Rename many cases of 'St' to 'state'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
0eb7cd8d46dd144b6e3d9fdaa02997967f0ad585 13-Feb-2009 Chris Lattner <sabre@nondot.org> factor token concatenation avoidance logic out of
PrintPreprocessedOutput into its own file. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenConcatenation.h
d7038e18ef540a78fe6ce2a43125ce9b08fdbbc5 13-Feb-2009 Chris Lattner <sabre@nondot.org> factor token concatenation avoidance logic out of
PrintPreprocessedOutput into its own file. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenConcatenation.h
fa3a832f26a79b56599f9d304c2d9ac8bbdff86a 13-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Tighten checking of the "overloadable" attribute. If any function by a
given name in a given scope is marked as "overloadable", every
function declaration and definition with that same name and in that
same scope needs to have the "overloadable" attribute. Essentially,
the "overloadable" attribute is not part of attribute merging, so it
must be specified even for redeclarations. This keeps users from
trying to be too sneaky for their own good:

double sin(double) __attribute__((overloadable)); // too sneaky
#include <math.h>

Previously, this would have made "sin" overloadable, and therefore
given it a mangled name. Now, we get an error inside math.h when we
see a (re)declaration of "sin" that doesn't have the "overloadable"
attribute.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
ae17094c001972a5949944a0a77ef6adf2a92c8f 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Tighten checking of the "overloadable" attribute. If any function by a
given name in a given scope is marked as "overloadable", every
function declaration and definition with that same name and in that
same scope needs to have the "overloadable" attribute. Essentially,
the "overloadable" attribute is not part of attribute merging, so it
must be specified even for redeclarations. This keeps users from
trying to be too sneaky for their own good:

double sin(double) __attribute__((overloadable)); // too sneaky
#include <math.h>

Previously, this would have made "sin" overloadable, and therefore
given it a mangled name. Now, we get an error inside math.h when we
see a (re)declaration of "sin" that doesn't have the "overloadable"
attribute.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
3556bc72a4c38332a94becb05a4e8ff1f9917ef9 13-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add basic support for C++ name mangling according to the Itanium C++
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.

At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
5f2bfd4811996abb783aa6c7254c56baa6930e8c 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Add basic support for C++ name mangling according to the Itanium C++
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.

At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1f1cd39d71dadad454d96ec5eafb9b7450c832e4 12-Feb-2009 Anders Carlsson <andersca@mac.com> Add a very basic implemenation of global blocks. This needs to be cleaned up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d5cab5435371b8cc74a9e05ebd40b5995ebad149 12-Feb-2009 Anders Carlsson <andersca@mac.com> Add a very basic implemenation of global blocks. This needs to be cleaned up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
17c0382b4b42417de088ae2ce467aa74b16fca65 12-Feb-2009 Steve Naroff <snaroff@apple.com> Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
389bf46ae41241a656ed71b00ac2177d7f385651 12-Feb-2009 Steve Naroff <snaroff@apple.com> Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9750972322487f439c511244b303ad3e849b193d 12-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support __attribute__(section(<name>))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
17f194f4393a67fd28ad822c06d32b8cb99bad3f 12-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support __attribute__(section(<name>))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
9a8739a03fe76229de9a460f2512fffb4e53f0a9 12-Feb-2009 Steve Naroff <snaroff@apple.com> Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
3dcfe10a6801eb52f4c20f1242bea0a3a98aa146 12-Feb-2009 Steve Naroff <snaroff@apple.com> Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
40003a7c7f5127b74a45c93e5dedb7228c6f2bf4 12-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Cache stat information for files in the PTH file. Hook up FileManager
to use this stat information in the PTH file using a 'StatSysCallCache' object.

Performance impact (Cocoa.h, PTH):
- number of stat calls reduces from 1230 to 425
- fsyntax-only: time improves by 4.2%

We can reduce the number of stat calls to almost zero by caching negative stat
calls and directory stat calls in the PTH file as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
337edcdbec05316b407d0d64865c88ff8597d910 12-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Cache stat information for files in the PTH file. Hook up FileManager
to use this stat information in the PTH file using a 'StatSysCallCache' object.

Performance impact (Cocoa.h, PTH):
- number of stat calls reduces from 1230 to 425
- fsyntax-only: time improves by 4.2%

We can reduce the number of stat calls to almost zero by caching negative stat
calls and directory stat calls in the PTH file as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
358123c2e3098540c8c9b124a70a82785ffaf0e7 12-Feb-2009 Ted Kremenek <kremenek@apple.com> FileManager:
- set the 'StatSysCallCache' object using a setter method instead of
FileManager's constructor. This allows the cache to be installed after the
FileManager object is created.
- Add 'file mode' to FileEntry (useful for stat caching)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
96438f319bb07d9a40564b5e01333f82c0c8a61e 12-Feb-2009 Ted Kremenek <kremenek@apple.com> FileManager:
- set the 'StatSysCallCache' object using a setter method instead of
FileManager's constructor. This allows the cache to be installed after the
FileManager object is created.
- Add 'file mode' to FileEntry (useful for stat caching)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64351 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
5830b773c03657c0a53f68dee9ea8985b884aa4d 12-Feb-2009 Ted Kremenek <kremenek@apple.com> Add lightweight shim "clang::StatSysCallCache" that caches 'stat' system calls
for use by FileManager. FileManager now takes a StatSysCallCache* in its
constructor (which defaults to NULL). This will be used for evaluating whether
or not caching 'stat' system calls in PTH is a performance win. This shim adds
no observable performance impact in the case where the 'StatSysCallCache*' is
null.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
fc7052d4a241ee6fc70afea7c1c9560147f0a49c 12-Feb-2009 Ted Kremenek <kremenek@apple.com> Add lightweight shim "clang::StatSysCallCache" that caches 'stat' system calls
for use by FileManager. FileManager now takes a StatSysCallCache* in its
constructor (which defaults to NULL). This will be used for evaluating whether
or not caching 'stat' system calls in PTH is a performance win. This shim adds
no observable performance impact in the case where the 'StatSysCallCache*' is
null.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
be3f078bcca50d4266c4d6f645594c3eb4aefef4 12-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Have meta data be at the beginning of the PTH file, not the end.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
a4bd8eb4d6d4b625f6bbb62fc180b02eab6433ed 12-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Have meta data be at the beginning of the PTH file, not the end.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64338 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
fcb1919cf2625e2fd209dabd7bba8b06fff94821 12-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Initial implementation of function overloading in C.

This commit adds a new attribute, "overloadable", that enables C++
function overloading in C. The attribute can only be added to function
declarations, e.g.,

int *f(int) __attribute__((overloadable));

If the "overloadable" attribute exists on a function with a given
name, *all* functions with that name (and in that scope) must have the
"overloadable" attribute. Sets of overloaded functions with the
"overloadable" attribute then follow the normal C++ rules for
overloaded functions, e.g., overloads must have different
parameter-type-lists from each other.

When calling an overloaded function in C, we follow the same
overloading rules as C++, with three extensions to the set of standard
conversions:

- A value of a given struct or union type T can be converted to the
type T. This is just the identity conversion. (In C++, this would
go through a copy constructor).
- A value of pointer type T* can be converted to a value of type U*
if T and U are compatible types. This conversion has Conversion
rank (it's considered a pointer conversion in C).
- A value of type T can be converted to a value of type U if T and U
are compatible (and are not both pointer types). This conversion
has Conversion rank (it's considered to be a new kind of
conversion unique to C, a "compatible" conversion).

Known defects (and, therefore, next steps):
1) The standard-conversion handling does not understand conversions
involving _Complex or vector extensions, so it is likely to get
these wrong. We need to add these conversions.
2) All overloadable functions with the same name will have the same
linkage name, which means we'll get a collision in the linker (if
not sooner). We'll need to mangle the names of these functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
f9201e0ff1779567150b70856753d9f2c6a91467 12-Feb-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of function overloading in C.

This commit adds a new attribute, "overloadable", that enables C++
function overloading in C. The attribute can only be added to function
declarations, e.g.,

int *f(int) __attribute__((overloadable));

If the "overloadable" attribute exists on a function with a given
name, *all* functions with that name (and in that scope) must have the
"overloadable" attribute. Sets of overloaded functions with the
"overloadable" attribute then follow the normal C++ rules for
overloaded functions, e.g., overloads must have different
parameter-type-lists from each other.

When calling an overloaded function in C, we follow the same
overloading rules as C++, with three extensions to the set of standard
conversions:

- A value of a given struct or union type T can be converted to the
type T. This is just the identity conversion. (In C++, this would
go through a copy constructor).
- A value of pointer type T* can be converted to a value of type U*
if T and U are compatible types. This conversion has Conversion
rank (it's considered a pointer conversion in C).
- A value of type T can be converted to a value of type U if T and U
are compatible (and are not both pointer types). This conversion
has Conversion rank (it's considered to be a new kind of
conversion unique to C, a "compatible" conversion).

Known defects (and, therefore, next steps):
1) The standard-conversion handling does not understand conversions
involving _Complex or vector extensions, so it is likely to get
these wrong. We need to add these conversions.
2) All overloadable functions with the same name will have the same
linkage name, which means we'll get a collision in the linker (if
not sooner). We'll need to mangle the names of these functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64336 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
9f18e4da493c56c9e5b0da2a61c9edec646bcae5 11-Feb-2009 Steve Naroff <snaroff@apple.com> Remove some non-ascii characters. Thanks Gabor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
fea2511665fcadc7f6c6d87b4f2ab9d3d5e2d308 11-Feb-2009 Steve Naroff <snaroff@apple.com> Remove some non-ascii characters. Thanks Gabor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
bd5374bac28411e380b71fccc9efc6c4f7b1870a 11-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Replace string identifier to persistent ID lookup with a hashtable. This is
actually *slightly* slower than the binary search. Since this is algorithmically
better, further performance tuning should be able to make this faster.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/PTHManager.h
7e3a004c6ed1fe87912203b9c5a113f8da89d261 11-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Replace string identifier to persistent ID lookup with a hashtable. This is
actually *slightly* slower than the binary search. Since this is algorithmically
better, further performance tuning should be able to make this faster.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/PTHManager.h
590fe48c82027cd363976db2eec0c797a052ee41 11-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
lang/Parse/Scope.h
e21dd6ffef4585fa43cd3586ed971217d65bf56c 11-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
lang/Parse/Scope.h
6b3a0baf1fc45cd404d99a297de38c2945d4f37e 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Finished semantic analysis of non-type template arguments, to check
for non-external names whose address becomes the template
argument. This completes C++ [temp.arg.nontype]p1.

Note that our interpretation of C++ [temp.arg.nontype]p1b3 differs
from EDG's interpretation (we're stricter, and GCC agrees with
us). They're opening a core issue about the matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
cc45cb3630b42c5245e26593e385097c220bc859 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Finished semantic analysis of non-type template arguments, to check
for non-external names whose address becomes the template
argument. This completes C++ [temp.arg.nontype]p1.

Note that our interpretation of C++ [temp.arg.nontype]p1b3 differs
from EDG's interpretation (we're stricter, and GCC agrees with
us). They're opening a core issue about the matter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
0ea4e306c61cdf9896f4c943ae44241659bbc0a3 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Reverted r64307. Moved hasSameType and hasSameUnqualifiedType from
Sema to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
8e6563ba097732dc1fffcfc85f8dbbceac899a80 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Reverted r64307. Moved hasSameType and hasSameUnqualifiedType from
Sema to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c347d8e05699f9d50ce23c16487c99f9a049fd41 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Allow the use of default template arguments when forming a class
template specialization (e.g., std::vector<int> would now be
well-formed, since it relies on a default argument for the Allocator
template parameter).

This is much less interesting than one might expect, since (1) we're
not actually using the default arguments for anything important, such
as naming an actual Decl, and (2) we'll often need to instantiate the
default arguments to check their well-formedness. The real fun will
come later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
62cb18dd11472965e03374d40bc27d650bc331b6 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Allow the use of default template arguments when forming a class
template specialization (e.g., std::vector<int> would now be
well-formed, since it relies on a default argument for the Allocator
template parameter).

This is much less interesting than one might expect, since (1) we're
not actually using the default arguments for anything important, such
as naming an actual Decl, and (2) we'll often need to instantiate the
default arguments to check their well-formedness. The real fun will
come later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
677f401a7e4ef827e24152d8a7423644f8c17dab 11-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6206858> [sema] type check @throw statements.

Added a FIXME to handle 'rethrow' check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
7151bbb55c8a437073e42f74348c3fd5f1d5b410 11-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6206858> [sema] type check @throw statements.

Added a FIXME to handle 'rethrow' check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
29b3d302e726e76bf5368bd1261509191ea0bdc4 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Rename Sema::hasSameType to QualType::isSameAs
Rename Sema::hasSameUnqualifiedType to QualType::isSameIgnoringQalifiers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
26a0bdb810681e2514b9ddc2d9779ce6c9a79409 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Rename Sema::hasSameType to QualType::isSameAs
Rename Sema::hasSameUnqualifiedType to QualType::isSameIgnoringQalifiers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c4a1cf66cafa2d01c566d44f1ed418c24641870e 11-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data is
referenced by other tables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
f1de4649e917f891d24e0718d02ee904b9edbe9d 11-Feb-2009 Ted Kremenek <kremenek@apple.com> PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data is
referenced by other tables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
e3c19c3cce2d8bdbbb174eff1f887e80b964a18e 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> CHAR_BIT == 8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
dedb84afce2cf2e52a6360e200c2c40822022235 11-Feb-2009 Douglas Gregor <dgregor@apple.com> CHAR_BIT == 8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d8c8c0991a09d7d1697b44b0342a48701bfd054c 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Semantic checking for template arguments that correspond to non-type
template parameters that have reference type. Effectively, we're doing
a very limited form of reference binding here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
f684e6e793a336f52138a2609b207e6eef3c3022 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Semantic checking for template arguments that correspond to non-type
template parameters that have reference type. Effectively, we're doing
a very limited form of reference binding here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
79e5c9cb09c1a188435d60328b060b9883f631e1 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add type-checking and implicit conversions for template parameters of
integral or enumeration type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
6ae5e6649f5d01a1b593f4db755bfcb42e095700 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Add type-checking and implicit conversions for template parameters of
integral or enumeration type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64256 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
bb4bf18c8a7941bfb7c43f5fbf6ddd897c61c19a 10-Feb-2009 Ted Kremenek <kremenek@apple.com> Bump PTH version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
b99b0c0e292544eb1f4feeaf9c2664d12329d558 10-Feb-2009 Ted Kremenek <kremenek@apple.com> Bump PTH version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
ec793e82537a1e7743bfa1eccf9b7b1186c8451f 10-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> GNU allows structs with flexible array members to be placed inside
arrays and other structs/unions as an extension. Downgrade our error
to a warning. Fixes PR3540.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
0bfe54fdc83b7b4e37c40e652d86d15aa89885b2 10-Feb-2009 Douglas Gregor <dgregor@apple.com> GNU allows structs with flexible array members to be placed inside
arrays and other structs/unions as an extension. Downgrade our error
to a warning. Fixes PR3540.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
c43f4fc3f18e9ca88ae6a7ea15cfabd110dc2146 10-Feb-2009 Mike Stump <mrs@apple.com> Fixup -ast-print so that:

We handle indentation of decls better.
We Indent extern "C" { } stuff better.
We print out structure contents more often.
We handle pass indentation information into the statement printer, so that
nested things come out more indented.
We print out FieldDecls.
We print out Vars.
We print out namespaces.
We indent functions better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
071e4da10b07ca5278a7ce9dcabd853e0d57e5a4 10-Feb-2009 Mike Stump <mrs@apple.com> Fixup -ast-print so that:

We handle indentation of decls better.
We Indent extern "C" { } stuff better.
We print out structure contents more often.
We handle pass indentation information into the statement printer, so that
nested things come out more indented.
We print out FieldDecls.
We print out Vars.
We print out namespaces.
We indent functions better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
fc7dad4a92de30d1b9035761391c58e9f735aa01 10-Feb-2009 Mike Stump <mrs@apple.com> Refactor FieldDecls to be ValueDecls instead of NamedDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclNodes.def
080cc35364d5bc03885ab0920528e9880f6b439d 10-Feb-2009 Mike Stump <mrs@apple.com> Refactor FieldDecls to be ValueDecls instead of NamedDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclNodes.def
9225a7e7e87fc7cb22260ae16d5f42ed82f08314 10-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implement parsing, semantic analysis and ASTs for default template
arguments. This commit covers checking and merging default template
arguments from previous declarations, but it does not cover the actual
use of default template arguments when naming class template
specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
d684b0027e16163c4bdba3e2f8bfadda7d62a0d3 10-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement parsing, semantic analysis and ASTs for default template
arguments. This commit covers checking and merging default template
arguments from previous declarations, but it does not cover the actual
use of default template arguments when naming class template
specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
62cdc79b9449bb634771e2b70ec8831fb02ea319 10-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Semantic analysis for non-type template parameter declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
5d290d584a82bb1cbfffa1b9a9a278538970e1b9 10-Feb-2009 Douglas Gregor <dgregor@apple.com> Semantic analysis for non-type template parameter declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
2fe2456e91294adb648ba55601b326ec61a908cc 10-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Bring in 'CHAR_BIT' for GCC 4.3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4004226773ac4a3070a940199be01ed6bdf1cf23 10-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Bring in 'CHAR_BIT' for GCC 4.3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64196 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
341ac795fdda52b74de7ba824b15ea51d77ae2fb 10-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Teach the type-id/expression disambiguator about different
disambiguation contexts, so that we properly parse template arguments
such as

A<int()>

as type-ids rather than as expressions. Since this can be confusing
(especially when the template parameter is a non-type template
parameter), we try to give a friendly error message.

Almost, eliminate a redundant error message (that should have been a
note) and add some ultra-basic checks for non-type template
arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Parser.h
8b642592a35167a3780074e78674e0bece87c40c 10-Feb-2009 Douglas Gregor <dgregor@apple.com> Teach the type-id/expression disambiguator about different
disambiguation contexts, so that we properly parse template arguments
such as

A<int()>

as type-ids rather than as expressions. Since this can be confusing
(especially when the template parameter is a non-type template
parameter), we try to give a friendly error message.

Almost, eliminate a redundant error message (that should have been a
note) and add some ultra-basic checks for non-type template
arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64189 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Parser.h
e8e367f393e9d1d81754d252f24f1f04600f6de6 10-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Check template template arguments against their corresponding template
template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
dd0574e76439f31c02ba54bd7708725176f9531f 10-Feb-2009 Douglas Gregor <dgregor@apple.com> Check template template arguments against their corresponding template
template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
35d81bb3324970c340d63aa9e17c39694dfe2891 10-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Rudimentary checking of template arguments against their corresponding
template parameters when performing semantic analysis of a template-id
naming a class template specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
c15cb38a4ff717097b32532fbf761c71b1376a02 10-Feb-2009 Douglas Gregor <dgregor@apple.com> Rudimentary checking of template arguments against their corresponding
template parameters when performing semantic analysis of a template-id
naming a class template specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
af0d009634442c51877d20b5a961326a5d29ed05 09-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implement Sebastian's idea for simplifying our handling of the greater-than operator/delimiter. Also, clean up after ourselves following a failed parse of a template-argument-list

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f02da89d7bddc319be52605d36442518647116b4 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement Sebastian's idea for simplifying our handling of the greater-than operator/delimiter. Also, clean up after ourselves following a failed parse of a template-argument-list

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
362abcd61aeb05a1decfedd6b10f77cfe42034ae 09-Feb-2009 Ted Kremenek <kremenek@apple.com> CallExpr now uses ASTContext's allocate to allocate/delete its array of subexpressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
668bf91d31265b6ea8c3eb854ba450857701f269 09-Feb-2009 Ted Kremenek <kremenek@apple.com> CallExpr now uses ASTContext's allocate to allocate/delete its array of subexpressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
6f37b58716e89420c13ac067fe605c3b6d5821d0 09-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate TemplateArg so that we only have a single kind of
representation for template arguments. Also simplifies the interface
for ActOnClassTemplateSpecialization and eliminates some annoying
allocations of TemplateArgs.

My attempt at smart pointers for template arguments lists is
relatively lame. We can improve it once we're sure that we have the
right representation for template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
5908e9f25bc9a334c99c095e0b1e6a515445be2d 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Eliminate TemplateArg so that we only have a single kind of
representation for template arguments. Also simplifies the interface
for ActOnClassTemplateSpecialization and eliminates some annoying
allocations of TemplateArgs.

My attempt at smart pointers for template arguments lists is
relatively lame. We can improve it once we're sure that we have the
right representation for template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
8e458f48f07276fe279a3d02e709e7ce15b2f9c3 09-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Start processing template-ids as types when the template-name refers
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:

- Parse template-ids like 'vector<int>' (where 'vector' names a
class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
using (sadly) a bool in the parser to tell it whether '>' should
be treated as an operator or not.

This is a baby-step, with major problems and limitations:
- There are currently two ways that we handle template arguments
(whether they are types or expressions). These will be merged, and,
most likely, TemplateArg will disappear.
- We don't have any notion of the declaration of class template
specializations or of template instantiations, so all template-ids
are fancy names for 'int' :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/Parser.h
55f6b14230c94272efbbcdd89a92224c8db9f225 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Start processing template-ids as types when the template-name refers
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:

- Parse template-ids like 'vector<int>' (where 'vector' names a
class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
using (sadly) a bool in the parser to tell it whether '>' should
be treated as an operator or not.

This is a baby-step, with major problems and limitations:
- There are currently two ways that we handle template arguments
(whether they are types or expressions). These will be merged, and,
most likely, TemplateArg will disappear.
- We don't have any notion of the declaration of class template
specializations or of template instantiations, so all template-ids
are fancy names for 'int' :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/Parser.h
0c9860319952458cc02ef5cbba3dd0b5be55c9a3 09-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Declarator::getSourceRange().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
ab197baec16bacade82325fb274cf6b992ac5d8a 09-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement Declarator::getSourceRange().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
f1a6712a280fcb40f12117717f58a4ded5fc8649 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Allocate the subexpression array for OberloadExpr from ASTContext's allocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fb7413f12636cefa9ebec9abf95804f82c305b11 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Allocate the subexpression array for OberloadExpr from ASTContext's allocator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
436d1a1dbda901be6e234e88d29a423ab39cbe2b 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Refine PostStmtCustom to reference a tagged data pair with the tag to indicate the checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
59753441b6391a9843eff287f0adb2614153b7c8 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Refine PostStmtCustom to reference a tagged data pair with the tag to indicate the checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
accd85e0c377484e17403d764eb58f6c3cc00493 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Added a new ProgramPoint 'PostStmtCustom' to enable checker-specific ProgramPoints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
f4be8ee748831bc23e35b542e6c1bb6d1eb49baa 09-Feb-2009 Ted Kremenek <kremenek@apple.com> Added a new ProgramPoint 'PostStmtCustom' to enable checker-specific ProgramPoints.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
a60c62ed9466364782369cb165f9392651a43a64 09-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Make Sema::getTypeName return the opaque pointer of a QualType rather
than a Decl, which gives us some more flexibility to express the
results with the type system. There are no clients using this
flexibility yet, but it's meant to be able to describe qualified names
as written in the source (e.g., "foo::type") or template-ids that name
a class template specialization (e.g., "std::vector<INT>").

DeclSpec's TST_typedef has become TST_typename, to reflect its use to
describe types found by name (that may or may not be typedefs). The
type representation of a DeclSpec with TST_typename is an opaque
QualType pointer. All users of TST_typedef, both direct and indirect,
have been updated for these changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/DeclSpec.h
1a51b4a11b7db25cac2134249711ecaaf9d1c0a8 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Make Sema::getTypeName return the opaque pointer of a QualType rather
than a Decl, which gives us some more flexibility to express the
results with the type system. There are no clients using this
flexibility yet, but it's meant to be able to describe qualified names
as written in the source (e.g., "foo::type") or template-ids that name
a class template specialization (e.g., "std::vector<INT>").

DeclSpec's TST_typedef has become TST_typename, to reflect its use to
describe types found by name (that may or may not be typedefs). The
type representation of a DeclSpec with TST_typename is an opaque
QualType pointer. All users of TST_typedef, both direct and indirect,
have been updated for these changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/DeclSpec.h
7fc6184d3eec638fdf75938a54a1937212a5f5af 08-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add public placement-delete operators. These are automatically used if the allocation throws

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e2dedf8f61b8f306f704781456b482eb61871e8e 08-Feb-2009 Douglas Gregor <dgregor@apple.com> Add public placement-delete operators. These are automatically used if the allocation throws

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9b3264d1cbb3bf7bebe90afe9cee8946788ad9ae 08-Feb-2009 Anders Carlsson <andersca@mac.com> Improve Sema of the cleanup attribute somewhat.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
89941c1c68d8e4eec3c8ea8ee68e34d9e3c7b083 08-Feb-2009 Anders Carlsson <andersca@mac.com> Improve Sema of the cleanup attribute somewhat.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
a390a1dd4f43d58e2143f85ed370808a521871c7 07-Feb-2009 Ted Kremenek <kremenek@apple.com> Commit header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
7a9bb52171f962d51ab13c1e012d2236feb9558d 07-Feb-2009 Ted Kremenek <kremenek@apple.com> Commit header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
0c97e0460148daf132d6623af5b6ff1bc41db649 07-Feb-2009 Ted Kremenek <kremenek@apple.com> Overhaul of Stmt allocation:
- Made allocation of Stmt objects using vanilla new/delete a *compiler
error* by making this new/delete "protected" within class Stmt.
- Now the only way to allocate Stmt objects is by using the new
operator that takes ASTContext& as an argument. This ensures that
all Stmt nodes are allocated from the same (pool) allocator.
- Naturally, these two changes required that *all* creation sites for
AST nodes use new (ASTContext&). This is a large patch, but the
majority of the changes are just this mechanical adjustment.
- The above changes also mean that AST nodes can no longer be
deallocated using 'delete'. Instead, one most do
StmtObject->Destroy(ASTContext&) or do
ASTContextObject.Deallocate(StmtObject) (the latter not running the
'Destroy' method).

Along the way I also...
- Made CompoundStmt allocate its array of Stmt* using the allocator in
ASTContext (previously it used std::vector). There are a whole
bunch of other Stmt classes that need to be similarly changed to
ensure that all memory allocated for ASTs comes from the allocator
in ASTContext.
- Added a new smart pointer ExprOwningPtr to Sema.h. This replaces
the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
'delete' to free memory instead of a Stmt's 'Destroy' method.

Big thanks to Doug Gregor for helping with the acrobatics of making
'new/delete' private and the new smart pointer ExprOwningPtr!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
8189cde56b4f6f938cd65f53c932fe1860d0204c 07-Feb-2009 Ted Kremenek <kremenek@apple.com> Overhaul of Stmt allocation:
- Made allocation of Stmt objects using vanilla new/delete a *compiler
error* by making this new/delete "protected" within class Stmt.
- Now the only way to allocate Stmt objects is by using the new
operator that takes ASTContext& as an argument. This ensures that
all Stmt nodes are allocated from the same (pool) allocator.
- Naturally, these two changes required that *all* creation sites for
AST nodes use new (ASTContext&). This is a large patch, but the
majority of the changes are just this mechanical adjustment.
- The above changes also mean that AST nodes can no longer be
deallocated using 'delete'. Instead, one most do
StmtObject->Destroy(ASTContext&) or do
ASTContextObject.Deallocate(StmtObject) (the latter not running the
'Destroy' method).

Along the way I also...
- Made CompoundStmt allocate its array of Stmt* using the allocator in
ASTContext (previously it used std::vector). There are a whole
bunch of other Stmt classes that need to be similarly changed to
ensure that all memory allocated for ASTs comes from the allocator
in ASTContext.
- Added a new smart pointer ExprOwningPtr to Sema.h. This replaces
the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
'delete' to free memory instead of a Stmt's 'Destroy' method.

Big thanks to Doug Gregor for helping with the acrobatics of making
'new/delete' private and the new smart pointer ExprOwningPtr!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
34e58bdd13e516bf1df52fec1d3cdf05d2dca766 07-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add negative test cases and fix diagnostics for member pointer dereferencing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
7878ffde0c48a33a8fd3819be1b797d52f7b3849 07-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add negative test cases and fix diagnostics for member pointer dereferencing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
95216a67cc6db599f50a8617f882396396ab07c9 07-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement dereferencing of pointers-to-member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
lang/Basic/DiagnosticSemaKinds.def
224605064a4ef87d1c3d35ad1cb363f8b534012b 07-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement dereferencing of pointers-to-member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
lang/Basic/DiagnosticSemaKinds.def
d406b034f9f50836d756e3f977845fdb8beaebee 06-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Semantic checking for class template declarations and
redeclarations. For example, checks that a class template
redeclaration has the same template parameters as previous
declarations.

Detangled class-template checking from ActOnTag, whose logic was
getting rather convoluted because it tried to handle C, C++, and C++
template semantics in one shot.

Made some inroads toward eliminating extraneous "declaration does not
declare anything" errors by adding an "error" type specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
ddc29e116db3c3f4144355e67a0137b38b6bb6d1 06-Feb-2009 Douglas Gregor <dgregor@apple.com> Semantic checking for class template declarations and
redeclarations. For example, checks that a class template
redeclaration has the same template parameters as previous
declarations.

Detangled class-template checking from ActOnTag, whose logic was
getting rather convoluted because it tried to handle C, C++, and C++
template semantics in one shot.

Made some inroads toward eliminating extraneous "declaration does not
declare anything" errors by adding an "error" type specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclTemplate.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
76650bfc9c9b7008a746fc78fb38d459608ef35e 06-Feb-2009 Ted Kremenek <kremenek@apple.com> Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4398a78095cd05a3be702fbab25bfe324a5d7946 06-Feb-2009 Ted Kremenek <kremenek@apple.com> Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4f530a9d984c94de4fa6ccf330885f6d05b564a2 06-Feb-2009 Ted Kremenek <kremenek@apple.com> Move StringLiteral to allocate its internal string data using the allocator in
ASTContext. This required changing all clients to pass in the ASTContext& to the
constructor of StringLiteral. I also changed all allocations of StringLiteral to
use new(ASTContext&).

Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the
allocator from ASTContext& (not complete).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6e94ef5696cfb005d3fc7bbac8dcf7690b64f0a5 06-Feb-2009 Ted Kremenek <kremenek@apple.com> Move StringLiteral to allocate its internal string data using the allocator in
ASTContext. This required changing all clients to pass in the ASTContext& to the
constructor of StringLiteral. I also changed all allocations of StringLiteral to
use new(ASTContext&).

Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the
allocator from ASTContext& (not complete).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c2f979be169d0691d0446e76d4d364b4b1551e60 06-Feb-2009 Ted Kremenek <kremenek@apple.com> Added special versions of new[]/delete[] to complement the new/delete which uses ASTContext's allocator. Updated some comments along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
42542c6a4b3c60f63820e6177a8938443831492c 06-Feb-2009 Ted Kremenek <kremenek@apple.com> Added special versions of new[]/delete[] to complement the new/delete which uses ASTContext's allocator. Updated some comments along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
46cfe45a10c6d35c1a502fb7949dac4874c09562 06-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose attempts to define a namespace member out-of-line when no
matching member exists. Thanks to Piotr Rak for reporting the problem!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
4ce205f94c984ddc4776ba0c3de7e398d251653a 06-Feb-2009 Douglas Gregor <dgregor@apple.com> Diagnose attempts to define a namespace member out-of-line when no
matching member exists. Thanks to Piotr Rak for reporting the problem!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
133db8ac89444b20c1fa2dc42dad6f3e188d5903 06-Feb-2009 Chris Lattner <sabre@nondot.org> Add an implementation of -dM that follows GCC closely enough to permit
diffing the output of:
clang -dM -o - -E -x c foo.c | sort


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
f73903a1ded46748e1dfda151f5d037b7b3d31f9 06-Feb-2009 Chris Lattner <sabre@nondot.org> Add an implementation of -dM that follows GCC closely enough to permit
diffing the output of:
clang -dM -o - -E -x c foo.c | sort


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
51fb422de9a76c85e90d7f0e7ba6176aac73da5e 06-Feb-2009 Chris Lattner <sabre@nondot.org> add interface for walking macro table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
09b5c1d08a33ecf5d9c61b922fbe679867336684 06-Feb-2009 Chris Lattner <sabre@nondot.org> add interface for walking macro table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
534234c87a201b20f496a37855b30510a5f5595d 06-Feb-2009 Chris Lattner <sabre@nondot.org> simplify and refactor a bunch of type definition code in Preprocessor
predefines buffer initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
2b5abf515f9696912452f431c7738691cf97f4f1 06-Feb-2009 Chris Lattner <sabre@nondot.org> simplify and refactor a bunch of type definition code in Preprocessor
predefines buffer initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
aab419ad381794352f65a94fe054b0cf40438617 06-Feb-2009 Chris Lattner <sabre@nondot.org> don't emit any diagnostics after a fatal one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
15221422eda7bac679e38b07512feda49715ef66 06-Feb-2009 Chris Lattner <sabre@nondot.org> don't emit any diagnostics after a fatal one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
a491877807202cfb1812f6dcdbb7b992c41ca634 06-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Improve the representation of template type parameters. We now
canonicalize by template parameter depth, index, and name, and the
unnamed version of a template parameter serves as the canonical.

TemplateTypeParmDecl no longer needs to inherit from
TemplateParmPosition, since depth and index information is present
within the type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
fab9d67cebb87be968e7ae31a3b549a5279b5d51 06-Feb-2009 Douglas Gregor <dgregor@apple.com> Improve the representation of template type parameters. We now
canonicalize by template parameter depth, index, and name, and the
unnamed version of a template parameter serves as the canonical.

TemplateTypeParmDecl no longer needs to inherit from
TemplateParmPosition, since depth and index information is present
within the type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63899 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclTemplate.h
lang/AST/Type.h
195f0908bfeaaeb52a38dcf141ed442e7087e904 05-Feb-2009 Chris Lattner <sabre@nondot.org> allow mapping errors to fatal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
7fc24e2d47e1cdf03e655ed212d282635d755591 05-Feb-2009 Chris Lattner <sabre@nondot.org> allow mapping errors to fatal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
6d6f11ffb540320e1d04b1ef745aaee01404a8c5 05-Feb-2009 Chris Lattner <sabre@nondot.org> add support to the diagnostics machinery for mapping warnings and
errors to 'fatal' error severity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
da0cbc1ad4a553c4de111c1181ec7b42c5ddefce 05-Feb-2009 Chris Lattner <sabre@nondot.org> add support to the diagnostics machinery for mapping warnings and
errors to 'fatal' error severity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b96b92d2b8965ff7078ad9a2823d27f1411fb559 05-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Improvements and fixes for name lookup with using directives, from Piotr Rak!

Also, put Objective-C protocols into their own identifier
namespace. Otherwise, we find protocols when we don't want to in C++
(but not in C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
7dda67d8decef1b3621a151488c4b83bd8372d6a 05-Feb-2009 Douglas Gregor <dgregor@apple.com> Improvements and fixes for name lookup with using directives, from Piotr Rak!

Also, put Objective-C protocols into their own identifier
namespace. Otherwise, we find protocols when we don't want to in C++
(but not in C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
81db668b90f7af40781ed60aaca80f2c5ade4dbf 05-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Put the invalid flag of OwningResult into the Action pointer.
This shrinks OwningResult by one pointer. Since it is no longer larger than OwningPtr, merge the two.
This leads to simpler client code and speeds up my benchmark by 2.7%.
For some reason, this exposes a previously hidden bug, causing a regression in SemaCXX/condition.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
76ad2e85575722e8a38a2bd4648ab4304d9fcd24 05-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Put the invalid flag of OwningResult into the Action pointer.
This shrinks OwningResult by one pointer. Since it is no longer larger than OwningPtr, merge the two.
This leads to simpler client code and speeds up my benchmark by 2.7%.
For some reason, this exposes a previously hidden bug, causing a regression in SemaCXX/condition.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
1fb51a06b101dfd896688e1fd7cbccd6ad9e17d7 05-Feb-2009 Chris Lattner <sabre@nondot.org> privatize some stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3fa8f7491a6a6c1445768ea23ec85d3554c3ba98 05-Feb-2009 Chris Lattner <sabre@nondot.org> privatize some stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
93b8066f61fe40f4604d2b1a443300fb10f04e4e 05-Feb-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make SymbolicRegion subclass TypedRegion, for symbols usually have types, so
do the symblic regions associated with them and we need them to be typed.

Current SymbolicRegion::getRValueType() method is very restricting. It may be
modified when we are more clear about what could be the types of symblic
regions.

BasicConstraintManager::Assume() is changed due to that now SymblicRegion is a
subclass of SubRegion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
026c66395b88a09437319139a43b090093f7e1dd 05-Feb-2009 Zhongxing Xu <xuzhongxing@gmail.com> Make SymbolicRegion subclass TypedRegion, for symbols usually have types, so
do the symblic regions associated with them and we need them to be typed.

Current SymbolicRegion::getRValueType() method is very restricting. It may be
modified when we are more clear about what could be the types of symblic
regions.

BasicConstraintManager::Assume() is changed due to that now SymblicRegion is a
subclass of SubRegion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
bf6babf68cb2dab554b035442b3a398ff410176b 05-Feb-2009 Ted Kremenek <kremenek@apple.com> Overhaul BugReporter interface and implementation. The new interface cleans up
the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes,
and BugTypes are owned by the BugReporter object.

The major functionality change in this patch is that reports are not immediately
emitted by a call to BugReporter::EmitWarning (now called EmitReport), but
instead of queued up in report "equivalence classes". When
BugReporter::FlushReports() is called, it emits one diagnostic per report
equivalence class. This provides a nice cleanup with the caching of reports as
well as enables the BugReporter engine to select the "best" path for reporting a
path-sensitive bug based on all the locations in the ExplodedGraph that the same
bug could occur.

Along with this patch, Leaks are now coalesced into a common equivalence class
by their allocation site, and the "summary" diagnostic for leaks now reports the
allocation site as the location of the bug (this may later be augmented to also
provide an example location where the leak occurs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
cf118d41f7930a18dce97416ef7834a62642f587 05-Feb-2009 Ted Kremenek <kremenek@apple.com> Overhaul BugReporter interface and implementation. The new interface cleans up
the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes,
and BugTypes are owned by the BugReporter object.

The major functionality change in this patch is that reports are not immediately
emitted by a call to BugReporter::EmitWarning (now called EmitReport), but
instead of queued up in report "equivalence classes". When
BugReporter::FlushReports() is called, it emits one diagnostic per report
equivalence class. This provides a nice cleanup with the caching of reports as
well as enables the BugReporter engine to select the "best" path for reporting a
path-sensitive bug based on all the locations in the ExplodedGraph that the same
bug could occur.

Along with this patch, Leaks are now coalesced into a common equivalence class
by their allocation site, and the "summary" diagnostic for leaks now reports the
allocation site as the location of the bug (this may later be augmented to also
provide an example location where the leak occurs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
be69b166be4822c1477e60a0529ab39846ee152e 04-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implement semantic analysis for the GNU flexible array initialization
extension. The interaction with designated initializers is a
bit... interesting... but we follow GNU's lead and don't permit too
much crazy code in this area.

Also, make the "excess initializers" error message a bit more
informative.

Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
eeb15d499f032bb89773ddaca2d17475122a37bb 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement semantic analysis for the GNU flexible array initialization
extension. The interaction with designated initializers is a
bit... interesting... but we follow GNU's lead and don't permit too
much crazy code in this area.

Also, make the "excess initializers" error message a bit more
informative.

Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
c1fddffe2f78fc59d6d872ed14c50fba8110c0c0 04-Feb-2009 Mike Stump <mrs@apple.com> Add support for blocks with explicit return types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
98eb8a7a702b95183ed015706b1f1c66f5cb27a4 04-Feb-2009 Mike Stump <mrs@apple.com> Add support for blocks with explicit return types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
9bae865d5640b2b3c2e73126433e1aed27aa2965 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add -femit-all-decls codegen option.
- Emits all declarations, even unused (static) ones.
- Useful when doing minimization of codegen problems (otherwise
problems localized to a static function aren't minimized well).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
d604c40e933c445ff33ac83d62cc6b1adcf7014c 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add -femit-all-decls codegen option.
- Emits all declarations, even unused (static) ones.
- Useful when doing minimization of codegen problems (otherwise
problems localized to a static function aren't minimized well).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
f2dbdca4da38b43c06606f81bd6f5f1d384218a7 04-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Improve documentation for Sema::getTypeName. Also, it's return type is
DeclTy*, not TypeTy*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d6efafa5144a3e9942d1b09a246b118b1ba77a48 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Improve documentation for Sema::getTypeName. Also, it's return type is
DeclTy*, not TypeTy*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
279272e63b321f89c8fa0bb198acd3a834459aeb 04-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Basic representation of C++ class templates, from Andrew Sutton.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/Parse/Action.h
aaba5e346dffdbad5d1c42765a89e4a7afb0da67 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Basic representation of C++ class templates, from Andrew Sutton.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclTemplate.h
lang/AST/Type.h
lang/Parse/Action.h
09be81b04e4e5f8c4c57f952fb6d82dcdbb56b85 04-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Some name-lookup-related fixes, from Piotr Rak!

- Changes Lookup*Name functions to return NamedDecls, instead of
Decls. Unfortunately my recent statement that it will simplify lot of
code, was not quite right, but it simplifies some...
- Makes MergeLookupResult SmallPtrSet instead of vector, following
Douglas suggestions.
- Adds %qN format for printing qualified names to Diagnostic.
- Avoids searching for using-directives in Scopes, which are not
DeclScope, during unqualified name lookup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.def
47b9a1ca55e61e37f5a368740e29de190345acc6 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Some name-lookup-related fixes, from Piotr Rak!

- Changes Lookup*Name functions to return NamedDecls, instead of
Decls. Unfortunately my recent statement that it will simplify lot of
code, was not quite right, but it simplifies some...
- Makes MergeLookupResult SmallPtrSet instead of vector, following
Douglas suggestions.
- Adds %qN format for printing qualified names to Diagnostic.
- Avoids searching for using-directives in Scopes, which are not
DeclScope, during unqualified name lookup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticSemaKinds.def
1075a169d1dab0e6f5bed69440efec387d58af51 04-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Diagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
b696ea3a0693798daeafd896d77f0b8f1fec3cc5 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Diagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
4646f9c5bcd9e45228412daa99c9fcee58db9676 04-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Fix our semantic analysis of

unqualified-id '('

in C++. The unqualified-id might not refer to any declaration in our
current scope, but declarations by that name might be found via
argument-dependent lookup. We now do so properly.

As part of this change, CXXDependentNameExpr, which was previously
designed to express the unqualified-id in the above constructor within
templates, has become UnresolvedFunctionNameExpr, which does
effectively the same thing but will work for both templates and
non-templates.

Additionally, we cope with all unqualified-ids, since ADL also applies
in cases like

operator+(x, y)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
17330019f05966762bc952840ef1926b9becb145 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Fix our semantic analysis of

unqualified-id '('

in C++. The unqualified-id might not refer to any declaration in our
current scope, but declarations by that name might be found via
argument-dependent lookup. We now do so properly.

As part of this change, CXXDependentNameExpr, which was previously
designed to express the unqualified-id in the above constructor within
templates, has become UnresolvedFunctionNameExpr, which does
effectively the same thing but will work for both templates and
non-templates.

Additionally, we cope with all unqualified-ids, since ADL also applies
in cases like

operator+(x, y)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
778ae2186a65d7dfd0defd8e2740dd03e32b6b3e 04-Feb-2009 Chris Lattner <sabre@nondot.org> Implement handling of file entry/exit notifications from GNU
line markers, including maintenance of the virtual include stack.

For something like this:

# 42 "bar.c" 1
# 142 "bar2.c" 1

#warning zappa
# 92 "bar.c" 2
#warning gonzo
# 102 "foo.c" 2
#warning bonkta


we now produce these three warnings:

#1:
In file included from foo.c:3:
In file included from bar.c:42:
bar2.c:143:2: warning: #warning zappa
#warning zappa
^

#2:
In file included from foo.c:3:
bar.c:92:2: warning: #warning gonzo
#warning gonzo
^

#3:
foo.c:102:2: warning: #warning bonkta
#warning bonkta
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.def
137b6a6149c53dbbcb8fba98e524d9ad0f3c8736 04-Feb-2009 Chris Lattner <sabre@nondot.org> Implement handling of file entry/exit notifications from GNU
line markers, including maintenance of the virtual include stack.

For something like this:

# 42 "bar.c" 1
# 142 "bar2.c" 1

#warning zappa
# 92 "bar.c" 2
#warning gonzo
# 102 "foo.c" 2
#warning bonkta


we now produce these three warnings:

#1:
In file included from foo.c:3:
In file included from bar.c:42:
bar2.c:143:2: warning: #warning zappa
#warning zappa
^

#2:
In file included from foo.c:3:
bar.c:92:2: warning: #warning gonzo
#warning gonzo
^

#3:
foo.c:102:2: warning: #warning bonkta
#warning bonkta
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticLexKinds.def
d0ff602b3059f07f9fea574482b81952884eec44 04-Feb-2009 Chris Lattner <sabre@nondot.org> make getFileCharacteristic linetable aware. line markers that
play around with the 'is system header' bit now function correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
6b3066780bda02e3117d71a18ca2f430ed1454af 04-Feb-2009 Chris Lattner <sabre@nondot.org> make getFileCharacteristic linetable aware. line markers that
play around with the 'is system header' bit now function correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
7bf7851dcecf9384ac67b082617ad2c49042ee4a 04-Feb-2009 Chris Lattner <sabre@nondot.org> propagate linemarker flags down into the the line table, currently
ignoring include stack push/pop info though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
9d79ebac47ffde6a1cb312f4c09b66b1b9a397fb 04-Feb-2009 Chris Lattner <sabre@nondot.org> propagate linemarker flags down into the the line table, currently
ignoring include stack push/pop info though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a8884e854e9d7f9609094e4775e0baa5f2991ece 04-Feb-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
97c4d4759da403bccaaccdadb513164c84c85bef 04-Feb-2009 Zhongxing Xu <xuzhongxing@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
94270f3471fe86735f9eef254b5e1efc7958cfc7 04-Feb-2009 Chris Lattner <sabre@nondot.org> simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
a3824c6348794788094f8afa44dc1d2cf67ba440 04-Feb-2009 Chris Lattner <sabre@nondot.org> simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
2d89c564719b2f812cafbe0d4a39d914001ff21e 04-Feb-2009 Chris Lattner <sabre@nondot.org> lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
30fc933e5fbbb5f0ea60c47976d435254e378536 04-Feb-2009 Chris Lattner <sabre@nondot.org> lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
e79fc8576f1d0937a6343ed438be9ed0cb0a88d6 04-Feb-2009 Chris Lattner <sabre@nondot.org> make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
7da5aea7669e6db3e593162b8a123aef06a04d07 04-Feb-2009 Chris Lattner <sabre@nondot.org> make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
6256b2bb3fd39020fee719410b295962c8397e4e 03-Feb-2009 Chris Lattner <sabre@nondot.org> more plumbing for #line propagation. Use happy bit #3
out of FileInfo :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
ac50e3427cb9eb3dc9f13f29a78f00ef3122433d 03-Feb-2009 Chris Lattner <sabre@nondot.org> more plumbing for #line propagation. Use happy bit #3
out of FileInfo :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
b06739c6ba693c7f71adf420e4152a6e2183e48d 03-Feb-2009 Chris Lattner <sabre@nondot.org> stub out basic #line handling calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
4c4ea17d7f991516c37a871dfa4bbe5723fa85f0 03-Feb-2009 Chris Lattner <sabre@nondot.org> stub out basic #line handling calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
0c9da2196c86e33dba390b4f52280e2a0803a1e8 03-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Allow taking the address of data members, resulting in a member pointer.
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
ebc07d57be9e0722b4b9c66625e1fca43dcc2ee0 03-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Allow taking the address of data members, resulting in a member pointer.
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
7a7be65a7801addae8205fd68323cecd70df1635 03-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Semantic analysis, ASTs, and unqualified name lookup support for C++
using directives, from Piotr Rak!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclarationName.h
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/IdentifierTable.h
lang/Parse/Scope.h
2a3009a432bdcec59e6383d7b2b17494d6f91649 03-Feb-2009 Douglas Gregor <dgregor@apple.com> Semantic analysis, ASTs, and unqualified name lookup support for C++
using directives, from Piotr Rak!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclNodes.def
lang/AST/DeclarationName.h
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/IdentifierTable.h
lang/Parse/Scope.h
917d7c62453ae45d1a7913116a08fbdc581a39bd 03-Feb-2009 Chris Lattner <sabre@nondot.org> reclaim my precious bit in FileInfo by ensuring that ContentCache objects
are 8-byte aligned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
00282d6e1194655a2e89f940bd6fa8484b52e666 03-Feb-2009 Chris Lattner <sabre@nondot.org> reclaim my precious bit in FileInfo by ensuring that ContentCache objects
are 8-byte aligned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
8dedb840b73e0c969d2cb2e2095be9795850ef39 03-Feb-2009 Chris Lattner <sabre@nondot.org> switch SourceManager from using an std::map and std::list of
ContentCache objects to using a densemap and list, and allocating
the ContentCache objects from a bump pointer. This does not speed
up or slow down things substantially, but gives us control over
their alignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
0d0bf8cf58b35302312cc155287fde3e81eb25a7 03-Feb-2009 Chris Lattner <sabre@nondot.org> switch SourceManager from using an std::map and std::list of
ContentCache objects to using a densemap and list, and allocating
the ContentCache objects from a bump pointer. This does not speed
up or slow down things substantially, but gives us control over
their alignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
46e93a7ada4f101131c748f908b1e13778b4e425 03-Feb-2009 Chris Lattner <sabre@nondot.org> add #include to make more self-contained.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1100258c19dd8967ba078c0bc81fc06cea9d033f 03-Feb-2009 Chris Lattner <sabre@nondot.org> add #include to make more self-contained.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
df83754cd131bebfddc9b24d3e369b68d0a55302 03-Feb-2009 Chris Lattner <sabre@nondot.org> Content Cache only needs to be 4-byte aligned. Since it is stored in
an std::set, we can't make a strong guarantee about what its alignment
will be. Since I don't need the 3rd bit anyway yet, just change the
assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
90f255356e4abc03287d35d323a1af0127dfcfd2 03-Feb-2009 Chris Lattner <sabre@nondot.org> Content Cache only needs to be 4-byte aligned. Since it is stored in
an std::set, we can't make a strong guarantee about what its alignment
will be. Since I don't need the 3rd bit anyway yet, just change the
assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
469fc9a3a0e2278cec1d6ad67f690498ea189475 03-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add a macro-based enumeration of all of the Decl nodes (like we do
with Stmt/Expr nodes), and convert some of the more mundane
switch-on-all-decl-kinds uses over to use this new file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
64650af7cc4352c6c67b9bd1bf8ef3ce7471b910 03-Feb-2009 Douglas Gregor <dgregor@apple.com> Add a macro-based enumeration of all of the Decl nodes (like we do
with Stmt/Expr nodes), and convert some of the more mundane
switch-on-all-decl-kinds uses over to use this new file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclNodes.def
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
67f2cef5687a340f953ef93f53ab242c3407d1fe 02-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Split specific_decl_iterator, which had a run-time field for
determining what decls are acceptable, into specific_decl_iterator
(in which all decls matching the SpecificDecl type requirements are
acceptable) and filtered_decl_iterator (which also does a run-time
check via a member pointer non-type template parameter). This saves
some space in the iterators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
669c9a28fa4be35e6b6322aa7f2f3b2968189b80 02-Feb-2009 Douglas Gregor <dgregor@apple.com> Split specific_decl_iterator, which had a run-time field for
determining what decls are acceptable, into specific_decl_iterator
(in which all decls matching the SpecificDecl type requirements are
acceptable) and filtered_decl_iterator (which also does a run-time
check via a member pointer non-type template parameter). This saves
some space in the iterators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
d08a62ce5e76bccf4441dee48fa24bd02f25793e 02-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Slim down the specific_decl_iterator, since NULL denotes the end of the range. Good eyes, Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
d6f0b4e97e681ea5d165125960f34b3b8c19e1dc 02-Feb-2009 Douglas Gregor <dgregor@apple.com> Slim down the specific_decl_iterator, since NULL denotes the end of the range. Good eyes, Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
538a4c24fd066b19d85fe24add5fb9bdbbe971ab 02-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Check value-initializations that occur when an initializer list
provides too few elements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
87fd703e097c27d63479cb83b687d4000a22bbb1 02-Feb-2009 Douglas Gregor <dgregor@apple.com> Check value-initializations that occur when an initializer list
provides too few elements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
677e38ffb695d3963143a4ced265248bcc2332dd 31-Jan-2009 Anders Carlsson <andersca@mac.com> Add sema support for the cleanup attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
f6e35d0b9f1e9f1b4c5d3ef924415fa5e7c89849 31-Jan-2009 Anders Carlsson <andersca@mac.com> Add sema support for the cleanup attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticSemaKinds.def
lang/Parse/AttributeList.h
355ed05df6da9484f1f9b1148b6541230f737169 31-Jan-2009 Anders Carlsson <andersca@mac.com> Turn on -flax-vector-conversions by default, issue a warning whenever one is done. Add a -fnolax-vector-conversions option. Fixes PR2862.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/LangOptions.h
b0f90ccbc1079bb054071b836aa6dd265f33f3a2 31-Jan-2009 Anders Carlsson <andersca@mac.com> Turn on -flax-vector-conversions by default, issue a warning whenever one is done. Add a -fnolax-vector-conversions option. Fixes PR2862.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
lang/Basic/LangOptions.h
09f078ce215f423c1b8c794fe83c13e3b5370a83 30-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Upgrade the "excess elements in array initializer" warning to an
error, since both C99 and C++ consider it an error. For reference, GCC
makes this a warning while G++ makes it an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
b574e5630d66629ccc8f2432e60b59ae42f1f363 30-Jan-2009 Douglas Gregor <dgregor@apple.com> Upgrade the "excess elements in array initializer" warning to an
error, since both C99 and C++ consider it an error. For reference, GCC
makes this a warning while G++ makes it an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
d45210dac6500ab9a0d9ee7edc423a183bf7d13a 30-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Implement and test aggregate initialization in C++. Major changes:

- Support initialization of reference members; complain if any
reference members are left uninitialized.
- Use C++ copy-initialization for initializing each element (falls
back to constraint checking in C)
- Make sure we diagnose when one tries to provide an initializer
list for a non-aggregate.
- Don't complain about empty initializers in C++ (they are permitted)
- Unrelated but necessary: don't bother trying to convert the
decl-specifier-seq to a type when we're dealing with a C++
constructor, destructor, or conversion operator; it results in
spurious warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
930d8b5ecc074cca01ecd9a522a55f55f3b72396 30-Jan-2009 Douglas Gregor <dgregor@apple.com> Implement and test aggregate initialization in C++. Major changes:

- Support initialization of reference members; complain if any
reference members are left uninitialized.
- Use C++ copy-initialization for initializing each element (falls
back to constraint checking in C)
- Make sure we diagnose when one tries to provide an initializer
list for a non-aggregate.
- Don't complain about empty initializers in C++ (they are permitted)
- Unrelated but necessary: don't bother trying to convert the
decl-specifier-seq to a type when we're dealing with a C++
constructor, destructor, or conversion operator; it results in
spurious warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
b79cdbe00e67f0d8de29a9cd38c6a6924bf6007b 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix horrible non-termination bug in LiveVariables. The issue was that
the liveness state of block-level expressions could oscillate because
of two issues:
- The initial value before a merge was not always set to "Top"
- The set of live block-level expressions is a union, not an intersection

This fixes <rdar://problem/650084>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/Support/BlkExprDeclBitVector.h
bf98c99600017bfcdde2a7966c47a6beb15a96dc 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix horrible non-termination bug in LiveVariables. The issue was that
the liveness state of block-level expressions could oscillate because
of two issues:
- The initial value before a merge was not always set to "Top"
- The set of live block-level expressions is a union, not an intersection

This fixes <rdar://problem/650084>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/Support/BlkExprDeclBitVector.h
0abb34b3250462874bcde8d86fc548ea10cb4240 30-Jan-2009 Chris Lattner <sabre@nondot.org> memset takes an int, not a char.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
3f17f31479cfc2be2543e3e48f79d68dc2f2c41c 30-Jan-2009 Chris Lattner <sabre@nondot.org> memset takes an int, not a char.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
4281e62da4604c1b0187d3fe925973940016515e 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Move method out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1e2b1fc4c4ae775adb2b236a8190f5a93b09ea12 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Move method out-of-line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
882d81c0098e4bb7be2dc232a066bf5009bbf53e 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix inverted logic in ParentMap::hasParent()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
e4173c25c28bee676cfa02aa8ecbf8db3517ef70 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix inverted logic in ParentMap::hasParent()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
68c1e19d20a9e0cc375f6d87f11e770a5fa216ee 30-Jan-2009 Chris Lattner <sabre@nondot.org> " Attached is a patch for TextDiagnosticPrinter that adds an optional
parameter that allows users to omit the printing of the source
location on a diagnostic. So basically it would omit the "abc.c:5:1: "
at the beginning of the line."

Patch by Alexei Svitkine!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
b8bf65e342d0872222f7ac10007d2837d7df437f 30-Jan-2009 Chris Lattner <sabre@nondot.org> " Attached is a patch for TextDiagnosticPrinter that adds an optional
parameter that allows users to omit the printing of the source
location on a diagnostic. So basically it would omit the "abc.c:5:1: "
at the beginning of the line."

Patch by Alexei Svitkine!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
e7ef500151147ba851db502fc4d36319f863db80 30-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Switch Type::isAggregateType to use the C++ definition of "aggregate
type" rather than the C definition. We do this because both C99 and
Clang always use "aggregate type" as "aggregate or union type", and
the C++ definition includes union types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d7eb846aaf5ee4a8d22c3cd0796d1e7229d46013 30-Jan-2009 Douglas Gregor <dgregor@apple.com> Switch Type::isAggregateType to use the C++ definition of "aggregate
type" rather than the C definition. We do this because both C99 and
Clang always use "aggregate type" as "aggregate or union type", and
the C++ definition includes union types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a25cb0568ef29b58acce80a142819801be5afe66 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix a couple bugs:
- NonLoc::MakeVal() would use sizeof(unsigned) (literally) instead of consulting
ASTContext for the size (in bits) of 'int'. While it worked, it was a
conflation of concepts and using ASTContext.IntTy is 100% correct.
- RegionStore::getSizeInElements() no longer assumes that a VarRegion has the
type "ConstantArray", and handles the case when uses use ordinary variables
as if they were arrays.
- Fixed ElementRegion::getRValueType() to just return the rvalue type of its
"array region" in the case the array didn't have ArrayType.
- All of this fixes <rdar://problem/6541136>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
14553abd17d303b0b310b3ab1523eb0d30d8121c 30-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix a couple bugs:
- NonLoc::MakeVal() would use sizeof(unsigned) (literally) instead of consulting
ASTContext for the size (in bits) of 'int'. While it worked, it was a
conflation of concepts and using ASTContext.IntTy is 100% correct.
- RegionStore::getSizeInElements() no longer assumes that a VarRegion has the
type "ConstantArray", and handles the case when uses use ordinary variables
as if they were arrays.
- Fixed ElementRegion::getRValueType() to just return the rvalue type of its
"array region" in the case the array didn't have ArrayType.
- All of this fixes <rdar://problem/6541136>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
9fdddeddf7db0becc807298410fa5da31063e525 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.def
a9c878086036de36482cc21e35a33cabe9699b0a 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticSemaKinds.def
c0503affe458c2c2c933f8fbc584b27d9c92d07e 29-Jan-2009 Chris Lattner <sabre@nondot.org> remove two empty files


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Driver/DriverDiagnostic.h
95effa1e2df6db814add998b0495a12bc58b621e 29-Jan-2009 Chris Lattner <sabre@nondot.org> remove two empty files


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Driver/DriverDiagnostic.h
8d9b1d84416ce012517da473bd37ec995f897266 29-Jan-2009 Chris Lattner <sabre@nondot.org> next round of diagnostics cleanups, moving some
diags around, eliminating #defines, etc. Patch by
Anders Johnsen!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Driver/DriverDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
19e8e2cffc19606d0f44e7c2897cd126ffd3f9b0 29-Jan-2009 Chris Lattner <sabre@nondot.org> next round of diagnostics cleanups, moving some
diags around, eliminating #defines, etc. Patch by
Anders Johnsen!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticSemaKinds.def
lang/Driver/DriverDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
c9e012a1d1737f355ff5cf65d691ee58c4143d5a 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new expression node, ImplicitValueInitExpr, that
represents an implicit value-initialization of a subobject of a
particular type. This replaces the (ab)use of CXXZeroValueInitExpr
within initializer lists for the "holes" that occur due to the use of
C99 designated initializers.

The new test case is currently XFAIL'd, because CodeGen's
ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be
taught to value-initialize when it sees ImplicitValueInitExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
3498bdb9e9cb300de74c7b51c92608e2902b2348 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Introduce a new expression node, ImplicitValueInitExpr, that
represents an implicit value-initialization of a subobject of a
particular type. This replaces the (ab)use of CXXZeroValueInitExpr
within initializer lists for the "holes" that occur due to the use of
C99 designated initializers.

The new test case is currently XFAIL'd, because CodeGen's
ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be
taught to value-initialize when it sees ImplicitValueInitExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
82462767a344858f1ec4913cc5a1b974bbd92af0 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Clean up designated initialization of unions, so that CodeGen doesn't
have to try to guess which member is being initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0bb76897bedb8b747efc6523efb432fc24966118 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Clean up designated initialization of unions, so that CodeGen doesn't
have to try to guess which member is being initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
86a2484a87df299b1eeb17d379337eb073394f5d 29-Jan-2009 Chris Lattner <sabre@nondot.org> Fix -Wimplicit-function-declaration, which required some refactoring and
changes in various diagnostics code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
88eccaf06f9d88191723e71bdf5ca68409393be6 29-Jan-2009 Chris Lattner <sabre@nondot.org> Fix -Wimplicit-function-declaration, which required some refactoring and
changes in various diagnostics code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63282 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/Diagnostic.h
lang/Driver/DriverDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
f687dacfc60f56ee6b3576191b793a4dca015819 29-Jan-2009 Chris Lattner <sabre@nondot.org> Fix a wart that existed from before we had EXTWARN.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.def
1a360896d790ccb0b8dc393097ceea6a4b5e2436 29-Jan-2009 Chris Lattner <sabre@nondot.org> Fix a wart that existed from before we had EXTWARN.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticCommonKinds.def
545f39ee63c227cadd091f8ee163ef80aaee0700 29-Jan-2009 Chris Lattner <sabre@nondot.org> move library-specific diagnostic headers into library private dirs. Reduce
redundant #includes. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/DiagnosticAST.h
lang/Basic/DiagnosticAnalysis.h
lang/Basic/DiagnosticDriver.h
lang/Basic/DiagnosticLex.h
lang/Basic/DiagnosticParse.h
lang/Basic/DiagnosticSema.h
lang/Driver/DriverDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 29-Jan-2009 Chris Lattner <sabre@nondot.org> move library-specific diagnostic headers into library private dirs. Reduce
redundant #includes. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTDiagnostic.h
lang/Analysis/AnalysisDiagnostic.h
lang/Basic/DiagnosticAST.h
lang/Basic/DiagnosticAnalysis.h
lang/Basic/DiagnosticDriver.h
lang/Basic/DiagnosticLex.h
lang/Basic/DiagnosticParse.h
lang/Basic/DiagnosticSema.h
lang/Driver/DriverDiagnostic.h
lang/Lex/LexDiagnostic.h
lang/Parse/ParseDiagnostic.h
lang/Sema/SemaDiagnostic.h
756283be81be486a58ecde773b0c7e876358c58e 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Remove Expr::hasSideEffects. It doesn't work anyway

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
54f0728c2ab0f967e976300478b2f5cdfed78415 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Remove Expr::hasSideEffects. It doesn't work anyway

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
36dd0c55546d02d19186caf889230755776d0601 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Improvements to code-generation and semantic analysis of designated
initializers.

- We now initialize unions properly when a member other than the
first is named by a designated initializer.
- We now provide proper semantic analysis and code generation for
GNU array-range designators *except* that side effects will occur
more than once. We warn about this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
34e7946831a63f96d3ba3478c74ca8e25ee52d7e 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Improvements to code-generation and semantic analysis of designated
initializers.

- We now initialize unions properly when a member other than the
first is named by a designated initializer.
- We now provide proper semantic analysis and code generation for
GNU array-range designators *except* that side effects will occur
more than once. We warn about this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
e62fd058b83ab527b68759db4db790225f4ee6f4 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Remove method 'AddNE' from the public interface of ConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
b2bf7cda4661c54510e6cbb96ba6ea9b5ddafca9 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Remove method 'AddNE' from the public interface of ConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
58b1ffe562c29b0379df3faa2cff9f67aaa50226 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Add some comments to GRStateManager. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
679f4981e33643d3bc459b8208803ad2925cf282 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Add some comments to GRStateManager. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63243 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
f603b47aec06841368ddb1a36925c57976794c24 28-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Code generation support for C99 designated initializers.

The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.

Known limitations:
- Designating a member of a union that isn't the first member may
result in bogus initialization (we warn about this)
- GNU array-range designators are not supported (we warn about this)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.def
4c67834407ca6ab344dcf44fc599ad4938cfa96d 28-Jan-2009 Douglas Gregor <dgregor@apple.com> Code generation support for C99 designated initializers.

The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.

Known limitations:
- Designating a member of a union that isn't the first member may
result in bogus initialization (we warn about this)
- GNU array-range designators are not supported (we warn about this)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticSemaKinds.def
3d1455547c82213d3f0bff04551dcadc52f89c13 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Enhance PTHManager::Create() to take an optional Diagnostic* argument that can be used to report issues such as a missing PTH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
8a6aec620dbec1f292fe4116c0373ac81ab90234 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Enhance PTHManager::Create() to take an optional Diagnostic* argument that can be used to report issues such as a missing PTH file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
9f69c91bc412a14c251525702871eeed90a355da 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Add method FullSourceLoc::getBufferData().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
3632a35e811096da86d957c3e6ba0e73d75782f5 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Add method FullSourceLoc::getBufferData().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
6a80ecbba17a8cf5193d3b9ce6054d0790ae654f 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Tweak doxygen comment. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
509355e982d15da4f8f3939493516379665f6275 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Tweak doxygen comment. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
7b36a1b4b741fdd0db13e287316ee190c0064fb3 28-Jan-2009 Steve Naroff <snaroff@apple.com> Name change (isTypeName->getTypeName).
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
b43a50ff1b0b171ece84425b0ad83a9a31f038fa 28-Jan-2009 Steve Naroff <snaroff@apple.com> Name change (isTypeName->getTypeName).
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
f41a58c5777154baefbdaee8472dffce998c065b 28-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement pointer to member handling in static_cast.
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same.
Make a few style corrections as suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
21593acb933324b439bc68b68e7cc7d1c3e3484d 28-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement pointer to member handling in static_cast.
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same.
Make a few style corrections as suggested by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
b31f2940afc74f79cdb11add308be85c52de2426 28-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Complete semantic checking for typedef redeclarations in C++. The
rules are slightly different than in C, and now we handle both
dialects properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
66973121788ca645fe3d4a66179b9cfb6f2bce08 28-Jan-2009 Douglas Gregor <dgregor@apple.com> Complete semantic checking for typedef redeclarations in C++. The
rules are slightly different than in C, and now we handle both
dialects properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticSemaKinds.def
513b2aab31db7d5587e9495758f6eee4fdd13e1a 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Update comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
40b9b50b16e4728389bca78ded783d18d3adc1c9 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Update comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
d9d3e262922058a9c4b239af9ad656fdae8a94ac 28-Jan-2009 Chris Lattner <sabre@nondot.org> add some basic file headers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticAST.h
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysis.h
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriver.h
lang/Basic/DiagnosticLex.h
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParse.h
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSema.h
lang/Basic/DiagnosticSemaKinds.def
47354ed151fe0543e138ccebd3dfe7acfcb291d1 28-Jan-2009 Chris Lattner <sabre@nondot.org> add some basic file headers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticAST.h
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysis.h
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticDriver.h
lang/Basic/DiagnosticLex.h
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParse.h
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSema.h
lang/Basic/DiagnosticSemaKinds.def
88eebed66eb871cdc7de031cccfb59f445680cc4 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
46157b59646e3fd4252747c679fda529b8bf46af 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63175 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
abe189e738c71097d14b8657ffeff3cebce6aa29 28-Jan-2009 Ted Kremenek <kremenek@apple.com> FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and FileEntries.

Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m):
non-PTH: 0.4% improvement
PTH: 0.8% improvement



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
f3eb9219cf4b4e80c377d37aed72d5d6d840b7bc 28-Jan-2009 Ted Kremenek <kremenek@apple.com> FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and FileEntries.

Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m):
non-PTH: 0.4% improvement
PTH: 0.8% improvement



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
207b9ecb6031b79bd9cbacc2f6108d49dd941679 28-Jan-2009 Steve Naroff <snaroff@apple.com> Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free).

snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m
0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free
0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c0ac4923f08b25ae973a8ee7942cf3eb89da57b7 28-Jan-2009 Steve Naroff <snaroff@apple.com> Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free).

snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m
0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free
0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5abb028e7b9be23c921207c097dcdc237cbf0f26 27-Jan-2009 Steve Naroff <snaroff@apple.com> Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate().

This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3e9704981d7691fdd44913bf1786e8d760d8a627 27-Jan-2009 Steve Naroff <snaroff@apple.com> Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate().

This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
dd3a4fe10568b3eb4f0f24b9a51b4d70b87a0d5f 27-Jan-2009 Anders Carlsson <andersca@mac.com> If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
03eb543cf7ebee463b33b5802b83ac92c21770cf 27-Jan-2009 Anders Carlsson <andersca@mac.com> If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3f1cc56852a88fe7b956b30c5676b97ba9dc7c00 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> ivar meta-data generation for nonfragile-abi.
Still more work to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
98abf4bd3526a00a0e5cf71a9462c181f97b1c81 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> ivar meta-data generation for nonfragile-abi.
Still more work to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8b673aec4a2c02cb8172f7e8fdc8c741c343e29c 27-Jan-2009 Chris Lattner <sabre@nondot.org> add new headers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticAST.h
lang/Basic/DiagnosticAnalysis.h
lang/Basic/DiagnosticDriver.h
lang/Basic/DiagnosticLex.h
lang/Basic/DiagnosticParse.h
lang/Basic/DiagnosticSema.h
132b5beaf31da1213bb95b4631ae390f5e1052c1 27-Jan-2009 Chris Lattner <sabre@nondot.org> add new headers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticAST.h
lang/Basic/DiagnosticAnalysis.h
lang/Basic/DiagnosticDriver.h
lang/Basic/DiagnosticLex.h
lang/Basic/DiagnosticParse.h
lang/Basic/DiagnosticSema.h
f00be2e3da5fbb616a9368b7b6a2f1e23810fa3f 27-Jan-2009 Chris Lattner <sabre@nondot.org> Add the new .def files



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
39ad9c9343ced5cee3c6faa5504c6ea123f4b27a 27-Jan-2009 Chris Lattner <sabre@nondot.org> Add the new .def files



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticASTKinds.def
lang/Basic/DiagnosticAnalysisKinds.def
lang/Basic/DiagnosticCommonKinds.def
lang/Basic/DiagnosticLexKinds.def
lang/Basic/DiagnosticParseKinds.def
lang/Basic/DiagnosticSemaKinds.def
52a425b852e4641d46073a697a48a457c8f655e2 27-Jan-2009 Chris Lattner <sabre@nondot.org> Split the single monolithic DiagnosticKinds.def file into one
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.

Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
20c6b3b85e186cd52d5d99489132d71d498159eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Split the single monolithic DiagnosticKinds.def file into one
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.

Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
83165b59c3bfc492b23bfcf65c24156b20f3f77f 27-Jan-2009 Chris Lattner <sabre@nondot.org> add a new "getPreferredTypeAlign" method to return the preferred alignment
of a type. The implementation is currently something of a hack, but is
sufficient for now and allows clients to be built on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
34ebde404dc17d89487b07e6daaf1b47d5dfee39 27-Jan-2009 Chris Lattner <sabre@nondot.org> add a new "getPreferredTypeAlign" method to return the preferred alignment
of a type. The implementation is currently something of a hack, but is
sufficient for now and allows clients to be built on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c477207d6b3dc21ad8882e9fe6a82bde767cb254 27-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3418: make sure to handle the RHS of expressions starting with
__extension__. This sort of construct shows up in the gcc source code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
adf077f46ba5cddcd801a647a5e9a3eb97060df4 27-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3418: make sure to handle the RHS of expressions starting with
__extension__. This sort of construct shows up in the gcc source code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
836774b81b2a48a2cde1e08abb1f5f5e0b21ae97 27-Jan-2009 Chris Lattner <sabre@nondot.org> Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Driver/TextDiagnosticPrinter.h
b9c3f966b103f7cfe8e5e60007c4c8b38f7298eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Driver/TextDiagnosticPrinter.h
cbb2bd4e8d906e04fea40151e677c10c9b3f3d33 27-Jan-2009 Chris Lattner <sabre@nondot.org> rename getFullFilePos -> getFileOffset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
52c29081281955d3db9e11d10573b2d38f709099 27-Jan-2009 Chris Lattner <sabre@nondot.org> rename getFullFilePos -> getFileOffset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2c3258f28772cbdab116f947068fd3f34232de8f 27-Jan-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics:
- Add the distinction between the 'bug type' and the 'bug description'

HTMLDiagnostics:
- Output the bug type field as HTML comments

scan-build:
- Use the bug type field instead of the bug description for the HTML table.
- Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
a26ddabc0eb8cf8ea4de1878f84d3b920fc2349f 27-Jan-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics:
- Add the distinction between the 'bug type' and the 'bug description'

HTMLDiagnostics:
- Output the bug type field as HTML comments

scan-build:
- Use the bug type field instead of the bug description for the HTML table.
- Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
562db7f75a13815ea938f2c3be700bdb42af32b1 27-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH: Use Token::setLiteralData() to directly store a pointer to cached spelling data in the PTH file. This removes a ton of code for looking up spellings using sourcelocations in the PTH file. This simplifies both PTH-generation and reading.

Performance impact for -fsyntax-only on Cocoa.h (with Cocoa.h in the PTH file):
- PTH generation time improves by 5%
- PTH reading improves by 0.3%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
277faca30c9f8f72b79f55695cbe3395ec246e7c 27-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH: Use Token::setLiteralData() to directly store a pointer to cached spelling data in the PTH file. This removes a ton of code for looking up spellings using sourcelocations in the PTH file. This simplifies both PTH-generation and reading.

Performance impact for -fsyntax-only on Cocoa.h (with Cocoa.h in the PTH file):
- PTH generation time improves by 5%
- PTH reading improves by 0.3%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
b4c9d6c890a42aa6930a89089ada1a6e628f4f4a 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix definition of __builtin_ia32_vec_set_v2di and de-XFAIL
builtins-x86.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
2e2558ec5f5f70ec7f7a8a7e31d0c6be9e1f567e 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix definition of __builtin_ia32_vec_set_v2di and de-XFAIL
builtins-x86.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63069 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
10a18fcb2dd34772d0b3a5a9013b13c40a6e9afc 26-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Some micro-optimizations for DISABLE_SMART_POINTERS:
- When it's safe, ActionResult uses the low bit of the pointer for
the "invalid" flag rather than a separate "bool" value. This keeps
GCC from generating some truly awful code, for a > 3x speedup in the
result-passing microbenchmark.
- When DISABLE_SMART_POINTERS is defined, store an ActionResult
within ASTOwningResult rather than an ASTOwningPtr. Brings the
performance benefits of the above to smart pointers with
DISABLE_SMART_POINTERS defined.

Sadly, these micro-benchmark performance improvements don't seem to
make much of a difference on Cocoa.h right now. However, they're
harmless and might help with future optimizations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
5ac8aff3d7431dc7e4d64d960574a10c9f7e0078 26-Jan-2009 Douglas Gregor <dgregor@apple.com> Some micro-optimizations for DISABLE_SMART_POINTERS:
- When it's safe, ActionResult uses the low bit of the pointer for
the "invalid" flag rather than a separate "bool" value. This keeps
GCC from generating some truly awful code, for a > 3x speedup in the
result-passing microbenchmark.
- When DISABLE_SMART_POINTERS is defined, store an ActionResult
within ASTOwningResult rather than an ASTOwningPtr. Brings the
performance benefits of the above to smart pointers with
DISABLE_SMART_POINTERS defined.

Sadly, these micro-benchmark performance improvements don't seem to
make much of a difference on Cocoa.h right now. However, they're
harmless and might help with future optimizations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
c374f8b15500a5de12c68b8c2a339154b1efff97 26-Jan-2009 Chris Lattner <sabre@nondot.org> rename getSpelledCharacterAt to getSpellingOfSingleCharacterNumericConstant,
optimize it to use the LiteralData when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
7216dc9cb49f47254595120cf15a737cee53f0bd 26-Jan-2009 Chris Lattner <sabre@nondot.org> rename getSpelledCharacterAt to getSpellingOfSingleCharacterNumericConstant,
optimize it to use the LiteralData when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
afc8ad50ff0aa91bf8a6106beef2c33cc320c28b 26-Jan-2009 Ted Kremenek <kremenek@apple.com> Add version number to PTH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
468edb509346e00a3228536b9f81064eb3baba19 26-Jan-2009 Ted Kremenek <kremenek@apple.com> Add version number to PTH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
8d92c1a4b0b12b12accec6b736b49140e4722875 26-Jan-2009 Chris Lattner <sabre@nondot.org> make getInstantiationLoc and getSpellingLoc handle multiply instantiated
locations, and move the slow case out of line. No perf change on cocoa.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
addb797ca2b5afc1a1e82fd8d5d6eb2a592e75a9 26-Jan-2009 Chris Lattner <sabre@nondot.org> make getInstantiationLoc and getSpellingLoc handle multiply instantiated
locations, and move the slow case out of line. No perf change on cocoa.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
6ad1f50668c95632599b09d3a0ddcb5c73b1f6a9 26-Jan-2009 Chris Lattner <sabre@nondot.org> This change refactors some of the low-level lexer interfaces a bit.
Token now has a class of kinds for "literals", which include
numeric constants, strings, etc. These tokens can optionally have
a pointer to the start of the token in the lexer buffer. This
makes it faster to get spelling and do other gymnastics, because we
don't have to go through source locations.

This change is performance neutral, but will make other changes
more feasible down the road.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Parse/Parser.h
47246be8ac5b0ddde6c402b8fc6946b6135487b5 26-Jan-2009 Chris Lattner <sabre@nondot.org> This change refactors some of the low-level lexer interfaces a bit.
Token now has a class of kinds for "literals", which include
numeric constants, strings, etc. These tokens can optionally have
a pointer to the start of the token in the lexer buffer. This
makes it faster to get spelling and do other gymnastics, because we
don't have to go through source locations.

This change is performance neutral, but will make other changes
more feasible down the road.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Parse/Parser.h
c28b1f70e0cb58aeff82f47b6dd29463e874563e 26-Jan-2009 Chris Lattner <sabre@nondot.org> make sure we have a definition of uintptr_t.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
464c4b3fdd473c9722cc00e7ef5f9929578f9c46 26-Jan-2009 Chris Lattner <sabre@nondot.org> make sure we have a definition of uintptr_t.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63019 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
d2051b43cbbcb5a549ffd24134bf0a33f83469a9 26-Jan-2009 Chris Lattner <sabre@nondot.org> start plumbing together the line table information. So far we just
unique the Filenames in #line directives, assigning them UIDs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
5b9a504720fb52594ca3686e10eb6c0cfa2e7d62 26-Jan-2009 Chris Lattner <sabre@nondot.org> start plumbing together the line table information. So far we just
unique the Filenames in #line directives, assigning them UIDs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
e0b8f7697e7b6c8f39b7bdcaf5c8d7ec90a6fea8 26-Jan-2009 Chris Lattner <sabre@nondot.org> Bitmangle file characteristic bits into the low bits of
the content cache pointer. This saves 105876 bytes on
cocoa.h because it shrinks the SLocEntry union, which
we have a big array of. It would be nice to use
PointerIntPair here, but we can't because it is in a
union.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
6e1aff2f586025f2d385ee49239f626b0fc63fd7 26-Jan-2009 Chris Lattner <sabre@nondot.org> Bitmangle file characteristic bits into the low bits of
the content cache pointer. This saves 105876 bytes on
cocoa.h because it shrinks the SLocEntry union, which
we have a big array of. It would be nice to use
PointerIntPair here, but we can't because it is in a
union.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
10f8e6bf59ef94ae2184463c33b6706dbd73f482 26-Jan-2009 Chris Lattner <sabre@nondot.org> add parsing and constraint enforcement for GNU line marker directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
478a18ec47fdb7e0e580a2635648456e9db9ad4f 26-Jan-2009 Chris Lattner <sabre@nondot.org> add parsing and constraint enforcement for GNU line marker directives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
13c110288fc2c8bdf8b34187464184aef1864889 26-Jan-2009 Chris Lattner <sabre@nondot.org> parse and enforce required constraints on #line directives. Right now
we just discard them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
359cc4475487ea0a660b3e8918334a2866e71c66 26-Jan-2009 Chris Lattner <sabre@nondot.org> parse and enforce required constraints on #line directives. Right now
we just discard them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
27c0ced6e7af1b40d1e26a366eee2f95089edb47 26-Jan-2009 Chris Lattner <sabre@nondot.org> Check in the long promised SourceLocation rewrite. This lays the
ground work for implementing #line, and fixes the "out of macro ID's"
problem.

There is nothing particularly tricky about the code, other than the
very performance sensitive SourceManager::getFileID() method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
de7aeefc5573d669ed476d7bda7a8940d3bcadb7 26-Jan-2009 Chris Lattner <sabre@nondot.org> Check in the long promised SourceLocation rewrite. This lays the
ground work for implementing #line, and fixes the "out of macro ID's"
problem.

There is nothing particularly tricky about the code, other than the
very performance sensitive SourceManager::getFileID() method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
743345196e54ad7287cccbe16e438d5a156f22d2 26-Jan-2009 Chris Lattner <sabre@nondot.org> improve ASTContext::getDeclAlign comment, as suggested by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f65dd5681b34f195a29ddd6ee134b7743ed78cdd 26-Jan-2009 Chris Lattner <sabre@nondot.org> improve ASTContext::getDeclAlign comment, as suggested by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ba3875684baa207e083260c44958fc8361ad9710 25-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement implicit conversions for pointers-to-member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4433aafbc2591b82e4ea2fc39c723b21d2497f4d 25-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement implicit conversions for pointers-to-member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
dee41127decfb12910825d42a396b25eb25ac168 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more
accurately states what the function is trying to do and how it is
different from Expr::isEvaluatable. Also get rid of a parameter that is both
unused and inaccurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c9e8f606787b0bc0c3b08e566b87cc1751694168 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more
accurately states what the function is trying to do and how it is
different from Expr::isEvaluatable. Also get rid of a parameter that is both
unused and inaccurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bc941e1d1fd6d89c10905e1ab0be0fa1ef279668 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> PR3062: statement expressions should be illegal at file scope. I don't
think this has any significant effects at the moment, but it could
matter if we start constant-folding statement expressions like gcc does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
dca2b7314f73fbb1e897befdc4f0ddaa9905d72c 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> PR3062: statement expressions should be illegal at file scope. I don't
think this has any significant effects at the moment, but it could
matter if we start constant-folding statement expressions like gcc does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bd3153edf9096e49a03c782d9768232213a41733 24-Jan-2009 Chris Lattner <sabre@nondot.org> add initial support for the gcc "alignof(decl) is the alignment of the decl
not the type" semantics. This can definitely be improved, but is better than
what we had.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
af707ab8fbb9451e8febb8d766f6c043628125c4 24-Jan-2009 Chris Lattner <sabre@nondot.org> add initial support for the gcc "alignof(decl) is the alignment of the decl
not the type" semantics. This can definitely be improved, but is better than
what we had.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
302d2316005ee585c0a1ad73acf49f17684a7a53 24-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Undo accidental disabling of smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
b9037594f5e02f66c4fa697d9dec2359faba1bc3 24-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Undo accidental disabling of smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
364a42d5359bec37c089b9839c8ce4d33dc1434a 24-Jan-2009 Chris Lattner <sabre@nondot.org> Implement C99 6.5.3.4p1, rejecting sizeof(bitfield)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
da0274725667d1168867dc404417f2c68c8dc0c5 24-Jan-2009 Chris Lattner <sabre@nondot.org> Implement C99 6.5.3.4p1, rejecting sizeof(bitfield)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7555503bb5f08651638f269c44c15bb425d10c5e 24-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add support for declaring pointers to members.
Add serialization support for ReferenceType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
f30208ad5b334e93582e846a2a0c92f38a607b8a 24-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add support for declaring pointers to members.
Add serialization support for ReferenceType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
lang/Parse/Ownership.h
ecddc57ef650e1bc7b836d512fd2df17cf6ec81b 24-Jan-2009 Chris Lattner <sabre@nondot.org> fix some const-correctness issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
caae7b099a0324b7c15dc89a9b70969d5d7ce996 24-Jan-2009 Chris Lattner <sabre@nondot.org> fix some const-correctness issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8d9f7966e67ffdde467b84b187c782f3e1b08556 24-Jan-2009 Chris Lattner <sabre@nondot.org> Fix PR3386 by handling GCC's rules for alignof, which are substantially
different than those for sizeof. Reject alignof(bitfield) like gcc does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
31e21e05623ce9d11b1a893fecb87ad349df6c7d 24-Jan-2009 Chris Lattner <sabre@nondot.org> Fix PR3386 by handling GCC's rules for alignof, which are substantially
different than those for sizeof. Reject alignof(bitfield) like gcc does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f8abb94c2c5b0f3bc8d2d5199fa21f93310f761f 24-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix invalid evaluation of _Complex float (real & imaginary parts had
mismatched semantics).
- Enforce this in APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
8f826f0e0c90b05ab04e84c29157d2e965713288 24-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix invalid evaluation of _Complex float (real & imaginary parts had
mismatched semantics).
- Enforce this in APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
3f6c680cfadd12074d68acddcf5e0ef0a2d6b7af 24-Jan-2009 Ted Kremenek <kremenek@apple.com> More hacking on static analyzer diagnostics. When emitting summary diagnostics the code paths for diagnostics involving paths or single locations are now unified. This patch also constifies many arguments/methods that are touched by this logic, leading to a nice overall code cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
3148eb4a75f70f2636075c364d03104223f004d3 24-Jan-2009 Ted Kremenek <kremenek@apple.com> More hacking on static analyzer diagnostics. When emitting summary diagnostics the code paths for diagnostics involving paths or single locations are now unified. This patch also constifies many arguments/methods that are touched by this logic, leading to a nice overall code cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
d8a7adf951f5a13305374eb63baec09e8c695508 23-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a small regression in warning about template type parameter redeclarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
efe38bdea21953f89c1504cfd1c63bee5f15b1b6 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix a small regression in warning about template type parameter redeclarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
4ac887b57a1bdccee7ad58170b6892c7f0d8a563 23-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that all NamedDecls have an identifier namespace.
Make sure that we know a call is invalid if we dropped arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
3fd56d755aa74f01fbe963195c95c963ea1fee91 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Make sure that all NamedDecls have an identifier namespace.
Make sure that we know a call is invalid if we dropped arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1e1a34ba17b133e3476506c3e2f2c4524e71be61 23-Jan-2009 Ted Kremenek <kremenek@apple.com> Added virtual method DiagnosticClient::IncludeInDiagnosticCounts(). This is used by Diagnostics to determine if a diagnostic sent to a given DiagnosticClient should be included in the count of diagnostics. The default implementation of this method returns 'true'.

Implemented DiagCollector::IncludeInDiagnosticCounts() to return 'false' so that the batching of diagnostics for use with BugReporter doesn't mess up the count of real diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
cabe66811fe43835b8c5a0854552768fc53261e3 23-Jan-2009 Ted Kremenek <kremenek@apple.com> Added virtual method DiagnosticClient::IncludeInDiagnosticCounts(). This is used by Diagnostics to determine if a diagnostic sent to a given DiagnosticClient should be included in the count of diagnostics. The default implementation of this method returns 'true'.

Implemented DiagCollector::IncludeInDiagnosticCounts() to return 'false' so that the batching of diagnostics for use with BugReporter doesn't mess up the count of real diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
9ac3dd9ab915849404dab0aeda1155f3b8aa1841 23-Jan-2009 Chris Lattner <sabre@nondot.org> This is a follow-up to r62675:

Refactor how the preprocessor changes a token from being an tok::identifier to a
keyword (e.g. tok::kw_for). Instead of doing this in HandleIdentifier, hoist this
common case out into the caller, so that every keyword doesn't have to go through
HandleIdentifier. This drops time in HandleIdentifier from 1.25ms to .62ms, and
speeds up clang -Eonly with PTH by about 1%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
863c486fcb6162495a94fddf7ac8409de2638995 23-Jan-2009 Chris Lattner <sabre@nondot.org> This is a follow-up to r62675:

Refactor how the preprocessor changes a token from being an tok::identifier to a
keyword (e.g. tok::kw_for). Instead of doing this in HandleIdentifier, hoist this
common case out into the caller, so that every keyword doesn't have to go through
HandleIdentifier. This drops time in HandleIdentifier from 1.25ms to .62ms, and
speeds up clang -Eonly with PTH by about 1%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
8d583065d15af01e4e803e2088f3fc3b5f567b67 23-Jan-2009 Chris Lattner <sabre@nondot.org> Preprocessor doesn't require and IdentifierInfoLookup object.
Patch by Axel Naumann!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
17d527b051fbc3927b8a1b4ce4607a9b2ed445ee 23-Jan-2009 Chris Lattner <sabre@nondot.org> Preprocessor doesn't require and IdentifierInfoLookup object.
Patch by Axel Naumann!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
65075ec8e35729afc6ff55e45eb653688666de1b 23-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Handle any undeclared parameters in a K&R-style function with a
special action, inside function prototype scope. This avoids confusion
when we try to inject these parameters into the scope of the function
body before the function itself has been added to the surrounding
scope. Fixes <rdar://problem/6097326>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
be109b3e768b70f9efb106d25d6b5a2c72c5a9b8 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Handle any undeclared parameters in a K&R-style function with a
special action, inside function prototype scope. This avoids confusion
when we try to inject these parameters into the scope of the function
body before the function itself has been added to the surrounding
scope. Fixes <rdar://problem/6097326>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b3193246902562ea8ab8d2c3214f02b3e711927c 23-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Support arithmetic on pointer-to-function types as a GNU
extension. Addresses clang PR/3371.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c983b86514d14dd4b30147bf6791dde9487d2c3f 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Support arithmetic on pointer-to-function types as a GNU
extension. Addresses clang PR/3371.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
710f6d41708bc34c39b75a00d9cc91cee68cf4d8 23-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Reimplement the handling of the "current object" in designator
initializers, so that we are within the appropriate subobject after
we've processed a multi-designator designation. We're matching GCC and
EDG's behavior on all examples I've found thus far.

*Huge* thanks to Eli Friedman for pointing out my fundamental
misunderstanding of "current object" in the C99 spec.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
87f55cf59e82f246d8605733e9300d0c5f6830a6 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Reimplement the handling of the "current object" in designator
initializers, so that we are within the appropriate subobject after
we've processed a multi-designator designation. We're matching GCC and
EDG's behavior on all examples I've found thus far.

*Huge* thanks to Eli Friedman for pointing out my fundamental
misunderstanding of "current object" in the C99 spec.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d03748117b5ed1b627e6cc5095ab509a722671ec 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Use NonFragileABI as name of new Next abi. More comments
for the new meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
30bc57187be7535c57ef1ca8ff3e765653e94332 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Use NonFragileABI as name of new Next abi. More comments
for the new meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
65865a082fc539f5256d58f835efc0fa0876028e 22-Jan-2009 Ted Kremenek <kremenek@apple.com> Static analyzer: Remove a bunch of outdated SymbolData objects and
their associated APIs. We no longer need separate SymbolData objects
for fields, variables, etc. Instead, we now associated symbols with
the "rvalue" of a MemRegion (i.e., the value stored at that region).
Now we only have two kinds of SymbolData objects: SymbolRegionRValue
and SymbolConjured.

This cleanup also makes the distinction between a SymbolicRegion and a
symbolic value that is a location much clearer. A SymbolicRegion
represents a chunk of symbolic memory, while a symbolic location is
just a "pointer" with different possible values. Without any specific
knowledge, a symbolic location resolves (i.e., via a dereference) to a
SymbolicRegion. In the future, when we do better alias reasoning, a
symbolic location can become an alias for another location, thus
merging the constraints on the referred SymbolicRegion with the other
region.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
9ab6b9cfb76ee56a61829e2bdb08e5cdc288726e 22-Jan-2009 Ted Kremenek <kremenek@apple.com> Static analyzer: Remove a bunch of outdated SymbolData objects and
their associated APIs. We no longer need separate SymbolData objects
for fields, variables, etc. Instead, we now associated symbols with
the "rvalue" of a MemRegion (i.e., the value stored at that region).
Now we only have two kinds of SymbolData objects: SymbolRegionRValue
and SymbolConjured.

This cleanup also makes the distinction between a SymbolicRegion and a
symbolic value that is a location much clearer. A SymbolicRegion
represents a chunk of symbolic memory, while a symbolic location is
just a "pointer" with different possible values. Without any specific
knowledge, a symbolic location resolves (i.e., via a dereference) to a
SymbolicRegion. In the future, when we do better alias reasoning, a
symbolic location can become an alias for another location, thus
merging the constraints on the referred SymbolicRegion with the other
region.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62769 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
274ff49bf032abb013b7e59ecd370698c91d48a9 22-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add a switch that allows disabling the smart pointers.
Uncomment the define in Ownership.h to disable the smart pointers.
Disabled, the smart pointers no longer contain a pointer
to the action, and no longer have special destruction or
copying semantics. They are, compiler willing, raw
pointers or ActionResult equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
07c487e5f73c3e6ea47a03b674a4a0f753adf90f 22-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add a switch that allows disabling the smart pointers.
Uncomment the define in Ownership.h to disable the smart pointers.
Disabled, the smart pointers no longer contain a pointer
to the action, and no longer have special destruction or
copying semantics. They are, compiler willing, raw
pointers or ActionResult equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
edd94e9726e3e222711cb49809b5bb33d134d3f7 22-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> EXTWARNify the warning about unnamed typedefs of enums

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
21282df53bd86f737f84c4ae6d2dea7ef32f0895 22-Jan-2009 Douglas Gregor <dgregor@apple.com> EXTWARNify the warning about unnamed typedefs of enums

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c5a6bdc2f783e75a434e1e230dac17b946822976 22-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Initial implementation of semantic analysis and ASTs for C99
designated initializers. This implementation should cover all of the
constraints in C99 6.7.8, including long, complex designations and
computing the size of incomplete array types initialized with a
designated initializer. Please see the new test-case and holler if you
find cases where this doesn't work.

There are still some wrinkles with GNU's anonymous structs and
anonymous unions (it isn't clear how these should work; we'll just
follow GCC's lead) and with designated initializers for the members of a
union. I'll tackle those very soon.

CodeGen is still nonexistent, and there's some leftover code in the
parser's representation of designators that I'll also need to clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Designator.h
05c13a3411782108d65aab3c77b1a231a4963bc0 22-Jan-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of semantic analysis and ASTs for C99
designated initializers. This implementation should cover all of the
constraints in C99 6.7.8, including long, complex designations and
computing the size of incomplete array types initialized with a
designated initializer. Please see the new test-case and holler if you
find cases where this doesn't work.

There are still some wrinkles with GNU's anonymous structs and
anonymous unions (it isn't clear how these should work; we'll just
follow GCC's lead) and with designated initializers for the members of a
union. I'll tackle those very soon.

CodeGen is still nonexistent, and there's some leftover code in the
parser's representation of designators that I'll also need to clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Designator.h
5c0729b2e87c1e56799278fb54abbd1765709e7c 21-Jan-2009 Ted Kremenek <kremenek@apple.com> Static Analyzer: Replace LiveSymbols/DeadSymbols sets with a new object called "SymbolReaper". Right now it just consolidates the two and cleans up some client code, but shortly it will be used to enable "lazy computation" of live symbols for use with RegionStore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
241677a13cc46647a8f5098b3e3239bd9480dca2 21-Jan-2009 Ted Kremenek <kremenek@apple.com> Static Analyzer: Replace LiveSymbols/DeadSymbols sets with a new object called "SymbolReaper". Right now it just consolidates the two and cleans up some client code, but shortly it will be used to enable "lazy computation" of live symbols for use with RegionStore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
48543f59f28dafeff95a33e17539fc7936ee0334 21-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Refactoring ObjC Next's runtime classes in preparation for
the new ObjC's abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
ee0af74d1e0990c7b66d32657f3e4e54b8691552 21-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Refactoring ObjC Next's runtime classes in preparation for
the new ObjC's abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
1c71ca4d2386caf0f4da7413aec49239de710e10 21-Jan-2009 Steve Naroff <snaroff@apple.com> Removed alignment argument to delete operator. It isn't needed and Visual Studio is offended by it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7106a3aea3cdbf409aed3e32235d909a47e25501 21-Jan-2009 Steve Naroff <snaroff@apple.com> Removed alignment argument to delete operator. It isn't needed and Visual Studio is offended by it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62707 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5868db58aa9c7d60f985f7f5163f9f976884675a 21-Jan-2009 Chris Lattner <sabre@nondot.org> initialialize some ivars in ctor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
fd52fc7cb1405f05d48f2bef284ca76df00b6649 21-Jan-2009 Chris Lattner <sabre@nondot.org> initialialize some ivars in ctor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
5b747d00f5b116bb9764242c51d2a90ba7307f6f 21-Jan-2009 Chris Lattner <sabre@nondot.org> Add a bit to IdentifierInfo that acts as a simple predicate which
tells us whether Preprocessor::HandleIdentifier needs to be called.
Because this method is only rarely needed, this saves a call and a
bunch of random checks. This drops the time in HandleIdentifier
from 3.52ms to .98ms on cocoa.h on my machine.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
6a170eb3ea6d6319277becabef68eb1a26bf8766 21-Jan-2009 Chris Lattner <sabre@nondot.org> Add a bit to IdentifierInfo that acts as a simple predicate which
tells us whether Preprocessor::HandleIdentifier needs to be called.
Because this method is only rarely needed, this saves a call and a
bunch of random checks. This drops the time in HandleIdentifier
from 3.52ms to .98ms on cocoa.h on my machine.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
e807f8520de8e3bdf61a1f0b74891aebd88539f0 21-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/6510344> [pth] PTH slows down regular lexer considerably (when it has substantial work)

Changes to IdentifierTable:
- High-level summary: StringMap never owns IdentifierInfos. It just
references them.
- The string map now has StringMapEntry<IdentifierInfo*> instead of
StringMapEntry<IdentifierInfo>. The IdentifierInfo object is
allocated using the same bump pointer allocator as used by the
StringMap.

Changes to IdentifierInfo:
- Added an extra pointer to point to the
StringMapEntry<IdentifierInfo*> in the string map. This pointer
will be null if the IdentifierInfo* is *only* used by the PTHLexer
(that is it isn't in the StringMap).

Algorithmic changes:
- Non-PTH case:
IdentifierInfo::get() will always consult the StringMap first to
see if we have an IdentifierInfo object. If that StringMapEntry
references a null pointer, we allocate a new one from the BumpPtrAllocator
and update the reference in the StringMapEntry.
- PTH case:
We do the same lookup as with the non-PTH case, but if we don't get
a hit in the StringMap we do a secondary lookup in the PTHManager for
the IdentifierInfo. If we don't find an IdentifierInfo we create a
new one as in the non-PTH case. If we do find and IdentifierInfo
in the PTHManager, we update the StringMapEntry to refer to it so
that the IdentifierInfo will be found on the next StringMap lookup.
This way we only do a binary search in the PTH file at most once
for a given IdentifierInfo. This greatly speeds things up for source
files containing a non-trivial amount of code.

Performance impact:
While these changes do add some extra indirection in
IdentifierTable to access an IdentifierInfo*, I saw speedups even
in the non-PTH case as well.

Non-PTH: For -fsyntax-only on Cocoa.h, we see a 6% speedup.
PTH (with Cocoa.h in token cache): 11% speedup.

I also did an experiment where we did -fsyntax-only on a source file
including a large header and Cocoa.h, but the token cache did not
contain the larger header. For this file, we were seeing a performance
*regression* when using PTH of 3% over non-PTH. Now we are seeing
a performance improvement of 9%!

Tests:
The serialization tests are now failing. I looked at this extensively,
and I my belief is that this change is unmasking a bug rather than
introducing a new one. I have disabled the serialization tests for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
ea9c26b3dbd74a1497f5609ae6e19a85f42b6073 21-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix: <rdar://problem/6510344> [pth] PTH slows down regular lexer considerably (when it has substantial work)

Changes to IdentifierTable:
- High-level summary: StringMap never owns IdentifierInfos. It just
references them.
- The string map now has StringMapEntry<IdentifierInfo*> instead of
StringMapEntry<IdentifierInfo>. The IdentifierInfo object is
allocated using the same bump pointer allocator as used by the
StringMap.

Changes to IdentifierInfo:
- Added an extra pointer to point to the
StringMapEntry<IdentifierInfo*> in the string map. This pointer
will be null if the IdentifierInfo* is *only* used by the PTHLexer
(that is it isn't in the StringMap).

Algorithmic changes:
- Non-PTH case:
IdentifierInfo::get() will always consult the StringMap first to
see if we have an IdentifierInfo object. If that StringMapEntry
references a null pointer, we allocate a new one from the BumpPtrAllocator
and update the reference in the StringMapEntry.
- PTH case:
We do the same lookup as with the non-PTH case, but if we don't get
a hit in the StringMap we do a secondary lookup in the PTHManager for
the IdentifierInfo. If we don't find an IdentifierInfo we create a
new one as in the non-PTH case. If we do find and IdentifierInfo
in the PTHManager, we update the StringMapEntry to refer to it so
that the IdentifierInfo will be found on the next StringMap lookup.
This way we only do a binary search in the PTH file at most once
for a given IdentifierInfo. This greatly speeds things up for source
files containing a non-trivial amount of code.

Performance impact:
While these changes do add some extra indirection in
IdentifierTable to access an IdentifierInfo*, I saw speedups even
in the non-PTH case as well.

Non-PTH: For -fsyntax-only on Cocoa.h, we see a 6% speedup.
PTH (with Cocoa.h in token cache): 11% speedup.

I also did an experiment where we did -fsyntax-only on a source file
including a large header and Cocoa.h, but the token cache did not
contain the larger header. For this file, we were seeing a performance
*regression* when using PTH of 3% over non-PTH. Now we are seeing
a performance improvement of 9%!

Tests:
The serialization tests are now failing. I looked at this extensively,
and I my belief is that this change is unmasking a bug rather than
introducing a new one. I have disabled the serialization tests for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
75324939f58f0e711da23b15297d06049b42864f 20-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Provide a placement new taking an ASTContext argument.
This allows more concise syntax when allocating an object using the ASTContext's allocator.
Convert a few allocations to this operator to for test purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e91b3bc1624ec877862e5d276f1b6f5026fe71e3 20-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Provide a placement new taking an ASTContext argument.
This allows more concise syntax when allocating an object using the ASTContext's allocator.
Convert a few allocations to this operator to for test purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5c6139b3e9f4efa272ac9da4ec8200bc064975ba 20-Jan-2009 Chris Lattner <sabre@nondot.org> Fix a crash Anders' was seeing due to free'ing an invalid pointer
caused by my previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
1833a83368bda46b76388069e52b27f12e60dc9c 20-Jan-2009 Chris Lattner <sabre@nondot.org> Fix a crash Anders' was seeing due to free'ing an invalid pointer
caused by my previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e7d9270833ec75befe87f19ea54d238fc0ca3088 20-Jan-2009 Anders Carlsson <andersca@mac.com> Improvements to Sema of asm statements. Fixes <rdar://problem/6156893>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d9fca6e3950346ea503f92f27ed0f9d8edde9feb 20-Jan-2009 Anders Carlsson <andersca@mac.com> Improvements to Sema of asm statements. Fixes <rdar://problem/6156893>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e5f128a410e2779c528616a76e7cd4559ecd1249 20-Jan-2009 Steve Naroff <snaroff@apple.com> Allocate expresssions through ASTContext (still more work to do).
Add debug hook to DeclContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
0a4739305a984ef9b821cedad5f4fe235eb6ef7d 20-Jan-2009 Steve Naroff <snaroff@apple.com> Allocate expresssions through ASTContext (still more work to do).
Add debug hook to DeclContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
892d5db7ee1e942aa7fcdf441b7e0e23ff996cf2 20-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Improving on encoding of objective-c's property types. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
090b3f71702c5626d8520f9608d77c6f26dcfa15 20-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Improving on encoding of objective-c's property types. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
defaf41313d7f08484ccca659c500722ba5a8f2a 20-Jan-2009 Chris Lattner <sabre@nondot.org> Optimize Declarator to avoid malloc/free traffic for the argument list of a
function DeclaratorChunk in common cases. This uses a fixed array in
Declarator when it is small enough for the first function declarator chunk
in a declarator.

This eliminates all malloc/free traffic from DeclaratorChunk::getFunction
when running on Cocoa.h except for five functions: signal/bsd_signal/sigset,
which have multiple Function DeclChunk's, and
CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than
16 arguments.

This patch was pair programmed with Steve.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
5af2f35c6ad1cb78b2aed3705d221954d1689b8a 20-Jan-2009 Chris Lattner <sabre@nondot.org> Optimize Declarator to avoid malloc/free traffic for the argument list of a
function DeclaratorChunk in common cases. This uses a fixed array in
Declarator when it is small enough for the first function declarator chunk
in a declarator.

This eliminates all malloc/free traffic from DeclaratorChunk::getFunction
when running on Cocoa.h except for five functions: signal/bsd_signal/sigset,
which have multiple Function DeclChunk's, and
CFUUIDCreateWithBytes/CFUUIDGetConstantUUIDWithBytes, which take more than
16 arguments.

This patch was pair programmed with Steve.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62599 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
9ac66d25bcaeb7594368dfe20def4174032d1c49 20-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Rename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document both it and DeclContext::addDecl properly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
40f4e69002af9623a1f959bd57b99afda186a6a7 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Rename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document both it and DeclContext::addDecl properly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1d411123bee0cc2e08394f32a24c986a93424e65 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3350: add special-casing for "references" to va_lists in
builtins.

Also, a minor tweak to va_copy for consistency.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
6597f985156b3a24c0a9db1e01eeec85714c4a8d 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3350: add special-casing for "references" to va_lists in
builtins.

Also, a minor tweak to va_copy for consistency.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
f4006be67e6e90617340c7317831a803d006e443 20-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Remove the TopLevelDecls from TranslationUnit, since all of those decls are owned by the ASTContext's TranslationUnitDecl. There are definitely some leaking Decls now that I'll tackle tomorrow

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
00ad0ef8369ee65337ff29c8db3c1841a01102c4 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Remove the TopLevelDecls from TranslationUnit, since all of those decls are owned by the ASTContext's TranslationUnitDecl. There are definitely some leaking Decls now that I'll tackle tomorrow

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
ff662f1910e027b708db1e6b3c21d0294e405d5b 20-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Fix Decl::NextDeclInScope access issue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
0cba85577ae613bce5768f3089003629a46b0e7f 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix Decl::NextDeclInScope access issue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
af8ad2b4dcc1d03fec720ab2c20d9eaf4754e496 20-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
4afa39deaa245592977136d367251ee2c173dd8d 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
f8e62a683f3ca1c571cb8a4c6b35b8e246fd0d16 20-Jan-2009 Ted Kremenek <kremenek@apple.com> Dead stores checker: Fix <rdar://problem/6506065> by being more selective when say that a store is dead even though the computed value is used in the enclosing expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
7f5fce7200fdbf03f7d70134a57271e584fcb766 20-Jan-2009 Ted Kremenek <kremenek@apple.com> Dead stores checker: Fix <rdar://problem/6506065> by being more selective when say that a store is dead even though the computed value is used in the enclosing expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
5457c5e9eb67e6f2974499ecd60f814456f15886 19-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more expression actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b8a6aca87d07b22b257153ce0dfc92f78c8f8c1f 19-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more expression actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c70e7d095b3944cb38f2e522c352e9f6a46faff3 19-Jan-2009 Ted Kremenek <kremenek@apple.com> Allocate Types using ASTContext's 'Allocator' object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
566c2ba743065ec090f5154d5c30cf593aa12a6e 19-Jan-2009 Ted Kremenek <kremenek@apple.com> Allocate Types using ASTContext's 'Allocator' object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
46fe06e7544e7cbe79b893fb028c3ecd45feec00 19-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Centralize error reporting of improper uses of incomplete types in the
new DiagnoseIncompleteType. It provides additional information about
struct/class/union/enum types when possible, either by pointing to the
forward declaration of that type or by pointing to the definition (if
we're in the process of defining that type).
Fixes <rdar://problem/6500531>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4ec339f43c0cae2678334850c90926bea10999c7 19-Jan-2009 Douglas Gregor <dgregor@apple.com> Centralize error reporting of improper uses of incomplete types in the
new DiagnoseIncompleteType. It provides additional information about
struct/class/union/enum types when possible, either by pointing to the
forward declaration of that type or by pointing to the definition (if
we're in the process of defining that type).
Fixes <rdar://problem/6500531>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d2e00178ab1c484976e339e3d0c2eab5a6e6f5a1 19-Jan-2009 Chris Lattner <sabre@nondot.org> rearrange SourceManager methods to group them by kind. Remove the
SourceManager::getFileCharacteristic(FileID) method: we need a
full location to know if it is a system header etc in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
06a062dc784c609b75dca15fd97f468d0d846596 19-Jan-2009 Chris Lattner <sabre@nondot.org> rearrange SourceManager methods to group them by kind. Remove the
SourceManager::getFileCharacteristic(FileID) method: we need a
full location to know if it is a system header etc in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
1737bd5b2ae87c2fe2d50868c2158f7f91516cf4 19-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceManager::getCanonicalFileID -> getFileID. There is
no longer such thing as a non-canonical FileID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a11d61793341fea195c29a0dab3fbd74f2b39a8c 19-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceManager::getCanonicalFileID -> getFileID. There is
no longer such thing as a non-canonical FileID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c69327fe19231ce503fb14100c4f79759aed9435 19-Jan-2009 Chris Lattner <sabre@nondot.org> remove the public SourceManager::getContentCacheForLoc method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2fa3ec888a980bf09e3d68435e227d3c4280bf70 19-Jan-2009 Chris Lattner <sabre@nondot.org> remove the public SourceManager::getContentCacheForLoc method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
9b94e1bc3596363efdc356e70648efb92048f6ef 19-Jan-2009 Chris Lattner <sabre@nondot.org> remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
b21e5a0fdd9bd6e6c6885428798070f0a9f71295 19-Jan-2009 Chris Lattner <sabre@nondot.org> remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
71e443ac92dfcabc34e8c1a9ac12a7ab602b9d37 19-Jan-2009 Chris Lattner <sabre@nondot.org> SourceManager::getBufferData(SourceLocation) is dead, delete it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
31530bae788dea5c79e72a1f99a56c3f5c6aa36f 19-Jan-2009 Chris Lattner <sabre@nondot.org> SourceManager::getBufferData(SourceLocation) is dead, delete it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
10ea72bafb85f8f60f3547db54c7f9f990e821a3 19-Jan-2009 Chris Lattner <sabre@nondot.org> some minor cleanups to SourceManager, and eliminate the
SourceManager::getBuffer(SourceLocation) method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a90a4d4a0a365f991b92e925436ec63ef4969839 19-Jan-2009 Chris Lattner <sabre@nondot.org> some minor cleanups to SourceManager, and eliminate the
SourceManager::getBuffer(SourceLocation) method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a7ba6be203ba913685b68e20b44881f29ad5d8a1 19-Jan-2009 Chris Lattner <sabre@nondot.org> privatize getChunkID/getMacroID, and move operator< out of the class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
6fda54c19321673965536b0a8f7236f635cf9730 19-Jan-2009 Chris Lattner <sabre@nondot.org> privatize getChunkID/getMacroID, and move operator< out of the class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
c94da86aaca6deb9a1f4df716742b07c706159ea 19-Jan-2009 Chris Lattner <sabre@nondot.org> Make some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
9ebac5e0dab6f99717e3ff169c45048966146b2e 19-Jan-2009 Chris Lattner <sabre@nondot.org> Make some enums in SourceLocation private, remove a useless assertion from ScratchBuffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
dd15342a0cf65ec7d208f5e54a0c9b0715e44800 19-Jan-2009 Chris Lattner <sabre@nondot.org> make a bunch of more SourceLocation methods private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
4d10ef18c32eae35be07e0d8d18b5ff485b4c5f9 19-Jan-2009 Chris Lattner <sabre@nondot.org> make a bunch of more SourceLocation methods private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
e805eac7695261a12e342baeba4f8c0838369902 19-Jan-2009 Chris Lattner <sabre@nondot.org> Make SourceLocation::getFileLoc private to reduce the API exposure of
SourceLocation. This requires making some cleanups to token pasting
and _Pragma expansion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
bcc2a67e5180612417727cbdd8afd0f79fdf726d 19-Jan-2009 Chris Lattner <sabre@nondot.org> Make SourceLocation::getFileLoc private to reduce the API exposure of
SourceLocation. This requires making some cleanups to token pasting
and _Pragma expansion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
beae72d7a7e768056671c306300cf619d85a0c33 19-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ec0d7a6f4b0699cc9960e6d9fee0f957c64d1cf9 19-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix a typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8b76997ec19a90aa0db4e90d50710cef86bf09f5 19-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more expression actions to smart pointers.
Fix type of logical negation for C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0eb23307222bda7ad95d968eac4e1ab30864b213 19-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more expression actions to smart pointers.
Fix type of logical negation for C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
cb8cc5b95fed5f810fe5e6a8e7ee31781ec81ddd 18-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> fix deallocation of FunctionDecl::ParamInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
460b0ac80382fa73337d21dd052c1f18b27435d8 18-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> fix deallocation of FunctionDecl::ParamInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cd883f7c200bba826ed89a41c89b1a125dd3f524 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a few expression actions to smart pointers.
These actions are extremely widely used (identifier expressions and literals); still no performance regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
cd965b97cfac7b7a53a835810ec2bc2ac7a9dd1a 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a few expression actions to smart pointers.
These actions are extremely widely used (identifier expressions and literals); still no performance regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6619aa5526772df85680044149a5b4f877a797ca 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Rename move_convert to move_arg and move_res. The new names are less misleading (and shorter).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
f512e82f56671b695a32d019103e62a302838b7e 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Rename move_convert to move_arg and move_res. The new names are less misleading (and shorter).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
b3860a7d4a4dae7a599dbd8ea6c4490b78cb3c01 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert ObjC statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
431e90e887c21c0d0d56fc12a2d359df8d53ea66 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert ObjC statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c6b86338be45f235c01f42bed1170b68a8c82bb7 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert asm statement action to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
3037ed0a27dba62e522304183718efc149e8b6d9 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert asm statement action to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
539eb571e81a65adfb664dc712accc82afead0ae 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
4cffe2fd5c23168bc08f0453c684cbd3f79471d3 18-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert more statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c5583730748dda677bc22fdb6605fac1f235edbf 18-Jan-2009 Chris Lattner <sabre@nondot.org> Switch MinimalAction from new/delete'ing its TypeNameInfo to
allocating them from a recycling bump pointer allocator. This
reduces malloc/free traffic of parse-noop (but no other mode),
which makes sharking -parse-noop more meaningful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e1ae1e910a169b62731be5019eab7e396f953fc4 18-Jan-2009 Chris Lattner <sabre@nondot.org> Switch MinimalAction from new/delete'ing its TypeNameInfo to
allocating them from a recycling bump pointer allocator. This
reduces malloc/free traffic of parse-noop (but no other mode),
which makes sharking -parse-noop more meaningful.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
cbcd26cd20950deadbf94383560b7f474ae239c1 18-Jan-2009 Chris Lattner <sabre@nondot.org> rearrange GetIdentifierInfo so that the fast path can be partially inlined into PTHLexer::Lex. This speeds up the user time of PTH -Eonly by another 2ms (4.4%)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
77ecb3a28f21496ecfdbb3d5f5b66b0d2abf48c9 18-Jan-2009 Chris Lattner <sabre@nondot.org> rearrange GetIdentifierInfo so that the fast path can be partially inlined into PTHLexer::Lex. This speeds up the user time of PTH -Eonly by another 2ms (4.4%)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
b2bbf06c67cea8cf482cd6bbabf5175d0b15a93b 18-Jan-2009 Chris Lattner <sabre@nondot.org> Avoid malloc thrashing on the std::vector for ConditionalStack. Because
there is one of these per header, this almost always gets alloc/free'd for
each #ifdef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
3a874a405d1913b132e4ecfa52e22c4e2264b05d 18-Jan-2009 Chris Lattner <sabre@nondot.org> Avoid malloc thrashing on the std::vector for ConditionalStack. Because
there is one of these per header, this almost always gets alloc/free'd for
each #ifdef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
f1791b0a471cd61641eca7f4c0815cdce2f105ea 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Eliminate tabs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/Action.h
4b4218f48fef71a179c5a8287dae281580faf52f 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Eliminate tabs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/Action.h
efb353440d5661ba924c82adfdbb38d2106d1b70 18-Jan-2009 Chris Lattner <sabre@nondot.org> switch PTH lexer from using "const char*"s to "const unsigned char*"s
internally. This is just a cleanup that reduces the need to cast to
unsigned char before assembling a larger integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
da9d61c96c412f6babc7f824152609562f302388 18-Jan-2009 Chris Lattner <sabre@nondot.org> switch PTH lexer from using "const char*"s to "const unsigned char*"s
internally. This is just a cleanup that reduces the need to cast to
unsigned char before assembling a larger integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
b5c856952c206e629257552bc453cfa3975eb800 18-Jan-2009 Anders Carlsson <andersca@mac.com> Add sema support for symbolic names in inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
42e1ee0702d8267d632df0fdb5c479a582877c6f 18-Jan-2009 Anders Carlsson <andersca@mac.com> Add sema support for symbolic names in inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1486b507eb8b13d3cc77b42a32395a811c5c962e 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Update support for vector component access on ExtVectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62440 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
353417af9d254d4fd0eb7d0a3ff71c4d8594ac58 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Update support for vector component access on ExtVectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62440 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c45d4e8bd9e99916f106b901a74f3c56c71b6c50 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Add support for vectors to APValue. Vector constant evaluator and tests coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
3d309f9d62a6f9f634b869937139d533ccd7265b 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Add support for vectors to APValue. Vector constant evaluator and tests coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
5738547dc1aee87a6f35c0f83daf861826222fb6 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Remove outdated diagnostic. Tests are coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
334a802eeb5acb959f99b8227ee995725b2624aa 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Remove outdated diagnostic. Tests are coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2aaa0a0c99d5288309144eee09e9247cea6c3df5 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Allow targets to override IntMaxTWidth


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
22b9d5a1fd9067785b62d9237bae6ee2a9b40afc 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Allow targets to override IntMaxTWidth


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
7b49cec50220b69d83616aea2d5da3ce049611a0 18-Jan-2009 Anders Carlsson <andersca@mac.com> Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/TargetInfo.h
45b050e72d058131e6f169fe54888bb91a003fb5 18-Jan-2009 Anders Carlsson <andersca@mac.com> Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/TargetInfo.h
8f314559e532befc799289ab9b554af1f92baf29 18-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose that property name cannot be a bitfield


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
573acde1db5cb3e216e3d63fee173230834093d8 18-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose that property name cannot be a bitfield


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7b4695fff245e34f9503e1654b8310f788c1bb41 17-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when method parameter is an object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
9bae5e7af04e44b4d333a2c7ba22608d0594ff9f 17-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when method parameter is an object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
10aaf53ac6464331d773706c1c66f5cc00e44817 17-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID. This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't. Fix these along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Driver/TextDiagnosticPrinter.h
3b4d5e955e819dd3a4bed37ea2e47d6e4cb05274 17-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID. This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't. Fix these along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Driver/TextDiagnosticPrinter.h
cef77824d56ba0b02ab010076b03ebe2be938b40 17-Jan-2009 Chris Lattner <sabre@nondot.org> Change the Lexer ctor used to lex _Pragma directives into a static factory
method. This lets us clean up the interface and make it more obvious that
this method is *really really* _Pragma specific.

Note that _Pragma handling uglifies the Lexer in the critical path. It would
be very interesting to consider making _Pragma remapping be a new special
lexer class of its own.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
42e00d19b0dac64732eb5449d52a076282fcbf77 17-Jan-2009 Chris Lattner <sabre@nondot.org> Change the Lexer ctor used to lex _Pragma directives into a static factory
method. This lets us clean up the interface and make it more obvious that
this method is *really really* _Pragma specific.

Note that _Pragma handling uglifies the Lexer in the critical path. It would
be very interesting to consider making _Pragma remapping be a new special
lexer class of its own.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
3c727d6a1cb1d4fd85e362d5fcbf93e0c2460930 17-Jan-2009 Chris Lattner <sabre@nondot.org> simplify PTHManager::CreateLexer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
f056d92e182cbe4f62c8d14102544dc38066dabc 17-Jan-2009 Chris Lattner <sabre@nondot.org> simplify PTHManager::CreateLexer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
5df086fdd364e7223773f719d1a02475d5360c53 17-Jan-2009 Chris Lattner <sabre@nondot.org> Change the Lexer ctor used in the non _Pragma case to take a FileID instead
of a SourceLocation. This should speed it up and definitely simplifies it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
88d3ac1341aa016cabd966c5b113a95ac05ea43f 17-Jan-2009 Chris Lattner <sabre@nondot.org> Change the Lexer ctor used in the non _Pragma case to take a FileID instead
of a SourceLocation. This should speed it up and definitely simplifies it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
54edb96eae5fcd6c09fe5a869ea24ca2b7e75f0c 17-Jan-2009 Chris Lattner <sabre@nondot.org> More simplifications to the lexer ctors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
0770dabb1ae81a2a9c2e7199262067103062a0b3 17-Jan-2009 Chris Lattner <sabre@nondot.org> More simplifications to the lexer ctors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
ded7b32788c1093191fd4e14b3c073de6c6e8a45 17-Jan-2009 Chris Lattner <sabre@nondot.org> make the verbose raw-lexer ctor fully explicit instead of having
embedded magic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
de96c0f29c4cacabe6ea577c61db87c2a85aea6c 17-Jan-2009 Chris Lattner <sabre@nondot.org> make the verbose raw-lexer ctor fully explicit instead of having
embedded magic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
c7b23595cb9ffc38bc2490f85e9f5d1df6bf9d97 17-Jan-2009 Chris Lattner <sabre@nondot.org> add a simplified lexer ctor that sets up the lexer to raw-lex an
entire file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
025c3a66402fb713c2d9bf5dc174ff264765379a 17-Jan-2009 Chris Lattner <sabre@nondot.org> add a simplified lexer ctor that sets up the lexer to raw-lex an
entire file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
9bb53675aa4bf7c9a7ba29485df081558b6bd796 17-Jan-2009 Chris Lattner <sabre@nondot.org> refactor some common initialization code out of the two lexer ctors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
22d91ca8d7c134eac5cc6a4869e6a84c461ad624 17-Jan-2009 Chris Lattner <sabre@nondot.org> refactor some common initialization code out of the two lexer ctors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
e7fc9627348711f86b0392f3201f5d7e7c1e6c55 17-Jan-2009 Chris Lattner <sabre@nondot.org> suck the call to "getSpellingLoc" that all clients do into
the implementation of PTHManager::getSpelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
6b7b84036126a8f2a3e312cfec0a9a4f8ae9d8ed 17-Jan-2009 Chris Lattner <sabre@nondot.org> suck the call to "getSpellingLoc" that all clients do into
the implementation of PTHManager::getSpelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
f4f776a489cfcf4fda9a8c6a16329c7a1f726561 17-Jan-2009 Chris Lattner <sabre@nondot.org> this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation. *That* FileID may refer to the start of a file or to a
chunk within it. The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Lex/ScratchBuffer.h
lang/Rewrite/HTMLRewrite.h
lang/Rewrite/Rewriter.h
lang/Rewrite/TokenRewriter.h
2b2453a7d8fe732561795431f39ceb2b2a832d84 17-Jan-2009 Chris Lattner <sabre@nondot.org> this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation. *That* FileID may refer to the start of a file or to a
chunk within it. The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
lang/Lex/ScratchBuffer.h
lang/Rewrite/HTMLRewrite.h
lang/Rewrite/Rewriter.h
lang/Rewrite/TokenRewriter.h
ac49bb4836894b75d0dc2f6fb2703ed7a8d9ff35 17-Jan-2009 Chris Lattner <sabre@nondot.org> make "ContentCache::Buffer" mutable to avoid a const_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
05816591ec488a933dfecc9ff9f3cbf3c32767c2 17-Jan-2009 Chris Lattner <sabre@nondot.org> make "ContentCache::Buffer" mutable to avoid a const_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
ef63fd52b67e83143de8c6f48d1571deff360ced 17-Jan-2009 Chris Lattner <sabre@nondot.org> Instead of iterating over FileID's, have PTH generation iterate over the
content cache directly. Content cache has a 1-1 mapping with fileentries,
whereas multiple FileIDs can be the same FileEntry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c6fe32a91c7372caf09152ee31a24c4b5d24deed 17-Jan-2009 Chris Lattner <sabre@nondot.org> Instead of iterating over FileID's, have PTH generation iterate over the
content cache directly. Content cache has a 1-1 mapping with fileentries,
whereas multiple FileIDs can be the same FileEntry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
72de8493647493a81b3d73d39369e5231393a1d5 17-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Warn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8158f692571ba5eaae19e086b76d19319ac503c5 17-Jan-2009 Douglas Gregor <dgregor@apple.com> Warn about typedefs of enums without any declarator name. Fixes rdar://problem/6503878

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
98b275417eab0af35ba0bf0d7dbd89253c710f3c 17-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Teach DeclContext how to find the primary declaration for any TagDecl
even when we are still defining the TagDecl. This is required so that
qualified name lookup of a class name within its definition works (see
the new bits in test/SemaCXX/qualified-id-lookup.cpp).

As part of this, move the nested redefinition checking code into
ActOnTag. This gives us diagnostics earlier (when we try to perform
the nested redefinition, rather than when we try to complete the 2nd
definition) and removes some code duplication.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/SourceLocation.h
lang/Parse/Action.h
0b7a158d120ac8d78c114a823e17eedfec6b6658 17-Jan-2009 Douglas Gregor <dgregor@apple.com> Teach DeclContext how to find the primary declaration for any TagDecl
even when we are still defining the TagDecl. This is required so that
qualified name lookup of a class name within its definition works (see
the new bits in test/SemaCXX/qualified-id-lookup.cpp).

As part of this, move the nested redefinition checking code into
ActOnTag. This gives us diagnostics earlier (when we try to perform
the nested redefinition, rather than when we try to complete the 2nd
definition) and removes some code duplication.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Type.h
lang/Basic/SourceLocation.h
lang/Parse/Action.h
19c74d3a0fb0dfe747c2d03f5d48f8c17ac8d927 17-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more statement actions to smart pointers.
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f05b1520d6f175acbfc3913489f4dfa842875ec4 17-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more statement actions to smart pointers.
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a9bf63bb775d21abbc74e908b48dab32c00219b4 17-Jan-2009 Chris Lattner <sabre@nondot.org> eliminate FullSourceLoc::getLocation() now that FullSourceLoc
*is* the location. This eliminates some weird X.getLocation().getLocation()'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
59ddeabc4c0aa2fdeef5a9183e8af69db07b5e74 17-Jan-2009 Chris Lattner <sabre@nondot.org> eliminate FullSourceLoc::getLocation() now that FullSourceLoc
*is* the location. This eliminates some weird X.getLocation().getLocation()'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
438f939575eadda9724fe897c03328cdad1f0f81 17-Jan-2009 Chris Lattner <sabre@nondot.org> Make FullSourceLoc derive from SourceLocation instead of
containing one. Containment is generally better than derivation,
but in this case FullSourceLoc really 'isa' SourceLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
a50bd54164393ca3cd08016e7099bdeb531b5014 17-Jan-2009 Chris Lattner <sabre@nondot.org> Make FullSourceLoc derive from SourceLocation instead of
containing one. Containment is generally better than derivation,
but in this case FullSourceLoc really 'isa' SourceLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
6bca88b965b3d7a96bb97a86d93d8fdefa1d90c2 16-Jan-2009 Chris Lattner <sabre@nondot.org> elimiante FullSourceLoc::getCanonicalFileID



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
4abb87ef149b98b5762eadaaf10c1ccf35dc7c41 16-Jan-2009 Chris Lattner <sabre@nondot.org> elimiante FullSourceLoc::getCanonicalFileID



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
eccf95e552de02358e391977821137c3ecdba0d3 16-Jan-2009 Chris Lattner <sabre@nondot.org> remove FullSourceLoc::isFileID


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
0cf7bb937d5ed21118eeb45a93eb916723cc75a1 16-Jan-2009 Chris Lattner <sabre@nondot.org> remove FullSourceLoc::isFileID


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
5ac8ffadad9f47686a75f8014cc389d1409bed96 16-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Fix <rdar://problem/6502934>. We were creating an ImplicitCastExpr
with reference type (it should be an lvalue with non-reference type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
66b947fdf9104b53d7e8caa8f71ee0c0e3fe1521 16-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix <rdar://problem/6502934>. We were creating an ImplicitCastExpr
with reference type (it should be an lvalue with non-reference type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62345 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1055b4fa2aa68e11ab80e0f907d41ab971f88d56 16-Jan-2009 Chris Lattner <sabre@nondot.org> Improve #pragma comment support by building the string argument and
notifying PPCallbacks about it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
a9d9145741ef77db45890911674705b81605b10b 16-Jan-2009 Chris Lattner <sabre@nondot.org> Improve #pragma comment support by building the string argument and
notifying PPCallbacks about it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PPCallbacks.h
9eaf2b7d18d5ebf778dcd478c051e1a9b7edd137 16-Jan-2009 Chris Lattner <sabre@nondot.org> minor cleanups to StringLiteralParser: no need to pass target info
into its ctor. Also, make it handle validity checking of pascal
strings instead of making clients do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
bbee00b6456e90a09f63c83c20233e6c5ad6000a 16-Jan-2009 Chris Lattner <sabre@nondot.org> minor cleanups to StringLiteralParser: no need to pass target info
into its ctor. Also, make it handle validity checking of pascal
strings instead of making clients do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
861e79049d4d463c4c5d04a422a7eaf50243ea7d 16-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Part one of handling C++ functional casts. This handles semantic
analysis and AST-building for the cases where we have N != 1
arguments. For N == 1 arguments, we need to finish the C++
implementation of explicit type casts (C++ [expr.cast]).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
506ae418eb171d072f2fb4f6bc46d258b52cbf97 16-Jan-2009 Douglas Gregor <dgregor@apple.com> Part one of handling C++ functional casts. This handles semantic
analysis and AST-building for the cases where we have N != 1
arguments. For N == 1 arguments, we need to finish the C++
implementation of explicit type casts (C++ [expr.cast]).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
146c567ca7dea1044931a781ccf3c5234a253398 16-Jan-2009 Chris Lattner <sabre@nondot.org> Implement basic support for parsing #pragma comment, a microsoft extension
documented here:
http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx

This is according to my understanding reading the docs, I don't know if it
really agrees fully with what VC++ allows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
636c5ef6572e899d36cec1b0023fb28ba65189e1 16-Jan-2009 Chris Lattner <sabre@nondot.org> Implement basic support for parsing #pragma comment, a microsoft extension
documented here:
http://msdn.microsoft.com/en-us/library/7f0aews7(VS.80).aspx

This is according to my understanding reading the docs, I don't know if it
really agrees fully with what VC++ allows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
18c8dc0eedcdf7c81028c1e29d001fd331a99a4c 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
f7cf85b330bedd2877e1371fb0a83e99751ae162 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
74f6701b77493fb60c98ac036e8a24eddaa6219b 16-Jan-2009 Chris Lattner <sabre@nondot.org> rename "virtual location" of a macro to "instantiation location".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
88054dee0402e4d3c1f64e6b697acc47195c0d72 16-Jan-2009 Chris Lattner <sabre@nondot.org> rename "virtual location" of a macro to "instantiation location".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
fd5f14340189da032be0af550199c039c8709ff3 16-Jan-2009 Chris Lattner <sabre@nondot.org> rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt.
Slightly speed up sema of numbers like '1' by going directly to
TargetInfo instead of through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0c21e84b82191ae1c4d04444a84008c464433868 16-Jan-2009 Chris Lattner <sabre@nondot.org> rename PP::getPhysicalCharacterAt -> PP::getSpelledCharacterAt.
Slightly speed up sema of numbers like '1' by going directly to
TargetInfo instead of through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
cdf600ee2c48a0299a0bc15da479b6a818c997ed 16-Jan-2009 Chris Lattner <sabre@nondot.org> Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
df7c17a8d02fe09a3466786bae3e40fc3252687a 16-Jan-2009 Chris Lattner <sabre@nondot.org> Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
b9ef055f4db55de642f2873343654efb6eaaaf9e 16-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Improve diagnostics for ambiguous name lookup results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4dc6b1c81c5efbaf68b868df10b18466b5e14b34 16-Jan-2009 Douglas Gregor <dgregor@apple.com> Improve diagnostics for ambiguous name lookup results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d976c3d889dc90b684c4a3fbdbe975e525db6c4f 15-Jan-2009 Ted Kremenek <kremenek@apple.com> IdentifierInfo:
- IdentifierInfo can now (optionally) have its string data not be
co-located with itself. This is for use with PTH. This aspect is a
little gross, as getName() and getLength() now make assumptions
about a possible alternate representation of IdentifierInfo.
Perhaps we should make IdentifierInfo have virtual methods?

IdentifierTable:
- Added class "IdentifierInfoLookup" that can be used by
IdentifierTable to perform "string -> IdentifierInfo" lookups using
an auxilliary data structure. This is used by PTH.
- Perform tests show that IdentifierTable::get() does not slow down
because of the extra check for the IdentiferInfoLookup object (the
regular StringMap lookup does enough work to mitigate the impact of
an extra null pointer check).
- The upshot is that now that some IdentifierInfo objects might be
owned by the IdentiferInfoLookup object. This should be reviewed.

PTH:
- Modified PTHManager::GetIdentifierInfo to *not* insert entries in
IdentifierTable's string map, and instead create IdentifierInfo
objects on the fly when mapping from persistent IDs to
IdentifierInfos. This saves a ton of work with string copies,
hashing, and StringMap lookup and resizing. This change was
motivated because when processing source files in the PTH cache we
don't need to do any string -> IdentifierInfo lookups.
- PTHManager now subclasses IdentifierInfoLookup, allowing clients of
IdentifierTable to transparently use IdentifierInfo objects managed
by the PTH file. PTHManager resolves "string -> IdentifierInfo"
queries by doing a binary search over a sorted table of identifier
strings in the PTH file (the exact algorithm we use can be changed
as needed).

These changes lead to the following performance changes when using PTH on Cocoa.h:
- fsyntax-only: 10% performance improvement
- Eonly: 30% performance improvement


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
72b1b15ee88aac0a63e2c1dc53fe22f5ab297b20 15-Jan-2009 Ted Kremenek <kremenek@apple.com> IdentifierInfo:
- IdentifierInfo can now (optionally) have its string data not be
co-located with itself. This is for use with PTH. This aspect is a
little gross, as getName() and getLength() now make assumptions
about a possible alternate representation of IdentifierInfo.
Perhaps we should make IdentifierInfo have virtual methods?

IdentifierTable:
- Added class "IdentifierInfoLookup" that can be used by
IdentifierTable to perform "string -> IdentifierInfo" lookups using
an auxilliary data structure. This is used by PTH.
- Perform tests show that IdentifierTable::get() does not slow down
because of the extra check for the IdentiferInfoLookup object (the
regular StringMap lookup does enough work to mitigate the impact of
an extra null pointer check).
- The upshot is that now that some IdentifierInfo objects might be
owned by the IdentiferInfoLookup object. This should be reviewed.

PTH:
- Modified PTHManager::GetIdentifierInfo to *not* insert entries in
IdentifierTable's string map, and instead create IdentifierInfo
objects on the fly when mapping from persistent IDs to
IdentifierInfos. This saves a ton of work with string copies,
hashing, and StringMap lookup and resizing. This change was
motivated because when processing source files in the PTH cache we
don't need to do any string -> IdentifierInfo lookups.
- PTHManager now subclasses IdentifierInfoLookup, allowing clients of
IdentifierTable to transparently use IdentifierInfo objects managed
by the PTH file. PTHManager resolves "string -> IdentifierInfo"
queries by doing a binary search over a sorted table of identifier
strings in the PTH file (the exact algorithm we use can be changed
as needed).

These changes lead to the following performance changes when using PTH on Cocoa.h:
- fsyntax-only: 10% performance improvement
- Eonly: 30% performance improvement


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/PTHManager.h
lang/Lex/Preprocessor.h
27b33952a3df9f60f9de6a2c6d20ccebc0d0149e 15-Jan-2009 Seo Sanghyeon <sanxiyn@gmail.com> PR2746: Implement GCC cast to union extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
eff2cd58a897379c7fc46e83447d4619d6f6e9ca 15-Jan-2009 Seo Sanghyeon <sanxiyn@gmail.com> PR2746: Implement GCC cast to union extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
29dfa2f9174742d4ca1a4bfbb74e615eeddb497c 15-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Initial implementation of member name lookup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7176fff961e04c4dff61efb967b1d344d41335a7 15-Jan-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of member name lookup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6214d8a05f448cccc9aa9dd7b3b00c274013d75d 14-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce support for C++0x explicit conversion operators (N2437)

Small cleanup in the handling of user-defined conversions.

Also, implement an optimization when constructing a call. We avoid
recomputing implicit conversion sequences and instead use those
conversion sequences that we computed as part of overload resolution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
09f41cf63f4df0bf4e98ee473e44e9a95b68f0ff 14-Jan-2009 Douglas Gregor <dgregor@apple.com> Introduce support for C++0x explicit conversion operators (N2437)

Small cleanup in the handling of user-defined conversions.

Also, implement an optimization when constructing a call. We avoid
recomputing implicit conversion sequences and instead use those
conversion sequences that we computed as part of overload resolution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
172e06da3e1af52c97069c81acb08ce4592e1ba9 14-Jan-2009 Steve Naroff <snaroff@apple.com> Add a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
be63802d1efe52697f49aafea49a5028b30b0aff 14-Jan-2009 Steve Naroff <snaroff@apple.com> Add a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8494c967ba170c792681ba6b64ffe8ad61a8b6ff 14-Jan-2009 Ted Kremenek <kremenek@apple.com> FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
fc767615bc67d3a7587b1fb2e0494c32c9dbd7a5 14-Jan-2009 Ted Kremenek <kremenek@apple.com> FunctionDecl::setParams() now uses the allocator associated with ASTContext to allocate the array of ParmVarDecl*'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
82f549690d7edcdffe624a166bea4357df78dfe4 14-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type
objects as an objective-c object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
fa23c1d9adc99c662c1c0e192817185809d95614 14-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Implemenent objective-c's NSObject attribute as a way of ddeclaraing c-type
objects as an objective-c object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
dbde2284818a4085a59ef1a45ece0709f81c04e5 14-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH:
- Use canonical FileID when using getSpelling() caching. This
addresses some cache misses we were seeing with -fsyntax-only on
Cocoa.h
- Added Preprocessor::getPhysicalCharacterAt() utility method for
clients to grab the first character at a specified sourcelocation.
This uses the PTH spelling cache.
- Modified Sema::ActOnNumericConstant() to use
Preprocessor::getPhysicalCharacterAt() instead of
SourceManager::getCharacterData() (to get PTH hits).

These changes cause -fsyntax-only to not page in any sources from
Cocoa.h. We see a speedup of 27%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
28396608ec20d44e9d1470e1ea51689bb504d0de 14-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH:
- Use canonical FileID when using getSpelling() caching. This
addresses some cache misses we were seeing with -fsyntax-only on
Cocoa.h
- Added Preprocessor::getPhysicalCharacterAt() utility method for
clients to grab the first character at a specified sourcelocation.
This uses the PTH spelling cache.
- Modified Sema::ActOnNumericConstant() to use
Preprocessor::getPhysicalCharacterAt() instead of
SourceManager::getCharacterData() (to get PTH hits).

These changes cause -fsyntax-only to not page in any sources from
Cocoa.h. We see a speedup of 27%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
80c720e111fb7c3e9f939bde477bccced7a77a23 14-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Permitting typedefs without a name is a Microsoft/GNU extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ee159c14c1ac99d7944645e2b111b04dca089855 14-Jan-2009 Douglas Gregor <dgregor@apple.com> Permitting typedefs without a name is a Microsoft/GNU extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2106942de5a260754e5aa1161e82143b456a3f71 13-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH: Fix remaining cases where the spelling cache in the PTH file was being missed when it shouldn't. This shaves another 7% off PTH time for -Eonly on Cocoa.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
f02f6f0ee3e05b958bcf67f00f4503671d67eccd 13-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH: Fix remaining cases where the spelling cache in the PTH file was being missed when it shouldn't. This shaves another 7% off PTH time for -Eonly on Cocoa.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
f18783ed9d00b74377fd9e9d3fb642ae16e187d8 13-Jan-2009 Chris Lattner <sabre@nondot.org> use a slightly more sensible position for an array ref's "getExprLoc"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5cd9d6daf3acd4cc87fecebd81d9495b9e4ba9cd 13-Jan-2009 Chris Lattner <sabre@nondot.org> use a slightly more sensible position for an array ref's "getExprLoc"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
62da645073b2cd56a17a033d2dc52d645bc0b840 13-Jan-2009 Argiris Kirtzidis <akyrtzi@gmail.com> DeclContext::KindTrait was not meant to be used outside of DeclContext::CastTo (causes compilation error on MSVC).
Add DeclContext::getDeclKind() and use that instead of DeclContext::KindTrait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
9b9ca01ff3136a7539dc08a4c4e1a3dd8c8d3a7d 13-Jan-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> DeclContext::KindTrait was not meant to be used outside of DeclContext::CastTo (causes compilation error on MSVC).
Add DeclContext::getDeclKind() and use that instead of DeclContext::KindTrait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
fde627e5a8988f8b26ee651d893416814fec5134 13-Jan-2009 Anders Carlsson <andersca@mac.com> Warn when someone tries to pass a variable with a non-POD type to a varargs function/method/block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
906fed0fb54a338961aba3aa54802b7d68de94c7 13-Jan-2009 Anders Carlsson <andersca@mac.com> Warn when someone tries to pass a variable with a non-POD type to a varargs function/method/block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
16354a40c20182c2c174aeb65f3a1605f5941e88 13-Jan-2009 Ted Kremenek <kremenek@apple.com> static analyzer: Handle casts from arrays to integers. This fixes PR 3297.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
e1c2a675e0c089e1f53cbd55d2197a8beaa852ae 13-Jan-2009 Ted Kremenek <kremenek@apple.com> static analyzer: Handle casts from arrays to integers. This fixes PR 3297.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62130 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
03b2ad28d67ed14e2203eb1e92ce042f63182bcd 13-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
482b77d1cb4ca08391d1f749436f092a4cc24427 13-Jan-2009 Douglas Gregor <dgregor@apple.com> Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
0d64d359d6024259a8703990ac6c0e1afa53e7e3 12-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix crasher due to use-after-release: DeclContext now owns all ObjCMethodDecls, and shouldn't be released elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ee49d0496bb8ff2bbf479bb7fbcfbdc71eed7461 12-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix crasher due to use-after-release: DeclContext now owns all ObjCMethodDecls, and shouldn't be released elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b748fc51475dd9336219fb05401ac936edaa8c58 12-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Implement support for anonymous structs and unions in C. Both C and
C++ handle anonymous structs/unions in the same way. Addresses several
bugs:

<rdar://problem/6259534>
<rdar://problem/6481130>
<rdar://problem/6483159>

The test case in PR clang/1750 now passes with -fsyntax-only, but
CodeGen for inline assembler still fails.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4920f1ffb62b13b88e579476803c093f97f3e17f 12-Jan-2009 Douglas Gregor <dgregor@apple.com> Implement support for anonymous structs and unions in C. Both C and
C++ handle anonymous structs/unions in the same way. Addresses several
bugs:

<rdar://problem/6259534>
<rdar://problem/6481130>
<rdar://problem/6483159>

The test case in PR clang/1750 now passes with -fsyntax-only, but
CodeGen for inline assembler still fails.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f96ee9e9b146493eb2fcc55ba45dfeebe8241ac7 12-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to supprt case of readonly property being
assigned to when it has user declared setter method
defined in the class implementation (but no declaration in
the class itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d1fa6449e9dbdd667466e9e1e971aa17c9793e8a 12-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to supprt case of readonly property being
assigned to when it has user declared setter method
defined in the class implementation (but no declaration in
the class itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
dcf1e8426517ad33f1f849708ae5c95d4040e4a7 11-Jan-2009 Steve Naroff <snaroff@apple.com> Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
93983f8fa120330bf212bfde7e65da2709fb3be8 11-Jan-2009 Steve Naroff <snaroff@apple.com> Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
56af200f216eac5e1e4ac579fa3321c4b20f404f 11-Jan-2009 Steve Naroff <snaroff@apple.com> A few property related cleanups to ObjCContainerDecl AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6327e0d55c590b3c2766fa76ef1db241a0467df2 11-Jan-2009 Steve Naroff <snaroff@apple.com> A few property related cleanups to ObjCContainerDecl AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2437ec62d40cbe0d3a48f5219a2ecddeb3dae89f 11-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more actions to smart pointers.
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
de307473448fb3cebcb4c10090728300b53bca03 11-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more actions to smart pointers.
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a2d4d283094987b494293c04b3066eaa4dc0cf83 10-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> add a bunch of castToDeclContext/castFromDeclContext methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d2685209293a54fc2d888353c1fb839dcde616ef 10-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> add a bunch of castToDeclContext/castFromDeclContext methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
e575b0e2cc586417b53cdc04205f52a9a440fd1a 10-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> add castToDeclContext/castFromDeclContext methods to RecordDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e58336400c9bea6daa4e4038ec71a61bf430dd0b 10-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> add castToDeclContext/castFromDeclContext methods to RecordDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62026 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cab994dc1257be8fa17ed928f58cd85bc5af93a7 09-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> When we see a reference to a struct, class, or union like "struct X"
that is neither a definition nor a forward declaration and where X has
not yet been declared as a tag, introduce a declaration
into the appropriate scope (which is likely *not* to be the current
scope). The rules for the placement of the declaration differ slightly
in C and C++, so we implement both and test the various corner
cases. This implementation isn't 100% correct due to some lingering
issues with the function prototype scope (for a function parameter
list) not being the same scope as the scope of the function
definition. Testcase is FIXME'd; this probably isn't an important issue.

Addresses <rdar://problem/6484805>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Scope.h
3218c4bb3b5d7250f12420de6db7ef3e3f805a75 09-Jan-2009 Douglas Gregor <dgregor@apple.com> When we see a reference to a struct, class, or union like "struct X"
that is neither a definition nor a forward declaration and where X has
not yet been declared as a tag, introduce a declaration
into the appropriate scope (which is likely *not* to be the current
scope). The rules for the placement of the declaration differ slightly
in C and C++, so we implement both and test the various corner
cases. This implementation isn't 100% correct due to some lingering
issues with the function prototype scope (for a function parameter
list) not being the same scope as the scope of the function
definition. Testcase is FIXME'd; this probably isn't an important issue.

Addresses <rdar://problem/6484805>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Scope.h
54e4be99d5aeccb434916d8ae1bbc339c4969208 09-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add some comments to the virtual work. Thanks to Doug Gregor for the review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c9b580a4de1824b3155048d31aaa153316e150c2 09-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Add some comments to the virtual work. Thanks to Doug Gregor for the review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d310fde11d4b0c64b788e18c785d9f432f597d9c 09-Jan-2009 Ted Kremenek <kremenek@apple.com> Enhance PTH 'getSpelling' caching:
- Refactor caching logic into a helper class PTHSpellingSearch
- Allow "random accesses" in the spelling cache, thus catching the remaining
cases where 'getSpelling' wasn't hitting the PTH cache

For -Eonly, PTH, Cocoa.h:
- This reduces wall time by 3% (user time unchanged, sys time reduced)
- This reduces the amount of paged source by 1112K.
The remaining 1112K still being paged in is from somewhere else
(investigating).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
5f074266cc59563036c40516c814d63825723e20 09-Jan-2009 Ted Kremenek <kremenek@apple.com> Enhance PTH 'getSpelling' caching:
- Refactor caching logic into a helper class PTHSpellingSearch
- Allow "random accesses" in the spelling cache, thus catching the remaining
cases where 'getSpelling' wasn't hitting the PTH cache

For -Eonly, PTH, Cocoa.h:
- This reduces wall time by 3% (user time unchanged, sys time reduced)
- This reduces the amount of paged source by 1112K.
The remaining 1112K still being paged in is from somewhere else
(investigating).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
faca5e2c497659869be8a0647ea589e209a06931 09-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> This patch removes mergeProperties and does the property lookup
in designated protocols lazily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a66793ee8d2589ead81739d9b8a968650db3d452 09-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> This patch removes mergeProperties and does the property lookup
in designated protocols lazily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
83faa29958e9a74b83445f2cf462dbaff46abb94 09-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Very basic support for pure virtual functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
9ba73ad65446f6bc876f40cced866d85dff754da 09-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Very basic support for pure virtual functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
d16753817a047f96670d084d3146c0e495604586 09-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Replace DeclContext's vector of ScopedDecl pointers with a linked list
of ScopedDecls (using the new ScopedDecl::NextDeclInScope
pointer). Performance-wise:

- It's a net win in memory utilization, since DeclContext is now one
pointer smaller than it used to be (std::vectors are typically 3
pointers; we now use 2 pointers) and
- Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
is about 1.9% faster than before, most likely because we no longer
have the memory allocations and copying associated with the
std::vector.

I'll re-enable serialization of DeclContexts once I've sorted out the
NextDeclarator/NextDeclInScope question.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
6037fcba3431b47de1a994c9b286feac17894eff 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Replace DeclContext's vector of ScopedDecl pointers with a linked list
of ScopedDecls (using the new ScopedDecl::NextDeclInScope
pointer). Performance-wise:

- It's a net win in memory utilization, since DeclContext is now one
pointer smaller than it used to be (std::vectors are typically 3
pointers; we now use 2 pointers) and
- Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
is about 1.9% faster than before, most likely because we no longer
have the memory allocations and copying associated with the
std::vector.

I'll re-enable serialization of DeclContexts once I've sorted out the
NextDeclarator/NextDeclInScope question.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
d394a2793850cf65f2f7a99f089603cf34405dec 09-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that ScopedDecls passed to DeclContext::addDecl are added into their lexical context

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a8cc8ce044e5d2589128f0c1a84e586cce743b27 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Make sure that ScopedDecls passed to DeclContext::addDecl are added into their lexical context

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5d7648449392dccee2deb7920c2e5facbe1a63f5 09-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Provide a new kind of iterator, the specific_decl_iterator, that
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
f8d49f64ef6ab7e632717a31631fc289aab69428 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Provide a new kind of iterator, the specific_decl_iterator, that
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
451f83c3d689753abb1d7393816951b96d39bbb1 09-Jan-2009 Steve Naroff <snaroff@apple.com> Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
09c4719788a5cea09897525e528fa00420f1677b 09-Jan-2009 Steve Naroff <snaroff@apple.com> Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
6e4fa2c890cc4f81ac227b3f6d1b49a49dcf0566 09-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Addressed the issue in <rdar://problem/6479085>, where we failed to
rewrite @class declarations that showed up within linkage
specifications because those @class declarations never made it any
place where the rewriter could find them.

Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
live in the appropriate top-level or transparent DeclContext near the
top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
declarations now show up in a traversal of the declarations in a
DeclContext (they didn't before!). This way, the rewriter finds all
Objective-C declarations within linkage specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
d04341000d35c8808a72838b057eed7bf13b7661 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Addressed the issue in <rdar://problem/6479085>, where we failed to
rewrite @class declarations that showed up within linkage
specifications because those @class declarations never made it any
place where the rewriter could find them.

Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
live in the appropriate top-level or transparent DeclContext near the
top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
declarations now show up in a traversal of the declarations in a
DeclContext (they didn't before!). This way, the rewriter finds all
Objective-C declarations within linkage specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
89d5304610977ee2b6ca7237ba1c7be4119810cd 09-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Adding support for ObjC methods which have c-style
parameter list. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
439c65892cc8629bbf541e0b8bda6b64cbcc4e6b 09-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Adding support for ObjC methods which have c-style
parameter list. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
bdbbc2dd11e8e5645fa6a61b9f24cb12625a830f 08-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Revert my previous, failed attempt to pretty-print anonymous struct/union accesses well. Added a FIXME so we know to revisit this later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b3eef68111ffc220e449be96da1747998c057790 08-Jan-2009 Douglas Gregor <dgregor@apple.com> Revert my previous, failed attempt to pretty-print anonymous struct/union accesses well. Added a FIXME so we know to revisit this later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d9be6cd400d25ed4571e20bc843b549416527f87 08-Jan-2009 Ted Kremenek <kremenek@apple.com> Added iterator mechanism to ObjCContainerDecl to iterate over both class and instance methods at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7ed4faca5162b3ab85be7f7e57aa40e6ec170971 08-Jan-2009 Ted Kremenek <kremenek@apple.com> Added iterator mechanism to ObjCContainerDecl to iterate over both class and instance methods at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
db568cfb21332e84a163afdaab0d13e88a56f712 08-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Unify the code for defining tags in C and C++, so that we always
introduce a Scope for the body of a tag. This reduces the number of
semantic differences between C and C++ structs and unions, and will
help with other features (e.g., anonymous unions) in C. Some important
points:

- Fields are now in the "member" namespace (IDNS_Member), to keep
them separate from tags and ordinary names in C. See the new test
in Sema/member-reference.c for an example of why this matters. In
C++, ordinary and member name lookup will find members in both the
ordinary and member namespace, so the difference between
IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but
only in C++!).
- We always introduce a Scope and push a DeclContext when we're
defining a tag, in both C and C++. Previously, we had different
actions and different Scope/CurContext behavior for enums, C
structs/unions, and C++ structs/unions/classes. Now, it's one pair
of actions. (Yay!)

There's still some fuzziness in the handling of struct/union/enum
definitions within other struct/union/enum definitions in C. We'll
need to do some more cleanup to eliminate some reliance on CurContext
before we can solve this issue for real. What we want is for something
like this:

struct X {
struct T { int x; } t;
};

to introduce T into translation unit scope (placing it at the
appropriate point in the IdentifierResolver chain, too), but it should
still have struct X as its lexical declaration
context. PushOnScopeChains isn't smart enough to do that yet, though,
so there's a FIXME test in nested-redef.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Parse/Action.h
72de6676bd30f9081ee4166bbe07b4c270258ce6 08-Jan-2009 Douglas Gregor <dgregor@apple.com> Unify the code for defining tags in C and C++, so that we always
introduce a Scope for the body of a tag. This reduces the number of
semantic differences between C and C++ structs and unions, and will
help with other features (e.g., anonymous unions) in C. Some important
points:

- Fields are now in the "member" namespace (IDNS_Member), to keep
them separate from tags and ordinary names in C. See the new test
in Sema/member-reference.c for an example of why this matters. In
C++, ordinary and member name lookup will find members in both the
ordinary and member namespace, so the difference between
IDNS_Member and IDNS_Ordinary is erased by Sema::LookupDecl (but
only in C++!).
- We always introduce a Scope and push a DeclContext when we're
defining a tag, in both C and C++. Previously, we had different
actions and different Scope/CurContext behavior for enums, C
structs/unions, and C++ structs/unions/classes. Now, it's one pair
of actions. (Yay!)

There's still some fuzziness in the handling of struct/union/enum
definitions within other struct/union/enum definitions in C. We'll
need to do some more cleanup to eliminate some reliance on CurContext
before we can solve this issue for real. What we want is for something
like this:

struct X {
struct T { int x; } t;
};

to introduce T into translation unit scope (placing it at the
appropriate point in the IdentifierResolver chain, too), but it should
still have struct X as its lexical declaration
context. PushOnScopeChains isn't smart enough to do that yet, though,
so there's a FIXME test in nested-redef.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Parse/Action.h
5968d4e5f1650bc358537bac0b2b3b59ee8d09eb 08-Jan-2009 Steve Naroff <snaroff@apple.com> Add missing castToDeclContext/castFromDeclContext hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b718b407db1f921c5a2dc0164a23582c322f8ce0 08-Jan-2009 Steve Naroff <snaroff@apple.com> Add missing castToDeclContext/castFromDeclContext hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
1bb38178cac3733287569ceb2b1837e16a092f34 08-Jan-2009 Steve Naroff <snaroff@apple.com> Remove a dead decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6804461f7f154b38130e421b16daf7f2890feb49 08-Jan-2009 Steve Naroff <snaroff@apple.com> Remove a dead decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
438be771a8e7336d5e143d91debb419764cde8ef 08-Jan-2009 Steve Naroff <snaroff@apple.com> Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).
Convert clients to use the standard getDeclContext() API.

Doug, thanks for the review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3e0a540b6d846178857289ec0eb8470a278d11a3 08-Jan-2009 Steve Naroff <snaroff@apple.com> Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).
Convert clients to use the standard getDeclContext() API.

Doug, thanks for the review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
228fe4f1c7208efa3c5a7e714db4bf8ed9709c0b 08-Jan-2009 Ted Kremenek <kremenek@apple.com> Initialized member variable 'Implicit' in Decl's ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
40449fe96e2c6210ecb59515aaf939516fc09c22 08-Jan-2009 Ted Kremenek <kremenek@apple.com> Initialized member variable 'Implicit' in Decl's ctor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ab63fd6f3dccb110f78f132fa81321bbd4a61b70 08-Jan-2009 Steve Naroff <snaroff@apple.com> This is a large/messy diff that unifies the ObjC AST's with DeclContext.

- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
0701bbb228dfd87e1fe82a0a4b7b9facfecb43da 08-Jan-2009 Steve Naroff <snaroff@apple.com> This is a large/messy diff that unifies the ObjC AST's with DeclContext.

- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
b287b2118e08a640783739db9832adca2a86828d 08-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add isSubRegionOf() method to SubRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
7e5d6ed47dcedce35043de59ee00464b681bc786 08-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add isSubRegionOf() method to SubRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
192bee432e8731fc9479564846e7a7205fd2c488 08-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment because we could have arbitrary number of overloaded functions with
the same name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
41761d67291ae9ac74843f31737a96157d982c0b 08-Jan-2009 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment because we could have arbitrary number of overloaded functions with
the same name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
a4d5bf514ee8c40d2be701760a5e3b3ff7bfc85e 08-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH: Hook up getSpelling() caching in PTHLexer. This results in a nice
performance gain. Here's what we see for -Eonly on Cocoa.h (using PTH):

- wall time decreases by 21% (26% speedup overall)
- system time decreases by 35%
- user time decreases by 6%

These reductions are due to not paging source files just to get spellings for
literals. The solution in place doesn't appear to be 100% yet, as we still see
some of the pages for source files getting mapped in. Using -print-stats, we see
that SourceManager maps in 7179K less bytes of source text (reduction of 75%).
Will investigate why the remaining 25% are getting paged in.

With these changes, here's how PTH compares to non-PTH on Cocoa.h:
-Eonly: PTH takes 64% of the time as non-PTH (54% speedup)
-fsyntax-only: PTH takes 89% of the time as non-PTH (11% speedup)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
32a8ad526f9bc00539f000a2dd1ac3e167db61c1 08-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH: Hook up getSpelling() caching in PTHLexer. This results in a nice
performance gain. Here's what we see for -Eonly on Cocoa.h (using PTH):

- wall time decreases by 21% (26% speedup overall)
- system time decreases by 35%
- user time decreases by 6%

These reductions are due to not paging source files just to get spellings for
literals. The solution in place doesn't appear to be 100% yet, as we still see
some of the pages for source files getting mapped in. Using -print-stats, we see
that SourceManager maps in 7179K less bytes of source text (reduction of 75%).
Will investigate why the remaining 25% are getting paged in.

With these changes, here's how PTH compares to non-PTH on Cocoa.h:
-Eonly: PTH takes 64% of the time as non-PTH (54% speedup)
-fsyntax-only: PTH takes 89% of the time as non-PTH (11% speedup)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
d2c849dfb5bd5c8fe93b973198eb47320f08aed1 08-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH:
- Added stub PTHLexer::getSpelling() that will be used for fetching cached
spellings from the PTH file. This doesn't do anything yet.
- Added a hook in Preprocessor::getSpelling() to call PTHLexer::getSpelling()
when using a PTHLexer.
- Updated PTHLexer to read the offsets of spelling tables in the PTH file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
b70e3dafb9618f34017061400dc19ac5e3539a6d 08-Jan-2009 Ted Kremenek <kremenek@apple.com> PTH:
- Added stub PTHLexer::getSpelling() that will be used for fetching cached
spellings from the PTH file. This doesn't do anything yet.
- Added a hook in Preprocessor::getSpelling() to call PTHLexer::getSpelling()
when using a PTHLexer.
- Updated PTHLexer to read the offsets of spelling tables in the PTH file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
b1d9eb3ed8d41b334f3b790e863140226cb10028 07-Jan-2009 Ted Kremenek <kremenek@apple.com> Update some doxygen comments to be more rich. Remove StoreManager::GetRegionSVal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
c6ed3840d685bd40bd921dd1f76cfb5a9b4fc599 07-Jan-2009 Ted Kremenek <kremenek@apple.com> Update some doxygen comments to be more rich. Remove StoreManager::GetRegionSVal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
7b61ab7b86a76ef4c7f7550333661ad2aadd88f8 07-Jan-2009 Ted Kremenek <kremenek@apple.com> Refactor MemRegionManager instance variable into parent class. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
d6cfbe4bd5103cd020d987d09438744eb17226a3 07-Jan-2009 Ted Kremenek <kremenek@apple.com> Refactor MemRegionManager instance variable into parent class. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
cc74331b39f125521e8c1fa66d3c3171ce119114 07-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
83233a4b7c2bc7b531ffa3b33fdd1cd8138373b6 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Fix printing of member references to avoid displaying implicitly-generated member references, e.g., for anonymous struct/unions or implicit 'this' in member functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a04fcb61cf8a23063c836fcd147cc565a9aa6b45 07-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Don't ICE when messaging on 'super' receiver when class
of category implementation is undeclared. Issue error instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4b1e275eb743b46cd10153bb58743d89af7242ea 07-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Don't ICE when messaging on 'super' receiver when class
of category implementation is undeclared. Issue error instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c7f0161766b7b551e21882add1e6e9599b820251 07-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Finished semantic analysis of anonymous unions in C++.

Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
6b3945f4bc757bdadd3e443180cf32c2cccb52a0 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Finished semantic analysis of anonymous unions in C++.

Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
d9d4d50943e78c4405b89444fca99230584acacb 07-Jan-2009 Steve Naroff <snaroff@apple.com> ObjC AST cleanups/simplifications (phase 1).
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
e4f039e01e797a38bc97bf22aff9832ecd18ff5f 07-Jan-2009 Steve Naroff <snaroff@apple.com> ObjC AST cleanups/simplifications (phase 1).
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
3a423135abbd36c8f1fbe6becbfb8aee0ba8583c 07-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e21b99468ad408694caf4b4efbbb57ef9d89f99f 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Use DeclContext::getLookupContext wherever necessary to ensure that we look through transparent contexts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
38d38a08d869c4a6efa3233eac48fafb8bf8d945 07-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> When determining whether a variable is a file-scoped variable, check
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
17a9b9e3ee75f5dbb4819cc8ebf40eec8015f84a 07-Jan-2009 Douglas Gregor <dgregor@apple.com> When determining whether a variable is a file-scoped variable, check
out its lookup context (to see through linkage
specifications). Addresses <rdar://problem/6477142>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
723d3339200af4a2f1861b7f4cc6d9788e0d7386 07-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Initial implementation of anonymous unions (and, as a GNU extension,
structures and classes) in C++. Covers name lookup and the synthesis
and member access for the unnamed objects/fields associated with
anonymous unions.

Some C++ semantic checks are still missing (anonymous unions can't
have function members, static data members, etc.), and there is no
support for anonymous structs or unions in C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
bcbffc46f1ad3796c4582fa1e3a9113b5aa26061 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Initial implementation of anonymous unions (and, as a GNU extension,
structures and classes) in C++. Covers name lookup and the synthesis
and member access for the unnamed objects/fields associated with
anonymous unions.

Some C++ semantic checks are still missing (anonymous unions can't
have function members, static data members, etc.), and there is no
support for anonymous structs or unions in C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
69e781fb54d6a9592899a96d2a85f3f39a4142a9 07-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ce35607c282c845b3285d0f6e106489d8bbeba13 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
ab6168ebac90bcce5259b869c5b56741d52e1fb4 06-Jan-2009 Chris Lattner <sabre@nondot.org> add a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
d62fdc448b3ace606c8c9c9f13e43218fa204dbf 06-Jan-2009 Chris Lattner <sabre@nondot.org> add a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
d706dc8248bb4b7d9d1ba7860d75e849dc5466e0 06-Jan-2009 Chris Lattner <sabre@nondot.org> rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
7a0ab5f387722c83e19c7133b46b16988eb19e45 06-Jan-2009 Chris Lattner <sabre@nondot.org> rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
655972d45c544d8a3ad42e0b25972f4b23a0fc7b 06-Jan-2009 Chris Lattner <sabre@nondot.org> Make Token::setLength assert that the token is not an annotation token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
79ed16e2e605d67a12cccdcf9ad1b231175da1a6 06-Jan-2009 Chris Lattner <sabre@nondot.org> Make Token::setLength assert that the token is not an annotation token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
0f56bfb808d83230f185cd5d0ee0f348bcba8482 06-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Oops. Un-publicify SrcMgr::ContentCache::Buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
ea14609c806d22d9eb876a029deed9bc3de4aacd 06-Jan-2009 Douglas Gregor <dgregor@apple.com> Oops. Un-publicify SrcMgr::ContentCache::Buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
566782aea6d9805c4f703f8101f2dc452cf7286a 06-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
1) The use of a qualified-id instead of an unqualified-id suppresses
argument-dependent lookup
2) If the name refers to a virtual function, the qualified-id
version will call the function determined statically while the
unqualified-id version will call the function determined dynamically
(by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/SourceManager.h
1a49af9681c350fef58e677f85ccb9a77e8e9d0a 06-Jan-2009 Douglas Gregor <dgregor@apple.com> Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
1) The use of a qualified-id instead of an unqualified-id suppresses
argument-dependent lookup
2) If the name refers to a virtual function, the qualified-id
version will call the function determined statically while the
unqualified-id version will call the function determined dynamically
(by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61789 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/SourceManager.h
5d7eace984f1c762dd6f56115575763d368974c3 06-Jan-2009 Chris Lattner <sabre@nondot.org> rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and more accurate. The type name might not be qualified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/Token.h
b31757b68afe06ba442a05775d08fe7aa0f6f889 06-Jan-2009 Chris Lattner <sabre@nondot.org> rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and more accurate. The type name might not be qualified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/Token.h
aa7dac17162eab1e9e0b84f4b710fc3e8a06aa97 06-Jan-2009 Ted Kremenek <kremenek@apple.com> Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods. This reduces the
number of places that actually access the MemBuffer object for a file
to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c16c208e8519476d838ad11fffc8e0ecea50550d 06-Jan-2009 Ted Kremenek <kremenek@apple.com> Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods. This reduces the
number of places that actually access the MemBuffer object for a file
to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
39c0f6f69727c07a1b87605c54f14b86f8189194 05-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> PODness and Type Traits

Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
lang/Parse/Action.h
lang/Parse/Parser.h
64b45f7e0d3167f040841ac2920aead7f080730d 05-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> PODness and Type Traits

Make C++ classes track the POD property (C++ [class]p4)
Track the existence of a copy assignment operator.
Implicitly declare the copy assignment operator if none is provided.
Implement most of the parsing job for the G++ type traits extension.
Fully implement the low-hanging fruit of the type traits:
__is_pod: Whether a type is a POD.
__is_class: Whether a type is a (non-union) class.
__is_union: Whether a type is a union.
__is_enum: Whether a type is an enum.
__is_polymorphic: Whether a type is polymorphic (C++ [class.virtual]p1).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Basic/TokenKinds.def
lang/Basic/TypeTraits.h
lang/Parse/Action.h
lang/Parse/Parser.h
d802838e493df9217cf3d71087de523fff486a97 05-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Parse/Action.h
074149e11baf5f7db12f84efd5c34ba6e35d5cdf 05-Jan-2009 Douglas Gregor <dgregor@apple.com> Introduce support for "transparent" DeclContexts, which are
DeclContexts whose members are visible from enclosing DeclContexts up
to (and including) the innermost enclosing non-transparent
DeclContexts. Transparent DeclContexts unify the mechanism to be used
for various language features, including C enumerations, anonymous
unions, C++0x inline namespaces, and C++ linkage
specifications. Please refer to the documentation in the Clang
internals manual for more information.

Only enumerations and linkage specifications currently use transparent
DeclContexts.

Still to do: use transparent DeclContexts to implement anonymous
unions and GCC's anonymous structs extension, and, later, the C++0x
features. We also need to tighten up the DeclContext/ScopedDecl link
to ensure that every ScopedDecl is in a single DeclContext, which
will ensure that we can then enforce ownership and reduce the memory
footprint of DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Parse/Action.h
94a15bd6171e6fa504c06f8e0da32e90bce94786 05-Jan-2009 Chris Lattner <sabre@nondot.org> remove optimization to avoid looking ahead for cases like ::foo. This
isn't worth the complexity and the code already does a ton of lookahead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
5b4547318bb179fc76f984f0eeaaf615927e795c 05-Jan-2009 Chris Lattner <sabre@nondot.org> remove optimization to avoid looking ahead for cases like ::foo. This
isn't worth the complexity and the code already does a ton of lookahead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
4899a75843dcc03aef598e81aedb879fc3cc0281 05-Jan-2009 Chris Lattner <sabre@nondot.org> Fix a bug where we'd try to look beyond the current cached tokens when
not in backtracking mode. This was just using the wrong predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
83cf05a3b0e655dc8ea1cb4c4e1eef541b770992 05-Jan-2009 Chris Lattner <sabre@nondot.org> Fix a bug where we'd try to look beyond the current cached tokens when
not in backtracking mode. This was just using the wrong predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
2c3014557757cefa9499deed1f2785bc89a98fcb 05-Jan-2009 Chris Lattner <sabre@nondot.org> ParseCXXSimpleTypeSpecifier can only be called on things that are
verified to be simple type specifiers, so there is no need for it
to call TryAnnotateTypeOrScopeToken.

Make MaybeParseCXXScopeSpecifier reject ::new and ::delete with a
hard error now that it may never be transitively called in a
context where these are legal. This allows me to start
disentangling things more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
55a7cefc846765ac7d142a63f773747a20518d71 05-Jan-2009 Chris Lattner <sabre@nondot.org> ParseCXXSimpleTypeSpecifier can only be called on things that are
verified to be simple type specifiers, so there is no need for it
to call TryAnnotateTypeOrScopeToken.

Make MaybeParseCXXScopeSpecifier reject ::new and ::delete with a
hard error now that it may never be transitively called in a
context where these are legal. This allows me to start
disentangling things more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
712f9a3e6f762e8d241a0b31e47f56096f8d5ea8 05-Jan-2009 Chris Lattner <sabre@nondot.org> sink a call to TryAnnotateCXXScopeToken down into the
applicable cases in ParseDeclarationSpecifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5e02c47a7085831586344a9728763cb50540c7f7 05-Jan-2009 Chris Lattner <sabre@nondot.org> sink a call to TryAnnotateCXXScopeToken down into the
applicable cases in ParseDeclarationSpecifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1e01594f0da7ca29b35012612cc530b4e2c8dc4d 05-Jan-2009 Chris Lattner <sabre@nondot.org> my previous patch caused sema to drop the global qualifier, make
sure to pass it down. This makes the code a bit gross, I will clean
it up in subsequent commits.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a7bc7c880f86bc180684ef032d06df51bcae7a23 05-Jan-2009 Chris Lattner <sabre@nondot.org> my previous patch caused sema to drop the global qualifier, make
sure to pass it down. This makes the code a bit gross, I will clean
it up in subsequent commits.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e7de361448aedd3c44b47905ae8e2a8db76bf77c 04-Jan-2009 Chris Lattner <sabre@nondot.org> eliminate lookahead when parsing ::new / ::delete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
59232d35f5820e334b6c8b007ae8006f4390055d 04-Jan-2009 Chris Lattner <sabre@nondot.org> eliminate lookahead when parsing ::new / ::delete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5ff0ee5a153adf37bcbfae110b61a73e18fa27fe 30-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Parser support for C++ using directives, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
f780abc21c39cd4731b9e38f2d2d9f7d1510bd7b 30-Dec-2008 Douglas Gregor <dgregor@apple.com> Parser support for C++ using directives, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
f463b9a2835c52f7ba564fdf61df4e55cd5c3db8 29-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Remove hasKind(). Use existing getKind().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
fc820a4394a33e4fccfd8283909d425708311d41 29-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Remove hasKind(). Use existing getKind().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
0a23e8fc1cbe3cf61c82ca8d947aa84ec60d079f 28-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a two more statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
117054a99f4994e4ec8a1fc904b554e1f2dc9b29 28-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a two more statement actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b7605e84123a331db0338400ef740c3a7a47a1eb 28-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Diagnose declarations that don't declare anything, and fix PR3020.
Examples:
int;
typedef int;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
a4ed0d8d75212dc01b4438829a4b0c846d99458d 28-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Diagnose declarations that don't declare anything, and fix PR3020.
Examples:
int;
typedef int;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61454 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
adf0b32b2643e05d9fb355148f026ba9fd7f2ecb 26-Dec-2008 Anders Carlsson <andersca@mac.com> Add __builtin_flt_rounds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
cfd489c46c9c004f410ced6fda985cb7a84a6515 26-Dec-2008 Anders Carlsson <andersca@mac.com> Add __builtin_flt_rounds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
4aab7fd69f9e49d906eaf302c5c3adfb09ff0e30 26-Dec-2008 Anders Carlsson <andersca@mac.com> Add two more builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
3cd860c3e0b2ee64b3d5515569eeceecfc3901d5 26-Dec-2008 Anders Carlsson <andersca@mac.com> Add two more builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
b27a8700761e1c1f955fc5cc3663289179c9e4d2 26-Dec-2008 Anton Korobeynikov <asl@math.spbu.ru> Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
2f402708e62f89fb875442802e3d3f20fc909d33 26-Dec-2008 Anton Korobeynikov <asl@math.spbu.ru> Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
ad620401249f986b0ea2c4c3c5566046b87e2dc2 25-Dec-2008 Steve Naroff <snaroff@apple.com> Add parser support for __forceinline, __w64, __ptr64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
86bc6cf05ad3ff7198671c394ba5157974e8a39c 25-Dec-2008 Steve Naroff <snaroff@apple.com> Add parser support for __forceinline, __w64, __ptr64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
edd04d56c1109eb7cb3c9de9a6839607ca9aa5ad 25-Dec-2008 Steve Naroff <snaroff@apple.com> Add parser support for __cdecl, __stdcall, and __fastcall.
Change preprocessor implementation of _cdecl to reference __cdecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
239f07384fe5e7194e780d98a17553084efeeb44 25-Dec-2008 Steve Naroff <snaroff@apple.com> Add parser support for __cdecl, __stdcall, and __fastcall.
Change preprocessor implementation of _cdecl to reference __cdecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
c5ab14f4071aba1303516902ae1c30f40903aafb 24-Dec-2008 Steve Naroff <snaroff@apple.com> Add explicit "fuzzy" parse support for Microsoft declspec.
Remove previous __declspec macro that would effectively erase the construct prior to parsing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
f59e17ecf06ac60065e2d02058bd6f21f5d216cc 24-Dec-2008 Steve Naroff <snaroff@apple.com> Add explicit "fuzzy" parse support for Microsoft declspec.
Remove previous __declspec macro that would effectively erase the construct prior to parsing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
0da0273153e4526863ce8d1e06f94c8957bd4341 24-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add serialization support for TypeOfType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
501c7252bd4752bc542630446494eb15b27f1f88 24-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add serialization support for TypeOfType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
71af02f1cea2bcedacbff2a20d883bf2b8042eb0 24-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add serialization support for TypeOfExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8fbc5274c416967de5338778f685b7830464ad13 24-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add serialization support for TypeOfExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
524734351dd3a2c625d8a7fb131ee8a424b3a00b 24-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
c4b4e7b8f6ca9b036824e048af49cd2a52b57cdf 24-Dec-2008 Douglas Gregor <dgregor@apple.com> Keep track of template arguments when we parse them. Right now, we don't actually do anything with the template arguments, but they'll be used to create template declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
62ae25ad1ecf45a8ecfefba3b14b159a91847657 24-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Correct the order in which we cope with end-of-class-definition
semantics and improve our handling of default arguments. Specifically,
we follow this order:

- As soon as the see the '}' in the class definition, the class is
complete and we add any implicit declarations (default constructor,
copy constructor, etc.) to the class.
- If there are any default function arguments, parse them
- If there were any inline member function definitions, parse them

As part of this change, we now keep track of the the fact that we've
seen unparsed default function arguments within the AST. See the new
ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly
cope with calls inside default function arguments to other functions
where we're making use of the default arguments.

Made some C++ error messages regarding failed initializations more
specific.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
61366e9cd41a6dbde4e66416dac21269c8ac1d94 24-Dec-2008 Douglas Gregor <dgregor@apple.com> Correct the order in which we cope with end-of-class-definition
semantics and improve our handling of default arguments. Specifically,
we follow this order:

- As soon as the see the '}' in the class definition, the class is
complete and we add any implicit declarations (default constructor,
copy constructor, etc.) to the class.
- If there are any default function arguments, parse them
- If there were any inline member function definitions, parse them

As part of this change, we now keep track of the the fact that we've
seen unparsed default function arguments within the AST. See the new
ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly
cope with calls inside default function arguments to other functions
where we're making use of the default arguments.

Made some C++ error messages regarding failed initializations more
specific.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
796269447580ef8672e694bae1bceec5513b406c 23-Dec-2008 Anton Korobeynikov <asl@math.spbu.ru> Sema for fastcall/stdcall stuff. Tests will follow.
Patch by Ilya Okonsky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7b0a52f982e3514425fc8a3c8fc728f17c27c08e 23-Dec-2008 Anton Korobeynikov <asl@math.spbu.ru> Sema for fastcall/stdcall stuff. Tests will follow.
Patch by Ilya Okonsky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6e71edcf013acb364885695ab4831a8403a2c4cd 23-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Don't push OverloadedFunctionDecls onto the chain of declarations
attached to an identifier. Instead, all overloaded functions will be
pushed into scope, and we'll synthesize an OverloadedFunctionDecl on
the fly when we need it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6ed40e351a7c1fb3084434f1db19216b79623cf0 23-Dec-2008 Douglas Gregor <dgregor@apple.com> Don't push OverloadedFunctionDecls onto the chain of declarations
attached to an identifier. Instead, all overloaded functions will be
pushed into scope, and we'll synthesize an OverloadedFunctionDecl on
the fly when we need it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e07d9eceab544ec31478daadcc7d53fffdbf9898 23-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Lot more encoding work. We are closing the gap to
gcc compatibilty in all aspects of encoding now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a1c033e9514865f3a7b0d8b3b20e6de926cfec6c 23-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Lot more encoding work. We are closing the gap to
gcc compatibilty in all aspects of encoding now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d94668d6913fc1f2dd9f270b144c4d5409aab220 23-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH: Remove some methods and simplify some conditions in PTHLexer::Lex(). No big functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
59d08cb672136322375e5400578ee1fbd0947de2 23-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH: Remove some methods and simplify some conditions in PTHLexer::Lex(). No big functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61381 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
b9b218e566459808be9f1c52b03afad3e0d39ed3 23-Dec-2008 Chris Lattner <sabre@nondot.org> Add a setter for CVR qualifiers, patch by Lukasz Janyst!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a3ab4b85f54090927c2dfa2585b9f0e48509e944 23-Dec-2008 Chris Lattner <sabre@nondot.org> Add a setter for CVR qualifiers, patch by Lukasz Janyst!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61367 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
08d3ff31e1770de26f9ff088a91e231f90439450 23-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH:
- In PTHLexer::Lex read all of the token data from PTH file before
constructing the token. The idea is to enhance locality.
- Do not use Read8/Read32 in PTHLexer::Lex. Inline these operations manually.
- Change PTHManager::ReadIdentifierInfo() to PTHManager::GetIdentifierInfo().
They are functionally the same except that PTHLexer::Lex() reads the
persistent id.

These changes result in a 3.3% speedup for PTH on Cocoa.h (-Eonly).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
866bdf74547efe32c320554837ffce00fcc084fe 23-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH:
- In PTHLexer::Lex read all of the token data from PTH file before
constructing the token. The idea is to enhance locality.
- Do not use Read8/Read32 in PTHLexer::Lex. Inline these operations manually.
- Change PTHManager::ReadIdentifierInfo() to PTHManager::GetIdentifierInfo().
They are functionally the same except that PTHLexer::Lex() reads the
persistent id.

These changes result in a 3.3% speedup for PTH on Cocoa.h (-Eonly).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
9ab79bf847ee62bfd9199475f58477c17886b2fe 23-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH:
- Embed 'eom' tokens in PTH file.
- Use embedded 'eom' tokens to not lazily generate them in the PTHLexer.
This means that PTHLexer can always advance to the next token after
reading a token (instead of buffering tokens using a copy).
- Moved logic of 'ReadToken' into Lex. GetToken & ReadToken no longer exist.
- These changes result in a 3.3% speedup (-Eonly) on Cocoa.h.
- The code is a little gross. Many cleanups are possible and should be done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
e5680f3cd678014cf0872d34726dc804b0cbbdd4 23-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH:
- Embed 'eom' tokens in PTH file.
- Use embedded 'eom' tokens to not lazily generate them in the PTHLexer.
This means that PTHLexer can always advance to the next token after
reading a token (instead of buffering tokens using a copy).
- Moved logic of 'ReadToken' into Lex. GetToken & ReadToken no longer exist.
- These changes result in a 3.3% speedup (-Eonly) on Cocoa.h.
- The code is a little gross. Many cleanups are possible and should be done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
ddfd9d5d81715686bf47f8bf577ead557d5f3c83 23-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Don't explicitly represent OverloadedFunctionDecls within
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.

This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.

Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
3fc749d899dfc194162128c1a88933148a39b68d 23-Dec-2008 Douglas Gregor <dgregor@apple.com> Don't explicitly represent OverloadedFunctionDecls within
DeclContext. Instead, just keep the list of currently-active
declarations and only build the OverloadedFunctionDecl when we
absolutely need it.

This is a half-step toward eliminating the need to explicitly build
OverloadedFunctionDecls that store sets of overloaded
functions. This was suggested by Argiris a while back, and it's a good
thing for several reasons: first, it eliminates the messy logic that
currently tries to keep the OverloadedFunctionDecl in sync with the
declarations that are being added. Second, it will (eventually)
eliminate the need to allocate memory for overload sets, which could
help performance. Finally, it helps set us up for when name lookup can
return multiple (possibly ambiguous) results, as can happen with
lookup of class members in C++.

Next steps: make the IdentifierResolver store overloads as separate
entries in its list rather than replacing them with an
OverloadedFunctionDecl now, then see how far we can go toward
eliminating OverloadedFunctionDecl entirely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
89ed86b24a37ad07dab38cb70b55378ebf87a581 23-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More encoding support; in this case, encoding of
outer-most const of pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
5b8c7d9fb620ba3a71e996d61e7b9bdf763b5c09 23-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More encoding support; in this case, encoding of
outer-most const of pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
237116b372f05f0c504c86f99d945b8f783368bc 22-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Full AST support and better Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
8351da06ca3082dfd49dd8e3c1785a986920f57c 22-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Full AST support and better Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61346 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
743c81609db46cce8a881fac6d295774687ff035 22-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Partial AST and Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
4b07b2968f87f3cd5a3d8c76145f1cbfd718d42d 22-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Partial AST and Sema support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
eec780da21a612b4b74f255ed37bed3bb50bbcac 22-Dec-2008 Anders Carlsson <andersca@mac.com> Implement the last intrinsics, _mm_insert_pi16 is the last remaining one now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
a6431dc8d2ebf54de31323bae1fd197dc165f8b2 22-Dec-2008 Anders Carlsson <andersca@mac.com> Implement the last intrinsics, _mm_insert_pi16 is the last remaining one now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
3257fb58ef6583ce20036c77a8c5af95f158f2d3 22-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for calls to overloaded member functions. Things to note:
- Overloading has to cope with having both static and non-static
member functions in the overload set.
- The call may or may not have an implicit object argument,
depending on the syntax (x.f() vs. f()) and the context (static
vs. non-static member function).
- We now generate MemberExprs for implicit member access expression.
- We now cope with mutable whenever we're building MemberExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
88a3514f36de96b19cdf50141c640df1a5f13f6c 22-Dec-2008 Douglas Gregor <dgregor@apple.com> Add support for calls to overloaded member functions. Things to note:
- Overloading has to cope with having both static and non-static
member functions in the overload set.
- The call may or may not have an implicit object argument,
depending on the syntax (x.f() vs. f()) and the context (static
vs. non-static member function).
- We now generate MemberExprs for implicit member access expression.
- We now cope with mutable whenever we're building MemberExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
e828d1cc844c0a843ecc69401c4cd1238c4442b3 22-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add an option to make 'RemoveDeadBindings' a configurable behavior. This enables
us to measure the effect of this optimization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
ff944a8c481d6c0f1ad2633e4be9bf8b1dd2a09f 22-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add an option to make 'RemoveDeadBindings' a configurable behavior. This enables
us to measure the effect of this optimization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b12ac33f83d035e5b4c4aba1bb5b2084e720f5d4 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
a0fd8652f3302d0f39ed9849b521ee5b76597b0a 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Parser support for C++ try-catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
76b9ddb5b0f9f7bf3808de65eb051a94a0246c21 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a few Stmt actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
a60528cdac7deee3991c2b48af4df4f315e49e9d 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a few Stmt actions to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
2766237a9f53bf258d491dda14f8c3ba8747639b 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Document how move semantics and the emulation work. Do this in-file because it's such a specific thing.
Restructure code for less duplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
7886ce8858d95d54a26c245f58b68a8ea99cc0fa 21-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Document how move semantics and the emulation work. Do this in-file because it's such a specific thing.
Restructure code for less duplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
76d19c8cce8b1b664a6e95bbf33e328227945fff 21-Dec-2008 Anders Carlsson <andersca@mac.com> Add ASTContext::getBaseElementType and use it in CodeGenFunction::EmitArraySubscriptExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6183a99b064b397d98297904fbd6cf00fe1f453d 21-Dec-2008 Anders Carlsson <andersca@mac.com> Add ASTContext::getBaseElementType and use it in CodeGenFunction::EmitArraySubscriptExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0dd0e37f7f54bc710c7f656e28ca4ab63ff9284c 21-Dec-2008 Anders Carlsson <andersca@mac.com> Did not mean to commit this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
97e0179f1ae545e07d9f5e7c1d2ef5c5bab06676 21-Dec-2008 Anders Carlsson <andersca@mac.com> Did not mean to commit this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3bb57e845cf801eec463777d796d1a3d0d75e266 21-Dec-2008 Anders Carlsson <andersca@mac.com> Handle VLA indexing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8b33c087fc6d97064b6620c96c732ebc5c003fb2 21-Dec-2008 Anders Carlsson <andersca@mac.com> Handle VLA indexing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
82d44776fc817d80b1985d9d8e86453d4f15995c 21-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for member references (E1.E2, E1->E2) with C++ semantics,
which can refer to static data members, enumerators, and member
functions as well as to non-static data members.

Implement correct lvalue computation for member references in C++.
Compute the result type of non-static data members of reference type properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
86f194083504938df72135b5b66bf0c5cafd9498 21-Dec-2008 Douglas Gregor <dgregor@apple.com> Add support for member references (E1.E2, E1->E2) with C++ semantics,
which can refer to static data members, enumerators, and member
functions as well as to non-static data members.

Implement correct lvalue computation for member references in C++.
Compute the result type of non-static data members of reference type properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
e26cb43f48421366ffc0d3c28b8e703a010f1089 21-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Finish up saving original parameter type and
using it in ObjC's method parameter encoding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
4306d3cb9116605728252e2738df24b9f6ab53c3 21-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Finish up saving original parameter type and
using it in ObjC's method parameter encoding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
160e8819e15a531dadfc6cffb45eaebdb41e3f89 20-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> introducing ParmVarWithOriginalTypeDecl class to
keep track of the original parameter decl. types.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
73da9e462576faedc2cdf96b37a1c072b404b73d 20-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> introducing ParmVarWithOriginalTypeDecl class to
keep track of the original parameter decl. types.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
0440c8c2163d60db45ae42aec602f03e7f25622c 20-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement checks for bool in increment and decrement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e6d5a4a58346441c969d5fcc7aa053e029186f86 20-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement checks for bool in increment and decrement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5ea4ad0068c8c970f039f72a41837458cf43efc2 20-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Lazy bingding for region-store manager.
* Now Bind() methods take and return GRState* because binding could
also alter GDM.
* No variables are initialized except those declared with initial
values.
* failed C test cases are due to bugs in RemoveDeadBindings(),
which removes constraints that is still alive. This will be fixed in later
patch.
* default value of array and struct regions will be implemented in later patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
4193eca10ce0cc8b2dae887e935a43b26f492b5b 20-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Lazy bingding for region-store manager.
* Now Bind() methods take and return GRState* because binding could
also alter GDM.
* No variables are initialized except those declared with initial
values.
* failed C test cases are due to bugs in RemoveDeadBindings(),
which removes constraints that is still alive. This will be fixed in later
patch.
* default value of array and struct regions will be implemented in later patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
bef3bdba2a89f014bac11a97b17a2788c860e59c 20-Dec-2008 Chris Lattner <sabre@nondot.org> avoid using a typedef that isn't always included from headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
e36dabb2d9567c98734a1063ac7748dc37a999ce 20-Dec-2008 Chris Lattner <sabre@nondot.org> avoid using a typedef that isn't always included from headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
0cd547f8f4ee15e03c4b8ef47895e319437b27b2 20-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More encoding support. This time for
@encode of classes and bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
43822eaeddeaa419b90f23c68af6b23c46788a58 20-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More encoding support. This time for
@encode of classes and bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8c3de809dc733ca29f1d07c73684be65b3f10785 19-Dec-2008 Anders Carlsson <andersca@mac.com> Get rid of the old Expr::Evaluate variant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1c0cfd4599e816cfd7a8f348286bf0ad79652ffc 19-Dec-2008 Anders Carlsson <andersca@mac.com> Get rid of the old Expr::Evaluate variant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
96095fcc4c580c21560361d526f645f3e887f0fc 19-Dec-2008 Anders Carlsson <andersca@mac.com> Fix for PR3234

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
00165a25a9ac005aa2e6b4ac791d555226fa9a9f 19-Dec-2008 Anders Carlsson <andersca@mac.com> Fix for PR3234

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2fa10440d81ba071e854a2246cb58e7142a81c6b 18-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Ultrasimplistic sketch for the parsing of C++ template-ids. This won't
become useful or correct until we (1) parse template arguments
correctly, (2) have some way to turn template-ids into types,
declarators, etc., and (3) have a real representation of templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
d6fb7ef028d9aa0b3e8943b7bc049c524437b407 18-Dec-2008 Douglas Gregor <dgregor@apple.com> Ultrasimplistic sketch for the parsing of C++ template-ids. This won't
become useful or correct until we (1) parse template arguments
correctly, (2) have some way to turn template-ids into types,
declarators, etc., and (3) have a real representation of templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
ea944844821d8e07b87937a8e9cb02a5a611cc11 18-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Removed a slot in ObjCMemRegExpr used in
code gen which did not belong there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprObjC.h
efc4c4bdbd8fee90b93deb3b5cfaeb044ae22557 18-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Removed a slot in ObjCMemRegExpr used in
code gen which did not belong there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/ExprObjC.h
e319ca37c64ad01867100f9dd749f4150cba8fb6 18-Dec-2008 Chris Lattner <sabre@nondot.org> rename argument


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
85b5a45803784a5465f69baf6f8d6e1eacaa5af5 18-Dec-2008 Chris Lattner <sabre@nondot.org> rename argument


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
460696f49303a79ca9e3885ad77b3794e1fffd69 18-Dec-2008 Chris Lattner <sabre@nondot.org> disallow attributes in a few callers of ParseTypeQualifierListOpt,
these completely ignore parsed attributes anyway, so don't try
to read them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5a69d1ce71579147c306f21c4cf205ef9519d63d 18-Dec-2008 Chris Lattner <sabre@nondot.org> disallow attributes in a few callers of ParseTypeQualifierListOpt,
these completely ignore parsed attributes anyway, so don't try
to read them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61198 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
306d4df4d3795208470617291c8a83373268c6ed 18-Dec-2008 Chris Lattner <sabre@nondot.org> Clean up the C89/C++ warnings about C99 array features to not
emit duplicate diags (some in parser and some in sema) and to
warn about use of typequals in array sizes. This implements
PR2759.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a1fcbadf4f930c22bb171fb90ed886f5f359d010 18-Dec-2008 Chris Lattner <sabre@nondot.org> Clean up the C89/C++ warnings about C99 array features to not
emit duplicate diags (some in parser and some in sema) and to
warn about use of typequals in array sizes. This implements
PR2759.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0d5081370ab3d4733bd5e4c914232578bec7864d 18-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add method used by ImmutableMap GDM specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
62b585701d626dec90b0aa0dfd8c2b75ffe29265 18-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add method used by ImmutableMap GDM specialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
6ed167cea991ebd3eedb4e8a4552d9a20d81b210 18-Dec-2008 Chris Lattner <sabre@nondot.org> Merge function-return.c into function.c

Fix PR2790 by making a warning an EXTWARN instead of EXTENSION.
Add a new EXTENSION warning for "return (some void expression);"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
65ce04bef06696379682410f399f37b43996d824 18-Dec-2008 Chris Lattner <sabre@nondot.org> Merge function-return.c into function.c

Fix PR2790 by making a warning an EXTWARN instead of EXTENSION.
Add a new EXTENSION warning for "return (some void expression);"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c98406ebcb31b1616f77e27ba30de8a7f6b0c6a1 18-Dec-2008 Nuno Lopes <nunoplopes@sapo.pt> fix leakage of var's initializers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
99f06ba988922ea721035a89e6d3c66ba100ba8a 18-Dec-2008 Nuno Lopes <nunoplopes@sapo.pt> fix leakage of var's initializers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
beb576767c86cc6a69cc89c25de3467a86e4cde8 18-Dec-2008 Ted Kremenek <kremenek@apple.com> Change PTHLexer::getSourceLocation() to not call GetToken() and instead just read the file offset in the token data buffer directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
30a12ec2a7f331d9e08acabe7cda853aaa7ba54b 18-Dec-2008 Ted Kremenek <kremenek@apple.com> Change PTHLexer::getSourceLocation() to not call GetToken() and instead just read the file offset in the token data buffer directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61170 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
9970eaf62ec4c462d1315fc1b7c125af5ea21711 18-Dec-2008 Ted Kremenek <kremenek@apple.com> PTHLexer::isNextPPTokenLParen() no longer calls GetToken() and just reads the token kind from the token data buffer. This results in a minor speedup and reduces the dependency on GetToken().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
daeee815169f37f2a49f80af7bd104722672ad97 18-Dec-2008 Ted Kremenek <kremenek@apple.com> PTHLexer::isNextPPTokenLParen() no longer calls GetToken() and just reads the token kind from the token data buffer. This results in a minor speedup and reduces the dependency on GetToken().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
e6be68ae1f97c922d437e89e74c95660b0b98e70 17-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Delay semantic analysis of the C++ names casts when the subexpression is type-dependent or the destination type is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9103bb27f4eefa0e0d7935387750e3aca24abc49 17-Dec-2008 Douglas Gregor <dgregor@apple.com> Delay semantic analysis of the C++ names casts when the subexpression is type-dependent or the destination type is dependent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1d8e3f9fbcdc1671115d8822298bfd552c3481a9 17-Dec-2008 Ted Kremenek <kremenek@apple.com> CF-retain/release checker:
- Fix regression reported in <rdar://problem/6452745>. After a null check, null references to resources should not have a retain count. This regression was caused by removing the call to "GRTransferFuncs::EvalAssume" in BasicConstraintManager.
- Added a test case to test this behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
2fb78a70536274426302415b6fc54a1074788e91 17-Dec-2008 Ted Kremenek <kremenek@apple.com> CF-retain/release checker:
- Fix regression reported in <rdar://problem/6452745>. After a null check, null references to resources should not have a retain count. This regression was caused by removing the call to "GRTransferFuncs::EvalAssume" in BasicConstraintManager.
- Added a test case to test this behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
0556b1563848eb53ac71b24d0ab6411bace87214 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This patch will build the Records lazily per Steve's comments.
Note that one test duplicate-ivar-check.m will fail because I
need to re-implement duplicate ivar checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
a769c004a2874504c17ea8afccbc4ad35fc33c9f 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This patch will build the Records lazily per Steve's comments.
Note that one test duplicate-ivar-check.m will fail because I
need to re-implement duplicate ivar checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
542c34d0b2c98379a6a1a02ee2fac7ea0d8e98ac 17-Dec-2008 Ted Kremenek <kremenek@apple.com> Add pretty-printing for AnonTypedRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
500d2ee83d407106d80920fb4325fa2e06fa61a5 17-Dec-2008 Ted Kremenek <kremenek@apple.com> Add pretty-printing for AnonTypedRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
ca328c32e7a189914842e667e4f3e4b65a531082 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Consolidated property check into property-typecheck-1.m file.
Improved on property diagnostics.
Added a FIXME per Steve's comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
0b65b1dc5abed26492740206c24e86271c9dca6b 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Consolidated property check into property-typecheck-1.m file.
Improved on property diagnostics.
Added a FIXME per Steve's comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
746a24c07ce5704fecafd00c396b32d4e3dc612c 17-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Remove the crufty reverse_decl_iterator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
270b4146ad54784ce41d0374e6a894eaab6c1650 17-Dec-2008 Douglas Gregor <dgregor@apple.com> Remove the crufty reverse_decl_iterator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
9dd88c7a8d2b666c5648d248d1a25606115dc5ef 17-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Removed the warning

warning: statement was disambiguated as declaration

because it is currently firing in cases where the declaration would
not actually parse as a statement. We'd love to bring this warning
back if we can make it more accurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3eb1c546857087b5e1377d172f37868ade960664 17-Dec-2008 Douglas Gregor <dgregor@apple.com> Removed the warning

warning: statement was disambiguated as declaration

because it is currently firing in cases where the declaration would
not actually parse as a statement. We'd love to bring this warning
back if we can make it more accurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b0b42f6f5b944688eefd7fba53c76c0b2230512e 17-Dec-2008 Chris Lattner <sabre@nondot.org> diagnose C99 6.9.1p5, C arguments in definitions that are lacking
a name. This implements PR3208.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
777f07b6cd595bb0922e05768e5703fbc92b5695 17-Dec-2008 Chris Lattner <sabre@nondot.org> diagnose C99 6.9.1p5, C arguments in definitions that are lacking
a name. This implements PR3208.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
8f9b1b29de881c59cd08fceafe30b385e9684931 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Semantics of @protocol attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/AttributeList.h
bc1c877fe28fb6a825f0b226a0a2da99e713ea03 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Semantics of @protocol attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/AttributeList.h
ad17e37ac2ad69b67ae6a1559658d46617a44eac 16-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Make linkage-specifications hold on to all of their declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
f44515a49b549171dc3ee9faa6281b72609da563 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Make linkage-specifications hold on to all of their declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61110 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Parse/Action.h
4bfcda2cf658530c3a31193bcd5ee1a3015851dd 16-Dec-2008 Ted Kremenek <kremenek@apple.com> Add new GRWorkList class that uses two queues:
- one queue (FIFO) to queue up nodes at block entrances
- another queue (LIFO) to queue up other nodes
- The idea is to explore basic blocks to completion, but to do a BFS exploration of blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRWorkList.h
e1efd4de8685e0785daf9cab227f7a21cfc9c80b 16-Dec-2008 Ted Kremenek <kremenek@apple.com> Add new GRWorkList class that uses two queues:
- one queue (FIFO) to queue up nodes at block entrances
- another queue (LIFO) to queue up other nodes
- The idea is to explore basic blocks to completion, but to do a BFS exploration of blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRWorkList.h
e27c37a6133549462d07b8a29446a024373528be 16-Dec-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint:
- Added four new ProgramPoint types that subclass PostStmt for use in
GRExprEngine::EvalLocation:
- PostOutOfBoundsCheckFailed
- PostUndefLocationCheckFailed
- PostNullCheckFailed
- PostLocationChecksSucceed
These were created because of a horribly subtle caching bug in EvalLocation
where a node representing an "bug condition" in EvalLocation (e.g. a null
dereference) could be re-used as the "non-bug condition" because the Store did
not contain any information to differentiate between the two. The extra
program points just disables any accidental caching between EvalLocation and
its callers.

GRExprEngine:
- EvalLocation now returns a NodeTy* instead of GRState*. This should be used as the "vetted" predecessor for EvalLoad/EvalStore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
8c354758c2d39db87c77c723d81e34b4d967f762 16-Dec-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint:
- Added four new ProgramPoint types that subclass PostStmt for use in
GRExprEngine::EvalLocation:
- PostOutOfBoundsCheckFailed
- PostUndefLocationCheckFailed
- PostNullCheckFailed
- PostLocationChecksSucceed
These were created because of a horribly subtle caching bug in EvalLocation
where a node representing an "bug condition" in EvalLocation (e.g. a null
dereference) could be re-used as the "non-bug condition" because the Store did
not contain any information to differentiate between the two. The extra
program points just disables any accidental caching between EvalLocation and
its callers.

GRExprEngine:
- EvalLocation now returns a NodeTy* instead of GRState*. This should be used as the "vetted" predecessor for EvalLoad/EvalStore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
605de8d1e3f8ebf01431e8a7448a7a3e0b8d0723 16-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Delay parsing of default arguments of member functions until the class
is completely defined (C++ [class.mem]p2).

Reverse the order in which we process the definitions of member
functions specified inline. This way, we'll get diagnostics in the
order in which the member functions were declared in the class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
72b505b7904b3c9320a1312998800ba76e4f5841 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Delay parsing of default arguments of member functions until the class
is completely defined (C++ [class.mem]p2).

Reverse the order in which we process the definitions of member
functions specified inline. This way, we'll get diagnostics in the
order in which the member functions were declared in the class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
519648829f41da741c871c0ff8122dd956259a59 16-Dec-2008 Nate Begeman <natebegeman@mac.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Parse/Scope.h
fea8685bf3036b199c573e70b03affde2583fc44 16-Dec-2008 Nate Begeman <natebegeman@mac.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Parse/Scope.h
f8bfa0c944df6195d36ab51cc0eb296c3abeba43 16-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to check for ObjC's property type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
105ec4bb8e969eee18b4c2f503b46b17f3e2f364 16-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to check for ObjC's property type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
24effa8f97905f1ed88317a763f7a2742dd23f7f 16-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Make name lookup when we're inside a declarator's scope, such as ClassName::func, work with the new unqualified name lookup code. Test it with default arguments in out-of-line member definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
0a59acb9ae36077ce46fb2807956c5e84f0f6837 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Make name lookup when we're inside a declarator's scope, such as ClassName::func, work with the new unqualified name lookup code. Test it with default arguments in out-of-line member definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
c5cbc24943ddf0867e89e68c0c93722b9e72d620 16-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Diagnose erroneous uses of out-of-line member definitions and scope
specifiers. Specifically:
* Determine when an out-of-line function definition does not match
any declaration within the class or namespace (including coping
with overloaded functions).
* Complain about typedefs and parameters that have scope specifiers.
* Complain about out-of-line declarations that aren't also
definitions.
* Complain about non-static data members being declared out-of-line.
* Allow cv-qualifiers on out-of-line member function definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
584049d49d956add7bce5669e9823491f7d8de78 16-Dec-2008 Douglas Gregor <dgregor@apple.com> Diagnose erroneous uses of out-of-line member definitions and scope
specifiers. Specifically:
* Determine when an out-of-line function definition does not match
any declaration within the class or namespace (including coping
with overloaded functions).
* Complain about typedefs and parameters that have scope specifiers.
* Complain about out-of-line declarations that aren't also
definitions.
* Complain about non-static data members being declared out-of-line.
* Allow cv-qualifiers on out-of-line member function definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
cb8e803696224e723e294d7e3ef79e5e393493eb 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Name of addLayoutToClass is confusing as no layout calculation
is done. Layout is calculated lazily at code gen type.
This patch changes the name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9ee92e84ecf085ccbe6f877d1c6e1500961bbbce 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Name of addLayoutToClass is confusing as no layout calculation
is done. Layout is calculated lazily at code gen type.
This patch changes the name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b9213832bca8e9a31450604e56a1da067fea4b7c 15-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Place constructors and destructors into the DeclContext of the class,
just like all other members, and remove the special variables in
CXXRecordDecl to store them. This eliminates a lot of special-case
code for constructors and destructors, including
ActOnConstructor/ActOnDeclarator and special lookup rules in
LookupDecl. The result is far more uniform and manageable.

Diagnose the redeclaration of member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
9e7d9de3ef538c1473248238b76a6d7b16f5f684 15-Dec-2008 Douglas Gregor <dgregor@apple.com> Place constructors and destructors into the DeclContext of the class,
just like all other members, and remove the special variables in
CXXRecordDecl to store them. This eliminates a lot of special-case
code for constructors and destructors, including
ActOnConstructor/ActOnDeclarator and special lookup rules in
LookupDecl. The result is far more uniform and manageable.

Diagnose the redeclaration of member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
86008c06acdaccb4308c514a4d5c56e3023e72fb 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Code gen. for ivar references; including bitfield
ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
fd64bb635dc221baa19f81d5d2a084f7eb269f7f 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Code gen. for ivar references; including bitfield
ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5f9fb3fce53dc9b12eafd31df9b9af85791c9ee7 15-Dec-2008 Ted Kremenek <kremenek@apple.com> Preprocessor: Allocate MacroInfo objects using a BumpPtrAllocator instead using new/delete. This speeds up -Eonly on Cocoa.h using the regular lexer by 1.8% and the PTHLexer by 3%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0ea76727ae91bca918a8414ed85b530eddcfedeb 15-Dec-2008 Ted Kremenek <kremenek@apple.com> Preprocessor: Allocate MacroInfo objects using a BumpPtrAllocator instead using new/delete. This speeds up -Eonly on Cocoa.h using the regular lexer by 1.8% and the PTHLexer by 3%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ae644896ecccf05b5497a311a8a55112023a0b83 15-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Create new EnumDecl nodes for redeclarations of enums, linking them
together in the same way that we link RecordDecl/CXXRecordDecl nodes.

Unify ActOnTag and ActOnTagStruct.

Fixes PR clang/2753.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7df7b6bb800e1987951285ea192e4f347e1b603a 15-Dec-2008 Douglas Gregor <dgregor@apple.com> Create new EnumDecl nodes for redeclarations of enums, linking them
together in the same way that we link RecordDecl/CXXRecordDecl nodes.

Unify ActOnTag and ActOnTagStruct.

Fixes PR clang/2753.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
09772396cb7b6c47b05858ae74e78b113adf3821 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for ObjCIvarRefExpr containing the field
matching the storage layout for this ivar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/ExprObjC.h
aaa63a761c6671a08e3f4f463435b72739fa194b 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for ObjCIvarRefExpr containing the field
matching the storage layout for this ivar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60996 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/ExprObjC.h
f5da325cb01fdcc7f21feaf721deb8bfffb7ff96 13-Dec-2008 Ted Kremenek <kremenek@apple.com> MemRegion:
- Overhauled the notion of "types" for TypedRegions. We now distinguish between the "lvalue" of a region (via getLValueRegion()) and the "rvalue" of a region (va getRValueRegion()). Since a region represents a chunk of memory it has both, but we were conflating these concepts in some cases, leading to some insidious bugs.
- Removed AnonPointeeType, partially because it is unused and because it doesn't have a clear notion of lvalue vs rvalue type. We can add it back once there is a need for it and we can resolve its role with these concepts.

StoreManager:
- Overhauled StoreManager::CastRegion. It expects an *lvalue* type for a region. This is actually what motivated the overhaul to the MemRegion type mechanism. It also no longer returns an SVal; we can just return a MemRegion*.
- BasicStoreManager::CastRegion now overlays an "AnonTypedRegion" for pointer-pointer casts. This matches with the MemRegion changes.
- Similar changes to RegionStore, except I've added a bunch of FIXMEs where it wasn't 100% clear where we should use TypedRegion::getRValueRegion() or TypedRegion::getLValueRegion().

AuditCFNumberCreate check:
- Now blasts through AnonTypedRegions that may layer the original memory region, thus checking if the actually memory block is of the appropriate type. This change was needed to work with the changes to StoreManager::CastRegion.

GRExprEngine::VisitCast:
- Conform to the new interface of StoreManager::CastRegion.

Tests:
- None of the analysis tests fail now for using the "basic store".
- Disabled the tests 'array-struct.c' and 'rdar-6442306-1.m' pending further testing and bug fixing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
6eddeb153415049c7b62de4b45385a759a6906c6 13-Dec-2008 Ted Kremenek <kremenek@apple.com> MemRegion:
- Overhauled the notion of "types" for TypedRegions. We now distinguish between the "lvalue" of a region (via getLValueRegion()) and the "rvalue" of a region (va getRValueRegion()). Since a region represents a chunk of memory it has both, but we were conflating these concepts in some cases, leading to some insidious bugs.
- Removed AnonPointeeType, partially because it is unused and because it doesn't have a clear notion of lvalue vs rvalue type. We can add it back once there is a need for it and we can resolve its role with these concepts.

StoreManager:
- Overhauled StoreManager::CastRegion. It expects an *lvalue* type for a region. This is actually what motivated the overhaul to the MemRegion type mechanism. It also no longer returns an SVal; we can just return a MemRegion*.
- BasicStoreManager::CastRegion now overlays an "AnonTypedRegion" for pointer-pointer casts. This matches with the MemRegion changes.
- Similar changes to RegionStore, except I've added a bunch of FIXMEs where it wasn't 100% clear where we should use TypedRegion::getRValueRegion() or TypedRegion::getLValueRegion().

AuditCFNumberCreate check:
- Now blasts through AnonTypedRegions that may layer the original memory region, thus checking if the actually memory block is of the appropriate type. This change was needed to work with the changes to StoreManager::CastRegion.

GRExprEngine::VisitCast:
- Conform to the new interface of StoreManager::CastRegion.

Tests:
- None of the analysis tests fail now for using the "basic store".
- Disabled the tests 'array-struct.c' and 'rdar-6442306-1.m' pending further testing and bug fixing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
624921a9c7054a2613a5ac57e44320cc6b9adcc6 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Add storage layout to ObjC classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
60f8c868ffb346b78451a3eccaecd0461d2ae498 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Add storage layout to ObjC classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2c0de355c77c6a1dfdedfcc061107a175736df71 13-Dec-2008 Ted Kremenek <kremenek@apple.com> A series of cleanups/fixes motivated by <rdar://problem/6442306>:

GRExprEngine (VisitCast):
- When using StoreManager::CastRegion, always use the state and value it returns to generate the next node. Failure to do so means that region values returned that don't require the state to be modified will get ignored.

MemRegion:
- Tighten the interface for ElementRegion. Now ElementRegion can only be created with a super region that is a 'TypedRegion' instead of any MemRegion. Code in BasicStoreManager/RegionStoreManager already assumed this, but it would result in a dynamic assertion check (and crash) rather than just having the compiler forbid the construction of such regions.
- Added ElementRegion::getArrayRegion() to return the 'typed version' of an ElementRegion's super region.
- Removed bogus assertion in ElementRegion::getType() that assumed that the super region was an AnonTypedRegion. All that matters is that it is a TypedRegion, which is now true all the time by design.

BasicStore:
- Modified getLValueElement() to check if the 'array' region is a TypedRegion before creating an ElementRegion. This conforms to the updated interface for ElementRegion.

RegionStore:
- In ArrayToPointer() gracefully handle things we don't reason about, and only create an ElementRegion if the array region is indeed a TypedRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
abb042f33ea8e6107a7dc8efc51d2ace329f9f48 13-Dec-2008 Ted Kremenek <kremenek@apple.com> A series of cleanups/fixes motivated by <rdar://problem/6442306>:

GRExprEngine (VisitCast):
- When using StoreManager::CastRegion, always use the state and value it returns to generate the next node. Failure to do so means that region values returned that don't require the state to be modified will get ignored.

MemRegion:
- Tighten the interface for ElementRegion. Now ElementRegion can only be created with a super region that is a 'TypedRegion' instead of any MemRegion. Code in BasicStoreManager/RegionStoreManager already assumed this, but it would result in a dynamic assertion check (and crash) rather than just having the compiler forbid the construction of such regions.
- Added ElementRegion::getArrayRegion() to return the 'typed version' of an ElementRegion's super region.
- Removed bogus assertion in ElementRegion::getType() that assumed that the super region was an AnonTypedRegion. All that matters is that it is a TypedRegion, which is now true all the time by design.

BasicStore:
- Modified getLValueElement() to check if the 'array' region is a TypedRegion before creating an ElementRegion. This conforms to the updated interface for ElementRegion.

RegionStore:
- In ArrayToPointer() gracefully handle things we don't reason about, and only create an ElementRegion if the array region is indeed a TypedRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
91f9b0aa21ff25478a4558bdc3f92b3c1fae632f 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Some utilities for using the smart pointers in Actions, especially Sema. Convert a few functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
798d119415323ebcd029ffe1e0fb442a4ca8adbb 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Some utilities for using the smart pointers in Actions, especially Sema. Convert a few functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a2deb433204c0dd6cbb88bfce3a6f3be5f22c554 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert remaining expression parsers to smart pointers. Now on to the Action connection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
lang/Parse/Parser.h
1d922960e083906a586609ac6978678147250177 13-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert remaining expression parsers to smart pointers. Now on to the Action connection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
lang/Parse/Parser.h
c07091c46729b3203854edf95411de3986021900 12-Dec-2008 Ted Kremenek <kremenek@apple.com> Added PTH optimization to not process entire blocks of tokens that appear in skipped preprocessor blocks. This improves PTH speed by 6%. The code for this optimization itself is not very optimized, and will get cleaned up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/Preprocessor.h
268ee7016a2811803989487c0ad3799486092c63 12-Dec-2008 Ted Kremenek <kremenek@apple.com> Added PTH optimization to not process entire blocks of tokens that appear in skipped preprocessor blocks. This improves PTH speed by 6%. The code for this optimization itself is not very optimized, and will get cleaned up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/Preprocessor.h
98341049a14443ad41927de25d8950936a39aedd 12-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Enable out-of-line definitions of C++ constructors and destructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
9d35097bc0fefb2f77638be513cac72d1c09d840 12-Dec-2008 Douglas Gregor <dgregor@apple.com> Enable out-of-line definitions of C++ constructors and destructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
c8d7a40a5d8628b3536ba6e6a1d235f5ed221aec 12-Dec-2008 Chris Lattner <sabre@nondot.org> fix breakage I introduced in r60938


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
3d8173c1c68f451c7492f92023d829c626845925 12-Dec-2008 Chris Lattner <sabre@nondot.org> fix breakage I introduced in r60938


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
819e3089cf67bc977cbf8cbd2129c55db6c44f6a 12-Dec-2008 Chris Lattner <sabre@nondot.org> silence warning in release-asserts mode about unused variable, also
move comment into assert message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
43b28d07019bc78447ecbbb721526de4ffd83f20 12-Dec-2008 Chris Lattner <sabre@nondot.org> silence warning in release-asserts mode about unused variable, also
move comment into assert message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
a82444d751a5c34190b1dd979b3e15247e482a44 12-Dec-2008 Chris Lattner <sabre@nondot.org> use smarter error recovery for do/while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
ff871fb8f9c5906a4dee78afd81f60c3837e16cb 12-Dec-2008 Chris Lattner <sabre@nondot.org> use smarter error recovery for do/while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f959397a2b6aa7e86c630ffb93a06315c0436497 12-Dec-2008 Chris Lattner <sabre@nondot.org> apply the new error recovery smarts we have for if's to while's and switch's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
15ff1110c96a26c9315142d407c1f29d86a5ad1f 12-Dec-2008 Chris Lattner <sabre@nondot.org> apply the new error recovery smarts we have for if's to while's and switch's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bce5e4f8e89830ed30afa8b102c1ec42ededfc9b 12-Dec-2008 Chris Lattner <sabre@nondot.org> fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func

Yeah, this is "useful".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b0da923653601191c4f60bdc284feae376d28cda 12-Dec-2008 Chris Lattner <sabre@nondot.org> fix rdar://6097892 - gcc incompat: clang rejects __func__, __FUNCTION__, and __PRETTY_FUNCTION__ outside func

Yeah, this is "useful".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8464c370159a4e19d38694b76a651199ea0446aa 12-Dec-2008 Chris Lattner <sabre@nondot.org> Implement rdar://6138816 - [sema] named bitfields cannot have 0 width


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
cd08707a960842223e4af9ab82c729ba179290c0 12-Dec-2008 Chris Lattner <sabre@nondot.org> Implement rdar://6138816 - [sema] named bitfields cannot have 0 width


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
39d4f029cc4aa13d6cdebd3bd8cf4104682569d1 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a big bunch of expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
20df9b7ab9388b2a488c5b1293cd196b1e073b4e 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a big bunch of expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
fe5c62d198d736ef652c641ff8b6625af1bf3764 11-Dec-2008 Ted Kremenek <kremenek@apple.com> PTHLexer: Keep track of the location of the last '#' token and provide the means to jump ahead in the token stream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
cd223444d1680290efe11da657faafc9a1ac14ba 11-Dec-2008 Ted Kremenek <kremenek@apple.com> PTHLexer: Keep track of the location of the last '#' token and provide the means to jump ahead in the token stream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
a6817a08c234a2a9665dfb98c0b7266d467243f4 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d8c4e15138e69a51754cc259c8a592cc47950c8e 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
14ca741f0907af4c89834bcc89352e6f56ede723 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert selected expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
lang/Parse/Parser.h
2f7ece7c77eb17e24e8f0f4e1b7fb01aa5111f96 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert selected expression parsers to use smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
lang/Parse/Parser.h
3967762597e4c1f410a83493df22f38432557a61 11-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Address some comments on the name lookup/DeclContext patch from Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e267ff35b2f4e9d2b0d8bf24109d41cc7398b61b 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Address some comments on the name lookup/DeclContext patch from Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e8b79e6a11c20495bb1bc1d24f0ca3152edb49a7 11-Dec-2008 Ted Kremenek <kremenek@apple.com> Remove unused ivar CurTokenIdx.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
7415326dcbba6f333f5f7708ac1bf4982f3adb5a 11-Dec-2008 Ted Kremenek <kremenek@apple.com> Remove unused ivar CurTokenIdx.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
15bf1456a9b943f7d23538343f091dbb01c42861 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert the remaining statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
43bc2a0973ffe404fabba6f8280cd6bad2c69fcb 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert the remaining statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a88da59fdedb0e886791d38e8b563483cc62c4c0 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9a920342707e384473b464528d2fd286e8c70353 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert some more statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
10c3295da58b905e589b694ade5d08d5f5eb4b50 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a number of statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
61364dddc33383e62cfe3b841dbc0f471280d95b 11-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Convert a number of statement parsers to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
640a04ba33ae3fb9de6bed628cd70ee679f8d808 11-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a4c46df1cd63e06af2a094b68b902a3eb232f056 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8acb72795794649013477457cd06a0d3871a2374 11-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).

* Implement C++ qualified name lookup in terms of lookup into
DeclContext.

* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)

* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.

* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).

* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclarationName.h
lang/Parse/Action.h
lang/Parse/Scope.h
44b4321feab46299d3f5cfd404680884752a0fcf 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).

* Implement C++ qualified name lookup in terms of lookup into
DeclContext.

* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)

* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.

* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).

* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclarationName.h
lang/Parse/Action.h
lang/Parse/Scope.h
2dfa8259e1c071c79eb6f8eabd6d877c95e1212b 11-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Identify AnonPointeeRegion by the symbol that is concretized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
c5458622a30ede903e8d1e800cbf9382bd45b69f 11-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Identify AnonPointeeRegion by the symbol that is concretized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
998605c25dc85b99f230c04bf043f05dc7bd8f8b 11-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> AnonPointeeRegions are now identified by the MemRegion of the pointer pointing
to them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
3bb662a8635a1f85a64719759ead76abffe0e172 11-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> AnonPointeeRegions are now identified by the MemRegion of the pointer pointing
to them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
55dacf3ed73308f387d1321fd66022349f01394d 11-Dec-2008 Ted Kremenek <kremenek@apple.com> PreprocessorLexer (and subclasses):
- Added virtual method 'getSourceLocation()' (no arguments) that gets the location of the next "observable" location (e.g., next character, next token).
PPLexerChange.cpp:
- Implemented FIXME by using PreprocessorLexer::getSourceLocation() to get the location in the file we are returning to after lexing a #included file. This appears to be slightly faster than having the branch (i.e., 'if(CurLexer)'). It's also not a really hot part of the Preprocessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PTHLexer.h
lang/Lex/PreprocessorLexer.h
bc0f6bc0391ecdff331885cdc769c20b2cb628a6 11-Dec-2008 Ted Kremenek <kremenek@apple.com> PreprocessorLexer (and subclasses):
- Added virtual method 'getSourceLocation()' (no arguments) that gets the location of the next "observable" location (e.g., next character, next token).
PPLexerChange.cpp:
- Implemented FIXME by using PreprocessorLexer::getSourceLocation() to get the location in the file we are returning to after lexing a #included file. This appears to be slightly faster than having the branch (i.e., 'if(CurLexer)'). It's also not a really hot part of the Preprocessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PTHLexer.h
lang/Lex/PreprocessorLexer.h
48840c744b86163706d32fe4f75a6c9f04f43730 11-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Added a warning when referencing an if's condition variable in the
"else" clause, e.g.,

if (int X = foo()) {
} else {
if (X) { // warning: X is always zero in this context
}
}

Fixes rdar://6425550 and lets me think about something other than
DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Scope.h
caaf29a08761b14fbe42a29080c22dd6961056d1 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Added a warning when referencing an if's condition variable in the
"else" clause, e.g.,

if (int X = foo()) {
} else {
if (X) { // warning: X is always zero in this context
}
}

Fixes rdar://6425550 and lets me think about something other than
DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Scope.h
802fbd86b9eae506e65b9b54bb1e6294e2776bf6 10-Dec-2008 Ted Kremenek <kremenek@apple.com> Declare PerIDCache as IdentifierInfo** instead of void*. This is just cleaner. No performance change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
cf58e6249c6b018508e34bcb76202caa42d2451a 10-Dec-2008 Ted Kremenek <kremenek@apple.com> Declare PerIDCache as IdentifierInfo** instead of void*. This is just cleaner. No performance change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
95d4079ba2b26126854357fe485c371b8622cb04 10-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Use a scoped object to manage entry/exit from a parser scope rather than explicitly calling EnterScope/ExitScope

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
8935b8b49053122ddd3ab4cd59af0fe5eb9c23cf 10-Dec-2008 Douglas Gregor <dgregor@apple.com> Use a scoped object to manage entry/exit from a parser scope rather than explicitly calling EnterScope/ExitScope

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
6f1ee23fcfb358171f14eeb076c366d16c566cfe 10-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Modify the move emulation according to the excellent design of Howard Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
lang/Parse/Parser.h
effa8d1c97b00a3f53e972b0e61d9aade5ea1c57 10-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Modify the move emulation according to the excellent design of Howard Hinnant. Makes for much nicer syntax when smart pointers are used consistently. Also, start converting internal argument passing of Parser to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60809 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Ownership.h
lang/Parse/Parser.h
0b7716c97e779a2a99ab782e7f2493cb153c5465 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Prevent bogus warning on unimplemented setter/getter when user
has added declaration of these methods in its @interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
91b51a92f2e9fc8025b6a9df88442840eb62823a 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Prevent bogus warning on unimplemented setter/getter when user
has added declaration of these methods in its @interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
91dd9d3cabbe94e48dd24bfe318a9ee5a9b21617 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Support for implementation of property in the case where
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
fef30b55230064d334a669a065a1c9acdb87cdfe 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Support for implementation of property in the case where
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6226104950f18e250bf3d0bc15fe603b933d5938 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResult

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
15faa7fdfb496489dec9470aa5eb699b29ecdacc 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Kick out the proof-of-concept ASTOwner and replace it with ASTOwningResult

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60791 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
lang/Parse/Parser.h
8d82b75dbe096e901e1175905816926836f2f4b7 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Lay the groundwork for converting the entire parser-sema chain to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
7f792faf0cee47fa1ea304bd7a7f502c0e5bbc9a 09-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Lay the groundwork for converting the entire parser-sema chain to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Ownership.h
088edc8181766a8b15d20e98bb6ccf0b7bd4acf7 09-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> initialize member variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
0bc27eab2079c01771cf025a77fd2205378182d8 09-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> initialize member variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60759 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b50a09ca857f26fd7c951b6c155f702d60796474 09-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add utility method. Remove an unused method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
2fdf555af136cb017f4dc0c26d5d3415d122e1ff 09-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add utility method. Remove an unused method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
7419fbda2e707896e79ad7fa20c1acb3fc240ce6 09-Dec-2008 Ted Kremenek <kremenek@apple.com> [static analyzer] Extend VLA size checking to look for undefined sizes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
159d2487e6b49f0aa64c44aef96bc9d643929931 09-Dec-2008 Ted Kremenek <kremenek@apple.com> [static analyzer] Extend VLA size checking to look for undefined sizes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
41a40bc636e87815dac1a9e52a323e573bf33dd1 09-Dec-2008 Ted Kremenek <kremenek@apple.com> Fixed LiveVariables bug where we didn't consider block-level expressions that functioned as the size of a VLA to be live.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/Support/BlkExprDeclBitVector.h
e0dbda136444b2f3550a421f4436d438230c732f 09-Dec-2008 Ted Kremenek <kremenek@apple.com> Fixed LiveVariables bug where we didn't consider block-level expressions that functioned as the size of a VLA to be live.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/Support/BlkExprDeclBitVector.h
f8f0d3c6e0f5af64ab650f84eff36b527e8de26f 08-Dec-2008 Ted Kremenek <kremenek@apple.com> Add checking for zero-sized VLAs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
efd5994d6a35b6b16b29cc59a0d9ef8a14d9c6f8 08-Dec-2008 Ted Kremenek <kremenek@apple.com> Add checking for zero-sized VLAs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
f189290ce2a564a1531c41c9ded6d0ee6ab23954 08-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Changed 'readonly' 'retain/copy' diagnostics into
warning as it is allowed in gcc and will break projects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ba45da8328b97fe7c9f4d92e377bd3e586b9a79f 08-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Changed 'readonly' 'retain/copy' diagnostics into
warning as it is allowed in gcc and will break projects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2715a1f5a94534980bd61dab5652a3d8c03be39c 08-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
f57172b24f08a68d179675989813d5479dc87829 08-Dec-2008 Douglas Gregor <dgregor@apple.com> Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
c05c2f37aee5fc3aa164f7269405b74c738f5e7d 07-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Fix outdated comment. Checks so much more than just typedefs in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
3cc461dccbfd3503f8a07cd46dae838245c27f26 07-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Fix outdated comment. Checks so much more than just typedefs in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
ad476c0129c26ca3b3f46629da797a63c27f30cc 07-Dec-2008 Chris Lattner <sabre@nondot.org> a minor grammar fix


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
211316faa26af4ce594a10bcfc204124fe363362 07-Dec-2008 Chris Lattner <sabre@nondot.org> a minor grammar fix


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
68adbd15ff5f148e17dea108f7c76ae711a6a7eb 07-Dec-2008 Anders Carlsson <andersca@mac.com> Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
96e05bc09070aaa7c18d3dd3ff13125a43532f69 07-Dec-2008 Anders Carlsson <andersca@mac.com> Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
acad6d1ae92bf3150fce97137889e1ec19fa7316 07-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Use of properties declared in protocols in the category
via the category's protocol list1s, with appropriate
diagnsostics and a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
1ac2bc44781ec8451f880dcf586768a71824d3a6 07-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Use of properties declared in protocols in the category
via the category's protocol list1s, with appropriate
diagnsostics and a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
88a6293ed42aa6aa186ba2e9d3c4bee967e80d09 06-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Improve error reporting of property and setter/getter
type mimatches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
196d0ed5e13bbea4cbe327060eb3cba7fa83898f 06-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Improve error reporting of property and setter/getter
type mimatches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
108229a2eece5159ea6451d9446d29b7bd7a6e29 06-Dec-2008 Anders Carlsson <andersca@mac.com> Add diagnostics for bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
9f1e5727e36481d830e566ff5a016fda726838e4 06-Dec-2008 Anders Carlsson <andersca@mac.com> Add diagnostics for bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0f5ae03f71238dcc6f0591fdc4beca11cdaa8502 06-Dec-2008 Anders Carlsson <andersca@mac.com> Simplify some diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a75023d60fc22cef8c5c0e6ea79758233f4d2e2d 06-Dec-2008 Anders Carlsson <andersca@mac.com> Simplify some diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a133e26a86b181df1188a7af7671db790b5e56b2 06-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for calls to dependent names within templates, e.g.,

template<typename T> void f(T x) {
g(x); // g is a dependent name, so don't even bother to look it up
g(); // error: g is not a dependent name
}

Note that when we see "g(", we build a CXXDependentNameExpr. However,
if none of the call arguments are type-dependent, we will force the
resolution of the name "g" and replace the CXXDependentNameExpr with
its result.

GCC actually produces a nice error message when you make this
mistake, and even offers to compile your code with -fpermissive. I'll
do the former next, but I don't plan to do the latter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
5c37de788529cd9180f22069970737a7208bd625 06-Dec-2008 Douglas Gregor <dgregor@apple.com> Add support for calls to dependent names within templates, e.g.,

template<typename T> void f(T x) {
g(x); // g is a dependent name, so don't even bother to look it up
g(); // error: g is not a dependent name
}

Note that when we see "g(", we build a CXXDependentNameExpr. However,
if none of the call arguments are type-dependent, we will force the
resolution of the name "g" and replace the CXXDependentNameExpr with
its result.

GCC actually produces a nice error message when you make this
mistake, and even offers to compile your code with -fpermissive. I'll
do the former next, but I don't plan to do the latter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
1b21c7ffe5fac1711fea35e4830159004a835c1a 06-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Introduce basic support for dependent types, type-dependent
expressions, and value-dependent expressions. This permits us to parse
some template definitions.

This is not a complete solution; we're missing type- and
value-dependent computations for most of the expression types, and
we're missing checks for dependent types and type-dependent
expressions throughout Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/Type.h
898574e7496ba8fd76290079d3a9d06954992734 06-Dec-2008 Douglas Gregor <dgregor@apple.com> Introduce basic support for dependent types, type-dependent
expressions, and value-dependent expressions. This permits us to parse
some template definitions.

This is not a complete solution; we're missing type- and
value-dependent computations for most of the expression types, and
we're missing checks for dependent types and type-dependent
expressions throughout Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/Type.h
6834228be513a9bf574db13b214cc31b3312d936 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This test checks for duplicate implementation of the same
property. It also checks for duplicate use of the same ivar
in two different iproperty implementations. It also caught
an error for a test case used in CodeGen :).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
ae6f6fd1527a1da84679a6f0439dec3bbbd6ca7b 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This test checks for duplicate implementation of the same
property. It also checks for duplicate use of the same ivar
in two different iproperty implementations. It also caught
an error for a test case used in CodeGen :).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
4e0f645b99e2f12c60f2f9411c17015c2d0172de 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> (instance/class) Method type checking between class and its implementation.
(instance/class) Method type checking between category and its implementation.
And a test case for all.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8daab970b80ed2e751fc88327180acbeff1dbb9c 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> (instance/class) Method type checking between class and its implementation.
(instance/class) Method type checking between category and its implementation.
And a test case for all.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
dd861060e2e1f1e41f7b023d025fcd8eb183686d 05-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Representation of template type parameters and non-type template
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)

Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.

Next up: dependent types and value-dependent/type-dependent
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Scope.h
72c3f314d92d65c050ee1c07b7753623c044d6c7 05-Dec-2008 Douglas Gregor <dgregor@apple.com> Representation of template type parameters and non-type template
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)

Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.

Next up: dependent types and value-dependent/type-dependent
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Scope.h
5374c6b82e4fb6b94eb4c7f18f838aa6e3226de0 05-Dec-2008 Anders Carlsson <andersca@mac.com> Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
49184b2916f2f6535ac22f8517dc1e996225d2f1 05-Dec-2008 Anders Carlsson <andersca@mac.com> Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a288864da7504bbfba84407c71f7e54a3346109c 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Change the implementation of symbol_iterator to not use a union and rely on any details of SymbolRef's implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
96f560b96ba3fb7b9a5408db22b481206b211f1c 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Change the implementation of symbol_iterator to not use a union and rely on any details of SymbolRef's implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
8b60badd94b921a9a859bb3710f7d8e94c30e4b4 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Add SymbolRef::print() and have SymbolicRegion::print() use this method instead of calling SymbolRef::getNumber().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
562731eabbed616535874c99655c81cc55d713fb 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Add SymbolRef::print() and have SymbolicRegion::print() use this method instead of calling SymbolRef::getNumber().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
f1bfc843200137f4eece27ea09a0dd7a96add54d 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Remove (unused) RegionExtent and subclasses. Extents are now represented easily using SVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
9ceffa9ef4c1398815cddde7120779e8e0a84917 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Remove (unused) RegionExtent and subclasses. Extents are now represented easily using SVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b9cd9a7071bb54fc88bb951e333cb6366b3d8399 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Rename SymbolID to SymbolRef. This is a precursor to some overhauling of the representation of symbolic values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
2dabd4372c50019fa00aae223ce634e0e754a3f2 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Rename SymbolID to SymbolRef. This is a precursor to some overhauling of the representation of symbolic values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
7a0d5e94388c62ed48b47ed7a3265362c07b7e76 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Remove SymbolDataContentsOf (unused).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
f3d416267ec92cf28da11a79b47383179b77c5d0 05-Dec-2008 Ted Kremenek <kremenek@apple.com> Remove SymbolDataContentsOf (unused).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
0de2e0feea59a3f4dd17542a6b702291822573e5 05-Dec-2008 Ted Kremenek <kremenek@apple.com> StoreManager::Retrieve and StoreManager::RemoveDeadBindings now take a GRState* argument instead of a Store. This allows them to use the GDM for storing other data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
2ed14beed7dcb46245328d72ac7011c92c1bd676 05-Dec-2008 Ted Kremenek <kremenek@apple.com> StoreManager::Retrieve and StoreManager::RemoveDeadBindings now take a GRState* argument instead of a Store. This allows them to use the GDM for storing other data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
e5cb586c259546f534d30df1c39b77e49dd3a839 05-Dec-2008 Chris Lattner <sabre@nondot.org> change getCurFunctionDecl to skip through Block contexts to find
the containing block. Introduce a new getCurFunctionOrMethodDecl
method to check to see if we're in a function or objc method.
Minor cleanups to other related places. This fixes rdar://6405429.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
371f258e61e1365b951b17931a3c5ac1530fd1a0 05-Dec-2008 Chris Lattner <sabre@nondot.org> change getCurFunctionDecl to skip through Block contexts to find
the containing block. Introduce a new getCurFunctionOrMethodDecl
method to check to see if we're in a function or objc method.
Minor cleanups to other related places. This fixes rdar://6405429.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d7bc88b153eefe3a8ce8be467c966b4ea7f58944 05-Dec-2008 Chris Lattner <sabre@nondot.org> instead of forcing blocks on by default, make them default to off, but let
specific targets default them to on. Default blocks to on on 10.6 and later.
Add a -fblocks option that allows the user to override the target's default.
Use -fblocks in the various testcases that use blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
ae0ee03fd9d36446ee70e502fdaf5ed5acec269f 05-Dec-2008 Chris Lattner <sabre@nondot.org> instead of forcing blocks on by default, make them default to off, but let
specific targets default them to on. Default blocks to on on 10.6 and later.
Add a -fblocks option that allows the user to override the target's default.
Use -fblocks in the various testcases that use blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
3d7aa252a922305cc9e7955023f1b01a068ebf00 04-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Output better diagnostics for continuation class
property attribute mis-specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
06de37bade11b2d4187a1e4f74d0dcf2a72dda39 04-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Output better diagnostics for continuation class
property attribute mis-specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ddae7103e6b6651d879f55c97c16829dda1204fd 04-Dec-2008 Chris Lattner <sabre@nondot.org> replace useNeXTRuntimeAsDefault with a generic hook that allows targets
to specify their default language options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
8fc4dfb30e8bd94ca2ea7adb6cbece04fb96cd99 04-Dec-2008 Chris Lattner <sabre@nondot.org> replace useNeXTRuntimeAsDefault with a generic hook that allows targets
to specify their default language options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f7b2b4cc4c839523b19e519d1298a08d13b7e91c 04-Dec-2008 Steve Naroff <snaroff@apple.com> Fix build breakage from my previous commit.

Will discuss with Chris...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
3fa1fff997eb9119b922aa18934d0a5f7364a1d7 04-Dec-2008 Steve Naroff <snaroff@apple.com> Fix build breakage from my previous commit.

Will discuss with Chris...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
0e94841a989c315c43036c17c752d7136dcf9db2 04-Dec-2008 Steve Naroff <snaroff@apple.com> Several things...

- Implement RewritePropertySetter(). While the routine is simple, there were some tricky changes to RewriteFunctionBodyOrGlobalInitializer(), the main rewriter loop. It also required some additional instance data to distinguish setters from getters, as well as some changes to RewritePropertyGetter().

- Implement FIXME: for pretty printing ObjCPropertyRefExpr's.

- Changed ObjCPropertyRefExpr::getSourceRange() to point to the end of the property name (not the beginning). Also made a minor name change from "Loc"->"IdLoc" (to make it clear the Loc does not point to the ".").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
c77a636688e188af7e7a9a05829e542adb48e880 04-Dec-2008 Steve Naroff <snaroff@apple.com> Several things...

- Implement RewritePropertySetter(). While the routine is simple, there were some tricky changes to RewriteFunctionBodyOrGlobalInitializer(), the main rewriter loop. It also required some additional instance data to distinguish setters from getters, as well as some changes to RewritePropertyGetter().

- Implement FIXME: for pretty printing ObjCPropertyRefExpr's.

- Changed ObjCPropertyRefExpr::getSourceRange() to point to the end of the property name (not the beginning). Also made a minor name change from "Loc"->"IdLoc" (to make it clear the Loc does not point to the ".").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
9f81c3f85fd1094083ecd8d30a5a8f6774196eae 04-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Fix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satisfy compilers and language lawyers alike.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
d457589fc69dc7a9c80cd74d317c0b81a35a27c9 04-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Fix some type punning errors in SizeOfAlignOf and Typeid AST nodes. This should satisfy compilers and language lawyers alike.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
d66f12da2cd32f4725bebcd4d371a10bc6d89a61 03-Dec-2008 Ted Kremenek <kremenek@apple.com> Added GDM query functions "contains" for the data types that support the "Contains" method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
39b630fc1cef83d58c6e0f551debb16a4d547abe 03-Dec-2008 Ted Kremenek <kremenek@apple.com> Added GDM query functions "contains" for the data types that support the "Contains" method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
91fff77ac985a6fd7278ef839299cc576c8797e6 03-Dec-2008 Ted Kremenek <kremenek@apple.com> Added partial specialization of GRStatePartialTrait<T> with T = ImmutableSet<...>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
32d600ce59e780b7ff969309cbf742159abe018b 03-Dec-2008 Ted Kremenek <kremenek@apple.com> Added partial specialization of GRStatePartialTrait<T> with T = ImmutableSet<...>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
db4c8e831ea37cb09491ed9be6dc8c86f8922949 03-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH:
Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*. This leads to a 4% speedup at -fsyntax-only using PTH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
6183e4815a4019e97ad01bd880f12355599b75fd 03-Dec-2008 Ted Kremenek <kremenek@apple.com> PTH:
Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*. This leads to a 4% speedup at -fsyntax-only using PTH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
325cd30b64d7907d790e06f61b26427e5bb689da 03-Dec-2008 Ted Kremenek <kremenek@apple.com> - Remove PTHManager.cpp. Move all of its functions to PTHLexer.cpp since some of the internal methods are used by PTHLexer (their implementations are intertwined.) This enables some important inlining opportunities at -O3.

- Don't construct an std::vector<Token> prior to feeding PTH tokens to the Preprocessor. Stream them off the PTH file directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
0c6a77bc1f52f282a969538f139ebde429076ed3 03-Dec-2008 Ted Kremenek <kremenek@apple.com> - Remove PTHManager.cpp. Move all of its functions to PTHLexer.cpp since some of the internal methods are used by PTHLexer (their implementations are intertwined.) This enables some important inlining opportunities at -O3.

- Don't construct an std::vector<Token> prior to feeding PTH tokens to the Preprocessor. Stream them off the PTH file directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60447 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PTHManager.h
5223c3546329594a6cee5715f5e5afb7446cf393 02-Dec-2008 Ted Kremenek <kremenek@apple.com> Preprocessor:
- Added method "setPTHManager" that will be called by the driver to install
a PTHManager for the Preprocessor.
- Fixed some comments.
- Added EnterSourceFileWithPTH to mirror EnterSourceFileWithLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
6137dc99ef0c2b14050631367057758b0d596cb3 02-Dec-2008 Ted Kremenek <kremenek@apple.com> Preprocessor:
- Added method "setPTHManager" that will be called by the driver to install
a PTHManager for the Preprocessor.
- Fixed some comments.
- Added EnterSourceFileWithPTH to mirror EnterSourceFileWithLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
98288b8628b848d68fcee1c8edc37324d6fb662a 02-Dec-2008 Ted Kremenek <kremenek@apple.com> Added PTHManager, a utility class that will be used by Preprocessor to lazily create PTHLexer objects for pre-tokenized files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
be1ee79d20db9cec7ef81d7a22ba2eaddc9c95b5 02-Dec-2008 Ted Kremenek <kremenek@apple.com> Added PTHManager, a utility class that will be used by Preprocessor to lazily create PTHLexer objects for pre-tokenized files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHManager.h
faca797cb3a8c1a41c2ba4728f26bb93b902b01b 02-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More type-checking of setter/getter methods. This is still
work in prgress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f3cd3fd859120d58f745ba545c8da808e12a39ac 02-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More type-checking of setter/getter methods. This is still
work in prgress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
66df3efdf5d6a2d2b0a1e2f8764150f9af931d40 02-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Handle new by passing the Declaration to the Action, not a processed type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
cee63fbf0e64ac526582312bf8cf33263fc5c16e 02-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Handle new by passing the Declaration to the Action, not a processed type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
8e7f957cf957a43a36708a514d266b73790f05d6 02-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> A little more scaffolding for parsing templates:
- Template parameter scope to hold the template parameters
- Template parameter context for parsing declarators
- Actions for template type parameters and non-type template
parameters



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Scope.h
26236e8b7507017fded05da3474d842e802a1679 02-Dec-2008 Douglas Gregor <dgregor@apple.com> A little more scaffolding for parsing templates:
- Template parameter scope to hold the template parameters
- Template parameter context for parsing declarators
- Actions for template type parameters and non-type template
parameters



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Scope.h
ecfbb49cc91d777ddddb2c94950560771bb91661 02-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This patch corrects problem in searching for a setter/getter method for
a property. Previous scheme of seaching in interface's list of methods
would not work because this list is not yet constructed. This is in preparation
for doing semantic check on viability of setter/getter method declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b85cce6498c8c1c20f701571d85a3b2fe53338eb 02-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This patch corrects problem in searching for a setter/getter method for
a property. Previous scheme of seaching in interface's list of methods
would not work because this list is not yet constructed. This is in preparation
for doing semantic check on viability of setter/getter method declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60386 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b3bec71e9fe4db9c88de85e0332eabbbdb843411 02-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Basic support for parsing templates, from Andrew Sutton

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
adcac8824a9cff13f1ef61a69e38c1041cba12ee 02-Dec-2008 Douglas Gregor <dgregor@apple.com> Basic support for parsing templates, from Andrew Sutton

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60384 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
110be847fd1ea643907239b3794fa60a19276244 01-Dec-2008 Steve Naroff <snaroff@apple.com> -Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
-Start adding support for rewriting @synthesize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d40910b581b09c937a8c1fdcde9b8ec724398fb9 01-Dec-2008 Steve Naroff <snaroff@apple.com> -Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
-Start adding support for rewriting @synthesize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
20b88024e6596cfb94184cc6abdfe615a7cddcc0 01-Dec-2008 Daniel Dunbar <daniel@zuster.org> Add LangOptions marker for assembler-with-cpp mode and use to define
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor
formatting changes). Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
c1571453de3db2b26c15cc13115fac4ece84aa7c 01-Dec-2008 Daniel Dunbar <daniel@zuster.org> Add LangOptions marker for assembler-with-cpp mode and use to define
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor
formatting changes). Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
9ed9ac8363881eb3f2664361fe1f0f01e626c3dc 01-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Parse the exception-specification throw(...), a Microsoft extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a4745616ebe36ba7699f18618382e764aa8183a1 01-Dec-2008 Douglas Gregor <dgregor@apple.com> Parse the exception-specification throw(...), a Microsoft extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f8aa870bd0b800f52f4944c885f41b7ba3e7cfd2 01-Dec-2008 Anders Carlsson <andersca@mac.com> Revert change that made isNullPointerConstant start emitting warnings. We don't want that :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d26527708b2b2f3b1d747f570efd10149d48364e 01-Dec-2008 Anders Carlsson <andersca@mac.com> Revert change that made isNullPointerConstant start emitting warnings. We don't want that :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60333 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
511425ab02d26bbdd43ffa92746996d0419972e8 01-Dec-2008 Anders Carlsson <andersca@mac.com> Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4000ea685acfb3e827040ce0e172e13243c2edae 01-Dec-2008 Anders Carlsson <andersca@mac.com> Add Sema::isNullPointerConstant which extwarns if necessary. Use it in Sema::CheckConditionalOperands.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2ce7c3d4f4da502d629ddeeab31f4513568fffe6 01-Dec-2008 Anders Carlsson <andersca@mac.com> Add a new variant of isNullConstantExpr that returns an EvalResult.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
efa9b3877ef298bcb792600ac33521827e1f7faf 01-Dec-2008 Anders Carlsson <andersca@mac.com> Add a new variant of isNullConstantExpr that returns an EvalResult.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
38bb18c93c6b66f86259ee485b76c762f7cd8f54 30-Nov-2008 Anders Carlsson <andersca@mac.com> Change the diagnostics that the evaluator reports to be of type NOTE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0e8acbbba71ec6acd5dceb4fcbce63e463e1b755 30-Nov-2008 Anders Carlsson <andersca@mac.com> Change the diagnostics that the evaluator reports to be of type NOTE.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7f5a96e2826091bf0be09b23574d04fa6cffa05e 30-Nov-2008 Anders Carlsson <andersca@mac.com> Add a new variant of Evaluate and reimplement the old Evaluate in terms of the new.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5b45d4ef1ea3f04ec863daf8aa29be6c6e021750 30-Nov-2008 Anders Carlsson <andersca@mac.com> Add a new variant of Evaluate and reimplement the old Evaluate in terms of the new.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f6c835deaf7e18292feda05162d683d4538e68f9 30-Nov-2008 Anders Carlsson <andersca@mac.com> Add Expr::EvalResult struct. (Not used just yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
94deaf675ae60e11c2d9475c6dbfd0c7123160f5 30-Nov-2008 Anders Carlsson <andersca@mac.com> Add Expr::EvalResult struct. (Not used just yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b0ddba7680089c5efea2bfe4eef9364f5c7ad515 29-Nov-2008 Anders Carlsson <andersca@mac.com> CXXFunctionalCastExpr inherits from ExplicitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
960525cbfbfd46308090ec13946fcb250c887f09 29-Nov-2008 Anders Carlsson <andersca@mac.com> CXXFunctionalCastExpr inherits from ExplicitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
1e613a5926f23b35e203b11b75d944e72f37b4e6 29-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> To be consistent, make the index of the ElementRegion always signed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
0395b5d4987fe5baa818015e9d294c128619e4ec 29-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> To be consistent, make the index of the ElementRegion always signed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
ad4b379662af0511244a62578cda472bef00a7e2 29-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Implement the GNU __null extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
2d8b273470684a9cd47f0ce24743cc1f71ef7cbc 29-Nov-2008 Douglas Gregor <dgregor@apple.com> Implement the GNU __null extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
48a3432a72fd17868c0bf4d864ddb60420c63d68 29-Nov-2008 Chris Lattner <sabre@nondot.org> Switch QualType to use llvm::PointerIntPair internally to do the pointer
bitmangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5cf243a883872441d73ca49cea7e20de5802629b 29-Nov-2008 Chris Lattner <sabre@nondot.org> Switch QualType to use llvm::PointerIntPair internally to do the pointer
bitmangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60226 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8067064bc98c6abab6d9bc152106b7c0573eb478 28-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Enable the GRStateManager to do something when we finish a path. For example,
the ConstraintManager can print its internal state before its solver instance is
destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
e73dc26690776887bd2991461f6814498600d6eb 28-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Enable the GRStateManager to do something when we finish a path. For example,
the ConstraintManager can print its internal state before its solver instance is
destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
c70a6ed67a9f51da4e304b793856e587247b3caa 27-Nov-2008 Chris Lattner <sabre@nondot.org> remove dead diag


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a7fb9f8c802b67b8a4a95355b19eaf408c622e95 27-Nov-2008 Chris Lattner <sabre@nondot.org> remove dead diag


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2c8127e4fc3536cfabf3ca46f9741e20efb400bb 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> ImmutableList::getInternalPointer() returns a const ImmutableListImpl<T>* pointer, which must be converted to void* explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
e42aaba04bff90a1d08b95e36edcb7ff314c77c7 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> ImmutableList::getInternalPointer() returns a const ImmutableListImpl<T>* pointer, which must be converted to void* explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
19c04e73d70ea941bfd1f306a85466fef222de05 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add license comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ManagerRegistry.h
5abf03bbb9e8703d41bd241a4733d930791fd972 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add license comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/ManagerRegistry.h
0e77b7354cc5a62b1e17e250e6b246d4c8cd72e5 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add support for pluggable components of static analyzer.
- Creator function pointers are saved in ManagerRegistry.
- The Register* class is used to notify ManagerRegistry new module is
available.
- AnalysisManager queries ManagerRegistry for configurable module. Then it
passes them to GRExprEngine, in turn to GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Driver/ManagerRegistry.h
22438a8dfe9f2f273c0b1a47f3f80be782ea6f09 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add support for pluggable components of static analyzer.
- Creator function pointers are saved in ManagerRegistry.
- The Register* class is used to notify ManagerRegistry new module is
available.
- AnalysisManager queries ManagerRegistry for configurable module. Then it
passes them to GRExprEngine, in turn to GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Driver/ManagerRegistry.h
5f742a5ce5f5804536a529f9261771c14733ffba 27-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer now owns the Token vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
82a500b141b9a8001dac69f047478a43e2aebdff 27-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer now owns the Token vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
fc33232adf097e0e8311ba6ff3c2d529d9340691 26-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add some comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
44802cc435d5122701e4f1a9354381cff4b171c0 26-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add some comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60119 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
91c80dc52ae7363b8fefe0ad8bb457e8d24221ed 26-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement some suggestions by Daniel:

-Change Parser::ParseCXXScopeSpecifier to MaybeParseCXXScopeSpecifier
-Remove Parser::isTokenCXXScopeSpecifier and fold it into MaybeParseCXXScopeSpecifier
-Rename Parser::TryAnnotateScopeToken to TryAnnotateCXXScopeToken and only allow it to be called when in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4bdd91c09fd59e0c154d759288beff300e31e1d0 26-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement some suggestions by Daniel:

-Change Parser::ParseCXXScopeSpecifier to MaybeParseCXXScopeSpecifier
-Remove Parser::isTokenCXXScopeSpecifier and fold it into MaybeParseCXXScopeSpecifier
-Rename Parser::TryAnnotateScopeToken to TryAnnotateCXXScopeToken and only allow it to be called when in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a99bd888fc473ef4b76679ad50cc218383bbec36 26-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add an overload for operator<<(const DiagnosticBuilder &DB,bool I).
Fixes building error on MSVC where passing bool couldn't resolve to one of the overloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
3bf4a79712fb30dc27692ef2d4214ee7fa6681be 26-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add an overload for operator<<(const DiagnosticBuilder &DB,bool I).
Fixes building error on MSVC where passing bool couldn't resolve to one of the overloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
bcda0b464e0df135b03758b84168707c81fbeb86 26-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Set default property attributes on each property.
Implemented anonymous category (also know as continuation class)
used to override main class's property attribute. This is work in
propgress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
8cf0bb3c2a798ce3acacaac2d3178648cd4c65c6 26-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Set default property attributes on each property.
Implemented anonymous category (also know as continuation class)
used to override main class's property attribute. This is work in
propgress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
b97be509660a1c4283729a3ddfe3db7a95956a51 26-Nov-2008 Ted Kremenek <kremenek@apple.com> Add setter method PreprocessorLexer::setParsingPreprocessorDirective(). This will be used by the mechanism to generate cached tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
63db2a78010f4d0f7a6783ea1e2d1469c9b154ad 26-Nov-2008 Ted Kremenek <kremenek@apple.com> Add setter method PreprocessorLexer::setParsingPreprocessorDirective(). This will be used by the mechanism to generate cached tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
6008ac320d78b808c5c810fb1d8234a74fc345d2 25-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Use RAII objects to ensure proper destruction of expression and statement AST nodes in the parser in most cases, even on error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a55e52c0802cae3b7c366a05c461d3d15074c1a3 25-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Use RAII objects to ensure proper destruction of expression and statement AST nodes in the parser in most cases, even on error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4739da15300381a2b2f65460b3937de2e380d06a 25-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Refactored checking on readonly property into a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
31afbf02a381ae9c77d225aa54f972d152838b3a 25-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Refactored checking on readonly property into a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
90a2c9737feaa47d4fd9e0e553816164b17b6b16 25-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Simple parsing of exception specifications, with no semantic analysis yet

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0fe7bea6fca9737c6c145aaa4a2ad3abe595782a 25-Nov-2008 Douglas Gregor <dgregor@apple.com> Simple parsing of exception specifications, with no semantic analysis yet

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
2ca0d6ed52b7962d32870980971f3707eaf4427c 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add support for AllocaRegion extent with GDM.

One design problem that is emerging is the signed-ness problem during static
analysis. Many unsigned value have to be converted into signed value because
it partipates in operations with signed values.

On the other hand, we cannot blindly make all values occuring in static analysis
signed, because we do have cases where unsignedness is required, for example,
integer overflow detection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
baf03a7c0a846632396f9f5a19f6cd45bbe2b926 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add support for AllocaRegion extent with GDM.

One design problem that is emerging is the signed-ness problem during static
analysis. Many unsigned value have to be converted into signed value because
it partipates in operations with signed values.

On the other hand, we cannot blindly make all values occuring in static analysis
signed, because we do have cases where unsignedness is required, for example,
integer overflow detection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
0df426440f54cd6626d9804af67beb84b20656b3 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add utility methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
8b8627380638d0889d6924d1ec10d42a9c743593 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add utility methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
50737607c9292a0418c333b351fa95548e2bb164 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fix 80-col violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
887058af514f7288cf8d49128459b9126d892206 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fix 80-col violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
4bfd223a74022ce30ac1b86683bac054ab5fac34 24-Nov-2008 Chris Lattner <sabre@nondot.org> Change a whole lot of diagnostics to take QualType's directly
instead of converting them to strings first. This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d162584991885ab004a02573a73ce06422b921fc 24-Nov-2008 Chris Lattner <sabre@nondot.org> Change a whole lot of diagnostics to take QualType's directly
instead of converting them to strings first. This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
271d4c2c75e2b6774cc017506d3b27e4fa1697ff 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName(). This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
d9d22dd9c94618490dbffb0e2caf222530ca39d3 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName(). This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
9c2ea3785c93cc1289735cc4ce855df7e832afa7 24-Nov-2008 Anders Carlsson <andersca@mac.com> __builtin_constant_p takes an argument that can have any type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
85879ee8b5942f97337bcb35ba4df9d4c634c68c 24-Nov-2008 Anders Carlsson <andersca@mac.com> __builtin_constant_p takes an argument that can have any type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
d120b9ed1f54a3d2b284a6c683c3f6e646a31d26 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
8ec03f58c33c33a917f54bb7f2cd61b6d7ffe0ca 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
3a8f294d0c43fe0a3e1fc1612bc1a42d55172cae 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename Selector::getName() to Selector::getAsString(), and add
a new NamedDecl::getAsString() method.

Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.

This also adds new formatters for objcinstance and objcclass
as described in the dox.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
077bf5e2f48acfa9e7d69429b6e4ba86ea14896d 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename Selector::getName() to Selector::getAsString(), and add
a new NamedDecl::getAsString() method.

Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.

This also adds new formatters for objcinstance and objcclass
as described in the dox.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
83cae2c561c4ee4acb708c43993fc48491139282 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add getSize() support for StringRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
6613d08a19aa6ce9b6330487f3bfac841d4b8a4d 24-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add getSize() support for StringRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/SVals.h
ef2a3c6e0e05443da44d757cc1bc4c55141f685d 24-Nov-2008 Chris Lattner <sabre@nondot.org> convert some more warnings to NOTEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1326a3dcbbf04b126396d3e1a739ee437ca4398c 24-Nov-2008 Chris Lattner <sabre@nondot.org> convert some more warnings to NOTEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b13cb56ab8fa85edf10e159f26eb991470ade1b0 24-Nov-2008 Chris Lattner <sabre@nondot.org> remove warn_previous_declaration



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8b265bd5eba1394273693e6705a43adac6b6aa2f 24-Nov-2008 Chris Lattner <sabre@nondot.org> remove warn_previous_declaration



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
921342ce3e0349a1cbcf6c319a5f6b67b98e4c74 24-Nov-2008 Chris Lattner <sabre@nondot.org> make the 'to match this' diagnostic a note.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
28eb7e992b9a266abb300da25b6d3c1557cec361 24-Nov-2008 Chris Lattner <sabre@nondot.org> make the 'to match this' diagnostic a note.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1336cab43dec39c2d36531c0e3875f4db725a28c 24-Nov-2008 Chris Lattner <sabre@nondot.org> Make all the 'redefinition' diagnostics more consistent, and make the
"previously defined here" diagnostics all notes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5f4a6829dc58cab2f76e2b98492859aa3b91e3f2 24-Nov-2008 Chris Lattner <sabre@nondot.org> Make all the 'redefinition' diagnostics more consistent, and make the
"previously defined here" diagnostics all notes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5b25065a9cc36cc677c60db3c5136a96b0557125 23-Nov-2008 Chris Lattner <sabre@nondot.org> make some objc redefinition warnings more consistent: call definitions
"definitions", not declarations. Point out the location of the
original definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b8b96aff63e24ff1509f112de871f697aaea55f9 23-Nov-2008 Chris Lattner <sabre@nondot.org> make some objc redefinition warnings more consistent: call definitions
"definitions", not declarations. Point out the location of the
original definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
de1bd98d3669375a3fe42f21883ffeaec8c80f8a 23-Nov-2008 Chris Lattner <sabre@nondot.org> Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic.
Also, point out where the previous decl was. This unxfails two tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6ff0fc341f6d66b523d63b5d3fdfe00f6d4254fd 23-Nov-2008 Chris Lattner <sabre@nondot.org> Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic.
Also, point out where the previous decl was. This unxfails two tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b175342d2ca2d747f964604249138e04f32116b9 23-Nov-2008 Chris Lattner <sabre@nondot.org> Convert IdentifierInfo's to be printed the same as DeclarationNames
with implicit quotes around them. This has a bunch of follow-on
effects and requires tweaking to a whole lot of code. This causes
a regression in two tests (xfailed) by causing it to emit things like:

Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')

instead of:

Line 10: duplicate interface declaration for category 'MyClass1(Category1)'

I will fix this in a follow-up commit.

As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency. This is good, but I was planning to do this
as an independent patch. There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
08631c5fa053867146b5ee8be658c229f6bf127c 23-Nov-2008 Chris Lattner <sabre@nondot.org> Convert IdentifierInfo's to be printed the same as DeclarationNames
with implicit quotes around them. This has a bunch of follow-on
effects and requires tweaking to a whole lot of code. This causes
a regression in two tests (xfailed) by causing it to emit things like:

Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')

instead of:

Line 10: duplicate interface declaration for category 'MyClass1(Category1)'

I will fix this in a follow-up commit.

As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency. This is good, but I was planning to do this
as an independent patch. There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
254de7dd490d1163d6dad4302f5d8b7f9ae3dc30 23-Nov-2008 Chris Lattner <sabre@nondot.org> add support for inserting a DeclarationName into a diagnostic directly
without calling getAsString(). This implicitly puts quotes around the
name, so diagnostics need to be tweaked to accommodate this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/Type.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
011bb4edf731d529da1cbf71c7c2696aaf5a054f 23-Nov-2008 Chris Lattner <sabre@nondot.org> add support for inserting a DeclarationName into a diagnostic directly
without calling getAsString(). This implicitly puts quotes around the
name, so diagnostics need to be tweaked to accommodate this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/AST/Type.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
f5b269a115352029a14d81c44647f042bbf6843c 23-Nov-2008 Chris Lattner <sabre@nondot.org> Genericize the qualtype formating callback to support any diag argument.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
3fdf4b071dc79fae778fb5f376485480756c76a3 23-Nov-2008 Chris Lattner <sabre@nondot.org> Genericize the qualtype formating callback to support any diag argument.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
da5c087ebf3d47b40bae2e99671ce1929156a427 23-Nov-2008 Chris Lattner <sabre@nondot.org> Add support for sending QualType's directly into diags and convert two
diags over to use this. QualTypes implicitly print single quotes around
them for uniformity and future extension.

Doing this requires a little function pointer dance to prevent libbasic
from depending on libast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
22caddc91d2f6186739c6b20ec58ed38cd68e595 23-Nov-2008 Chris Lattner <sabre@nondot.org> Add support for sending QualType's directly into diags and convert two
diags over to use this. QualTypes implicitly print single quotes around
them for uniformity and future extension.

Doing this requires a little function pointer dance to prevent libbasic
from depending on libast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
5c70c775f94773dbe500ddaaa1bb0344c44902c1 23-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add out-of-bound memory access warning report code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1c0c23325312df5d40fe788ffcb48484f190e9a3 23-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add out-of-bound memory access warning report code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b96c206f56a403cbc8ef650b887a3fae9dc2156b 22-Nov-2008 Anders Carlsson <andersca@mac.com> Case values must be evaluated

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6dde0d5dc09f45f4d9508c964703e36fef1a0198 22-Nov-2008 Anders Carlsson <andersca@mac.com> Case values must be evaluated

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b12ee19caf6e94cc2e8fc03697884e03771f758b 22-Nov-2008 Chris Lattner <sabre@nondot.org> consistently use single quotes for quoted things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
717596279bfb6d45b0fc1cad36a9aa1ba6ecbd9f 22-Nov-2008 Chris Lattner <sabre@nondot.org> consistently use single quotes for quoted things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e8bd9f2ddf3eee09c36f1d5d8a61fbf5993612f2 22-Nov-2008 Anders Carlsson <andersca@mac.com> Use Expr::Evaluate for case statements. Fixes PR2525

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
51fe996231b1d7199f76e4005ff4c943d5deeecd 22-Nov-2008 Anders Carlsson <andersca@mac.com> Use Expr::Evaluate for case statements. Fixes PR2525

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fe3d0c80edd584573672a9756762dd651323a056 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove a dead enum


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
32b939b51b3cc5e4c4d61e31a59aa902de2525b8 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove a dead enum


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59879 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
c05da428caaf67c3b23acf7000fb7e8238d604e9 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Support for implicit property assignment. Error assigning to
'implicit' property with no 'setter'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/Basic/DiagnosticKinds.def
ba8d2d684e74a20bef03828c21c991d222c7e9e5 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Support for implicit property assignment. Error assigning to
'implicit' property with no 'setter'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/Basic/DiagnosticKinds.def
f18d4c8326553440fb01bfeb368b2bc60996cfc2 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> New AST node to access "implicit" setter/getter using property dor syntax.
Issuing diagnostics when assigning to read-only properties.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
5daf570d0ce027e18ed5f9d66e6b2a14a40b720d 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> New AST node to access "implicit" setter/getter using property dor syntax.
Issuing diagnostics when assigning to read-only properties.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
fd9f2acf08cdc747bccfe6642c8a2d52d1c1cf89 22-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement a %plural modifier for complex plural forms in diagnostics. Use it in the overload diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e4c452c4c7b9124fe94a96f559ff077d59cdf996 22-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement a %plural modifier for complex plural forms in diagnostics. Use it in the overload diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59871 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d52b8cf0713821d134f389bfa735bd94359ca306 22-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Initial support for checking out of bound memory access. Only support
ConcreteInt index for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
e8a964bdb46349e4fa3433c8e5104d2a0f7f5c65 22-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Initial support for checking out of bound memory access. Only support
ConcreteInt index for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/SVals.h
5a63b0955592a47e1e9a33c18691fc930418f401 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove some more old Diag methods, replace with a single static helper function


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
254be6ac14092e0bdd9e632dfea09f237850e63d 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove some more old Diag methods, replace with a single static helper function


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
dfc8f73fe7008ab50f49037070eab41261868929 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove the NumericLiteralParser::Diag helper method, inlining it into
its call sites. This makes it more explicit when the hasError flag is
getting set and removes a confusing difference in behavior between
PP.Diag and Diag in this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
ac92d829111bc19d1cc97cd85c3c04bc39b969d1 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove the NumericLiteralParser::Diag helper method, inlining it into
its call sites. This makes it more explicit when the hasError flag is
getting set and removes a confusing difference in behavior between
PP.Diag and Diag in this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
4291fe4727dad0dd6c89790f292dedda7ef9de3e 22-Nov-2008 Chris Lattner <sabre@nondot.org> Move the Preprocessor::Diag methods inline. This has the interesting
(and carefully calculated) effect of allowing the compiler to reason
about the aliasing properties of DiagnosticBuilder object better,
allowing the whole thing to be promoted to registers instead of
resulting in a ton of stack traffic.

While I'm not very concerned about the performance of the Diag() method
invocations, I *am* more concerned about their code size and impact on the
non-diagnostic code. This patch shrinks the clang executable (in
release-asserts mode with gcc-4.2) from 14523980 to 14519816 bytes. This
isn't much, but it shrinks the lexer from 38192 to 37776, PPDirectives.o
from 31116 to 28868 bytes, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
adc4eeb08042a35ae914fc557ffec0cef3df2374 22-Nov-2008 Chris Lattner <sabre@nondot.org> Move the Preprocessor::Diag methods inline. This has the interesting
(and carefully calculated) effect of allowing the compiler to reason
about the aliasing properties of DiagnosticBuilder object better,
allowing the whole thing to be promoted to registers instead of
resulting in a ton of stack traffic.

While I'm not very concerned about the performance of the Diag() method
invocations, I *am* more concerned about their code size and impact on the
non-diagnostic code. This patch shrinks the clang executable (in
release-asserts mode with gcc-4.2) from 14523980 to 14519816 bytes. This
isn't much, but it shrinks the lexer from 38192 to 37776, PPDirectives.o
from 31116 to 28868 bytes, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
b61c3ea88bac7358eea796e0cdfa155ade5deee5 22-Nov-2008 Chris Lattner <sabre@nondot.org> inline a method into its only two call sites.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
9efe9709287801562a3cbe1e5f3ab5dd8175c25b 22-Nov-2008 Chris Lattner <sabre@nondot.org> inline a method into its only two call sites.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
8ef6cdc65f19f517b6cc06f032e7798df2abe9a6 22-Nov-2008 Chris Lattner <sabre@nondot.org> actually, this version isn't really needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
30c6476e8ef00caeb3a10ea0228165013a4eb3f3 22-Nov-2008 Chris Lattner <sabre@nondot.org> actually, this version isn't really needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
82b474f01b0b2e2d74c62c70979031665de5915e 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove a sneaky version of Diag hiding in PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PreprocessorLexer.h
306fda76b0818eb7c215094123f2e16729a44aed 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove a sneaky version of Diag hiding in PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PreprocessorLexer.h
f9c62778bae8ff2b8cf8d4d59c4acf3fc7cede09 22-Nov-2008 Chris Lattner <sabre@nondot.org> Change the Lexer::Diag method to not magically silence warnings,
force the caller to check instead. This eliminates the need (and the
risk!) of weird null DiagnosticBuilder's floating around.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Lex/PreprocessorLexer.h
74d15dfd183b2082e8a5d4dfbf66bd861b220901 22-Nov-2008 Chris Lattner <sabre@nondot.org> Change the Lexer::Diag method to not magically silence warnings,
force the caller to check instead. This eliminates the need (and the
risk!) of weird null DiagnosticBuilder's floating around.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Lex/PreprocessorLexer.h
0592e254bf4051e7712d5f89f36ec76737fb1488 22-Nov-2008 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
9634379265855f1628190e926d9aaf1fb4a5d90e 22-Nov-2008 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
9943e982658785c2c0ecc3af88a1c0111e9b7749 22-Nov-2008 Chris Lattner <sabre@nondot.org> Split the DiagnosticInfo class into two disjoint classes:
one for building up the diagnostic that is in flight (DiagnosticBuilder)
and one for pulling structured information out of the diagnostic when
formatting and presenting it.

There is no functionality change with this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/Parser.h
3cbfe2c4159e0a219ae660d50625c013aa4afbd0 22-Nov-2008 Chris Lattner <sabre@nondot.org> Split the DiagnosticInfo class into two disjoint classes:
one for building up the diagnostic that is in flight (DiagnosticBuilder)
and one for pulling structured information out of the diagnostic when
formatting and presenting it.

There is no functionality change with this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/Parser.h
1ce8c6faf14eac0182cbee82bdec3b14b44d2531 22-Nov-2008 Ted Kremenek <kremenek@apple.com> Fix predicate: we're not in caching mode if CurPPLexer == 0, not CurLexer == 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
3296ccea50e7b6649638bd666181e0825145e898 22-Nov-2008 Ted Kremenek <kremenek@apple.com> Fix predicate: we're not in caching mode if CurPPLexer == 0, not CurLexer == 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
19fec9de1274b385dcf711040020945aff5cdb6d 21-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implementation of new and delete parsing and sema.
This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
4c5d320a7581f4b80b151630c91cea5727fa9923 21-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implementation of new and delete parsing and sema.
This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
5dcc9e6cc142421d8a01142449600da02d0679ff 21-Nov-2008 Chris Lattner <sabre@nondot.org> rearrange some fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
730e0fdbbf9b315ef834074054ac55af3a4fcc0c 21-Nov-2008 Chris Lattner <sabre@nondot.org> rearrange some fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
66beaba392e8de4483d178286beb50a721267b85 21-Nov-2008 Chris Lattner <sabre@nondot.org> merge some simple call diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2c21a073525cdfa68e4439b7af551385dc2796ab 21-Nov-2008 Chris Lattner <sabre@nondot.org> merge some simple call diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
036094b45f36bb70daa22c558defaf3378b24da0 21-Nov-2008 Chris Lattner <sabre@nondot.org> print a type in a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b1b4d337fafe30823b581cbfaa1641f37541fffe 21-Nov-2008 Chris Lattner <sabre@nondot.org> print a type in a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bb002338ac6d32dde969463290842f557071f38f 21-Nov-2008 Chris Lattner <sabre@nondot.org> merge 3 more diagnostics into 1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
416e46febcb7084e715fbe0b9bf2cab7a85f5242 21-Nov-2008 Chris Lattner <sabre@nondot.org> merge 3 more diagnostics into 1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a7021ee6987ae13adedcae2b37f6d820cd8ac07e 21-Nov-2008 Chris Lattner <sabre@nondot.org> Add the concept of "modifiers" to the clang diagnostic format
strings. This allows us to have considerable flexibility in how
these things are displayed and provides extra information that
allows us to merge away diagnostics that are very similar.

Diagnostic modifiers are a string of characters with the regex
[-a-z]+ that occur between the % and digit. They may
optionally have an argument that can parameterize them.

For now, I've added two example modifiers. One is a very useful
tool that allows you to factor commonality across diagnostics
that need single words or phrases combined. Basically you can
use %select{a|b|c}4 with with an integer argument that selects
either a/b/c based on an integer value in the range [0..3).

The second modifier is also an integer modifier, aimed to help
English diagnostics handle plurality. "%s3" prints to 's' if
integer argument #3 is not 1, otherwise it prints to nothing.
I'm fully aware that 's' is an English concept and doesn't
apply to all situations (mouse vs mice). However, this is very
useful and we can add other crazy modifiers once we add support
for polish! ;-)

I converted a couple C++ diagnostics over to use this as an
example, I'd appreciate it if others could merge the other
likely candiates. If you have other modifiers that you want,
lets talk on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
af7ae4e8160fc5c23e471f2125b3fe5911e3532a 21-Nov-2008 Chris Lattner <sabre@nondot.org> Add the concept of "modifiers" to the clang diagnostic format
strings. This allows us to have considerable flexibility in how
these things are displayed and provides extra information that
allows us to merge away diagnostics that are very similar.

Diagnostic modifiers are a string of characters with the regex
[-a-z]+ that occur between the % and digit. They may
optionally have an argument that can parameterize them.

For now, I've added two example modifiers. One is a very useful
tool that allows you to factor commonality across diagnostics
that need single words or phrases combined. Basically you can
use %select{a|b|c}4 with with an integer argument that selects
either a/b/c based on an integer value in the range [0..3).

The second modifier is also an integer modifier, aimed to help
English diagnostics handle plurality. "%s3" prints to 's' if
integer argument #3 is not 1, otherwise it prints to nothing.
I'm fully aware that 's' is an English concept and doesn't
apply to all situations (mouse vs mice). However, this is very
useful and we can add other crazy modifiers once we add support
for polish! ;-)

I converted a couple C++ diagnostics over to use this as an
example, I'd appreciate it if others could merge the other
likely candiates. If you have other modifiers that you want,
lets talk on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
de55ecb28c4d3cafa8c35babb73b37bd64ffe3a9 21-Nov-2008 Chris Lattner <sabre@nondot.org> move the diagnostic location and ID out of DiagnosticInfo and store it in
the Diagnostic class. Since we can already only have one diagnostic in
flight at a time, this shrinks DiagnosticInfo.

This reduces DiagnosticInfo to being basically a rather crazy smart pointer
to a DiagnosticInfo :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b7fc3b87d065041a10eaa0603d738df21ff7af3a 21-Nov-2008 Chris Lattner <sabre@nondot.org> move the diagnostic location and ID out of DiagnosticInfo and store it in
the Diagnostic class. Since we can already only have one diagnostic in
flight at a time, this shrinks DiagnosticInfo.

This reduces DiagnosticInfo to being basically a rather crazy smart pointer
to a DiagnosticInfo :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b2e61782d20fd351c8e3d3d7ee50b903cb387bb0 21-Nov-2008 Chris Lattner <sabre@nondot.org> move diagnostic insertion methods to be free methods instead of
in the DiagnosticInfo class. This requires marking them as taking
a const DiagnosticInfo, which is bogus (they logically mutate DI),
but works with the C++ type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
2cb836eb16afea6a7e07109bdec37e85c44d7bd7 21-Nov-2008 Chris Lattner <sabre@nondot.org> move diagnostic insertion methods to be free methods instead of
in the DiagnosticInfo class. This requires marking them as taking
a const DiagnosticInfo, which is bogus (they logically mutate DI),
but works with the C++ type system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
c32554536872965eb528a999f672b040d4ffc440 21-Nov-2008 Ted Kremenek <kremenek@apple.com> Add comment to IsFileLexer, clean up indentation, and tighten how it's written.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
34eaa24e6c2dc72bbbd5ad09694368cfd09c5f14 21-Nov-2008 Ted Kremenek <kremenek@apple.com> Add comment to IsFileLexer, clean up indentation, and tighten how it's written.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
4491ce53a77deaf2c083606b765052dbdbe29ab5 21-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer:
- Move out logic for handling the end-of-file to LexEndOfFile (to match the Lexer) class. The logic now mirrors the Lexer class more, which allows us to pass most of the Preprocessor test cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
cd4e2aecde5bb7810715d5d5a88ac63ce7946f34 21-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer:
- Move out logic for handling the end-of-file to LexEndOfFile (to match the Lexer) class. The logic now mirrors the Lexer class more, which allows us to pass most of the Preprocessor test cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
28d40dca851a75792133b354f96d5180b4a4306d 21-Nov-2008 Ted Kremenek <kremenek@apple.com> - Clean up transfer function logic for 'return' statements.
- Add check for returning an undefined value to a caller.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
5917d7894e8274b9625275dd4dd86c5d0040a242 21-Nov-2008 Ted Kremenek <kremenek@apple.com> - Clean up transfer function logic for 'return' statements.
- Add check for returning an undefined value to a caller.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
444b6bf96ff1f7c7253e494f64d961febbb27ac6 20-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer:
- Move PTHLexer::GetToken() to be inside PTHLexer.cpp.
- When lexing in raw mode, null out identifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
89d7ee9619d2dbdfa8d956a695c612a104a92cad 20-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer:
- Move PTHLexer::GetToken() to be inside PTHLexer.cpp.
- When lexing in raw mode, null out identifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
c37a3a2b88d5057db716ff19fe5acfc40042dc47 20-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer:
- Rename 'CurToken' and 'LastToken' to 'CurTokenIdx' and 'LastTokenIdx'
respectively.
- Add helper methods GetToken(), AdvanceToken(), AtLastToken() to abstract away
details of the token stream. This also allows us to easily replace their
implementation later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
31aba425a01c8c957e662ccfaa71f923d0f0932a 20-Nov-2008 Ted Kremenek <kremenek@apple.com> PTHLexer:
- Rename 'CurToken' and 'LastToken' to 'CurTokenIdx' and 'LastTokenIdx'
respectively.
- Add helper methods GetToken(), AdvanceToken(), AtLastToken() to abstract away
details of the token stream. This also allows us to easily replace their
implementation later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59733 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
7f3fec565aab6cad369f418dbcbe601d545c5ac0 20-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for overloaded operator-> when used in a member access
expression (smart_ptr->mem).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8ba10745f525467e91bbaec21044bf4d9017a988 20-Nov-2008 Douglas Gregor <dgregor@apple.com> Add support for overloaded operator-> when used in a member access
expression (smart_ptr->mem).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e3414de0e7171a7f899bc5632f7cd2e2a3cc1579 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename IsNonPragmaNonMacroLexer to IsFileLexer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
81d24e135c60dcbe421864e6a4334ba99b8fe7ec 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename IsNonPragmaNonMacroLexer to IsFileLexer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
eeb6396f9392bc91d857e7393d46c846d2ca1b46 20-Nov-2008 Daniel Dunbar <daniel@zuster.org> De-unionize fields in Token class.
- This is fairly gross but although the code is conceptually the
same, introducting the union causes gcc 4.2 on x86 (darwin, if that
matters) to pessimize LexTokenInternal which is critical to our
preprocessor performance.

This speeds up -Eonly lexing of Cocoa.h by ~4.7% in my timings and
reduces the code size of LexTokenInternal by 8.6%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
b28d6de75e0cb27ce3106ce6052f87ad0ab276d7 20-Nov-2008 Daniel Dunbar <daniel@zuster.org> De-unionize fields in Token class.
- This is fairly gross but although the code is conceptually the
same, introducting the union causes gcc 4.2 on x86 (darwin, if that
matters) to pessimize LexTokenInternal which is critical to our
preprocessor performance.

This speeds up -Eonly lexing of Cocoa.h by ~4.7% in my timings and
reduces the code size of LexTokenInternal by 8.6%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
ced209674798e44242a15301c0261ff36011b638 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Added virtual method 'IndirectLex' to PTHLexer. This will likely get removed in the future when we correctly handle #include processing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
ac2dda65d2d39c0a83d95bdf6237edbf4685bc58 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Added virtual method 'IndirectLex' to PTHLexer. This will likely get removed in the future when we correctly handle #include processing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
cfa2c8d7b552132debd8c4f330a020d402dd25eb 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Preprocessor::isCurrentLexer() now takes a PreprocessorLexer* argument to match against CurPPLexer instead of CurLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
7062d9e9fc3ed89c4e4ea7055efea6585b7bac8d 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Preprocessor::isCurrentLexer() now takes a PreprocessorLexer* argument to match against CurPPLexer instead of CurLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
05fb7c8668938447ffdd36d5e15ea697e88db0ba 20-Nov-2008 Chris Lattner <sabre@nondot.org> Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
from Sebastian to enforce that a literal string is passed in,
and use this to avoid having to call strlen on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
92e62b02226410bcad8584541b8f1ff4d35ebab9 20-Nov-2008 Chris Lattner <sabre@nondot.org> Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
from Sebastian to enforce that a literal string is passed in,
and use this to avoid having to call strlen on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
ff37af764d44e6f7451135cb6f7d3ee52c88b73b 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Preprocessor::getCurrentFileLexer() now returns a PreprocessorLexer* instead of
a Lexer*. This means it will either return the current (normal) file Lexer or a
PTHLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
68e48e4a81767997ef0231e47eca4f665102c95e 20-Nov-2008 Ted Kremenek <kremenek@apple.com> Preprocessor::getCurrentFileLexer() now returns a PreprocessorLexer* instead of
a Lexer*. This means it will either return the current (normal) file Lexer or a
PTHLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
c62e3a81b8ad2b425a5a952122d0d7a735f77904 20-Nov-2008 Ted Kremenek <kremenek@apple.com> - Default initialize ParsingPreprocessorDirective, ParsingFilename, and
LexingRawMode in the ctor of PreprocessorLexer.

- PTHLexer: Use "LastToken" instead of "NumToken"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PreprocessorLexer.h
452e37837a48b2f0ced144784277fd4d28cbede9 20-Nov-2008 Ted Kremenek <kremenek@apple.com> - Default initialize ParsingPreprocessorDirective, ParsingFilename, and
LexingRawMode in the ctor of PreprocessorLexer.

- PTHLexer: Use "LastToken" instead of "NumToken"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
lang/Lex/PreprocessorLexer.h
f0ca65f501c7e7d8c286e04bca0d805c12a5ad1b 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> More objc gc stuff. Read/Write barriers for local static/extern,
diagnostics on use of __weak attribute on fields,
Early support for read/write barriers for objc fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2682d8b3a0415d521d5ca11afb13a8bc5c559a31 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> More objc gc stuff. Read/Write barriers for local static/extern,
diagnostics on use of __weak attribute on fields,
Early support for read/write barriers for objc fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
67fdb5bda3dc14d1da17c2e071a0dba9fec577cb 19-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Implement the rest of C++ [over.call.object], which permits the object
being called to be converted to a reference-to-function,
pointer-to-function, or reference-to-pointer-to-function. This is done
through "surrogate" candidate functions that model the conversions
from the object to the function (reference/pointer) and the
conversions in the arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
106c6eb3f1380bfe243a62d8f0f8bce6a7c8d5c6 19-Nov-2008 Douglas Gregor <dgregor@apple.com> Implement the rest of C++ [over.call.object], which permits the object
being called to be converted to a reference-to-function,
pointer-to-function, or reference-to-pointer-to-function. This is done
through "surrogate" candidate functions that model the conversions
from the object to the function (reference/pointer) and the
conversions in the arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1896dafb461363c6fb6638753226e6c03286bdad 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
9f1384f7db76e24068f6c9d7d881714addb6c029 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
d479fa00cacdc39dfc1b00ebcdef6fd5575689e4 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Add stub for PTHLexer::isNextPPTokenLParen().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
2f1c0243f7fc5d12446efcb006c071854c345923 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Add stub for PTHLexer::isNextPPTokenLParen().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
d111a25848e5ea85c2ef54c653002dbbc80c0df0 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Add version of 'getFileCharacteristic()' for FileIDs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
e55f4ee4fd435e29015e2eea952744ee2a621030 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Add version of 'getFileCharacteristic()' for FileIDs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
b53b1f496609dfdaedbe8e2bdd8c8e91740f1877 19-Nov-2008 Ted Kremenek <kremenek@apple.com> When using a PTHLexer, use DiscardToEndOfLine() instead of ReadToEndOfLine().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
17ff58a63197b398ae52697b088dc0fb8b255519 19-Nov-2008 Ted Kremenek <kremenek@apple.com> When using a PTHLexer, use DiscardToEndOfLine() instead of ReadToEndOfLine().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59668 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
56758d28f4e010d4ecbf1e7bc88fec5a6488218e 19-Nov-2008 Ted Kremenek <kremenek@apple.com> - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.
- Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry
(simplifies some uses).
- Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.
- Add 'FileID' to PreprocessorLexer, and have Preprocessor query this fileid
when looking up the FileEntry for a file

Performance testing of -Eonly on Cocoa.h shows no performance regression because
of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
41938c8493b4380df738263166b746eacb33c309 19-Nov-2008 Ted Kremenek <kremenek@apple.com> - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.
- Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry
(simplifies some uses).
- Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.
- Add 'FileID' to PreprocessorLexer, and have Preprocessor query this fileid
when looking up the FileEntry for a file

Performance testing of -Eonly on Cocoa.h shows no performance regression because
of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/PreprocessorLexer.h
10f3c50c0ae70ca5bb648f555d277fbfb8eab284 19-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Support for calling overloaded function call operators (operator())
with function call syntax, e.g.,

Functor f;
f(x, y);

This is the easy part of handling calls to objects of class type
(C++ [over.call.object]). The hard part (coping with conversions from
f to function pointer or reference types) will come later. Nobody uses
that stuff anyway, right? :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f9eb905197e44ed5634205512074993f6f40470d 19-Nov-2008 Douglas Gregor <dgregor@apple.com> Support for calling overloaded function call operators (operator())
with function call syntax, e.g.,

Functor f;
f(x, y);

This is the easy part of handling calls to objects of class type
(C++ [over.call.object]). The hard part (coping with conversions from
f to function pointer or reference types) will come later. Nobody uses
that stuff anyway, right? :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2409477a45b4279d5d0600b057392b5b458e5d1f 19-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Some tweaks suggested by Argiris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
487a75ab300552e42afa45b8199133f838a40e5f 19-Nov-2008 Douglas Gregor <dgregor@apple.com> Some tweaks suggested by Argiris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9cd599b261c4d48135c43a0a73cd2c188051d669 19-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Take care another assert:

struct A {
struct B;
};

struct A::B {
void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."
};

Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g:

namespace A {
struct S;
}
struct A::S {}; // getParent() == namespace 'A'
// getLexicalParent() == translation unit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
77407b802130b1c44b1f63b855722a5376f57bca 19-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Take care another assert:

struct A {
struct B;
};

struct A::B {
void m() {} // Assertion failed: getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one."
};

Introduce DeclContext::getLexicalParent which may be different from DeclContext::getParent when nested-names are involved, e.g:

namespace A {
struct S;
}
struct A::S {}; // getParent() == namespace 'A'
// getLexicalParent() == translation unit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
5703f445bef3af2fed61b60a291530670d2b64c0 19-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Make the non-const DeclContext::getParent call the const version, instead of the other way around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
20bc6762282d192bd19be03094d4f311710e020c 19-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make the non-const DeclContext::getParent call the const version, instead of the other way around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
80723c56092e182aea4c28cdcdc92b1b8e0c41d3 19-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Support overloading of the subscript operator[], including support for
built-in operator candidates. Test overloading of '&' and ','.

In C++, a comma expression is an lvalue if its right-hand
subexpression is an lvalue. Update Expr::isLvalue accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
337c6b9f5d502dc1c5acea628bf7bf9e828efc0e 19-Nov-2008 Douglas Gregor <dgregor@apple.com> Support overloading of the subscript operator[], including support for
built-in operator candidates. Test overloading of '&' and ','.

In C++, a comma expression is an lvalue if its right-hand
subexpression is an lvalue. Update Expr::isLvalue accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c64a53d59278fb34f24cd330f77554c9f1c9a494 19-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6150376> [sema] crash on invalid message send.

The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022 19-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6150376> [sema] crash on invalid message send.

The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
4f6904d8d02ccd71e23d18e5cd36c1f1c52d9ef7 19-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Added operator overloading for unary operators, post-increment, and
post-decrement, including support for generating all of the built-in
operator candidates for these operators.

C++ and C have different rules for the arguments to the builtin unary
'+' and '-'. Implemented both variants in Sema::ActOnUnaryOp.

In C++, pre-increment and pre-decrement return lvalues. Update
Expr::isLvalue accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
74253736184c0717a0649922551bf9d8b6815651 19-Nov-2008 Douglas Gregor <dgregor@apple.com> Added operator overloading for unary operators, post-increment, and
post-decrement, including support for generating all of the built-in
operator candidates for these operators.

C++ and C have different rules for the arguments to the builtin unary
'+' and '-'. Implemented both variants in Sema::ActOnUnaryOp.

In C++, pre-increment and pre-decrement return lvalues. Update
Expr::isLvalue accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
4c642e1ffe00d94786f463339a6ac3253aeee1b0 19-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Fix this:

With this snippet:
void f(a::b);

An assert is hit:
Assertion failed: CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token", file ..\..\lib\Lex\PPCaching.cpp, line 98

Introduce Preprocessor::RevertCachedTokens that reverts a specific number of tokens when backtracking is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
08b2c3743a29a2dddcf72e95f747760e213cdde7 19-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix this:

With this snippet:
void f(a::b);

An assert is hit:
Assertion failed: CachedTokens[CachedLexPos-1].getLocation() == Tok.getAnnotationEndLoc() && "The annotation should be until the most recent cached token", file ..\..\lib\Lex\PPCaching.cpp, line 98

Introduce Preprocessor::RevertCachedTokens that reverts a specific number of tokens when backtracking is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
dd3848520dd871192174322b471a78c598656e51 19-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Remove Preprocessor::CacheTokens boolean data member. The same functionality can be provided by using Preprocessor::isBacktrackEnabled().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
fad03b2b38a3baea4b67e79e676fee15078e3258 19-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove Preprocessor::CacheTokens boolean data member. The same functionality can be provided by using Preprocessor::isBacktrackEnabled().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
aede15ad8e5c247231006c052450af42320d89b5 19-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add SymbolData for array elements and struct fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
eabf776661662a8e652eb692084d20fddffd5cca 19-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add SymbolData for array elements and struct fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/SymbolManager.h
a9f6722a81ae992ca2d6641bf824362ae31741ea 19-Nov-2008 Chris Lattner <sabre@nondot.org> add a new helper method. It is unclear to me why this doesn't work, but GCC
won't match it:

template<std::size_t StrLen>
bool isName(const char Str[StrLen]) const {
return getLength() == StrLen-1 && !memcmp(getName(), Str, StrLen-1);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
845222ccd992282bf74b2fca53e7c3b84a81c098 19-Nov-2008 Chris Lattner <sabre@nondot.org> add a new helper method. It is unclear to me why this doesn't work, but GCC
won't match it:

template<std::size_t StrLen>
bool isName(const char Str[StrLen]) const {
return getLength() == StrLen-1 && !memcmp(getName(), Str, StrLen-1);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
e46b8797fa40245512e73af79c497328e9d606b5 19-Nov-2008 Chris Lattner <sabre@nondot.org> Allow sending IdentifierInfo*'s into Diagnostics without turning them into strings
first. This should allow removal of a bunch of II->getName() calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
43b628cd47ecdc3caf640d79b3ad7ecef0f2c285 19-Nov-2008 Chris Lattner <sabre@nondot.org> Allow sending IdentifierInfo*'s into Diagnostics without turning them into strings
first. This should allow removal of a bunch of II->getName() calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
68f621cb6c43392e164c6fdbda71bc8f3b94962b 19-Nov-2008 Chris Lattner <sabre@nondot.org> add direct support for signed and unsigned integer arguments to diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
30bc96544346bea42921cf6837e66cef80d664b4 19-Nov-2008 Chris Lattner <sabre@nondot.org> add direct support for signed and unsigned integer arguments to diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
92a3353d3f7c2584cf85826021bcc583aff6ad86 19-Nov-2008 Chris Lattner <sabre@nondot.org> switch TextDiagnosticPrinter to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
a03a5b5a84989b1cbd3917b967e8fe64f99cfa80 19-Nov-2008 Chris Lattner <sabre@nondot.org> switch TextDiagnosticPrinter to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
be8e5a477c5a51ff39a1c0cfec253b67bfb97ca4 19-Nov-2008 Chris Lattner <sabre@nondot.org> rewrite FormatDiagnostic to be less gross and a lot more efficient.
This also makes it illegal to have bare '%'s in diagnostics. If you
want a % in a diagnostic, use %%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
f4c839657742b823cea1a95b18422f1ba74d3ddd 19-Nov-2008 Chris Lattner <sabre@nondot.org> rewrite FormatDiagnostic to be less gross and a lot more efficient.
This also makes it illegal to have bare '%'s in diagnostics. If you
want a % in a diagnostic, use %%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
0cb74051d520bf8c70063e03f59b45fc3226734e 19-Nov-2008 Chris Lattner <sabre@nondot.org> implement a transparent optimization with the diagnostics stuff:
const char*'s are now not converted to std::strings when the diagnostic
is formed, we just hold onto their pointer and format as needed.

This commit makes DiagnosticClient::FormatDiagnostic even more of a
mess, I'll fix it in the next commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
73d2a1b05bb04ab0136af374ddaa5d4602d4c939 19-Nov-2008 Chris Lattner <sabre@nondot.org> implement a transparent optimization with the diagnostics stuff:
const char*'s are now not converted to std::strings when the diagnostic
is formed, we just hold onto their pointer and format as needed.

This commit makes DiagnosticClient::FormatDiagnostic even more of a
mess, I'll fix it in the next commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
1bff1c31313957dbcc0d5eb8af5e8fe1b11ed2f1 19-Nov-2008 Chris Lattner <sabre@nondot.org> Address Sebastian and Doug's objections with taking pointers to temporaries.
Instead of doing that, copy the strings into the diagnostic info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
cfa96326158c32a0e08d3985a050f46bf7c6132d 19-Nov-2008 Chris Lattner <sabre@nondot.org> Address Sebastian and Doug's objections with taking pointers to temporaries.
Instead of doing that, copy the strings into the diagnostic info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
1b0a3615ac219fb7646fded0dc70b6c743554f8d 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Revert 59574 (caused tests to fail).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
2df37b8eaecc5382e0e511a738f88918f48d9454 19-Nov-2008 Ted Kremenek <kremenek@apple.com> Revert 59574 (caused tests to fail).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
77127db5da8f96d5312d815dcb5575025eb7ea5d 19-Nov-2008 Ted Kremenek <kremenek@apple.com> - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.
- Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry
(simplifies some uses).
- Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.

Performance testing of -Eonly on Cocoa.h shows no performance regression because
of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0a3626444039396802fa35db24733c1963aebfac 19-Nov-2008 Ted Kremenek <kremenek@apple.com> - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.
- Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry
(simplifies some uses).
- Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.

Performance testing of -Eonly on Cocoa.h shows no performance regression because
of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
5ed15042cb1ae4fc91e1fefe40589a486ee2314b 19-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Partial expansion of C++ operator overloading (for binary operators)
to support operators defined as member functions, e.g.,

struct X {
bool operator==(X&);
};

Overloading with non-member operators is supported, and the special
rules for the implicit object parameter (e.g., the ability for a
non-const *this to bind to an rvalue) are implemented.

This change also refactors and generalizes the code for adding
overload candidates for overloaded operator calls (C++ [over.match.expr]),
both to match the rules more exactly (name lookup of non-member
operators actually ignores member operators) and to make this routine
more reusable for the other overloaded operators.

Testing for the initialization of the implicit object parameter is
very light. More tests will come when we get support for calling
member functions directly (e.g., o.m(a1, a2)).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
96176b3575823ea996c6140380dd17d9240c9766 19-Nov-2008 Douglas Gregor <dgregor@apple.com> Partial expansion of C++ operator overloading (for binary operators)
to support operators defined as member functions, e.g.,

struct X {
bool operator==(X&);
};

Overloading with non-member operators is supported, and the special
rules for the implicit object parameter (e.g., the ability for a
non-const *this to bind to an rvalue) are implemented.

This change also refactors and generalizes the code for adding
overload candidates for overloaded operator calls (C++ [over.match.expr]),
both to match the rules more exactly (name lookup of non-member
operators actually ignores member operators) and to make this routine
more reusable for the other overloaded operators.

Testing for the initialization of the implicit object parameter is
very light. More tests will come when we get support for calling
member functions directly (e.g., o.m(a1, a2)).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d06ed4604cd50135b8ad4295a241fe37f2e7691c 18-Nov-2008 Chris Lattner <sabre@nondot.org> Allow diagnostics to be used in bool context, like:

return Diag(...);

when the function returns bool. This always evaluates to true.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
95d1ba492c3191f49392e53acbf878e39fc8ba0a 18-Nov-2008 Chris Lattner <sabre@nondot.org> Allow diagnostics to be used in bool context, like:

return Diag(...);

when the function returns bool. This always evaluates to true.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b7284dc94ca9e33084e019d259442d29be24b048 18-Nov-2008 Chris Lattner <sabre@nondot.org> Remove the last of the old-style Preprocessor::Diag methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
204b2fed909b1eabea7aeb6caadd7cff718edee5 18-Nov-2008 Chris Lattner <sabre@nondot.org> Remove the last of the old-style Preprocessor::Diag methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
63bac2556d5ecec0665505edb193a57c1c278666 18-Nov-2008 Chris Lattner <sabre@nondot.org> don't dereference a null pointer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
aabb54e1ee8e2c2ef89e7c5cbbb9a89872e96f67 18-Nov-2008 Chris Lattner <sabre@nondot.org> don't dereference a null pointer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
aee3bf8be3cc87bae59b47213089aca4e9f8ee02 18-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> As threatened previously: consolidate name lookup and the creation of
DeclRefExprs and BlockDeclRefExprs into a single function
Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate
lookup-name-and-check-the-result code.

Note that we still have the three parser entry points for identifiers,
operator-function-ids, and conversion-function-ids, since the parser
doesn't (and shouldn't) know about DeclarationNames. This is a Good
Thing (TM), and there will be more entrypoints coming (e.g., for C++
pseudo-destructor expressions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
10c4262aeb5212375e3fa64e76887bd9bcc79924 18-Nov-2008 Douglas Gregor <dgregor@apple.com> As threatened previously: consolidate name lookup and the creation of
DeclRefExprs and BlockDeclRefExprs into a single function
Sema::ActOnDeclarationNameExpr, eliminating a bunch of duplicate
lookup-name-and-check-the-result code.

Note that we still have the three parser entry points for identifiers,
operator-function-ids, and conversion-function-ids, since the parser
doesn't (and shouldn't) know about DeclarationNames. This is a Good
Thing (TM), and there will be more entrypoints coming (e.g., for C++
pseudo-destructor expressions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
96a32ddc1349db9772d01530425bca2af481f0a2 18-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Extend DeclarationName to support C++ overloaded operators, e.g.,
operator+, directly, using the same mechanism as all other special
names.

Removed the "special" identifiers for the overloaded operators from
the identifier table and IdentifierInfo data structure. IdentifierInfo
is back to representing only real identifiers.

Added a new Action, ActOnOperatorFunctionIdExpr, that builds an
expression from an parsed operator-function-id (e.g., "operator
+"). ActOnIdentifierExpr used to do this job, but
operator-function-ids are no longer represented by IdentifierInfo's.

Extended Declarator to store overloaded operator names.
Sema::GetNameForDeclarator now knows how to turn the operator
name into a DeclarationName for the overloaded operator.

Except for (perhaps) consolidating the functionality of
ActOnIdentifier, ActOnOperatorFunctionIdExpr, and
ActOnConversionFunctionExpr into a common routine that builds an
appropriate DeclRefExpr by looking up a DeclarationName, all of the
work on normalizing declaration names should be complete with this
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
e94ca9e4371c022329270436b3dd77adc4ddfa8f 18-Nov-2008 Douglas Gregor <dgregor@apple.com> Extend DeclarationName to support C++ overloaded operators, e.g.,
operator+, directly, using the same mechanism as all other special
names.

Removed the "special" identifiers for the overloaded operators from
the identifier table and IdentifierInfo data structure. IdentifierInfo
is back to representing only real identifiers.

Added a new Action, ActOnOperatorFunctionIdExpr, that builds an
expression from an parsed operator-function-id (e.g., "operator
+"). ActOnIdentifierExpr used to do this job, but
operator-function-ids are no longer represented by IdentifierInfo's.

Extended Declarator to store overloaded operator names.
Sema::GetNameForDeclarator now knows how to turn the operator
name into a DeclarationName for the overloaded operator.

Except for (perhaps) consolidating the functionality of
ActOnIdentifier, ActOnOperatorFunctionIdExpr, and
ActOnConversionFunctionExpr into a common routine that builds an
appropriate DeclRefExpr by looking up a DeclarationName, all of the
work on normalizing declaration names should be complete with this
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclarationName.h
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
aa1efd8763e1024ddc18d1c12ca63aa2d8a14b60 18-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fix 80-col violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
db0e15ae3e2b5e180541eec35e2bce54359ca7d8 18-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fix 80-col violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
b64ff5b3a9570b2d73931132e5ed8726614ec05c 18-Nov-2008 Chris Lattner <sabre@nondot.org> remove one more Preprocessor::Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
56b05c8829efd13b7e5b333f8f587c71d025c67d 18-Nov-2008 Chris Lattner <sabre@nondot.org> remove one more Preprocessor::Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0370d6b8174700267ae5356dbf92e60024fa410e 18-Nov-2008 Chris Lattner <sabre@nondot.org> Convert the lexer and start converting the PP over to using canonical Diag methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
3692b09faa9fe346f39bc922db6dce48cdcc3f63 18-Nov-2008 Chris Lattner <sabre@nondot.org> Convert the lexer and start converting the PP over to using canonical Diag methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
194e700ce2373027bdbf07a2fc8a3d1dcda210a9 18-Nov-2008 Chris Lattner <sabre@nondot.org> remove the last couple obsolete forms of Parser::Diag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
ef708fd4abccf4d21b1f82ab2ab62f6ae7cc1265 18-Nov-2008 Chris Lattner <sabre@nondot.org> remove the last couple obsolete forms of Parser::Diag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59510 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f006a221c69997a9187d5565220eca7e786a63df 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change a couple of the Parser::Diag methods to return DiagnosticInfo
and let the clients push whatever they want into the DiagnosticInfo
instead of hard coding a few forms. Also switch various clients to
use Diag(Tok, ...) instead of Diag(Tok.getLocation(), ...) as the
canonical form to simplify the code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1ab3b96de160e4fbffec2a776e284a48a3bb543d 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change a couple of the Parser::Diag methods to return DiagnosticInfo
and let the clients push whatever they want into the DiagnosticInfo
instead of hard coding a few forms. Also switch various clients to
use Diag(Tok, ...) instead of Diag(Tok.getLocation(), ...) as the
canonical form to simplify the code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4d7496ba9f3d2995d41cade4f1441b94d63ecfe4 18-Nov-2008 Chris Lattner <sabre@nondot.org> The 'return Diag(...)' idiom should be treated as returning an
invalid expr/stmt, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d3b64655fa81ff1e1d5f944198239e4908035d79 18-Nov-2008 Chris Lattner <sabre@nondot.org> The 'return Diag(...)' idiom should be treated as returning an
invalid expr/stmt, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e271babe1ecfef27157ea5d8085a1eb39fcd08b4 18-Nov-2008 Chris Lattner <sabre@nondot.org> Give DiagnosticInfo a real copy constructor, even though it
is destructive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
520987fc4e5e60c80bcce613b0f8813ffb2fdca0 18-Nov-2008 Chris Lattner <sabre@nondot.org> Give DiagnosticInfo a real copy constructor, even though it
is destructive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
6948ae68efb71fc0ef50fbf240c3cc2ce8b97b2d 18-Nov-2008 Chris Lattner <sabre@nondot.org> This reworks some of the Diagnostic interfaces a bit to change how diagnostics
are formed. In particular, a diagnostic with all its strings and ranges is now
packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a
ton of random stuff. This has the benefit of simplifying the interface, making
it more extensible, and allowing us to do more checking for things like access
past the end of the various arrays passed in.

In addition to introducing DiagnosticInfo, this also substantially changes how
Diagnostic::Report works. Instead of being passed in all of the info required
to issue a diagnostic, Report now takes only the required info (a location and
ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to
stuff strings and ranges into the DiagnosticInfo with the << operator. When
the dtor runs on the DiagnosticInfo object (which should happen at the end of
the statement), the diagnostic is actually emitted with all of the accumulated
information. This is a somewhat tricky dance, but it means that the
accumulated DiagnosticInfo is allowed to keep pointers to other expression
temporaries without those pointers getting invalidated.

This is just the minimal change to get this stuff working, but this will allow
us to eliminate the zillions of variant "Diag" methods scattered throughout
(e.g.) sema. For example, instead of calling:

Diag(BuiltinLoc, diag::err_overload_no_match, typeNames,
SourceRange(BuiltinLoc, RParenLoc));

We will soon be able to just do:

Diag(BuiltinLoc, diag::err_overload_no_match)
<< typeNames << SourceRange(BuiltinLoc, RParenLoc));

This scales better to support arbitrary types being passed in (not just
strings) in a type-safe way. Go operator overloading?!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
0a14eee528a901c16f0e288fbc10a3abc1660d87 18-Nov-2008 Chris Lattner <sabre@nondot.org> This reworks some of the Diagnostic interfaces a bit to change how diagnostics
are formed. In particular, a diagnostic with all its strings and ranges is now
packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a
ton of random stuff. This has the benefit of simplifying the interface, making
it more extensible, and allowing us to do more checking for things like access
past the end of the various arrays passed in.

In addition to introducing DiagnosticInfo, this also substantially changes how
Diagnostic::Report works. Instead of being passed in all of the info required
to issue a diagnostic, Report now takes only the required info (a location and
ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to
stuff strings and ranges into the DiagnosticInfo with the << operator. When
the dtor runs on the DiagnosticInfo object (which should happen at the end of
the statement), the diagnostic is actually emitted with all of the accumulated
information. This is a somewhat tricky dance, but it means that the
accumulated DiagnosticInfo is allowed to keep pointers to other expression
temporaries without those pointers getting invalidated.

This is just the minimal change to get this stuff working, but this will allow
us to eliminate the zillions of variant "Diag" methods scattered throughout
(e.g.) sema. For example, instead of calling:

Diag(BuiltinLoc, diag::err_overload_no_match, typeNames,
SourceRange(BuiltinLoc, RParenLoc));

We will soon be able to just do:

Diag(BuiltinLoc, diag::err_overload_no_match)
<< typeNames << SourceRange(BuiltinLoc, RParenLoc));

This scales better to support arbitrary types being passed in (not just
strings) in a type-safe way. Go operator overloading?!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
e9bf3e3517ebed028186d62c3be3ceb989684c7e 18-Nov-2008 Chris Lattner <sabre@nondot.org> SourceManager::getLineNumber is logically const except for caching.
Use mutable to make it so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
f812a45dd93634c9300ed5533bd26b56374714a1 18-Nov-2008 Chris Lattner <sabre@nondot.org> SourceManager::getLineNumber is logically const except for caching.
Use mutable to make it so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a1433477d5c1ed477ef814658f199ddee6f6c31a 18-Nov-2008 Chris Lattner <sabre@nondot.org> remove a helper method with only one call site.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
5917fe1189ee7cbb6f61b804b1f1ab6ef16a94cb 18-Nov-2008 Chris Lattner <sabre@nondot.org> remove a helper method with only one call site.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b034e281af9d2cb52c2606764de229c1fb825307 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change the diagnostics interface to take an array of pointers to
strings instead of array of strings. This reduces string copying
in some not-very-important cases, but paves the way for future
improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
2383b7f6aea2cb2bf2b5bfc0ec730f9354fecbbf 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change the diagnostics interface to take an array of pointers to
strings instead of array of strings. This reduces string copying
in some not-very-important cases, but paves the way for future
improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Basic/Diagnostic.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
734efae28a374bf0dff8778ed9fb85f24811e768 18-Nov-2008 Chris Lattner <sabre@nondot.org> cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
c5c8d7d57dbfb2ecb7c7db51711e3b198e379d6a 18-Nov-2008 Chris Lattner <sabre@nondot.org> cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
7ff9f43398bd81435762a0cd454da092d74d1268 18-Nov-2008 Ted Kremenek <kremenek@apple.com> Preprocessor::PushIncludeMacroStack() should always zero out CurPPLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
f89963b1e819d5e73796a4f9d7cd70129846e2ec 18-Nov-2008 Ted Kremenek <kremenek@apple.com> Preprocessor::PushIncludeMacroStack() should always zero out CurPPLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
6f531ab29b8de27737067800197dc2e26465efe8 18-Nov-2008 Ted Kremenek <kremenek@apple.com> - Add Lexer::isPragma() accessor for clients of Lexer that aren't friends.
- Add static method to test if the current lexer is a non-macro/non-pragma
lexer.
- Refactor some code in PPLexerChange to use this static method.
- No performance change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
4b391087f9c5582d448ab66ccbc7028f7673f380 18-Nov-2008 Ted Kremenek <kremenek@apple.com> - Add Lexer::isPragma() accessor for clients of Lexer that aren't friends.
- Add static method to test if the current lexer is a non-macro/non-pragma
lexer.
- Refactor some code in PPLexerChange to use this static method.
- No performance change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
da189c64db6654b55dff3c131e1f6b1ef999fccb 18-Nov-2008 Chris Lattner <sabre@nondot.org> implement a fixme by making warnings for ++/-- on non-modifiable-lvalues better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
858bb6f2d6790feeb03b3c2a24f01ef24b54301b 18-Nov-2008 Chris Lattner <sabre@nondot.org> implement a fixme by making warnings for ++/-- on non-modifiable-lvalues better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
292d8ba1d8dacfe56bff65288bfefb8257596ec6 18-Nov-2008 Ted Kremenek <kremenek@apple.com> Add hooks to use PTHLexer::Lex instead of Lexer::Lex when CurLexer is null.
Performance tests on Cocoa.h (using the regular Lexer) shows no performance
difference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
f6452c5421c5db5a7ceff581525f286931d97f1a 18-Nov-2008 Ted Kremenek <kremenek@apple.com> Add hooks to use PTHLexer::Lex instead of Lexer::Lex when CurLexer is null.
Performance tests on Cocoa.h (using the regular Lexer) shows no performance
difference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
306be5ff2a5ba0153c8b9207cedf112547b13016 18-Nov-2008 Ted Kremenek <kremenek@apple.com> - Add 'CurPPLexer' to Preprocessor to keep track of the current
PreprocessorLexer, which will either be a 'Lexer' or 'PTHLexer'.
- Added stub field 'CurPTHLexer' to keep track of the current PTHLexer.
- Modified IncludeStackInfo to track both the current PTHLexer and
current PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
9c1b750c59d510e6c9eccb1f37bccc46ccfe6844 18-Nov-2008 Ted Kremenek <kremenek@apple.com> - Add 'CurPPLexer' to Preprocessor to keep track of the current
PreprocessorLexer, which will either be a 'Lexer' or 'PTHLexer'.
- Added stub field 'CurPTHLexer' to keep track of the current PTHLexer.
- Modified IncludeStackInfo to track both the current PTHLexer and
current PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
6a2b7fd0027d190eb934a68b04991a12f8892a1c 18-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement effects of 'mutable', and a few comments from Chris on its parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
a11f42f4bca694b9be91350d0a74815f119e3fbf 18-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement effects of 'mutable', and a few comments from Chris on its parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
6704b319467ad5bb8fa89aa800a7e47aba46f5cf 17-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Eliminate all of the placeholder identifiers used for constructors,
destructors, and conversion functions. The placeholders were used to
work around the fact that the parser and some of Sema really wanted
declarators to have simple identifiers; now, the code that deals with
declarators will use DeclarationNames.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclarationName.h
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
lang/Parse/DeclSpec.h
10bd36882406cdf4805e35add1ce2f11ab9ae152 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Eliminate all of the placeholder identifiers used for constructors,
destructors, and conversion functions. The placeholders were used to
work around the fact that the parser and some of Sema really wanted
declarators to have simple identifiers; now, the code that deals with
declarators will use DeclarationNames.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/DeclarationName.h
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
lang/Parse/DeclSpec.h
b0212bdede2abd0ca5e893d90464f5b0f3ce9943 17-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Updated IdentifierResolver to deal with DeclarationNames. The names of
C++ constructors, destructors, and conversion functions now have a
FETokenInfo field that IdentifierResolver can access, so that these
special names are handled just like ordinary identifiers. A few other
Sema routines now use DeclarationNames instead of IdentifierInfo*'s.

To validate this design, this code also implements parsing and
semantic analysis for id-expressions that name conversion functions,
e.g.,

return operator bool();

The new parser action ActOnConversionFunctionExpr takes the result of
parsing "operator type-id" and turning it into an expression, using
the IdentifierResolver with the DeclarationName of the conversion
function. ActOnDeclarator pushes those conversion function names into
scope so that the IdentifierResolver can find them, of course.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclarationName.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
2def48394f6d48bde0dec2b514193c2b533265b5 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Updated IdentifierResolver to deal with DeclarationNames. The names of
C++ constructors, destructors, and conversion functions now have a
FETokenInfo field that IdentifierResolver can access, so that these
special names are handled just like ordinary identifiers. A few other
Sema routines now use DeclarationNames instead of IdentifierInfo*'s.

To validate this design, this code also implements parsing and
semantic analysis for id-expressions that name conversion functions,
e.g.,

return operator bool();

The new parser action ActOnConversionFunctionExpr takes the result of
parsing "operator type-id" and turning it into an expression, using
the IdentifierResolver with the DeclarationName of the conversion
function. ActOnDeclarator pushes those conversion function names into
scope so that the IdentifierResolver can find them, of course.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclarationName.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
37fb940de30f294356022f3cb9eced40f0933e70 17-Nov-2008 Chris Lattner <sabre@nondot.org> Implement rdar://6319320: give a good diagnostic for cases where people
are trying to use the old GCC "casts as lvalue" extension. We don't and
will hopefully never support this.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
ca354faa7e9b99af17070c82b9662a5fca76422c 17-Nov-2008 Chris Lattner <sabre@nondot.org> Implement rdar://6319320: give a good diagnostic for cases where people
are trying to use the old GCC "casts as lvalue" extension. We don't and
will hopefully never support this.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
682a8cf9b1b84cc299225acd8e0b38e9a6da08ec 17-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Some cleanups for C++ operator overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
43c7bad105f742988e7ca40564285c83bea854a5 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Some cleanups for C++ operator overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
aa368a2159168ef0b6991c6ee5e205a7edb78129 17-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Simplify error messages for two-parameter overloaded increment/decrement operators

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1adbab67751f44147a0d259b684cf52bae142ef3 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Simplify error messages for two-parameter overloaded increment/decrement operators

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
24afd4accaf5499312f05f1252463c6e0febf16d 17-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclarationName.h
lang/Basic/IdentifierTable.h
lang/Lex/Preprocessor.h
2e1cd4264d363ca869bf37ef160902f211d21b8c 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
lang/AST/DeclarationName.h
lang/Basic/IdentifierTable.h
lang/Lex/Preprocessor.h
9e71359328b4365dd57045c7dff81b789bf02d7c 17-Nov-2008 Chris Lattner <sabre@nondot.org> pad header out to 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OperatorKinds.h
b8abbdc90f902a2c09c566193b900c2c45a46672 17-Nov-2008 Chris Lattner <sabre@nondot.org> pad header out to 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OperatorKinds.h
7bb5062d5b77d256e3ab7d1e5bf1eeb52edce95c 17-Nov-2008 Chris Lattner <sabre@nondot.org> line up some columns, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OperatorKinds.def
ee79ca9d8fafd05a318c6265c8896dfc342cc754 17-Nov-2008 Chris Lattner <sabre@nondot.org> line up some columns, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/OperatorKinds.def
ef0696643975b7f5db9c9b333cffae2c6a469a5c 16-Nov-2008 Chris Lattner <sabre@nondot.org> rename Expr::tryEvaluate to Expr::Evaluate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6ee7aa154e8bbb21a21254293410b944f78b0bfe 16-Nov-2008 Chris Lattner <sabre@nondot.org> rename Expr::tryEvaluate to Expr::Evaluate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
92bf5bd8de39fde937a719dbe31493fdfa8754d3 16-Nov-2008 Chris Lattner <sabre@nondot.org> Fix PR3075, __builtin_stdarg_start being misprototyped. This affects netbsd headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
58ace88985b920971b052de8a9a7b89de0654dc0 16-Nov-2008 Chris Lattner <sabre@nondot.org> Fix PR3075, __builtin_stdarg_start being misprototyped. This affects netbsd headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
5e0cc7057c9b5fb40a6b1a150045f4b4b5ed875f 16-Nov-2008 Chris Lattner <sabre@nondot.org> add dump and print methods, add operator<< for APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
64c34f1c6f613eef02a7b488f8edadbe7a8650a8 16-Nov-2008 Chris Lattner <sabre@nondot.org> add dump and print methods, add operator<< for APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
d8fc4fcb055be3f7017283ba40616133a2fb3afd 16-Nov-2008 Chris Lattner <sabre@nondot.org> move some APValue methods out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
a9ab5d6bcf42dfd4f058ee3b1fbb32456c0bdfe8 16-Nov-2008 Chris Lattner <sabre@nondot.org> move some APValue methods out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
0a322a5f57e8c3c5472894c3e66db2c0582cfab6 16-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Enhance modularization: return a <state,loc> pair to let GRExprEngine modify the
environment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
cb529b542a6c473251d15fdd637b3230906ea1dc 16-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Enhance modularization: return a <state,loc> pair to let GRExprEngine modify the
environment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
8fbe7aedb79673853bc4341a3f7e270036080a86 16-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Enhances SCA to process untyped region to typed region conversion.
- RegionView and RegionViewMap is introduced to assist back-mapping from
super region to subregions.
- GDM is used to carry RegionView information.
- AnonTypedRegion is added to represent a typed region introduced by pointer
casting. Later AnonTypedRegion can be used in other similar cases, e.g.,
malloc()'ed region.
- The specific conversion is delegated to store manager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
dc0a25d9bff956cdbe54ea0bfc8fbbe3ceb4eb92 16-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Enhances SCA to process untyped region to typed region conversion.
- RegionView and RegionViewMap is introduced to assist back-mapping from
super region to subregions.
- GDM is used to carry RegionView information.
- AnonTypedRegion is added to represent a typed region introduced by pointer
casting. Later AnonTypedRegion can be used in other similar cases, e.g.,
malloc()'ed region.
- The specific conversion is delegated to store manager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59382 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/Store.h
600458fb879d59ae6dd169a67d349a75609cb739 15-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add isUnsigned option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
8bb87e8de5fc8e4c91e78468b65a66b5b2b82d71 15-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add isUnsigned option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59355 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
61b89ebb86774739940ebd5ceab77f5551ba29f7 15-Nov-2008 Ted Kremenek <kremenek@apple.com> Implement FIXME in GRExprEngine::VisitUnaryOperator() to handle implicit conversions caused by the '!' operator. This required adding some logic to GRSimpleVals to reason about nonloc::LocAsInteger SVals. This code appears to work fine, but it should eventually be cleaned up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
e04a5cb9afb5faa205c0bfa93103d6df691e05b2 15-Nov-2008 Ted Kremenek <kremenek@apple.com> Implement FIXME in GRExprEngine::VisitUnaryOperator() to handle implicit conversions caused by the '!' operator. This required adding some logic to GRSimpleVals to reason about nonloc::LocAsInteger SVals. This code appears to work fine, but it should eventually be cleaned up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
40ae7fab65db6a23c762de7ae3978248f89739ad 15-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add handy method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
90e72e4106a0c3efa7575e9f9cba0c775bb54552 15-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add handy method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59332 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
9f5337b3f6c3871db5756b0f9ba0babc13c4eac7 15-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement parsing and semantic checking of the 'mutable' keyword.
Thanks to Doug for the review. Actual effects of mutable to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
669d5d74b880a8497b92a3ec159145713f4d6519 15-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement parsing and semantic checking of the 'mutable' keyword.
Thanks to Doug for the review. Actual effects of mutable to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
4daee5a02386090d66b2cb92f79329548abe2879 14-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Remove Parser::isTokenUnqualifiedId, it's not getting used anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
981aeb64be244097a41098c437a989cf0a6f99b6 14-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove Parser::isTokenUnqualifiedId, it's not getting used anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
034a947c280d385793a38a408f8b80aa5bdf08be 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Second attempt at implementation transfer function support for ObjCForCollectionStmt. We now assume that the 'element' expression can be any lvalue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
06fb99fb403bff1651429923f666a2ebe2b1522f 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Second attempt at implementation transfer function support for ObjCForCollectionStmt. We now assume that the 'element' expression can be any lvalue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
65fedaf9bd026cf8863e24eeecade7b2a65e0030 14-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Add a new expression node, CXXOperatorCallExpr, which expresses a
function call created in response to the use of operator syntax that
resolves to an overloaded operator in C++, e.g., "str1 +
str2" that resolves to std::operator+(str1, str2)". We now build a
CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But
only for binary operators, where we actually implement overloading)

I decided *not* to refactor the current CallExpr to make it abstract
(with FunctionCallExpr and CXXOperatorCallExpr as derived
classes). Doing so would allow us to make CXXOperatorCallExpr a little
bit smaller, at the cost of making the argument and callee accessors
virtual. We won't know if this is going to be a win until we can parse
lots of C++ code to determine how much memory we'll save by making
this change vs. the performance penalty due to the extra virtual
calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/OperatorKinds.def
b4609806e9232593ece09ce08b630836e825865c 14-Nov-2008 Douglas Gregor <dgregor@apple.com> Add a new expression node, CXXOperatorCallExpr, which expresses a
function call created in response to the use of operator syntax that
resolves to an overloaded operator in C++, e.g., "str1 +
str2" that resolves to std::operator+(str1, str2)". We now build a
CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But
only for binary operators, where we actually implement overloading)

I decided *not* to refactor the current CallExpr to make it abstract
(with FunctionCallExpr and CXXOperatorCallExpr as derived
classes). Doing so would allow us to make CXXOperatorCallExpr a little
bit smaller, at the cost of making the argument and callee accessors
virtual. We won't know if this is going to be a win until we can parse
lots of C++ code to determine how much memory we'll save by making
this change vs. the performance penalty due to the extra virtual
calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/OperatorKinds.def
19330151f7883e8b1271c18b1f237102219a19f4 14-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Don't require us to manually number the statements and expressions in StmtNodes.def. We don't need stable numbers yet, renumbering is a pain, and LAST_STMT had the wrong value anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
f2cad8633e46cce12fc3d77c0bd451ffd7264baf 14-Nov-2008 Douglas Gregor <dgregor@apple.com> Don't require us to manually number the statements and expressions in StmtNodes.def. We don't need stable numbers yet, renumbering is a pain, and LAST_STMT had the wrong value anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
e178f20654f52e4ab30f6bc20f24694d5f6a3d28 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename header file.
Update include files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Support/ExprDeclBitVector.h
8d798c75b8aa8457ea06b22c6637d626ce1402de 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename header file.
Update include files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/Support/BlkExprDeclBitVector.h
lang/Analysis/Support/ExprDeclBitVector.h
42e0238470b6ead43b230448d8588983fef80b38 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename ExprDeclBitVector to BlkExprDeclBitVector, and store mappings from Stmt* to bit indices instead using Expr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
366982aa941f949a0770d714de0de4d104f436bc 14-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename ExprDeclBitVector to BlkExprDeclBitVector, and store mappings from Stmt* to bit indices instead using Expr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
3d4492e262e9ae7c20fefe1ad886f5382316f358 13-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Some cleanup for the implementation of built-in operator
candidates. Thanks to Chris for the review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/TypeOrdering.h
bf3af056289893f58d37b05a2c80970708781d61 13-Nov-2008 Douglas Gregor <dgregor@apple.com> Some cleanup for the implementation of built-in operator
candidates. Thanks to Chris for the review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/TypeOrdering.h
b0eef3633eb990d52b21bb363aa3115fca7e7cab 13-Nov-2008 Ted Kremenek <kremenek@apple.com> Using llvm::OwningPtr<> for CurLexer and CurTokenLexer. This makes both the ownership semantics of these objects explicit within the Preprocessor and also tightens up the code (explicit deletes not needed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
caaa7df2c78bbd40197823034c0275f3dcbd63e7 13-Nov-2008 Ted Kremenek <kremenek@apple.com> Using llvm::OwningPtr<> for CurLexer and CurTokenLexer. This makes both the ownership semantics of these objects explicit within the Preprocessor and also tightens up the code (explicit deletes not needed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59249 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
cc8f50d06d704dc03c35ef76cca66898f1f66727 13-Nov-2008 Ted Kremenek <kremenek@apple.com> - Revert r59229 and r59232: AllocRegion should be immutable.
- Temporarily disabled test Analysis/array-struct.c for region store.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
82bd99f4db2454cc6e1b7bfaac6db25cb3444ddc 13-Nov-2008 Ted Kremenek <kremenek@apple.com> - Revert r59229 and r59232: AllocRegion should be immutable.
- Temporarily disabled test Analysis/array-struct.c for region store.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
9f80153caecd6a530b6f910676458e80f0740553 13-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Change AllocaRegion to subclass TypedRegion. We need to know ElementRegion's
type when assigning to it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
56af9773056eb064937c872845c0da6e3d46d4b4 13-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Change AllocaRegion to subclass TypedRegion. We need to know ElementRegion's
type when assigning to it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
cbcb4c2ba81d6b1c0dea9d8a362755607175873c 13-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Don't build identifiers for C++ constructors, destructors, or
conversion functions. Instead, we just use a placeholder identifier
for these (e.g., "<constructor>") and override NamedDecl::getName() to
provide a human-readable name.

This is one potential solution to the problem; another solution would
be to replace the use of IdentifierInfo* in NamedDecl with a different
class that deals with identifiers better. I'm also prototyping that to
see how it compares, but this commit is better than what we had
previously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
7d7e6727a5de032c86dcb58ae734e7c1603c26e6 13-Nov-2008 Douglas Gregor <dgregor@apple.com> Don't build identifiers for C++ constructors, destructors, or
conversion functions. Instead, we just use a placeholder identifier
for these (e.g., "<constructor>") and override NamedDecl::getName() to
provide a human-readable name.

This is one potential solution to the problem; another solution would
be to replace the use of IdentifierInfo* in NamedDecl with a different
class that deals with identifiers better. I'm also prototyping that to
see how it compares, but this commit is better than what we had
previously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
5c8658d33964f85b8c00e4329e26a17a99c80e2c 13-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Fix compilation on 64-bit targets

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeOrdering.h
b7c3ca8af0a1a3b66fb220562c72dd3102153d5b 13-Nov-2008 Douglas Gregor <dgregor@apple.com> Fix compilation on 64-bit targets

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59192 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeOrdering.h
7ecfa1347c6e762792f80d6e4528958e991bda04 13-Nov-2008 Ted Kremenek <kremenek@apple.com> Move some diagnostic handling to PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PTHLexer.h
lang/Lex/PreprocessorLexer.h
d6a2e7d71e9a910c45a3eb0268a5d94635003d58 13-Nov-2008 Ted Kremenek <kremenek@apple.com> Move some diagnostic handling to PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PTHLexer.h
lang/Lex/PreprocessorLexer.h
957be41c9ab2dd2e6689ea15f84a5849c67b7bec 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add virtual dtor to PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
2c71d0f00e40b7b0a85561d430f52247b9c6e7f2 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add virtual dtor to PreprocessorLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
ea4a72de863487cb54c4d36647df24e9338f58a0 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add LexIncludeFilename.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
eb41c28b78634ba2165b4aa04e33f3a12e590b0e 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add LexIncludeFilename.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PreprocessorLexer.h
97017da401ee1ba67fedd3aab089a70c4e60d056 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Move LexIncludeFilename from Lexer to PreprocessorLexer.
PreprocessorLexer now has a virtual method "IndirectLex" which allows it to call the lex method of its subclasses. This is not for performance intensive operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
ab91b7086cceadce2cfd6a69cc90cebcdfcea07f 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Move LexIncludeFilename from Lexer to PreprocessorLexer.
PreprocessorLexer now has a virtual method "IndirectLex" which allows it to call the lex method of its subclasses. This is not for performance intensive operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
93deb42000861e0b27109e736f26b902cacd2cd4 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Unbreak last commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0deae4b0eb085d1a34e0cb983750b5ed835c16a4 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Unbreak last commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
8c8de18b9ecbfc0829790b98e5a915e9ca7fe666 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add Preprocessor::PushIncludeMacroStack() and Preprocessor::PopIncludeMacroStack(), two utility methods for manipulating the Preprocessor stack. These will be used to remove manually manipulation of IncludeMacroStack from the rest of the Preprocessor implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
d038def6e3f33bebf8c12bb3a95b2492c154a5dd 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add Preprocessor::PushIncludeMacroStack() and Preprocessor::PopIncludeMacroStack(), two utility methods for manipulating the Preprocessor stack. These will be used to remove manually manipulation of IncludeMacroStack from the rest of the Preprocessor implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
e71b3c37b21c10c043ca3f369880c55012fd54d3 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Update CFGStmtVisitor to recognize that ObjCForCollectionStmts are special block-level "expressions".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGStmtVisitor.h
bfcb712627b9346ab92880d9075896dcc7700ac2 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Update CFGStmtVisitor to recognize that ObjCForCollectionStmts are special block-level "expressions".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGStmtVisitor.h
550b80cc22ad79f0e4b59eaf11f4ecdca926cc8b 12-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Slightly improve type hash

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeOrdering.h
b995d799e146a7d43a3e8311adb54653415434a1 12-Nov-2008 Douglas Gregor <dgregor@apple.com> Slightly improve type hash

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeOrdering.h
ca82086ff22ac7d605cb087d150fe30e75e5a295 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add skeleton for PTH lexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
274b20863a728cc6a31ee75c670e3733600c1531 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add skeleton for PTH lexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59169 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/PTHLexer.h
45fe6b0e1467530492aecb24f1f29873623ab17a 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Move pieces of Lexer that the Preprocessor mutates to a new base class 'PreprocessorLexer'. This will also be the base class of the new Preprocessed-Token-Header (PTH) lexer. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PreprocessorLexer.h
0e977de1eacfbc143bdedad87c14b53814159023 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Move pieces of Lexer that the Preprocessor mutates to a new base class 'PreprocessorLexer'. This will also be the base class of the new Preprocessed-Token-Header (PTH) lexer. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/PreprocessorLexer.h
fa1b4e512b091cb2cbe1997c33c1b0642a564d6c 12-Nov-2008 Chris Lattner <sabre@nondot.org> Fix a FIXME by improving a diagnostic, add a testcase for PR3048



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
67027a7bc35671bc3f6d5c109720060f06303391 12-Nov-2008 Chris Lattner <sabre@nondot.org> Fix a FIXME by improving a diagnostic, add a testcase for PR3048



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59167 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
16516e274f96647fee00ed69cb6cada1ca24ab20 12-Nov-2008 Ted Kremenek <kremenek@apple.com> ObjCForCollectionStmts are block-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
390e48b15ad93f85bfd1e33b9992c198fa0db475 12-Nov-2008 Ted Kremenek <kremenek@apple.com> ObjCForCollectionStmts are block-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
13e167fde76de63844c9ce5257986d958c42dc79 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add (preliminary) transfer function support for ObjCForCollectionStmt. Still need to flesh out some logic.

When processing DeclStmt, use the new interface to StateManager::BindDecl. Conjuring of symbols is now done in VisitDeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
af3374187c47acea45706eab6744be6b1c66a856 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Add (preliminary) transfer function support for ObjCForCollectionStmt. Still need to flesh out some logic.

When processing DeclStmt, use the new interface to StateManager::BindDecl. Conjuring of symbols is now done in VisitDeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
1c53eafec7e5b3c78fb305670bfa59e6f0c9427a 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Conjured symbols now bind to Stmt* instead of Expr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
b5abb429e7aac731c3b4363a6118a6b3a6e27abc 12-Nov-2008 Ted Kremenek <kremenek@apple.com> Conjured symbols now bind to Stmt* instead of Expr*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59154 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
7012bf30b31f2d50b1cb8046085e7df75822fe5f 12-Nov-2008 Ted Kremenek <kremenek@apple.com> GRStateRef:
- Rename SetSVal to BindLoc
- Add BindDecl
- Add BindExpr

GRState:
- Environment now binds to Stmt* instead of Expr*. This is needed for processing ObjCForCollectionStmt (essentially the declaration of the the 'element' variable can have an SVal attached to it).
- BindDecl no longer accepts Expr* for the initialization value; use SVal* instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
d4931632946fe86fc2b09496f2b62443440a7da4 12-Nov-2008 Ted Kremenek <kremenek@apple.com> GRStateRef:
- Rename SetSVal to BindLoc
- Add BindDecl
- Add BindExpr

GRState:
- Environment now binds to Stmt* instead of Expr*. This is needed for processing ObjCForCollectionStmt (essentially the declaration of the the 'element' variable can have an SVal attached to it).
- BindDecl no longer accepts Expr* for the initialization value; use SVal* instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
37b78a123ac4ae21746594c053d897efb352fa7d 12-Nov-2008 Ted Kremenek <kremenek@apple.com> StoreManager::BindDecl now takes an SVal* for the initialization value instead of an Expr* (which can be null). Lazy symbolication of conjured symbols is now the sole responsibility of GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
42577d145e2c6c3f77731645d442faa716f4c852 12-Nov-2008 Ted Kremenek <kremenek@apple.com> StoreManager::BindDecl now takes an SVal* for the initialization value instead of an Expr* (which can be null). Lazy symbolication of conjured symbols is now the sole responsibility of GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
70d2612fd956d4d3aeac8b3abed8ef5e29c4b7a5 12-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Implement support for operator overloading using candidate operator
functions for built-in operators, e.g., the builtin

bool operator==(int const*, int const*)

can be used for the expression "x1 == x2" given:

struct X {
operator int const*();
} x1, x2;

The scheme for handling these built-in operators is relatively simple:
for each candidate required by the standard, create a special kind of
candidate function for the built-in. If overload resolution picks the
built-in operator, we perform the appropriate conversions on the
arguments and then let the normal built-in operator take care of it.

There may be some optimization opportunity left: if we can reduce the
number of built-in operator overloads we generate, overload resolution
for these cases will go faster. However, one must be careful when
doing this: GCC generates too few operator overloads in our little
test program, and fails to compile it because none of the overloads it
generates match.

Note that we only support operator overload for non-member binary
operators at the moment. The other operators will follow.

As part of this change, ImplicitCastExpr can now be an lvalue.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/TypeOrdering.h
lang/Basic/DiagnosticKinds.def
eb8f3063257a392f15aea48d42fb73ec51afc548 12-Nov-2008 Douglas Gregor <dgregor@apple.com> Implement support for operator overloading using candidate operator
functions for built-in operators, e.g., the builtin

bool operator==(int const*, int const*)

can be used for the expression "x1 == x2" given:

struct X {
operator int const*();
} x1, x2;

The scheme for handling these built-in operators is relatively simple:
for each candidate required by the standard, create a special kind of
candidate function for the built-in. If overload resolution picks the
built-in operator, we perform the appropriate conversions on the
arguments and then let the normal built-in operator take care of it.

There may be some optimization opportunity left: if we can reduce the
number of built-in operator overloads we generate, overload resolution
for these cases will go faster. However, one must be careful when
doing this: GCC generates too few operator overloads in our little
test program, and fails to compile it because none of the overloads it
generates match.

Note that we only support operator overload for non-member binary
operators at the moment. The other operators will follow.

As part of this change, ImplicitCastExpr can now be an lvalue.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/TypeOrdering.h
lang/Basic/DiagnosticKinds.def
1d2938c199ec8896f0385a7aeb548af99e47fd8f 11-Nov-2008 Ted Kremenek <kremenek@apple.com> Add fine-grain methods for control which bits are set/reset in ExprDeclBitVector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
7fdee87c203f8e9b6feed63e85256a8f8bc2bbc0 11-Nov-2008 Ted Kremenek <kremenek@apple.com> Add fine-grain methods for control which bits are set/reset in ExprDeclBitVector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
0cb7c87eb879a2a3f79426d34c678b07c04c1d8c 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Parse/Action.h
0518999d3adcc289997bd974dce90cc97f5c1c44 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Parse/Action.h
b93b49c760fcb5dda81f42e80d84e2fb1e88e54b 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++ 'typeid' parsing and sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
c42e1183846228a7fa5143ad76507d6d60f5c6f3 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++ 'typeid' parsing and sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
45014fd2d7e50079dc092df04fec9af7ea0cb0e0 10-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Basic support for taking the address of an overloaded function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
904eed3f6148758d39a2d3c88f3133274460d645 10-Nov-2008 Douglas Gregor <dgregor@apple.com> Basic support for taking the address of an overloaded function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
d2c14add07f9d01138382c5afd2cfd334e028dbd 10-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Improve parser error recovery after a constructor initializer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3f08d181f620e6bf4971c436fc9878f98a02bbe3 10-Nov-2008 Douglas Gregor <dgregor@apple.com> Improve parser error recovery after a constructor initializer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
9c6210b86c24a722970568f19abb8250814e9b02 10-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Some cleanups to the declaration/checking of overloaded operators in C++. Thanks to Sebastian for the review

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/OperatorKinds.def
lang/Basic/OperatorKinds.h
02bcd4cd1a19121da12884aa4943226f72a81e6c 10-Nov-2008 Douglas Gregor <dgregor@apple.com> Some cleanups to the declaration/checking of overloaded operators in C++. Thanks to Sebastian for the review

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/OperatorKinds.def
lang/Basic/OperatorKinds.h
4c9390fa05c9b75b76d853e76fd5a89920b9a6a8 10-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add pretty printing to StringRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
cc128b32429494fe04ed36d7ba30c011cb4e173a 10-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add pretty printing to StringRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
881964bc7876c335a821293d9a05e21e360ac320 10-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names.
e.g.:
namespace A {
void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A'
}
void A::f(); // SemanticDC == namespace 'A'
// LexicalDC == global namespace


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
5239304ff761b8b03eefb772bd5d830a9b9f1aea 10-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ScopedDecl::getLexicalDeclContext() which is different from ScopedDecl::getDeclContext() when there are nested-names.
e.g.:
namespace A {
void f(); // SemanticDC (getDeclContext) == LexicalDC (getLexicalDeclContext) == 'namespace A'
}
void A::f(); // SemanticDC == namespace 'A'
// LexicalDC == global namespace


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
054a2638e71d2633851f262749de76808224ae6e 08-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement Sema support for C++ nested-name-specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
ef6e647b8d3268a765c2c4dd7f8a73cad281a8e6 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement Sema support for C++ nested-name-specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58916 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
2d1992e33e0c80697b651de634ed0d8251cfac88 08-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Silence a GCC member initialization order warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
751810234ffb45327f23c5f9fda0b944e480bd2b 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Silence a GCC member initialization order warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
311db8c9d95f110058b4ced9b89f09c42e1debc8 08-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
eb83ecde1a822b1c38cd060a85a08c1ac9f82cf8 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement support for C++ nested-name-specifiers ('foo::bar::x') in the Parser side.
No Sema functionality change, just the signatures of the Action/Sema methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58913 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
0c93252e267fe104366e621778d1d5ce9d046b68 08-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce annotation tokens, a special kind of token, created and used only by the parser to replace a group of tokens with a single token encoding semantic information.
Will be fully utilized later for C++ nested-name-specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/Preprocessor.h
lang/Lex/Token.h
3604e3895ecd850291b518e5a82246c888ce9d0f 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce annotation tokens, a special kind of token, created and used only by the parser to replace a group of tokens with a single token encoding semantic information.
Will be fully utilized later for C++ nested-name-specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58911 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/Preprocessor.h
lang/Lex/Token.h
67deed2c9de76a72ee4158d0a48bbd0f1ed105d7 08-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
5540a72fe407f77d4155511b508f21a237254092 08-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use only one constructor for CXXMethodDecl. Keep initialization stuff into one place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
7d6a5d29f13eee9b808a71534edd4cac7d60f2e3 08-Nov-2008 Daniel Dunbar <daniel@zuster.org> Support getTypeInfo, getTypeAlign, getTypeSize on const Type*s.
- Size/align are not effected by CVR qualifiers.

Support getCanonicalType: const Type* -> const Type*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1d75118af76cae2bfc06389cde410e14bd0a19fc 08-Nov-2008 Daniel Dunbar <daniel@zuster.org> Support getTypeInfo, getTypeAlign, getTypeSize on const Type*s.
- Size/align are not effected by CVR qualifiers.

Support getCanonicalType: const Type* -> const Type*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7b5c5b5d149f00b1e789a7135144865c37c8f9db 08-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add a boilerplate for out-of-bound array checking. This has no real function currently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/Store.h
60156f0596a7ab9a39ddec74942b60a3da847174 08-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add a boilerplate for out-of-bound array checking. This has no real function currently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/Store.h
0528e1c81fe7c67a0245ba86a9e9d70162475c62 08-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Greatly improve static_cast diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e3dc28a32a61960bdef59f79d0da161c72a5c88a 08-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Greatly improve static_cast diagnostics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c9e909c35b3c0610930fb5fb07a66d768dc6dc61 07-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Changes in preparation for nested-name-specifiers.

-When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors
-For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
c7ed9c60b8ee04b119e23441cae2cfec74536ba9 07-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Changes in preparation for nested-name-specifiers.

-When parsing declarators, don't depend on "CurScope->isCXXClassScope() == true" for constructors/destructors
-For C++ member declarations, don't depend on "Declarator.getContext() == Declarator::MemberContext"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
3ef6c9794a79271d00bfcd941974602fcd2f9c48 07-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Parsing, ASTs, and semantic analysis for the declaration of conversion
functions in C++, e.g.,

struct X {
operator bool() const;
};

Note that these conversions don't actually do anything, since we don't
yet have the ability to use them for implicit or explicit conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
2f1bc5285ccd40f411af5f5993f013e27e74ab78 07-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, ASTs, and semantic analysis for the declaration of conversion
functions in C++, e.g.,

struct X {
operator bool() const;
};

Note that these conversions don't actually do anything, since we don't
yet have the ability to use them for implicit or explicit conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
a9d57b6c3a2edee6d750e0a8d10c49be158ca20a 07-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Assert that Parser::MaybeParseOperatorFunctionId is called when token is kw_operator, and replace ExpectAndConsume for the 'operator' token with a ConsumeToken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
9057a81efaf15c543aab1c5c8488e8a9ed2c0ff4 07-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Assert that Parser::MaybeParseOperatorFunctionId is called when token is kw_operator, and replace ExpectAndConsume for the 'operator' token with a ConsumeToken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3a6a307d95553de6dfeda3fe2a5985afabbc50a7 07-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Separate the parsing of type-specifiers from other declaration specifiers, so that we can parse a C++ type-specifier-seq

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
12e083c805c0f86be4f8e54b06e75b2c3dc1da64 07-Nov-2008 Douglas Gregor <dgregor@apple.com> Separate the parsing of type-specifiers from other declaration specifiers, so that we can parse a C++ type-specifier-seq

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
7609f71b4c384e32a86d816f024aa870abc4d40c 07-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add simple get method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
c12dedbe9c164a2cc47940a3b7ea0c27efe58f1a 07-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add simple get method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
6fc891948d005c9616ea63549004a545555e3d39 07-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Join two lines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
b1ae7d985b72764f2c42bf45d6a801b600a59890 07-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Join two lines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
2e6fb86852ae33f6c11fab0c3390734b75431dc7 07-Nov-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Shut off an unsigned/signed comparison warning for GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
bf8cb361038c71a76f8ffa0f9986cebc43732e87 07-Nov-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Shut off an unsigned/signed comparison warning for GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58842 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
c88ca9de9840939f4da095cdfb19adb04649b9dd 07-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Finish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is
available, things get much simplified.

One addition is that CompoundLiteralExpr can appear both in rvalue and lvalue
context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
f22679e3e5d5f5754931952e58112b4c863a4137 07-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Finish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is
available, things get much simplified.

One addition is that CompoundLiteralExpr can appear both in rvalue and lvalue
context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
d7f915e74b3906e075d8fbd7b546f40fb6a39814 07-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Initial, rudimentary implementation of operator overloading for binary
operators. For example, one can now write "x + y" where x or y is a
class or enumeration type, and Clang will perform overload resolution
for "+" based on the overloaded operators it finds.

The other kinds of overloadable operators in C++ will follow this same
approach.

Three major issues remain:
1) We don't find member operators
2) Since we don't have user-defined conversion operators, we can't
call any of the built-in overloaded operators in C++ [over.built].
3) Once we've done the semantic checks, we drop the overloaded
operator on the floor; it doesn't get into the AST at all.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
eaebc75ef6ff21fbc9f25ab4175cba465e4e0e43 07-Nov-2008 Douglas Gregor <dgregor@apple.com> Initial, rudimentary implementation of operator overloading for binary
operators. For example, one can now write "x + y" where x or y is a
class or enumeration type, and Clang will perform overload resolution
for "+" based on the overloaded operators it finds.

The other kinds of overloadable operators in C++ will follow this same
approach.

Three major issues remain:
1) We don't find member operators
2) Since we don't have user-defined conversion operators, we can't
call any of the built-in overloaded operators in C++ [over.built].
3) Once we've done the semantic checks, we drop the overloaded
operator on the floor; it doesn't get into the AST at all.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
e60e5d3eb3d09bde80882f60abc69e28ced874c6 06-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Parsing, ASTs, and semantic analysis for the declaration of overloaded
operators in C++. Overloaded operators can be called directly via
their operator-function-ids, e.g., "operator+(foo, bar)", but we don't
yet implement the semantics of operator overloading to handle, e.g.,
"foo + bar".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
lang/Basic/OperatorKinds.def
lang/Basic/OperatorKinds.h
lang/Parse/AccessSpecifier.h
lang/Parse/Parser.h
1cd1b1e987f5e2f060d7972b13d83239b36d77d6 06-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, ASTs, and semantic analysis for the declaration of overloaded
operators in C++. Overloaded operators can be called directly via
their operator-function-ids, e.g., "operator+(foo, bar)", but we don't
yet implement the semantics of operator overloading to handle, e.g.,
"foo + bar".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
lang/Basic/OperatorKinds.def
lang/Basic/OperatorKinds.h
lang/Parse/AccessSpecifier.h
lang/Parse/Parser.h
444bb8bc368f69b6240fb7c2bc6a5bdd289f8fec 06-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Reclaim some bits in IdentifierInfo, for later use as overloaded operator names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
5142af38ed0dd2f592cbfa00fa6e2e14dd6cc516 06-Nov-2008 Douglas Gregor <dgregor@apple.com> Reclaim some bits in IdentifierInfo, for later use as overloaded operator names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
a1cf66a5674bc3fed6f595345c597466e07d2450 06-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Sema-check virtual declarations. Complete dynamic_cast checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
d93f0ddba0965ded252e228134b30ce30e863fb0 06-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Sema-check virtual declarations. Complete dynamic_cast checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
658b444d7fc098ad35801b5e235ea6e5b7feb7b9 06-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Add the remaining C++0x keywords

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
85bb3dad385e9c2a57cf5aa2d2116d8381953a5a 06-Nov-2008 Douglas Gregor <dgregor@apple.com> Add the remaining C++0x keywords

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
93d487c93efa822ee713b831ac5fa172ffec0aea 06-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Bring back RegionExtent classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
a3d9ea8d93a0a4dbba0fd95c6a54c33faebc277c 06-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Bring back RegionExtent classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
8210a8e4f46bc955ed717609aba309b68c5924ab 05-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Parsing, representation, and preliminary semantic analysis of destructors.

Implicit declaration of destructors (when necessary).

Extended Declarator to store information about parsed constructors
and destructors; this will be extended to deal with declarators that
name overloaded operators (e.g., "operator +") and user-defined
conversion operators (e.g., "operator int").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
42a552f8200ba5948661aee0106fce0c04e39818 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Parsing, representation, and preliminary semantic analysis of destructors.

Implicit declaration of destructors (when necessary).

Extended Declarator to store information about parsed constructors
and destructors; this will be extended to deal with declarators that
name overloaded operators (e.g., "operator +") and user-defined
conversion operators (e.g., "operator int").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
15e0462675c2725515466bb423157e652c135784 05-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
64bffa9a6f40e5a3d5556f994f09f7bf45eecd4c 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Keep track of whether a C++ class is an aggregate. Don't allow initialization of non-aggregates with initializer lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
a65e8ddc1a3a8878ddce4b74f2fe276134602410 05-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Initial implementation of parsing, semantic analysis, and AST-building
for constructor initializations, e.g.,

class A { };
class B : public A {
int m;
public:
B() : A(), m(17) { };
};





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
7ad8390f7992ab7f19b1460c5f0b9d96f165c4e9 05-Nov-2008 Douglas Gregor <dgregor@apple.com> Initial implementation of parsing, semantic analysis, and AST-building
for constructor initializations, e.g.,

class A { };
class B : public A {
int m;
public:
B() : A(), m(17) { };
};





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58749 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
0a6ab173022fd4812fd61c52de36c5fa85c67894 04-Nov-2008 Anders Carlsson <andersca@mac.com> Make it an error if an Objective-C declaration is not in the global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
15281450f512b7d554858e4d17fca00bfc442a07 04-Nov-2008 Anders Carlsson <andersca@mac.com> Make it an error if an Objective-C declaration is not in the global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
825f6ea730de198743bbefdfa270bf65834ced27 04-Nov-2008 Chris Lattner <sabre@nondot.org> LinkageSpecDecl is c++ specific, move it to DeclCXX


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
21ef7ae45c8b91f23cf5eab2263421bb398a644b 04-Nov-2008 Chris Lattner <sabre@nondot.org> LinkageSpecDecl is c++ specific, move it to DeclCXX


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
12aee8691f63779a7b241362078af35722c4c76d 04-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f7be9448af88e0ebb204bdcebfc13f4cb2b9d8e1 04-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Some cleanup of the cast checkers. Don't canonicalize types when not needed. Use distinct diagnostics for distinct errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d860663a58f234b3936571178855e52f41377ba0 04-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
cd9b46e5442a3ef17f83f75177d8545cb5b3e2b9 04-Nov-2008 Douglas Gregor <dgregor@apple.com> Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
a5b022ad90e26b786f0c3096e3312db2f6ee317b 04-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58695 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
796da18402f286b897782a298ae3b20c459c102e 04-Nov-2008 Douglas Gregor <dgregor@apple.com> Create a new expression class, CXXThisExpr, to handle the C++ 'this' primary expression. Remove CXXThis from PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58695 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
3c24695274a68eaba955816377b350ae6dcd86cb 04-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Diagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my bogus assertion about it already being handled

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3996f23ac20de411e0b5931a451bd05142f0b712 04-Nov-2008 Douglas Gregor <dgregor@apple.com> Diagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my bogus assertion about it already being handled

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7f1412d98bd91fb090784f112d822bf7b9f367c3 04-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b2f9e516327310d95840d442416084508f80c183 04-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6339636> clang ObjC rewriter: Assertion failed: FileID-1 < FileIDs.size() && "Invalid FileID!", file c:\cygwin\home\Administrator\llvm\tools\clang\include\clang/Basic/SourceManager.h, line 513



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a3f825e5b6df7939120bfebee7411c5face4a7f9 04-Nov-2008 Ted Kremenek <kremenek@apple.com> Hook up the Plist diagnostic client to the driver.
Fix Plist output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/PathDiagnosticClients.h
4fc82c84581476cb3adba8d4107ded22851d9c4d 04-Nov-2008 Ted Kremenek <kremenek@apple.com> Hook up the Plist diagnostic client to the driver.
Fix Plist output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/PathDiagnosticClients.h
0edabbfeb1cacf54a1b9be2f1cd777b0f2982902 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Add path diagnostics client for emitting path reports using Plists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/PathDiagnosticClients.h
5d866256333fb6115a8a86ac4f89b2ca36e20c70 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Add path diagnostics client for emitting path reports using Plists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/PathDiagnosticClients.h
21b88b772a9fdbc28aabcd081b0fa2bf59453786 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HTMLDiagnostics.h
lang/Driver/PathDiagnosticClients.h
ad99dbfc1d9178f9f5c415a81ad5bd39bd09d4b6 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HTMLDiagnostics.h
lang/Driver/PathDiagnosticClients.h
5870a95bc9b8a547b0ed253d6c51d20b8dcf4647 03-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Implicit support for direct initialization of objects of class type, e.g.,

X x(5, 7);




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
18fe56863be253a27b940022d27a3101778adaf6 03-Nov-2008 Douglas Gregor <dgregor@apple.com> Implicit support for direct initialization of objects of class type, e.g.,

X x(5, 7);




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e640ab64c642d17ed4eb13261d9455d7ae6a511e 03-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Add implicitly-declared default and copy constructors to C++ classes,
when appropriate.

Conversions for class types now make use of copy constructors. I've
replaced the egregious hack allowing class-to-class conversions with a
slightly less egregious hack calling these conversions standard
conversions (for overloading reasons).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
396b7cd9f6b35d87d17ae03e9448b5c1f2184598 03-Nov-2008 Douglas Gregor <dgregor@apple.com> Add implicitly-declared default and copy constructors to C++ classes,
when appropriate.

Conversions for class types now make use of copy constructors. I've
replaced the egregious hack allowing class-to-class conversions with a
slightly less egregious hack calling these conversions standard
conversions (for overloading reasons).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
bb66b419d356821f61f9a49494266ff5393308c2 03-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Eliminate header dependency ASTContext -> TargetInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d934112e6170b0fd940d8e40db6936cea2cdcf62 03-Nov-2008 Douglas Gregor <dgregor@apple.com> Eliminate header dependency ASTContext -> TargetInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b7b28a2e267fccb603a5a9c5e188d7d670a909b2 03-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Implement C++ DR 106 and C++ DR 540, both of which deal with
reference-collapsing.

Implement diagnostic for formation of a reference to cv void.

Drop cv-qualifiers added to a reference type when the reference type
comes from a typedef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f1f9b4e5c7fd087e78f2e387c01098d49d41e784 03-Nov-2008 Douglas Gregor <dgregor@apple.com> Implement C++ DR 106 and C++ DR 540, both of which deal with
reference-collapsing.

Implement diagnostic for formation of a reference to cv void.

Drop cv-qualifiers added to a reference type when the reference type
comes from a typedef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c6507e454072488f432bd2aae2ec8bd52f8fe883 03-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Connect ASTContext to TargetInfo when determining the size_t, ptrdiff_t, and wchar_t types. Fixes recent breakage on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b4e66d5259f90e9aae4d40fc5de801e046c7df94 03-Nov-2008 Douglas Gregor <dgregor@apple.com> Connect ASTContext to TargetInfo when determining the size_t, ptrdiff_t, and wchar_t types. Fixes recent breakage on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d30283ff012138c328764dada9ca2e257f7f287a 03-Nov-2008 Chris Lattner <sabre@nondot.org> Fix PR3001: if we have an error parsing an initializer, make sure to remove
the designator corresponding to it, otherwise Sema and later parsing will
get confused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Designator.h
e2f56196e916e4d2f9eeec5c8978490cdedb3f64 03-Nov-2008 Chris Lattner <sabre@nondot.org> Fix PR3001: if we have an error parsing an initializer, make sure to remove
the designator corresponding to it, otherwise Sema and later parsing will
get confused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Designator.h
ff4fe319cb800dc20c6aae2189cd7501c1fd590d 03-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> - Remove AnonTypedRegion, which is not to be used.
- Prepare AnonPointeeRegioin for later use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
817c67daf845b35a242cd9b68e9c5eccf09c63df 03-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> - Remove AnonTypedRegion, which is not to be used.
- Prepare AnonPointeeRegioin for later use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
ea9ca509323c4d6c116bfef5343b6be2a823ffb9 02-Nov-2008 Ted Kremenek <kremenek@apple.com> Added AllocaRegion, which represents regions created by calls to alloca().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
7090ae1a984eb446a5fb4da7b1f2573830653799 02-Nov-2008 Ted Kremenek <kremenek@apple.com> Added AllocaRegion, which represents regions created by calls to alloca().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
ccabf0868d9cb81bbc3037a8b3b400737401841d 31-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Semantic checking of constructor declarations and classification of default/copy constructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
030ff0cdad79b9e0602e143e0669364d2bad8bd2 31-Oct-2008 Douglas Gregor <dgregor@apple.com> Semantic checking of constructor declarations and classification of default/copy constructors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
b72e9da529fca5693b46ec2888a241f706d7dbcb 31-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Implement basic support for converting constructors in user-defined
conversions.

Notes:
- Overload resolution for converting constructors need to prohibit
user-defined conversions (hence, the test isn't -verify safe yet).
- We still use hacks for conversions from a class type to itself.
This will be the case until we start implicitly declaring the appropriate
special member functions. (That's next on my list)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
60d62c29d260596454aaf4cb50cbc756ac08875e 31-Oct-2008 Douglas Gregor <dgregor@apple.com> Implement basic support for converting constructors in user-defined
conversions.

Notes:
- Overload resolution for converting constructors need to prohibit
user-defined conversions (hence, the test isn't -verify safe yet).
- We still use hacks for conversions from a class type to itself.
This will be the case until we start implicitly declaring the appropriate
special member functions. (That's next on my list)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
9ac68aa262c6c829f6b4b82209172e4a8bf239b3 31-Oct-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement semantic checking of static_cast and dynamic_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0777972d38a3125efed962b045704c30ae6965cf 31-Oct-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Implement semantic checking of static_cast and dynamic_cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
fa45143d9b070b5e0e76031dbba1fca99ecd06ab 31-Oct-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.

Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
31fc07df7f0fc89ebf83ca05a20b29de45a7598d 31-Oct-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.

Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f15ac4bc132d609f1df92308612f3d2629bbd480 31-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for parsing and representing C++ constructor declarations.

Notes:
- Constructors are never found by name lookup, so they'll never get
pushed into any scope. Instead, they are stored as an
OverloadedFunctionDecl in CXXRecordDecl for easy overloading.
- There's a new action isCurrentClassName that determines whether an
identifier is the name of the innermost class currently being defined;
we use this to identify the declarator-id grammar rule that refers to
a type-name.
- MinimalAction does *not* support parsing constructors.
- We now handle virtual and explicit function specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
b48fe3812047e84164925c8938ce82be0624c40c 31-Oct-2008 Douglas Gregor <dgregor@apple.com> Add support for parsing and representing C++ constructor declarations.

Notes:
- Constructors are never found by name lookup, so they'll never get
pushed into any scope. Instead, they are stored as an
OverloadedFunctionDecl in CXXRecordDecl for easy overloading.
- There's a new action isCurrentClassName that determines whether an
identifier is the name of the innermost class currently being defined;
we use this to identify the declarator-id grammar rule that refers to
a type-name.
- MinimalAction does *not* support parsing constructors.
- We now handle virtual and explicit function specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
747a95e29d2fd9a33f8fc95bbbed1e576539a079 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> "One" line fix for -parse-noop failure, "id" and several other things
were being treated as type names for non-Objective-C files.
- Other lines are just because MinimalAction didn't have access to
the LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e10b0f236bc8487445bc99b8d14bd40666b1998d 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> "One" line fix for -parse-noop failure, "id" and several other things
were being treated as type names for non-Objective-C files.
- Other lines are just because MinimalAction didn't have access to
the LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
29a8a02193b669c7384535d294ec3eb2c75119ca 31-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Make CompoundLiteralRegion a subclass of TypedRegiion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
77cfac623178d0c16e16e2f171d20b0fea8fde30 31-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Make CompoundLiteralRegion a subclass of TypedRegiion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
8fae2f28105aec10d4878e0dbee9ab58516c2994 31-Oct-2008 Ted Kremenek <kremenek@apple.com> Add accessor method to CompoundLiteralRegion to retrieve the CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
11a83dc7a9a5738cc0bc76180b508eae896eefa9 31-Oct-2008 Ted Kremenek <kremenek@apple.com> Add accessor method to CompoundLiteralRegion to retrieve the CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
c1c2bbfccda07753d605ff0cc186298fa586fd12 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Pretty-printing for SVals now mainly uses llvm::raw_ostream. We have an adapter for std::ostream, but this will be removed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
b8b4161e52bacc6d189146bd632393dc5f060cb0 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Pretty-printing for SVals now mainly uses llvm::raw_ostream. We have an adapter for std::ostream, but this will be removed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
b667c9f2a84d0a83cd083db87d963a26d628526a 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Added iterators to nonloc::CompoundSVal.
Added pretty-printing for nonloc::CompoundSVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/SVals.h
a6fac4e446eb30ed270eff9d4084d5db5e657fcf 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Added iterators to nonloc::CompoundSVal.
Added pretty-printing for nonloc::CompoundSVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58442 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/SVals.h
63ee036cb9a24a65f8fb0d0eaaebfae3793b81a6 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Update #includes since SVals.h no longer includes BasicValueFactory.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
a693d4fa7a6dc31b23837cf38cba7aa2af8f00f3 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Update #includes since SVals.h no longer includes BasicValueFactory.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
f441c73035ae4159c3738ece8252645a5691ed03 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Add iterator/reverse_iterator to InitListExpr for iteration over the subexpressions of an initializer list. This is basically the same as child_iterator except reverse iteration is possible (which will be used by GRExprEngine::VisitInitListExpr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7fcfa4a9b5054bc2a3bc65093f9d2e9e67a70838 30-Oct-2008 Ted Kremenek <kremenek@apple.com> Add iterator/reverse_iterator to InitListExpr for iteration over the subexpressions of an initializer list. This is basically the same as child_iterator except reverse iteration is possible (which will be used by GRExprEngine::VisitInitListExpr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5e7a4b8dc6b7cb0fd55639de6d33672c750a6964 30-Oct-2008 Ted Kremenek <kremenek@apple.com> CompoundVal now uses an ImmutableList<SVal> to store its set of SVals. This change was motivated by the need to allow state-splitting in GRExprEngine::VisitInitListExpr. As a side-benefit, we no longer need to perform any copies of SVals when creating a CompoundSVal, and the profiling of CompoundSVal is now constant time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/SVals.h
632e8b84976f683b365eddfacd04ea5d6f4d8cdf 30-Oct-2008 Ted Kremenek <kremenek@apple.com> CompoundVal now uses an ImmutableList<SVal> to store its set of SVals. This change was motivated by the need to allow state-splitting in GRExprEngine::VisitInitListExpr. As a side-benefit, we no longer need to perform any copies of SVals when creating a CompoundSVal, and the profiling of CompoundSVal is now constant time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/SVals.h
696b3a8a0aa06949f1dfe3519fa1a3c9278ce4d8 30-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Rename:
- SetSVal(GRState*, Loc, SVal) => BindLoc
- SetSVal(GRState*, Expr*, SVal) => BindExpr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
8cd5aaea92f12c25d65ecff5fc820def4c81c1aa 30-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Rename:
- SetSVal(GRState*, Loc, SVal) => BindLoc
- SetSVal(GRState*, Expr*, SVal) => BindExpr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
ebcad73f7026df9db8f5ce94cf7836ed0e393e3c 30-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Implement VisitInitListExpr(). InitListExpr will have a nonloc::CompoundVal value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c4f8706b6539e06a5de153bd72850bb2e0a71456 30-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Implement VisitInitListExpr(). InitListExpr will have a nonloc::CompoundVal value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
277884fbb7152d160055c3a2a7cb018ed9a4f543 30-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add CompoundVal and CompoundValData for representing the value of InitListExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/SVals.h
6764b72f6f26b5c03471b9e379a44d379d2d4a9e 30-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add CompoundVal and CompoundValData for representing the value of InitListExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/SVals.h
f5660a9835287fcb7b93634b35a8faad6006b24c 29-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Make the non-reference check in Expr work always

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f7c2aa0b049272d8f318988c1965760dcb852578 29-Oct-2008 Douglas Gregor <dgregor@apple.com> Make the non-reference check in Expr work always

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
721cbf1a4da45cb5ec49fcd7afc7dc087f091025 29-Oct-2008 Daniel Dunbar <daniel@zuster.org> Choose CompileOptions (optimization passes) to match llvm-gcc more
closely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
8e8f3b7f61548391b675831f350b4ede040dfdce 29-Oct-2008 Daniel Dunbar <daniel@zuster.org> Choose CompileOptions (optimization passes) to match llvm-gcc more
closely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
f05e4edd77beb80c814306a51b61f975dc909d66 29-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Rename: AddDecl => BindDecl
BindDecl better describes what the function does:
- Bind the VarDecl to its memory region
- Bind the memory region to some initial value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
8b2e05d9eef692f30054216237e776cb51acd054 29-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Rename: AddDecl => BindDecl
BindDecl better describes what the function does:
- Bind the VarDecl to its memory region
- Bind the memory region to some initial value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58359 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
33c8eb222b4bc17a9c81952910485f6b5df7a30c 29-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> MemSpaceRegions could be uninitialized. We only require R is a real region.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
ce63911d6bdd795f63365723d4cdaa6998529e1e 29-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> MemSpaceRegions could be uninitialized. We only require R is a real region.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
81c29157dcb112ce5f1ccb9df4a431d3070a99a8 29-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Implement initialization of a reference (C++ [dcl.init.ref]) as part
of copy initialization. Other pieces of the puzzle:

- Try/Perform-ImplicitConversion now handles implicit conversions
that don't involve references.
- Try/Perform-CopyInitialization uses
CheckSingleAssignmentConstraints for C. PerformCopyInitialization
is now used for all argument passing and returning values from a
function.
- Diagnose errors with declaring references and const values without
an initializer. (Uses a new Action callback, ActOnUninitializedDecl).

We do not yet have implicit conversion sequences for reference
binding, which means that we don't have any overloading support for
reference parameters yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
27c8dc06f65d7abcf6a7e7f64a7960c9a150ca01 29-Oct-2008 Douglas Gregor <dgregor@apple.com> Implement initialization of a reference (C++ [dcl.init.ref]) as part
of copy initialization. Other pieces of the puzzle:

- Try/Perform-ImplicitConversion now handles implicit conversions
that don't involve references.
- Try/Perform-CopyInitialization uses
CheckSingleAssignmentConstraints for C. PerformCopyInitialization
is now used for all argument passing and returning values from a
function.
- Diagnose errors with declaring references and const values without
an initializer. (Uses a new Action callback, ActOnUninitializedDecl).

We do not yet have implicit conversion sequences for reference
binding, which means that we don't have any overloading support for
reference parameters yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
6a3008456334d17f7b68ccfa54ffaf39bb58fbd4 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> 80-col fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8320aaaa01d931aa234fc3bce05b399ef41898d5 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> 80-col fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58341 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
035d088fb41d691b08924635995c66d09a126f81 28-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Rename ExplicitCCastExpr to CStyleCastExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
6eec8e883de118b431e3ead5b1e604a6ac68ff6b 28-Oct-2008 Douglas Gregor <dgregor@apple.com> Rename ExplicitCCastExpr to CStyleCastExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58331 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
2369f112160fc75d4e441204ca92da0ea3852761 28-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add isGlobalsRegion() predicate to MemRegionManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
c540b261ac553b91840146eaa3fee3f11b1013a7 28-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add isGlobalsRegion() predicate to MemRegionManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
51eedea8da63bb546773b491fe1e7ff901e54268 28-Oct-2008 Chris Lattner <sabre@nondot.org> clarify comment, rename argument to avoid a subtle conflict
with an ivar that wasn't a bug but was confusing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenLexer.h
21ec0e4c5db85e45b59cafabca66d640e0ee2dcc 28-Oct-2008 Chris Lattner <sabre@nondot.org> clarify comment, rename argument to avoid a subtle conflict
with an ivar that wasn't a bug but was confusing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenLexer.h
0d5d89d173f87b74a7f539c51f417de0f5435fb3 28-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Improve our handling of (C++) references within Clang. Specifically:
- Do not allow expressions to ever have reference type
- Extend Expr::isLvalue to handle more cases where having written a
reference into the source implies that the expression is an lvalue
(e.g., function calls, C++ casts).
- Make GRExprEngine::VisitCall treat the call arguments as lvalues when
they are being bound to a reference parameter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Analysis/PathSensitive/GRExprEngine.h
9d293dfc0ad7c44ae0b5eb9517f1ed8c8d8b7ff7 28-Oct-2008 Douglas Gregor <dgregor@apple.com> Improve our handling of (C++) references within Clang. Specifically:
- Do not allow expressions to ever have reference type
- Extend Expr::isLvalue to handle more cases where having written a
reference into the source implies that the expression is an lvalue
(e.g., function calls, C++ casts).
- Make GRExprEngine::VisitCall treat the call arguments as lvalues when
they are being bound to a reference parameter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Analysis/PathSensitive/GRExprEngine.h
0a2da71034fea55ee786387314eae704b91e2f9b 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add attribute always_inline support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
af668b0e7d3581dea3b4f29a9262686e83887e5b 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add attribute always_inline support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
b0ea903c94ee2344d24e5bceb5e28dc96402f8fc 28-Oct-2008 Ted Kremenek <kremenek@apple.com> - Fix type-punning warning in SVals.cpp by using a real iterator class for symbol_iterator.

- Add symbol_iterator support for SymbolicRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
0d958e7066db0ac2ecbce7286068db50cdb1de63 28-Oct-2008 Ted Kremenek <kremenek@apple.com> - Fix type-punning warning in SVals.cpp by using a real iterator class for symbol_iterator.

- Add symbol_iterator support for SymbolicRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
ac6372a40237fcd22dd436b52022715955838dcf 27-Oct-2008 Daniel Dunbar <daniel@zuster.org> Comment fix, ParseAST does not take ownership of the consumer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
d6a1c5daec1ff7152f0e3ced8a461e0dc6793dfa 27-Oct-2008 Daniel Dunbar <daniel@zuster.org> Comment fix, ParseAST does not take ownership of the consumer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
d83daa53ed77b0ec2daa37a9f0944b359c715ada 27-Oct-2008 Ted Kremenek <kremenek@apple.com> Added preliminary support for CompoundLiterals in the static analyzer:

- GRExprEngine::VisitCompoundLiteral...
(1) visits the initializer list (generating ExplodedNodes)
(2) creates a CompoundMemRegion for the literal
(3) creates a new state with the bound literal values using
GRStateManager::BindCompoundLiteral

- GRStateManager::BindCompoundLiteral simply calls
StoreManager::BindCompoundLiteral to get a new store and returns a persistent
GRState with that store.

- BasicStore::BindCompoundLiteral simply returns the same store, as it
doesn't handle field sensitivity

- RegionStore::BindCompoundLiteral currently fires an assert (pending discussion
of how to best implement mappings for CompoundLiteralRegion).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
4f09027385466f1f4c382c80ca77157e2aef97d9 27-Oct-2008 Ted Kremenek <kremenek@apple.com> Added preliminary support for CompoundLiterals in the static analyzer:

- GRExprEngine::VisitCompoundLiteral...
(1) visits the initializer list (generating ExplodedNodes)
(2) creates a CompoundMemRegion for the literal
(3) creates a new state with the bound literal values using
GRStateManager::BindCompoundLiteral

- GRStateManager::BindCompoundLiteral simply calls
StoreManager::BindCompoundLiteral to get a new store and returns a persistent
GRState with that store.

- BasicStore::BindCompoundLiteral simply returns the same store, as it
doesn't handle field sensitivity

- RegionStore::BindCompoundLiteral currently fires an assert (pending discussion
of how to best implement mappings for CompoundLiteralRegion).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
81329abac26ddf6875abac876267a52b4595d638 27-Oct-2008 Ted Kremenek <kremenek@apple.com> Pull determination of the super region for a VarRegion into a single getVarRegion() method. This provides a common clean API for clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
9a1f03afc569abbdcc182379c99d1fe1ece67c9d 27-Oct-2008 Ted Kremenek <kremenek@apple.com> Pull determination of the super region for a VarRegion into a single getVarRegion() method. This provides a common clean API for clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
6bc91b9dc8add225d40725b2001a3e4db5ede97b 27-Oct-2008 Ted Kremenek <kremenek@apple.com> Added CompoundLiteralRegion to represent the (temporary) memory allocated for a compound literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
329d6fde79254503b14724e1231a9d70fa6b387f 27-Oct-2008 Ted Kremenek <kremenek@apple.com> Added CompoundLiteralRegion to represent the (temporary) memory allocated for a compound literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
21a04f33b3e9024aadbebbef24eadf49ed0cbaf1 27-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Refactor the expression class hierarchy for casts. Most importantly:
- CastExpr is the root of all casts
- ImplicitCastExpr is (still) used for all explicit casts
- ExplicitCastExpr is now the root of all *explicit* casts
- ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++
- CXXFunctionalCastExpr inherits from ExplicitCastExpr
- CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all
of the C++ named cast expression types (static_cast, dynamic_cast, etc.)
- Added classes CXXStaticCastExpr, CXXDynamicCastExpr,
CXXReinterpretCastExpr, and CXXConstCastExpr to

Also, fixed returned-stack-addr.cpp, which broke once when we fixed
reinterpret_cast to diagnose double->int* conversions and again when
we eliminated implicit conversions to reference types. The fix is in
both testcase and SemaChecking.cpp.

Most of this patch is simply support for the renaming. There's very
little actual change in semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
49badde06e066d058d6c7fcf4e628a72999b65a9 27-Oct-2008 Douglas Gregor <dgregor@apple.com> Refactor the expression class hierarchy for casts. Most importantly:
- CastExpr is the root of all casts
- ImplicitCastExpr is (still) used for all explicit casts
- ExplicitCastExpr is now the root of all *explicit* casts
- ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++
- CXXFunctionalCastExpr inherits from ExplicitCastExpr
- CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all
of the C++ named cast expression types (static_cast, dynamic_cast, etc.)
- Added classes CXXStaticCastExpr, CXXDynamicCastExpr,
CXXReinterpretCastExpr, and CXXConstCastExpr to

Also, fixed returned-stack-addr.cpp, which broke once when we fixed
reinterpret_cast to diagnose double->int* conversions and again when
we eliminated implicit conversions to reference types. The fix is in
both testcase and SemaChecking.cpp.

Most of this patch is simply support for the renaming. There's very
little actual change in semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
b30de271f6b6d2c9ae2a28dcb0caa6b2d9df0cd5 27-Oct-2008 Ted Kremenek <kremenek@apple.com> - Move ExprIterator to Stmt.h so that it can be used by classes defined in Stmt.h
- Implement child_begin() and child_end() for AsmStmt. Previously these had stub implementations that did not iterate over the input/output operands of an inline assembly statement.
- Use ExprIterator for performing iteration over input/output operands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
ce2fc3a343ea6098a96d587071cee7299f11957a 27-Oct-2008 Ted Kremenek <kremenek@apple.com> - Move ExprIterator to Stmt.h so that it can be used by classes defined in Stmt.h
- Implement child_begin() and child_end() for AsmStmt. Previously these had stub implementations that did not iterate over the input/output operands of an inline assembly statement.
- Use ExprIterator for performing iteration over input/output operands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
d7663461a1968b2dae8ab42fda85ec945586e32d 27-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Use ASTContext::getCanonicalType() to get TypedRegion's type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
e70559fd25bfd1970a82086c5f99cf9ef181b1ae 27-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Use ASTContext::getCanonicalType() to get TypedRegion's type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
1a563daf4c20963562719e31a11b7a036e89ad33 27-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> An ElementRegion is really a typed region. Its super region's type has to be ArrayType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
27b57063d83b00474d7563fb5d608544e2364862 27-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> An ElementRegion is really a typed region. Its super region's type has to be ArrayType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
0cbb9ec64186b92a11090099734cb00ebbba427d 27-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> When destroying a translation unit, deallocate its owned declarations in reverse order, because there may be dependencies among the declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3dda64ec0fad2fa60d882565d135ff598897fa9d 27-Oct-2008 Douglas Gregor <dgregor@apple.com> When destroying a translation unit, deallocate its owned declarations in reverse order, because there may be dependencies among the declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7a4864e85cd4f336dc2bd183fb058e44d304d628 27-Oct-2008 Chris Lattner <sabre@nondot.org> Rename Characteristic_t to CharacteristicKind



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Lex/PPCallbacks.h
9d72851fec9e9c62570a027d42701562bbf29751 27-Oct-2008 Chris Lattner <sabre@nondot.org> Rename Characteristic_t to CharacteristicKind



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Lex/PPCallbacks.h
a91779856a91fbf663a69164a583fdf0e6d73c0e 27-Oct-2008 Chris Lattner <sabre@nondot.org> make codegen reject initializes with designators, like this:

t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
^~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Designator.h
be20bb558cae5352898e6a913e29d24d20134841 27-Oct-2008 Chris Lattner <sabre@nondot.org> make codegen reject initializes with designators, like this:

t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
^~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Designator.h
71ca8c805be13bcbd3b95f2452f6a75fe442e2e4 27-Oct-2008 Chris Lattner <sabre@nondot.org> Remember whether an initlist had a designator in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
418f6c7d142e5ff4607f70cd8431d008442bafe9 27-Oct-2008 Chris Lattner <sabre@nondot.org> Remember whether an initlist had a designator in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ce236e7048fef8339d64e68b5729bbeaff4c0543 27-Oct-2008 Chris Lattner <sabre@nondot.org> pass designators into sema. This completes parser-level designator
support as far as I know.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Designator.h
220ad7c8d1adc23799e480faf189332f1eb032e6 27-Oct-2008 Chris Lattner <sabre@nondot.org> pass designators into sema. This completes parser-level designator
support as far as I know.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Designator.h
245d36da61d6608a4460c0c0d2c3eba42fabce00 27-Oct-2008 Chris Lattner <sabre@nondot.org> add some simple designator testcases. Reject things like this:

struct foo Y[10] = {
[4] .arr [2] 4 // expected-error {{expected '=' or another designator}}
};

because the "missing equals" extension only is valid if there
is exactly one array designator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Designator.h
79ed6b5902ed92175b70ed3c4d7b3f239af847ce 27-Oct-2008 Chris Lattner <sabre@nondot.org> add some simple designator testcases. Reject things like this:

struct foo Y[10] = {
[4] .arr [2] 4 // expected-error {{expected '=' or another designator}}
};

because the "missing equals" extension only is valid if there
is exactly one array designator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Designator.h
1aee232dcb1196f7afb7141e172cbf6882da8d27 26-Oct-2008 Chris Lattner <sabre@nondot.org> improve comments, build a Designation for field designators and
improve diagnostic for a malformed field designator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0a68b9449136b0d5664bfa48a51a0c1181d2eca8 26-Oct-2008 Chris Lattner <sabre@nondot.org> improve comments, build a Designation for field designators and
improve diagnostic for a malformed field designator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
70e9a09b08b7bc080537c13745be76a9dbeb0929 26-Oct-2008 Chris Lattner <sabre@nondot.org> inline the decision logic that chooses between an assign expr and brace
initializer, avoiding an extra level of calls for silly things like
'int x = 4'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0eec2b58678f71af6b5fcf4c439290c0d640546b 26-Oct-2008 Chris Lattner <sabre@nondot.org> inline the decision logic that chooses between an assign expr and brace
initializer, avoiding an extra level of calls for silly things like
'int x = 4'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bc9e95d075f270b0611f8630e8f54e11ac38e2d4 26-Oct-2008 Chris Lattner <sabre@nondot.org> This patch continues parser-level implementation of designators:

1. It introduces new parser level abstractions for designators
that are used to communicate between parser and sema.
2. This fixes a FIXME where "identifier ':'" was considered to be
a designator even if it wasn't the first in a designator list.
3. In the "identifier ':'" case, it actually builds the designator
representation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58205 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Parser.h
eccc53a0a0ed1abc7bb4c04ed9566ce0c5c63140 26-Oct-2008 Chris Lattner <sabre@nondot.org> This patch continues parser-level implementation of designators:

1. It introduces new parser level abstractions for designators
that are used to communicate between parser and sema.
2. This fixes a FIXME where "identifier ':'" was considered to be
a designator even if it wasn't the first in a designator list.
3. In the "identifier ':'" case, it actually builds the designator
representation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58205 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Designator.h
lang/Parse/Parser.h
65b99647ba0ef8d52e01f14eb9a9e9e6ca2b0be6 26-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call.
-Remove the default argument.
-Update all call sites of ASTContext::getFunctionType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7fb5e4888221cd36652d078c6b171ac55e7f406d 26-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call.
-Remove the default argument.
-Update all call sites of ASTContext::getFunctionType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7ac59b1411530b362a7aec76fec90f2631090e54 26-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Remove loc::StringLiteralVal. Now we allocate regions for string literals in the Store.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
197fa58ab40e3fee2137715e96d9bb1c59340837 26-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Remove loc::StringLiteralVal. Now we allocate regions for string literals in the Store.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58182 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
2abba44f756fd8482cd0a2c7725e3c0743f55f98 25-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add code for get the lvalue for string literals. Now we return a StringRegion
for StringLiteral lvalue evaluation, instead of directly returning a
loc::StringLiteralVal by the Environment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
143bf82ac5afba0757e6817a2c2bb970c20b32d3 25-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add code for get the lvalue for string literals. Now we return a StringRegion
for StringLiteral lvalue evaluation, instead of directly returning a
loc::StringLiteralVal by the Environment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
73507bdc9f40d4dcb0bf5a82b43ab760b0f1bc35 25-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add StringRegion to MemRegions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
e9f4e5420895a75dd788e9891921e7781c1823b9 25-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add StringRegion to MemRegions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
4b269b4f8fe1509a5d9a92bc02b1b8b503fcd2fd 24-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> -Add support for cv-qualifiers after function declarators.
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
971c4fae6092976338b755af1d47dac07c8f16e3 24-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Add support for cv-qualifiers after function declarators.
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58120 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclCXX.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
73a36c92ceb8699205371fd680e9d16ec779d4b7 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Added method "getSelfRegion" to Store. This method returns the region associated with the "this" or "self" object (C++ and Objective-C respectively).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
9deb0e35dea0f82691fadb60b61f45887ba67aba 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Added method "getSelfRegion" to Store. This method returns the region associated with the "this" or "self" object (C++ and Objective-C respectively).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
2539c1197daf24dd5b416be58fb78a3aea7e126d 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Added region ObjCObjectRegion that represents an instance of an Objective-C object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
a7f1b9e8804012ed8df25d93f5a06cb26c9bbd2b 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Added region ObjCObjectRegion that represents an instance of an Objective-C object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
5424cecfd5c51a88d721b3587a7fa3981ec1c34b 24-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Move viewInheritance to CXXRecordDecl, and make sure it builds in Release mode, too

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
1f81230ac57b9bda8bba9c8221652842ca786132 24-Oct-2008 Douglas Gregor <dgregor@apple.com> Move viewInheritance to CXXRecordDecl, and make sure it builds in Release mode, too

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/AST/Type.h
55c645a12b73cabf6b8e19fbe8b3b3375f06d6e4 24-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Make QualTypeOrdering::operator() const

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeOrdering.h
2b9d973eb749aee6becbcf5e51ab5d49b828c978 24-Oct-2008 Douglas Gregor <dgregor@apple.com> Make QualTypeOrdering::operator() const

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TypeOrdering.h
f8e927072b3546982af4f01dad1354bf67715221 24-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2f639b9f3c6b081f076d2ac6d75115ce44bfa249 24-Oct-2008 Douglas Gregor <dgregor@apple.com> Semantic analysis for C++ reinterpret_cast and const_cast. Patch by Sebastian Redl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
dd9fe5eec432618dc0db25309a1b74a2c75b83e3 24-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> The Decl of an array region can be VarDecl or FieldDecl. Handle this in RegionStoreManager::ArrayToPointer().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
bfb6582ef46dfb33672d9621f879fc262339d704 24-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> The Decl of an array region can be VarDecl or FieldDecl. Handle this in RegionStoreManager::ArrayToPointer().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58086 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
74a4e3a8060482f5f5951660da58d98af8b3f945 24-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add printing method to ElementRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
b21ff77c8126ea628b66d2ffb931fdaa7884f5d2 24-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add printing method to ElementRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
c44f5565fa03e2a99754017a24bcfc4fe98051d5 24-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add printing with llvm::raw_ostream methods to SVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
9012bff2ce5afc85936315662d675f2bcede1ca2 24-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add printing with llvm::raw_ostream methods to SVals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SVals.h
bb461503b115af248f3b13735d6936e0a436fdf0 24-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> First non-embarrassing cut at checking for ambiguous derived-to-base
conversions.

Added PerformImplicitConversion, which follows an implicit conversion sequence
computed by TryCopyInitialization and actually performs the implicit
conversions, including the extra check for ambiguity mentioned above.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
94b1dd2368dc9eeedf2794db654deae225fac763 24-Oct-2008 Douglas Gregor <dgregor@apple.com> First non-embarrassing cut at checking for ambiguous derived-to-base
conversions.

Added PerformImplicitConversion, which follows an implicit conversion sequence
computed by TryCopyInitialization and actually performs the implicit
conversions, including the extra check for ambiguity mentioned above.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c380399f4a91433fce822bb448e68e8aea0b153e 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Make the analyzer store (memory model) a command line option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/Store.h
95c7b00fe857a61a19185483aa0d85492ec9e258 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Make the analyzer store (memory model) a command line option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58056 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/Store.h
6eb489ef92bad10bc25072c489d03d0dc0879ccd 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Added iterators for types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e22d911dcff7a9c18b583817b7319c07600fd3ee 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Added iterators for types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4fd8590cbf5384f935b3e1bae8dfe1f97715dae9 23-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Clean up and document the representation of C++ base classes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
57c856b96e6bbfc64c2d61b950b116b523dc3e46 23-Oct-2008 Douglas Gregor <dgregor@apple.com> Clean up and document the representation of C++ base classes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
aa7a06602a22e54cdc56201d11de398dfbc46ac8 23-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add -O[0-3s] support (following llvm-gcc).
- Passes match llvm-gcc but many of the switches aren't wired.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
70f92436f5828c11ef108463da4473d44e114c28 23-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add -O[0-3s] support (following llvm-gcc).
- Passes match llvm-gcc but many of the switches aren't wired.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/CompileOptions.h
a9e8e08c02489ead52b51bb8a50d2eb374ebc161 23-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Let StoreManager do different cast on arrays. BasicStore will just keep it intact.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
e1911afd2a79cb508bc81b30be49a0c8648a81b0 23-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Let StoreManager do different cast on arrays. BasicStore will just keep it intact.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
b4efe82c037117b00b4fd9ae8df99fcc136e7dc4 23-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Added a method to ElementRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
6e78e1b22f3b16bb2ef76950b9b75f060bdba7bf 23-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Added a method to ElementRegion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
0590402476a996b3c2081fd197b0e2055e387c23 22-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Added GraphViz visualization of C++ inheritance hierarchies.

Factored the QualTypeOrdering predicate into its own header
(TypeOrdering.h), now that it is used in two places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeOrdering.h
0218936235b137bbdcd29a6c36d61d9215bb4edd 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Added GraphViz visualization of C++ inheritance hierarchies.

Factored the QualTypeOrdering predicate into its own header
(TypeOrdering.h), now that it is used in two places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/AST/TypeOrdering.h
abed217d6877aebfd733754adab35d83996b2135 22-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Add representation of base classes in the AST, and verify that we
don't have duplicated direct base classes.

Seriliazation of base class specifiers is not yet implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
f8268ae3196002bbab6adb830302e79b0f368f13 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Add representation of base classes in the AST, and verify that we
don't have duplicated direct base classes.

Seriliazation of base class specifiers is not yet implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
4459bbe1ad110c100d74af8c74fdc82d87317dfe 22-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we
aren't trying to compare with address-space qualifiers (for now).

Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part
of the check into a static DeclCanBeLvalue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ba7e210a999275695f58be03ef402758cfec3635 22-Oct-2008 Douglas Gregor <dgregor@apple.com> QualType::isMoreQualifiedThan and isAtLeastAsQualifiedAs assert that we
aren't trying to compare with address-space qualifiers (for now).

Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part
of the check into a static DeclCanBeLvalue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
60dabc6eda88a6b6c2c2017632d81656e1ada27b 22-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Adjust parameter order to more natural one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
c92e5feb73a99e0e44d00c3ce0275d32bc56d7c6 22-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Adjust parameter order to more natural one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
3fb675ab045253ffe2f1b333e9f8e746b50abeb4 22-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e0a5d5fe8eab573f7764bf6d2ddb02bee8dceaf9 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Move Sema::GetNonReferenceType to QualType::getNonReferenceType and make it inline

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e5db4f7d7b6dc33259ee0248d73dd3794cd0a841 22-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9b6e2d209cc2931a9bb2ae51e744a8698b54db73 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6573cfd6fc32eab0b696cfc318bb21f4e3933f35 22-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Initial step toward supporting qualification conversions (C++ 4.4).

Changes:
- Sema::IsQualificationConversion determines whether we have a qualification
conversion.
- Sema::CheckSingleAssignment constraints now follows the C++ rules in C++,
performing an implicit conversion from the right-hand side to the type of
the left-hand side rather than checking based on the C notion of
"compatibility". We now rely on the implicit-conversion code to
determine whether the conversion can happen or
not. Sema::TryCopyInitialization has an ugly reference-related
hack to cope with the initialization of references, for now.
- When building DeclRefExprs, strip away the reference type, since
there are no expressions whose type is a reference. We'll need to
do this throughout Sema.
- Expr::isLvalue now permits functions to be lvalues in C++ (but not
in C).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
98cd599ee8a9b259ed7388ee2921a20d97658864 22-Oct-2008 Douglas Gregor <dgregor@apple.com> Initial step toward supporting qualification conversions (C++ 4.4).

Changes:
- Sema::IsQualificationConversion determines whether we have a qualification
conversion.
- Sema::CheckSingleAssignment constraints now follows the C++ rules in C++,
performing an implicit conversion from the right-hand side to the type of
the left-hand side rather than checking based on the C notion of
"compatibility". We now rely on the implicit-conversion code to
determine whether the conversion can happen or
not. Sema::TryCopyInitialization has an ugly reference-related
hack to cope with the initialization of references, for now.
- When building DeclRefExprs, strip away the reference type, since
there are no expressions whose type is a reference. We'll need to
do this throughout Sema.
- Expr::isLvalue now permits functions to be lvalues in C++ (but not
in C).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
984c240798d5b6df02aedb4524c27670752f3264 21-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add GetModule accessor to ModuleBuilder


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
d8c0ea1a80f27045c5371f6f97eadb38e8ca4279 21-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add GetModule accessor to ModuleBuilder


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
d2baafd07bc5c7679a6f1f10e5587a95842ffa15 21-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Preliminary support for function overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/Expr.h
lang/AST/Type.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Basic/DiagnosticKinds.def
8e9bebdea69c590dedfbf27374114cb76fe12fbd 21-Oct-2008 Douglas Gregor <dgregor@apple.com> Preliminary support for function overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/Expr.h
lang/AST/Type.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Basic/DiagnosticKinds.def
7324932125477fe52f069ebaf3f05af23920053b 21-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Modify Store interface: GetSVal/SetSVal => Retrieve/Bind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
8485ec6a1d7d7f25ea680ea3740bc1a11d2bb7cd 21-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Modify Store interface: GetSVal/SetSVal => Retrieve/Bind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
abdafb71b8aae7d33245d8215197bbba2d6c9890 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Add partial specialization of ImmutableList for GRStatePartialTrait.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
65e5e4054bdce29917995cb31934e96af62263b9 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Add partial specialization of ImmutableList for GRStatePartialTrait.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
aa0815711092e749a8bdb71d7254e8f33c6967d0 21-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Rename:
RValues.h/cpp => SVals.h/cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
22ab7a4d900ed53285fd0b6720e7b43af84724d8 21-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Rename:
RValues.h/cpp => SVals.h/cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57893 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SVals.h
lang/Analysis/PathSensitive/Store.h
5496973f51e70aab76cb099265e572484f577ff4 21-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add ElementRegion to represent memory chunks for array elements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
511191ce8920160525611be2be754c32a0724c3e 21-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add ElementRegion to represent memory chunks for array elements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
431f35b392daee77b8f0a6537f6093523d850cc2 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Add fileid_iterator to SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
8673ae73569d3417854527cebfe95b4c3e37d311 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Add fileid_iterator to SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2a884fa22911f2aaa6630f18ed2202cbd16f2206 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Added method to access the raw flags of Token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
ef3b215c946d4813408b5fe872fe2baa3b246b00 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Added method to access the raw flags of Token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
200e4e757f27a8d4b84689f2fcb564af43c0509b 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Change signature for CheckDivideZero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
dda0468b5aad99a59bd251a1b15c5cfd0243c041 21-Oct-2008 Ted Kremenek <kremenek@apple.com> Change signature for CheckDivideZero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
f54dbeaeb4ab704d2bfaaed979d8f3d82f4f6400 20-Oct-2008 Chris Lattner <sabre@nondot.org> eliminate ObjCPropertyAttrs an corresponding enums, just use
strcmp when needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5fd80fada1eeecd279af8333a7f58b86d8df8016 20-Oct-2008 Chris Lattner <sabre@nondot.org> eliminate ObjCPropertyAttrs an corresponding enums, just use
strcmp when needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
727fb1fb678c22b036fc7c42794e90203ff23c44 20-Oct-2008 Chris Lattner <sabre@nondot.org> reject properties completely in objc1 instead of emitting
weird errors about property attributes being unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f6ed85533583dae18a44ddc4be6cfc4d68749e36 20-Oct-2008 Chris Lattner <sabre@nondot.org> reject properties completely in objc1 instead of emitting
weird errors about property attributes being unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57812 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1e5cc7256b66ac6b20cb86772cffc0b433b50af9 20-Oct-2008 Chris Lattner <sabre@nondot.org> More property attribute recovery improvements. Instead of this:

crash.m:8:12: error: type name requires a specifier or qualifier
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:29: error: expected ';' at end of declaration list
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:39: error: expected identifier or '('
@property (readonlyx, getter=isAwesome) int _awesome;
^

we now get:

crash.m:8:12: error: unknown property attribute 'readonlyx'
@property (readonlyx, getter=isAwesome) int _awesome;
^

Also, we can eliminate isObjCPropertyAttribute now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
cd9f4b31c4fe5b77b5519cc17b4583fab912bad1 20-Oct-2008 Chris Lattner <sabre@nondot.org> More property attribute recovery improvements. Instead of this:

crash.m:8:12: error: type name requires a specifier or qualifier
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:29: error: expected ';' at end of declaration list
@property (readonlyx, getter=isAwesome) int _awesome;
^
crash.m:8:39: error: expected identifier or '('
@property (readonlyx, getter=isAwesome) int _awesome;
^

we now get:

crash.m:8:12: error: unknown property attribute 'readonlyx'
@property (readonlyx, getter=isAwesome) int _awesome;
^

Also, we can eliminate isObjCPropertyAttribute now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
bf16a9703e59db12a7fdd48e9499c21ca8fb93c2 20-Oct-2008 Chris Lattner <sabre@nondot.org> fix a crash on unnamed properties like:
@property (readonly) int : 4;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
da3253d8a97981257185c89ced71ce137278b121 20-Oct-2008 Chris Lattner <sabre@nondot.org> fix a crash on unnamed properties like:
@property (readonly) int : 4;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a40577ebc04df66cbd7a7da3c24ab532f076109b 20-Oct-2008 Chris Lattner <sabre@nondot.org> refactor a bunch of code:
Check for @end in ParseObjCInterfaceDeclList instead of in each caller
Handle @required and @optional with the same code

Add some fixmes about some apparently objc2 code that is being accepted
in objc1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bc662afa1cb9b61cb1e7808bb1463dd6291b8095 20-Oct-2008 Chris Lattner <sabre@nondot.org> refactor a bunch of code:
Check for @end in ParseObjCInterfaceDeclList instead of in each caller
Handle @required and @optional with the same code

Add some fixmes about some apparently objc2 code that is being accepted
in objc1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
926cf54ff4c3b7b0d0567a533d219ccf70b6967a 20-Oct-2008 Chris Lattner <sabre@nondot.org> Support attributes in *yet another* place. Is there any place you
can't stick an attributes?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
aab740af64daaa8d94d34789a6ea7e2d2fc5ab39 20-Oct-2008 Chris Lattner <sabre@nondot.org> Support attributes in *yet another* place. Is there any place you
can't stick an attributes?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
1f18529f0932ff19154dabaf3ae2c7ad2d8f25a8 20-Oct-2008 Chris Lattner <sabre@nondot.org> Fix a parser bug where we let attributes interfere with our disambiguation
of whether a '(' was a grouping paren or the start of a function declarator.
This is PR2796.

Now we eat the attribute before deciding whether the paren is grouping or
not, then apply it to the resultant decl or to the first argument as needed.

One somewhat surprising aspect of this is that attributes interact with
implicit int in cases like this:

void a(x, y) // k&r style function
void b(__attribute__(()) x, y); // function with two implicit int arguments
void c(x, __attribute__(()) y); // error, can't have attr in identifier list.

Fun stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
7399ee0aa6ffaeab0a8f83408b1c5127fb2bf5b8 20-Oct-2008 Chris Lattner <sabre@nondot.org> Fix a parser bug where we let attributes interfere with our disambiguation
of whether a '(' was a grouping paren or the start of a function declarator.
This is PR2796.

Now we eat the attribute before deciding whether the paren is grouping or
not, then apply it to the resultant decl or to the first argument as needed.

One somewhat surprising aspect of this is that attributes interact with
implicit int in cases like this:

void a(x, y) // k&r style function
void b(__attribute__(()) x, y); // function with two implicit int arguments
void c(x, __attribute__(()) y); // error, can't have attr in identifier list.

Fun stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
3cbc064cf343c2151488b7822430ed327ade176e 19-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Change a couple of cast<> to reinterpret_cast<>.
The casts<> require that "Decl.h" is included before "Type.h", use reinterpret_cast<> to remove that kind of dependency.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
509447e7cb9c24a9f2bd149fe95030050b088622 19-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change a couple of cast<> to reinterpret_cast<>.
The casts<> require that "Decl.h" is included before "Type.h", use reinterpret_cast<> to remove that kind of dependency.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57781 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
651c8992e44a15660eb488bbc00286da7751b9c2 18-Oct-2008 Mon P Wang <wangmp@apple.com> Make llvm memory barrier available as an intrinsic


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
7ae48ee2fb80b0a3ac6ad912b465a077c7591a19 18-Oct-2008 Mon P Wang <wangmp@apple.com> Make llvm memory barrier available as an intrinsic


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
d7b7f0353b359a3cb156ec4202a23064d012ded7 18-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Just do a diagIfAmbiguous -> warnIfAmbiguous rename.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e75d849d9141d8e47d05a91b7b5c04194854e47a 18-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Just do a diagIfAmbiguous -> warnIfAmbiguous rename.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
dea0c6b9ca760a24b78f676b9bf2ec91cc287656 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Add pretty-printing support for FieldRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
4bd1eefd48c70ebef185e524d0484c00f16000cf 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Add pretty-printing support for FieldRegions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
1dea8edc26436e3db1a477f3edf277b14bd76ceb 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Fixed an elusive caching bug in ExplodedGraph construction when a PostStmtKind was used instead of a PostStoreKind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
bf4e419d996bf42e4933cada610d973a0fcc40eb 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Fixed an elusive caching bug in ExplodedGraph construction when a PostStmtKind was used instead of a PostStoreKind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
38a4b4b9e0a21a3a37bf698dba6536eaeba2b6a7 17-Oct-2008 Ted Kremenek <kremenek@apple.com> - constify some uses of MemRegion* (MemRegion should be immutable).
- Added new region "SymbolicRegion", which maps symbol values to the region domain.
- Enhanced BasicStore::getFieldLValue() to return a FieldRegion (using SymbolicRegion)
- Added some utility methods to GRState for fetch svals from the store.
- Fixed regression in CheckNSError (we weren't getting the value bound to the parameter)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
993f1c72913417be7c534ec7a634363cdfc84fa5 17-Oct-2008 Ted Kremenek <kremenek@apple.com> - constify some uses of MemRegion* (MemRegion should be immutable).
- Added new region "SymbolicRegion", which maps symbol values to the region domain.
- Enhanced BasicStore::getFieldLValue() to return a FieldRegion (using SymbolicRegion)
- Added some utility methods to GRState for fetch svals from the store.
- Fixed regression in CheckNSError (we weren't getting the value bound to the parameter)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
c9197cd41f5bf5a11f9346a8d7118d4267941e98 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0d504c1da852e58ff802545c823ecff3b6c654b8 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
aa01a1079f4b240de74ede930c98200c356bce27 17-Oct-2008 Mon P Wang <wangmp@apple.com> Fixed vec_set_v2di signature


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
6d5e211fc5b324cc8847f4d791db2c773ef4791a 17-Oct-2008 Mon P Wang <wangmp@apple.com> Fixed vec_set_v2di signature


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
aa913104830f5f2d384ca13dedcc81d76fd195d1 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> More Obj-C type encoding improvements.
- Encode unions and bit-fields correctly.
- Accept option to name record fields (used for NeXT runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d96b35bc6becf8db00d140c11e3d0e53f27567a1 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> More Obj-C type encoding improvements.
- Encode unions and bit-fields correctly.
- Accept option to name record fields (used for NeXT runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f8cfe56176a753fa2dc68a3c996fa3e70f87f89b 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix bug in Obj-C type encoding for structures.
- Mechanism for detecting if a structure should be expanded wasn't
reliable. Simplified by just keeping track of what we should be
expanding.

- This fixes a bug in using NSInvocation to invoke a method which
returned a structure, which in used by Key Value Observing, which
in the end, caused a miscompile in poor little Sketch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
82a6cfbc421cc99c5b7313271f399f7ef95056ec 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix bug in Obj-C type encoding for structures.
- Mechanism for detecting if a structure should be expanded wasn't
reliable. Simplified by just keeping track of what we should be
expanding.

- This fixes a bug in using NSInvocation to invoke a method which
returned a structure, which in used by Key Value Observing, which
in the end, caused a miscompile in poor little Sketch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57675 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
097fc9825853bc6113df535d6117ccf9d7463e79 17-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> This patch did the following renaming. There should be no functional changes.
RVal => SVal
LVal => Loc
NonLVal => NonLoc
lval => loc
nonlval => nonloc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
1c96b24285d05c0eac455ae96d7c9ff43d42bc96 17-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> This patch did the following renaming. There should be no functional changes.
RVal => SVal
LVal => Loc
NonLVal => NonLoc
lval => loc
nonlval => nonloc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/SymbolManager.h
6eaf0e3444836f2dfa9a2f014ae6a97dd620a469 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Remove lval::FieldOffset, lval::ArrayOffset. These will be replaced with regions.
Remove GRExprEngine::getLVal and RValues::MakeVal.
Enhance StoreManager "GetLValue" methods to dispatch for specific kinds of lvalue queries, as opposed to interogating the expression tree (GRExprEngine already does this).

Added FIXMEs. In particular, we no longer "assume" that a base pointer in a field/array access is null (this logic was removed). Perhaps we should do this when fetching the lvalue for fields and array elements?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
d9bc33efa195114d6f2a365c26e5b8dba4e1cc38 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Remove lval::FieldOffset, lval::ArrayOffset. These will be replaced with regions.
Remove GRExprEngine::getLVal and RValues::MakeVal.
Enhance StoreManager "GetLValue" methods to dispatch for specific kinds of lvalue queries, as opposed to interogating the expression tree (GRExprEngine already does this).

Added FIXMEs. In particular, we no longer "assume" that a base pointer in a field/array access is null (this logic was removed). Perhaps we should do this when fetching the lvalue for fields and array elements?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57657 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
e7b0b27754187a45918beb43d002169a8970774f 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Add transfer function support for ObjCIvarRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
97ed4f68f5dba3e21e7a490ef0f9ffd3bfead7f8 17-Oct-2008 Ted Kremenek <kremenek@apple.com> Add transfer function support for ObjCIvarRefExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
4efeddefd705b406174cb2d0b24ef3acbef604a1 16-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add --disable-free flag to clang.
- Disables the freeing of the ASTContext and the TranslationUnit
after parsing & sema.
- Primarily for timing the impact on -fsyntax-only timings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
d3db40151868df39b14d2ef8ffacf19e8c36331f 16-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add --disable-free flag to clang.
- Disables the freeing of the ASTContext and the TranslationUnit
after parsing & sema.
- Primarily for timing the impact on -fsyntax-only timings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
44e00b01c9185deeb05c479c186c824d714efd08 16-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> This is the first step to build a better evaluation model for GRExprEngine. A
new VisitLValue method is added to replace the old VisitLVal. The semantics
model becomes more explicit to separate rvalue evaluation from lvalue
evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
6d69b5d82281992e981caa9bc038e3f6cac6594a 16-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> This is the first step to build a better evaluation model for GRExprEngine. A
new VisitLValue method is added to replace the old VisitLVal. The semantics
model becomes more explicit to separate rvalue evaluation from lvalue
evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
2cb762f6d2cfb32f10a6f58261071287b8ee2145 16-Oct-2008 Daniel Dunbar <daniel@zuster.org> Implement #pragma pack use in structure packing. The general approach
is to encode the state of the #pragma pack stack as an attribute when
the structure is declared.

- Extend PackedAttr to take an alignment (in bits), and reuse for
both __attribute__((packed)) (which takes no argument, instead
packing tightly (to "minimize the memory required") and for #pragma
pack (which allows specification of the maximum alignment in
bytes). __attribute__((packed)) is just encoded as Alignment=1.

This conflates two related but different mechanisms, but it didn't
seem worth another attribute.

- I have attempted to follow the MSVC semantics as opposed to the gcc
ones, since if I understand correctly #pragma pack originated with
MSVC. The semantics are generally equivalent except when the stack
is altered during the definition of a structure; its not clear if
anyone does this in practice. See testcase if curious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/RecordLayout.h
3b0db908ebd07eaa26bc90deba5e826de00fe515 16-Oct-2008 Daniel Dunbar <daniel@zuster.org> Implement #pragma pack use in structure packing. The general approach
is to encode the state of the #pragma pack stack as an attribute when
the structure is declared.

- Extend PackedAttr to take an alignment (in bits), and reuse for
both __attribute__((packed)) (which takes no argument, instead
packing tightly (to "minimize the memory required") and for #pragma
pack (which allows specification of the maximum alignment in
bytes). __attribute__((packed)) is just encoded as Alignment=1.

This conflates two related but different mechanisms, but it didn't
seem worth another attribute.

- I have attempted to follow the MSVC semantics as opposed to the gcc
ones, since if I understand correctly #pragma pack originated with
MSVC. The semantics are generally equivalent except when the stack
is altered during the definition of a structure; its not clear if
anyone does this in practice. See testcase if curious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/RecordLayout.h
e7ae0cbc3d28a4a8811be64446fd86fbc8167fb3 16-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Issue a warning when there's an ambiguous function declarator (that could be a direct initializer for a variable defition).
Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
259b0d91f2ff90d8daf39221fe133bf1596c5ffb 16-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Issue a warning when there's an ambiguous function declarator (that could be a direct initializer for a variable defition).
Idea originated from here: http://thread.gmane.org/gmane.comp.gcc.devel/101524

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
90aac829afd73afcf4c4b5f856c30d354c3a6ee0 15-Oct-2008 Daniel Dunbar <daniel@zuster.org> Use BatchEmitOwnedPtrs for writing multiple child exprs, per review.

Also added serialization support to OverloadExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
20c77e995d5f1bad8fc59fe9e1883a563d94f535 15-Oct-2008 Daniel Dunbar <daniel@zuster.org> Use BatchEmitOwnedPtrs for writing multiple child exprs, per review.

Also added serialization support to OverloadExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9e43be159355338a5eba1d251a961af58ed77da1 15-Oct-2008 Mon P Wang <wangmp@apple.com> Added pinsrd, pinsrq, and some other vector intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
bc4f4030e245e36642f894d848f6a8bf94426cc2 15-Oct-2008 Mon P Wang <wangmp@apple.com> Added pinsrd, pinsrq, and some other vector intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
2538a8c428063cdaa8780040de96b93a68690528 15-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Simplify handling of struct/union/class tags.
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
35bc0821c4f80041724cd4c5c4889b2581546a41 15-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify handling of struct/union/class tags.
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
1960843aeea8f4f1ef624c613a8424898dc66af9 15-Oct-2008 Steve Naroff <snaroff@apple.com> Downgrade incompatibilities with objc qualified types (e.g. id <P>) to warnings.
Note: One day, we should consider moving the actual diags to ObjCQualifiedIdTypesAreCompatible(), since it has more information on the actual problem. GCC currently emits slightly more instructive errors for some cases involving protocols. I added a FIXME to the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
395790772565002c0ac03f2c8de9b0a6c7adcaf3 15-Oct-2008 Steve Naroff <snaroff@apple.com> Downgrade incompatibilities with objc qualified types (e.g. id <P>) to warnings.
Note: One day, we should consider moving the actual diags to ObjCQualifiedIdTypesAreCompatible(), since it has more information on the actual problem. GCC currently emits slightly more instructive errors for some cases involving protocols. I added a FIXME to the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2f62d14fdc31805cc0036331d8ce6c4892ecd5db 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix const qualifiers on ProtocolQualifierListTy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
d7e6221878cb42c1a95a281f5084fcd097b0526e 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix const qualifiers on ProtocolQualifierListTy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
aad6364ca32ed23d8577789141c08198b43f8c94 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add serialization support in several missing places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
d17c24ff8597fe0dee4210639d225bc4f7c5ac04 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add serialization support in several missing places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
9c7fd1e1ad0ec0c483560c9a9daeda23c3772055 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Move Type::EmitImpl into header, add FIXME to make abstract.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
708ef456a182030de3cf20ad98e653d2741ecb13 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Move Type::EmitImpl into header, add FIXME to make abstract.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
81c7d47fa10554e60d4061e22523ae1d7b2cc5ec 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Sema implementation of #pragma pack stack.
- Follows the MSVC (original) implementation, including support of
pack(show) (useful for testing).
- Implements support for named pack records which gcc seems to
ignore (or implements incorrectly).
- Not currently wired to anything, only functionality change is the
type checking of the pragma.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4cde927072a70f3156d72c6431e7a5d95bf62366 14-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Sema implementation of #pragma pack stack.
- Follows the MSVC (original) implementation, including support of
pack(show) (useful for testing).
- Implements support for named pack records which gcc seems to
ignore (or implements incorrectly).
- Not currently wired to anything, only functionality change is the
type checking of the pragma.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
32af58ce89a59dfc9520412338b84b5be78d2246 12-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> More const-ness goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
e2ed203b437c14de57a80d69b70164819d045d86 12-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> More const-ness goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
6bbe3d73033db1f0969e6ccfcd83af6c8cd9ccd1 12-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Improve the const-ness of a few methods.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
d2595ecce5f8350e485c83bfe767549a522b2802 12-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve the const-ness of a few methods.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
4b662ea886a86f0d8d7725fa3478918e74d42513 12-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement more efficient Decl <-> DeclContext conversions.
When the static type on the Decl side is a subclass of DeclContext the compiler will use a "inlinable" static_cast, instead of always using an out-of-line function call.

Note, though, that the isa<> check still uses an out-of-line function call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
42220c5432c141d47cc8ce786e472b49dc907378 12-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement more efficient Decl <-> DeclContext conversions.
When the static type on the Decl side is a subclass of DeclContext the compiler will use a "inlinable" static_cast, instead of always using an out-of-line function call.

Note, though, that the isa<> check still uses an out-of-line function call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57415 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
lang/AST/DeclObjC.h
33733f5e87da646924b91cff009ce064bd9b2e71 12-Oct-2008 Chris Lattner <sabre@nondot.org> make the -rewrite-test a bit more interesting: it now
wraps comments in <i> tags. Extend rewrite tokens to support
this minimal functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/TokenRewriter.h
99bd46c018ece10d6541a4b6bf0dbe97ad162477 12-Oct-2008 Chris Lattner <sabre@nondot.org> make the -rewrite-test a bit more interesting: it now
wraps comments in <i> tags. Extend rewrite tokens to support
this minimal functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57409 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/TokenRewriter.h
a2812b55e577fc68410c1b7cc0bea25892b9ae9e 12-Oct-2008 Chris Lattner <sabre@nondot.org> start implementing a token rewriter. At this point, it just reads in a file
and lets a client iterate over it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Rewrite/TokenRewriter.h
cff9cc95de367a3aea885a7f8fee304fe2707b92 12-Oct-2008 Chris Lattner <sabre@nondot.org> start implementing a token rewriter. At this point, it just reads in a file
and lets a client iterate over it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Rewrite/TokenRewriter.h
0344cc70b8cc765e29298b28d8a5ff12fe513c4a 12-Oct-2008 Chris Lattner <sabre@nondot.org> Change FormTokenWithChars to take the token kind to form, since all clients
were setting a kind and then forming it. This is just a minor API cleanup,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
9e6293d4dfd688429f77ee3b6edba9dfd7ada3a2 12-Oct-2008 Chris Lattner <sabre@nondot.org> Change FormTokenWithChars to take the token kind to form, since all clients
were setting a kind and then forming it. This is just a minor API cleanup,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
867a87b6ee2bab7cd3fbb015c87e84a12cb10b09 12-Oct-2008 Chris Lattner <sabre@nondot.org> Add a new mode to the lexer which enables it to return all characters,
even whitespace, as tokens from the file. This is enabled with
L->SetKeepWhitespaceMode(true) on a raw lexer. In this mode, you too
can use clang as a really complex version of 'cat' with code like this:

Lexer RawLex(SourceLocation::getFileLoc(SM.getMainFileID(), 0),
PP.getLangOptions(), File.first, File.second);

RawLex.SetKeepWhitespaceMode(true);

Token RawTok;
RawLex.LexFromRawLexer(RawTok);
while (RawTok.isNot(tok::eof)) {
std::cout << PP.getSpelling(RawTok);
RawLex.LexFromRawLexer(RawTok);
}

This will emit exactly the input file, with no canonicalization or other
translation. Realistic clients actually do something with the tokens of
course :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
d88dc48e33d71732708960170e57a3d1bdc8f847 12-Oct-2008 Chris Lattner <sabre@nondot.org> Add a new mode to the lexer which enables it to return all characters,
even whitespace, as tokens from the file. This is enabled with
L->SetKeepWhitespaceMode(true) on a raw lexer. In this mode, you too
can use clang as a really complex version of 'cat' with code like this:

Lexer RawLex(SourceLocation::getFileLoc(SM.getMainFileID(), 0),
PP.getLangOptions(), File.first, File.second);

RawLex.SetKeepWhitespaceMode(true);

Token RawTok;
RawLex.LexFromRawLexer(RawTok);
while (RawTok.isNot(tok::eof)) {
std::cout << PP.getSpelling(RawTok);
RawLex.LexFromRawLexer(RawTok);
}

This will emit exactly the input file, with no canonicalization or other
translation. Realistic clients actually do something with the tokens of
course :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
170adb101610b8f5bbe7e5f917bdb65ba76b53f0 12-Oct-2008 Chris Lattner <sabre@nondot.org> add a new inKeepCommentMode() accessor to abstract the KeepCommentMode
ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
fa95a019da00b926d64ff83358ba73bbc6ae1e37 12-Oct-2008 Chris Lattner <sabre@nondot.org> add a new inKeepCommentMode() accessor to abstract the KeepCommentMode
ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
e5eca95b64a91a6d418089a566179e80839a6ec0 12-Oct-2008 Chris Lattner <sabre@nondot.org> Simplify raw mode lexing by treating an unterminate /**/ comment the
same we we do an unterminated string or character literal. This makes
it so we can guarantee that the lexer never calls into the
preprocessor (which would be suicide for a raw lexer).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Lexer.h
0af574270d3be2b0e73a3379dfaa633746f8fc6f 12-Oct-2008 Chris Lattner <sabre@nondot.org> Simplify raw mode lexing by treating an unterminate /**/ comment the
same we we do an unterminated string or character literal. This makes
it so we can guarantee that the lexer never calls into the
preprocessor (which would be suicide for a raw lexer).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Lexer.h
0b5892ecb01b13c12d53058f305a58eced928939 12-Oct-2008 Chris Lattner <sabre@nondot.org> Change how raw lexers are handled: instead of creating them and then
using LexRawToken, create one and use LexFromRawLexer. This avoids
twiddling the RawLexer flag around and simplifies some code (even
speeding raw lexing up a tiny bit).

This change also improves the token paster to use a Lexer on the stack
instead of new/deleting it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
590f0cc643274267d4d41125b62557e1d87886c3 12-Oct-2008 Chris Lattner <sabre@nondot.org> Change how raw lexers are handled: instead of creating them and then
using LexRawToken, create one and use LexFromRawLexer. This avoids
twiddling the RawLexer flag around and simplifies some code (even
speeding raw lexing up a tiny bit).

This change also improves the token paster to use a Lexer on the stack
instead of new/deleting it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
5205938085c9bb3123b20745be5719d8d3be4b60 10-Oct-2008 Steve Naroff <snaroff@apple.com> Final phase of converting BlockDecls over to DeclContext. This is unfortunately a largish/complex diff, however it was necessry to pass all the current block tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Parse/Action.h
090276f5e164d491a1bb3f541bafdb394f5e6f04 10-Oct-2008 Steve Naroff <snaroff@apple.com> Final phase of converting BlockDecls over to DeclContext. This is unfortunately a largish/complex diff, however it was necessry to pass all the current block tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57337 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Parse/Action.h
95029d906b78b22b378693dbfca6c2b65af0b36f 08-Oct-2008 Steve Naroff <snaroff@apple.com> Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a DeclContext.
This required changes to attach the compound statement later on (like we do for functions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1c90bfcbd7ff5d09694acf50a32dbb716a968b61 08-Oct-2008 Steve Naroff <snaroff@apple.com> Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a DeclContext.
This required changes to attach the compound statement later on (like we do for functions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9ac456d597886216becc2efdd4efb494bf91af68 08-Oct-2008 Steve Naroff <snaroff@apple.com> - Add BlockDecl AST node.
- Modify BlockExpr to reference the BlockDecl.

This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).

Still some follow-up work to finish this (forthcoming).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Expr.h
56ee6896f2efebffb4a2cce5a7610cdf1eddbbbe 08-Oct-2008 Steve Naroff <snaroff@apple.com> - Add BlockDecl AST node.
- Modify BlockExpr to reference the BlockDecl.

This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).

Still some follow-up work to finish this (forthcoming).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Expr.h
79c57f85105b23b1c4513c0b8c4d256b4636a5af 08-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> This is the first step to implement a field-sensitive store model. Other things are simplified: no heap shape assumption, no parameter alias assumption, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57285 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
178927517fa09ddbb04dc8ef725b5716c18aae21 08-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> This is the first step to implement a field-sensitive store model. Other things are simplified: no heap shape assumption, no parameter alias assumption, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57285 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/MemRegion.h
1bc18e6632185ea7b3436f020681b3c1aa33606f 08-Oct-2008 Ted Kremenek <kremenek@apple.com> Migrate DeclStmt over to using a DeclGroup instead of a pointer to a ScopedDecl*.
This also removes the ugly hack needed in CFG.cpp for subclassing DeclStmt to create a DeclStmt with one Decl*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8ffb159441e923322bef6b5dee1aaf24c738d75e 08-Oct-2008 Ted Kremenek <kremenek@apple.com> Migrate DeclStmt over to using a DeclGroup instead of a pointer to a ScopedDecl*.
This also removes the ugly hack needed in CFG.cpp for subclassing DeclStmt to create a DeclStmt with one Decl*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5f593aeed7820242df994a2b4b387337cdbddf97 08-Oct-2008 Ted Kremenek <kremenek@apple.com> Add const_iterator to DeclGroup.
Serialization for OwningDeclGroupRefs now works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
401adfad4af45b083ad067f3ebec5cf23a1e91cf 08-Oct-2008 Ted Kremenek <kremenek@apple.com> Add const_iterator to DeclGroup.
Serialization for OwningDeclGroupRefs now works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
6e3524ffe974f4eaa990c3037e2d6539966d197b 08-Oct-2008 Ted Kremenek <kremenek@apple.com> Add StmtIterator support for DeclGroups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
3e6d1203b3346147cee51a8a6d374f1867f2cd23 08-Oct-2008 Ted Kremenek <kremenek@apple.com> Add StmtIterator support for DeclGroups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
2a59edd31d3372cfab948b7cd645f8350027f172 07-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Migrate MemRegionManager from StateManager to StoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
bc678fdf614d2b66a4358f14a0a072f31b559c5c 07-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Migrate MemRegionManager from StateManager to StoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
1742b05d988c47d35c612928a8ff1f6d9e0c4d73 07-Oct-2008 Ted Kremenek <kremenek@apple.com> Added prototype serialization code for DeclGroup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
c7b07c19daa861880ad4bbf257d0fb2c7961355f 07-Oct-2008 Ted Kremenek <kremenek@apple.com> Added prototype serialization code for DeclGroup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
cf4e8f8873f3eab79a899c22442dd9587259bf2d 07-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Use getCustomDiagID() instead of specifying the diagnostic in the 'DiagnosticKinds.def' file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4021a84eb1634a1e18bb3c258274477e8fdcd861 07-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use getCustomDiagID() instead of specifying the diagnostic in the 'DiagnosticKinds.def' file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57220 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bca33bfeb5bda73ae1cce89e3080f61a926c3d57 07-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Simplify handling of direct initializers by letting Sema::AddInitializerToDecl handle conversions, instead of using Sema::ActOnCXXTypeConstructExpr.
Additional benefit is that diagnostics are the same for both direct-initialization and copy-initialization.

In the case of "int x( expression );":
-The Init expression of VarDecl 'x' will be the expression inside the parentheses.
-VarDecl::hasCXXDirectInitializer for VarDecl 'x' will return true to let clients distinguish from "int x = expression ;".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
ce8e2926d8922bff7dc2661ec9c043dd619dcc82 07-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify handling of direct initializers by letting Sema::AddInitializerToDecl handle conversions, instead of using Sema::ActOnCXXTypeConstructExpr.
Additional benefit is that diagnostics are the same for both direct-initialization and copy-initialization.

In the case of "int x( expression );":
-The Init expression of VarDecl 'x' will be the expression inside the parentheses.
-VarDecl::hasCXXDirectInitializer for VarDecl 'x' will return true to let clients distinguish from "int x = expression ;".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
5c29a5a9408d216d1a7c7d59913f94445a5218e9 07-Oct-2008 Ted Kremenek <kremenek@apple.com> Remove DeclStmt::getDecl(). Now clients of DeclStmt must explicitly reason about a DeclStmt referring to a collection of Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
655137a6c19110620d82d5f03cdcaec3a48c059f 07-Oct-2008 Ted Kremenek <kremenek@apple.com> Remove DeclStmt::getDecl(). Now clients of DeclStmt must explicitly reason about a DeclStmt referring to a collection of Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
80aeb41ddcd4be150410a1cfd0027c2af38cfa6c 07-Oct-2008 Ted Kremenek <kremenek@apple.com> Modified DeclGroupRef to always load/store the internal pointer value as Decl*. This hopefully will obviate any concerns with violating strict type-aliasing issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
e285a9505c0be75d4b58e67aa32e82de55889235 07-Oct-2008 Ted Kremenek <kremenek@apple.com> Modified DeclGroupRef to always load/store the internal pointer value as Decl*. This hopefully will obviate any concerns with violating strict type-aliasing issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
62f23bbf2bced6d2869ed5d9f55236603dcee730 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Add DeclStmt::hasSolitaryDecl() and DeclStmt::getSolitaryDecl()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
65aa3b9fda7b2114f708014e3d42176abc0e39ab 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Add DeclStmt::hasSolitaryDecl() and DeclStmt::getSolitaryDecl()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
6d8f2ef0b6ed5f3ba7d4babdbdd82ef65b5a727a 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon be removed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
4e27b8bb3f59e328e6f6c75104f86e354065438c 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which will soon be removed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57187 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
6af830594002e5eb15afb5e82a5c1e66b81ed793 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Add const_decl_iterator to DecStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8a0d2660b6890ed95d34f37d142c0c52ac490194 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Add const_decl_iterator to DecStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57186 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9e55d46140b05ed4dc7230b86ccf504a9a71985e 06-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement support for C++ direct initializers in declarations, e.g. "int x(1);".

This is how this kind of initializers appear in the AST:
-The Init expression of the VarDecl is a functional type construction (of the VarDecl's type).
-The new VarDecl::hasCXXDirectInitializer() returns true.

e.g, for "int x(1);":
-VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr).
-hasCXXDirectInitializer() of VarDecl 'x' returns true.

A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code.
Note that codegening works now for "int x(1);" without any changes to CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
73a0d889eda0f000a441319e39540509175b8e81 06-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement support for C++ direct initializers in declarations, e.g. "int x(1);".

This is how this kind of initializers appear in the AST:
-The Init expression of the VarDecl is a functional type construction (of the VarDecl's type).
-The new VarDecl::hasCXXDirectInitializer() returns true.

e.g, for "int x(1);":
-VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr).
-hasCXXDirectInitializer() of VarDecl 'x' returns true.

A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code.
Note that codegening works now for "int x(1);" without any changes to CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57178 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
73bd38ec64c21212e122d754524ec6c227db2dfc 06-Oct-2008 Chris Lattner <sabre@nondot.org> Remove the 'C' / isConstantExpr flag on builtins. Code should never
depend on the value of this flag, it should depend on whether
tryEvaluate is able to *actually* fold a builtin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
6b47561af738b33c55c60776c3b095f049902308 06-Oct-2008 Chris Lattner <sabre@nondot.org> Remove the 'C' / isConstantExpr flag on builtins. Code should never
depend on the value of this flag, it should depend on whether
tryEvaluate is able to *actually* fold a builtin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
2d9a3f6124b45c8b9c4094d06696293b64841a23 06-Oct-2008 Chris Lattner <sabre@nondot.org> Add a Expr::isEvaluatable method, eliminate isBuiltinConstantExpr
which is checking for something that can be inconsistent with
what we can constant fold.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
45b6b9d080ac56917337d73d8f1cd6374b27b05d 06-Oct-2008 Chris Lattner <sabre@nondot.org> Add a Expr::isEvaluatable method, eliminate isBuiltinConstantExpr
which is checking for something that can be inconsistent with
what we can constant fold.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57159 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1eee9404f80332537cd2766c31cd05e024128717 06-Oct-2008 Chris Lattner <sabre@nondot.org> Move folding of __builtin_classify_type out of the CallExpr
interface into the constant folding interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a4d55d89c8076b402bb168e3edeef0c2cd2a78c3 06-Oct-2008 Chris Lattner <sabre@nondot.org> Move folding of __builtin_classify_type out of the CallExpr
interface into the constant folding interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
94d4541bf0d259072c14c6eba88e4da533624293 06-Oct-2008 Chris Lattner <sabre@nondot.org> "Enhance" CheckArithmeticConstantExpression to accept ?: with a constant
condition as a constant even if the unevaluated side is a not a constant.
We don't do this when extensions are off, and we emit a warning when this
happens:

t.c:22:11: warning: expression is not a constant, but is accepted as one by GNU extensions
short t = __builtin_constant_p(5353) ? 42 : somefunc();
^ ~~~~~~~~~~

suggestions for improvement are welcome. This is obviously horrible, but
is required for real-world code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
46cfefa8a4e486ee6a9b8960f232237bf7a4b1f9 06-Oct-2008 Chris Lattner <sabre@nondot.org> "Enhance" CheckArithmeticConstantExpression to accept ?: with a constant
condition as a constant even if the unevaluated side is a not a constant.
We don't do this when extensions are off, and we emit a warning when this
happens:

t.c:22:11: warning: expression is not a constant, but is accepted as one by GNU extensions
short t = __builtin_constant_p(5353) ? 42 : somefunc();
^ ~~~~~~~~~~

suggestions for improvement are welcome. This is obviously horrible, but
is required for real-world code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8729378a310a44366c655b171aaa41dc54efd487 06-Oct-2008 Chris Lattner <sabre@nondot.org> Add a comment that describes tryEvaluate. Make tryEvaluate fold
__builtin_constant_p properly, and add some scaffolding for
FloatExprEvaluator to eventually handle huge_val and inf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
019f4e858e78587f2241ff1a76c747d7bcd7578c 06-Oct-2008 Chris Lattner <sabre@nondot.org> Add a comment that describes tryEvaluate. Make tryEvaluate fold
__builtin_constant_p properly, and add some scaffolding for
FloatExprEvaluator to eventually handle huge_val and inf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c24915f9b245ce31cce2265dc12b43a59667e730 06-Oct-2008 Chris Lattner <sabre@nondot.org> add a new CallExpr::isBuiltinCall() method, and use it to simplify some existing
code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cb888967400a03504c88acedd5248d6778a82f46 06-Oct-2008 Chris Lattner <sabre@nondot.org> add a new CallExpr::isBuiltinCall() method, and use it to simplify some existing
code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dd6791c806f39b878486285c7725ba09844bf8ed 06-Oct-2008 Anders Carlsson <andersca@mac.com> Implement support for the const and pure attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
232eb7d33b96ad8f99de3b5ae840421b3a7c6cb7 06-Oct-2008 Anders Carlsson <andersca@mac.com> Implement support for the const and pure attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
1be8bb9daff92eb186b3236e14a172d86666f23a 05-Oct-2008 Chris Lattner <sabre@nondot.org> move a bunch more integer sizing out of target-specific code into
target indep code.

Note that this changes functionality on PIC16: it defines __INT_MAX__
correctly for it, and it changes sizeof(long) to 16-bits (to match
the size of pointer).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0e5d4ef3155651af17a90fdc07d9f80b33935c0c 05-Oct-2008 Chris Lattner <sabre@nondot.org> move a bunch more integer sizing out of target-specific code into
target indep code.

Note that this changes functionality on PIC16: it defines __INT_MAX__
correctly for it, and it changes sizeof(long) to 16-bits (to match
the size of pointer).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3276cbc1ad47d8c8778918544c7e74d2966e4ef8 05-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Handle ambiguities between expressions and type-ids that occur inside parentheses, e.g.:

sizeof(int()) -> "int()" is type-id
sizeof(int()+1) -> "int()+1" is expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
78c8d80f19cb0bccd4f3d590e71a230e727cfab5 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle ambiguities between expressions and type-ids that occur inside parentheses, e.g.:

sizeof(int()) -> "int()" is type-id
sizeof(int()+1) -> "int()+1" is expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3f6d8cf040f9186d8533561c80531b06eff146f6 05-Oct-2008 Chris Lattner <sabre@nondot.org> Implement PR2773, support for __USER_LABEL_PREFIX__


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3fdf4678935b27c3d3fd4eb10bf9f5ab98dc0d99 05-Oct-2008 Chris Lattner <sabre@nondot.org> Implement PR2773, support for __USER_LABEL_PREFIX__


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c6f230d205bd7767f6973e2c2463567f2c9c4777 05-Oct-2008 Chris Lattner <sabre@nondot.org> Fix a problem reported in PR2766 that makes clang reject old versions
of GCC's headers. This impacts people that run clang in Tiger systems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
8223b1d05fc6f46e76bb06d836c1e6dec764e65b 05-Oct-2008 Chris Lattner <sabre@nondot.org> Fix a problem reported in PR2766 that makes clang reject old versions
of GCC's headers. This impacts people that run clang in Tiger systems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
9add68cbcbeef812d26d8edb4612132447493a5c 05-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Found a subtle bug caused by an implicit enum-to-bool conversion (of the TentativeParsingResult enum).
This was the motivation of the following changes:

-'TentativeParsingResult' enum is replaced by a 'TPResult' class that basically encapsulates the enum.
-TPR_true, TPR_false, TPR_ambiguous, and TPR_error enum constants are replaced by TPResult::True(), TPResult::False(), etc. calls that return a TPResult object.
-Also fixed the subtle bug in Parser::isCXXFunctionDeclarator (caught by the above changes as a compilation error).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b9f341916e484ff6ba2c2d28c8b2dd5fa12b0015 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Found a subtle bug caused by an implicit enum-to-bool conversion (of the TentativeParsingResult enum).
This was the motivation of the following changes:

-'TentativeParsingResult' enum is replaced by a 'TPResult' class that basically encapsulates the enum.
-TPR_true, TPR_false, TPR_ambiguous, and TPR_error enum constants are replaced by TPResult::True(), TPResult::False(), etc. calls that return a TPResult object.
-Also fixed the subtle bug in Parser::isCXXFunctionDeclarator (caught by the above changes as a compilation error).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
244d99b19f0c7af22ee7250f62ea3b16186a4541 05-Oct-2008 Anders Carlsson <andersca@mac.com> Add parsing of the sentinel attribute. Still need to create the attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
770918281c5bdc7b5b3942285c407e3d62270053 05-Oct-2008 Anders Carlsson <andersca@mac.com> Add parsing of the sentinel attribute. Still need to create the attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
7fd62398781e3cfed12df3fa55cb59d0c5b695e2 05-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Move the TentativeParsingResult enum closer to where it gets used.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b47e38683f288cd4a73098091d629df417377a6b 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the TentativeParsingResult enum closer to where it gets used.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
58f362d41e08938a17b47d3468fd5c7cea65d1ab 05-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Disambiguate between a declaration or an expression, in the 'for-init-statement' part of a 'for' statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bbc70c019f7b7f9a256ee29dab5287ecc82c6553 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Disambiguate between a declaration or an expression, in the 'for-init-statement' part of a 'for' statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
88527fbeeb477b3b673df505d1546e4d9bd2f4cb 05-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Disambiguate between a declaration or expression for the 'condition' part of a if/switch/while/for statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a8a4598b6f2a07339ab8a1248295a07d771a2b2a 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Disambiguate between a declaration or expression for the 'condition' part of a if/switch/while/for statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
ed02bf127130e67cffd46e914d7a6632fd81e4c1 05-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Remove redundant parameter and rename StMgr to StateMgr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
c1d1bbf691819dc69c122cbdd376c5c630bae378 05-Oct-2008 Zhongxing Xu <xuzhongxing@gmail.com> Remove redundant parameter and rename StMgr to StateMgr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
e083e693e8cd5fa816311a13bd593e50f2e4d833 05-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix X86 palignr[128] builtins to match LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
affc3a9bfa794f9e781ba42491f9d16cb3d1abd6 05-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix X86 palignr[128] builtins to match LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
5356a3277126d7aff7fbecbe370af585c4692276 05-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix another X86 builtin definitions.
- vec_set_v4hi had "v4s" in place of "V4s"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
ec04b2622ab31655a7e06033f2b05384bf43688f 05-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix another X86 builtin definitions.
- vec_set_v4hi had "v4s" in place of "V4s"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
f328b1b32f1c959dab9237f4bd3d19accf5d32f8 05-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix some X86 builtin definitions.
- cmp instructions return int
- storedqu had bad const qualifier
- pmuldq128 used invalid type code


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
1827db7711cb88e152999ae94f930ebc8d2c53a8 05-Oct-2008 Daniel Dunbar <daniel@zuster.org> Fix some X86 builtin definitions.
- cmp instructions return int
- storedqu had bad const qualifier
- pmuldq128 used invalid type code


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
74b477c0d77fecbf658d682d5e7529fd5fd4eb7b 05-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Resolve ambiguous C++ statements (C++ 6.8p1).
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
5404a156be26de1c63ca9916187f970848bb4dbb 05-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Resolve ambiguous C++ statements (C++ 6.8p1).
'ParseTentative.cpp' implements the functionality needed to resolve ambiguous C++ statements, to either a declaration or an expression, by "tentatively parsing" them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
47f99c94986bd74876680c29f952df18fde2b3a2 04-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Parser support for #pragma pack
- Uses Action::ActOnPragmaPack
- Test case is XFAIL pending verifier fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
fcdd8fe26de3eee44927600bf1853e21bd90dd84 04-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Parser support for #pragma pack
- Uses Action::ActOnPragmaPack
- Test case is XFAIL pending verifier fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
a65c00a864e4e36daca7bc322ecf1b07a0202f9f 04-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Preprocessor::RemovePragmaHandler.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
4095080aff204008eefb26b100906c6ca2bc4bb6 04-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Preprocessor::RemovePragmaHandler.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
b15eba4a3ca3266fdf2ee6973689e4d9acc73eb5 04-Oct-2008 Ted Kremenek <kremenek@apple.com> This is a big patch, but the functionality change is small and the rest of the patch consists of deltas due to API changes.

This patch overhauls the "memory region" abstraction that was prototyped (but never really used) as part of the Store.h. This patch adds MemRegion.h and MemRegion.cpp, which defines the class MemRegion and its subclasses. This classes serve to define an abstract representation of memory, with regions being layered on other regions to to capture the relationships between fields and variables, variables and the address space they are allocated in, and so on.

The main motivation of this patch is that key parts of the analyzer assumed that all value bindings were to VarDecls. In the future this won't be the case, and this patch removes lval::DeclVal and replaces it with lval::MemRegionVal. Now all pieces of the analyzer must reason about abstract memory blocks instead of just variables.

There should be no functionality change from this patch, but it opens the door for significant improvements to the analyzer such as field-sensitivity and object-sensitivity, both which were on hold until the memory abstraction got generalized.

The memory region abstraction also allows type-information to literally be affixed to a memory region. This will allow the some now redundant logic to be removed from the retain/release checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
9e24049bef26b6289cce9ac9b483c5cbb096e3ae 04-Oct-2008 Ted Kremenek <kremenek@apple.com> This is a big patch, but the functionality change is small and the rest of the patch consists of deltas due to API changes.

This patch overhauls the "memory region" abstraction that was prototyped (but never really used) as part of the Store.h. This patch adds MemRegion.h and MemRegion.cpp, which defines the class MemRegion and its subclasses. This classes serve to define an abstract representation of memory, with regions being layered on other regions to to capture the relationships between fields and variables, variables and the address space they are allocated in, and so on.

The main motivation of this patch is that key parts of the analyzer assumed that all value bindings were to VarDecls. In the future this won't be the case, and this patch removes lval::DeclVal and replaces it with lval::MemRegionVal. Now all pieces of the analyzer must reason about abstract memory blocks instead of just variables.

There should be no functionality change from this patch, but it opens the door for significant improvements to the analyzer such as field-sensitivity and object-sensitivity, both which were on hold until the memory abstraction got generalized.

The memory region abstraction also allows type-information to literally be affixed to a memory region. This will allow the some now redundant logic to be removed from the retain/release checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/MemRegion.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/Store.h
b31925dc0b03b0e964c4adb6190d66874278efaa 04-Oct-2008 Chris Lattner <sabre@nondot.org> add a disclaimer



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
7a02344d9b45db3719adabf8118887253fe944e4 04-Oct-2008 Chris Lattner <sabre@nondot.org> add a disclaimer



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
2210ffc089fdf18b9e1a60ff47bcab401089f3fd 04-Oct-2008 Chris Lattner <sabre@nondot.org> add a new Rewriter::getRewritenText method that returns the text for a range
that includes any edits in the range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
b5cd09a2bf1509167a2e7a46bdd0316812a93335 04-Oct-2008 Chris Lattner <sabre@nondot.org> add a new Rewriter::getRewritenText method that returns the text for a range
that includes any edits in the range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
aeaf7eff830282cdf1e57b4eeb28833d57c9d4ed 03-Oct-2008 Steve Naroff <snaroff@apple.com> - Add a convenience constructor to Type.
- Many rewriter modifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
83ba14e260193a67bba3772134d1d428a1b1c394 03-Oct-2008 Steve Naroff <snaroff@apple.com> - Add a convenience constructor to Type.
- Many rewriter modifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f2c7cd0ec36b3b942ecdde2b09d2af25d6b3fa2b 03-Oct-2008 Daniel Dunbar <daniel@zuster.org> Pass postfix attributes to ActOnFields (mismarked a file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f7bb8b91bb2bc540f80f5ed1456a3dcef770abb6 03-Oct-2008 Daniel Dunbar <daniel@zuster.org> Pass postfix attributes to ActOnFields (mismarked a file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
71cd7764258c22e00cacb0b41811b1039de93962 03-Oct-2008 Steve Naroff <snaroff@apple.com> Add getTypeSpecStartLoc() to VarDecls and FunctionDecls.

This is a temporary solution to help with the block rewriter (though it certainly has general utility).
Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0eb07bfde0deedcb35cf3d118b3488f5d8db32ec 03-Oct-2008 Steve Naroff <snaroff@apple.com> Add getTypeSpecStartLoc() to VarDecls and FunctionDecls.

This is a temporary solution to help with the block rewriter (though it certainly has general utility).
Once DeclGroup's are implemented, this SourceLocation should be stored with it (since it applies to all the decls).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
07253c7f77aca1857ba0226903c47cfb3a3b0543 03-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Builtins.def attribute for "can be a constant expression".
- Enabled for builtins which are always constant expressions
(__builtin_huge_val*, __builtin_inf*, __builtin_constant_p,
__builtin_classify_type, __builtin___CFStringMakeConstantString).

Added Builtin::Context::isConstantExpr.
- Currently overly simply interface which only works for builtins
whose constantexprness does not depend on their arguments.

CallExpr::isBuiltinConstantExpr now takes an ASTContext argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/Expr.h
ae3f4919e4805f59c554d39cb9cd3a601809b2cb 03-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add Builtins.def attribute for "can be a constant expression".
- Enabled for builtins which are always constant expressions
(__builtin_huge_val*, __builtin_inf*, __builtin_constant_p,
__builtin_classify_type, __builtin___CFStringMakeConstantString).

Added Builtin::Context::isConstantExpr.
- Currently overly simply interface which only works for builtins
whose constantexprness does not depend on their arguments.

CallExpr::isBuiltinConstantExpr now takes an ASTContext argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/Expr.h
36a0d8aec98699c3e1172e2684c98caf95a35d8a 02-Oct-2008 Daniel Dunbar <daniel@zuster.org> Unbreak build: claim an extra bit for BuiltinID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
147d26f281409748efcd917292e571794c439d1c 02-Oct-2008 Daniel Dunbar <daniel@zuster.org> Unbreak build: claim an extra bit for BuiltinID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56952 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
4070a6f343ee6a0edf1161d4f6efc5e2c8ffc869 02-Oct-2008 Mon P Wang <wangmp@apple.com> Added SSE4.1 blend intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
946685626eb427b6c9b013b4d4de61cdd729363c 02-Oct-2008 Mon P Wang <wangmp@apple.com> Added SSE4.1 blend intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
8cbffa3ba09d9ca171901ce52ce274f07c7994bc 01-Oct-2008 Ted Kremenek <kremenek@apple.com> Add a QualType to ConjuredSymbol to represent the type and size of the symbol.

Use this updated interface when invalidating arguments passed by reference; the type of symbol is of the object passed by reference, not the reference itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
60a6e0ce72a24d6247602625c631fc3dc7bfd8d4 01-Oct-2008 Ted Kremenek <kremenek@apple.com> Add a QualType to ConjuredSymbol to represent the type and size of the symbol.

Use this updated interface when invalidating arguments passed by reference; the type of symbol is of the object passed by reference, not the reference itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
45a9180f160a422eb59e52fa386342326a17b8f6 30-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add diagnostic for .{lo,hi,e,o} on odd-sized extended vectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
abee2d789ce799ce9a5d611e13a1713090f305f3 30-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add diagnostic for .{lo,hi,e,o} on odd-sized extended vectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
68354f3da21e0ebf7d9fb9fddbe5fe83cc951727 30-Sep-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly.

Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
037cda5282e73f30bb09fa316047554b1af1e2ef 30-Sep-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly.

Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56843 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1473f5255cb08085bb5476543a7dfee0da8933be 30-Sep-2008 Mon P Wang <wangmp@apple.com> Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
7f57b000f232bc596dca627c976ace250c8171e3 30-Sep-2008 Mon P Wang <wangmp@apple.com> Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
82e289167dfb72d35a798bedad2f46eede0ef572 29-Sep-2008 Chris Lattner <sabre@nondot.org> Make some methods const, add some helpers to FullSourceLoc,
and add a dump method to FullSourceLoc! Patch by Nico Weber!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
5c38b6388dc44dcb8467a9e0f22d93db7221717e 29-Sep-2008 Chris Lattner <sabre@nondot.org> Make some methods const, add some helpers to FullSourceLoc,
and add a dump method to FullSourceLoc! Patch by Nico Weber!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
4eb0ce90d398b78c7a44ab74af6a0345adc04c3d 29-Sep-2008 Chris Lattner <sabre@nondot.org> move ExtVectorElementExpr down into the 'clang extensions' section.
Wrap line to 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a09f585a7fdbb01b4bf9de3679fd37005379ca66 29-Sep-2008 Chris Lattner <sabre@nondot.org> move ExtVectorElementExpr down into the 'clang extensions' section.
Wrap line to 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56805 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b91c7250662812f37c2853767ee4e3f397733785 29-Sep-2008 Ted Kremenek <kremenek@apple.com> Extend 'IsLValType' to handle BlockPointerTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
dfd296bae332d10a854620c059f5d9cef98764b8 29-Sep-2008 Ted Kremenek <kremenek@apple.com> Extend 'IsLValType' to handle BlockPointerTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
b23469fe1918b0e8154fcc54e3ec395cc4e1c4aa 28-Sep-2008 Chris Lattner <sabre@nondot.org> Replace a comparison with a static list of builtins that was wrong (it
wasn't covering checking builtins like __builtin___vsnprintf_chk) with
a check that won't get out of date.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
bd7eb1c3b2af5cd0a7540c79da85e2ce15a893f4 28-Sep-2008 Chris Lattner <sabre@nondot.org> Replace a comparison with a static list of builtins that was wrong (it
wasn't covering checking builtins like __builtin___vsnprintf_chk) with
a check that won't get out of date.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
4a1f5de64cc20e009fb6a555ee21fa939a2ab04e 27-Sep-2008 Ted Kremenek <kremenek@apple.com> Internally store the body of a BlockExpr using a Stmt* instead of a CompoundStmt*, and use the getBody() method to do the appropriate checking. This both removes the type-punning warnings in Expr.cpp and also makes BlockExpr have more consistency checks against modifications to its body (via StmtIterator).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9da13f9ddb2567e36f4bbee7b3c32f54aeb76d5b 27-Sep-2008 Ted Kremenek <kremenek@apple.com> Internally store the body of a BlockExpr using a Stmt* instead of a CompoundStmt*, and use the getBody() method to do the appropriate checking. This both removes the type-punning warnings in Expr.cpp and also makes BlockExpr have more consistency checks against modifications to its body (via StmtIterator).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f82d2b2274b4f6b6516fb276ae93b5881fc8960a 27-Sep-2008 Ted Kremenek <kremenek@apple.com> Forgot to check in header file with last commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
e7b8d400208e886a167a4481a9024295a3ce17d1 27-Sep-2008 Ted Kremenek <kremenek@apple.com> Forgot to check in header file with last commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
6f04406bb068bcb54f2bb80778f2f2a633579d53 26-Sep-2008 Chris Lattner <sabre@nondot.org> clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Lex/PPCallbacks.h
0b9e736308af5397f558ffc8e780c438c2fdb563 26-Sep-2008 Chris Lattner <sabre@nondot.org> clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56692 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Lex/PPCallbacks.h
7257ce2761533f83b2afcf548b999f2bb290c734 26-Sep-2008 Chris Lattner <sabre@nondot.org> Fix the rest of rdar://6243860 hopefully. This requires changing FileIDInfo
to whether the fileid is a 'extern c system header' in addition to whether it
is a system header, most of this is spreading plumbing around. Once we have that,
PPLexerChange bases its "file enter/exit" notifications to PPCallbacks to
base the system header state on FileIDInfo instead of HeaderSearch. Finally,
in Preprocessor::HandleIncludeDirective, mirror logic in GCC: the system headerness
of a file being entered can be set due to the #includer or the #includee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
721818304ac462d8c6ce05eecd02884033db78f1 26-Sep-2008 Chris Lattner <sabre@nondot.org> Fix the rest of rdar://6243860 hopefully. This requires changing FileIDInfo
to whether the fileid is a 'extern c system header' in addition to whether it
is a system header, most of this is spreading plumbing around. Once we have that,
PPLexerChange bases its "file enter/exit" notifications to PPCallbacks to
base the system header state on FileIDInfo instead of HeaderSearch. Finally,
in Preprocessor::HandleIncludeDirective, mirror logic in GCC: the system headerness
of a file being entered can be set due to the #includer or the #includee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Preprocessor.h
076d6cb185520f54e36dd4d2dc994ac9b1f20319 26-Sep-2008 Steve Naroff <snaroff@apple.com> Tweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with BlockDeclRef exprs.

This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
4f6a7d7ead09b439216c32f2de806a998aeb222a 26-Sep-2008 Steve Naroff <snaroff@apple.com> Tweak Expr::isModifiableLvalue() and Expr::isLvalue() to better deal with BlockDeclRef exprs.

This fixes <rdar://problem/6248392> clang: Error when using address of stack variable inside block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
28680d15b69cf07b19985dcc3365b11b6fa0b8e0 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Parser support for prefix __attribute__ on @protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
246e70f69cb8aeb67225c54690f1c6b25abd5a86 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Parser support for prefix __attribute__ on @protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
bddb14add053bbda0d354c4c993ea96797085332 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add support for CFString in format attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
085e8f7da37a227ceee7f98b724e0a42e04d01ca 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add support for CFString in format attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
573a0224b3fa42d3effeeb89ba95085f94f6173e 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
e9eb3f88b82176d8a43f7856250efded80cb2504 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56634 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
a59d56146842eff8cc265af39d37139baa561ddb 25-Sep-2008 Ted Kremenek <kremenek@apple.com> Added prototype implementation of the DeclGroup, DeclGroupRef, and DeclGroupOwningRef classes.
Documentation and testing are pending.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
d17062cc23df2137378eb808545e24be484c321a 25-Sep-2008 Ted Kremenek <kremenek@apple.com> Added prototype implementation of the DeclGroup, DeclGroupRef, and DeclGroupOwningRef classes.
Documentation and testing are pending.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclGroup.h
82324d64af17964d61b9f93203e4cb47b95b742f 25-Sep-2008 Steve Naroff <snaroff@apple.com> Downgrade incompatible block pointer error to a warning (to be consistent with incompatible pointer warnings in general).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ba80c9abccd97d9771c1dfa1a862e66ddd4daedd 25-Sep-2008 Steve Naroff <snaroff@apple.com> Downgrade incompatible block pointer error to a warning (to be consistent with incompatible pointer warnings in general).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56595 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
540ff4771b67dd3bb210ddf9531f044a43bcad7e 23-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement type checking of Objective-C property attributes.
- readonly and readwrite are mutually exclusive.
- assign, copy, and retain are mutually exclusive.
- copy and retain are invalid on non-object types.
- Warn about using default 'assign' property on object types
(attempting to follow gcc behavior).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
95e61fb7cdd1becf956f897f90abffd8b70575de 23-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement type checking of Objective-C property attributes.
- readonly and readwrite are mutually exclusive.
- assign, copy, and retain are mutually exclusive.
- copy and retain are invalid on non-object types.
- Warn about using default 'assign' property on object types
(attempting to follow gcc behavior).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3c528b661a762c0cfc4edceb15da37c4a1cdb902 23-Sep-2008 Ted Kremenek <kremenek@apple.com> Fix PR 2819: Compute dataflow values for all CFG blocks by not relying on having the "Exit" block being reachable by all (or any) of the blocks in the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
fa708259cb518e87a2e7f636671b94a49f823608 23-Sep-2008 Ted Kremenek <kremenek@apple.com> Fix PR 2819: Compute dataflow values for all CFG blocks by not relying on having the "Exit" block being reachable by all (or any) of the blocks in the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
1d090a4533589a3ea990de15dc646a091540cc59 21-Sep-2008 Ted Kremenek <kremenek@apple.com> Add a bug category for NSError** checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
62059e809596a419e6fc3e751b2f0b57b7cc51e7 21-Sep-2008 Ted Kremenek <kremenek@apple.com> Add a bug category for NSError** checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
ab1323403f4d7daf3cdf3ede348e61d534146592 20-Sep-2008 Ted Kremenek <kremenek@apple.com> Add "category" to BugTypes, allowing bugs to be grouped.
Changed casing of many bug names. The convention will be to have bug names (mostly) lower cased, and categories use some capitalization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
8c036c7f77d69f96df49219ed0bdbade200d52eb 20-Sep-2008 Ted Kremenek <kremenek@apple.com> Add "category" to BugTypes, allowing bugs to be grouped.
Changed casing of many bug names. The convention will be to have bug names (mostly) lower cased, and categories use some capitalization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
b2de2efaa9f68ff58161359f87aa41a9c35b63d1 20-Sep-2008 Ted Kremenek <kremenek@apple.com> Add PostStore, a new ProgramPoint to distinguish between 'stores' and other PostStmts.

GRExprEngine:
Use PostStore in EvalStore.
Use a second version of EvalStore in EvalBinaryOperator to associate the store with the expression on the LHS.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
82bae3f6bf7bc4733d9c87659b266e23ad55f420 20-Sep-2008 Ted Kremenek <kremenek@apple.com> Add PostStore, a new ProgramPoint to distinguish between 'stores' and other PostStmts.

GRExprEngine:
Use PostStore in EvalStore.
Use a second version of EvalStore in EvalBinaryOperator to associate the store with the expression on the LHS.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/ProgramPoint.h
bb7a3d95821857c9d94fe3198c55467e3fbcfb93 19-Sep-2008 Ted Kremenek <kremenek@apple.com> Implement second part of PR 2600: NSError** parameter may be null, and should be checked before being dereferenced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
7360fda1efd88fd28ca2882579676dbd8569c181 19-Sep-2008 Ted Kremenek <kremenek@apple.com> Implement second part of PR 2600: NSError** parameter may be null, and should be checked before being dereferenced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRState.h
b3538abf8192a78ac4d67bcaee425a1ceba84959 18-Sep-2008 Ted Kremenek <kremenek@apple.com> Change implementation of NSError** coding-style check to be invoked at the end of the retain/release analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
cfdf9b4edf1172728be97d1ae2d95171975f812b 18-Sep-2008 Ted Kremenek <kremenek@apple.com> Change implementation of NSError** coding-style check to be invoked at the end of the retain/release analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56312 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
e1cecbae5d675d1c9abdd9be8fb4e915139de509 18-Sep-2008 Steve Naroff <snaroff@apple.com> Finish pushing blocks attribute through the clang attribute machinery.
Also added a couple simple tests from the "gcc.apple" test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
9eae5761c0691c0f11d7a823b8ee54f05786cbbe 18-Sep-2008 Steve Naroff <snaroff@apple.com> Finish pushing blocks attribute through the clang attribute machinery.
Also added a couple simple tests from the "gcc.apple" test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
35335b6a17851d1b9dafed2216fc504167f5fa5f 18-Sep-2008 Ted Kremenek <kremenek@apple.com> Implemented one of the checks requested in PR 2600:
"Method accepting NSError** argument should have non-void return value to indicate that an error occurred."

Test case written, but the header needs to be delta-debugged reduced. Will commit shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
f45d18c08b549644dd5f3d3ad731b8e4d09be730 18-Sep-2008 Ted Kremenek <kremenek@apple.com> Implemented one of the checks requested in PR 2600:
"Method accepting NSError** argument should have non-void return value to indicate that an error occurred."

Test case written, but the header needs to be delta-debugged reduced. Will commit shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
b31e2b3876406efbd90bbca99b2dbd72063f170e 17-Sep-2008 Steve Naroff <snaroff@apple.com> Remove BlockStmtExpr.
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
9c3c902835ef7d37300463ad47176ec21a67dc8b 17-Sep-2008 Steve Naroff <snaroff@apple.com> Remove BlockStmtExpr.
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
a869423790c59e3fac6d75972a20ed114ae9fea4 17-Sep-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d6ecc5cf945ccdf2b931137e364a69cde59ab18b 17-Sep-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fix comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56271 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a095a75de7e3b14f431bb8ee4d6ae39a78d34624 17-Sep-2008 Steve Naroff <snaroff@apple.com> Remove support for BlockExprExpr. For example...
^(expression) or ^(int arg1, float arg2)(expression)
...is no longer supported.
All block literals now require a compound statement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
17dab4f616db7be6800c1f0505f4888d2e8ad7a2 17-Sep-2008 Steve Naroff <snaroff@apple.com> Remove support for BlockExprExpr. For example...
^(expression) or ^(int arg1, float arg2)(expression)
...is no longer supported.
All block literals now require a compound statement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
ad7c407fa1dc566d5320a002a79935b46098b28b 16-Sep-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint now takes the space of two pointers instead of one. This change was
motivated because it became clear that the number of subclasses of ProgramPoint
would expand and we ran out of bits to represent a pointer variant. As a plus of
this change, BlockEdge program points can now be represented explicitly without
using a cache of CFGBlock* pairs in CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/ProgramPoint.h
d452758bb6b59340528a26def9ecc24b329d4ecf 16-Sep-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint now takes the space of two pointers instead of one. This change was
motivated because it became clear that the number of subclasses of ProgramPoint
would expand and we ran out of bits to represent a pointer variant. As a plus of
this change, BlockEdge program points can now be represented explicitly without
using a cache of CFGBlock* pairs in CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56245 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/ProgramPoint.h
7b6f67b456bad51f53c955700bb5067fdfb2da7a 13-Sep-2008 Ted Kremenek <kremenek@apple.com> Patch by Csaba Hruska!

"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
a95d3750441ac8ad03e36af8e6e74039c9a3109d 13-Sep-2008 Ted Kremenek <kremenek@apple.com> Patch by Csaba Hruska!

"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
dd54e91707d7fd748125776abcec5527212251d6 12-Sep-2008 Daniel Dunbar <daniel@zuster.org> Round out object size checking builtins (fprintf ones disabled as we
have no mapping to FILE*). We are also missing printf format
attributes for the printf style ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
df3ffb300a2b6f26707fa32f66c549091f3643aa 12-Sep-2008 Daniel Dunbar <daniel@zuster.org> Round out object size checking builtins (fprintf ones disabled as we
have no mapping to FILE*). We are also missing printf format
attributes for the printf style ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
4dbd857bedd72b95c197d939df5d6fcf7bfd8072 12-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add --suppress-system-warnings (on by default, use =0 to disable)
- For investigating warnings in system headers / builtins.
- Currently also enables the behavior that allows silent redefinition
of types in system headers. Conceptually these are separate but I
didn't feel it was worth two options (or changing LangOptions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
2fe0997427d92388e66e7573f4b043e7ba285ef0 12-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add --suppress-system-warnings (on by default, use =0 to disable)
- For investigating warnings in system headers / builtins.
- Currently also enables the behavior that allows silent redefinition
of types in system headers. Conceptually these are separate but I
didn't feel it was worth two options (or changing LangOptions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
1815b3bfc1382c88bee771bd158755b2426f0780 12-Sep-2008 Douglas Gregor <doug.gregor@gmail.com> Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
77a52233f7c0f162672652051bfe78b65ad4f789 12-Sep-2008 Douglas Gregor <dgregor@apple.com> Give string literals const element typesin C++, and cope with the deprecated C++ conversion from a string literal to a pointer-to-non-const-character

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c11aadbb9d897b7ccfcf1dce07c17b17713a5370 11-Sep-2008 Mon P Wang <wangmp@apple.com> Added SSE41 pminsd, pmaxsd, roundps and a few others


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
3e877ec791fb8f4b752b3193021c86b878082a4c 11-Sep-2008 Mon P Wang <wangmp@apple.com> Added SSE41 pminsd, pmaxsd, roundps and a few others


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
6293fd1cf1a4e23cea635d8712c5a942e374f73a 11-Sep-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for expected-note to Clang's -verify option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticBuffer.h
233f74b29b2864d5984e13f3ae10a21404ef82e8 11-Sep-2008 Douglas Gregor <dgregor@apple.com> Add support for expected-note to Clang's -verify option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticBuffer.h
6e4dec42542f1bf02674226cd30b1e93ba343cf5 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add ObjCMethodDecl::getSourceRange.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9776ba0d844cf9f6888e871e3fd246ae782f76f4 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add ObjCMethodDecl::getSourceRange.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2298f01d256360b343b32a7a0e474046a84e83e1 11-Sep-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Fold Parser::ParseTag into Parser::ParseEnumSpecifier, as suggested in this post:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-September/002721.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e281b4cb3c2f85e10412040b35c2699bc883b716 11-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fold Parser::ParseTag into Parser::ParseEnumSpecifier, as suggested in this post:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-September/002721.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3eac7698d809b39e89fc7f637f97a899425c85d4 10-Sep-2008 Steve Naroff <snaroff@apple.com> More semantic analysis for blocks...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
61f40a2b67fc2046768e14f66b617e564cbcc3d8 10-Sep-2008 Steve Naroff <snaroff@apple.com> More semantic analysis for blocks...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
810c0f76b1d87aa5d6c1785558dc903c20e6aaf9 10-Sep-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5921093cf1c2e9a8bd1a22b6f612e551bae7476b 10-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement Sema support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
dbce6c11df75b223f22fbfcab76a9d4352257931 10-Sep-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add new 'CXXConditionDeclExpr' expression node used for a 'condition' declaration, e.g: "if (int x=0) {...}".
It is a subclass of DeclRefExpr and the main difference is that CXXConditionDeclExpr owns the declaration that it references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
9e922b1663ecb95dc7eee03002fd66ed18fb3192 10-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add new 'CXXConditionDeclExpr' expression node used for a 'condition' declaration, e.g: "if (int x=0) {...}".
It is a subclass of DeclRefExpr and the main difference is that CXXConditionDeclExpr owns the declaration that it references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
873f2783b98fe10de2e99d704ff176090b15e285 09-Sep-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement parser support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for).
Add new 'ActOnCXXConditionDeclarationExpr' action, called when the 'condition' is a declaration instead of an expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
71b914b999d9c4b6df11068fc5a3291ac4770492 09-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement parser support for the 'condition' part of C++ selection-statements and iteration-statements (if/switch/while/for).
Add new 'ActOnCXXConditionDeclarationExpr' action, called when the 'condition' is a declaration instead of an expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
3b3b028f58587b0713383e51e11aa6856a1eddad 09-Sep-2008 Mon P Wang <wangmp@apple.com> Added SSE4.1 packusdw


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
e01c2c9e072ed46ff791c8e9fb859786c6dae96e 09-Sep-2008 Mon P Wang <wangmp@apple.com> Added SSE4.1 packusdw


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55978 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
220cc9945b241f3d77b8c1810c2f9532cfb43486 09-Sep-2008 Mon P Wang <wangmp@apple.com> Added SSE41 pmovsx pmovzx intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
f47be933bef073708c2536fa69ef946e7fe08134 09-Sep-2008 Mon P Wang <wangmp@apple.com> Added SSE41 pmovsx pmovzx intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
5eea562fd2ab2f3a3c6090fb91ca69e3043d4c8f 08-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add ThreadSpecified bit to Decl.
- Patch from Kevin Tew.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6f0200e9ebf7f65df74b3cf55b4319b075b244a2 08-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add ThreadSpecified bit to Decl.
- Patch from Kevin Tew.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d6163f3cfe7df430c3857d0552d5f5cb7ae86986 06-Sep-2008 Steve Naroff <snaroff@apple.com> More type checking for blocks. Still incomplete (will hopefully finish up this weekend).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
dd972f20dc2bd3609d833893e5c6544ac09b59a9 06-Sep-2008 Steve Naroff <snaroff@apple.com> More type checking for blocks. Still incomplete (will hopefully finish up this weekend).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
46a837c7ced306c55d1686cea5f77cb7a2f3b908 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it.

This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet).

The motivation of this patch is as follows:
- Capture more source information, necessary for refactoring/rewriting clients.

- Pave the way to resolve ownership issues with RecordDecls with the forthcoming
addition of DeclGroups.

Current caveats:
- Until DeclGroups are in place, we will leak RecordDecls not explicitly
referenced by the AST. For example:

typedef struct { ... } x;

The RecordDecl for the struct will be leaked because the TypedefDecl doesn't
refer to it. This will be solved with DeclGroups.

- This patch also (temporarily) breaks CodeGen. More below.

High-level changes:
- As before, TagType still refers to a TagDecl, but it doesn't own it. When
a struct/union/class is first referenced, a RecordType and RecordDecl are
created for it, and the RecordType refers to that RecordDecl. Later, if
a new RecordDecl is created, the pointer to a RecordDecl in RecordType is
updated to point to the RecordDecl that defines the struct/union/class.

- TagDecl and RecordDecl now how a method 'getDefinition()' to return the
TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular
enum/struct/class/union. This is useful from going from a RecordDecl* that
defines a forward declaration to the RecordDecl* that provides the actual
definition. Note that this also works for EnumDecls, except that in this case
there is no distinction between forward declarations and definitions (yet).

- Clients should no longer assume that 'isDefinition()' returns true from a
RecordDecl if the corresponding struct/union/class has been defined.
isDefinition() only returns true if a particular RecordDecl is the defining
Decl. Use 'getDefinition()' instead to determine if a struct has been defined.

- The main changes to Sema happen in ActOnTag. To make the changes more
incremental, I split off the processing of enums and structs et al into two
code paths. Enums use the original code path (which is in ActOnTag) and
structs use the ActOnTagStruct. Eventually the two code paths will be merged,
but the idea was to preserve the original logic both for comparison and not to
change the logic for both enums and structs all at once.

- There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls
that correspond to the same type simply have a pointer to that type. If we
need to figure out what are all the RecordDecls for a given type we can build
a backmap.

- The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the
changes to RecordDecl. For some reason 'svn' marks the entire file as changed.

Why is CodeGen broken:
- Codegen assumes that there is an equivalence between RecordDecl* and
RecordType*. This was true before because we only created one RecordDecl* for
a given RecordType*, but it is no longer true. I believe this shouldn't be too
hard to change, but the patch was big enough as it is.

I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Type.h
4b7c98378ae0c1a3635f0b7756848b4a9923f8bc 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it.

This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet).

The motivation of this patch is as follows:
- Capture more source information, necessary for refactoring/rewriting clients.

- Pave the way to resolve ownership issues with RecordDecls with the forthcoming
addition of DeclGroups.

Current caveats:
- Until DeclGroups are in place, we will leak RecordDecls not explicitly
referenced by the AST. For example:

typedef struct { ... } x;

The RecordDecl for the struct will be leaked because the TypedefDecl doesn't
refer to it. This will be solved with DeclGroups.

- This patch also (temporarily) breaks CodeGen. More below.

High-level changes:
- As before, TagType still refers to a TagDecl, but it doesn't own it. When
a struct/union/class is first referenced, a RecordType and RecordDecl are
created for it, and the RecordType refers to that RecordDecl. Later, if
a new RecordDecl is created, the pointer to a RecordDecl in RecordType is
updated to point to the RecordDecl that defines the struct/union/class.

- TagDecl and RecordDecl now how a method 'getDefinition()' to return the
TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular
enum/struct/class/union. This is useful from going from a RecordDecl* that
defines a forward declaration to the RecordDecl* that provides the actual
definition. Note that this also works for EnumDecls, except that in this case
there is no distinction between forward declarations and definitions (yet).

- Clients should no longer assume that 'isDefinition()' returns true from a
RecordDecl if the corresponding struct/union/class has been defined.
isDefinition() only returns true if a particular RecordDecl is the defining
Decl. Use 'getDefinition()' instead to determine if a struct has been defined.

- The main changes to Sema happen in ActOnTag. To make the changes more
incremental, I split off the processing of enums and structs et al into two
code paths. Enums use the original code path (which is in ActOnTag) and
structs use the ActOnTagStruct. Eventually the two code paths will be merged,
but the idea was to preserve the original logic both for comparison and not to
change the logic for both enums and structs all at once.

- There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls
that correspond to the same type simply have a pointer to that type. If we
need to figure out what are all the RecordDecls for a given type we can build
a backmap.

- The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the
changes to RecordDecl. For some reason 'svn' marks the entire file as changed.

Why is CodeGen broken:
- Codegen assumes that there is an equivalence between RecordDecl* and
RecordType*. This was true before because we only created one RecordDecl* for
a given RecordType*, but it is no longer true. I believe this shouldn't be too
hard to change, but the patch was big enough as it is.

I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclCXX.h
lang/AST/Type.h
435adbe78af0b462e0826c3354cf3aecb79dff89 05-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix placement of const on a number of X86 builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
797a35d8a426e85e32d524e833b244242d0edb5d 05-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix placement of const on a number of X86 builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
2c9840470bd025cc60b88fa86dff1122d48b6a3a 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.

The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
df042e6c2bf06b2d9ed53c52469599ac1bd93a3f 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.

The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
4fea7b688be1fd4fd3fd34ed70127c78904eaa91 04-Sep-2008 Steve Naroff <snaroff@apple.com> Touchup CheckSingleAssignmentConstraints() and CheckCompareOperands() to check for block pointers.
Added a couple FIXME's wrt PointLikeType. If the author reads this, it would be great to get some background on this class (thanks in advance).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
39218dfef550ad1cd7b7ece83a715996a113ffd1 04-Sep-2008 Steve Naroff <snaroff@apple.com> Touchup CheckSingleAssignmentConstraints() and CheckCompareOperands() to check for block pointers.
Added a couple FIXME's wrt PointLikeType. If the author reads this, it would be great to get some background on this class (thanks in advance).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3454b6cd8d58c98e2a867fb1104af11e1c183f68 04-Sep-2008 Steve Naroff <snaroff@apple.com> Add type checking for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
1c7d067550c2d9bca8997d0e67ee6b280d493202 04-Sep-2008 Steve Naroff <snaroff@apple.com> Add type checking for blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
c6c927427b946f660ea7eaf1528142c3e33440bf 04-Sep-2008 Mon P Wang <wangmp@apple.com> Generate error if we try to implicit cast between different address
spaces


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3a2c7449e356ed74552450bc1dd50691c8202770 04-Sep-2008 Mon P Wang <wangmp@apple.com> Generate error if we try to implicit cast between different address
spaces


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55765 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
30ad42d076bf0b3804f641ef2a006cc1486a9a5e 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_object_size support.
- Currently CodeGen always returns a conservative value for this (-1
or 0 depending on the context).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
d5f8a4fd4d6dfb0415b93bb7ab721bba5cab1332 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_object_size support.
- Currently CodeGen always returns a conservative value for this (-1
or 0 depending on the context).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
e4031f2b7eeba198f7560bf7f6f35d10e685adf3 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Modify object size checking builtins to lower to libc calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
b0a86c21f934d2dd9d5a6da2e52ee833da1d437b 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Modify object size checking builtins to lower to libc calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
52a81c04a25001409f8b0c9b296248fd7cf80e13 03-Sep-2008 Steve Naroff <snaroff@apple.com> Add semantic analysis for "blocks".

Highlights...

- 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr.
- Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt().

Next steps...

- hack Sema::ActOnIdentifierExpr() to deal with block decl refs.
- add attribute handler for byref decls.
- add test cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
4eb206bebcdab28ababe8df55c6185cec2cdc071 03-Sep-2008 Steve Naroff <snaroff@apple.com> Add semantic analysis for "blocks".

Highlights...

- 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr.
- Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt().

Next steps...

- hack Sema::ActOnIdentifierExpr() to deal with block decl refs.
- add attribute handler for byref decls.
- add test cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
58c2960a3af3c0b8a8a75286102de0bdb10dedf2 03-Sep-2008 Ted Kremenek <kremenek@apple.com> Store: (static analyzer)
- Change definition of store::Region and store::Binding (once again) to make
them real classes that just wrap pointers. This makes them more strictly
typed, and allows specific implementations of Regions/Bindings to just
subclass them.
- minor renamings to RegionExtent and its subclasses
- added a bunch of doxygen comments

StoreManager: (static analyzer)
- added 'iterBindings', an iteration method for iterating over the bindings of a
store. It that takes a callback object (acting like a poor man's closure).
- added 'getRVal' version for store::Binding. Will potentially phase the other
versions of GetRVal in StoreManager out.
- reimplemented 'getBindings' to be non-virtual and to use 'iterBindings'

BasicStoreManager: (static analyzer)
- implemented 'iterBindings' for BasicStoreManager



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
60dbad831a35ba0f58256b9bcd2a085af98ff2ec 03-Sep-2008 Ted Kremenek <kremenek@apple.com> Store: (static analyzer)
- Change definition of store::Region and store::Binding (once again) to make
them real classes that just wrap pointers. This makes them more strictly
typed, and allows specific implementations of Regions/Bindings to just
subclass them.
- minor renamings to RegionExtent and its subclasses
- added a bunch of doxygen comments

StoreManager: (static analyzer)
- added 'iterBindings', an iteration method for iterating over the bindings of a
store. It that takes a callback object (acting like a poor man's closure).
- added 'getRVal' version for store::Binding. Will potentially phase the other
versions of GetRVal in StoreManager out.
- reimplemented 'getBindings' to be non-virtual and to use 'iterBindings'

BasicStoreManager: (static analyzer)
- implemented 'iterBindings' for BasicStoreManager



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55688 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
cc37ac5424171a333153f8c480a562072132b948 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix ObjCPropertRefExpr to be able to encode all the information for
uses which refer to methods not properties.
- Not yet wired in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
e66f4e3e3ae9d7d11b0c302211066fad69228aba 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix ObjCPropertRefExpr to be able to encode all the information for
uses which refer to methods not properties.
- Not yet wired in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
6f0a241910c5a64854d80b177d501e727c91dbaf 02-Sep-2008 Ted Kremenek <kremenek@apple.com> RecordDecl:
- Remove method 'isForwardDecl'; this functionality is already provided by
'isDefinition()'
- Move method definitions to be co-located with other RecordDecl methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6359792ca92e7ca2f416cb804c6604358174e994 02-Sep-2008 Ted Kremenek <kremenek@apple.com> RecordDecl:
- Remove method 'isForwardDecl'; this functionality is already provided by
'isDefinition()'
- Move method definitions to be co-located with other RecordDecl methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
10a6fb834bef82daafe90ecee593ffb31d25d284 02-Sep-2008 Ted Kremenek <kremenek@apple.com> RecordDecl:
- Added method 'isForwardDeclaration', a predicate method that returns true
if a RecordDecl represents a forward declaration.
- Added method 'getDefinitionDecl', a query method that returns a pointer to
the RecordDecl that provides the actual definition of a struct/union.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a39da065766bdfeee3421a2e71f60ae579170fef 02-Sep-2008 Ted Kremenek <kremenek@apple.com> RecordDecl:
- Added method 'isForwardDeclaration', a predicate method that returns true
if a RecordDecl represents a forward declaration.
- Added method 'getDefinitionDecl', a query method that returns a pointer to
the RecordDecl that provides the actual definition of a struct/union.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55642 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
25d8be16495d3952b6b50d6e8ed2ff6d58c02185 02-Sep-2008 Ted Kremenek <kremenek@apple.com> CXXRecordDecl and RecordDecl:
- Change constructor and create methods to accept a CXXRecordDecl* (RecordDecl*)
instead of a ScopedDecl* for PrevDecl. This causes the type checking
to be more tight and doesn't break any code.

RecordDecl:

- Don't use the NextDeclarator field in ScopedDecl to represent the previous
declaration. This is a conflated use of the NextDeclarator field, which will
be removed anyway when DeclGroups are fully implemented.

- Instead, represent (a soon to be implemented) chain of RecordDecls using a
NextDecl field. The last RecordDecl in the chain is always the 'defining'
RecordDecl that owns the FieldDecls. The other RecordDecls in the chain
are forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
df91eca19bd9738abd9a3b84791f39750e27ad36 02-Sep-2008 Ted Kremenek <kremenek@apple.com> CXXRecordDecl and RecordDecl:
- Change constructor and create methods to accept a CXXRecordDecl* (RecordDecl*)
instead of a ScopedDecl* for PrevDecl. This causes the type checking
to be more tight and doesn't break any code.

RecordDecl:

- Don't use the NextDeclarator field in ScopedDecl to represent the previous
declaration. This is a conflated use of the NextDeclarator field, which will
be removed anyway when DeclGroups are fully implemented.

- Instead, represent (a soon to be implemented) chain of RecordDecls using a
NextDecl field. The last RecordDecl in the chain is always the 'defining'
RecordDecl that owns the FieldDecls. The other RecordDecls in the chain
are forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
283b362bfa22140bc53a1a891ee905d6f47a1aa2 02-Sep-2008 Eli Friedman <eli.friedman@gmail.com> An extremely hacky version of transparent_union support; it isn't
anywhere near correct in terms of missing cases and missing
diagnostics, but it's good enough to handle the uses in the
Linux system headers, which are currently a constant pain for compiling
applications on Linux.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bc88745b43f440341e60ed93b0d27bac7c418029 02-Sep-2008 Eli Friedman <eli.friedman@gmail.com> An extremely hacky version of transparent_union support; it isn't
anywhere near correct in terms of missing cases and missing
diagnostics, but it's good enough to handle the uses in the
Linux system headers, which are currently a constant pain for compiling
applications on Linux.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6a1fdd913f6f7ff86fc55955edc82439aa983e47 02-Sep-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fit the comments into 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRWorkList.h
f43aa4410f6fa53d72a277b3429c9f814f54d1b5 02-Sep-2008 Zhongxing Xu <xuzhongxing@gmail.com> Fit the comments into 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRWorkList.h
7af441b7228bcb16ebc216b071227ab07a7436cc 01-Sep-2008 Ted Kremenek <kremenek@apple.com> Tidy up sema processing of attribute "nonull":
- warn about nonnull being applied to functions with no pointer arguments
- continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull
- when no argument list is specified, only mark pointers as nonnull. This fixes PR 2732 and radar 6188814.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7fb43c17eb2b4102f40a80a355629aacd70589ad 01-Sep-2008 Ted Kremenek <kremenek@apple.com> Tidy up sema processing of attribute "nonull":
- warn about nonnull being applied to functions with no pointer arguments
- continue processing argument list in the attribute when we encounter a non-pointer parameter being marked as nonnull
- when no argument list is specified, only mark pointers as nonnull. This fixes PR 2732 and radar 6188814.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55610 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a7bbf567dac9dfd58f12c9ff14584d64104694f3 01-Sep-2008 Nuno Lopes <nunoplopes@sapo.pt> codegen constant data as such. add QualType::isConstant()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b381aac9bae6d608c72267dd0ed08ec6369e94e4 01-Sep-2008 Nuno Lopes <nunoplopes@sapo.pt> codegen constant data as such. add QualType::isConstant()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f58cac7442d6aca9e95a32e9ae90f92fbf7d9af8 30-Aug-2008 Anders Carlsson <andersca@mac.com> Add code to create the fast enumeration state type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bd4c1ada2e8668f43a865dc2c662085cf61940c4 30-Aug-2008 Anders Carlsson <andersca@mac.com> Add code to create the fast enumeration state type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
42b265fccb1d7357ef3239848fe4696f87d1f1ea 29-Aug-2008 Nico Weber <nicolasweber@gmx.de> fix a comment that was forgotten in r54071

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
91c027e2021366396696977af7fdc0e070bdd614 29-Aug-2008 Nico Weber <nicolasweber@gmx.de> fix a comment that was forgotten in r54071

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
7d3196c6490848e8b7805c490415274551cdd3b1 29-Aug-2008 Nico Weber <nicolasweber@gmx.de> minor cleanup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
491be73282d5483c2f799289ed90cc0011fde4bd 29-Aug-2008 Nico Weber <nicolasweber@gmx.de> minor cleanup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55538 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
864792476ff053794a75db6ed374f6fadd59182f 29-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Added LLVM comment header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
d19e21bcd347542bd1fa9ec767f14d91ef593d34 29-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Added LLVM comment header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
c6b27d0375e0a3996917f17efb4d2b9d118d868e 29-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Migrate the rest symbolic analysis stuff to BasicConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
39cfed397baf1ffca0ab85cfa3d03087fe80e2cc 29-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Migrate the rest symbolic analysis stuff to BasicConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
be9b6f73a2fa3ffe32e430ac6c09ae359a61a956 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Added "getBindings" and "BindingAsString" to GRStateManager and StoreManager.

Migrated CFRefCount.cpp to use getBindings and BindingsAsString instead of
making assumptions about the Store (removed dependence on GRState::vb_iterator).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
2bc39c61077e6a49728f309bb80a949fb0b2aaff 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Added "getBindings" and "BindingAsString" to GRStateManager and StoreManager.

Migrated CFRefCount.cpp to use getBindings and BindingsAsString instead of
making assumptions about the Store (removed dependence on GRState::vb_iterator).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55522 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
1486404010c41b3aee3cebc8a7c1312e56a05f45 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove BasicStore.h (migrated function prototype for CreateBasicStore() to Store.h)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/Store.h
c0637cfe928da2251d4379602c1c86fa5f0de2ca 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove BasicStore.h (migrated function prototype for CreateBasicStore() to Store.h)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55519 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/Store.h
33a78a06045664bf9e9f6d42cb7f9f4dbea8077e 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove Regions.h and Regions.cpp, since we are now using an even more abstract representation of "memory regions" in the static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Regions.h
05d0977a1c1a02bd2258113bbb623da43904c8ef 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove Regions.h and Regions.cpp, since we are now using an even more abstract representation of "memory regions" in the static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Regions.h
6e91367c609974936c08b409b15ecd66befbf2d9 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Make store "Regions" and "Bindings" more abstract instead of concrete variants.
Their precise semantics will be implemented by a specific StoreManager.

Use function pointer to create the StoreManager in GRStateManager. This matches how we create ConstraintsManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
5f81c4415422b0aa5c59db69580b1079fc12a65f 29-Aug-2008 Ted Kremenek <kremenek@apple.com> Make store "Regions" and "Bindings" more abstract instead of concrete variants.
Their precise semantics will be implemented by a specific StoreManager.

Use function pointer to create the StoreManager in GRStateManager. This matches how we create ConstraintsManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55514 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
fd5b19da83002f37a74c2631dd07e742ed36221a 28-Aug-2008 Steve Naroff <snaroff@apple.com> Add parser/action support for block literal expressions.
Parser support for blocks is almost complete...just need to add support for the __block() storage class qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
296e8d5fdcf9946f51e866adc8d281379e51efe9 28-Aug-2008 Steve Naroff <snaroff@apple.com> Add parser/action support for block literal expressions.
Parser support for blocks is almost complete...just need to add support for the __block() storage class qualifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
c8ce08a3b93442e54ce14f881f0fdaeb1bd037cd 28-Aug-2008 Ted Kremenek <kremenek@apple.com> Fixed analyzer caching bug involving the transfer function for loads.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
982e674e39b8022ff7dc020f9ed371f3904549c3 28-Aug-2008 Ted Kremenek <kremenek@apple.com> Fixed analyzer caching bug involving the transfer function for loads.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
448ab62469bc7ef086990b9935e999c6b93532be 28-Aug-2008 Ted Kremenek <kremenek@apple.com> Fixed analyzer caching bug in DeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
e6c62e3d43728b0a4477fffd543723dd2170af1a 28-Aug-2008 Ted Kremenek <kremenek@apple.com> Fixed analyzer caching bug in DeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
7cfb85b8d1b17cd6e162f74762c58f95562db1e5 28-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix double-free error with sizeof applied to VLA types.
- PR2727.

Also, fix warning in CodeGenTypes for new BlockPointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9048891ff983d0681c116c6e8f1073aa31bdd6e8 28-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix double-free error with sizeof applied to VLA types.
- PR2727.

Also, fix warning in CodeGenTypes for new BlockPointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d38e358df9caf6494cf0e0222dec39c9a48c3b56 28-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Fix compilation error on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
77a49f6b1e5741f6bda71eb7837b43343925027b 28-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix compilation error on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
698d6f390d47eff6d4317c9d8423009bb816f3fb 28-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit mostly-correct property type encoding.
- Added ASTContext::getObjCEncodingForPropertyDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c56f34a1c1779de15330bdb3eec39b3418802d47 28-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit mostly-correct property type encoding.
- Added ASTContext::getObjCEncodingForPropertyDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8904fbee197eae8906ed55a37becf62b35f8af58 28-Aug-2008 Ted Kremenek <kremenek@apple.com> Make the destructor of ConstraintManager virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
05125f180d8f0967d8bcb7e9d578e36eb6905b92 28-Aug-2008 Ted Kremenek <kremenek@apple.com> Make the destructor of ConstraintManager virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55448 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ConstraintManager.h
7aa5475ca2f62df5ba3f3b647ee141a40bf48fd3 27-Aug-2008 Steve Naroff <snaroff@apple.com> First wave of changes to support "blocks" (an extension to C).
This commit adds the declaration syntax (and associated type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Basic/LangOptions.h
lang/Parse/DeclSpec.h
5618bd4a52c45fbbb605e3ba885663b2164db8a3 27-Aug-2008 Steve Naroff <snaroff@apple.com> First wave of changes to support "blocks" (an extension to C).
This commit adds the declaration syntax (and associated type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Basic/LangOptions.h
lang/Parse/DeclSpec.h
c6694976950e882d7c06f403d13175a29ea768bc 27-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Refactor Assume logic into a separate class ConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
30ad167f74cb8a04c35ced6c69b116f15d104f8e 27-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Refactor Assume logic into a separate class ConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/ConstraintManager.h
lang/Analysis/PathSensitive/GRState.h
d01a70258cb228ad8d1739cfec5cbb2507ced3f5 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add addPropertyMethods implementations for
ObjC{Category,Protocol}Decl.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7b4732296b5c7e1a53021a8dbb97f39dedbd961f 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add addPropertyMethods implementations for
ObjC{Category,Protocol}Decl.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e9772a2dd4a254f6d2695cb026b10c8822abb584 27-Aug-2008 Ted Kremenek <kremenek@apple.com> Added "Auditor" interface for auditing the construction of ExplodedGraphs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
2e287540c90255e14208e7e5f43f07cb752a1fd7 27-Aug-2008 Ted Kremenek <kremenek@apple.com> Added "Auditor" interface for auditing the construction of ExplodedGraphs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
0bd7ddd12e41c85faf469d961676ee9112c56303 27-Aug-2008 Ted Kremenek <kremenek@apple.com> Make implementation of ExplodedNodeImpl::addPredecessor out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
45b8789258b282769b03cbeb68e9f5b0308f067b 27-Aug-2008 Ted Kremenek <kremenek@apple.com> Make implementation of ExplodedNodeImpl::addPredecessor out-of-line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
1450fc8e59b9575d8a6a00959414f2e10d9c9a3b 27-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove default value for 'Pred' argument to GRCoreEngineImpl::GenerateNode().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
38a23ba1938b3996718d028f3505bc5ef8c07abd 27-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove default value for 'Pred' argument to GRCoreEngineImpl::GenerateNode().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55392 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
6b57d43f67bb4f9bfec53e65ce4787ccf9f4445d 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Objective-C @synthesize support.
- Only supports simple assignment and atomic semantics are ignored.
- Not quite usable yet because the methods do not actually get added
to the class metadata.
- Added ObjCPropertyDecl::getSetterKind (one of Assign, Copy, Retain).
- Rearrange CodeGenFunction so synthesis can reuse function prolog /
epilog code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
af05bb9073319d8381b71c4325188853fd4b8ed6 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Objective-C @synthesize support.
- Only supports simple assignment and atomic semantics are ignored.
- Not quite usable yet because the methods do not actually get added
to the class metadata.
- Added ObjCPropertyDecl::getSetterKind (one of Assign, Copy, Retain).
- Rearrange CodeGenFunction so synthesis can reuse function prolog /
epilog code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
db3b4491329dd898e6b133be2e193f13fa3123a3 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add ObjCPropertyDecl::isReadOnly.

Respect isReadOnly when generating synthesized method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
394d33f1f602f7681032a659dff5bb09061ee510 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add ObjCPropertyDecl::isReadOnly.

Respect isReadOnly when generating synthesized method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
dd24b9ac61e21a196e6c2222b97ad60d0aaa377e 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> constify ObjC*::getClassMethod,getInstanceMethod

No (intended) functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3216dcdebb8ae0f2993ac5f5249caa217444bacf 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> constify ObjC*::getClassMethod,getInstanceMethod

No (intended) functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
eaf91c3bc35b4802d65c0213388b600108a8c735 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move implicit Obj-C param creation into ObjCMethodDecl.
- Add ObjCMethodDecl::createImplicitParams.
- Remove ObjCMethodDecl::set{Self,Cmd}Decl
- Remove Sema::CreateImplicitParameter

No (intended) functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
451318c08a6342c10b8986060386fd9274418437 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move implicit Obj-C param creation into ObjCMethodDecl.
- Add ObjCMethodDecl::createImplicitParams.
- Remove ObjCMethodDecl::set{Self,Cmd}Decl
- Remove Sema::CreateImplicitParameter

No (intended) functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
14117fc5e21d0994bcbc2cfe9c7baff629f24e62 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Rename ObjCPropertyImplDecl::PropertyImplKind (consistency)
- Change enum name to Kind.
- Change enum constants to English strings.

Also, fix getPropertyImplementation (which probably should be renamed)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9f0afd4e79601d9982072ff9318e6f9a982c770e 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Rename ObjCPropertyImplDecl::PropertyImplKind (consistency)
- Change enum name to Kind.
- Change enum constants to English strings.

Also, fix getPropertyImplementation (which probably should be renamed)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f5fce10c8a80df09629519cb4c60518873616bb8 25-Aug-2008 Ted Kremenek <kremenek@apple.com> Added 'extents' for Regions.
Added 'getExtent()' to StoreManager.
Implemented 'getExtent()' for BasicStoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Regions.h
lang/Analysis/PathSensitive/Store.h
d0c4b28aa9e1a0754d71dc61c37cda94bc8d27ed 25-Aug-2008 Ted Kremenek <kremenek@apple.com> Added 'extents' for Regions.
Added 'getExtent()' to StoreManager.
Implemented 'getExtent()' for BasicStoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Regions.h
lang/Analysis/PathSensitive/Store.h
8d0bcb090775b3285ac99692db61e349eda03366 25-Aug-2008 Anders Carlsson <andersca@mac.com> Objective-C foreach selector elements must be lvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1fe379f0fa6fbc0a6057e8966253aea2957ca953 25-Aug-2008 Anders Carlsson <andersca@mac.com> Objective-C foreach selector elements must be lvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
cb6d4126d69b135e08f57697e01822837a8c5d9f 24-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Pass SourceRanges by reference to the various Diag methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a88b509d233d3f42382130c159c05cafa006b3e0 24-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass SourceRanges by reference to the various Diag methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55284 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
42aeddeb0b9751092971948724991892f58bf93c 24-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add a Parser::Diag overload that can receive a custom string along with a SourceRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
897e7a38c73a28731f8cdbaa4385ca15ab65820c 24-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a Parser::Diag overload that can receive a custom string along with a SourceRange.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55283 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a586ce15b14d655967114be5a65e78480d0112a7 24-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ed5c38682c056c147c8a4abb748b4f285de206dd 24-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
e70794404ac74f1859dcbd3b11f0b80e1bd0b0a1 24-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Moved HTMLDiagnostics to lib/Driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HTMLDiagnostics.h
8148839c105992f00be9fd23f68f2139a9112ebf 24-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Moved HTMLDiagnostics to lib/Driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/HTMLDiagnostics.h
da4ffb982f2703a3da0f87c067d8c33b6a9a78ae 24-Aug-2008 Chris Lattner <sabre@nondot.org> Comment tweak.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
e671e1bc73615eda155059a772266ed2882d758c 24-Aug-2008 Chris Lattner <sabre@nondot.org> Comment tweak.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
d83141a546b6aa53591ec8ba684da5364661abc6 24-Aug-2008 Anders Carlsson <andersca@mac.com> Add support for parsing the objc_gc attribute. Tests will come shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
aa0d25b44e510a5a62e7345f4fa3840a886841d2 24-Aug-2008 Anders Carlsson <andersca@mac.com> Add support for parsing the objc_gc attribute. Tests will come shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55269 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
07f9adeda2118c4a8739736befc3c102b5ef1d62 23-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> CXXFunctionalCastExpr is a subclass of CastExpr. Make it known to isa/dyn_cast/cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cb6accb4659af86627ce43f7a90bc92f763b075e 23-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> CXXFunctionalCastExpr is a subclass of CastExpr. Make it known to isa/dyn_cast/cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3454295c2de47811a2b7fae8551c11bbd8ef2aff 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::useNeXTRuntimeAsDefault
- Used to autoselect runtime when neither -fnext-runtime nor
-fgnu-runtime is specified.
- Default impl is false, all darwin targets set it to true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
dcb4a1a6dd55fdf6c073d2761096f42e26be105a 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::useNeXTRuntimeAsDefault
- Used to autoselect runtime when neither -fnext-runtime nor
-fgnu-runtime is specified.
- Default impl is false, all darwin targets set it to true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c1aea81eeb1cb5eba57d2658ada786ab5eb5a3c9 23-Aug-2008 Chris Lattner <sabre@nondot.org> make sure that ParseAST invokes the action for end of translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9299f3fa85796613cc787a2062c9562d07c8613e 23-Aug-2008 Chris Lattner <sabre@nondot.org> make sure that ParseAST invokes the action for end of translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55222 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
bd0f8f5810dad89263213952ea8c8a84ba373591 23-Aug-2008 Chris Lattner <sabre@nondot.org> add action to know about end of translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a9e8fec80088f4e176d80b84bddddfbc9ab0f548 23-Aug-2008 Chris Lattner <sabre@nondot.org> add action to know about end of translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
818350cf723b5ee1c4707e78210adc5267ce9f36 23-Aug-2008 Chris Lattner <sabre@nondot.org> we already have a handle on the 'in' keyword, don't bother getting two.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5ffb14b7e88e587cd2f78dcc3a966a64108920f0 23-Aug-2008 Chris Lattner <sabre@nondot.org> we already have a handle on the 'in' keyword, don't bother getting two.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55217 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f7df4d19c10a7d7ed2b49a4f057a4ee39c6fb85b 23-Aug-2008 Chris Lattner <sabre@nondot.org> minor cleanup, remove finalize method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
06f548596beef4c0a227a45cba996497f99566c0 23-Aug-2008 Chris Lattner <sabre@nondot.org> minor cleanup, remove finalize method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b576933316d6be9777b5c60f1a31d89cc0b14f29 23-Aug-2008 Chris Lattner <sabre@nondot.org> Fix a FIXME by not creating an invalid AST on erroneous input. Also
make diagnostic output in some other malformed cases significantly
more useful. This fixes PR2708


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e8904e992ca5e821b199c4577e8b5e5b17a33b1d 23-Aug-2008 Chris Lattner <sabre@nondot.org> Fix a FIXME by not creating an invalid AST on erroneous input. Also
make diagnostic output in some other malformed cases significantly
more useful. This fixes PR2708


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55215 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4fbc6418a48a094bd25b5e45193499da855e732a 23-Aug-2008 Ted Kremenek <kremenek@apple.com> Simplify interface to Store::AddDecl


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
e53c069bdaf0683f52ecfaf45ccfc816fdb4288f 23-Aug-2008 Ted Kremenek <kremenek@apple.com> Simplify interface to Store::AddDecl


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55213 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
000da5a2f41109d8eedf9576197f3241934e8b44 23-Aug-2008 Ted Kremenek <kremenek@apple.com> Added Regions.h: Regions define abstract memory locations for the static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Regions.h
lang/Analysis/PathSensitive/Store.h
f03a8d276ced40f55478bfc29326c4365510e84c 23-Aug-2008 Ted Kremenek <kremenek@apple.com> Added Regions.h: Regions define abstract memory locations for the static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Regions.h
lang/Analysis/PathSensitive/Store.h
a9a0f4b70656d49cac754547ae3f5e60b09f0997 22-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Allow nested backtracks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
a9e274c01ebae45629d93aaa07be450fb77dd3cb 22-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow nested backtracks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55204 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
c9f8ccd5c7e6b6686113440bc11e1bf341681cc0 22-Aug-2008 Anders Carlsson <andersca@mac.com> Add preliminary (and probably broken) codegen support for C++ static initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
e1b29efab32d02e114046d33cca242a88585bf8a 22-Aug-2008 Anders Carlsson <andersca@mac.com> Add preliminary (and probably broken) codegen support for C++ static initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
7a1e74100c4f7e3f0e85775861cdf4851df616bd 22-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add support for C++'s "type-specifier ( expression-list )" expression:

-The Parser calls a new "ActOnCXXTypeConstructExpr" action.
-Sema, depending on the type and expressions number:
-If the type is a class, it will treat it as a class constructor. [TODO]
-If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node
-If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
987a14bf5883ef6e5d07f1c83eb6d41a8212a78c 22-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add support for C++'s "type-specifier ( expression-list )" expression:

-The Parser calls a new "ActOnCXXTypeConstructExpr" action.
-Sema, depending on the type and expressions number:
-If the type is a class, it will treat it as a class constructor. [TODO]
-If there's only one expression (i.e. "int(0.5)" ), creates a new "CXXFunctionalCastExpr" Expr node
-If there are no expressions (i.e "int()" ), creates a new "CXXZeroInitValueExpr" Expr node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
770e388f6c7d0614b13a663b7c6f996db14d7229 22-Aug-2008 Nico Weber <nicolasweber@gmx.de> Move most of HeaderSearch initialization to libDriver.

For example, adding the default system include paths in clients is now as
simple as

InitHeaderSearch init(headers);
init.AddDefaultSystemIncludePaths(langopts);
init.Realize();



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/InitHeaderSearch.h
0fca022d77b89100e746f4d659b84ed5b1ee0158 22-Aug-2008 Nico Weber <nicolasweber@gmx.de> Move most of HeaderSearch initialization to libDriver.

For example, adding the default system include paths in clients is now as
simple as

InitHeaderSearch init(headers);
init.AddDefaultSystemIncludePaths(langopts);
init.Realize();



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/InitHeaderSearch.h
36104c1a2a18f1f78eba031e3a7a76d40416c4a7 22-Aug-2008 Eli Friedman <eli.friedman@gmail.com> Minor const cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
86da77fdaf4c0237eafb9670f54eee20b08635bf 22-Aug-2008 Eli Friedman <eli.friedman@gmail.com> Minor const cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
0d9549ba8a0dfae3cc59532884a050c098bc9418 22-Aug-2008 Eli Friedman <eli.friedman@gmail.com> Rewrite type compatibility testing to do type merging rather than just
testing compatibility. This is necessary for some constructs, like merging
redeclarations.

Also, there are some ObjC changes to make sure that
typesAreCompatible(a,b) == typesAreCompatible(b,a). I don't have any
ObjC code beyond the testsuite, so please tell me if there are any cases
where this doesn't behave as expected.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3d815e7eb56c25d7ed812eced32e41df43039f9a 22-Aug-2008 Eli Friedman <eli.friedman@gmail.com> Rewrite type compatibility testing to do type merging rather than just
testing compatibility. This is necessary for some constructs, like merging
redeclarations.

Also, there are some ObjC changes to make sure that
typesAreCompatible(a,b) == typesAreCompatible(b,a). I don't have any
ObjC code beyond the testsuite, so please tell me if there are any cases
where this doesn't behave as expected.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55158 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2378ba0bc36ecc5cc5cc0ece535afe84d7a4767b 22-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Move the handling of DeclStmt from GRExprEngine to BasicStoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
bbe8ff48be1728ef145c874d6d99879fac78892f 22-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Move the handling of DeclStmt from GRExprEngine to BasicStoreManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
67e778b69acc0d657966c50e9df7118ecfdc1b7f 21-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit [meta]class protocol references.

Updated ObjCProtocolDecl::protocol_iterator to match that of
ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
dbc933701d20918add13b6a3c9d47ff8c75419cf 21-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit [meta]class protocol references.

Updated ObjCProtocolDecl::protocol_iterator to match that of
ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
34c850809dc1f97ca3003e24d3cd02cf19e9f5d5 21-Aug-2008 Chris Lattner <sabre@nondot.org> add a simple check to warn people who type "=+" when they probably meant
"+=".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2c15647dce6de66f673cc64236913732d6289317 21-Aug-2008 Chris Lattner <sabre@nondot.org> add a simple check to warn people who type "=+" when they probably meant
"+=".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d8bd6822067df6da893ecbc112839258fcc08715 20-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix attributes on Obj-C interfaces & methods.
- Drop MethodAttrs parameter to ObjCMethodDecl
- Call ProcessDeclAttributeList for interface & method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f6414927e67e27d9324d8d179c5f7ea620443924 20-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix attributes on Obj-C interfaces & methods.
- Drop MethodAttrs parameter to ObjCMethodDecl
- Call ProcessDeclAttributeList for interface & method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3a53916ab9962cbb5a43b4e00e19b898a5a8e6f5 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Patch by Zhongxing Xu:

This patch moves some code in GRStateManager::RemoveDeadBindings() to EnvironmentManager::RemoveDeadBindings().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
df9cdf8fce5bb43b335994f946f7c8e3a3bca7fa 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Patch by Zhongxing Xu:

This patch moves some code in GRStateManager::RemoveDeadBindings() to EnvironmentManager::RemoveDeadBindings().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55064 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
e5bedfe77babdf1060c875b3f303d8d331e4598b 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
01e6779faca1e3a3164c697d6e2dfee0881a6981 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
bdff9a967335e14690038f8bd484f925b0b39dfc 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Move store pretty-printing logic inside of StoreManager (previously in GRState).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
a622d8c2719e927b47f48dbebcece770e752dfb8 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Move store pretty-printing logic inside of StoreManager (previously in GRState).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
e2fb8c72b130ec9ef6a3c732aa6d8da054e706fa 19-Aug-2008 Ted Kremenek <kremenek@apple.com> Patch by Zhongxing Xu!

This patch extends BasicStoreManager::getInitialStore() to include code that symbolicates input variables.
It also removes redundant handling of ImplicitParamDecl, since it is a subclass of VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
caa3724b1d525a888982f94a6ae2b527eb3bca7d 19-Aug-2008 Ted Kremenek <kremenek@apple.com> Patch by Zhongxing Xu!

This patch extends BasicStoreManager::getInitialStore() to include code that symbolicates input variables.
It also removes redundant handling of ImplicitParamDecl, since it is a subclass of VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/Store.h
c45e2fb32e93cda8c423c721fae52b7321e2ee04 19-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):

Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
0835a3cdeefe714b4959d31127ea155e56393125 19-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):

Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
823f51978b198f35527b59cee033ede54ad1116c 19-Aug-2008 Chris Lattner <sabre@nondot.org> proper grammar n stuph


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4f3278fe397250b75ba5a0b5a6cf98309bd2ad2c 19-Aug-2008 Chris Lattner <sabre@nondot.org> proper grammar n stuph


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
31fccafe4379c59e18f9b8c62c00945590fae6e9 19-Aug-2008 Chris Lattner <sabre@nondot.org> warn when someone tries to make an array of ObjC interfaces instead of array
of pointers to them. rdar://4304469


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
43477ca46792311640cf29b7cff731e29bebb146 19-Aug-2008 Chris Lattner <sabre@nondot.org> warn when someone tries to make an array of ObjC interfaces instead of array
of pointers to them. rdar://4304469


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b052a839ef3afd954146645d21fa2769412aabeb 18-Aug-2008 Chris Lattner <sabre@nondot.org> Several cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt,
no other functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1708b963a014b48103e78131f960a13ee1aa6d0c 18-Aug-2008 Chris Lattner <sabre@nondot.org> Several cleanups and tweaks to diagnostics in Sema::ActOnAsmStmt,
no other functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e2247808489909944edb002dbd8ad48305b91cfb 18-Aug-2008 Daniel Dunbar <daniel@zuster.org> Make TargetInfo::DescriptionString const (avoid compiler warnings)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
77e8b53fe3ff630d8d1454db94e38bedda14d5ca 18-Aug-2008 Daniel Dunbar <daniel@zuster.org> Make TargetInfo::DescriptionString const (avoid compiler warnings)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
ebd8f0f733941871aab785716aab27cb97fdcb38 18-Aug-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Allow targets to override description string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
364af81157a81cf34bb058a7d5b0185020e5164b 18-Aug-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Allow targets to override description string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
85bd81edce4057156d7f49408147f07daa675096 17-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Type::isIntegerType() returns true for types between Bool and LongLong.
Put WChar between them to make it integer type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2ff9b4c7c8fed9233a0b8de2e9507368c451aab6 17-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Type::isIntegerType() returns true for types between Bool and LongLong.
Put WChar between them to make it integer type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9178120328d1a718dc5ff7cdc925583a379b4f0b 17-Aug-2008 Ted Kremenek <kremenek@apple.com> Migrate the retain/release checker to not manage the RefBindings::Factory object
directly, but instead have GRStateManager manage it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRStateTrait.h
b9d17f9384651d1052a17978d2e160448bfad404 17-Aug-2008 Ted Kremenek <kremenek@apple.com> Migrate the retain/release checker to not manage the RefBindings::Factory object
directly, but instead have GRStateManager manage it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRStateTrait.h
80fcbb9adfa841c7ac02b79dd0f61fc7e40c6f0f 17-Aug-2008 Ted Kremenek <kremenek@apple.com> Migrate GRState::ConstEqTy (map used from tracking constants for symbols) to use the generic data map instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
ffdbefd4415c33c8e1a25a950f36cb8e1e2c8673 17-Aug-2008 Ted Kremenek <kremenek@apple.com> Migrate GRState::ConstEqTy (map used from tracking constants for symbols) to use the generic data map instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
67ff8b934c5d2b5d881601f6fb6a902024b8317b 17-Aug-2008 Ted Kremenek <kremenek@apple.com> Added GRStateTrait.h, which includes boilerplate code for creating specializations of GRStateTrait<>.
Modified GRStateTrait<ConstNotEq> in GRState to use the boilerplate in GRStateTrait<> for ImmutableMaps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
lang/Analysis/PathSensitive/GRWorkList.h
e7aa9a13642f50101ac1718098b41f8788b115bc 17-Aug-2008 Ted Kremenek <kremenek@apple.com> Added GRStateTrait.h, which includes boilerplate code for creating specializations of GRStateTrait<>.
Modified GRStateTrait<ConstNotEq> in GRState to use the boilerplate in GRStateTrait<> for ImmutableMaps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54859 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRStateTrait.h
lang/Analysis/PathSensitive/GRWorkList.h
83dce119c4264b8a5ac2de5fd12f5902a36c519f 16-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Put (argument)-expression-list parsing in a separate function so that it can be re-used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0cd5b429fad6833dda23f0aced14a10907ac5539 16-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Put (argument)-expression-list parsing in a separate function so that it can be re-used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
43c6fdcb036d2f90a587127c7f465cb330ffbf83 16-Aug-2008 Nico Weber <nicolasweber@gmx.de> add missing class declaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
7b802b7d94b7bb1508ded6fefc84aca1eda0ec05 16-Aug-2008 Nico Weber <nicolasweber@gmx.de> add missing class declaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
93755040e307b573a7c803c6989e46f4132556be 16-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Declarator class considers DeclSpec as immutable; Declarator::getMutableDeclSpec should be used rarely and with care.
Have Declarator accept and use a 'const DeclSpec &', instead of 'DeclSpec &', to make DeclSpec's immutability more explicit.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e1449e51016fa7868d241c9e451253929d188bb9 16-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Declarator class considers DeclSpec as immutable; Declarator::getMutableDeclSpec should be used rarely and with care.
Have Declarator accept and use a 'const DeclSpec &', instead of 'DeclSpec &', to make DeclSpec's immutability more explicit.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54839 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
b0f2b9ecff764d1512408fcb324e70ab5bbf765d 16-Aug-2008 Ted Kremenek <kremenek@apple.com> GRState:
- Remove ConstNotEq from GRState/GRStateManager (!= tracking uses GDM instead).
- GRStateManager now can book-keep "contexts" (e.g., factory objects) for uses
with data elements stored into the GDM.
- Refactor pretty-printing of states to use GRState::Printer objects
exclusively. This removed a huge amount of pretty-printing logic from
GRExprEngine.

CFRefCount
- Simplified some API calls based on refinements to the GDM api.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
1c72ef092f3d931639cf44b4f4f9d0eedc1baa8f 16-Aug-2008 Ted Kremenek <kremenek@apple.com> GRState:
- Remove ConstNotEq from GRState/GRStateManager (!= tracking uses GDM instead).
- GRStateManager now can book-keep "contexts" (e.g., factory objects) for uses
with data elements stored into the GDM.
- Refactor pretty-printing of states to use GRState::Printer objects
exclusively. This removed a huge amount of pretty-printing logic from
GRExprEngine.

CFRefCount
- Simplified some API calls based on refinements to the GDM api.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
fb8e934a91506d30734770061922b1402cdae6e1 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update Expr::{getIntegerConstantExprValue, isIntegerConstantExpr} to
use default APSInt constructor instead of embedding arbitrary
constant.

Update OverloadExpr::getNumArgs to use getIntegerConstantExprValue.

Update OverloadExpr::getExpr to be const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8070a8497c0fb3e6f70a557f788405d8945b1208 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update Expr::{getIntegerConstantExprValue, isIntegerConstantExpr} to
use default APSInt constructor instead of embedding arbitrary
constant.

Update OverloadExpr::getNumArgs to use getIntegerConstantExprValue.

Update OverloadExpr::getExpr to be const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54828 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
232200866d298066c4a22e7d92587f3cd856bd7c 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Ident class tree in DeclBase properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
226e04a9b7790a7311aff2aa9df340c1841e20e3 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Ident class tree in DeclBase properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
4837ae7c6630d2f6381ca0fd53c1e71742d5305f 15-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change Parser & Sema to use interned "super" for comparions.
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).

Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
lang/Parse/Parser.h
662e8b5647adbb1bc9eeceece7b64600cfa87471 15-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change Parser & Sema to use interned "super" for comparions.
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).

Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
lang/Parse/Parser.h
4ae925cbdccd267983f32473a146eba47ba73f09 14-Aug-2008 Ted Kremenek <kremenek@apple.com> Migrated retain/release checker to use the Generic Data Map in GRState (instead
of using CheckerState).

Removed CheckerState from GRState.

Added class GRStateRef which wraps GRState* and GRStateManager*. This is handy
for generating new states with a single handle.

Added member template set/get functions to GRStateRef/GRState/GRStateManager for
accessing the Generic Data Map.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
72cd17f0a4722e1fa3eb47c08a7aa29aeba16754 14-Aug-2008 Ted Kremenek <kremenek@apple.com> Migrated retain/release checker to use the Generic Data Map in GRState (instead
of using CheckerState).

Removed CheckerState from GRState.

Added class GRStateRef which wraps GRState* and GRStateManager*. This is handy
for generating new states with a single handle.

Added member template set/get functions to GRStateRef/GRState/GRStateManager for
accessing the Generic Data Map.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
bccfbcccc233f098839cc07a766b8003f460b00e 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Renamed GRState::CheckerStatePrinter to GRState::Printer.
Updated checker state printer interface to allow transfer functions to return an arbitrary number of GRState::Printers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
ae6814efb6c41bd0c0f6413d25097105284d5be7 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Renamed GRState::CheckerStatePrinter to GRState::Printer.
Updated checker state printer interface to allow transfer functions to return an arbitrary number of GRState::Printers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
a8942d2ae622693bab72ad2a3c7bb7946485776e 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Rename ValueState.h -> GRState.h
Rename ValueState.cpp -> GRState.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/ValueState.h
62e1dcca86e2b2be6168a447f0399337e2b71f33 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Rename ValueState.h -> GRState.h
Rename ValueState.cpp -> GRState.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRState.h
lang/Analysis/PathSensitive/ValueState.h
abd89ac0af969666c74b3979ac87076bbb444b46 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Rename ValueState -> GRState.
Rename ValueStateManager -> GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
4adc81e540b874bafa15715fd2c5cb662463debd 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Rename ValueState -> GRState.
Rename ValueStateManager -> GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54721 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
6f25b01242026af9ede2e609aa23d158b9966f37 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
5c135b47d0fcdc33c912c4ed2ea750bdd6064da3 13-Aug-2008 Ted Kremenek <kremenek@apple.com> Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
c5bd49cfd778669340085155c2133448e36b7d8a 12-Aug-2008 Ted Kremenek <kremenek@apple.com> Added GenericDataMap as a component of ValueState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
450202284e7e0a1758be935ee6ae1296cc9dc97d 12-Aug-2008 Ted Kremenek <kremenek@apple.com> Added GenericDataMap as a component of ValueState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54704 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
1be1df38bc96c806d045260cd25e96f09b041c51 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
- Defaults to GNU, no autoselection for NeXT.

Emit NeXT OBJC_IMAGE_INFO marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
f77ac86f4eca528a04b817d7ad7f045a47d52712 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
- Defaults to GNU, no autoselection for NeXT.

Emit NeXT OBJC_IMAGE_INFO marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
91692d902021997bf99836c1b8f7421204be8cf5 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add -fexceptions to Driver
- Maps to LangOptions.Exceptions
- Currently always off, should autoselect based on language.

Update CodeGen to set unwind attribute on functions definitions based
on LangOptions.Exceptions.
- Still need to set attributes appropriately on calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
6379a7a15335e0af543a942efe9cfd514a83dab8 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add -fexceptions to Driver
- Maps to LangOptions.Exceptions
- Currently always off, should autoselect based on language.

Update CodeGen to set unwind attribute on functions definitions based
on LangOptions.Exceptions.
- Still need to set attributes appropriately on calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
64789f8496d9bd3ff5ba3686feca0de1a25d5a32 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
c4a1dea2dc56bd1357ec91b829a0b9e68229a13e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/ExprObjC.h
de30073d24ef186212a70e2a21f488767e45b7fb 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e91593ef084479340582b2ba177b44be50a717b7 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
cc7b160a9a4400a0c38da1caa97ba383337d08bf 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
implementation .cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e4858a65a93fb36c099d8dd2ea0a98e33e77687e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
implementation .cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
8d03cbe313bd0577f66d84e0f355835017da6f72 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Minor #include cleaning
- Drop TokenKinds.h from Action.h
- Move DeclSpec.h from Sema.h into individual Sema .cpp files


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
12bc692a78582f1cc32791325981aadcffb04c5e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Minor #include cleaning
- Drop TokenKinds.h from Action.h
- Move DeclSpec.h from Sema.h into individual Sema .cpp files


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d2a6ac9cd5cc5153ce9a4385a1f979714091fc71 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> * Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
lang/Driver/TextDiagnostics.h
lang/Lex/Preprocessor.h
7bfaaaecb3113f955db31e8d8a51acffd1bc0c27 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> * Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
lang/Driver/TextDiagnostics.h
lang/Lex/Preprocessor.h
929832c339a9c0311b76f8580455ab5b40df2d9d 10-Aug-2008 Steve Naroff <snaroff@apple.com> Forgot to modify LAST_EXPR (thanks Nuno).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
3ac5e9fc38e1a59da84844f6adb95e803779098d 10-Aug-2008 Steve Naroff <snaroff@apple.com> Forgot to modify LAST_EXPR (thanks Nuno).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
0ccfaa48d37ba626d1e6f1322d03e74110be4215 10-Aug-2008 Steve Naroff <snaroff@apple.com> Cleanup ObjCSuperRefExpr (remove last usage and AST node:-).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
76de9d7a32b16246e2acd0d1ecd7355faceb4901 10-Aug-2008 Steve Naroff <snaroff@apple.com> Cleanup ObjCSuperRefExpr (remove last usage and AST node:-).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
ff5b3a862b84e22452a1bd8f6dd3af4b727f382c 10-Aug-2008 Steve Naroff <snaroff@apple.com> InitListChecker::CheckListElementTypes(): Check for function types and issue an appropriate diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
613535273b90dc5cbd0f9fa056dedc93801ea35a 10-Aug-2008 Steve Naroff <snaroff@apple.com> InitListChecker::CheckListElementTypes(): Check for function types and issue an appropriate diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f55b1101191cf07c0836bc609050674628e431b2 10-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahead and backtracking.

1) New public methods added:
-EnableBacktrackAtThisPos
-DisableBacktrack
-Backtrack
-isBacktrackEnabled

2) LookAhead() implementation is replaced with a more efficient one.
3) LookNext() is removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
03db1b31dd926409b7defc1c90b66549464652c0 10-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow the preprocessor to cache the lexed tokens, so that we can do efficient lookahead and backtracking.

1) New public methods added:
-EnableBacktrackAtThisPos
-DisableBacktrack
-Backtrack
-isBacktrackEnabled

2) LookAhead() implementation is replaced with a more efficient one.
3) LookNext() is removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
4e596cf2381e1d8f689247d3acc310a25166899c 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update ShuffeVectorExpr::getShuffleMaskIdx to use
getIntegerConstantExprValue.

Tweak getIntegerConstantExprValue to suppress warning in
Release-Asserts mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a5d1cb7ef3f0780540e7fd7180399fd220ef0210 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update ShuffeVectorExpr::getShuffleMaskIdx to use
getIntegerConstantExprValue.

Tweak getIntegerConstantExprValue to suppress warning in
Release-Asserts mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
941c0104030b3468e896fc24eecb820fdff6d41b 10-Aug-2008 Chris Lattner <sabre@nondot.org> tighten up some code and some wording on diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d1a0b6d3dfb208f638d3d750b588d9c0daa49289 10-Aug-2008 Chris Lattner <sabre@nondot.org> tighten up some code and some wording on diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54607 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1543ae9d543a0e061cc89d416ddcf3e3e8802409 10-Aug-2008 Chris Lattner <sabre@nondot.org> wrap some long diagnostics, make 'initializer is not a constant' diagnostic
a bit more clear (rdar://5646070)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d8803632d248a360a040ff03eff1162988058036 10-Aug-2008 Chris Lattner <sabre@nondot.org> wrap some long diagnostics, make 'initializer is not a constant' diagnostic
a bit more clear (rdar://5646070)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
69909293d4d0bdffef36121651906f7d2e767d85 10-Aug-2008 Chris Lattner <sabre@nondot.org> rename PreDefinedExpr -> PredefinedExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
d9f6910f4ef37c0e8eeee2a01287d9572c3176ef 10-Aug-2008 Chris Lattner <sabre@nondot.org> rename PreDefinedExpr -> PredefinedExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
2bbdcae933f6acfb7293e3dfb7c67084bfd92a23 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> add assert, use make_pair() instead of pair constructor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
b243fe5a812faddf9ec39525727739a85f603ae6 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> add assert, use make_pair() instead of pair constructor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54596 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
a6c33e08e68dde9fa1f49be5ea52cc3b080baef2 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> fix spello

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
dee8ecc93825062eb441bfeb7a338d3f2c5ea3f0 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> fix spello

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54594 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
f0a835cdaa9720d928a83465adfc789c9cc32eb7 09-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> Expressive diagnostics-- worth their weight in gold?
(Fixing a spelling error.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
aad6953ca1149d44cebadca8839745796bfd524e 09-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> Expressive diagnostics-- worth their weight in gold?
(Fixing a spelling error.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticPrinter.h
2a4e1161b2d5450e0e91d00993a4d2e04df1731f 09-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Change 'Wchar' to 'WChar' casing, for consistency.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
55f4b02bc71e7347986c6a5249bef635aac1901a 09-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change 'Wchar' to 'WChar' casing, for consistency.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1ed03e75c3a03edea7234a3021f76e808d283f2f 09-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement support for the 'wchar_t' C++ type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
64c438a4be2a871fa43c78264663ba1e9788b94d 09-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement support for the 'wchar_t' C++ type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/DeclSpec.h
448b4e4e3b3924b26d2dd855c81db54570a58b51 09-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Passing right brace location to ActOnFinishCXXClassDef is redundant, since it gets passed to ActOnFinishCXXMemberSpecification too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
5b7f0c8f470f0b23ee95e467b5951e2bed733be1 09-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Passing right brace location to ActOnFinishCXXClassDef is redundant, since it gets passed to ActOnFinishCXXMemberSpecification too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
90a8c56548089c0697595348ce38efa69be6add2 09-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Make RecordDecl::Destroy() public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
243e4b2fd53c9505a90d11def53315bfbcc6ef97 09-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make RecordDecl::Destroy() public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
00c3088502598fab4e0956cdeedbd2477869d618 08-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Change line endings, CRLF -> LF.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
296e8671bca0d1d54c0755ba3fc1c7b285924fe6 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change line endings, CRLF -> LF.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
86cc394b773f087257317fadf4009121cbfdb13e 08-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Revert my previous commit where I replaced cast<> with static_cast<> in CXXFieldDecl::getMember().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
274479ec1f0fd5e8ee556854fb0e9b618448ffab 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert my previous commit where I replaced cast<> with static_cast<> in CXXFieldDecl::getMember().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54529 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
d64c1112f5503360deb70cacead9ec11d56304d1 08-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Destroy and delete the FieldDecl members of a RecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
997b6c6d73541f010afc81e28191c8eae7b24f77 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Destroy and delete the FieldDecl members of a RecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54527 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ffafe4508c81947a2c247b2358334d5b79c5e721 08-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add iterator access to field members for RecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
afebac1df82d16d6889470801e82501d714149c0 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add iterator access to field members for RecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c38918b56115b9d1794678062a820975674ee32d 08-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Use static_cast<> instead of cast<> for CXXFieldDecl::getMember().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
fef35f1ce99765670482124e2bd640bbe7a20a4f 08-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use static_cast<> instead of cast<> for CXXFieldDecl::getMember().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclCXX.h
50aab983b538c9df3400aa41178648e3d1bd3106 08-Aug-2008 Ted Kremenek <kremenek@apple.com> ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client.
The motivation is that clients may either:

(a) query the ASTConsumer object after AST parsing to collect data/etc.
(b) reuse the ASTConsumer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
7e7e6253d45eb2ca4a4ad9cafcb8b80693f0670a 08-Aug-2008 Ted Kremenek <kremenek@apple.com> ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client.
The motivation is that clients may either:

(a) query the ASTConsumer object after AST parsing to collect data/etc.
(b) reuse the ASTConsumer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
26da970ce22173d2b55d542aa354708f0785f8d2 08-Aug-2008 Ted Kremenek <kremenek@apple.com> Added AssumeSymGT, AssumeSymGE, AssumeSymLT, AssumeSymLE to add some minor improvements to path-sensitivity. Right now we basically treat 'x > y' and 'x < y' as implying 'x != y', but this restriction will only inevitably apply to our must rudimentary value tracking component (we'll implement more advanced value reasoning later).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
2619be072ccc6a722278d1ec39b98eae068d3da3 08-Aug-2008 Ted Kremenek <kremenek@apple.com> Added AssumeSymGT, AssumeSymGE, AssumeSymLT, AssumeSymLE to add some minor improvements to path-sensitivity. Right now we basically treat 'x > y' and 'x < y' as implying 'x != y', but this restriction will only inevitably apply to our must rudimentary value tracking component (we'll implement more advanced value reasoning later).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
b165a9ec9058187375703a34401fdb0a90e1d165 07-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Clear DeclSpec::AsmLabel in DeclSpec::clear().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
107450c6d846b2da5ecefbb088942e9478a83de7 07-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Clear DeclSpec::AsmLabel in DeclSpec::clear().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
ea29d1ec6b76c3722d7c0fb6a3d35c2d8cc74a79 07-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add CXXRecordType class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
49aa7ff1245abd03e6e998e01302df31e4c6f8f6 07-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add CXXRecordType class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b062aceeceee1714e060699f2efbd337c3178c3e 07-Aug-2008 Ted Kremenek <kremenek@apple.com> Fix 80 col violation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
7cf0a7a4c6554d67f360e4efa06cdc2fcca33886 07-Aug-2008 Ted Kremenek <kremenek@apple.com> Fix 80 col violation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
2866ea403a80f514798c50f5d2d49479a1c0cf4c 07-Aug-2008 Ted Kremenek <kremenek@apple.com> ParseAST now conditionally deletes the passed ASTConsumer.
ModuleBuilder now performs llvmgen in HandleTranslationUnit.

This patch follows from the discussion on the following thread on cfe-commits:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080804/006849.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
159346a82bfa5063ead81af903a2bc5e5a9e5b36 07-Aug-2008 Ted Kremenek <kremenek@apple.com> ParseAST now conditionally deletes the passed ASTConsumer.
ModuleBuilder now performs llvmgen in HandleTranslationUnit.

This patch follows from the discussion on the following thread on cfe-commits:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080804/006849.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ParseAST.h
5c3417333c5bcfba7522919f80f57277c28e3dfd 07-Aug-2008 Ted Kremenek <kremenek@apple.com> Fix --html-diags in driver by delaying the construction of an HTMLDiagnosticClient until after we have created the Preprocessor object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b4398aa27da4d6919c3ae448d1ae66ba6cafc048 07-Aug-2008 Ted Kremenek <kremenek@apple.com> Fix --html-diags in driver by delaying the construction of an HTMLDiagnosticClient until after we have created the Preprocessor object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54472 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
1f62aa8e0d797a06895cd6044501d2fa6039a124 07-Aug-2008 Ted Kremenek <kremenek@apple.com> Always construct the BumpPtrAllocator used by CFG as an instance variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
ce1eb34bbea1e0408f1952776d7d52ccde1bd275 07-Aug-2008 Ted Kremenek <kremenek@apple.com> Always construct the BumpPtrAllocator used by CFG as an instance variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
0e13eaa4b7d1b0f5f6376683f3e4710f557d6a5d 06-Aug-2008 Nico Weber <nicolasweber@gmx.de> add a libDriver, for now only move the text diangostics stuff from Driver to there

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
lang/Driver/TextDiagnostics.h
fd54ebcaaf9a165846fdfafb32362238458e7f2d 06-Aug-2008 Nico Weber <nicolasweber@gmx.de> add a libDriver, for now only move the text diangostics stuff from Driver to there

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Driver/TextDiagnosticBuffer.h
lang/Driver/TextDiagnosticPrinter.h
lang/Driver/TextDiagnostics.h
e1480475e42ea76517d1d661b7f2b2d7bc121f1b 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Add missing "classof" methods to NonNullAttr, fixing a heisencrash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
55b0c192e1ce00513a000f4c98bed7da5cf152b8 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Add missing "classof" methods to NonNullAttr, fixing a heisencrash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54373 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
b59f9cf0be6e619d471d880384a304bb940821b4 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Added decl_iterator to DeclStmt to provide an abstract interface to iterate over the ScopedDecls of a DeclStmt.
Updated a few clients of DeclStmt::getNextDeclarator() to use decl_iterator instead. Will update other clients after additional testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
14f8b4ff660bcaa763974b8d0fae81857c594495 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Added decl_iterator to DeclStmt to provide an abstract interface to iterate over the ScopedDecls of a DeclStmt.
Updated a few clients of DeclStmt::getNextDeclarator() to use decl_iterator instead. Will update other clients after additional testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7c65b6cfdb764c9887085206f033f63c73d1b335 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
815c78fd9ab8bd5dfe8e8a91b8c6a413e2b8c889 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
72eaf8a245549fdc2adeaeeb579102635845d033 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move AsmLabel into Declarator instead of just a parameter to
ActOnDeclarator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
914701ed49f31323176a784b49df05a0d177d1ad 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move AsmLabel into Declarator instead of just a parameter to
ActOnDeclarator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
f9311a981021c68db27e03132cb11871364e1d37 05-Aug-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6124613 a crash on invalid code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4fef81d718ca1b91ce2adef52db91a35f86e9bbd 05-Aug-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6124613 a crash on invalid code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
c3540ff2f5b163ee0616e5a7d90424584a3f760b 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add more Parser/Sema support for GCC asm-label extension.
- ActOnDeclarator now takes an additional parameter which is the
AsmLabel if used. Its unfortunate that this bubbles up this high,
but we cannot just lump it in as an attribute without mistakenly
*accepting* it as an attribute.
- The actual asm-label itself is, however, encoded as an AsmLabelAttr
on the FunctionDecl.
- Slightly improved parser error recovery on malformed asm-labels.
- CodeGen support still missing...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/Action.h
a80f8749f2968d19595ca2544114932bf0ca2c11 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add more Parser/Sema support for GCC asm-label extension.
- ActOnDeclarator now takes an additional parameter which is the
AsmLabel if used. Its unfortunate that this bubbles up this high,
but we cannot just lump it in as an attribute without mistakenly
*accepting* it as an attribute.
- The actual asm-label itself is, however, encoded as an AsmLabelAttr
on the FunctionDecl.
- Slightly improved parser error recovery on malformed asm-labels.
- CodeGen support still missing...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/Action.h
103baef5578a53a39ed11d8ef86c937f258d7dcb 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add EXTWARN Diagnostic class.
- Like EXTENSION but always generates a warning (even without
-pedantic).
- Updated ptr -> int, int -> ptr, and incompatible cast warnings to
be EXTWARN.
- Other EXTENSION level diagnostics should be audited for upgrade.
- Updated several test cases to fix code which produced unanticipated
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4489fe10fa073eb326e2c8906db170f009050911 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add EXTWARN Diagnostic class.
- Like EXTENSION but always generates a warning (even without
-pedantic).
- Updated ptr -> int, int -> ptr, and incompatible cast warnings to
be EXTWARN.
- Other EXTENSION level diagnostics should be audited for upgrade.
- Updated several test cases to fix code which produced unanticipated
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54335 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a3195a3b5b0302b8d715f271d0c99c675fb91cbe 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Nico Weber:

"the attached patch fixes some typos, 80 cols violations, etc. in comments."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
a34ea072371154c9042ce86321d17fbb4df1f84d 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Nico Weber:

"the attached patch fixes some typos, 80 cols violations, etc. in comments."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/Parse/Action.h
a1923f6d95601582f4a5c3924b8e1c5ac3f658b3 04-Aug-2008 Chris Lattner <sabre@nondot.org> Finally fix PR2189. This makes a fairly invasive but important change to
move getAsArrayType into ASTContext instead of being a method on type.
This is required because getAsArrayType(const AT), where AT is a typedef
for "int[10]" needs to return ArrayType(const int, 10).

Fixing this greatly simplifies getArrayDecayedType, which is a good sign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c63a1f276f7b324fd9a4be82098b1c8f7bf30733 04-Aug-2008 Chris Lattner <sabre@nondot.org> Finally fix PR2189. This makes a fairly invasive but important change to
move getAsArrayType into ASTContext instead of being a method on type.
This is required because getAsArrayType(const AT), where AT is a typedef
for "int[10]" needs to return ArrayType(const int, 10).

Fixing this greatly simplifies getArrayDecayedType, which is a good sign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
46403638c12d9608d7f0370f318a72a01d14f56d 01-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Wherever a type is used/returned from the Action module, use TypeTy instead of DeclTy or void.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
39caa088097dbd2c805041bfd964b3fb9026d0be 01-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Wherever a type is used/returned from the Action module, use TypeTy instead of DeclTy or void.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
dd2e9ca75a376d862d2141747e3057b03f42fe93 01-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support constructor and destructor attributes in CodeGen

- There is an miscompilation issue remaining due to a poor
interaction between the delayed emission of static functions and
the emission of constructors, but that already existed prior to
this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
6bfed7e411adc46eaf616371f85f68305c6e6257 01-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support constructor and destructor attributes in CodeGen

- There is an miscompilation issue remaining due to a poor
interaction between the delayed emission of static functions and
the emission of constructors, but that already existed prior to
this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
8716a019f15ee20184327c7905ef05f2106ba6c6 01-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support __attribute__(({con,de}structor)) in Parse & Sema
- Including possible priority argument
- In other news, the attribute parsing code really needs a cleanup


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
3068ae0feb5d477477f45045f7ec9d0414fe57f3 01-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support __attribute__(({con,de}structor)) in Parse & Sema
- Including possible priority argument
- In other news, the attribute parsing code really needs a cleanup


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
0303babaf421955c741cd0bcb0ed005a8407e85f 31-Jul-2008 Ted Kremenek <kremenek@apple.com> Enhanced path-sensitive return-of-stack-address check to print out the name of the variable whose address was returned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
22bda887aacd0e591978541a799aa43835652ec9 31-Jul-2008 Ted Kremenek <kremenek@apple.com> Enhanced path-sensitive return-of-stack-address check to print out the name of the variable whose address was returned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
22dedc6e22fb732dc15068f38b72d691c138e8e7 31-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove getCodeBody() from Decl, and hoist getBody() into Decl as a virtual function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
69c8f0aab655257e9e532d9d53756acf4f7a2d78 31-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove getCodeBody() from Decl, and hoist getBody() into Decl as a virtual function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54247 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
809da269fb57f4cee4dd9fd786b22fb9961f89c7 27-Jul-2008 Ted Kremenek <kremenek@apple.com> Fix serialization for TypedefType by allowing TypedefType to access the internal CanonicalType stored in Type.
The test case Serialization/stmt_exprs.c now passes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d90700108cfb45f2dda6c5a7adc11ce5ac68aa0d 27-Jul-2008 Ted Kremenek <kremenek@apple.com> Fix serialization for TypedefType by allowing TypedefType to access the internal CanonicalType stored in Type.
The test case Serialization/stmt_exprs.c now passes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a55e321bd645398b514e246981c04a4889ee2472 27-Jul-2008 Chris Lattner <sabre@nondot.org> make "call foo.dump()" and "call foo->dump()" work in GDB,
with QualTypes and Types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c36d405a02fab41f6c45cb2bc750d64949742903 27-Jul-2008 Chris Lattner <sabre@nondot.org> make "call foo.dump()" and "call foo->dump()" work in GDB,
with QualTypes and Types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
01ee73fb7b2734d3ca1c5876dc623811518985df 27-Jul-2008 Chris Lattner <sabre@nondot.org> remove QualType::getCanonicalType. Also make
QualType::ReadBackpatch public so that FieldDecl doesn't need
to be a friend of QualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
4243a94b43ef6207938f3023dfcfb804dd545363 27-Jul-2008 Chris Lattner <sabre@nondot.org> remove QualType::getCanonicalType. Also make
QualType::ReadBackpatch public so that FieldDecl doesn't need
to be a friend of QualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
d5a56aae166344e13f1f8c845530beee0868db49 27-Jul-2008 Chris Lattner <sabre@nondot.org> change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b77792eabf5882cf9af8cc810599b20432fda6c2 27-Jul-2008 Chris Lattner <sabre@nondot.org> change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
25168a59a231071fb6c8d5bfd8f80612d58f9fb1 26-Jul-2008 Chris Lattner <sabre@nondot.org> convert more code to use ASTContext to get canonical types instead
of doing it directly. This is required for PR2189.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
28be73f74c9e241a23ea24fe5756623de6bf1084 26-Jul-2008 Chris Lattner <sabre@nondot.org> convert more code to use ASTContext to get canonical types instead
of doing it directly. This is required for PR2189.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c5cff3042a9b78af61d0d39ec81c8516ebf9e05b 26-Jul-2008 Chris Lattner <sabre@nondot.org> remove a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
717250a2052ea65d95405127d4e5836a564dad18 26-Jul-2008 Chris Lattner <sabre@nondot.org> remove a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ae1ae49203c63d5a462508875ed39f24c71bf74b 26-Jul-2008 Chris Lattner <sabre@nondot.org> Pull protocol resolution of out ActOnStartClassInterface, this is also the
last client of the old ParseObjCProtocolReferences, so it also removes it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
06036d3709955a53297b4cbe14e20db88f321470 26-Jul-2008 Chris Lattner <sabre@nondot.org> Pull protocol resolution of out ActOnStartClassInterface, this is also the
last client of the old ParseObjCProtocolReferences, so it also removes it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
45142b9beee4734e5d3d438c4f130e1b37fbc12a 26-Jul-2008 Chris Lattner <sabre@nondot.org> refactor protocol resolution out of ActOnStartCategoryInterface


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
6bd6d0b9d8944c5e192097bef24f2becb83af172 26-Jul-2008 Chris Lattner <sabre@nondot.org> refactor protocol resolution out of ActOnStartCategoryInterface


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2bdedd6fa431d9d90589182dd0d3baf24dbb371c 26-Jul-2008 Chris Lattner <sabre@nondot.org> pull protocol resolution out into ActOnStartProtocolInterface.
This temporarily duplicates ParseObjCProtocolReferences, but it
will be removed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
e13b9595dc1e2f4288bec34f3412359f648e84a5 26-Jul-2008 Chris Lattner <sabre@nondot.org> pull protocol resolution out into ActOnStartProtocolInterface.
This temporarily duplicates ParseObjCProtocolReferences, but it
will be removed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
17d50a95b43852f7031533c353373d4986cb6744 26-Jul-2008 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
eacc39212e5960b2680067c006384c2e4804873a 26-Jul-2008 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
fc513a61e8c3cfbdb892f0fdc279b417b2b8eee2 26-Jul-2008 Chris Lattner <sabre@nondot.org> remove duplicate error message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e281c86515cca9162170ca5d6ede198acf343428 26-Jul-2008 Chris Lattner <sabre@nondot.org> remove duplicate error message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ada637950c0a7cd90aeb30cc7be4963b948b2ce3 26-Jul-2008 Chris Lattner <sabre@nondot.org> make DeclSpec manage its own protocol qualifier list memory instead of having
clients allocate the memory and it delete it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
ae4da6150bb837311a2f0f958b01a2989066ba90 26-Jul-2008 Chris Lattner <sabre@nondot.org> make DeclSpec manage its own protocol qualifier list memory instead of having
clients allocate the memory and it delete it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
4a68fe04deb7ab89ac7566dc55b3b623129c72e5 26-Jul-2008 Chris Lattner <sabre@nondot.org> fix several problems with the protocol qualified id handling where id was implicit.

First, fix canonical type handling of these, since protocol qualified id's are always
canonical. Next, enhance SemaType to actually make these when used (instead of int)
allowing them to actually be used when appropriate. Finally remove a bunch of logic
relating to the mishandling of canonical types with protocol-qual id's. This fixes
rdar://5986251


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
62f5f7ffad57e0c2af2b308af3735351505937cb 26-Jul-2008 Chris Lattner <sabre@nondot.org> fix several problems with the protocol qualified id handling where id was implicit.

First, fix canonical type handling of these, since protocol qualified id's are always
canonical. Next, enhance SemaType to actually make these when used (instead of int)
allowing them to actually be used when appropriate. Finally remove a bunch of logic
relating to the mishandling of canonical types with protocol-qual id's. This fixes
rdar://5986251


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
b99d749119d19391af35d37cf53564e575aebdc5 26-Jul-2008 Chris Lattner <sabre@nondot.org> improve handling of the horrible GCC objc extension that treats "<foo>"
like "id<foo>". This 1) fixes an infinite loop in the parser on things
like "short<foo>" 2) emits a warning about this bogus construct and 3)
changes the testcase to be substantially reduced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bce6135441fd489527a9ad1776d0472335be596d 26-Jul-2008 Chris Lattner <sabre@nondot.org> improve handling of the horrible GCC objc extension that treats "<foo>"
like "id<foo>". This 1) fixes an infinite loop in the parser on things
like "short<foo>" 2) emits a warning about this bogus construct and 3)
changes the testcase to be substantially reduced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
da8aad9b4ce4977c60b5fa2e4c937715d2c20c0c 26-Jul-2008 Chris Lattner <sabre@nondot.org> add a new diag helper that takes a range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
844cef32e4359c3e651e4eb84beca0c3e8a727d5 26-Jul-2008 Chris Lattner <sabre@nondot.org> add a new diag helper that takes a range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e02e440a32375a1635d634f21b535032043504d3 26-Jul-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6095136, various crashes with incomplete enum types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
834a72ac74cf4ff07ba6215545dba3db578f8a07 26-Jul-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6095136, various crashes with incomplete enum types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4c77156d6fbed59c03415f67b10d17418ab228cf 26-Jul-2008 Daniel Dunbar <daniel@zuster.org> Remove unused ASTConsumer::HandleTopLevelDeclaration


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
fb754b6db2c74b71e20042f84a95cdb93fc33870 26-Jul-2008 Daniel Dunbar <daniel@zuster.org> Remove unused ASTConsumer::HandleTopLevelDeclaration


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
b18e93c283e46a3564bc94a5227e252a796f0672 25-Jul-2008 Ted Kremenek <kremenek@apple.com> Refine ObjCPropertyImplDecl:

- Remove a bunch of setXXX methods until we actually need them. This cleans up the
interface, and makes the object immutable until we have a reason to be mutable.

- Remove enum value OBJC_PR_IMPL_None since it was never used.

- Remove instance variable 'PropertyImplKind PropertyImplementation;'. This is
not needed because we can tell if ObjCPropertyImplDecl represents @synthesize
if 'ObjCPropertyDecl *PropertyDecl' is not null.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
be57c3a3fef0776fca57ad88b2db263f37b074c4 25-Jul-2008 Ted Kremenek <kremenek@apple.com> Refine ObjCPropertyImplDecl:

- Remove a bunch of setXXX methods until we actually need them. This cleans up the
interface, and makes the object immutable until we have a reason to be mutable.

- Remove enum value OBJC_PR_IMPL_None since it was never used.

- Remove instance variable 'PropertyImplKind PropertyImplementation;'. This is
not needed because we can tell if ObjCPropertyImplDecl represents @synthesize
if 'ObjCPropertyDecl *PropertyDecl' is not null.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3c0deef0c753cc4d521c951e3025ddfefc2f72d5 25-Jul-2008 Nate Begeman <natebegeman@mac.com> De-tabify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
82354bcedd1465bf40c9ba9e87e576dd9a8b81f0 25-Jul-2008 Nate Begeman <natebegeman@mac.com> De-tabify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
bef8d62c01b9488bf3750f56953c885c839393b4 25-Jul-2008 Chris Lattner <sabre@nondot.org> Reject typedef redefinitions when the underlying types are not identical,
even if in a system header etc. rdar://6079937



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
99cb9976efe84f44b3b1957c4fe042dae366b989 25-Jul-2008 Chris Lattner <sabre@nondot.org> Reject typedef redefinitions when the underlying types are not identical,
even if in a system header etc. rdar://6079937



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6e5a65b68364695fdf912e7f72299467ee81779e 25-Jul-2008 Chris Lattner <sabre@nondot.org> In c89 mode accept hex fp constants as an extension:

t2.c:1:17: warning: hexadecimal floating constants are a C99 feature
long double d = 0x0.0000003ffffffff00000p-16357L;
^

instead of emitting a weird error message that doesn't make sense:

t2.c:1:41: error: hexadecimal floating constants require an exponent
long double d = 0x0.0000003ffffffff00000p-16357L;
^

rdar://6096838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6ea623823f8532670480425b573f35115404b4a0 25-Jul-2008 Chris Lattner <sabre@nondot.org> In c89 mode accept hex fp constants as an extension:

t2.c:1:17: warning: hexadecimal floating constants are a C99 feature
long double d = 0x0.0000003ffffffff00000p-16357L;
^

instead of emitting a weird error message that doesn't make sense:

t2.c:1:41: error: hexadecimal floating constants require an exponent
long double d = 0x0.0000003ffffffff00000p-16357L;
^

rdar://6096838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ce13e1e523cd5a65934eb508c93074b8c43fcf74 25-Jul-2008 Ted Kremenek <kremenek@apple.com> Implemented Sema support for attribute "unused".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
73798892751e378cbcdef43579c1d41685091fd0 25-Jul-2008 Ted Kremenek <kremenek@apple.com> Implemented Sema support for attribute "unused".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54008 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
118930edc07e9a91098f48031740d57c0f89114e 25-Jul-2008 Ted Kremenek <kremenek@apple.com> Move isObjCObjectPointerType() from Sema to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b6ccaac65ca72f72954eb3893bbd940bedd23f00 25-Jul-2008 Ted Kremenek <kremenek@apple.com> Move isObjCObjectPointerType() from Sema to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53998 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
91a6920877a7288a84ac8d04d429435f9b9e1848 24-Jul-2008 Steve Naroff <snaroff@apple.com> Fix Sema::ActOnClassMessage() to pass through the identifier for "super".
This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super').

Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
fc93d52ada07d52de0ad4fd051b6a08e21d421ff 24-Jul-2008 Steve Naroff <snaroff@apple.com> Fix Sema::ActOnClassMessage() to pass through the identifier for "super".
This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super').

Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
72b2cf1ae0992af05a0bfaaacc056e74108bc76b 24-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
25460259a635465f9d36e61865bc4bf1e3e36945 24-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
198acff77e56982dd31a13c3c92610bdcf612c64 24-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add Expr::getIntegerConstantExprValue helper method
- For getting an APSInt from a known integer constant Expr.
- TODO: Many users of Expr::isIntegerConstantExpr in codegen should
probably be using this instead...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cd8f646eca128f52a7bce0103c51ff82ce96f374 24-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add Expr::getIntegerConstantExprValue helper method
- For getting an APSInt from a known integer constant Expr.
- TODO: Many users of Expr::isIntegerConstantExpr in codegen should
probably be using this instead...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
97318dd4ed019ecfb67932ad8919d751877c1941 24-Jul-2008 Ted Kremenek <kremenek@apple.com> Added UnaryOperator::isPrefix().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5a56ac30d04e8f0431a08980885662a47a6308aa 24-Jul-2008 Ted Kremenek <kremenek@apple.com> Added UnaryOperator::isPrefix().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53963 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a15448cb4a7f993d75f16245e146e454ea69b9d2 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Use typedef range_iterator instead of SourceRange* in PathDiagnosticPiece.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
a32980435ab2e3a5e037b2ebe936682e1ffe80e1 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Use typedef range_iterator instead of SourceRange* in PathDiagnosticPiece.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53962 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
13df7e952939af7267769e2e06f2f2ce2750adc1 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Initialize instance variable DeclAccess in ctor for ObjCIvarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8f50b9c02abe7cd4945a9b77a8550a5207ea21cf 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Initialize instance variable DeclAccess in ctor for ObjCIvarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
173dd3184b3e0f7b19a96b054303c87be3afb89f 23-Jul-2008 Ted Kremenek <kremenek@apple.com> When constructing an ObjCIvarDecl object in Sema, provide its visibility up front instead of setting it afterwards.
This change also fixes a subtle bug where the access control of an ivar would be initialized to garbage if we didn't have an explicit visibility specifier (e.g., @private).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b8db21d4df5fbb6ce1ace6411b82d3d623d789de 23-Jul-2008 Ted Kremenek <kremenek@apple.com> When constructing an ObjCIvarDecl object in Sema, provide its visibility up front instead of setting it afterwards.
This change also fixes a subtle bug where the access control of an ivar would be initialized to garbage if we didn't have an explicit visibility specifier (e.g., @private).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53955 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6bddd5191989f5c30dfdf25bf2f99a95df900902 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Updated comment for class ObjCIvarDecl: it turns out the default access control
is protected, not private.

Added ObjCIvarDecl::getCanonicalAccessControl() to report the visible access
control of an ivar, whereas getAccessControl() returns the access control
relating to how the ivar was actually declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f079570fcad0d0053e75ebae29c883ec4276e020 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Updated comment for class ObjCIvarDecl: it turns out the default access control
is protected, not private.

Added ObjCIvarDecl::getCanonicalAccessControl() to report the visible access
control of an ivar, whereas getAccessControl() returns the access control
relating to how the ivar was actually declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8441802366c64e28c71f13514e86a9f6465109a3 23-Jul-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6094010 various asserts happening with wide strings in inline asm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6bc52112dbc54551bd8e215d95bba4791b2275f7 23-Jul-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6094010 various asserts happening with wide strings in inline asm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
69ea78529b2d92b797056464095595fa5d05473c 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Add prototype implementation of unused ivar check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
395aaf20d6e1ab04741562dc6b7d47164bcbd87e 23-Jul-2008 Ted Kremenek <kremenek@apple.com> Add prototype implementation of unused ivar check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
24d49d0bd62af3da13f3331224f18ceb2fe48461 22-Jul-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Fix compilation error on GCC 4.3.0 ('memcpy' was not declared in this scope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
ea7e97e14f2f1f9817d2ae8a25ec6ea652e5287f 22-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix compilation error on GCC 4.3.0 ('memcpy' was not declared in this scope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
9f20c7cff03afa692d7737d18692f1081fefef5e 22-Jul-2008 Ted Kremenek <kremenek@apple.com> Moved registration of basic path-sensitive checks from GRSimpleVals.cpp to GRExprEngineInternalChecks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/GRExprEngine.h
78d46242e3351484c2b773f5610beba5d316914b 22-Jul-2008 Ted Kremenek <kremenek@apple.com> Moved registration of basic path-sensitive checks from GRSimpleVals.cpp to GRExprEngineInternalChecks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53909 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/GRExprEngine.h
bbafa5b0816c1ea67fb431487b20026362b30bca 22-Jul-2008 Ted Kremenek <kremenek@apple.com> Added path-sensitive checking for null pointer values passed to function arguments marked nonnull.
This implements <rdar://problem/6069935>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/ValueState.h
584def7364f51e35bfcaf5c3c64673096533adda 22-Jul-2008 Ted Kremenek <kremenek@apple.com> Added path-sensitive checking for null pointer values passed to function arguments marked nonnull.
This implements <rdar://problem/6069935>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/ValueState.h
33844332fc5300488e92aaa683f434f902b0f854 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement bzero, memset, memmove builtins.

This subsumes Nico Weber's patch and implements bzero in terms
of llvm.memset to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
1caae959017b355e9bb61250d5a0d04edbf468b0 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement bzero, memset, memmove builtins.

This subsumes Nico Weber's patch and implements bzero in terms
of llvm.memset to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
5b0de85aa9a53b70f57e4560cb8e3f509973df39 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement nans, prefetch, and trap builtins.

This closes <rdar://problem/6080720>, support for __builtin_constant_p
has been filed separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
4493f79fce48cd9cbd9f55fa9d452cde736747a0 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement nans, prefetch, and trap builtins.

This closes <rdar://problem/6080720>, support for __builtin_constant_p
has been filed separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
e705e5ec34e4ab296c2a3831505fde62270fb778 22-Jul-2008 Chris Lattner <sabre@nondot.org> minor cleanup to the actions interface to pass around SmallVectorImpl instead
of a specific smallvector size.

Fix protocol lists to pass down proper location info, so we get diagnostics
like this:

t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^

instead of this:

t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^


Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
lang/Parse/Parser.h
7caeabd868d46cf4e68478c6e9136dae4e735d21 22-Jul-2008 Chris Lattner <sabre@nondot.org> minor cleanup to the actions interface to pass around SmallVectorImpl instead
of a specific smallvector size.

Fix protocol lists to pass down proper location info, so we get diagnostics
like this:

t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^

instead of this:

t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^


Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Parse/Action.h
lang/Parse/Parser.h
c0af254fe27f5960966db29479b64e820f663c32 21-Jul-2008 Ted Kremenek <kremenek@apple.com> Added sema support for the nonnull attribute. Will add test cases soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
eb2b2a3f1898f146c6e153a64ec58ec5e1750bd2 21-Jul-2008 Ted Kremenek <kremenek@apple.com> Added sema support for the nonnull attribute. Will add test cases soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53881 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
0be088230e4bce150cbad1d49423efb5d7ab124d 21-Jul-2008 Chris Lattner <sabre@nondot.org> move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
simplifying code along the way and fixing a problem and memory leak or two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
780f329cb011bff0da5763e2e9744eec093d0509 21-Jul-2008 Chris Lattner <sabre@nondot.org> move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
simplifying code along the way and fixing a problem and memory leak or two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
29921c4cbef086cb0dadba22f082c96148f69609 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_powi[fl] support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
a933c3c052bbd87b01cc6fc7a7745e1c4b1757fb 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_powi[fl] support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
8779c633e0d186dff3ac8014b902a34802ccd766 21-Jul-2008 Chris Lattner <sabre@nondot.org> references to completely undeclared protocols should be errors.
References to forward definitions should be warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
919d87d4eef4126ad6d7da1762c247ab0b5ca05b 21-Jul-2008 Chris Lattner <sabre@nondot.org> references to completely undeclared protocols should be errors.
References to forward definitions should be warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8bcb52573fad79e8cff88fad9112484b125942ea 21-Jul-2008 Chris Lattner <sabre@nondot.org> introduce a new ObjCList templated class and start moving
various objc lists over to it. First up, the protocol list
on ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3db6cae19c236fe2cef343c90105ce7cca7de965 21-Jul-2008 Chris Lattner <sabre@nondot.org> introduce a new ObjCList templated class and start moving
various objc lists over to it. First up, the protocol list
on ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
c72eaaf2967cd77a6b8acd4fac777ad6bfb0e831 21-Jul-2008 Chris Lattner <sabre@nondot.org> rename setReferencedProtocolList -> addReferencedProtocols to
be consistent with ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f7b2c98c16dfb2261ea57d40a1d5bc4738e73175 21-Jul-2008 Chris Lattner <sabre@nondot.org> rename setReferencedProtocolList -> addReferencedProtocols to
be consistent with ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
726f4d4cbe766813f3f355be24899d699b7872a0 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement ffs, parity, and popcount builtins.
+ test case


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
04b290030eee33295600728450f348989d1a627e 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement ffs, parity, and popcount builtins.
+ test case


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
5cece4687962ea79bba6565983924365f243144e 21-Jul-2008 Chris Lattner <sabre@nondot.org> Switch initialization of the protocol list for an interface decl to use
the standard "set these as the list of protocols" interface instead of a
strange "set this as the size and then set each one to the value" interface.
The problem with the later is that it a) is completely different from
everything else, b) is awkward, and c) doesn't handle the case when a
referenced protocol is invalid: it set it to null.

This meant that all clients downstream would have to handle null protocols
in the protocol list, and empirically they didn't. Fix this by not setting
invalid protocols in the referenced protocol list, fixing the crash on
test/Sema/objc-interface-1.m

While I'm at it, clean up some locations so that we produce:

t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
~~~~~~~~~~~~~~~~~~~~~ ^

instead of:

t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b752f289026ad8e5f44851b20e009a27ed61eefc 21-Jul-2008 Chris Lattner <sabre@nondot.org> Switch initialization of the protocol list for an interface decl to use
the standard "set these as the list of protocols" interface instead of a
strange "set this as the size and then set each one to the value" interface.
The problem with the later is that it a) is completely different from
everything else, b) is awkward, and c) doesn't handle the case when a
referenced protocol is invalid: it set it to null.

This meant that all clients downstream would have to handle null protocols
in the protocol list, and empirically they didn't. Fix this by not setting
invalid protocols in the referenced protocol list, fixing the crash on
test/Sema/objc-interface-1.m

While I'm at it, clean up some locations so that we produce:

t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
~~~~~~~~~~~~~~~~~~~~~ ^

instead of:

t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f914765ba1d70f599fa69bde38b8646c02d9b1aa 21-Jul-2008 Chris Lattner <sabre@nondot.org> continue cleaning up code, and disable sending a message directly to an
interface. This fixes a bug where we used to accept:

void test2(NSNumber x) {
[x METH];
}

which doesn't make sense and GCC rejects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2b1cc8be4dda4cd122485be0168b3c43d7dff15f 21-Jul-2008 Chris Lattner <sabre@nondot.org> continue cleaning up code, and disable sending a message directly to an
interface. This fixes a bug where we used to accept:

void test2(NSNumber x) {
[x METH];
}

which doesn't make sense and GCC rejects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53841 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3780ac54200841ef3671b6d7f328452b98edc039 21-Jul-2008 Chris Lattner <sabre@nondot.org> update diagnostic to include string


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
58b1b2702b143be7f3c380093f9ba9da4ff27e95 21-Jul-2008 Chris Lattner <sabre@nondot.org> update diagnostic to include string


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7d5a8769842eb89ea3be4ebd4d8c4ee1cd01dec6 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve invalid member reference diagnostics to print the type and
have better source ranges. Before:

t.m:11:53: error: member reference is not to a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
^~~~~~~

after:

t.m:11:54: error: member reference base type ('id') is not a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2a01b724b69b7998fe4e3a0a6fcc546be01f898d 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve invalid member reference diagnostics to print the type and
have better source ranges. Before:

t.m:11:53: error: member reference is not to a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
^~~~~~~

after:

t.m:11:54: error: member reference base type ('id') is not a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d5f8179ed2b75e5c21109f3dd996836b5f743ecd 21-Jul-2008 Chris Lattner <sabre@nondot.org> rename getProtocols -> getProtocol, as it only returns a single
protocol. Simplify some code to use unconditional form of the
protocol access list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9baefc21bfe1bf49ab4a234e9f267f00abe0b1b1 21-Jul-2008 Chris Lattner <sabre@nondot.org> rename getProtocols -> getProtocol, as it only returns a single
protocol. Simplify some code to use unconditional form of the
protocol access list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f81d921ec2f5bac3f35a94392fe2b764473884ee 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve documentation of ObjCInterfaceType significantly. Also,
make the qual_* iterators and getNumProtocols() lists be accessible through
ObjCInterfaceType (returning an empty range if not a
ObjCQualifiedInterfaceType). This eliminates special checks in clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fb7701df5401fa1f5b3396d269fb33e731a00089 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve documentation of ObjCInterfaceType significantly. Also,
make the qual_* iterators and getNumProtocols() lists be accessible through
ObjCInterfaceType (returning an empty range if not a
ObjCQualifiedInterfaceType). This eliminates special checks in clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
eb3a8ad577e7093d245ab427d43e25f327f8ce25 21-Jul-2008 Chris Lattner <sabre@nondot.org> right, the error is when the itf *doesn't* have the member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
88a72516e2baac09e1986c0c68347045052d021d 21-Jul-2008 Chris Lattner <sabre@nondot.org> right, the error is when the itf *doesn't* have the member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
52292be56045ad912f869e5c2c22212458f6b896 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve the diagnostic for an erroneous objc ivar reference
from:

t.m:8:7: error: member reference is not to a structure or union
pool->farm = 0;
^ ~~~~
to:

t.m:8:7: error: 'NSAutoreleasePool' has member named 'farm'
pool->farm = 0;
~~~~^ ~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1f719747b214866535e63b0fe2f5f21da67a5387 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve the diagnostic for an erroneous objc ivar reference
from:

t.m:8:7: error: member reference is not to a structure or union
pool->farm = 0;
^ ~~~~
to:

t.m:8:7: error: 'NSAutoreleasePool' has member named 'farm'
pool->farm = 0;
~~~~^ ~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b2b9da7c2995ddfa0ac00a702b60c8100e463f10 21-Jul-2008 Chris Lattner <sabre@nondot.org> simplify a bunch of code, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
68a057b4292f5ff814ec8da53f6cda8cdcfbd2ae 21-Jul-2008 Chris Lattner <sabre@nondot.org> simplify a bunch of code, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2e966c430c098b7930e8a816200b071247bf00c9 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d85376aa66bc16488539f6bb11f97d0170b1fe6b 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f2717b089d4c03a6c3a87bd8a229afd0ef99ce51 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Add panic support for NSAssertionHandler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
70a733e64e2379a654631a14fa29e46761d5f80d 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Add panic support for NSAssertionHandler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53758 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
99b4f4383303ec8655db51fde1d41ae815640423 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Fix regression by explicitly checking if we are negating a SymIntConstantVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
40fc5c7e235965af368a34cdbb6d32827cd1e1d8 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Fix regression by explicitly checking if we are negating a SymIntConstantVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
589f8811ec1a004c58868d53185ef8767b55a5a7 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Renamed deterministic EvalBinOp to DetermEvalBinOpNN. This name mangling is unfortunately needed because virtual methods with the same name can be hidden by subclasses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
ad8329e58df5b0b2c44dca1447b324467a6c5da1 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Renamed deterministic EvalBinOp to DetermEvalBinOpNN. This name mangling is unfortunately needed because virtual methods with the same name can be hidden by subclasses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
9c4ce60a67751c4b166a6bd84adbb07a9e2d46b6 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Created ValueStateSet class to manage the creation of multiple states by a method.
Modified the new EvalBinOpNN to generate states instead of nodes. This is a much simpler interface and is what clients will want to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
6297a8ec313c722db50f686fd190842b7ea91118 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Created ValueStateSet class to manage the creation of multiple states by a method.
Modified the new EvalBinOpNN to generate states instead of nodes. This is a much simpler interface and is what clients will want to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
6984d55e8c946e2c99732fed91247641cbc03fd5 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove dead method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
4d9985ab390079ccc8b05b6c349026f237567b8f 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove dead method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
481f4bcca5d3a688c89f036fc8cdb556457d019a 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Provide static methods in BinaryOperator to determine if an opcode is an equality opcode, a relational opcode, or a logical opcode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f2da7a06f6b98c3886d9b871ab839f5085b1c238 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Provide static methods in BinaryOperator to determine if an opcode is an equality opcode, a relational opcode, or a logical opcode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53744 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c7469549fbf56d336bddbc570ee4867a1b6e3ed6 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Move GRTransferFunc* into ValueStateManager, and move the assumption logic there as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
729a9a276f39e75038ed100fc76055fb709b17f4 18-Jul-2008 Ted Kremenek <kremenek@apple.com> Move GRTransferFunc* into ValueStateManager, and move the assumption logic there as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53743 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
e4d3ffa4e0cc87f7938a1d03afefeca45b5b1584 17-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove redundant logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b48c6455dde10395cd4f3b6b054b2de34a73f7f5 17-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove redundant logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
fa81dfffa27aa48c0d2e9740e4f8403c2907426c 17-Jul-2008 Ted Kremenek <kremenek@apple.com> Begin major changes to EvalXXX methods in GRTransferFuncs. Currently some of the methods only return an RVal; we want them to be able to create an arbitrary number of states.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
df7533b5e523a3def04b5c33b56361a94dd97d35 17-Jul-2008 Ted Kremenek <kremenek@apple.com> Begin major changes to EvalXXX methods in GRTransferFuncs. Currently some of the methods only return an RVal; we want them to be able to create an arbitrary number of states.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53739 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
ee930121cc344a8f8c75c13a2b81db57662af00c 17-Jul-2008 Ted Kremenek <kremenek@apple.com> Moved RemoveDeadBindings logic for the contents of 'Store' to a virtual RemoveDeadBindings method in StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueState.h
f59bf48ee79ed218e6dcaf1b82fa730efd0e9999 17-Jul-2008 Ted Kremenek <kremenek@apple.com> Moved RemoveDeadBindings logic for the contents of 'Store' to a virtual RemoveDeadBindings method in StoreManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueState.h
d3354225f8298b304d3e145121f33e67642b55d1 16-Jul-2008 Steve Naroff <snaroff@apple.com> Two fixes:
- Make sure ObjCIvarDecl propagates the bitfield width.
- RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8f3b2654a9ff6912862f366102f5c46f7757260a 16-Jul-2008 Steve Naroff <snaroff@apple.com> Two fixes:
- Make sure ObjCIvarDecl propagates the bitfield width.
- RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ff2410bcb9eb8459a2969bcf927696bbad21701b 16-Jul-2008 Ted Kremenek <kremenek@apple.com> Make iboutlet diagnostic lowercase


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f1b4c42c49a7d7da2353235104c0e48ce35e3c77 16-Jul-2008 Ted Kremenek <kremenek@apple.com> Make iboutlet diagnostic lowercase


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4e5bb1221fef5534ef364e2defff959dd2c2fab0 16-Jul-2008 Ted Kremenek <kremenek@apple.com> Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific attribute that the static analyzer will use to recognize what ivars are IBOutlets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
96329d4e07a9bcddb5a927892b70408c8fd8c474 16-Jul-2008 Ted Kremenek <kremenek@apple.com> Added parsing/sema support for __attribute__ ((IBOutlet)), a clang-specific attribute that the static analyzer will use to recognize what ivars are IBOutlets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
4bd03efee104b9ccbdd63b32207a4b8c09dde6e5 14-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactor Dead Stores error reporting to use the simplified BugReporter::EmitBasicReport interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
8f2698621f5090db1dea691059bd0ebd79fb7f14 14-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactor Dead Stores error reporting to use the simplified BugReporter::EmitBasicReport interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
39c766a4057b036a87c60e0cf8b9390ce0eda39c 14-Jul-2008 Ted Kremenek <kremenek@apple.com> Added method "EmitBasicReport" to BugReporter to simplify the emission of simple bug diagnostics.

Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
57202071e477530e9348bc76671ee369b2399b92 14-Jul-2008 Ted Kremenek <kremenek@apple.com> Added method "EmitBasicReport" to BugReporter to simplify the emission of simple bug diagnostics.

Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
824a3714750ccc5fe1f10bf17ce44df7ed6f882f 12-Jul-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Use of NextToken() makes ParseIdentifierStatement unnecessary.
Simplify the parser by removing Parser::ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b9f930d7bdb911be8420e044876221bf8a39f45f 12-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use of NextToken() makes ParseIdentifierStatement unnecessary.
Simplify the parser by removing Parser::ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
82437da70be7f7ec57d949110baa4383979201db 12-Jul-2008 Chris Lattner <sabre@nondot.org> start remembering diagnostics for various cases, add some missing
code. Switch to Eli's getIntWidth method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
54176fdb044312b4b77c3da6682d3575b3728d30 12-Jul-2008 Chris Lattner <sabre@nondot.org> start remembering diagnostics for various cases, add some missing
code. Switch to Eli's getIntWidth method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53499 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d072b8962f8d53178505b46930adfca5635551a5 12-Jul-2008 Ted Kremenek <kremenek@apple.com> Add new check: -check-objc-methodsigs. This check scans methods in
ObjCImplementationDecls and sees if a ancestor class defines a method with the
same selector but with a different type signature. Right now it just compares
return types, and mainly looks at differences in primitive values. The checking
will be expanded in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
0d8019e55c0f465bafc11b04aed691de95b9131d 12-Jul-2008 Ted Kremenek <kremenek@apple.com> Add new check: -check-objc-methodsigs. This check scans methods in
ObjCImplementationDecls and sees if a ancestor class defines a method with the
same selector but with a different type signature. Right now it just compares
return types, and mainly looks at differences in primitive values. The checking
will be expanded in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
334b19494f86dd977120e3f7ed632a3843d4acd5 11-Jul-2008 Chris Lattner <sabre@nondot.org> rename "SInt" methods to "Int" in APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
cf0f51d10f01065bd7bc3ffe77e18c30dcbdbea3 11-Jul-2008 Chris Lattner <sabre@nondot.org> rename "SInt" methods to "Int" in APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53467 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
a42f09a1b2e2bf2ade0290e25bf1faa52e1d4ae2 11-Jul-2008 Chris Lattner <sabre@nondot.org> make the new evaluator avoid conversions APValue<->APSInt in some cases.
Add some accessors to APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
b542afe02d317411d53b3541946f9f2a8f509a11 11-Jul-2008 Chris Lattner <sabre@nondot.org> make the new evaluator avoid conversions APValue<->APSInt in some cases.
Add some accessors to APValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
7d4d9f37895f6fdad1e6af81d2322959b7d1d172 11-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactored auditor interface within GRExprEngine and GRCoreEngine to use a "batch auditor" to dispatch to specialized auditors instead of having a separate vector for each audited Expr*. This not only provides a much cleaner implementation, but also allows us to install auditors for any expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
bdb435ddaafd5069becd543d638112f68825b89d 11-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactored auditor interface within GRExprEngine and GRCoreEngine to use a "batch auditor" to dispatch to specialized auditors instead of having a separate vector for each audited Expr*. This not only provides a much cleaner implementation, but also allows us to install auditors for any expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
438a8f0415d3cc8c167f0d934751fb26ea176541 11-Jul-2008 Ted Kremenek <kremenek@apple.com> Patch by Csaba Hruska and Peter Neumark:

"adds support (de)serialization (from)to (in memory) buffer."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
0ce902bb293dfefd0610e59f7441339d803979cf 11-Jul-2008 Ted Kremenek <kremenek@apple.com> Patch by Csaba Hruska and Peter Neumark:

"adds support (de)serialization (from)to (in memory) buffer."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
f22f868d634a4d197db3805d1d724c42fa3bf07e 11-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactored most of the "Store" piece of ValueState into a Store type. The
current store implementation is now encapsulated by BasicStore.

These changes prompted some long due constification of ValueState. Much of the
diffs in this patch include adding "const" qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueState.h
4323a57627e796dcfdfdb7d47672dc09ed308eda 11-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactored most of the "Store" piece of ValueState into a Store type. The
current store implementation is now encapsulated by BasicStore.

These changes prompted some long due constification of ValueState. Much of the
diffs in this patch include adding "const" qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicStore.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/Store.h
lang/Analysis/PathSensitive/ValueState.h
41189e8afe593f477e248db5d6b09a4c1b4aa2bb 10-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove unused class AnnotatedPath.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
e5690319a0e834b9bd9dcb5e444e59ecc5da3105 10-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove unused class AnnotatedPath.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
d45b9c680bdf99aa3610b54c87f7e50cc8956cce 10-Jul-2008 Ted Kremenek <kremenek@apple.com> Move some environment methods from ValueState/ValueStateManager to Environment/EnvironmentManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ValueState.h
d72ee907f76000446c706471e93d1f299104f9a7 10-Jul-2008 Ted Kremenek <kremenek@apple.com> Move some environment methods from ValueState/ValueStateManager to Environment/EnvironmentManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ValueState.h
ed022538e4341812396bd6ec740635a2ee0fd9f5 10-Jul-2008 Chris Lattner <sabre@nondot.org> Add an accessor, patch by Csaba Hruska.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
e3d5e3ae5bd8028774f07d7c3751d4db82118942 10-Jul-2008 Chris Lattner <sabre@nondot.org> Add an accessor, patch by Csaba Hruska.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
680e1d9c2eec9afaf8dfbc852a9fc5ab5058c242 10-Jul-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Simplify the parser a bit by looking at the next token without consuming it (by Preprocessor::LookNext):

-Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier.
-Separate ParseLabeledStatement from ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f7da726f09a6b7c5b9f5308e9690cb015398e671 10-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify the parser a bit by looking at the next token without consuming it (by Preprocessor::LookNext):

-Remove ParseExpressionWithLeadingIdentifier and ParseAssignmentExprWithLeadingIdentifier.
-Separate ParseLabeledStatement from ParseIdentifierStatement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e2187c26755e38ebfe23aeb65d56b66ecc75ee4c 10-Jul-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add Preprocessor::LookNext method, which implements an efficient way to 'take a peek' at the next token without consuming it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
9e0ed0bd5a3a7bac73973980ff32132a7724e674 10-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add Preprocessor::LookNext method, which implements an efficient way to 'take a peek' at the next token without consuming it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
7f20dfb0988f28ad7f72f778979318c19d56be3e 09-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove getParentMap() from GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1fa7f58b3a5e8aca4745c59f99659c3e11e876c4 09-Jul-2008 Ted Kremenek <kremenek@apple.com> Remove getParentMap() from GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
df40dbffb74ee0b16ce55ccd4be8b57f8d74c4ab 09-Jul-2008 Chris Lattner <sabre@nondot.org> Add parser support for __builtin_stdarg_start, PR2531


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
f8396b6b58b423e7078dcda9092a065f9a4ba53a 09-Jul-2008 Chris Lattner <sabre@nondot.org> Add parser support for __builtin_stdarg_start, PR2531


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
587ecc593353956ad71e892bd6f4587273ba70d6 08-Jul-2008 Ted Kremenek <kremenek@apple.com> Initial work on splitting the ValueState into an Environment, Store, and
Constraints. These concepts are already present in the current ValueState, but
the implementation is monolothic. Making ValueState more modular opens up new
design choices for customizing the analysis engine.

In the context of the analysis engine, the "Environment" is the binding between
Expr* (expressions) and intermediate symbolic values (RValues).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ValueState.h
8133a26c166be89fb4f0a339db1e2fe923c51a70 08-Jul-2008 Ted Kremenek <kremenek@apple.com> Initial work on splitting the ValueState into an Environment, Store, and
Constraints. These concepts are already present in the current ValueState, but
the implementation is monolothic. Making ValueState more modular opens up new
design choices for customizing the analysis engine.

In the context of the analysis engine, the "Environment" is the binding between
Expr* (expressions) and intermediate symbolic values (RValues).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/Environment.h
lang/Analysis/PathSensitive/ValueState.h
b16ece4089a0128bfff5004101e15f6f5748232c 08-Jul-2008 Anders Carlsson <andersca@mac.com> Add LValue setters for APValue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
62f6b2110792f2db8feb35247b0ab824c6cc608d 08-Jul-2008 Anders Carlsson <andersca@mac.com> Add LValue setters for APValue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
9ff57440840339193f6505028ae65de0fbd3b9f0 07-Jul-2008 Ted Kremenek <kremenek@apple.com> In a report-XXXXX.html, make the title include the name of the file with the bug. Patch by Jean-Daniel Dupas!

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002166.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
f6f593fae2f0531b4bc06891941f7fbba5217618 07-Jul-2008 Ted Kremenek <kremenek@apple.com> In a report-XXXXX.html, make the title include the name of the file with the bug. Patch by Jean-Daniel Dupas!

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002166.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
0473be44a47a93686fff9fe104201e0f4f54137f 05-Jul-2008 Seo Sanghyeon <sanxiyn@gmail.com> Fix warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
fe5042e287352d00db89508bf3c1373cc44b85db 05-Jul-2008 Seo Sanghyeon <sanxiyn@gmail.com> Fix warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
2261741ed3bb7b2296d89be09d138b6796acbfb6 05-Jul-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Remove unused diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8b8e9a8e6fb5e74924ccef147fa795ef7c874936 05-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove unused diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53140 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
55219f082cc8a095dd7d64495bb1bbdebaf2888f 04-Jul-2008 Seo Sanghyeon <sanxiyn@gmail.com> Fix warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/DeclSpec.h
b4825df6af2298f9007ee95ab5f16ed4b855ef4a 04-Jul-2008 Seo Sanghyeon <sanxiyn@gmail.com> Fix warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/DeclSpec.h
4ea864d965fed51cd1012d8cd8f4fc76d9d25245 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Added an "ivar_empty" method to ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a0fb5861dec7aa1da0d21d5759678d76b00464f4 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Added an "ivar_empty" method to ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
fd32dbf452f5359a2f71de5ed8d6b964dd67e765 03-Jul-2008 Ted Kremenek <kremenek@apple.com> For the -dealloc checker, check the LangOptions to determine whether or not the code is compiled with GC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
3cd483cbbf8921f463b3ee91d5da8a63db9d1299 03-Jul-2008 Ted Kremenek <kremenek@apple.com> For the -dealloc checker, check the LangOptions to determine whether or not the code is compiled with GC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
c2a9eae2f529583992e330eeb38d3b030e1ddf03 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers instead of references, because they can both fail
on functions we cannot construct full CFGs for yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
7032f460fc9828f386056e75933da5af61e88638 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers instead of references, because they can both fail
on functions we cannot construct full CFGs for yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
724133b70c24637b7fae38509ab393e4b4d28381 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Added static analysis check to see if a subclass of NSObject implements -dealloc, and whether or not that implementation calls [super dealloc].


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
db09a4dee28a4515438af60f2d2b4a83e4965c31 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Added static analysis check to see if a subclass of NSObject implements -dealloc, and whether or not that implementation calls [super dealloc].


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
c7436af079c74b24e071f32a8fd2e356577e3bcc 03-Jul-2008 Anders Carlsson <andersca@mac.com> Shuffle things around in preparation for integrating Eli's constant evaluator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
lang/AST/Expr.h
c44eec6dd29ee9415cbd38a35deff4c8b67abb6a 03-Jul-2008 Anders Carlsson <andersca@mac.com> Shuffle things around in preparation for integrating Eli's constant evaluator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
lang/AST/Expr.h
26ef21085c85b74affb79ca68ca78ac07f1c5666 03-Jul-2008 Anders Carlsson <andersca@mac.com> Make APValue an APSInt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
2e478080f83f90728d8d56099cd32180c57debbc 03-Jul-2008 Anders Carlsson <andersca@mac.com> Make APValue an APSInt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
eb9627b733b6e2b22b97105d149fc5ec6e864898 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Unify the code path for the Dead Stores checker to always use the BugReporter interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
e207558e9dbed963eebf5cf31fdb02616f1545a3 03-Jul-2008 Ted Kremenek <kremenek@apple.com> Unify the code path for the Dead Stores checker to always use the BugReporter interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53054 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
ba1c7eda054d485d3f62e1508f2bf48a4ca72ec3 02-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactored some of the BugReporter interface so that data such as the ASTContext&, PathDiagnosticClient*, can be provided by an external source.
Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
c095997b853270d8adb6fe55209a4dbc42803d16 02-Jul-2008 Ted Kremenek <kremenek@apple.com> Refactored some of the BugReporter interface so that data such as the ASTContext&, PathDiagnosticClient*, can be provided by an external source.
Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
1607f51cd36a79ddbfee87d5a58dc4df54416275 02-Jul-2008 Ted Kremenek <kremenek@apple.com> GRExprEngine now expects the LiveVariables information to be provided by its creator.
This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
8b23361a6a50be6dbd1056add570eb90598474b0 02-Jul-2008 Ted Kremenek <kremenek@apple.com> GRExprEngine now expects the LiveVariables information to be provided by its creator.
This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
3349aa1f5db6e584ec34685539c8abdb22f0d55b 02-Jul-2008 Ted Kremenek <kremenek@apple.com> Added version of CheckDeadStores that accepts a client-provided LiveVariables object.
Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
17fdf955237aa626acbfd6070633318380c2340f 02-Jul-2008 Ted Kremenek <kremenek@apple.com> Added version of CheckDeadStores that accepts a client-provided LiveVariables object.
Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
ecf7951f409695472e8bfa9940886ee8dcb289d7 02-Jul-2008 Ted Kremenek <kremenek@apple.com> Added method "HandleTranslationUnit" to ASTConsumer. This is called by ParseAST when all of the ASTs in a translation unit have been built.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
c87190da60bca25fe3bc1fe6831916f0076b72b8 02-Jul-2008 Ted Kremenek <kremenek@apple.com> Added method "HandleTranslationUnit" to ASTConsumer. This is called by ParseAST when all of the ASTs in a translation unit have been built.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53042 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
38f16717fc72b2c9dcde319ae04bccc4b79a94e3 01-Jul-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add Sema support for C++ classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
07952324dda0e758c17f8bc3015793c65c51c48c 01-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add Sema support for C++ classes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
2a674dca3ed88e58c536026c51a4ed9cbc32d4a8 30-Jun-2008 Chris Lattner <sabre@nondot.org> Make a few related changes:

1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/Basic/TargetInfo.h
b7cfe88e88cb4f46308de89cf3f0c81bfe624128 30-Jun-2008 Chris Lattner <sabre@nondot.org> Make a few related changes:

1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/Basic/TargetInfo.h
ca8dbcade97e1f38fe263982421843fab6efa0ea 30-Jun-2008 Chris Lattner <sabre@nondot.org> refactor some code out into a new method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
368328c88bd46f471bbf85f05438b4f2eb95df5b 30-Jun-2008 Chris Lattner <sabre@nondot.org> refactor some code out into a new method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
2024f0a17308abe4dd030e4c51ec26b746b8c31f 29-Jun-2008 Chris Lattner <sabre@nondot.org> Make ProcessDeclAttributes walk the declarator structure pulling
decl attributes out of the various places they can hide. This makes
us correctly reject things like this:

t.c:2:22: error: mode attribute only supported for integer and floating-point types
int **__attribute((mode(HI)))* i32;
^

because you can't make a pointer be HImode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e5c5ee1cff9ec084f176fa252774262677857ad2 29-Jun-2008 Chris Lattner <sabre@nondot.org> Make ProcessDeclAttributes walk the declarator structure pulling
decl attributes out of the various places they can hide. This makes
us correctly reject things like this:

t.c:2:22: error: mode attribute only supported for integer and floating-point types
int **__attribute((mode(HI)))* i32;
^

because you can't make a pointer be HImode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
8ed14aa3f5b64c6f6d755a8da2b040c2b0ca67ce 29-Jun-2008 Chris Lattner <sabre@nondot.org> more cleanups, refactor HandleVectorTypeAttribute
to work list the rest of the attr handlers. Also, rename
it to HandleVectorSizeAttribute to match its attr name.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
065c5a801f46dda8ff0cd6ad954c4e5f94a3be75 29-Jun-2008 Chris Lattner <sabre@nondot.org> more cleanups, refactor HandleVectorTypeAttribute
to work list the rest of the attr handlers. Also, rename
it to HandleVectorSizeAttribute to match its attr name.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52872 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0832dbca0e11ee020bbed181c515b3835158436e 28-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2501; this patch makes usual arithmetic conversions for
integers which have the same width and different signedness work
correctly. (The testcase in PR2501 uses a comparison between long and
unsigned int).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
ad74a758189180b8ab8faea648e4766c3bfd7fcb 28-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2501; this patch makes usual arithmetic conversions for
integers which have the same width and different signedness work
correctly. (The testcase in PR2501 uses a comparison between long and
unsigned int).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52853 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
dc78956c9ddfdfd21f6f29f7eb5f372c3a29da82 28-Jun-2008 Chris Lattner <sabre@nondot.org> the 'mode' attribute is a decl attribute, not a type attribute. Move it to
SemaDeclAttr, and do some cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
fbf1347e1e225cbc206563bba3f0a75f9ceaa571 28-Jun-2008 Chris Lattner <sabre@nondot.org> the 'mode' attribute is a decl attribute, not a type attribute. Move it to
SemaDeclAttr, and do some cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0009c94da2436d389f27f95bd4e0d8e6c47bcb55 26-Jun-2008 Cédric Venet <cedric.venet@laposte.net> Another class -> struct in declaration to match definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
8429fca639bb4fbb6d589f85a2cc84513db4f748 26-Jun-2008 Cedric Venet <cedric.venet@laposte.net> Another class -> struct in declaration to match definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52782 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
25349e4514db9ff59de74f2549113a75028af2a4 26-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Make clang work on 32 bit powerpc linux.

Patch by Nick Lewycky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
e9484fc09a82b0bcd9f4921083440df4aea04f52 26-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Make clang work on 32 bit powerpc linux.

Patch by Nick Lewycky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
5e77adeee0a6117f659a5046badcb97fe6fedb67 26-Jun-2008 Chris Lattner <sabre@nondot.org> Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs. Propagate around 'const'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
985abd958d83e4f109a15451440f1d008ae45f59 26-Jun-2008 Chris Lattner <sabre@nondot.org> Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs. Propagate around 'const'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
c1cdb6220e2f892cef6bc64d4b33d2090e58744e 26-Jun-2008 Chris Lattner <sabre@nondot.org> another const correctness bug with declspec.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
65e4af90e6b0ed991525718d20ba5b06e79c9072 26-Jun-2008 Chris Lattner <sabre@nondot.org> another const correctness bug with declspec.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
02c126db0f385d68e971fc0e8d61771705194a63 26-Jun-2008 Chris Lattner <sabre@nondot.org> fix const correctness of accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
e6bec8a6e99bcc9894b3a8bc54434eca4cbe6a6e 26-Jun-2008 Chris Lattner <sabre@nondot.org> fix const correctness of accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
9d464449c2a782e0a91ea85d79ad9e35418ec441 25-Jun-2008 Ted Kremenek <kremenek@apple.com> Add Profile method to QualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3f2dcb1ca8bd2d5d3ccc5c80f4ab06f949d88a89 25-Jun-2008 Ted Kremenek <kremenek@apple.com> Add Profile method to QualType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3c5b5a448a9d66ea0a0a26adefe0ef5afd56a894 25-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Set CXXClassVar to identifier namespace IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
09c31b0d78fc4e7f1d1828d01d9977cc3e242ea3 25-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set CXXClassVar to identifier namespace IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52718 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
d626facb27e3ef035fa9a1871e7c1ca113d45bd4 25-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Set CXXMethod to identifier namespace IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
1ce6eadf80453d132d378ee031f3fbf5259a7d2a 25-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set CXXMethod to identifier namespace IDNS_Ordinary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52697 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
9d78433ee41612448ebaae769e041991bae86364 25-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add parsing support for C++ classes.

Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
lang/Parse/Scope.h
4cc18a4d5222e04bd568b1e3e4d86127dbbcdf3f 25-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add parsing support for C++ classes.

Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52694 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
lang/Parse/Scope.h
1f843bc6d8ea3c9ac550a64b37e37968b98580d2 24-Jun-2008 Ted Kremenek <kremenek@apple.com> Update serialization for ObjCMessageExpr to handle additional bit-swizziling of receiver information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
be78424edfbc6095c4acb83c7ae7f53a42f0c870 24-Jun-2008 Ted Kremenek <kremenek@apple.com> Update serialization for ObjCMessageExpr to handle additional bit-swizziling of receiver information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52679 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
ee2c9fdd5260852b8835dbb187a8e26101924e69 24-Jun-2008 Ted Kremenek <kremenek@apple.com> ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed. The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
4df728e368fa1f65ffc57572fed613dcca5b4fe8 24-Jun-2008 Ted Kremenek <kremenek@apple.com> ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed. The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
3db4ab47936cd2053bc8c992823caa5a9712ab54 24-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Move the namespace action declarations at the "C++ declarations" section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0d8ac9a8b13609a4881f69ab40e64cbe20929d0a 24-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the namespace action declarations at the "C++ declarations" section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
55ab98463d41f1be5a1bd24f5a740a866241f01d 24-Jun-2008 Cédric Venet <cedric.venet@laposte.net> Test commit: changed the forward declaration of FieldDeclarator from class to struct to be coherent with its definition (DeclSpec.h)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0d6d153cbeda12c75073fabfcf27dffd8c710816 24-Jun-2008 Cedric Venet <cedric.venet@laposte.net> Test commit: changed the forward declaration of FieldDeclarator from class to struct to be coherent with its definition (DeclSpec.h)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52671 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a224a3045e613251881ee43e92e3e1a90eeffb21 24-Jun-2008 Ted Kremenek <kremenek@apple.com> Fix comments: "class method" should be "instance method" and vis versa


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
a75a8ea5b72ebdda5f651b57ae2c3b4e84b69253 24-Jun-2008 Ted Kremenek <kremenek@apple.com> Fix comments: "class method" should be "instance method" and vis versa


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52669 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
d63b5017e0fa28d94bacd4ec26082a3442695339 22-Jun-2008 Chris Lattner <sabre@nondot.org> add a new clang::APValue class at Eli's request. It is a discriminated
union between [potentially complex] APInt/APFloat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
8031a85dc88225723d960c7c142e4fe97c2f12fe 22-Jun-2008 Chris Lattner <sabre@nondot.org> add a new clang::APValue class at Eli's request. It is a discriminated
union between [potentially complex] APInt/APFloat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/APValue.h
1bf58f62dfed33edee9838888757b4822b36e054 21-Jun-2008 Chris Lattner <sabre@nondot.org> add parser and sema support for the funny ObjC '@defs' thing.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
5a6ddbf295d2ea1c28cfb67d82db22f3893ede6f 21-Jun-2008 Chris Lattner <sabre@nondot.org> add parser and sema support for the funny ObjC '@defs' thing.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
ffc58c83c5d94cb90c3cc23fe632fda66a6ef3b1 21-Jun-2008 Chris Lattner <sabre@nondot.org> remove dead enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
63e9d5673791096589c601528e857e00a13050ff 21-Jun-2008 Chris Lattner <sabre@nondot.org> remove dead enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4423d37a36311b4e68a8715c4b60d4548c7588b0 21-Jun-2008 Chris Lattner <sabre@nondot.org> Switch 'super' from being a weird cast thing to being a predefined expr node.
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0d17f6f7b1882850fa56ad38cca0ee518869255b 21-Jun-2008 Chris Lattner <sabre@nondot.org> Switch 'super' from being a weird cast thing to being a predefined expr node.
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
72f52c0010cac37eb6e222bcd4c2a75057890f02 20-Jun-2008 Ted Kremenek <kremenek@apple.com> Modified the dead stores checker to...

1) Check if a dead store appears as a subexpression. For such cases, we emit
a verbose diagnostic so that users aren't confused. This addresses:

<rdar://problem/5968508> checker gives misleading report for dead store in loop

2) Don't emit a dead store warning when assigning a null value to a pointer.
This is a common form of defensive programming. We may wish to make
this an option to the the checker one day.

This addresses the feature request in the following email:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-June/001978.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
1a654b60ef40e84f3943cdb581795c4d4dae1e45 20-Jun-2008 Ted Kremenek <kremenek@apple.com> Modified the dead stores checker to...

1) Check if a dead store appears as a subexpression. For such cases, we emit
a verbose diagnostic so that users aren't confused. This addresses:

<rdar://problem/5968508> checker gives misleading report for dead store in loop

2) Don't emit a dead store warning when assigning a null value to a pointer.
This is a common form of defensive programming. We may wish to make
this an option to the the checker one day.

This addresses the feature request in the following email:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-June/001978.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
0cac82a6bb098d713f3516ef0d743a71023cb4de 20-Jun-2008 Ted Kremenek <kremenek@apple.com> Added ParentMap, a class to represent a lazily constructed mapping from child to parents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
f8e32cf062f39fff1a00aff748cb6b5dc0abc2fe 20-Jun-2008 Ted Kremenek <kremenek@apple.com> Added ParentMap, a class to represent a lazily constructed mapping from child to parents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ParentMap.h
8e5dfe98676eb6ed1c95a1d0d9854e267044992e 20-Jun-2008 Ted Kremenek <kremenek@apple.com> Added "Decl::getCodyBody()", a virtual method that returns the root AST node (Stmt*) that the Decl wraps (if any). Currently this only returns a non-null value for FunctionDecl and ObjCMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
792481eec23d8c1aa92173be589e2ae9d02514a5 20-Jun-2008 Ted Kremenek <kremenek@apple.com> Added "Decl::getCodyBody()", a virtual method that returns the root AST node (Stmt*) that the Decl wraps (if any). Currently this only returns a non-null value for FunctionDecl and ObjCMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
f05eec434a61b9f70e63d085ac2b6b1bb3ccef31 18-Jun-2008 Ted Kremenek <kremenek@apple.com> Added a new ProgramPoint: PostPurgeDeadSymbols. This new program point distinguishes between the cases when we just evaluated the transfer function of a Stmt* (PostStmt) or performed a load (PostLoad). This solves a caching bug observed in a recent bug report.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/ProgramPoint.h
331b0ac44b9eb0ffcba66b4f3f3f9adb27c2434f 18-Jun-2008 Ted Kremenek <kremenek@apple.com> Added a new ProgramPoint: PostPurgeDeadSymbols. This new program point distinguishes between the cases when we just evaluated the transfer function of a Stmt* (PostStmt) or performed a load (PostLoad). This solves a caching bug observed in a recent bug report.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/ProgramPoint.h
8c7c6a18ccb1d4a9e6b4673eccf2ed7a77e5dba4 17-Jun-2008 Chris Lattner <sabre@nondot.org> Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
4111024be81e7c0525e42dadcc126d27e5bf2425 17-Jun-2008 Chris Lattner <sabre@nondot.org> Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
156714e64d20160e0e57bd34adcd422fa82819dc 17-Jun-2008 Ted Kremenek <kremenek@apple.com> Fix more strict-aliasing warnings.
Fix indentation of class declarations in ExprCXX.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Stmt.h
1060aff23f72135f8b50034a1e80f16725ebc56c 17-Jun-2008 Ted Kremenek <kremenek@apple.com> Fix more strict-aliasing warnings.
Fix indentation of class declarations in ExprCXX.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/Stmt.h
2719e9894e3e62bdfb9ee8ac2a520549dc4d5360 17-Jun-2008 Ted Kremenek <kremenek@apple.com> This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
5549976193e34417d4474a5f4a514268ef6666c7 17-Jun-2008 Ted Kremenek <kremenek@apple.com> This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprObjC.h
25c3f2ff6c0a8c2d226b5f7b3db6223c36c7a027 10-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix getTrueExpr for ConditionalOperator to actually work. No testcase
because it's currently unused.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dbdbbd7a7b728bf7734c992fe72b0e549d31a710 10-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix getTrueExpr for ConditionalOperator to actually work. No testcase
because it's currently unused.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52166 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a5c14b2e73e1674e639478142adf0ab71d00c367 10-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> -Add DeclChain member to DeclContext.
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
7643536c36b0449256d5ee2efc03a7e4a784a0b3 10-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Add DeclChain member to DeclContext.
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
c6cc7d5a60b59381f1c9880ed8fdb9b2316c3a85 10-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> -Changes to TagDecl:
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
39ba4aeca296b1c9f04bde7d9d3cbbf129f1abd3 10-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Changes to TagDecl:
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclCXX.h
6df1fc024820b27e7f4a6bee6e15052bbec8eea0 09-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Added new C++ AST Decl subclasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
d3bb44f0f1a83cb208d3e61ee80afe6a4d20d2d8 09-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Added new C++ AST Decl subclasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclCXX.h
7853438716ca87cd811b17e1d7800da38e815638 08-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> implement the alias attirbute (in both Sema and Codegen)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
d4cbda6292b321c2e7dce7f039d92918fee99b3a 08-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> implement the alias attirbute (in both Sema and Codegen)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
1aaf71cae87511d0e93c4384de8bad267992310a 08-Jun-2008 Chris Lattner <sabre@nondot.org> capture whether a CharacterLiteral was wide or not in the AST.
Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c250aae4f645833aed3a6321bc8598f7330dce8d 08-Jun-2008 Chris Lattner <sabre@nondot.org> capture whether a CharacterLiteral was wide or not in the AST.
Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e0391b21fd15dcc6a3800b6a81794b5d790d2e20 08-Jun-2008 Chris Lattner <sabre@nondot.org> Fix ast dumping to work with long double literals, e.g. we dump:

long double X() { return 1.0L; }

as:

long double X()
(CompoundStmt 0xb06a00 <t.c:2:17, col:32>
(ReturnStmt 0xb068d0 <col:19, col:26>
(FloatingLiteral 0xb02cf0 <col:26> 'long double' 1.000000)))




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
da8249e57f3badecf925571881fe57243935c6c1 08-Jun-2008 Chris Lattner <sabre@nondot.org> Fix ast dumping to work with long double literals, e.g. we dump:

long double X() { return 1.0L; }

as:

long double X()
(CompoundStmt 0xb06a00 <t.c:2:17, col:32>
(ReturnStmt 0xb068d0 <col:19, col:26>
(FloatingLiteral 0xb02cf0 <col:26> 'long double' 1.000000)))




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7294056c55bb759738d07c02fc0092172b57bfdb 07-Jun-2008 Chris Lattner <sabre@nondot.org> Mark the right ctor explicit, patch by Cédric Venet


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
259dfdc79126a957e56e55e3e3788031b99be12f 07-Jun-2008 Chris Lattner <sabre@nondot.org> Mark the right ctor explicit, patch by Cédric Venet


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
2a4224a74da7c625d030c24e6a1bd1aa3f50f0e8 07-Jun-2008 Ted Kremenek <kremenek@apple.com> Use a common SourceManager when processing multiple files. This allows us to cache the contents of source files already loaded from disk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c0c03bc3c4669897ce8a995d7c20d9c71bc7cc8f 07-Jun-2008 Ted Kremenek <kremenek@apple.com> Use a common SourceManager when processing multiple files. This allows us to cache the contents of source files already loaded from disk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52066 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
1e5e0bfd13493c9442af346f4756e2a4e3803be8 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Reclaim memory owned by ObjCForwardProtocolDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
05ac3ef08f9d06e0a4439073c9edabf7f912f946 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Reclaim memory owned by ObjCForwardProtocolDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ff29162389e64413aafc9e6d92faa2c2b9cf5591 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Implement "Destroy" and destructor for ObjCClassDecl, allowing us to reclaim its memory and the memory of the Decls it owns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
400d95fb7bb9fac609f8613862b84f3a2a7d510f 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Implement "Destroy" and destructor for ObjCClassDecl, allowing us to reclaim its memory and the memory of the Decls it owns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
c906e5e396834868d595dbec5035906abefeceef 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Implement "Destroy" and destructor for ObjCProtocolDecl, allowing us to reclaim its memory and the memory of the Decls it owns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
1c8a413c1e00636c77666ddf1e3b0311f3fa8c81 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Implement "Destroy" and destructor for ObjCProtocolDecl, allowing us to reclaim its memory and the memory of the Decls it owns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8c945b1ec3dd1a9cf740f11dcc3799e0bff5d6f4 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Initial work on additional memory collection for ObjC AST objects. We now
have Destroy methods of ObjcMethodDecl and ObjCInterfaceDecl which recursively
destroy their owned Decls and Stmts. There are a few cases where it is not
clear what to do (FIXMEs included in the patch).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8a779314870760848e61da2c428a78971fe3f1c3 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Initial work on additional memory collection for ObjC AST objects. We now
have Destroy methods of ObjcMethodDecl and ObjCInterfaceDecl which recursively
destroy their owned Decls and Stmts. There are a few cases where it is not
clear what to do (FIXMEs included in the patch).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8682d88fcd4ed14b139661303eb3d6232ca1bbd4 06-Jun-2008 Devang Patel <dpatel@apple.com> During interface layout, don't forget super class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
6a5a34c0e5587263df719c62030761cf59d27fe4 06-Jun-2008 Devang Patel <dpatel@apple.com> During interface layout, don't forget super class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
96bbf808c93b5f6d796f0302c250ad966bd71345 06-Jun-2008 Devang Patel <dpatel@apple.com> Undo previous check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
80d310c6310084fb2bd9d37ecf3a32dac1148533 06-Jun-2008 Devang Patel <dpatel@apple.com> Undo previous check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
fa6f94876cdaf7ef2f07777900aa9b58ece154d0 06-Jun-2008 Devang Patel <dpatel@apple.com> During interface layout, don't forget super class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
0e8eda7a4da933b04eac89d2856abf728188bf13 06-Jun-2008 Devang Patel <dpatel@apple.com> During interface layout, don't forget super class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
d1f0eb4423554ae71b014a90c386a2b1d67e6d7b 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5987482> clang on xcode: null dereference in Sema::ActOnMemberReferenceExpr.

In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>").


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3d2c22b1d334fa74d26a5f21841cb55df5dfdd1a 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5987482> clang on xcode: null dereference in Sema::ActOnMemberReferenceExpr.

In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>").


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0a7149f3e73bacda21c7c0b02f6b0d9fef2332ac 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix trivial crasher and downgrade an error to warning (to match GCC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
74199b6507ff0094b74841620063d88c9669e2d7 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix trivial crasher and downgrade an error to warning (to match GCC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4b6bf7037bfd27f8f07e72322a84a3c1202d7627 04-Jun-2008 Devang Patel <dpatel@apple.com> Add ObjCInterface layout support.
Reuse RecordLayout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
44a3dded8080c5c9cfdad208ade8f8f7850d9a4f 04-Jun-2008 Devang Patel <dpatel@apple.com> Add ObjCInterface layout support.
Reuse RecordLayout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
bfe323c208a547e55c9c68f3df04adcac4321e2c 04-Jun-2008 Devang Patel <dpatel@apple.com> Refactoring.
Move field layout code in a ASTRecordLayout member fn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
8b27704d61be128bbff6352e6ef417efc0d6bf4f 04-Jun-2008 Devang Patel <dpatel@apple.com> Refactoring.
Move field layout code in a ASTRecordLayout member fn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
38f2caa6a8e671ce7189b63bfaeda11f323582ec 04-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Don't assume that the type of a FunctionDecl is a FunctionType; that
assumption isn't accurate in the presence of typedefs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
50c5c7241029651d4ff976f840bbca59fa81445f 04-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Don't assume that the type of a FunctionDecl is a FunctionType; that
assumption isn't accurate in the presence of typedefs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
842126ec695852dbf8803d7570799c00b69b61cb 04-Jun-2008 Ted Kremenek <kremenek@apple.com> Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TranslationUnit.h
e7d07d113677a39026ff5119b8b67f6fe8ca9793 04-Jun-2008 Ted Kremenek <kremenek@apple.com> Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/TranslationUnit.h
8bb229201d651479a1219ed8806e855e12a0b669 04-Jun-2008 Steve Naroff <snaroff@apple.com> Add a few more built-in functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
eaf9a42b78ef8e5f2eac5dfaf45a666f2f1d00f9 04-Jun-2008 Steve Naroff <snaroff@apple.com> Add a few more built-in functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
48fb3eeb6f7e1b50cbd3709263be0baa20a3c86e 03-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Re-fix r51907 in a way which doesn't affect valid code. This essentially
moves the check for the invalid construct to a point where it doesn't
affect other uses of isIntegerConstantExpr, and we can warn properly
when the extension is used. This makes it a bit more complicated, but
it's a lot cleaner.

Steve, please tell me if this check is sufficient to handle the
relevant system header. I know it's enough to handle the testcase, but
I don't know what exactly the original looks like.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1b76ada683bcec33799fd0eb114aaad3e1d04ca9 03-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Re-fix r51907 in a way which doesn't affect valid code. This essentially
moves the check for the invalid construct to a point where it doesn't
affect other uses of isIntegerConstantExpr, and we can warn properly
when the extension is used. This makes it a bit more complicated, but
it's a lot cleaner.

Steve, please tell me if this check is sufficient to handle the
relevant system header. I know it's enough to handle the testcase, but
I don't know what exactly the original looks like.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a4280534357cc1347522886b5471d9e2e31d94c4 03-Jun-2008 Steve Naroff <snaroff@apple.com> Add a builtin. Fixes <rdar://problem/5982037> clang on xcode: error: incompatible operand types ('int' and 'char *').


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
cf00e0bee3c664eff8c2f00272ddcf17a321b78f 03-Jun-2008 Steve Naroff <snaroff@apple.com> Add a builtin. Fixes <rdar://problem/5982037> clang on xcode: error: incompatible operand types ('int' and 'char *').


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51908 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
5ad852960e0498af6d221096c7e4e6251e39ef19 03-Jun-2008 Steve Naroff <snaroff@apple.com> Allow for a GCC cast extension.
Fixes part of <rdar://problem/5980829> clang on xcode: used type 'NSRange' where arithmetic or pointer type is required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
63564b8f8bbe83c236ddf74c257a63fa1341a274 03-Jun-2008 Steve Naroff <snaroff@apple.com> Allow for a GCC cast extension.
Fixes part of <rdar://problem/5980829> clang on xcode: used type 'NSRange' where arithmetic or pointer type is required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51900 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6f78625be42e0cc4d962a80d05aa71e37f59011d 03-Jun-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier 'super'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
e3e9add4fd788927df6f545570e7838db59c01d7 03-Jun-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5979875> clang on xcode: error: use of undeclared identifier 'super'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
bfcf4775542adc2b055de7083ec31300a60ed279 02-Jun-2008 Chris Lattner <sabre@nondot.org> handle the full assignment-expression grammar when using an
objc message send in an initializer expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b93fb495660665c17c7f43172ae155d6a8c32ce8 02-Jun-2008 Chris Lattner <sabre@nondot.org> handle the full assignment-expression grammar when using an
objc message send in an initializer expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
7765434b52a807b234d8567baea6718c509ae79b 02-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix decl attributes cleaning
this plugs the leak of attributes and also fixes a crash in the test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
9141bee299a05349924a34a7153d7064c9e0a107 02-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix decl attributes cleaning
this plugs the leak of attributes and also fixes a crash in the test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
79b50cb1dc1d0ea23c45d05d77878fc0fc265559 31-May-2008 Ted Kremenek <kremenek@apple.com> Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass a
TranslationUnit object instead of an ASTContext. By default it calls
Initialize(ASTConstext& Context) (to match with the current interface used by
most ASTConsumers).

Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit
to not free its Decls. This is a workaround for: <rdar://problem/5966749>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
e3a6198400453c0d9623207718e4942f7c111f87 31-May-2008 Ted Kremenek <kremenek@apple.com> Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass a
TranslationUnit object instead of an ASTContext. By default it calls
Initialize(ASTConstext& Context) (to match with the current interface used by
most ASTConsumers).

Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit
to not free its Decls. This is a workaround for: <rdar://problem/5966749>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
718b6638e0d259d1b8371ef30e475e9c2e981ffc 30-May-2008 Ted Kremenek <kremenek@apple.com> Fix some strict-aliasing warnings by using Stmt* instead of Expr* in VariableArrayType, EnumConstantDecl, and VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
b3064041583eb134fbf56906728bf752bc65b572 30-May-2008 Ted Kremenek <kremenek@apple.com> Fix some strict-aliasing warnings by using Stmt* instead of Expr* in VariableArrayType, EnumConstantDecl, and VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
05391d26ab56348a43ea4f8059d67f2ce7fc3d77 30-May-2008 Steve Naroff <snaroff@apple.com> Add basic support for properties references (a missing feature).

While it is far from complete, it does fix the following <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
ae7840776d6cd31b4d7a4a345b61bcbb3744df6c 30-May-2008 Steve Naroff <snaroff@apple.com> Add basic support for properties references (a missing feature).

While it is far from complete, it does fix the following <rdar://problem/5967199> clang on xcode: error: member reference is not to a structure or union



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprObjC.h
lang/AST/StmtNodes.def
9ed3e7794b4c45ba3856f5997191d16e234df958 29-May-2008 Steve Naroff <snaroff@apple.com> - Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtVisitor.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
f494b579b22f9950f5af021f0bf9879a91bb8b41 29-May-2008 Steve Naroff <snaroff@apple.com> - Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/Expr.h
lang/AST/ExprObjC.h
lang/AST/StmtVisitor.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
ca2a8dde4aa348ad253609fe417674b81bcd88f2 29-May-2008 Anton Korobeynikov <asl@math.spbu.ru> Update to follow recent LLVM changes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/Rewrite/RewriteRope.h
525204a7ca5c3c0aac8166d8f27abb988a84c850 29-May-2008 Anton Korobeynikov <asl@math.spbu.ru> Update to follow recent LLVM changes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/Rewrite/RewriteRope.h
3a22b7c929a8f727fcee2b49a0a34616fdfabe6e 29-May-2008 Chris Lattner <sabre@nondot.org> Implement support for -w, which silences all warnings. PR2384.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
5b4681c8ef65808ec4d72ab6081efd24d53d4969 29-May-2008 Chris Lattner <sabre@nondot.org> Implement support for -w, which silences all warnings. PR2384.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51683 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
f8d5409eeac9ba683f2baae10be2d50644c88cdf 28-May-2008 Chris Lattner <sabre@nondot.org> Fix rewrite rope to keep the leaf list up-to-date as it erases leaves
from the rope. rdar://5952468


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
3d2e8c7b70d5719d00b919708fdd5a45cffda836 28-May-2008 Chris Lattner <sabre@nondot.org> Fix rewrite rope to keep the leaf list up-to-date as it erases leaves
from the rope. rdar://5952468


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
fb9e3078971208f43283ac97c6bb27f58ed54baf 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Add the copysign builtins; I ran into a program that wanted
__builtin_copysign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
bcfd5d4ac69a3589b52bde91106f03f30de9e804 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Add the copysign builtins; I ran into a program that wanted
__builtin_copysign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
d270181f22e9ec56708f65c1f41e85cd34a3f6db 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Don't swap function decls, and add them to the scope as they are
encountered. Mixing up the decls is unintuitive, and confuses the AST
destruction code. Fixes PR2360.

Note that there is a need to look up the characteristics and
declarations of a function associated with a particular name or decl,
but the original swapping code doesn't solve it properly.
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one
suggestion for how to fix that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2742496d75ecb733c07c65c9a35cbfaa88ca81e4 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Don't swap function decls, and add them to the scope as they are
encountered. Mixing up the decls is unintuitive, and confuses the AST
destruction code. Fixes PR2360.

Note that there is a need to look up the characteristics and
declarations of a function associated with a particular name or decl,
but the original swapping code doesn't solve it properly.
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-May/001644.html is one
suggestion for how to fix that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
86ad52274e497d28a03aa9e5b0c43fb325421c72 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of gcc mode attribute; this is significant because
it fixes PR2204. Not too much to say about the implementation; it works
in a similar way to the vector size attribute.

At some point, we need to modify the targets to provide information
about the appropriate types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
3c0eb160ca1361a82b9f15b3b40a2425adc14d0f 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of gcc mode attribute; this is significant because
it fixes PR2204. Not too much to say about the implementation; it works
in a similar way to the vector size attribute.

At some point, we need to modify the targets to provide information
about the appropriate types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
5e56f99b13bc9e10d1801d09c078c5c669621376 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Change diagnostic per suggestion, to make it a bit clearer what is
happening.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1f3105e1eeece9ffdc14d7262c7af486ac76600a 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Change diagnostic per suggestion, to make it a bit clearer what is
happening.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f8df28c23f722d990d0c8e3236916d8efa7741cf 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Diagnose implicit init list for empty aggregate, like struct {}. Fixes
PR2151 (by not creating the empty implicit init list).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
402256fc665ba179873ffcb4d630e28cbea42f27 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Diagnose implicit init list for empty aggregate, like struct {}. Fixes
PR2151 (by not creating the empty implicit init list).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
93eb82549eec82d75ce5dd3afbeeaf6fdb0e2a27 25-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Generate subprogram debug info with -g.
Also take care of freeing memory at the right places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1c6a38bcea17801e9a4738753aee845381af2b6c 25-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Generate subprogram debug info with -g.
Also take care of freeing memory at the right places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
744cd42fc62aa7024becce8b7bf71f62a084e247 24-May-2008 Steve Naroff <snaroff@apple.com> This fixes a VC++ build failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
2c33a164371482b43a13e500dbb4d3278605c5f4 24-May-2008 Steve Naroff <snaroff@apple.com> This fixes a VC++ build failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
ade44ec68c6ab97d63c92f4b3db143339ff394d9 24-May-2008 Chris Lattner <sabre@nondot.org> add some assertions to catch bad things before they die
somewhere deep in rewrite rope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
0d3ab3f121ff6c2a38acde4e93a28980b824d045 24-May-2008 Chris Lattner <sabre@nondot.org> add some assertions to catch bad things before they die
somewhere deep in rewrite rope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
76a925c8bf3859582da550b7129514cc3f26af3e 24-May-2008 Steve Naroff <snaroff@apple.com> Fix range info for explicit ivar refs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8bf3b1d0e75da8b15bc331ebeb44f34b689f03ad 24-May-2008 Steve Naroff <snaroff@apple.com> Fix range info for explicit ivar refs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5dcd7295205f43e766966378ab66ced9f0783c98 23-May-2008 Gabor Greif <ggreif@gmail.com> fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1b76779233b23f8c64f2e1be9fa1f9a99ea694bd 23-May-2008 Gabor Greif <ggreif@gmail.com> fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51479 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
9ff407cb9f8541d248e43fb909640c6c4152a054 23-May-2008 Ted Kremenek <kremenek@apple.com> Unbreak build. Forget to check in this header file change with a previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
f377fc85488f4799ced714ac60e65a0e3f8f69cb 23-May-2008 Ted Kremenek <kremenek@apple.com> Unbreak build. Forget to check in this header file change with a previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51470 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
4751a3add4986e6d68423d084289c70cb67e094a 22-May-2008 Dan Gohman <gohman@apple.com> Move getAccessedFieldNo out of lib/AST/Expr.cpp into
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::VisibilityTypes. These changes eliminate
dependencies in the AST library on LLVM's VMCore library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Expr.h
4f8d123e3e2c260de3377208106ddba87cee28b4 22-May-2008 Dan Gohman <gohman@apple.com> Move getAccessedFieldNo out of lib/AST/Expr.cpp into
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::VisibilityTypes. These changes eliminate
dependencies in the AST library on LLVM's VMCore library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Expr.h
40c8b9ebc90e6b13d4c80197112cf0bb4f18ff8b 22-May-2008 Ted Kremenek <kremenek@apple.com> Improve dead stores diagnostics to include the variable name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3eb817e5095d25e7bf4a8df9ed3f9b13bed6f298 22-May-2008 Ted Kremenek <kremenek@apple.com> Improve dead stores diagnostics to include the variable name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
db4d5970d9243fb699f250f74eab6b7cce901a40 21-May-2008 Ted Kremenek <kremenek@apple.com> Add Destroy method to Types, making there destruction more harmonious with
the destruction of Decls and Stmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4b05b1dee6cc65ae61d93dab7edff72710f24589 21-May-2008 Ted Kremenek <kremenek@apple.com> Add Destroy method to Types, making there destruction more harmonious with
the destruction of Decls and Stmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51385 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a1e7770b1b1605e17b43144d6b6d85cdb0bfbda2 21-May-2008 Ted Kremenek <kremenek@apple.com> When destroying DeclStmts, also destroy the associated Decl (reclaim its memory).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8e355f296a3ba45b94de49dbb18ae6a6e67df04c 21-May-2008 Ted Kremenek <kremenek@apple.com> When destroying DeclStmts, also destroy the associated Decl (reclaim its memory).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51379 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
01a8b6cf3e456145801f89b7af5414d8b21d4dd0 21-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix the destruction "properly" in the sense that we actually destroy the
ASTs. This is a hack, but I haven't considered how we really
want to do this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
5f1adf8fb4b41988a8715492cc97c62873d25969 21-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix the destruction "properly" in the sense that we actually destroy the
ASTs. This is a hack, but I haven't considered how we really
want to do this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
0b7b1cb2169742c4027d2b1db74788fa55f5da97 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Some small changes to make the target info a bit more accurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
61538a7d1336f3ef3cb81e09f11a1cbb282bcf81 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Some small changes to make the target info a bit more accurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
8c50c627fadb07d528b3d40a420395e513f8f20b 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Add __builtin_frame_address and __builtin_return_address gcc builtins to
Sema. No codegen yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
6cfda23b3768f93a6eb0b2a9135c8334a20125bb 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Add __builtin_frame_address and __builtin_return_address gcc builtins to
Sema. No codegen yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
5be49244bfb829b2b5108c39728a0b635fe94f74 20-May-2008 Ted Kremenek <kremenek@apple.com> Reclaim memory from chains of ScopedDecls, and reclaim memory for the initializers of EnumConstantDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d1ac17ae7d61a9244ee5e658d6f63b8fa3da3127 20-May-2008 Ted Kremenek <kremenek@apple.com> Reclaim memory from chains of ScopedDecls, and reclaim memory for the initializers of EnumConstantDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
bde41096b6f9ea59cd2a9c7de9a5c1bf1cfb02a3 20-May-2008 Ted Kremenek <kremenek@apple.com> Delete AST nodes, not just Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f809e3bd0c3d063f22ba34981072dae306ca9272 20-May-2008 Ted Kremenek <kremenek@apple.com> Delete AST nodes, not just Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
345b93db8abc199f0c51f2b3bed2e80fde023a18 20-May-2008 Ted Kremenek <kremenek@apple.com> Reclaim memory allocated for ParmVarDecl's in FunctionDecl::Destroy.

Fixed a bug in ParmVarDecl::param_end(): Handle the case where there are no
ParmVarDecls for a FunctionDecl, but its function prototype has formal arguments
(can happen with typedefs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b65cf41707d190d5ce3d48b9e5bd2dc9d7b4a4c0 20-May-2008 Ted Kremenek <kremenek@apple.com> Reclaim memory allocated for ParmVarDecl's in FunctionDecl::Destroy.

Fixed a bug in ParmVarDecl::param_end(): Handle the case where there are no
ParmVarDecls for a FunctionDecl, but its function prototype has formal arguments
(can happen with typedefs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
afdf811b2494ca0d29fa47d848f63ac958455219 20-May-2008 Ted Kremenek <kremenek@apple.com> Try to plug some memory leaks...

1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST.

2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl.

3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind.

3) FunctionDecl::Destroy now releases its Body using its Destroy method.

4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes.

5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/Stmt.h
27f8a28bee33bb0e857cfe1a61c281bbc234b338 20-May-2008 Ted Kremenek <kremenek@apple.com> Try to plug some memory leaks...

1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST.

2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl.

3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind.

3) FunctionDecl::Destroy now releases its Body using its Destroy method.

4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes.

5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
lang/AST/Stmt.h
1ed5dc67ac8b0473d675942e02efba550ffbd62a 20-May-2008 Ted Kremenek <kremenek@apple.com> Added Stmt::DestroyChildren, which will be used by the dstors of the subclasses of Stmt to recursively delete their child AST nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9c1863ef36a74e8203f00289d19856ad956f48b9 20-May-2008 Ted Kremenek <kremenek@apple.com> Added Stmt::DestroyChildren, which will be used by the dstors of the subclasses of Stmt to recursively delete their child AST nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51278 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
71de9eb042d2566a75aab7a03656cbdffaa2a86e 19-May-2008 Eli Friedman <eli.friedman@gmail.com> Add errors for some illegal constructs (specifically, "int a = {{3}};"
and "int a = {};"). I'll adjust the tests in a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bb504d3a63e0e4b2439900ba6d77b620fb6de857 19-May-2008 Eli Friedman <eli.friedman@gmail.com> Add errors for some illegal constructs (specifically, "int a = {{3}};"
and "int a = {};"). I'll adjust the tests in a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
300ada5c29750d0b709777a4b8bfd177e6e58800 16-May-2008 Nate Begeman <natebegeman@mac.com> Fix some prototypes, and implement some builtins until we have our header files completed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
24512501319aa6d7f70b1bd79470df0197b832c8 16-May-2008 Nate Begeman <natebegeman@mac.com> Fix some prototypes, and implement some builtins until we have our header files completed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51199 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
789c0b3ff75cdfd340076d1417df5f20dee18c76 16-May-2008 Ted Kremenek <kremenek@apple.com> Partitioned BugTypeCachedLocation::isCached() into two methods: one that accepts and ExplodedNode, and the other that accepts a ProgramPoint. The default behavior is to cache bug reports by the
location they occur (the end node). Subclasses can override this behavior by providing a different ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
76d90c8bf83d071fd1bdbffa6d9f2af87c6bb7b5 16-May-2008 Ted Kremenek <kremenek@apple.com> Partitioned BugTypeCachedLocation::isCached() into two methods: one that accepts and ExplodedNode, and the other that accepts a ProgramPoint. The default behavior is to cache bug reports by the
location they occur (the end node). Subclasses can override this behavior by providing a different ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
77ed53d7332fc5111da28bbc88f0002082849dac 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix review nit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dde8c94873976632e3ada4d8d067e1e244184d51 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix review nit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bdbd1b596e4b98698dfbd98738370f5e2aef0ca8 16-May-2008 Ted Kremenek <kremenek@apple.com> Added CFGBlock::hasBinaryBranchTerminator().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
9c2535a35db35b3a821a0d0c36a01a16f52f1ad0 16-May-2008 Ted Kremenek <kremenek@apple.com> Added CFGBlock::hasBinaryBranchTerminator().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
afa2d386a3c22b7a135c52b486917037550c0ffc 15-May-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Make isFileVarDecl() return true when the VarDecl is in a C++ namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1bf7dd75706a67de2368226b2d2c590c23d7dbf5 15-May-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make isFileVarDecl() return true when the VarDecl is in a C++ namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
37994b05af4d9bcae94769823be50d27b1b2efc9 15-May-2008 Steve Naroff <snaroff@apple.com> Add some of GCC's object checking builtin's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
6c178c563d51de6e5a12bd3a631728fd82fcad78 15-May-2008 Steve Naroff <snaroff@apple.com> Add some of GCC's object checking builtin's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51133 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
d0e9d095335fb20806f25e41af789ffd46920ea9 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction.
The expected immediate usage is in *mmintrin.h, so that they don't
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
d38617c8a50f9729c254ab76cd359af797c6739b 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction.
The expected immediate usage is in *mmintrin.h, so that they don't
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
a1ae7442826c90beb66d6f314db8065c6cb3bafc 13-May-2008 Nate Begeman <natebegeman@mac.com> Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3b8d116703db8018f855cbb4733ace426422623b 13-May-2008 Nate Begeman <natebegeman@mac.com> Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
95cb389dab53396be89b308e0ac08bfe5cd1e98f 12-May-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e701c0a953d05c3403a74fdb449a8f4a1e4e6594 12-May-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51002 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
938845d84161f34e084a1bf10b224ad7fb561aeb 12-May-2008 Ted Kremenek <kremenek@apple.com> 80 col violation fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
901b412d65d40ed8df16701e89bf5dd5b145cbd0 12-May-2008 Ted Kremenek <kremenek@apple.com> 80 col violation fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5c45be48e6125c5981ad48708dc7e8267bace63a 12-May-2008 Ted Kremenek <kremenek@apple.com> Add Type::getAsTypedefType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
769c9cfc6e06bd9d8ffe7a4397b939f19b0e4dc3 12-May-2008 Ted Kremenek <kremenek@apple.com> Add Type::getAsTypedefType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9e2c1ea85d6af891082772a089e36bcf9b2fc7d5 10-May-2008 Ted Kremenek <kremenek@apple.com> Rename IsPointerType to LVal::IsLValType, and update CFRefCount::EvalSummary to use IsLValType when conjuring symbols for return values (this fixes a bug with an assertion firing in the analyzer when two qualified objective-c types were compared).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
0e470a5326ccf2f6a7c3d12b2aa54a7af2292837 10-May-2008 Ted Kremenek <kremenek@apple.com> Rename IsPointerType to LVal::IsLValType, and update CFRefCount::EvalSummary to use IsLValType when conjuring symbols for return values (this fixes a bug with an assertion firing in the analyzer when two qualified objective-c types were compared).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
bf020f3c9649ec3665d10636e5f8f48ea3a0ad17 10-May-2008 Mon P Wang <wangmp@apple.com> Added support to generate some atomic operators (add, sub, and, or etc..)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
1ffe281890f3cd7728316b45a1f3dd4d3120af7b 10-May-2008 Mon P Wang <wangmp@apple.com> Added support to generate some atomic operators (add, sub, and, or etc..)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
c8e51f89effc4003fc54aa4dc5a34127e793c7f4 09-May-2008 Nate Begeman <natebegeman@mac.com> Extend vector member references to include {.hi, .lo, .e, .o} which return a
vector of the same element type and half the width, with the high, low, even,
and odd elements respectively.

Allow member references to member references, so that .hi.hi gives you the high
quarter of a vector. This is fairly convenient syntax for some insert/extract
operations.

Remove some unnecessary methods/types in the ExtVectorElementExpr class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8a99764f9b778a54e7440b1ee06a1e48f25d76d8 09-May-2008 Nate Begeman <natebegeman@mac.com> Extend vector member references to include {.hi, .lo, .e, .o} which return a
vector of the same element type and half the width, with the high, low, even,
and odd elements respectively.

Allow member references to member references, so that .hi.hi gives you the high
quarter of a vector. This is fairly convenient syntax for some insert/extract
operations.

Remove some unnecessary methods/types in the ExtVectorElementExpr class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
727b3c4572f4107706b7530dbc1c3be668e42717 09-May-2008 Chris Lattner <sabre@nondot.org> parameterize pointer size/align better without doing virtual method calls in normal case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
927686fe8c968ca786fa44d2353eebf59c4f5b8a 09-May-2008 Chris Lattner <sabre@nondot.org> parameterize pointer size/align better without doing virtual method calls in normal case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
481dcf2bfc797afdb119f76afa88941574f78f94 09-May-2008 Chris Lattner <sabre@nondot.org> parameterize long long.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
ec10f5886526124ba733fbd0ef8665d576285daa 09-May-2008 Chris Lattner <sabre@nondot.org> parameterize long long.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
e0efe2ef8f5758fe7fad7b005b4f69906b6c0e34 09-May-2008 Chris Lattner <sabre@nondot.org> correctly parameterize long, patch by Nate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
8059e997ee05e4aa87f7e21fed630429a140ee53 09-May-2008 Chris Lattner <sabre@nondot.org> correctly parameterize long, patch by Nate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
6bc6551b38f412ed3293e05a33881254fb632ec8 08-May-2008 Nate Begeman <natebegeman@mac.com> Add the non-immediate-shift vector builtins


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
f8add5dd6fc6b114f694aeaff8c89e6b23fa3f29 08-May-2008 Nate Begeman <natebegeman@mac.com> Add the non-immediate-shift vector builtins


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50870 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/X86Builtins.def
9df18dababc2a8b65997d2d08d1bd0a27af60f8b 08-May-2008 Ted Kremenek <kremenek@apple.com> Added initial support for supporting __NSString__ in attribute "format".
Still need to iron out some of the semantics (fixmes are present).
This addresses <rdar://problem/5916348>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c5f551f06c3ac27826e3e5a7a29851fc5182f912 08-May-2008 Ted Kremenek <kremenek@apple.com> Added initial support for supporting __NSString__ in attribute "format".
Still need to iron out some of the semantics (fixmes are present).
This addresses <rdar://problem/5916348>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
40e56a18be09a45bfd315ab3c425d1ecbdca769e 08-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
e8b9f5b8ea60983c4a74cb8b63879616b914b65a 08-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
85970f3f71b583df8ad9cbb66bc117728f797d7c 08-May-2008 Chris Lattner <sabre@nondot.org> Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
2621fd1d6d3c5eadcae246859f62738645df7540 08-May-2008 Chris Lattner <sabre@nondot.org> Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
5f2e2248dcee4ca2dcb080982a7ab9d00cf06661 07-May-2008 Fariborz Jahanian <fjahanian@apple.com> Synthesized getter/setter method declarations need not have
an implementation. This fixes couple of failing prperty tests
caused by my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
4607034e621aa77378ec75249d1e9eaf5de49b6a 07-May-2008 Fariborz Jahanian <fjahanian@apple.com> Synthesized getter/setter method declarations need not have
an implementation. This fixes couple of failing prperty tests
caused by my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e4534e7c864452fd1f884668ea270d90bc586dcf 07-May-2008 Fariborz Jahanian <fjahanian@apple.com> This patch introduces declaration of getter methods for ObjC2's
properties. Couple of property tests will fail with this patch.
Will fix them next.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
33de3f0333ca0b5274291b8d76c86758c0484691 07-May-2008 Fariborz Jahanian <fjahanian@apple.com> This patch introduces declaration of getter methods for ObjC2's
properties. Couple of property tests will fail with this patch.
Will fix them next.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2b9422f15b71241fc5fca53858c1343f5012932e 07-May-2008 Douglas Gregor <doug.gregor@gmail.com> Diagnose attempts to use C++ default arguments outside of a function declaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6d6eb57225b53fb627c565861d1d0e90645400d1 07-May-2008 Douglas Gregor <dgregor@apple.com> Diagnose attempts to use C++ default arguments outside of a function declaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50799 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
86f070e725781f96fcba7783cebbc0b7360f8527 06-May-2008 Ted Kremenek <kremenek@apple.com> Added "DisplayHint" to PathDiagnosticPiece to provide a hint for the
PathDiagnosticClient of where to display a string (beyond just the SourceLocation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
466265cd04df98428967adfade577bed7636d910 06-May-2008 Ted Kremenek <kremenek@apple.com> Added "DisplayHint" to PathDiagnosticPiece to provide a hint for the
PathDiagnosticClient of where to display a string (beyond just the SourceLocation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
b7080aec42ece02e2b526eee5921b4ed4c50e60b 06-May-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to refactor setter/getter names of property attributes into Selector
(was IdentifierInfo * before). This will make method declartations whole
lot easier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
5251e130a23d997f7c0dfdc250cdc41f179e5bed 06-May-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to refactor setter/getter names of property attributes into Selector
(was IdentifierInfo * before). This will make method declartations whole
lot easier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50747 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
7d5a5ee961f399aa6d013ff3019f6a9c88410a42 06-May-2008 Ted Kremenek <kremenek@apple.com> Fixed subtle bug in the an GRAuditor object could mark a node as a sink
after it was already added to the destination NodeSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
922059dec59c7bed235da01aff75ae522a369811 06-May-2008 Ted Kremenek <kremenek@apple.com> Fixed subtle bug in the an GRAuditor object could mark a node as a sink
after it was already added to the destination NodeSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50701 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
4aa72a76d99c4c8b5c0f9264bfd98167afd4eea4 05-May-2008 Fariborz Jahanian <fjahanian@apple.com> percolate @optional/@required protocols down to ASTs for
properties declared in the protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
46b55e56d029aec699fc2701e43d70264da9ecd8 05-May-2008 Fariborz Jahanian <fjahanian@apple.com> percolate @optional/@required protocols down to ASTs for
properties declared in the protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
cb1a77a0c0f0a0eff49ecf103adc87ea8d663222 05-May-2008 Chris Lattner <sabre@nondot.org> Fix a bug from when this was a pointer instead of vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
28a309e387a0a69b0c055c1565aa147fc695f906 05-May-2008 Chris Lattner <sabre@nondot.org> Fix a bug from when this was a pointer instead of vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bef45c5ab99bc628c077299e2d599f7b0d823c00 05-May-2008 Chris Lattner <sabre@nondot.org> Neil pointed out that clang doesn't generate ranges from diagnostics
related to pp-expressions. Doing so is pretty simple and this
patch implements it, yielding nice diagnostics like:

t.c:2:7: error: division by zero in preprocessor expression
#if 1 / (0 + 0)
~ ^ ~~~~~~~
t.c:5:14: error: expected ')' in preprocessor expression
#if (412 + 42
~~~~~~~~^
t.c:5:5: error: to match this '('
#if (412 + 42
^
t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574
#if (-42 + 0U) / -2
~~~ ^ ~~
t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614
#if (-42 + 0U) / -2
~~~~~~~~~~ ^ ~~
5 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
8ed3044a33679cbfa0617d465a50ec557d671ed7 05-May-2008 Chris Lattner <sabre@nondot.org> Neil pointed out that clang doesn't generate ranges from diagnostics
related to pp-expressions. Doing so is pretty simple and this
patch implements it, yielding nice diagnostics like:

t.c:2:7: error: division by zero in preprocessor expression
#if 1 / (0 + 0)
~ ^ ~~~~~~~
t.c:5:14: error: expected ')' in preprocessor expression
#if (412 + 42
~~~~~~~~^
t.c:5:5: error: to match this '('
#if (412 + 42
^
t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574
#if (-42 + 0U) / -2
~~~ ^ ~~
t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614
#if (-42 + 0U) / -2
~~~~~~~~~~ ^ ~~
5 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/Preprocessor.h
74bf555d259f60449b8f2f47d532d1a1ec3bca10 04-May-2008 Chris Lattner <sabre@nondot.org> Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.
Fix 'swapping' of attributes to not insert null values into the
DeclAttrs map.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
a212c56e9b7533bcc2d6be90efd52ad241bf894e 04-May-2008 Chris Lattner <sabre@nondot.org> Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.
Fix 'swapping' of attributes to not insert null values into the
DeclAttrs map.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
56846f2ed2594f49d78eee3645482a5e77d5e236 04-May-2008 Chris Lattner <sabre@nondot.org> improve array type comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
da2d71a50fe724c881b148fcc2c05a5e9b56e3a5 04-May-2008 Chris Lattner <sabre@nondot.org> improve array type comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0f3524250a67fb911ed6a5c0167591fcf884b6b0 03-May-2008 Ted Kremenek <kremenek@apple.com> Rename member variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
200ed924bb13784ca043088f71c62fc323fd836d 03-May-2008 Ted Kremenek <kremenek@apple.com> Rename member variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50597 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
33973a2ce146d07ee6dba27d63028a7bf8939454 02-May-2008 Fariborz Jahanian <fjahanian@apple.com> This patch is about merging ObjC2's properties declared in class
protocols into class's property list and performing semantics
on them for while doing so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
aebf0cba02c014ac8b19d615c654248e0e93779f 02-May-2008 Fariborz Jahanian <fjahanian@apple.com> This patch is about merging ObjC2's properties declared in class
protocols into class's property list and performing semantics
on them for while doing so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
2f62f356ad86d1f71426433c07a1128fbf386131 02-May-2008 Ted Kremenek <kremenek@apple.com> When running the reference count checker twice (GC and non-GC mode), only emit
basic warnings (dead stores, null dereferences) on the first pass.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
9f7416138b8befe2d274f6f2cadc792d2c279711 02-May-2008 Ted Kremenek <kremenek@apple.com> When running the reference count checker twice (GC and non-GC mode), only emit
basic warnings (dead stores, null dereferences) on the first pass.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
14dcc18504c8e297dc77779e7175d88bca5ef8f8 02-May-2008 Ted Kremenek <kremenek@apple.com> Lexicographically order enum declarations in AttributeList::Kind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
55c28b7c66d39ab6b670aff5f95cad9d15dc7adf 02-May-2008 Ted Kremenek <kremenek@apple.com> Lexicographically order enum declarations in AttributeList::Kind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
fe4d231b0c3c83c5710ca9071332e884deb084be 02-May-2008 Ted Kremenek <kremenek@apple.com> Added line number diagnostics to indicate the allocation site of the leaked object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
c9fa2f7bcc3061aa8bcdbe0df26d2c7cf7281539 02-May-2008 Ted Kremenek <kremenek@apple.com> Added line number diagnostics to indicate the allocation site of the leaked object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
5c3407ae429a4fa41579e86cb317f81ac7eb5760 02-May-2008 Ted Kremenek <kremenek@apple.com> Do not highlight bogus ranges for leaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
bb77e9b908658b354b058509d3801f3aed052bec 02-May-2008 Ted Kremenek <kremenek@apple.com> Do not highlight bogus ranges for leaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
5f20a638a4dd1646fca408964b9a3cb8dfc5f2a3 01-May-2008 Ted Kremenek <kremenek@apple.com> Added temporary fix for Obj-C exception handling in the static analyzer: treat these as panic functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
e448ab4f9dd162802f5d7cfea60f7830cc61c654 01-May-2008 Ted Kremenek <kremenek@apple.com> Added temporary fix for Obj-C exception handling in the static analyzer: treat these as panic functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
d34b7530a2da6e68fa56fdd42e9cbbdfd41b772c 01-May-2008 Ted Kremenek <kremenek@apple.com> Added default ctor to Selector.

REASON: Without a default ctor we cannot do "new Selector[xxx]" and similar
operations with ADTs that need to default constructor selectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
c65b8a3e1f8da6117a2b9ba57afe8b7a2ec887cc 01-May-2008 Ted Kremenek <kremenek@apple.com> Added default ctor to Selector.

REASON: Without a default ctor we cannot do "new Selector[xxx]" and similar
operations with ADTs that need to default constructor selectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
513e30ae08329e39d9199225de87e7fc3f17d2ce 01-May-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to match and issue diagnostics on property type mismatch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3435096781465f6b8e69de4b35d9dd3a94a76468 01-May-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to match and issue diagnostics on property type mismatch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d029a6f8da922c13ffb7d1b8ffb27cc40ea71b2f 01-May-2008 Ted Kremenek <kremenek@apple.com> Use pointer swizziling to unify in ObjCMessageExpr the receiver and classname "fields". This saves us a pointer.
Implemented serialization for ObjCMessageExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ea958e57a370b641c5a69347b75e9f8e3b5a41a2 01-May-2008 Ted Kremenek <kremenek@apple.com> Use pointer swizziling to unify in ObjCMessageExpr the receiver and classname "fields". This saves us a pointer.
Implemented serialization for ObjCMessageExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50528 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b52b7f2d58f4eef8c67f41e050a2f0aff60e4255 01-May-2008 Ted Kremenek <kremenek@apple.com> Added comments to ObjCMessageExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
66783caa67fd947787a0656fa642ddb4e770f074 01-May-2008 Ted Kremenek <kremenek@apple.com> Added comments to ObjCMessageExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50525 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cb4709408a5ddd0919f97c95a1e97ec95a52d7b1 01-May-2008 Ted Kremenek <kremenek@apple.com> When processing "release", "retain", and "autorelease" messages return the
lval passed as an argument.

Fix: Inverted diagnostic messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
31593ac2782b2039484210052535f40c243dcf72 01-May-2008 Ted Kremenek <kremenek@apple.com> When processing "release", "retain", and "autorelease" messages return the
lval passed as an argument.

Fix: Inverted diagnostic messages.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
2e33547e94673a916ad9d54a63e00f5ed46f1c34 01-May-2008 Steve Naroff <snaroff@apple.com> Extend InitListExpr API/IMPL to support arbitrary add/remove (in support of the initializer rewrite I am doing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c5ae899b4bbf65488445316c63168079177db0ed 01-May-2008 Steve Naroff <snaroff@apple.com> Extend InitListExpr API/IMPL to support arbitrary add/remove (in support of the initializer rewrite I am doing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ed986606b5d9261e74cd63080c749b6a787744c3 01-May-2008 Fariborz Jahanian <fjahanian@apple.com> More ObjC2 property semantics work. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
02edb98b457c1be3fabe63f7390fe75fd6689def 01-May-2008 Fariborz Jahanian <fjahanian@apple.com> More ObjC2 property semantics work. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
fe30bebe8c2128285204ff5cc0441aa6d72d96b3 01-May-2008 Ted Kremenek <kremenek@apple.com> added preliminary diagnostics in scan-build results to denote whether
a CF memory leak occurred with GC enabled, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
072192bcbb05a0fee7ec3061750b27e8d2004952 01-May-2008 Ted Kremenek <kremenek@apple.com> added preliminary diagnostics in scan-build results to denote whether
a CF memory leak occurred with GC enabled, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathDiagnostic.h
lang/Analysis/PathSensitive/BugReporter.h
7cefcaca1fac478f19b267b1c4fd7e121d307ac9 30-Apr-2008 Ted Kremenek <kremenek@apple.com> Teach more of the static analyzer about ObjCQualifiedIdType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c0c3f5dbc9e78aa53a86c7d5e3eeda23ddad93d6 30-Apr-2008 Ted Kremenek <kremenek@apple.com> Teach more of the static analyzer about ObjCQualifiedIdType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c4385b49a77bc8d51b9ac0d58f4764695aebb96e 30-Apr-2008 Ted Kremenek <kremenek@apple.com> Add lval::ArrayOffset, which represent the locations of entries in an array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/RValues.h
4d0348b6c74d2710a3693bbfbcfc5fcb3bc132ee 30-Apr-2008 Ted Kremenek <kremenek@apple.com> Add lval::ArrayOffset, which represent the locations of entries in an array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/RValues.h
465f25af8c6f328b31fa69d77328b8d7eb73130c 30-Apr-2008 Ted Kremenek <kremenek@apple.com> Added lval::FieldOffset, which represents symbolic lvalues for field offsets from other Lvalues.
This removes the failure in null-deref-ps.c (test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/RValues.h
718c4f7b3ff713c3ebee46553d687bde63e5666f 30-Apr-2008 Ted Kremenek <kremenek@apple.com> Added lval::FieldOffset, which represents symbolic lvalues for field offsets from other Lvalues.
This removes the failure in null-deref-ps.c (test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/RValues.h
5f6b44291ded2840274118e92bd358b7989e6f68 29-Apr-2008 Ted Kremenek <kremenek@apple.com> Major rewrite/refactoring of static analysis engine. We now use
EvalStore/EvalLoad to handle all loads/stores from symbolic memory, allowing us
to do checks for null dereferences, etc., at any arbitrary load/store (these
were missed checks before). This also resulted in some major cleanups, some
conceptual, and others just in the structure of the code.

This temporarily introduces a regression in the test suite (null-deref-ps.c)
before I add a new LVal type for structure fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
lang/Analysis/ProgramPoint.h
1b8bd4d71c2098126041b4de4267175a82f0103c 29-Apr-2008 Ted Kremenek <kremenek@apple.com> Major rewrite/refactoring of static analysis engine. We now use
EvalStore/EvalLoad to handle all loads/stores from symbolic memory, allowing us
to do checks for null dereferences, etc., at any arbitrary load/store (these
were missed checks before). This also resulted in some major cleanups, some
conceptual, and others just in the structure of the code.

This temporarily introduces a regression in the test suite (null-deref-ps.c)
before I add a new LVal type for structure fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50443 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
lang/Analysis/ProgramPoint.h
102d42e02189fcda61b5d094574f887ee46fbf8d 29-Apr-2008 Ted Kremenek <kremenek@apple.com> Provide the option to run the CF-retain checker in GC enabled mode.
The transfer functions for the checker don't do anything special yet in GC mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
e5c30122cae6113660c6098301fd22db1693e69a 29-Apr-2008 Ted Kremenek <kremenek@apple.com> Provide the option to run the CF-retain checker in GC enabled mode.
The transfer functions for the checker don't do anything special yet in GC mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
2658c4a2dc159938dede447db2c858657055e17e 29-Apr-2008 Ted Kremenek <kremenek@apple.com> Add -fobjc-gc and -fobjc-gc-only options to the driver.
Add corresponding enum in LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
01d9dbf4ae627e2ba42fc23485789a33fa296516 29-Apr-2008 Ted Kremenek <kremenek@apple.com> Add -fobjc-gc and -fobjc-gc-only options to the driver.
Add corresponding enum in LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50387 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
d058a9c63f621f101a94045bcc4f2030f4530a21 28-Apr-2008 Ted Kremenek <kremenek@apple.com> Bug fix in CFG::getBlockEdgeImpl(): Use a BumpPtrAllocator to allocate
std::pair<CFGBlock*, CFGBlock*> that have an 8-byte alignment for use with
ProgramPoint. This fixes a bug reported by Argiris where using std::set<> on
Windows would result in a 4-byte alignment, not an 8-byte alignment.

Fixes: <rdar://problem/5892265>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
274f4334f6dd35239e5c3d4b86198f7f5804b059 28-Apr-2008 Ted Kremenek <kremenek@apple.com> Bug fix in CFG::getBlockEdgeImpl(): Use a BumpPtrAllocator to allocate
std::pair<CFGBlock*, CFGBlock*> that have an 8-byte alignment for use with
ProgramPoint. This fixes a bug reported by Argiris where using std::set<> on
Windows would result in a 4-byte alignment, not an 8-byte alignment.

Fixes: <rdar://problem/5892265>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
03e6aaf5e2fd711a043ed74465a81d1b46535976 27-Apr-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Parsing of namespaces:

-NamespaceDecl for the AST
-Checks for name clashes between namespaces and tag/normal declarations.

This commit doesn't implement proper name lookup for namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
2d1c5d313cd0c229cc614e74baa4c5756a4b46f4 27-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Parsing of namespaces:

-NamespaceDecl for the AST
-Checks for name clashes between namespaces and tag/normal declarations.

This commit doesn't implement proper name lookup for namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
a53d553b4c079cbd01ae68223aff385a03e3d2cf 26-Apr-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Make assertions for all addresses passed to ProgramPoint that they have at least an 8-byte alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
6e5977f0a8a680191fb4b4d8f32bc2c629faf0c2 26-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make assertions for all addresses passed to ProgramPoint that they have at least an 8-byte alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50310 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
c56ff1642b305fbe04070eff5b4d776522131a30 25-Apr-2008 Chris Lattner <sabre@nondot.org> remove the 'unused static' diagnostic from codegen. This should be
reimplemented in Sema someday. This is tracked in PR2236. Until then
disabling it removes some bogus diagnostics (see 2236).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5827754da1773a7288480ce34bdf1f0a909fff21 25-Apr-2008 Chris Lattner <sabre@nondot.org> remove the 'unused static' diagnostic from codegen. This should be
reimplemented in Sema someday. This is tracked in PR2236. Until then
disabling it removes some bogus diagnostics (see 2236).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
463ec844a8f24650ea5239c39903b182f7a5b4d8 25-Apr-2008 Nuno Lopes <nunoplopes@sapo.pt> initial support for recognizing __transparent_union__ attributes
comments on the ML will follow

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
27ae6c6531ac13e4b316e7e0e7b7c846b61a8d15 25-Apr-2008 Nuno Lopes <nunoplopes@sapo.pt> initial support for recognizing __transparent_union__ attributes
comments on the ML will follow

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
ac91ce95d1c67b3cf82649c640d5663b79793ad8 25-Apr-2008 Ted Kremenek <kremenek@apple.com> Do a better job at computing dead symbols.

Implemented support for better localized leaks in the CF reference count checker.
Now leaks should be flagged close to where they occur.

This should implement the desired functionality in <rdar://problem/5879592>, although the diagnostics still need to be improved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
910e999c19dfcad3ae2a649e08e616525cef0af3 25-Apr-2008 Ted Kremenek <kremenek@apple.com> Do a better job at computing dead symbols.

Implemented support for better localized leaks in the CF reference count checker.
Now leaks should be flagged close to where they occur.

This should implement the desired functionality in <rdar://problem/5879592>, although the diagnostics still need to be improved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50241 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
fa7be36c11c0d3e7eee1a8b991c0a7ac952f1b6d 25-Apr-2008 Ted Kremenek <kremenek@apple.com> More boilerplate for handling specialized-transfer function logic for dead symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
846d4e923bf11bcdc2816758aafa331795f29230 25-Apr-2008 Ted Kremenek <kremenek@apple.com> More boilerplate for handling specialized-transfer function logic for dead symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
1e89de3472533483d1208d473b62f50bc6324e10 24-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose inconsistancies between properties declared in current and
its super class. This patch is incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b5e0224173058c6fd5272d86bf251628c38b2513 24-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose inconsistancies between properties declared in current and
its super class. This patch is incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7487f9433adf753dc76d3453344a20c692384ec3 24-Apr-2008 Ted Kremenek <kremenek@apple.com> Added initial boilerplate in GRExprEngine to allow checker-specific transfer
function logic to act when symbols become dead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
77d7ef8d8a80ccb2ab3d25c80810571e3ab14ee4 24-Apr-2008 Ted Kremenek <kremenek@apple.com> Added initial boilerplate in GRExprEngine to allow checker-specific transfer
function logic to act when symbols become dead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50221 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
b9b15bfac902ec61de26b2502989ccd121940f5e 24-Apr-2008 Ted Kremenek <kremenek@apple.com> When building PathDiagnostics for bug reports, generate a trimmed ExplodedGraph with a single path that BugReport objects can safely walk and introspect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
a43a1eb6e7c773b79898541794bf819601719493 24-Apr-2008 Ted Kremenek <kremenek@apple.com> When building PathDiagnostics for bug reports, generate a trimmed ExplodedGraph with a single path that BugReport objects can safely walk and introspect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50194 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
0a6a80b800844ba438f5b2902fc2e2053dd769f6 23-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed: <rdar://problem/5881148>

Problem:

In the recently refactored VisitDeref (which processes dereferences), we
were incorrectly skipping the node just generated for the subexpression
of the dereference. This was a horrible regression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
186350f192bbc6a81bc6d7c3647c2243353f21ba 23-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed: <rdar://problem/5881148>

Problem:

In the recently refactored VisitDeref (which processes dereferences), we
were incorrectly skipping the node just generated for the subexpression
of the dereference. This was a horrible regression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
863b01fd0008262475ff172bafa72e395dee0925 23-Apr-2008 Ted Kremenek <kremenek@apple.com> TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects
when it is constructed via deserialization. This is done by recording a flag
indicating that this is the case, and it deletes these objects by getting
the references stored in the ASTContext object. This fixes some memory
leaks that occurs when we deserialize translation units from bitcode files.

The rationale between having TranslationUnit sometimes own these objects and
sometimes not is that a TranslationUnit object can be constructed from
state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus
in these cases won't own the IdentifierTable or Selectors, etc. During
deserialization, there is no Preprocessor, so somebody needs to own these
objects in order for them to be properly reclaimed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
c1e9dea3d974dcfcf2baa15810aa3511db688bda 23-Apr-2008 Ted Kremenek <kremenek@apple.com> TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects
when it is constructed via deserialization. This is done by recording a flag
indicating that this is the case, and it deletes these objects by getting
the references stored in the ASTContext object. This fixes some memory
leaks that occurs when we deserialize translation units from bitcode files.

The rationale between having TranslationUnit sometimes own these objects and
sometimes not is that a TranslationUnit object can be constructed from
state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus
in these cases won't own the IdentifierTable or Selectors, etc. During
deserialization, there is no Preprocessor, so somebody needs to own these
objects in order for them to be properly reclaimed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50149 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
a7cd988977ef127ba4155f677d2962b70cadbde9 23-Apr-2008 Chris Lattner <sabre@nondot.org> fix a rewriter crash on zero length files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
c66d0aa934f2afd412f50881a5e959bb8582cf14 23-Apr-2008 Chris Lattner <sabre@nondot.org> fix a rewriter crash on zero length files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
dc0569e863a6d89da3491d29ed6c56c3325aa5c6 23-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to build AST for property implementation declarations and
to print declaration from its AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
628b96f34e93b643b6e15e75eabb8d96079a7e27 23-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to build AST for property implementation declarations and
to print declaration from its AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50117 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
cfbc56a3476eb91f57b535a261b76e1aa3ce5404 23-Apr-2008 Ted Kremenek <kremenek@apple.com> Rewrote VisitDeclStmt to properly handle initializers that can do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
5b7dcce86c79370f16fd89ecebd454a3b4eec73c 23-Apr-2008 Ted Kremenek <kremenek@apple.com> Rewrote VisitDeclStmt to properly handle initializers that can do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
be621290da83995e94817efe23a90f22a9cf1589 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added lval type (and tracking) for StringLiterals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
a548846b471f7ca05ec6038c7d9d3b4d0de777cc 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added lval type (and tracking) for StringLiterals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
fe1a0b1790392c89d39c4b68c47a6dd7d3611dbe 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowing us to track lvals when they are casted back to pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/RValues.h
0fe33bc94a822e315585e5cde1964d3c3b9052f9 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "nonlval::LValAsInteger" to represent abstract LVals casted to integers, allowing us to track lvals when they are casted back to pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/RValues.h
ef87a206940eb4a5400af11b128d60b532e14708 22-Apr-2008 Chris Lattner <sabre@nondot.org> "This patch renames

DeclContext *CtxDecl -> DeclContext *DeclCtx
DeclContext *CD -> DeclContext *DC

It makes the code more consistent."

Patch by Zhongxing Xu!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9fdf9c6d3530bb85f3166e6460d841e2ff8e1a2c 22-Apr-2008 Chris Lattner <sabre@nondot.org> "This patch renames

DeclContext *CtxDecl -> DeclContext *DeclCtx
DeclContext *CD -> DeclContext *DC

It makes the code more consistent."

Patch by Zhongxing Xu!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f309cf96478c2589365e3b05dbdeccc26131c203 22-Apr-2008 Ted Kremenek <kremenek@apple.com> PathDiagnosticClients now retain ownership of passed PathDiagnostics, requiring
them to not be stack-allocated.

HTMLDiagnostics now batches PathDiagnostics before emitting HTML in its dtor.
This is a workaround for a problem when we trampled the Preprocessor state
when highlighting macros (sometimes resulting in an assertion failure).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
5585114307b6ba4874546212cb6e5399cfff7ffb 22-Apr-2008 Ted Kremenek <kremenek@apple.com> PathDiagnosticClients now retain ownership of passed PathDiagnostics, requiring
them to not be stack-allocated.

HTMLDiagnostics now batches PathDiagnostics before emitting HTML in its dtor.
This is a workaround for a problem when we trampled the Preprocessor state
when highlighting macros (sometimes resulting in an assertion failure).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
6a3d1a0fcf11300b44dbbf9153458c71c991264e 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Add VisitArraySubscriptExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c5b1bf10133a8ecbfe9e6b3ec92bae84e3d927e8 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Add VisitArraySubscriptExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
d0d8620262e6dadd3835c52d3ad4fff3014f16e9 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added support for detected bad dereferences involving MemberExprs, e.g. x->f where "x" is NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
469ecbded3616416ef938ed94a67f86149faf226 22-Apr-2008 Ted Kremenek <kremenek@apple.com> Added support for detected bad dereferences involving MemberExprs, e.g. x->f where "x" is NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1f0280045febde26e6331cefdedc73bfe5235d76 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> More semantics checks of properties. Property implementation can implicitly use
ivar of same name.
Better diagnostics to bring home this point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6cdf16d61de193e0596c3c2cec02e4227212986a 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> More semantics checks of properties. Property implementation can implicitly use
ivar of same name.
Better diagnostics to bring home this point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50065 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
900e3dc71a96168ba088b7d3f7153bd42777c0ab 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Support for @dynamic AST build.
More property semantics checking.
First test case for ObjC2's property implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
c35b9e4e2efad727538c848cf30d4b0eb1031dc9 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Support for @dynamic AST build.
More property semantics checking.
First test case for ObjC2's property implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50057 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
ef8a3df17c1a04eeffc875bd7eea4d60ac839c9b 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Continuation of work on ObjC2's properties.
Added iterators, methods to find property and categories.
Use them in doing semantic analysis on property implementation
declarations. Fixed typos.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
559c0c4bbecc017aab0716d546c4fefbcc194687 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Continuation of work on ObjC2's properties.
Added iterators, methods to find property and categories.
Use them in doing semantic analysis on property implementation
declarations. Fixed typos.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
42214c5200fa3576659646c50c709d830db64077 21-Apr-2008 Douglas Gregor <doug.gregor@gmail.com> Clean up handling of function redeclarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Scope.h
f009795057dc8ca254f5618c80a0a90f07cd44b4 21-Apr-2008 Douglas Gregor <dgregor@apple.com> Clean up handling of function redeclarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Scope.h
ad320b6365221806c92d3046becac0243e588f9e 20-Apr-2008 Nate Begeman <natebegeman@mac.com> Only generate code for static functions and global variables that are actually used.
Warn about unused static functions and variables.
This fixes PR1998.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4c13b7a3973d2d263d9682d7b68fbfeb76334af5 20-Apr-2008 Nate Begeman <natebegeman@mac.com> Only generate code for static functions and global variables that are actually used.
Warn about unused static functions and variables.
This fixes PR1998.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49987 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
50d7cf4407225f5492741cbda25c3dbf96166e73 20-Apr-2008 Ted Kremenek <kremenek@apple.com> html::EscapeText (using the Rewriter) now replaces tabs by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
7414dc05738bd0eb8ecb07f81d430d4b087c20ce 20-Apr-2008 Ted Kremenek <kremenek@apple.com> html::EscapeText (using the Rewriter) now replaces tabs by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
47b6a1623637d2fac60be98f65d1846368e4a96a 20-Apr-2008 Chris Lattner <sabre@nondot.org> simplify ownership of the predefines buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
aa39197431a0a0b1326ecf6b3be6a11f6e2f8503 20-Apr-2008 Chris Lattner <sabre@nondot.org> simplify ownership of the predefines buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
af6ed504d90dc3b813c573bfbee8bc0e92e7fdc0 19-Apr-2008 Nate Begeman <natebegeman@mac.com> OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
213541a68a3e137d11d2cefb612c6cdb410d7e8e 19-Apr-2008 Nate Begeman <natebegeman@mac.com> OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
e376985e473b9794d71d570661e178a24422c585 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Generalize caching mechanism for bugs reports. Now individual BugTypes
can decide the policy on how to cache related bugs. This allows us to
properly to handle warning about multiple leaks in the same location in the
ref count checker (not yet done).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
95cc1bae89ac68626d6f4d389e189ce1ef3aa7f6 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Generalize caching mechanism for bugs reports. Now individual BugTypes
can decide the policy on how to cache related bugs. This allows us to
properly to handle warning about multiple leaks in the same location in the
ref count checker (not yet done).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49918 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
0b03c6e37c40f48ee370008af6d848e312be610b 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed more caching bugs related to the one fixed in r49914. Silence
compiler warning introduced by a recent patch of mine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
b0533965f1b4db020692e3b23ca7b3bc15bf5897 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed more caching bugs related to the one fixed in r49914. Silence
compiler warning introduced by a recent patch of mine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
322657052e573913d7b0385e55fa1e66b8a93434 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed elusive caching bug that led to false positives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
eaa9edac11531178b14e060a32d0ac8b805021d0 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed elusive caching bug that led to false positives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
eef8f1ec057b06e422db6e1f464023bebbe7fdbc 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errors
from registered BugTypes. This helps with debugging.

Add detection of NULL values in ref count checker; this suppresses false positives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
cb61292aeafc1dc1bc4064fb3d2733717d1d50e5 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "GetErrorNodes()" to BugType so that -trim-egraph can recognize errors
from registered BugTypes. This helps with debugging.

Add detection of NULL values in ref count checker; this suppresses false positives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49912 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
6da0f5a989982ac2ff60dae7fd4a6f97fc04f303 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluating
the checker-specific logic of symbolic assumptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
550a0f94938817e3550d79adcc6f1f27410f7593 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "EvalAssume" virtual method to GRTransferFuncs; this is for evaluating
the checker-specific logic of symbolic assumptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
64c0a0f6c68a951a55767a107120778a68559b59 18-Apr-2008 Nate Begeman <natebegeman@mac.com> Allow targets to override double size, alignment, and semantics, and tie this
information into the IR type codegen. This allows a target to codegen the C
'double' type as either double or float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
c8b1227fa8c17d9881815e40c04e19334be536f8 18-Apr-2008 Nate Begeman <natebegeman@mac.com> Allow targets to override double size, alignment, and semantics, and tie this
information into the IR type codegen. This allows a target to codegen the C
'double' type as either double or float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
a8c6aa80d0580b82189fca4df72e6041914339e9 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Provide a version of html::HighlightMacros that takes a Preprocessor&.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
fb58609c5b3f0d665ea58e37ef39eb7ea74758a4 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Provide a version of html::HighlightMacros that takes a Preprocessor&.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
c3ad5fe581baeb5eec8a1a32ab295a5187aec329 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Several Expr subclasses did not mark "getSourceRange()" virtual. Fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
866b5c03e3b9c01cf496ad97b85a05afc917345b 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Several Expr subclasses did not mark "getSourceRange()" virtual. Fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2be7ddbca38972168b28868b1d8a1e4f85a979b1 18-Apr-2008 Ted Kremenek <kremenek@apple.com> BugReport::VisitNode now takes BugReporter& instead of ASTContext&.

Shuffled around code in CFRefCount to better pair classes with implementation,
and started adding subclasses of RangedBugReport to handle better diagnostics
for reference count bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
8dd564630c901d6d62dd2ffd4110b613d0055078 18-Apr-2008 Ted Kremenek <kremenek@apple.com> BugReport::VisitNode now takes BugReporter& instead of ASTContext&.

Shuffled around code in CFRefCount to better pair classes with implementation,
and started adding subclasses of RangedBugReport to handle better diagnostics
for reference count bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
270ab7d5f24b7cc6207c66456dd5fc99744e06c8 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Simplified internal logic of BugReporter, consolidating EmitWarning and
EmitPathWarning into one method. We now properly handle emitting warnings
without a PathDiagnosticClient when the warning does not involve a particular
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
75840e1501563fe7c3dcb5600b75965ba1fe1bc4 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Simplified internal logic of BugReporter, consolidating EmitWarning and
EmitPathWarning into one method. We now properly handle emitting warnings
without a PathDiagnosticClient when the warning does not involve a particular
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
78f7e31a5fbfc5adbf989f201197047255c51b64 18-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Initial work for property implementation declarations.
Mostly semantic checking in this patch. This is on going
and incomplete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
f624f8186d8fe474350051c6d3f00b2c204fbeae 18-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Initial work for property implementation declarations.
Mostly semantic checking in this patch. This is on going
and incomplete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49882 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
215d9fb89792861db470430777ecef8e8b7b9647 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Modified BugReport::getEndPath() to handle the case where end path is at
the exit block of the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
bd7efa8ca27ed9676acf00abf31d5e1cd54651cc 18-Apr-2008 Ted Kremenek <kremenek@apple.com> Modified BugReport::getEndPath() to handle the case where end path is at
the exit block of the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
4e9899f6dbaa798ed73f347f5fc5dc6eb0909744 18-Apr-2008 Ted Kremenek <kremenek@apple.com> class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor.

clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
passes it to the preprocessor object.

clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().

html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.

class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Rewrite/HTMLRewrite.h
339b9c27759d7b6a53e2370f83f66e78b3254595 18-Apr-2008 Ted Kremenek <kremenek@apple.com> class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor.

clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and
passes it to the preprocessor object.

clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main().

html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new
Preprocessor to highlight macros.

class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros().
Updated clients of HTMLDiagnostics to use this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49875 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Rewrite/HTMLRewrite.h
5ab36b0aba0206b2eed6c94c498c8d9a72e53d5c 17-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "PreprocessorFactory", an interface for lazily creating Preprocessor objects on-demand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ec6c574478a22008847d7ebc2498ef3336752096 17-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "PreprocessorFactory", an interface for lazily creating Preprocessor objects on-demand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
8516e9aeca0e3b8b9d064eeef0a3a25c07c850ab 17-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Added property decl support for protocols.
Added assertion if unexpected property decls are found where they don't belong.
Consolidated property decl. printing by using a helper function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3dd4ba4068e953125b95ce85c723322cdd0a3cb5 17-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Added property decl support for protocols.
Added assertion if unexpected property decls are found where they don't belong.
Consolidated property decl. printing by using a helper function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d358600db540bf90f686c91145cf422f122822f0 17-Apr-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Addition of TranslationUnitDecl to the AST:

-Added TranslationUnitDecl class to serve as top declaration context
-ASTContext gets a TUDecl member and a getTranslationUnitDecl() function
-All ScopedDecls get the TUDecl as DeclContext when declared at global scope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
ef177820100ab583b08fd3056e2a5a52ee4b1629 17-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Addition of TranslationUnitDecl to the AST:

-Added TranslationUnitDecl class to serve as top declaration context
-ASTContext gets a TUDecl member and a getTranslationUnitDecl() function
-All ScopedDecls get the TUDecl as DeclContext when declared at global scope


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclBase.h
af0100e37d6818548427f73a708751f54774b62b 17-Apr-2008 Chris Lattner <sabre@nondot.org> Make HighlightRange correctly handle multi-line ranges. This causes us to
correctly handle multi-line comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
9402b57a0dca4058fe56d7fd84e97fc496421125 17-Apr-2008 Chris Lattner <sabre@nondot.org> Make HighlightRange correctly handle multi-line ranges. This causes us to
correctly handle multi-line comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
c208f4ee3f5ecbb51be0f4b11ff982369bd145aa 17-Apr-2008 Ted Kremenek <kremenek@apple.com> Handle ReturnStmts by dispatching to "EvalReturn" in the transfer function object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
6b31e8ed11721505645860f40486e091ecd23dd0 17-Apr-2008 Ted Kremenek <kremenek@apple.com> Handle ReturnStmts by dispatching to "EvalReturn" in the transfer function object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
7e0d2ddc4c4b1defa8062922d890ec8729abfc74 17-Apr-2008 Chris Lattner <sabre@nondot.org> add a new HighlightRange API, it doesn't handle multiline ranges
yet, but it will soon...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
5ef3e2c45f13fccdb0d7bbcf24c1beee8eee6f64 17-Apr-2008 Chris Lattner <sabre@nondot.org> add a new HighlightRange API, it doesn't handle multiline ranges
yet, but it will soon...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
65a81737d419e60adf77ab865570a6ac6f267ab1 17-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> New AST class for property implementation declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
61d46159af2a740207de8dc024211d531ae290d9 17-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> New AST class for property implementation declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
79f0a63d595ce0ef9d6d72658703f934820081a6 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Added CFGBlock::getTerminatorCondition() to get the Expr* of the condition a block's terminator.
Refactored LiveVariables to use getTerminatorCondition() in VisitTerminator().

Bug fix: CFG now computes Block-level expression numbers using information
from block terminators. This fixes <rdar://problem/5868189>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
411cdee0b490f79428c9eb977f25199eb7d21cd8 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Added CFGBlock::getTerminatorCondition() to get the Expr* of the condition a block's terminator.
Refactored LiveVariables to use getTerminatorCondition() in VisitTerminator().

Bug fix: CFG now computes Block-level expression numbers using information
from block terminators. This fixes <rdar://problem/5868189>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
52ff8444b679c8e11e248e535a06fe11b0fe6503 16-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for declaraing properties in categories,
just as they are declared in objc classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7e7e3872b584bc5e7de7a34c8b9c092032303b72 16-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for declaraing properties in categories,
just as they are declared in objc classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9e0df791f8ee3ebbc3dd978c38303f91db588bb6 16-Apr-2008 Chris Lattner <sabre@nondot.org> reenable highlighting of (the first line of) comments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
678c6358c8d4e368c78629099142397c63c1ee35 16-Apr-2008 Chris Lattner <sabre@nondot.org> reenable highlighting of (the first line of) comments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
7aef4848c8b4ab836ba1ca000dcac42c1cc7704c 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Small tweaks to EvalStore: pass an "RVal" instead of "LVal" for the TargetLV to
represent possible stores to "Unknown."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
1392261ff4418a070fb919cb4832b76b468b6faa 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Small tweaks to EvalStore: pass an "RVal" instead of "LVal" for the TargetLV to
represent possible stores to "Unknown."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49811 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
4d22f0ed23a0d49a8fd250001805d8199d2fc6ec 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Hook up "EvalStore" from GRTransferFuncs to GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
ec96a2d52d16e150baaf629cd35e3fabff5d8915 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Hook up "EvalStore" from GRTransferFuncs to GRExprEngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
f5069587a4743b21ac897c8ea4de452a22fec8fd 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Take first step to migrating handling of "stores" to values from GRExprEngine
to the plug-in GRTransferFuncs object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
e38718e3251d9f2489f38a5467fdab06f53e8e77 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Take first step to migrating handling of "stores" to values from GRExprEngine
to the plug-in GRTransferFuncs object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
9de65d06d2ada3278f003c2d1e6b049fb5aa7a26 16-Apr-2008 Chris Lattner <sabre@nondot.org> split syntax highlighting of macros from keywords and comments,
allowing us to use a cheaper means to highlight keywords and making
it so that comments won't foul up macro expansions.

Start highlighting macro expansions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
c54d50a4180520370c12dd7d06d035263d357d56 16-Apr-2008 Chris Lattner <sabre@nondot.org> split syntax highlighting of macros from keywords and comments,
allowing us to use a cheaper means to highlight keywords and making
it so that comments won't foul up macro expansions.

Start highlighting macro expansions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
21f72d68bfd567ab91cedb2a0a05b978b2f7f959 16-Apr-2008 Chris Lattner <sabre@nondot.org> Add a mode of hackily syntax highlighting comments. This has a number of
problems, including the fact that it doesn't work well with multi-line
comments due to Ted's crazy table. However, that could be fixed, and it
does work with single-line ones :).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
3245a0a1c7a4fd74fca845b2edba275bb126d773 16-Apr-2008 Chris Lattner <sabre@nondot.org> Add a mode of hackily syntax highlighting comments. This has a number of
problems, including the fact that it doesn't work well with multi-line
comments due to Ted's crazy table. However, that could be fixed, and it
does work with single-line ones :).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
abe984ea34580f5ba640af6f9192103fa4d279d5 16-Apr-2008 Chris Lattner <sabre@nondot.org> In html::EscapeText, instead of going through the rewriter with
a SourceLocation to get a RewriteBuffer, poke the RewriteBuffer
with an offset directly. THis is no faster, but results in
cleaner code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
735271479ac57c27f744806859efd5b001dea248 16-Apr-2008 Chris Lattner <sabre@nondot.org> In html::EscapeText, instead of going through the rewriter with
a SourceLocation to get a RewriteBuffer, poke the RewriteBuffer
with an offset directly. THis is no faster, but results in
cleaner code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
2287cee1857a6aabb3daf1c79d0b703d1dee9640 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Remove uses of "Selector&" and "const Selector&", since Selector is just an
immutable smart pointer (we don't need to pass references, just pass Selector).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/IdentifierTable.h
97b7f26a92d87e514530a5b652460190ce48c974 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Remove uses of "Selector&" and "const Selector&", since Selector is just an
immutable smart pointer (we don't need to pass references, just pass Selector).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/IdentifierTable.h
204a65ede4f3da22a70fa5f7819c5fa97fad0aa3 16-Apr-2008 Chris Lattner <sabre@nondot.org> make a method public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
6837e38d4301d7874805ed4b24d8d14662789e10 16-Apr-2008 Chris Lattner <sabre@nondot.org> make a method public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
f8dea31d676df5cbf546de91b4bd32dcdabf315d 16-Apr-2008 Chris Lattner <sabre@nondot.org> speed up -emit-html in a release build by 6.5% by avoiding std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
b9bc3eca218e2670f05b34c0b3c33a46d710bd88 16-Apr-2008 Chris Lattner <sabre@nondot.org> speed up -emit-html in a release build by 6.5% by avoiding std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
ca5f620530abf463ac01dd9a4587485fb6a18864 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Added some comments to GRExprEngine. Reorder some of the method definitions
to start logically organizing them.

Added initial plug-in transfer function support for Objective-C message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
e695e1cd7d8a579455e8969be36cbaf10a316a64 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Added some comments to GRExprEngine. Reorder some of the method definitions
to start logically organizing them.

Added initial plug-in transfer function support for Objective-C message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
670b6e459a7d94595ccf350fb5de0e5a8e3014a2 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Revert my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
d4bad1ed00d19c44d3c8122e4486486488f38ae9 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Revert my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49751 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
ed4dfb95e4d0210c69418e2cd46ff52065391eac 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Remove dispatch to "VisitParmVarDecl".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
12ce650bbab95450b7b3d3399212609cd9aba72c 16-Apr-2008 Ted Kremenek <kremenek@apple.com> Remove dispatch to "VisitParmVarDecl".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49750 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
72a6ebcd14aa787c516d683a0efa1550440ad346 16-Apr-2008 Steve Naroff <snaroff@apple.com> Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
248a753f6b670692523c99afaeb8fe98f7ae3ca7 16-Apr-2008 Steve Naroff <snaroff@apple.com> Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
9ea943fd2a4c72fbbb16a478f6ab635829823592 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix bug in terminator processing for uninitialized-values: simply ignore the terminator, don't reprocess it.

LiveVariables analysis now does a flow-insensitive analysis to determine what variables have their address taken; these variables are now always treated as being live.

The DataflowSolver now uses "SetTopValue()" when getting the initial value for the entry/exit block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
7deed0c65b315cac037539401c49586283158d9f 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix bug in terminator processing for uninitialized-values: simply ignore the terminator, don't reprocess it.

LiveVariables analysis now does a flow-insensitive analysis to determine what variables have their address taken; these variables are now always treated as being live.

The DataflowSolver now uses "SetTopValue()" when getting the initial value for the entry/exit block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
ec14906f8644cf07c5b462c4b8dd5eba4e401128 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Bug fix in VisitChildren: Only visit the last statement in a StmtExpr and the RHS of a comma expression, as the other Stmts will be visited elsewhere in a CFGBlock.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGStmtVisitor.h
42e7fe5685de54c18d1c466632dacacabde0b202 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Bug fix in VisitChildren: Only visit the last statement in a StmtExpr and the RHS of a comma expression, as the other Stmts will be visited elsewhere in a CFGBlock.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGStmtVisitor.h
a0aa0b10f820b607e78aa7972b892dc37a43f36d 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Added initial support into the flow-sensitive dataflow solver to visit the Block-level expression
in a block's terminator. This expression is visited within a block, but it is accessed by the
terminator. This is important to observe because for live-variables analysis the block-level
expression is live between the terminator and where the expression occurs in the block. So far
this hasn't been an issue to not observe this because the block-level expression used in the
terminator is always the last one in the block, and we have never queried the liveness information
about this point (but before the terminator).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
37622081d8a139a3249613acaa80106ec97261fb 15-Apr-2008 Ted Kremenek <kremenek@apple.com> Added initial support into the flow-sensitive dataflow solver to visit the Block-level expression
in a block's terminator. This expression is visited within a block, but it is accessed by the
terminator. This is important to observe because for live-variables analysis the block-level
expression is live between the terminator and where the expression occurs in the block. So far
this hasn't been an issue to not observe this because the block-level expression used in the
terminator is always the last one in the block, and we have never queried the liveness information
about this point (but before the terminator).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
0ceb4be0200f9f03f8ffe4c0986ef3cc09e15d36 15-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> New AST representation for each objc2's property declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49699 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
1de1e74541c25c1a7b721f1c3991ea34c8403420 15-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> New AST representation for each objc2's property declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49699 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
d7307b4431d81f17d99d2a8e8116ac897c6f6215 14-Apr-2008 Chris Lattner <sabre@nondot.org> Add a bunch of comments, move RewriteRope::MakeRopeString out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
5618d88b93056bae76845b1503cce6ba0a6080f1 14-Apr-2008 Chris Lattner <sabre@nondot.org> Add a bunch of comments, move RewriteRope::MakeRopeString out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
81019d79e21f8606b3c59d0d82db6df9548b0a89 14-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "getCanonicalID()", "isFromSameFile", and "isFromMainFile" to compare
the files of different SourceLocations. These methods correctly handle the
case where a file may have multiple FileIDs due to it being large enough
to be spread across several chunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
9fd87b1db485e2f31d0e5687f9168b370d546847 14-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "getCanonicalID()", "isFromSameFile", and "isFromMainFile" to compare
the files of different SourceLocations. These methods correctly handle the
case where a file may have multiple FileIDs due to it being large enough
to be spread across several chunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49682 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
6b0461faec7293f6fde500c536c7bcdbb6f1ec85 14-Apr-2008 Chris Lattner <sabre@nondot.org> move a ton of code out of line, from RewriteRope.h -> RewriteRope.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
5fd3e2673a1bd61d5f08f679555d15d23aba9314 14-Apr-2008 Chris Lattner <sabre@nondot.org> move a ton of code out of line, from RewriteRope.h -> RewriteRope.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
e3ef1c798103a27c28e5e2523b96a5a4e022a0ba 14-Apr-2008 Ted Kremenek <kremenek@apple.com> Hooked up the dead-store checker to the BugReporter interface. Now dead-store
warnings are emitted as part of the warnings registered by GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
d2f642b56e87493edfc3b0dab359b5e32d5f8a5e 14-Apr-2008 Ted Kremenek <kremenek@apple.com> Hooked up the dead-store checker to the BugReporter interface. Now dead-store
warnings are emitted as part of the warnings registered by GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49658 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRExprEngine.h
01eb23a98ad0c9d9442fe430e1f13e718793ab55 14-Apr-2008 Ted Kremenek <kremenek@apple.com> Added version of "getClient()" for class Diagnostic that returns a non-const
reference to the DiagnosticClient. This is useful for DiagnosticClients
that have internal state when processing diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
2bf78fba7a37a42d4295999706053fdf4c9625e2 14-Apr-2008 Ted Kremenek <kremenek@apple.com> Added version of "getClient()" for class Diagnostic that returns a non-const
reference to the DiagnosticClient. This is useful for DiagnosticClients
that have internal state when processing diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49656 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
1050ba0beb21f7d6e49d7c32d3466875231b8ec5 14-Apr-2008 Chris Lattner <sabre@nondot.org> remove ifdefs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
e5cd857f7e71d5789df25d5046d104b93cf2a71c 14-Apr-2008 Chris Lattner <sabre@nondot.org> remove ifdefs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
ab428cf01a3c88110326ddd064fcceff1b525ac4 14-Apr-2008 Chris Lattner <sabre@nondot.org> Change the RewriteRope::Chunks data structure from an std::list into
a nice shiny B+ Tree variant. This fixes the last of the known algorithmic
issues with the rewriter, allowing a significant speedup. For example,
-emit-html on Ted's 500K .i file speeds up from 26.8s -> 0.64s in a
debug build (41x!) and 5.475s -> 0.132s (41x!) in an optimized build.

This code is functional but needs to be cleaned up, ifdefs removed, better
commented, and moved to a .cpp file. I plan to do this tomorrow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
febe719596ee68605944da5f2e03258e18e6df8c 14-Apr-2008 Chris Lattner <sabre@nondot.org> Change the RewriteRope::Chunks data structure from an std::list into
a nice shiny B+ Tree variant. This fixes the last of the known algorithmic
issues with the rewriter, allowing a significant speedup. For example,
-emit-html on Ted's 500K .i file speeds up from 26.8s -> 0.64s in a
debug build (41x!) and 5.475s -> 0.132s (41x!) in an optimized build.

This code is functional but needs to be cleaned up, ifdefs removed, better
commented, and moved to a .cpp file. I plan to do this tomorrow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
696be9385991891ec4ed60010b86b74b3c165ef0 14-Apr-2008 Douglas Gregor <doug.gregor@gmail.com> Make Parser::getAccessSpecifierIfPresent const, since it does not modify the state

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1b7f89846f10681ce3cbe89ef5d60691d55bd918 14-Apr-2008 Douglas Gregor <dgregor@apple.com> Make Parser::getAccessSpecifierIfPresent const, since it does not modify the state

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
ec93f447b8634e58fc9f88cda6ef8a542c91ef70 13-Apr-2008 Douglas Gregor <doug.gregor@gmail.com> This patch adds very basic support for parsing and type-checking class
inheritance in C++. It'll parse the base-specifier list, e.g.,

class D : public B1, virtual public B2 { };

and do some of the simpler semantic checks (B1 and B2 are classes;
they aren't unions or incomplete types, etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/AccessSpecifier.h
lang/Parse/Action.h
lang/Parse/Parser.h
e37ac4ff1620ed2d7026f52baccbfa022d79ced1 13-Apr-2008 Douglas Gregor <dgregor@apple.com> This patch adds very basic support for parsing and type-checking class
inheritance in C++. It'll parse the base-specifier list, e.g.,

class D : public B1, virtual public B2 { };

and do some of the simpler semantic checks (B1 and B2 are classes;
they aren't unions or incomplete types, etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/AccessSpecifier.h
lang/Parse/Action.h
lang/Parse/Parser.h
1d661556b9263f4d635372aecdea8c55dac84e83 13-Apr-2008 Douglas Gregor <doug.gregor@gmail.com> Introduce support for finding class and enum names via ordinary name lookup in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/Type.h
2ce52f3fb95bf544db6bd3d91a72bce7d9cceb6c 13-Apr-2008 Douglas Gregor <dgregor@apple.com> Introduce support for finding class and enum names via ordinary name lookup in C++

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclBase.h
lang/AST/Type.h
514bf2ff7765efe659971b04893dbe342fb6d3dc 13-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2220, making diagnostics for unexpected tokens in pp expressions
more nice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d98d975ccdce7ec442ac26f682404cb71df40ff8 13-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2220, making diagnostics for unexpected tokens in pp expressions
more nice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
10e7fb1cddbe71deabaf296874ee0a5181f67d51 13-Apr-2008 Douglas Gregor <doug.gregor@gmail.com> Test commit: fix a typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
be432b3583bdf0fdc9c34be4bc0e6899f3aa9aa7 13-Apr-2008 Douglas Gregor <dgregor@apple.com> Test commit: fix a typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
2e78db3510b136b3f961af202e6a1a3df4839172 13-Apr-2008 Chris Lattner <sabre@nondot.org> This patch is just the easy part of the class names patch, which
allows the parsing of "class" in addition to "struct" and "union" to
declare a record. So this patch allows:

class C { };
class C c1;

But it does not contain the lookup bits, so this won't work yet:

C c2;

Patch by Doug Gregor!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/DeclSpec.h
99dc91422144483c20d1c7381bc9ac634b646b04 13-Apr-2008 Chris Lattner <sabre@nondot.org> This patch is just the easy part of the class names patch, which
allows the parsing of "class" in addition to "struct" and "union" to
declare a record. So this patch allows:

class C { };
class C c1;

But it does not contain the lookup bits, so this won't work yet:

C c2;

Patch by Doug Gregor!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Parse/DeclSpec.h
b1856dbbd26d8386899c46712e182e54f9833de6 13-Apr-2008 Chris Lattner <sabre@nondot.org> Default argument cleanups and minor improvements, patch by
Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/Rewrite/RewriteRope.h
9e979557eea3875c9e3d100c68188233dd7f46c0 13-Apr-2008 Chris Lattner <sabre@nondot.org> Default argument cleanups and minor improvements, patch by
Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/Rewrite/RewriteRope.h
237f8e1aff9a98514b10d28159d7aaf490f4c4ac 13-Apr-2008 Chris Lattner <sabre@nondot.org> move the DeltaTree implementation out of line, remove debugging printfs etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/DeltaTree.h
8100d749514748ab1e9f219d3a6ce2f4c6389140 13-Apr-2008 Chris Lattner <sabre@nondot.org> move the DeltaTree implementation out of line, remove debugging printfs etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/DeltaTree.h
29e5f440f06938bae357f1bcf7d0afdd4d4c39ad 12-Apr-2008 Chris Lattner <sabre@nondot.org> remove ifdefs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
77257889f5829144767c8a1d7fc18a929a377b5c 12-Apr-2008 Chris Lattner <sabre@nondot.org> remove ifdefs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
12a785c25c2174e23db5956d3817dbbeba80f593 12-Apr-2008 Chris Lattner <sabre@nondot.org> Do an initial hack at replacing one of the incredibly inefficient
(but simple!) datastructures in the rewriter with a more complex but
more efficient one.

This replaces the Deltas vector with a specialized BTree that makes
delta lookups much more efficient. This speeds up -emit-html on a 500K
.i file from 157.154 to 27.127 seconds on my machine (5.8x).

While this code is functional, it isn't very pretty, I have much
refactoring planned for it, and will remove the USE_VECTOR ifdef.
Stay tuned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/DeltaTree.h
lang/Rewrite/Rewriter.h
5c9dc5ac75de8d620311cdc20223998e0293d61f 12-Apr-2008 Chris Lattner <sabre@nondot.org> Do an initial hack at replacing one of the incredibly inefficient
(but simple!) datastructures in the rewriter with a more complex but
more efficient one.

This replaces the Deltas vector with a specialized BTree that makes
delta lookups much more efficient. This speeds up -emit-html on a 500K
.i file from 157.154 to 27.127 seconds on my machine (5.8x).

While this code is functional, it isn't very pretty, I have much
refactoring planned for it, and will remove the USE_VECTOR ifdef.
Stay tuned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/DeltaTree.h
lang/Rewrite/Rewriter.h
e707172d121c4072834e59067eec77fd410b5764 12-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> AST generation for objc2's property declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49565 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
dae1a1a2aa4f245b1958dc8db6089f24c575ef13 12-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> AST generation for objc2's property declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49565 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
18ee8fffa9e97d7d854cfeccc2e17cef24dfbb32 12-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "EvalEndPath" to GRTransferFuncs: the default implementation does not
change the state (and thus the GREndPathNodeBuilder automatically contructs a
node).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
52f379500f4290efaf425a9a5cbc631e2e48a559 12-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "EvalEndPath" to GRTransferFuncs: the default implementation does not
change the state (and thus the GREndPathNodeBuilder automatically contructs a
node).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
db4412d2ceb9361322185964ba2be9d2e25a36a7 12-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "GREndPathNodeBuilder", a new node builder that will be used for
evaluating transfer functions at the end-of-path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
11062b118476368fa5b294954713e5df97d8599f 12-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "GREndPathNodeBuilder", a new node builder that will be used for
evaluating transfer functions at the end-of-path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
7c371743821713cb9627af576fadc890185c75e2 11-Apr-2008 Steve Naroff <snaroff@apple.com> Add class and super class location info to ObjCInterfaceDecl...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d6a07aaf62b40cdfbd96f6b874d02b06fc22d015 11-Apr-2008 Steve Naroff <snaroff@apple.com> Add class and super class location info to ObjCInterfaceDecl...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
965c2fd30d881004fc64d71aadb0966da6d2281f 11-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "RangedBugReport".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
5e55cda64f4452fa65d83f66390c7126a8b248bb 11-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "RangedBugReport".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
21d4e81557e118167c0acd8030ec68ff5d9ffc1a 11-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Invoke destructors in Decl::Destroy().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
1bb19638f2ec0d63ed131b51ca8d9542d1a9afee 11-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Invoke destructors in Decl::Destroy().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
4e0bb9874657593aaba9ed3a53ecc801180ede6f 11-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Minor changes per Chris L's review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
45bc03f9202d5649fd41f35b98d34bb34823d0f3 11-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Minor changes per Chris L's review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
274366f8e637c55be456dfc7bb4ea54fe5e5af97 11-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Stub out and start using a Decl::Destroy() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
bb45c512e0dfbe96bfe377ac642e726c0ba0affa 11-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Stub out and start using a Decl::Destroy() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
751c61790a689820aa64ddfb4069f1bfc6a88952 11-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for:
1) objc ivar processing is split out of ActOnField into its own ActOnIvar method.
2) the new objc ivar action takes visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1d78cc443084134428c4c333fab25148900c3ca4 11-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for:
1) objc ivar processing is split out of ActOnField into its own ActOnIvar method.
2) the new objc ivar action takes visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a4c74292c33ad86125d215b8607b30911524d76b 11-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix some bonehead bugs in summary generation in CFRefCount.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
3ea0b6a0870889fc2822549ed52d98bf5e292a24 11-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix some bonehead bugs in summary generation in CFRefCount.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
b1983ba30244d44562b78fd56b4f471761109bd5 11-Apr-2008 Ted Kremenek <kremenek@apple.com> Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver.

Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
d71ed26dd80cdfebb5bb49000cce538e6c9a90e3 11-Apr-2008 Ted Kremenek <kremenek@apple.com> Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver.

Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
f62fb735c9c955f7ae367987458153d201a151da 10-Apr-2008 Chris Lattner <sabre@nondot.org> reduce the amount of 'C++ magic' this code depends on :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
ebe457c3443af253bc14ae77c2013b088370a66b 10-Apr-2008 Chris Lattner <sabre@nondot.org> reduce the amount of 'C++ magic' this code depends on :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
128d65fb99d942fb9666fd8fec8b4616fb212d41 10-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed regressions in error reporting due to copy-paste errors (using the "begin"
iterator instead of "end") and not implementing "getDescription()" for Nil
argument checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
4d35dacf85fc9fb257baa1a846abef2361a1c426 10-Apr-2008 Ted Kremenek <kremenek@apple.com> Fixed regressions in error reporting due to copy-paste errors (using the "begin"
iterator instead of "end") and not implementing "getDescription()" for Nil
argument checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
3dd8d3948621b5a3165fcc9ee769e7f10a8c54de 10-Apr-2008 Chris Lattner <sabre@nondot.org> refactor Parser::ParseStructDeclaration to return a vector of uninterpreted
declarators. This allows the clients (C structs, objc classes, objc
properties, [future] C++ classes) etc, to do custom processing before invoking
an action.

This has two benefits in the short term:
1) objc ivar processing should be split out of ActOnField into its own ActOn method.
2) the new objc ivar action can take visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
3) objc properties can pass their own special sauce down to sema as well.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
e13594279a952537ac903325efff57e3edca79d9 10-Apr-2008 Chris Lattner <sabre@nondot.org> refactor Parser::ParseStructDeclaration to return a vector of uninterpreted
declarators. This allows the clients (C structs, objc classes, objc
properties, [future] C++ classes) etc, to do custom processing before invoking
an action.

This has two benefits in the short term:
1) objc ivar processing should be split out of ActOnField into its own ActOn method.
2) the new objc ivar action can take visibility info directly, eliminating
AllVisibilities in ParseObjCClassInstanceVariables.
3) objc properties can pass their own special sauce down to sema as well.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49468 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
1d8a35e687005f5e1380259c017127edae8a8876 10-Apr-2008 Eric Christopher <echristo@apple.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
97d0205d16fef2a783e785459b5f30f6a9dfbcb9 10-Apr-2008 Eric Christopher <echristo@apple.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
da7b5f03e9390e1f5d25ca5c7bbd07a9cce95d28 10-Apr-2008 Chris Lattner <sabre@nondot.org> typedef void T;
void f(T);

is only invalid in C++ mode, not C89 mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
def026a193b8218a58d112414515cb87fdf89c15 10-Apr-2008 Chris Lattner <sabre@nondot.org> typedef void T;
void f(T);

is only invalid in C++ mode, not C89 mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49460 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
97316c05084fc9a360b3d38af939c30cdd3c6034 10-Apr-2008 Chris Lattner <sabre@nondot.org> Several improvements from Doug Gregor related to default
argument handling. I'll fix up the c89 (void) thing next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticKinds.def
8123a95c33b792d35c2e4992ba6e27882748fb0d 10-Apr-2008 Chris Lattner <sabre@nondot.org> Several improvements from Doug Gregor related to default
argument handling. I'll fix up the c89 (void) thing next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/Basic/DiagnosticKinds.def
0e80deaa6027ea5fcc5a5a9eb55ea63b03106f57 09-Apr-2008 Ted Kremenek <kremenek@apple.com> Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.

Bugs are now reported using a combination of "BugType" (previously
BugDescription) and Bug "BugReport" objects, which are fed to BugReporter (which
generates PathDiagnostics). This provides a far more modular way of registering
bug types and plugging in diagnostics.

GRExprEngine now owns its copy of GRCoreEngine, and is not owned by the
ExplodedGraph.

ExplodedGraph is no longer templated on the "checker", but instead on the state
contained in the nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
50a6d0ce344c02782e0207574005c3b2aaa5077c 09-Apr-2008 Ted Kremenek <kremenek@apple.com> Major refactoring/cleanup of GRExprEngine, ExplodedGraph, and BugReporter.

Bugs are now reported using a combination of "BugType" (previously
BugDescription) and Bug "BugReport" objects, which are fed to BugReporter (which
generates PathDiagnostics). This provides a far more modular way of registering
bug types and plugging in diagnostics.

GRExprEngine now owns its copy of GRCoreEngine, and is not owned by the
ExplodedGraph.

ExplodedGraph is no longer templated on the "checker", but instead on the state
contained in the nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49453 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
4067480cce9d74af32c132433e0cf1ed206ddec9 09-Apr-2008 Ted Kremenek <kremenek@apple.com> Added new "BugReporterHelper" class which is used by BugReporter to emit
checker-specific diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
6837faa083bebad39aa342f84c2b450fb6410eaf 09-Apr-2008 Ted Kremenek <kremenek@apple.com> Added new "BugReporterHelper" class which is used by BugReporter to emit
checker-specific diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
88aeff9cd0fdc030d35a009beffbc2667c0b0beb 09-Apr-2008 Ted Kremenek <kremenek@apple.com> Don't expand tabs in EscapeText, but rather expand them when writing out
the HTML file. This should reduce the amount of memory pressure on the
rewriter for files that have a lot of tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
fa5be3617294f0e3c341f0ecb6b2076478b1b5ac 09-Apr-2008 Ted Kremenek <kremenek@apple.com> Don't expand tabs in EscapeText, but rather expand them when writing out
the HTML file. This should reduce the amount of memory pressure on the
rewriter for files that have a lot of tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
a0bc14d9a13c535f7e21d6b4eed5fa2f1bbc7fd9 08-Apr-2008 Ted Kremenek <kremenek@apple.com> Make SourceManager::getFullFilePos() public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
25ba02630820a798ace3f71a212c7bff00236748 08-Apr-2008 Ted Kremenek <kremenek@apple.com> Make SourceManager::getFullFilePos() public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49402 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
be9c27a46f4668b89388704afb1f5335bd423229 08-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Changed the Decl::Kind enum of the ObjCPropertyDecl class, so that it follows
the pattern of the other Decl classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49399 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
670aa9d7639278f507930e95dc89c12032ab7c7e 08-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Changed the Decl::Kind enum of the ObjCPropertyDecl class, so that it follows
the pattern of the other Decl classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49399 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
3e254fbafd851bc9d6872cf52ee5740c79b3e627 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
04421087832a031c90bd58f128c7c0e741db8dd2 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/DeclSpec.h
e1bf35175aed2aa96da1bd73601ac2fd3e02c500 07-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Pass the ASTContext object around when deserializing Decl and Stmt objects, so
they can be created using the same allocator as in the "from source code" case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Expr.h
lang/AST/Stmt.h
e2563ca02a519c2ad6d64dfed87d6e86c5d3c072 07-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Pass the ASTContext object around when deserializing Decl and Stmt objects, so
they can be created using the same allocator as in the "from source code" case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49353 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/Expr.h
lang/AST/Stmt.h
f0d2ee0dfb27a0b6d08173822ebb7cf8d44b96b3 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify array compatibility testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
acc9972da24df89ea283d6f979ffbd0e4fa0e1a5 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify array compatibility testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49326 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
390564e2ad5e3582a67d76b3a611b375ae5c4b9a 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify compatibility testing for tag types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
78eca286b0898e98bb2cee943b4ecbea9cc07dd6 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify compatibility testing for tag types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49323 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fd5690fe6b5ea1c553dfe20f99d3fef269a50bd1 07-Apr-2008 Chris Lattner <sabre@nondot.org> Fix a really bad bug where type uniquing would merge a<x> with b<x> as the same
type, because it did not include a/b in the hash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1ee0700c7dbe3554df09b4558e0b35a53d487ff2 07-Apr-2008 Chris Lattner <sabre@nondot.org> Fix a really bad bug where type uniquing would merge a<x> with b<x> as the same
type, because it did not include a/b in the hash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49321 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d1240fac4ac3849087c8860c584f9b4581813b7b 07-Apr-2008 Chris Lattner <sabre@nondot.org> Remove a dead check for compatible builtin types


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3cc4c0c3058a788689b8fc73c0ac139544435c97 07-Apr-2008 Chris Lattner <sabre@nondot.org> Remove a dead check for compatible builtin types


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
0d3e6455188fc84c24b0635a0249398c6e9d3a47 07-Apr-2008 Chris Lattner <sabre@nondot.org> futher simplify compatibility testing of objc interface types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6e26f5db807a75713dbf6e34cf93da6fffe18cc3 07-Apr-2008 Chris Lattner <sabre@nondot.org> futher simplify compatibility testing of objc interface types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b8890206ac094c282c8a830c715029b9fe1c9852 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify vector type compatibility testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f62f9cd5a78e5445a02e37b277f7a2df9c19b7a3 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify vector type compatibility testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49314 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fe1f40359ec02723629c0ddf5bf92c7a18221f84 07-Apr-2008 Chris Lattner <sabre@nondot.org> move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema.
While it is similar to the other compatibility predicates in ASTContext,
it is not used by them and is different.

In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and
fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
eca7be6b7ebd93682eeaab2c71d59f2995dacdcc 07-Apr-2008 Chris Lattner <sabre@nondot.org> move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema.
While it is similar to the other compatibility predicates in ASTContext,
it is not used by them and is different.

In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and
fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/DeclObjC.h
e86716008551d268871e9aa7b27ea1b64b462991 07-Apr-2008 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
372bed091b6b1eca596130208e227e7077154de4 07-Apr-2008 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a371cfdce39dd1297aa27ce1b919ca699cbb388a 07-Apr-2008 Chris Lattner <sabre@nondot.org> add an example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
28c0b7df574599d4c19a4c09ca61bb3d70a338cc 07-Apr-2008 Chris Lattner <sabre@nondot.org> add an example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49309 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
b0c6a1fcc5d43696387d2870cc4722581f6db671 07-Apr-2008 Chris Lattner <sabre@nondot.org> eliminate getReferencedProtocols from
ObjCQualifiedIdType/ObjCQualifiedInterfaceType, adding an interator
interface instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
065f0d7b00c3cd2b3139ebd105f50462fc778859 07-Apr-2008 Chris Lattner <sabre@nondot.org> eliminate getReferencedProtocols from
ObjCQualifiedIdType/ObjCQualifiedInterfaceType, adding an interator
interface instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e7bf8df2a54184ee19ec217ff9ddafca47b21900 07-Apr-2008 Chris Lattner <sabre@nondot.org> make QualifiedInterfaceTypesAreCompatible a static function
and start simplifying it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3b27546b42bc3d5ec261f3228192350affb370be 07-Apr-2008 Chris Lattner <sabre@nondot.org> make QualifiedInterfaceTypesAreCompatible a static function
and start simplifying it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49307 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
40d6317c310092e4811dbc2b0f5ac81deb10bcae 07-Apr-2008 Chris Lattner <sabre@nondot.org> This predicate is just a generic "issuperclass" predicate, move it to the
ObjCInterfaceType as a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
53efc251792bf2c9c5f295bd3507facc51a1fe7e 07-Apr-2008 Chris Lattner <sabre@nondot.org> This predicate is just a generic "issuperclass" predicate, move it to the
ObjCInterfaceType as a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
855fed4a2b53d1fd6f8d9054967e39dd4ccc3f81 07-Apr-2008 Chris Lattner <sabre@nondot.org> Simplify some objc compatibility testing, make interfaceTypesAreCompatible
a static function named isCompatibleInterfaceAssign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
c4e405996217f4be20f73186da53b23b5c4783dc 07-Apr-2008 Chris Lattner <sabre@nondot.org> Simplify some objc compatibility testing, make interfaceTypesAreCompatible
a static function named isCompatibleInterfaceAssign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49305 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b06cf30badcddfea862bc9a538447453bdd94598 07-Apr-2008 Chris Lattner <sabre@nondot.org> clean up some logic in objc type handling. Specifically, make it so that
there are QualType::getAsObjc* type methods, and make isa<ObjCInterfaceType>
return true for ObjCQualifiedInterfaceType's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
368eefa081d12f0a265ee90ee8ec61b54168d57d 07-Apr-2008 Chris Lattner <sabre@nondot.org> clean up some logic in objc type handling. Specifically, make it so that
there are QualType::getAsObjc* type methods, and make isa<ObjCInterfaceType>
return true for ObjCQualifiedInterfaceType's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
51285d8efe73ba2c6d30145da33b3d05829ceaba 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify max type computation by making it return an integer (like
getFloatingTypeOrder) instead of a type. Fix a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7cfeb08f2466d6263ec6ff1402298f93f6d6991f 07-Apr-2008 Chris Lattner <sabre@nondot.org> simplify max type computation by making it return an integer (like
getFloatingTypeOrder) instead of a type. Fix a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d7135b47ba2583ad564ad347002eeb0ba17b9b07 07-Apr-2008 Chris Lattner <sabre@nondot.org> minor simplifications/cleanups to type comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a75cea3f6be0daa8054d36af81a6ffda1713f82d 07-Apr-2008 Chris Lattner <sabre@nondot.org> minor simplifications/cleanups to type comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
42a2174a9824760c915bb815c877b664dd37d97d 07-Apr-2008 Chris Lattner <sabre@nondot.org> remove the Decl::getCanonicalType() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8bcfc5bef434d7052e28d0ce45182855659ebd3d 07-Apr-2008 Chris Lattner <sabre@nondot.org> remove the Decl::getCanonicalType() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c1b68dbbf3d1d032957c50d9d5b96bba565073ca 07-Apr-2008 Chris Lattner <sabre@nondot.org> Start switching clients over from CT.getCanonicalType() to Context.getCanonicalType(CT) for PR2189.

While I'm at it, clean up a bit of maxIntegerType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f52ab250ff92bc51a9ac9a8e19bd43b63a5f844f 07-Apr-2008 Chris Lattner <sabre@nondot.org> Start switching clients over from CT.getCanonicalType() to Context.getCanonicalType(CT) for PR2189.

While I'm at it, clean up a bit of maxIntegerType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3dae6f4e34139e208fb0eccc35c0e43e4be24510 07-Apr-2008 Chris Lattner <sabre@nondot.org> introduce a new ASTContext::getCanonicalType method. This is the first
step towards fixing PR2189.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
77c9647cae939104c6cb2b6a4dd8ca859d2e5770 07-Apr-2008 Chris Lattner <sabre@nondot.org> introduce a new ASTContext::getCanonicalType method. This is the first
step towards fixing PR2189.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
eae0eaa09f163aa27d2eb0244ed2d3ebed8eed6f 07-Apr-2008 Chris Lattner <sabre@nondot.org> Make EnumType/RecordType classof predicates simpler and more efficient in
some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2daa5df1b53f7ef745d724771384409f6f5df5c1 07-Apr-2008 Chris Lattner <sabre@nondot.org> Make EnumType/RecordType classof predicates simpler and more efficient in
some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49287 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1baaf13ea33c7b60742bf772bca8df2ccc1a51a8 06-Apr-2008 Chris Lattner <sabre@nondot.org> add a helper EnumType object for asking about tagtypes for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5edb8bfe8472e7d7bf6a82386394ef27359eb846 06-Apr-2008 Chris Lattner <sabre@nondot.org> add a helper EnumType object for asking about tagtypes for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49286 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
acb67d91c95c76e18f26e994e927a8b733fa16aa 06-Apr-2008 Chris Lattner <sabre@nondot.org> reject 'typedef int y; int test(x, y)'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
aaf9ddbeab08a43203cf6b9ca4986c8c6fe6fdc6 06-Apr-2008 Chris Lattner <sabre@nondot.org> reject 'typedef int y; int test(x, y)'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49270 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
35d9c91741f39b7a008b0a254ee2775805288b98 06-Apr-2008 Chris Lattner <sabre@nondot.org> split parsing of identifier lists in function declarators out into
their own method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
66d28650752eeac0b02802a1d8cea425cb6b1c0f 06-Apr-2008 Chris Lattner <sabre@nondot.org> split parsing of identifier lists in function declarators out into
their own method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49268 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a0d056dc3bb8ed2166d4cd81501232b3832f6323 06-Apr-2008 Chris Lattner <sabre@nondot.org> split code for handling grouping parens in declarators from code that
handles function argument parens in declarators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
ef4715c3feb2c77f07171577510ef861753280b6 06-Apr-2008 Chris Lattner <sabre@nondot.org> split code for handling grouping parens in declarators from code that
handles function argument parens in declarators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49265 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
44f6d9d3d52f33a4e5558a550233b7927bf0da3c 06-Apr-2008 Chris Lattner <sabre@nondot.org> Use token lookahead to simplify some code that is rarely executed.
Since it is rare, the cost is not significant and we enjoy the
simplification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5dcc6ce4a68b3bd4b89c5697c9728e1533e71e03 06-Apr-2008 Chris Lattner <sabre@nondot.org> Use token lookahead to simplify some code that is rarely executed.
Since it is rare, the cost is not significant and we enjoy the
simplification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
052fbcdab1bfcd795ebd5d1f2f9ccfc95671431b 06-Apr-2008 Chris Lattner <sabre@nondot.org> Fix a bug I introduced in my const'ification patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5619688510185081cbb4621d703daf7ee24cf39a 06-Apr-2008 Chris Lattner <sabre@nondot.org> Fix a bug I introduced in my const'ification patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f3874bc89a4f4c4af2ea41900b782a8381d1fcba 06-Apr-2008 Chris Lattner <sabre@nondot.org> This patch contains these changes:

-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl

Patch by Argiris Kirtzidis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
b048c9835969c4f7fe06264748be18ed4b442116 06-Apr-2008 Chris Lattner <sabre@nondot.org> This patch contains these changes:

-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl

Patch by Argiris Kirtzidis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
3b3012ee16ae2a625c6ad5c6e12823de8833ab4c 06-Apr-2008 Chris Lattner <sabre@nondot.org> don't dereference hte end iterator when inserting at end of buffer.
Patch by Cédric Venet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
19bf719a2b9033e00d9e5931d700b7c1c893b8d6 06-Apr-2008 Chris Lattner <sabre@nondot.org> don't dereference hte end iterator when inserting at end of buffer.
Patch by Cédric Venet!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49259 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
546b68cfff587943414a19119add6bf9c06c2152 06-Apr-2008 Chris Lattner <sabre@nondot.org> fix a number of const qualification bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Analysis/Support/ExprDeclBitVector.h
e0def7589a8afa8a6acef13476bb3f882c104b91 06-Apr-2008 Chris Lattner <sabre@nondot.org> fix a number of const qualification bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/Analysis/Support/ExprDeclBitVector.h
6ab935ba6195062045a0921cd519d520a9216b50 05-Apr-2008 Chris Lattner <sabre@nondot.org> Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/LangOptions.h
lang/Parse/DeclSpec.h
d658b562e80d6ef7a1118e34ff12802c6e2fcced 05-Apr-2008 Chris Lattner <sabre@nondot.org> Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/LangOptions.h
lang/Parse/DeclSpec.h
a15e9d26cdd4ec49fc44946a6f18040668ae773c 05-Apr-2008 Chris Lattner <sabre@nondot.org> Step #1 to fixing PR2012: c89 allows declspecs to be completely
missing from function definitions only. If we see a function
definiton with missing declspecs, just fudge in an int.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
a798ebc82627ea9cb7a00da07d2b60f9f2114f69 05-Apr-2008 Chris Lattner <sabre@nondot.org> Step #1 to fixing PR2012: c89 allows declspecs to be completely
missing from function definitions only. If we see a function
definiton with missing declspecs, just fudge in an int.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49250 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
328bdf212a0515875a0064832a02c9565be55280 04-Apr-2008 Steve Naroff <snaroff@apple.com> Rename ScopedDecl::getContext() -> getContextDecl(). Two motivations:

#1: To be consistent with FieldDecl::getContextDecl(), which serves the same purpose.
#2: From my perspective, getContext() is too general (and used by several other classes for different purposes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b6e64c57e45e52a46b63acc10d7f468cf1339746 04-Apr-2008 Steve Naroff <snaroff@apple.com> Rename ScopedDecl::getContext() -> getContextDecl(). Two motivations:

#1: To be consistent with FieldDecl::getContextDecl(), which serves the same purpose.
#2: From my perspective, getContext() is too general (and used by several other classes for different purposes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3277df47de6b65b55721726dc3f7b294e70ef6fe 04-Apr-2008 Chris Lattner <sabre@nondot.org> add an isAnyComplexType() method, which returns true for both
integer and FP complexes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f23d364084d1aabea688222780d6fc1dd8c7f78c 04-Apr-2008 Chris Lattner <sabre@nondot.org> add an isAnyComplexType() method, which returns true for both
integer and FP complexes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49219 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9104f3c7cd14b86540031cb3699b159f874d7c68 04-Apr-2008 Steve Naroff <snaroff@apple.com> Add explicit support for diagnosing implicit function decls.
Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
e2ef815de1da36c1ad1494cb58ce37adac1efa26 04-Apr-2008 Steve Naroff <snaroff@apple.com> Add explicit support for diagnosing implicit function decls.
Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
eee57c013158e34b6a472d9d07b73ba271523eff 04-Apr-2008 Chris Lattner <sabre@nondot.org> Introduce ContextDecl, patch by Argiris Kirtzidis!

-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
0ed844b04ea4387caa4e1cf3dc375d269657536b 04-Apr-2008 Chris Lattner <sabre@nondot.org> Introduce ContextDecl, patch by Argiris Kirtzidis!

-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclBase.h
lang/AST/DeclObjC.h
175f1c52bf3686bca6471af351db77b795161e46 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Make typedefs public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b22d589e2ccd09cada0bcea136f0966883a8bb11 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Make typedefs public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49185 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
f00daf04022f980526dbfe98aad03fc95431449d 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Hooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to use
the new BugReporter interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
f1ae705460552655fe7275327804444c62e86bae 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Hooked up GRSimpleAPICheck and the simple Objective-C Foundation checks to use
the new BugReporter interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
61912d28a2bacd9e3a91e1d79ffedec216dc9fcb 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Mark nodes as sinks that GRAuditor says should be marked as sinks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
84867e60a466fa1199eb4e838ddf873a2f7658a9 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Mark nodes as sinks that GRAuditor says should be marked as sinks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
54042a51eb806d310df0fc48433ca6013e345fbc 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "getLogicalLineNumber" and "getLogicalColumnNumber" to FullSourceLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
1758b07ef7c554b06c48a43df2edaba85e918031 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "getLogicalLineNumber" and "getLogicalColumnNumber" to FullSourceLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49177 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
8c2044b2e9712b046df2c723529c81794a8feee1 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "isFileID()" to FullSourceLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
ec5d81b73fc8b7bceaf7a8ad3c7a1ffd6dca78b8 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "isFileID()" to FullSourceLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
49492515b23e3b5f0f1319c87bd84fb6d57847ec 03-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Created a destructor so that the top-level decls can be deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
71de20ef8bf50e83f60d4b191cc6797cf27853d3 03-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Created a destructor so that the top-level decls can be deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
74af9e99f71c492653da4d9d4351f8998c20e456 03-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Temporarily make the Decl virtual destructor public, so that calls to "delete"
can be tested on derived classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7dd1cf4031a2a06be3e3c15353ff34d5ee6e8754 03-Apr-2008 Sam Bishop <sam@bishop.dhs.org> Temporarily make the Decl virtual destructor public, so that calls to "delete"
can be tested on derived classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9f3f0fd04f34c513383f43eda01964eeb9580cc9 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added node_iterator to ExplodedGraph to allow iteration over all nodes in
the graph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
7ebde953bb050caa69f791fc1de449d435c6a36f 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added node_iterator to ExplodedGraph to allow iteration over all nodes in
the graph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
7d88220bbef0fba1ed51dd716b319f6f31fcd61e 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Created new path-sensitive bug-reporting scheme based on the classes
"BugReporter" and "BugDescription". BugDescription is used to describe
a bug and provide pieces of the PathDiagnostic, and BugReporter creates
the actual PathDiagnostic by crawling through the ExplodedGraph.

Migrated checks done by GRSimpleVals to be reported using the new BugReporter
mechanism.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
61f3e058056ab519d249aa67e3d52b0ead57c63e 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Created new path-sensitive bug-reporting scheme based on the classes
"BugReporter" and "BugDescription". BugDescription is used to describe
a bug and provide pieces of the PathDiagnostic, and BugReporter creates
the actual PathDiagnostic by crawling through the ExplodedGraph.

Migrated checks done by GRSimpleVals to be reported using the new BugReporter
mechanism.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BugReporter.h
e5bcec0a4f1060d99242601707d69a1487703bd3 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added missing #ifndef...#define...#endif directives to protect against
double includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
d065d6080f0620bb80b933f3f5d52d37bb2ea770 03-Apr-2008 Ted Kremenek <kremenek@apple.com> Added missing #ifndef...#define...#endif directives to protect against
double includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c7065b3440fd8a00da7e3c03f3b964a7c2039097 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix initialization bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
3352fbab86aa669453c9d39cb1581dd229d20af3 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix initialization bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
1e748a1da57932a54a673e0046b1f5696971b9a3 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "back()" method to PathDiagnostic to access the last piece in a path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
725779aa8f786fc844c6db89f52de47a8b24d229 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "back()" method to PathDiagnostic to access the last piece in a path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
152081673111bafc852c4f90b45e9930cbbc84ed 02-Apr-2008 Steve Naroff <snaroff@apple.com> Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort.

I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
3110251f13981689f384eb3c0aba2afffea18d9d 02-Apr-2008 Steve Naroff <snaroff@apple.com> Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort.

I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
cfac88de7de7d970a2436af939ea87c0e5a9cf9f 02-Apr-2008 Chris Lattner <sabre@nondot.org> add a common base class "PointerLikeType" for PointerType and ReferenceType,
allowing them to be treated the same in some contexts. A suggestion for a
better name is welcome :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
bdcd637c29ec1540f912ea6860c88b910e78c329 02-Apr-2008 Chris Lattner <sabre@nondot.org> add a common base class "PointerLikeType" for PointerType and ReferenceType,
allowing them to be treated the same in some contexts. A suggestion for a
better name is welcome :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
67241b4149e7b96287568e89ef2dc550a8bd68b5 02-Apr-2008 Chris Lattner <sabre@nondot.org> improve error to be something end users will actually understand :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
26b7661b1db92ed611f5c02d61e40e4071aa2058 02-Apr-2008 Chris Lattner <sabre@nondot.org> improve error to be something end users will actually understand :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49097 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6384a01cde21198c8f6d24d3bd26a3eec18601c2 02-Apr-2008 Steve Naroff <snaroff@apple.com> Two changes to Sema::LookupDecl() interface.
(1) Remove IdLoc (it's never used).
(2) Add a bool to enable/disable lazy builtin creaation (defaults to true).

This enables us to use LookupDecl() in Sema::isTypeName(), which is also part of this commit.

To make this work, I changed isTypeName() to be a non-const member function. I'm not happy with this, however I fiddled with making LookupDecl() and friends const and it got ugly pretty quickly. We can certainly add it back if/when someone has time to fiddle with it. For now, I thought this simplification was more important than retaining the const-ness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b327ce02959d4e6224732e1c362e7f8e0688581f 02-Apr-2008 Steve Naroff <snaroff@apple.com> Two changes to Sema::LookupDecl() interface.
(1) Remove IdLoc (it's never used).
(2) Add a bool to enable/disable lazy builtin creaation (defaults to true).

This enables us to use LookupDecl() in Sema::isTypeName(), which is also part of this commit.

To make this work, I changed isTypeName() to be a non-const member function. I'm not happy with this, however I fiddled with making LookupDecl() and friends const and it got ugly pretty quickly. We can certainly add it back if/when someone has time to fiddle with it. For now, I thought this simplification was more important than retaining the const-ness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49087 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d42de4d59c7d9361de3a5ba53435a0bb1b973eb8 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "description" field to PathDiagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
845ddbcd7f0eacbf59ea85e5dcccbe18eaae35eb 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Added "description" field to PathDiagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49083 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
9db553e9ffdcd7c9fbd2fa6cf70646370e589159 02-Apr-2008 Chris Lattner <sabre@nondot.org> Various parts of the standard require something to be an "incomplete or
object type". Add a predicate that checks exactly this, as it is equivalent
to checking ot see if the type is *not* a function type, which is faster
to check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d805bec0fbb98aa10abbb41bfdcb2e2fab1bac96 02-Apr-2008 Chris Lattner <sabre@nondot.org> Various parts of the standard require something to be an "incomplete or
object type". Add a predicate that checks exactly this, as it is equivalent
to checking ot see if the type is *not* a function type, which is faster
to check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5fcb38b4b0da5bbb7d49f98325dba73a7a5e3dc1 02-Apr-2008 Chris Lattner <sabre@nondot.org> 1) Enforce C99 6.7.3p2: "Types other than pointer types derived from
object or incomplete types shall not be restrict-qualified."

2) Warn about qualifiers on function types: C99 6.7.3p8: "If the
specification of a function type includes any type qualifiers, the
behavior is undefined."

3) Implement restrict on C++ references.

4) fix some locations for various C++ reference diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
96b77fc05ed4a052a9e614f72b0e83572408ce48 02-Apr-2008 Chris Lattner <sabre@nondot.org> 1) Enforce C99 6.7.3p2: "Types other than pointer types derived from
object or incomplete types shall not be restrict-qualified."

2) Warn about qualifiers on function types: C99 6.7.3p8: "If the
specification of a function type includes any type qualifiers, the
behavior is undefined."

3) Implement restrict on C++ references.

4) fix some locations for various C++ reference diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
19eb97ea0abbfde182bf4cd3120261ec224c20a9 02-Apr-2008 Chris Lattner <sabre@nondot.org> Fix several bugs in array -> pointer decomposition.

First, we got several CVR propagation cases wrong, which Eli pointed
out in PR2039.

Second, we didn't propagate address space qualifiers correctly, leading
to incorrect lowering of code in CodeGen/address-space.c.

Third, we didn't uniformly propagate the specifier in the array to the
pointer ("int[restrict 4]" -> "int *restrict").

This adds an ASTContext::getArrayDecayedType member that handles the
non-trivial logic for this seemingly simple operation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e6327747b72bb687c948270f702ff53c30f411a6 02-Apr-2008 Chris Lattner <sabre@nondot.org> Fix several bugs in array -> pointer decomposition.

First, we got several CVR propagation cases wrong, which Eli pointed
out in PR2039.

Second, we didn't propagate address space qualifiers correctly, leading
to incorrect lowering of code in CodeGen/address-space.c.

Third, we didn't uniformly propagate the specifier in the array to the
pointer ("int[restrict 4]" -> "int *restrict").

This adds an ASTContext::getArrayDecayedType member that handles the
non-trivial logic for this seemingly simple operation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
642d5316a4984d7003ae65f1940b30db4a2b7bef 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix copy-paste error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
0e8a3c743b9b3e3039e329a1736122d3b5b5fed9 02-Apr-2008 Ted Kremenek <kremenek@apple.com> Fix copy-paste error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
e57c21a9247ac0755b4464c522c8d9f1db39bb1f 02-Apr-2008 Steve Naroff <snaroff@apple.com> Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl).

- Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl.
- Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's.
- Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl().
- Some minor indentation changes.

Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
e8043c39176e7f253fbd92982b077eca6bf2fd59 02-Apr-2008 Steve Naroff <snaroff@apple.com> Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl).

- Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl.
- Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's.
- Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl().
- Some minor indentation changes.

Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49058 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
8666d841f8ac32518ab78a9bffc9d2807f8e30b4 01-Apr-2008 Chris Lattner <sabre@nondot.org> improve comma consistency, yes I'm anal


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ade9bf0fabca700bc2a1dadb071179d03515e3cb 01-Apr-2008 Chris Lattner <sabre@nondot.org> improve comma consistency, yes I'm anal


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
dd0126baa1b3d162f9bd786c93e3bde0f15d5432 31-Mar-2008 Ted Kremenek <kremenek@apple.com> Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removed
GRSimpleVals.h

Added a PathDiagnosticClient option to the driver functions for the
CFRefCountChecker and the GRSimpleVals analysis. Both analyses now accept a "-o"
argument from the driver that specifies where HTML reports should be dumped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/LocalCheckers.h
4dc41cc8de3a915d8dfb3b02d91304a3975aa3ca 31-Mar-2008 Ted Kremenek <kremenek@apple.com> Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removed
GRSimpleVals.h

Added a PathDiagnosticClient option to the driver functions for the
CFRefCountChecker and the GRSimpleVals analysis. Both analyses now accept a "-o"
argument from the driver that specifies where HTML reports should be dumped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/LocalCheckers.h
7877f2b742d4debac40f73be39d6d4b0f35b8a9e 31-Mar-2008 Ted Kremenek <kremenek@apple.com> Added variation of the "Report" method in the class Diagnostic that takes
an optional DiagnosticClient argument that differs from the client stored
internally in the Diagnostic object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
615f5177095e62b36bf88f1b1b7b644295e4097b 31-Mar-2008 Ted Kremenek <kremenek@apple.com> Added variation of the "Report" method in the class Diagnostic that takes
an optional DiagnosticClient argument that differs from the client stored
internally in the Diagnostic object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
108048c2ecc925c541a8ff5eac0dc26ac60450b1 31-Mar-2008 Ted Kremenek <kremenek@apple.com> Added path-sensitive check for return statements that return the address
of a stack variable. This is the path-sensitive version of a check that
is already done during semantic analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
02737ed29d7fff2206f7c7ee958cdf0665e35542 31-Mar-2008 Ted Kremenek <kremenek@apple.com> Added path-sensitive check for return statements that return the address
of a stack variable. This is the path-sensitive version of a check that
is already done during semantic analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c72d22d716c178a40b37a40bfc2e1b046c15e541 31-Mar-2008 Chris Lattner <sabre@nondot.org> rename Decl::CompatibleAlias -> ObjCCompatibleAlias.

Fix objc ivar lookup. Ivar lookup should occur between lookup
of method-local values and lookup of globals. Emulate this with
some logic in the handling of Sema::ActOnIdentifierExpr.

Two todo's left:
1) sema shouldn't turn a bare reference to an ivar into "self->ivar"
in the AST. This is a hack.
2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does
not correctly handle typedefs and enum constants yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
8a934233d1582b5bde9d270bc0705aa81e471a79 31-Mar-2008 Chris Lattner <sabre@nondot.org> rename Decl::CompatibleAlias -> ObjCCompatibleAlias.

Fix objc ivar lookup. Ivar lookup should occur between lookup
of method-local values and lookup of globals. Emulate this with
some logic in the handling of Sema::ActOnIdentifierExpr.

Two todo's left:
1) sema shouldn't turn a bare reference to an ivar into "self->ivar"
in the AST. This is a hack.
2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does
not correctly handle typedefs and enum constants yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
9fcf5b6d3601e65814957739b92273c9ef51cac0 28-Mar-2008 Steve Naroff <snaroff@apple.com> Make sure Sema::ActOnClassMessage() correctly diagnoses "super".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
95110968dcd6ba2baef2a23549cd5592f01eca59 28-Mar-2008 Steve Naroff <snaroff@apple.com> Make sure Sema::ActOnClassMessage() correctly diagnoses "super".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
583c438e04a6b7fd66df5736bb18c7f385e6577d 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Hooked up initial NSString interface checking to GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
e5d5c204c761cc3b2a6374a15b035420f207c7af 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Hooked up initial NSString interface checking to GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
d9ee999a74702227f2c61c164cdbca54f98b9f70 27-Mar-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint is just a smart pointer; no reason to return a constant reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
0f9063c116b7c3b05d8042b5976463c2dae04861 27-Mar-2008 Ted Kremenek <kremenek@apple.com> ProgramPoint is just a smart pointer; no reason to return a constant reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
139e47dc74dde8792557689f81c88f77a3d763fe 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Add default ctor implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
5c6422f36c5280046bbbcb54ff797639458a64ff 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Add default ctor implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48885 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
57ba65c26016702384aaa7a993af77c597b92344 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Add html::EscapeText for std::string; use this function to escape text in message bubbles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
053ef593fa9d2b890645a914eee203231fb34458 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Add html::EscapeText for std::string; use this function to escape text in message bubbles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
b0a2e47e145741d2e668a406947775c0002e59c4 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "GRAuditor" and "GRSimpleAPICheck" interface to allow simple stateless checkers to be injected into the analyzer.
Added "AnnotatedPath" class to record an annotated path that will be useful for inspecting paths.
Added some boilerplate code for simple checks of Apple's Foundation API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
99c6ad3f22b865d0f4cce52bc36904403c9ed4c4 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "GRAuditor" and "GRSimpleAPICheck" interface to allow simple stateless checkers to be injected into the analyzer.
Added "AnnotatedPath" class to record an annotated path that will be useful for inspecting paths.
Added some boilerplate code for simple checks of Apple's Foundation API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnnotatedPath.h
lang/Analysis/PathSensitive/GRAuditor.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRSimpleAPICheck.h
aa3e537ffa168f9ec5bf6034062620d07639ff4e 27-Mar-2008 Ted Kremenek <kremenek@apple.com> PathDiagnosticPiece no longer contains a vector of strings; just one string.
PathDiagnostic no longer contains a diagnostic ID or diagnostic level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
120187de4be187a6b0f903c05175bfa05af8002f 27-Mar-2008 Ted Kremenek <kremenek@apple.com> PathDiagnosticPiece no longer contains a vector of strings; just one string.
PathDiagnostic no longer contains a diagnostic ID or diagnostic level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
14f145794006e3500a9e33d38f6c55cd607d5fd8 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Added classes "PathDiagnosticPiece", "PathDiagnostic", and "PathDiagnosticClient", which encapsulate diagnostic reporting for paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
d3abcdfa30e476571e214d5d74fb12ac43d153ba 27-Mar-2008 Ted Kremenek <kremenek@apple.com> Added classes "PathDiagnosticPiece", "PathDiagnostic", and "PathDiagnosticClient", which encapsulate diagnostic reporting for paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathDiagnostic.h
5648a71297e17c05c0f986d18f27584990e38926 27-Mar-2008 Ted Kremenek <kremenek@apple.com> In ObjCMessageExpr: getSelector() const should just return "Selector", not "const Selector&" because Selector is just a smart pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c74840329eeee429d9527cf2f3694a74accd1603 27-Mar-2008 Ted Kremenek <kremenek@apple.com> In ObjCMessageExpr: getSelector() const should just return "Selector", not "const Selector&" because Selector is just a smart pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
efc11216a5755f69b5540289aa2dd374d4bc82ab 25-Mar-2008 Nate Begeman <natebegeman@mac.com> Extend QualType::getAddressSpace to do the right thing for array types, and in
the future, RecordTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8e7dafec4b70303dfaff95151cd06bfc5532720c 25-Mar-2008 Nate Begeman <natebegeman@mac.com> Extend QualType::getAddressSpace to do the right thing for array types, and in
the future, RecordTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48784 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d58da2b500dce6a238f3b80b89acbc3a402ce77d 25-Mar-2008 Ted Kremenek <kremenek@apple.com> GRSimple analysis now outputs additional diagnostic warnings about
passing an uninitialized value to a message expresion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
dbfe41acda3078f8fe566318c0097f7ae683c6bb 25-Mar-2008 Ted Kremenek <kremenek@apple.com> GRSimple analysis now outputs additional diagnostic warnings about
passing an uninitialized value to a message expresion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
71507477206267b1bc2c374319132bda88a6aba2 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Tweak to transfer function for ObjCMessageExpr: handle both instance methods
and message expressions with a specified receiver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b9308372e0d40c85cb573c4982fdf5089d89ab6d 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Tweak to transfer function for ObjCMessageExpr: handle both instance methods
and message expressions with a specified receiver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
4b2bdd5e50df02ffdfd026bca7b0ea03af4e0c49 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Added logic to check for uninitialized values as the receivers for message expressions
and uninitialized values passed-by-value as arguments to message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
23a4f917cd8d1090be7c96c4eda8643086f64d36 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Added logic to check for uninitialized values as the receivers for message expressions
and uninitialized values passed-by-value as arguments to message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c6b7a1eb20269eb56d7b57efd86b9fe15d4bec53 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Added initial transfer function support for ObjCMessageExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
55deb97341819080d6d127d29e25b9502e4f2e3c 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Added initial transfer function support for ObjCMessageExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48757 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
0cdce4dabe2953f76a00e46c084acad98588139c 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3fb94d87b937a89400d1195479702b6f6bb9a59e 25-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "arg_iterators" to ObjCMessageExpr (for iterating over the arguments of a message expression)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
f10f288d7ef2d2603a1d2f438e539eb7f6cdb4fa 21-Mar-2008 Ted Kremenek <kremenek@apple.com> Rename "Nodify" to "MakeNode"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
0e561a3e6755c4f248a8bb05d49071ddf4f2ef7b 21-Mar-2008 Ted Kremenek <kremenek@apple.com> Rename "Nodify" to "MakeNode"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
9b9f2b931535a518579c9c34a26bd1c1ffd3d825 20-Mar-2008 Ted Kremenek <kremenek@apple.com> LiveVariables analysis now uses intersect for the merge of block-level expression liveness information.
The rationale is that a block-level expression cannot be live in a parent block unless it is live in all of the successor blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
fa59f1f053235e9adf32425f2b6049185771246d 20-Mar-2008 Ted Kremenek <kremenek@apple.com> LiveVariables analysis now uses intersect for the merge of block-level expression liveness information.
The rationale is that a block-level expression cannot be live in a parent block unless it is live in all of the successor blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/ExprDeclBitVector.h
570721970dc760b43ebacd2a88907868f201e46c 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Minor speed tweak per Chris's suggestion: use &S[0] instead of S.c_str().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
1ab09f52be88641b7b780d0bcc29aae889313098 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Minor speed tweak per Chris's suggestion: use &S[0] instead of S.c_str().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
32ffc566bb974f03b0f3bb16cae70c2ec1f68e3d 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Integrated some of Chris's comments; check for an empty string in InsertStrXXX()
before descending into the bowels of the Rewriter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
4cefe486dcebde4945e6e02dd0a261d9188b3235 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Integrated some of Chris's comments; check for an empty string in InsertStrXXX()
before descending into the bowels of the Rewriter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
0735c172b31ee6487d5619ef9bcb7d76fe1e4da5 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Moved generation of html header/footer with builtin CSS to the rewriter library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
ad0a203130dc5d1fb7231b88767174511424fa98 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Moved generation of html header/footer with builtin CSS to the rewriter library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
df93c28af2683194521b922b405306be424883ec 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Added InsertStrXXX/InsertCStrXXX methods to the Rewriter to provide a simpler
interface to the rewriter when clients have NULL terminated strings or std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
329f0f5df1a4b45740312a53b8d01e32a76c91a5 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Added InsertStrXXX/InsertCStrXXX methods to the Rewriter to provide a simpler
interface to the rewriter when clients have NULL terminated strings or std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
90588af39e278f5594c23d9aaeb33aae5a266711 19-Mar-2008 Ted Kremenek <kremenek@apple.com> More cleanups to HTML rewriter API: remove the InsertTag method; was too complicated
and clients can achieve a cleaner design just by inserting tags directly. Reserve
the "html" namespace for meta-level operations (e.g., escaping text, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
f830997de6ca8aa9526a9f4bb44593c19040ca85 19-Mar-2008 Ted Kremenek <kremenek@apple.com> More cleanups to HTML rewriter API: remove the InsertTag method; was too complicated
and clients can achieve a cleaner design just by inserting tags directly. Reserve
the "html" namespace for meta-level operations (e.g., escaping text, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
a38818486f49634709a4e304394db2b3188507f8 19-Mar-2008 Ted Kremenek <kremenek@apple.com> More HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
1b3188cfc2bfaeb14d40c43c1df62097b79016d1 19-Mar-2008 Ted Kremenek <kremenek@apple.com> More HTML rewriter cleanups. Preliminary CSS support in code pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
f08ee32d1ab4939513c19f9ed299a659b4445eda 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Some cleanups to the HTMLRewrite API. Added support for printing out line
numbers (more work to be done on aesthetics).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
b485cd1e0a5a1e942d0e682b9b1c4bc9df111528 19-Mar-2008 Ted Kremenek <kremenek@apple.com> Some cleanups to the HTMLRewrite API. Added support for printing out line
numbers (more work to be done on aesthetics).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48512 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
a8c90ddd861833ea9cc165228c41f089e47588de 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Modified "InsertTag" (HTML rewriter) to have an optional "OutermostTag" flag to
indicate whether or not the new tag should be the outermost tag at the specified
location (in the case that other tags have been inserted at the same spot).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
c22efea6f999e98733f3431db03b10ce619faa8b 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Modified "InsertTag" (HTML rewriter) to have an optional "OutermostTag" flag to
indicate whether or not the new tag should be the outermost tag at the specified
location (in the case that other tags have been inserted at the same spot).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
24612aedb28c37adf0cc1cb004c3b60607fcc538 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Added the beginning of a set of rewriter functions for pretty-printing source
code as HTML. Added a new driver option "--emit-html" to dump the source
of the main input file as HTML.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
6a34083e9f74a45e2f79c9fab66f177809a5db66 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Added the beginning of a set of rewriter functions for pretty-printing source
code as HTML. Added a new driver option "--emit-html" to dump the source
of the main input file as HTML.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/HTMLRewrite.h
8d0368c83606c9b7a6900b9ff8a708eee30ead07 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Added variant of "InsertText" in the Rewriter to support inserting text both
*before* and after a specific location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
886c8db545170850f7806f47b5f6120864effd09 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Added variant of "InsertText" in the Rewriter to support inserting text both
*before* and after a specific location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
c710e5dce9733e2ca11f77e2f453920043716455 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
9f68fa52543e04736cf6f40d82f3d6d49a3a0989 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
61045079f7f8f380ef6ae34f56da4e80448c5ed4 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Added method "getSourceMgr" to class Rewriter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
4c535ace52492cf2b5fdf97752e76ed2991f3ef4 18-Mar-2008 Ted Kremenek <kremenek@apple.com> Added method "getSourceMgr" to class Rewriter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
e439fe0cb471da19ddb807acdf355baa816ea145 18-Mar-2008 Nate Begeman <natebegeman@mac.com> Fix a typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6a1bc1b95ee31c6892d46a6993b9e2d2d66831ee 18-Mar-2008 Nate Begeman <natebegeman@mac.com> Fix a typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
31803c37d86172e7ae2a2242c83d7850a34d4bc2 17-Mar-2008 Ted Kremenek <kremenek@apple.com> Added initial transfer function support for inline asm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
ef44bfb9d0f15ba0391f8346c9f01355fb450a09 17-Mar-2008 Ted Kremenek <kremenek@apple.com> Added initial transfer function support for inline asm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
8f9b504219b6c810318a8335626fa656058610d1 17-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "inputs" and "outputs" iterator (expression) for AsmStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ec2f7dccb1f30ae137f74e764e44c2332b0a2ec0 17-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "inputs" and "outputs" iterator (expression) for AsmStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
29ed685364c1f93720d3fc08037d93b18b7074e2 17-Mar-2008 Chris Lattner <sabre@nondot.org> eliminate the last signed element count.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b5feb35360526da42ad7e3fa7ef3d44a5992b83c 17-Mar-2008 Chris Lattner <sabre@nondot.org> eliminate the last signed element count.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
526bf9163cb103c06fbd1e77429baf22384d68b5 17-Mar-2008 Chris Lattner <sabre@nondot.org> clean up iteration over propertydecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a5674258f5e6f74f1c0ed3ece4d64fbb1b9afb11 17-Mar-2008 Chris Lattner <sabre@nondot.org> clean up iteration over propertydecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
44859618fbb881db1728da0bb6e82553f579d2ec 17-Mar-2008 Chris Lattner <sabre@nondot.org> clean up property memory allocation to move it into the ast classes
like the rest of the classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f4af5154571e0c5eadb19df10e65464766ef6683 17-Mar-2008 Chris Lattner <sabre@nondot.org> clean up property memory allocation to move it into the ast classes
like the rest of the classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48434 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
cffe36686142e06ce67fd4f0469ecc58e1286bdf 16-Mar-2008 Chris Lattner <sabre@nondot.org> make property addition work list all other "add" methods. Do
the allocation in the class, not in sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
55d13b4d5530a14d5baa72adab32ae78ba256caf 16-Mar-2008 Chris Lattner <sabre@nondot.org> make property addition work list all other "add" methods. Do
the allocation in the class, not in sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2d1c43110a0f4ba4b9b6de2364959a238baf1c12 16-Mar-2008 Chris Lattner <sabre@nondot.org> add the last two Create methods for decls, woo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f8d17a59167d9c2026506ed8813ea434d93b662a 16-Mar-2008 Chris Lattner <sabre@nondot.org> add the last two Create methods for decls, woo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ec4979bdcb038c005fdcc1bd9d3ecc56d10ff1c2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Convert more counts to be zero based instead of -1 based, make them unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f3a7af901231535191d14cb524d58f22907ac4d2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Convert more counts to be zero based instead of -1 based, make them unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48429 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
1b6de3378e0af075b0254da7ba8c2e80f2753609 16-Mar-2008 Chris Lattner <sabre@nondot.org> add two more Create methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
75c9cae5f85c72cbb1649e93849e16ede3f07522 16-Mar-2008 Chris Lattner <sabre@nondot.org> add two more Create methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
321b5d12d1ed2c6b5a2faab712c3e3572c76eef6 16-Mar-2008 Chris Lattner <sabre@nondot.org> simplify the way ObjCCategoryDecl's get their referenced protocols list
specified. Previously, the ctor would allocate memory for the list and then
it would get filled in later. Move the allocation+filling in to be more
consistent with other stuff, e.g. the addMethods method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
68c82cf61228102aba1194efef222fa1478af2a8 16-Mar-2008 Chris Lattner <sabre@nondot.org> simplify the way ObjCCategoryDecl's get their referenced protocols list
specified. Previously, the ctor would allocate memory for the list and then
it would get filled in later. Move the allocation+filling in to be more
consistent with other stuff, e.g. the addMethods method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48427 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e29dc839e5d2cb44824463a2968a3c04d28245f4 16-Mar-2008 Chris Lattner <sabre@nondot.org> Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
61f9d41036e30ff80130f99b31c0626e3ef057cc 16-Mar-2008 Chris Lattner <sabre@nondot.org> Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48426 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e2e6ab496be9134e80abaf56c76c0de45e65cc26 16-Mar-2008 Chris Lattner <sabre@nondot.org> make some more 'counts' unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
62db2f4214c1589082960f12c9cb8924fe0cf8c5 16-Mar-2008 Chris Lattner <sabre@nondot.org> make some more 'counts' unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48425 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
243ddef001bc8803df3a0a4c62f720e816ac0e75 16-Mar-2008 Chris Lattner <sabre@nondot.org> make NumClassMethods unsigned in categories


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a906135721c350435319347d2672bbb3bf494f91 16-Mar-2008 Chris Lattner <sabre@nondot.org> make NumClassMethods unsigned in categories


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48424 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7afba9ccb99d94be9dbd0a5d4a1d749e4880b864 16-Mar-2008 Chris Lattner <sabre@nondot.org> minor cleanups, make getNumInstanceMethods always return unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
c858105d41602a2dadb2efbc1af80a7b791ebac3 16-Mar-2008 Chris Lattner <sabre@nondot.org> minor cleanups, make getNumInstanceMethods always return unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
180f7e2b7bab938bc797f3ed459826720866655a 16-Mar-2008 Chris Lattner <sabre@nondot.org> Give ObjCProtocolDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
cca59d77c4b84fd2da268018dbaf9431a621e75b 16-Mar-2008 Chris Lattner <sabre@nondot.org> Give ObjCProtocolDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0db541b0fc07aaa800e7f687b2a39a931db8f3b1 16-Mar-2008 Chris Lattner <sabre@nondot.org> Add create methods for ObjCIvarDecl and ObjCInterfaceDecl


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0e77ba0bf769e2e5a4a93c079f241b02aeb3ef93 16-Mar-2008 Chris Lattner <sabre@nondot.org> Add create methods for ObjCIvarDecl and ObjCInterfaceDecl


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
685d792c2a41538694068ad014622d81980853c1 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make the parameter count of ObjCMethodDecl unsigned, you
can't have negative arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
58cce3b0dcbdcc95b7e713795834b4cb2c8a008a 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make the parameter count of ObjCMethodDecl unsigned, you
can't have negative arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f735583ce92b5539bb607bfc57de9e90b1498429 16-Mar-2008 Chris Lattner <sabre@nondot.org> remove some dead arguments to ObjCMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b06fa3b86951b9f179c99c3768331536c32e902d 16-Mar-2008 Chris Lattner <sabre@nondot.org> remove some dead arguments to ObjCMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
114add6e2b53b3b1953db4fb721db65f3b8dd173 16-Mar-2008 Chris Lattner <sabre@nondot.org> Give ObjCMethodDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6c4ae5de0c356777446f823b573821fb95560d91 16-Mar-2008 Chris Lattner <sabre@nondot.org> Give ObjCMethodDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
81db64a7628f64f16a986a8e314d1d792a2259cb 16-Mar-2008 Chris Lattner <sabre@nondot.org> switch the rest of the C decl classes to do their
allocation through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8e25d8681822d8094bfeb97b2239363552548171 16-Mar-2008 Chris Lattner <sabre@nondot.org> switch the rest of the C decl classes to do their
allocation through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48403 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9ea647e7f3d7ccbc62caa84b67211f4b9d29304a 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a ctor protected


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
fbdeba1c530dc3534a6f5b788e43d1a43c260128 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a ctor protected


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
58114f09323daa78692ca3d61a6a876d44705533 15-Mar-2008 Chris Lattner <sabre@nondot.org> move the ASTContext argument to be first in the argument list of
all Create methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c63e660882ff93841fa234d70ef6757038302b92 15-Mar-2008 Chris Lattner <sabre@nondot.org> move the ASTContext argument to be first in the argument list of
all Create methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4c7802b2a6c8ce3e65fd16ff97d6e25f821e5d4f 15-Mar-2008 Chris Lattner <sabre@nondot.org> Switch over functiondecl. This makes it obvious that the ASTContext
argument to Create should be first, not last.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a98e58ddb4696a0020fe97439d5295413f9e90b1 15-Mar-2008 Chris Lattner <sabre@nondot.org> Switch over functiondecl. This makes it obvious that the ASTContext
argument to Create should be first, not last.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
48d225c6b3bbcab06c12756cc0ca4c2a21d214ed 15-Mar-2008 Chris Lattner <sabre@nondot.org> switch the VarDecl allocation model to go through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9e151e154780e9cd443336143af1e996d1f387e5 15-Mar-2008 Chris Lattner <sabre@nondot.org> switch the VarDecl allocation model to go through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48396 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e4650488e8b15c43079c783191734d116fc7be3d 15-Mar-2008 Chris Lattner <sabre@nondot.org> start switching decls over to using an allocator controlled by ASTContext.
Right now only some ctors are switched over. I need to switch them all
over so I can change the dtor over.

This lets us experiment with region allocation and other things in the
future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
6c2b6eb8d836da19007f7540709e16d5e39a1cba 15-Mar-2008 Chris Lattner <sabre@nondot.org> start switching decls over to using an allocator controlled by ASTContext.
Right now only some ctors are switched over. I need to switch them all
over so I can change the dtor over.

This lets us experiment with region allocation and other things in the
future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
2f0c0e12f243d35d9e117e46c71afa2b99548b9d 14-Mar-2008 Ted Kremenek <kremenek@apple.com> Emit warnings for undefined control-flow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1b9df4c307b650526344ba0a28534268f6920745 14-Mar-2008 Ted Kremenek <kremenek@apple.com> Emit warnings for undefined control-flow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
5d257d4912ca9c5cb2c02d6cd579fd0a4478da5a 14-Mar-2008 Ted Kremenek <kremenek@apple.com> Path-sensitive analyses no longer take a FunctionDecl, but any Decl representing
a block of "code".

Patched various ASTConsumers (such as ASTDumper) to have more support for
processing ObjCMethodDecl. CFGVisitor now builds CFGs for ObjCMethodDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
63bbe5312cd89ce0ceb684bff68c5baef636e93c 14-Mar-2008 Ted Kremenek <kremenek@apple.com> Path-sensitive analyses no longer take a FunctionDecl, but any Decl representing
a block of "code".

Patched various ASTConsumers (such as ASTDumper) to have more support for
processing ObjCMethodDecl. CFGVisitor now builds CFGs for ObjCMethodDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
658298169b32019ea380c779ec31203a6deedefd 14-Mar-2008 Chris Lattner <sabre@nondot.org> Make the preprocessor own its PPCallbacks, fixing a memory leak.
Patch by Sam Bishop!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
eb50ed88c2aa040fac08bf2a50bde4dd3da6eb19 14-Mar-2008 Chris Lattner <sabre@nondot.org> Make the preprocessor own its PPCallbacks, fixing a memory leak.
Patch by Sam Bishop!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
0606819b6c45de7773f7d7f4a95ad51faa393b1f 14-Mar-2008 Nate Begeman <natebegeman@mac.com> ISO/IEC TR 18037
An address space name cannot be used to qualify an object that has automatic
storage duration. Still not catching ASQual'd allocas of array type, just
scalars at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5af27e02917089dd107c58c1cfdb064544010773 14-Mar-2008 Nate Begeman <natebegeman@mac.com> ISO/IEC TR 18037
An address space name cannot be used to qualify an object that has automatic
storage duration. Still not catching ASQual'd allocas of array type, just
scalars at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a353fc2d374894ef2c2a41481423159f035c5c37 14-Mar-2008 Nate Begeman <natebegeman@mac.com> Fix comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
2b59a2cbfdb93fcf1a4a303e1ea7753ff1c7b319 14-Mar-2008 Nate Begeman <natebegeman@mac.com> Fix comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48347 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f41ac5fd16bc7e2d1de59f4df292c9a7518606e8 13-Mar-2008 Ted Kremenek <kremenek@apple.com> The LiveVariables analysis no longer requires a FunctionDecl&; this allows it
to be run on other declarations of blocks of code (e.g., Objective-C methods.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/Support/ExprDeclBitVector.h
7cb15939e08ea31f0fadcd24c974dbc9e4b61c01 13-Mar-2008 Ted Kremenek <kremenek@apple.com> The LiveVariables analysis no longer requires a FunctionDecl&; this allows it
to be run on other declarations of blocks of code (e.g., Objective-C methods.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/Support/ExprDeclBitVector.h
a4ff4277d928a0a8dc96e3b1381c37fbaf922e48 13-Mar-2008 Chris Lattner <sabre@nondot.org> improve DeclStmt to be able to store SourceRange info correctly.
Set the start of DeclStmt range. Right now the end is meaningless
though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
81c018d9482e7cc2addadc6202dcf162a01faefd 13-Mar-2008 Chris Lattner <sabre@nondot.org> improve DeclStmt to be able to store SourceRange info correctly.
Set the start of DeclStmt range. Right now the end is meaningless
though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
d4676513ec14b9a1f5445d528356c0eb7b6e9520 12-Mar-2008 Ted Kremenek <kremenek@apple.com> Changed CallRetValSymbol to SymbolConjured to allow "conjured" symbols to be created for any expression, not just CallExprs.
Added experimental support for conjuring symbols during assingments where the RHS is "unknown". This allows more value tracking for path-sensitivity.
Fixed bug in "assumption" logic when processing symbolic constraints; we would improperly mark constraints we didn't support as infeasible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
361fa8ecd122a5b06c2c59d44419e202f42e1c5d 12-Mar-2008 Ted Kremenek <kremenek@apple.com> Changed CallRetValSymbol to SymbolConjured to allow "conjured" symbols to be created for any expression, not just CallExprs.
Added experimental support for conjuring symbols during assingments where the RHS is "unknown". This allows more value tracking for path-sensitivity.
Fixed bug in "assumption" logic when processing symbolic constraints; we would improperly mark constraints we didn't support as infeasible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
173b3cb823c3f37952845a5c6aaa5908342ec27c 12-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed regression in SymbolManager introduced in r48272.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
a8b53643b618e2f0b094b8c86ec9650e0625a486 12-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed regression in SymbolManager introduced in r48272.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
ce3ed1ecf6bc55c453a4957ff604dd7b78050c7d 12-Mar-2008 Ted Kremenek <kremenek@apple.com> Prototype (pre-alpha) implementation of CFRef checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueState.h
00a3a5f024ac54088ab887712b292171188064f0 12-Mar-2008 Ted Kremenek <kremenek@apple.com> Prototype (pre-alpha) implementation of CFRef checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueState.h
9f597924c271fa7a0221dbfe2777fedd411e861b 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Expanded graph-visualization to include optional pretty-printing of checker-specific state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
75da3e82722cc6a616eaab28b75f9a6973178c49 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Expanded graph-visualization to include optional pretty-printing of checker-specific state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
d36564973d5bbdcae930bba14e0948026a615867 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Expanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
object to pretty-print the component of a state that is specific to a checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
461f9776f2b3bc307dd4706822ffc7ef43102fd2 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Expanded ValueState pretty-printing to use an optional "CheckerStatePrinter"
object to pretty-print the component of a state that is specific to a checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
e44a830c69194ae52acf76d9cbb55b6ec61890fc 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Expanded graph visualization interface to include specifying a range of
nodes to use a trim sources.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
493d7a26d5ea319770ba904b43f2740d43b820cb 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Expanded graph visualization interface to include specifying a range of
nodes to use a trim sources.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
a7338b47915f32659682dc6a7d1a02ebff0c92f0 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Added main skeleton for CFRetain transfer function logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
6b3a0f72137570d5fd93a8919abe16cbc9359d31 11-Mar-2008 Ted Kremenek <kremenek@apple.com> Added main skeleton for CFRetain transfer function logic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
8b8720fb70ebf3f45caac7feea5edcff5b006ad7 10-Mar-2008 Chris Lattner <sabre@nondot.org> Add some missing #includes for GCC mainline, patch by Shantonu Sen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
87cf5ac1b046a1db874b77dcb6e35f9c4b88c386 10-Mar-2008 Chris Lattner <sabre@nondot.org> Add some missing #includes for GCC mainline, patch by Shantonu Sen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48153 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
1faa41603b2fae19f8f316cc4b3d55f55466f469 10-Mar-2008 Ted Kremenek <kremenek@apple.com> Add transfer function support for pointer arithmetic where the
increment/decrement operand is on the left side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
3f916501c91d3f6f37b1d43276c440343f9454f6 10-Mar-2008 Ted Kremenek <kremenek@apple.com> Add transfer function support for pointer arithmetic where the
increment/decrement operand is on the left side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
8071239a066f7aefc23bd1552d022a4e31876988 10-Mar-2008 Chris Lattner <sabre@nondot.org> implement simple support for arbitrary token lookahead. Change the
objc @try parser to use it, fixing a FIXME. Update the
objc-try-catch-1.m file to pass now that we get more reasonable
errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
lang/Parse/Parser.h
6b884508c3bc97cc9df9516adb92fbf88dd0a2e4 10-Mar-2008 Chris Lattner <sabre@nondot.org> implement simple support for arbitrary token lookahead. Change the
objc @try parser to use it, fixing a FIXME. Update the
objc-try-catch-1.m file to pass now that we get more reasonable
errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
lang/Parse/Parser.h
a1d070b25c18b75e7e2daa75a35537bac20f7e80 10-Mar-2008 Ted Kremenek <kremenek@apple.com> More edge-case handling with using liveness information to prune dead state values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
3bbad550be7edc628be31b51d2a51b6d7d46eafb 10-Mar-2008 Ted Kremenek <kremenek@apple.com> More edge-case handling with using liveness information to prune dead state values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
50ef5ff5be5c1a2d4937d455b0c50ee44470b11b 10-Mar-2008 Ted Kremenek <kremenek@apple.com> More cleanups with using the liveness analysis to removed dead symbols and
variables from the symbolic state. Now we keep a mapping from the predecessor
node of a statement and its cleaned state, and interpose an accessor
"GetState()" to return the cleaned state when the node is the predecessor node,
and the real state otherwise. This obviates problem of ever accidentally
cleaning the state more than once (thus blowing away new bindings by mistake).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
0d093d3005dd583675a45a85bd688063572cc8af 10-Mar-2008 Ted Kremenek <kremenek@apple.com> More cleanups with using the liveness analysis to removed dead symbols and
variables from the symbolic state. Now we keep a mapping from the predecessor
node of a statement and its cleaned state, and interpose an accessor
"GetState()" to return the cleaned state when the node is the predecessor node,
and the real state otherwise. This obviates problem of ever accidentally
cleaning the state more than once (thus blowing away new bindings by mistake).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48124 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
02331460242a9b3af06683c3e947aa732248bede 09-Mar-2008 Ted Kremenek <kremenek@apple.com> When processing the transfer function for a statement, evaluate
RemoveDeadBindings early because (1) it will always be called and (2) we can
dispatch to a plug-in transfer function that can evaluate the effect of dead
symbols (not yet added).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
512c913a6f93d225faacdb8e20308f5c4065c3eb 09-Mar-2008 Ted Kremenek <kremenek@apple.com> When processing the transfer function for a statement, evaluate
RemoveDeadBindings early because (1) it will always be called and (2) we can
dispatch to a plug-in transfer function that can evaluate the effect of dead
symbols (not yet added).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
f973eb03e40c007cf49f2d23d5695b3a9b40d41c 09-Mar-2008 Ted Kremenek <kremenek@apple.com> Refactored guards for "GRExprEngine::RemoveDeadBindings" directly into the
method. This paves the way for other alterations to RemoveDeadBindings that are
transparent to its callers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
daa497e3ae567ba6684226b86e6e1fe900112dab 09-Mar-2008 Ted Kremenek <kremenek@apple.com> Refactored guards for "GRExprEngine::RemoveDeadBindings" directly into the
method. This paves the way for other alterations to RemoveDeadBindings that are
transparent to its callers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
f97c6682762f5f87e774fdf61a8f3e92bd16327f 09-Mar-2008 Ted Kremenek <kremenek@apple.com> Bug fix: Don't call RemoveDeadBindings more than once (can kill newly generated values to Block-Level Expressions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
9b5551d7f0209cec8b9c555cf70e893940674e5c 09-Mar-2008 Ted Kremenek <kremenek@apple.com> Bug fix: Don't call RemoveDeadBindings more than once (can kill newly generated values to Block-Level Expressions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
325c197aa8a6558f112a4b342e970efcd616cae2 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename HandleEndOfMacro -> HandleEndOfTokenLexer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
fde2bf9befede63e3f01f84519784c17b4c81480 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename HandleEndOfMacro -> HandleEndOfTokenLexer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
568ec6b6a0a512853afe2365d558efa1daf29c2e 09-Mar-2008 Chris Lattner <sabre@nondot.org> split the MacroArgs class out of TokenLexer.cpp/h into
MacroArgs.cpp/h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenLexer.h
e5c8ffe09f8fec836b90f23c2a3b996bfc5b09c4 09-Mar-2008 Chris Lattner <sabre@nondot.org> split the MacroArgs class out of TokenLexer.cpp/h into
MacroArgs.cpp/h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/TokenLexer.h
5b54ed90ea5bd5380d9948b64b3f53b4097d49a1 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename some MacroExpander-related ivars to TokenLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
6cfe7594a46b5d270142cfcb688a9c1a3a487a48 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename some MacroExpander-related ivars to TokenLexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
5d097bdee7bc10cab9ee431106ac4915a4da42d2 09-Mar-2008 Chris Lattner <sabre@nondot.org> Rename MacroExpander.cpp/h -> TokenLexer.cpp/h



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
5d75de0f821023f4ed4815825bf3aea8a0b5e40d 09-Mar-2008 Chris Lattner <sabre@nondot.org> Rename MacroExpander.cpp/h -> TokenLexer.cpp/h



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48072 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
lang/Lex/TokenLexer.h
7b9ed9c7e7b3d8a8a98ef209b910c9d3cbffecda 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename the MacroExpander class to TokenLexer. It handles both
token streams and macro lexing, so a more generic name is useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
1543e9c69202b8e128c7fe34784ae7aa90964889 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename the MacroExpander class to TokenLexer. It handles both
token streams and macro lexing, so a more generic name is useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
28c1c9d7c7a991689d2ef793f442749836815ca1 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename MacroTokens -> Tokens. When this is a token stream, there is no macro
involved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
8d896438031f5990cb42eb95a7bae233db2eb333 09-Mar-2008 Chris Lattner <sabre@nondot.org> rename MacroTokens -> Tokens. When this is a token stream, there is no macro
involved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
21f38b0c5b92b72615d349beb8e9bd19f5738604 08-Mar-2008 Chris Lattner <sabre@nondot.org> add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
9c4bea1fa7291035325575c02d33552a124d8ef3 08-Mar-2008 Chris Lattner <sabre@nondot.org> add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48053 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3b74cac0ff167dbd3c8a89a7d00830e3339e42c8 08-Mar-2008 Chris Lattner <sabre@nondot.org> make float format handling more regular.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
cd4fc42896f926ffc081e1c4a8bf4cd647883c14 08-Mar-2008 Chris Lattner <sabre@nondot.org> make float format handling more regular.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
fc18dcc08c482a18596f576264d5c72c3d85eb66 08-Mar-2008 Chris Lattner <sabre@nondot.org> simplify all the type info accessors in TargeTInfo to return scalars,
which is simpler to use and provide.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
9e9b6dc3fd413f5341fab54b681420eeb21cd169 08-Mar-2008 Chris Lattner <sabre@nondot.org> simplify all the type info accessors in TargeTInfo to return scalars,
which is simpler to use and provide.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
461a6c5751ddea5d9d5ed42be229cceecf5bbad7 08-Mar-2008 Chris Lattner <sabre@nondot.org> Fix a fixme by allowing pointers in different address spaces to have
different widths. Start simplifying TargetInfo accessor methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
f72a44330b9d9a4b2d93e9b91cfb8ab7bd4a0643 08-Mar-2008 Chris Lattner <sabre@nondot.org> Fix a fixme by allowing pointers in different address spaces to have
different widths. Start simplifying TargetInfo accessor methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0fb8d8568f6da443711e41e91f607e9f7b7d43f8 08-Mar-2008 Chris Lattner <sabre@nondot.org> eliminate the TargetInfoImpl stuff, simplifying the target implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0eaed12e634dfd14f44620f63b8d3276fed028dd 08-Mar-2008 Chris Lattner <sabre@nondot.org> eliminate the TargetInfoImpl stuff, simplifying the target implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
0e4ed8e55256a6d0132549e5008441b658b2cace 08-Mar-2008 Chris Lattner <sabre@nondot.org> eliminate ComputeWCharInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
390161183919169c493916efac4c1e1b3828fea6 08-Mar-2008 Chris Lattner <sabre@nondot.org> eliminate ComputeWCharInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
5e1e05cebb0ce9d7c32c0db17c69d03ab4cb4fcb 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Added --trim-path-graph to the driver to trim paths from the ExplodedGraph
that are not related to error nodes.

Fixed bug where we did not detect some NULL dereferences.

Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach
a set of provided nodes.

Fixed subtle bug in ExplodedNodeImpl where we could create predecessor
iterators that included the mangled "sink" bit. The better fix is to integrate
this bit into the void* for the wrapped State, not the NodeGroups representing
a node's predecessors and successors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
ffe0f43806d4823271c2406c1fccc2373115c36a 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Added --trim-path-graph to the driver to trim paths from the ExplodedGraph
that are not related to error nodes.

Fixed bug where we did not detect some NULL dereferences.

Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach
a set of provided nodes.

Fixed subtle bug in ExplodedNodeImpl where we could create predecessor
iterators that included the mangled "sink" bit. The better fix is to integrate
this bit into the void* for the wrapped State, not the NodeGroups representing
a node's predecessors and successors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48036 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
8ad1987085a0b24d909ce7ebcb85ad2d5665e746 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Renamed ValueManager to BasicValueFactory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/PathSensitive/ValueState.h
240f1f00dda1d481276ea872fe8f8851581a7e6b 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Renamed ValueManager to BasicValueFactory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/BasicValueFactory.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/PathSensitive/ValueState.h
d75d28b0ac4547ebf0e80f11a5c13a1415bca14e 07-Mar-2008 Nate Begeman <natebegeman@mac.com> Add fastcall/stdcall attribute support
Generate CallingConv::Fast when fastcall attribute is present


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
440b456709526c4277e71d2e0ff49e5d88dc7b17 07-Mar-2008 Nate Begeman <natebegeman@mac.com> Add fastcall/stdcall attribute support
Generate CallingConv::Fast when fastcall attribute is present


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48017 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
75f32c655b9c94affecf89c487991f4d22a4b0cc 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Refined divide-by-zero checking to distinguish between must and may
divide-by-zero errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
4d839b4949efe9e2b16eeab679c25b28e31ea742 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Refined divide-by-zero checking to distinguish between must and may
divide-by-zero errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
e576941625af241f4bc0920a398927f8ba89bf9b 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Patch by Nuno Lopes:

Added more comments for code processing attribute "format".
Added more checks for corner cases, test cases, and warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
aa8f976111e75427fa41e0f84b78fe086ce0f4e6 07-Mar-2008 Ted Kremenek <kremenek@apple.com> Patch by Nuno Lopes:

Added more comments for code processing attribute "format".
Added more checks for corner cases, test cases, and warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48011 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2224fcbe656de9a28a2c4553072105617f268f06 06-Mar-2008 Gabor Greif <ggreif@gmail.com> fix typos

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/PathSensitive/ValueState.h
843e934ba8c6ebc00d2f6969a50af7074597e8e3 06-Mar-2008 Gabor Greif <ggreif@gmail.com> fix typos

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/PathSensitive/ValueState.h
827f93ba40f07ee80ef9cdbe984151f65a11442b 06-Mar-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate to execute the CF reference count checker (which isn't yet implemented).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
2fff37ecce1efd21ecb9bb4937dca83bdea715ff 06-Mar-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate to execute the CF reference count checker (which isn't yet implemented).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47982 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
f1d8db6f8e43f27e987bd86cc6dde0784be16680 06-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "CheckerState" field to ValueState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
cb0ab296dd7942b951ca84a0b82b954e3642b116 06-Mar-2008 Ted Kremenek <kremenek@apple.com> Added "CheckerState" field to ValueState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
a2822ebe93fc84a8a992d6f014b569426dbf920c 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Small bug fix when handling CallExprs that generate sink nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
5dc7f8b2d6a4f94ab4d1377912499a23cf8bc024 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Small bug fix when handling CallExprs that generate sink nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
b451dd30a9abf5b24d2173a1f415602f604e3055 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed bug that could case unwanted bifurcation of states when evaluating calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
4bf38da038cebf9396470630c3c39519e41706da 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed bug that could case unwanted bifurcation of states when evaluating calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
399e901122d68daa45c7fef54c697784adf4e8d6 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed a horribly insidious bit-masking bug in the implementation of
ExplodedNode that would occasionally result in heap corruption.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
596f0a1e54f610926e8bfded9efa1c639f824ded 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed a horribly insidious bit-masking bug in the implementation of
ExplodedNode that would occasionally result in heap corruption.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
8cd0e9334436a89e85d8769d1d8f52d763497ee9 05-Mar-2008 Chris Lattner <sabre@nondot.org> remove the source location arguments to various target query methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Basic/TargetInfo.h
98be4943e8dc4f3905629a7102668960873cf863 05-Mar-2008 Chris Lattner <sabre@nondot.org> remove the source location arguments to various target query methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Basic/TargetInfo.h
cc80f188a59570132ec8029f523e1904a5218d57 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Reverted patch 47926 for ProgramPoint.h because it is currently buggy. May add back (fixed) later.
Updated CFGStmtVisitor to be in accord with rr47913: CallExprs are no longer (automatically) block-level expressions in the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Analysis/Visitors/CFGStmtVisitor.h
ea45bb2d3b5e445029ad8f42d88bc1ed5b483a0b 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Reverted patch 47926 for ProgramPoint.h because it is currently buggy. May add back (fixed) later.
Updated CFGStmtVisitor to be in accord with rr47913: CallExprs are no longer (automatically) block-level expressions in the CFG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
lang/Analysis/Visitors/CFGStmtVisitor.h
fc45700f04023c8aa4e841baeff0825ad7212cb6 05-Mar-2008 Chris Lattner <sabre@nondot.org> Remove the first layer of support for "portability" warnings. This is
theoretically useful, but not useful in practice. It adds a bunch of
complexity, and not much value. It's best to nuke it. One big advantage
is that it means the target interfaces will soon lose their SLoc arguments
and target queries can never emit diagnostics anymore (yay). Removing this
also simplifies some of the core preprocessor which should make it slightly
faster.

Ted, I didn't simplify TripleProcessor, which can now have at most one
triple, and can probably just be removed. Please poke at it when you have
time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.def
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
42e6737f2efb113563140ad794c21c7709250402 05-Mar-2008 Chris Lattner <sabre@nondot.org> Remove the first layer of support for "portability" warnings. This is
theoretically useful, but not useful in practice. It adds a bunch of
complexity, and not much value. It's best to nuke it. One big advantage
is that it means the target interfaces will soon lose their SLoc arguments
and target queries can never emit diagnostics anymore (yay). Removing this
also simplifies some of the core preprocessor which should make it slightly
faster.

Ted, I didn't simplify TripleProcessor, which can now have at most one
triple, and can probably just be removed. Please poke at it when you have
time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/IdentifierTable.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.def
lang/Lex/MacroInfo.h
lang/Lex/Preprocessor.h
12839eeec68774a5f922837db8fb49dc6b42f1e1 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Added support for ProgramPoints to represent ExplodedNodes in another
ExplodedGraph. This allows us to build "layered" ExplodedGraphs where one
simulation is layered on another.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
424f67155475296804f9b9159dba606859441924 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Added support for ProgramPoints to represent ExplodedNodes in another
ExplodedGraph. This allows us to build "layered" ExplodedGraphs where one
simulation is layered on another.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
3eea8dd710437324c091b39a2bbd349877fecfac 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Plug-in transfer function "EvalCall" now takes as an argument the current
GRStmtNodeBuilder and is now responsible for adding its own nodes to the graph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
330dddd19406f9cc227e59e0bb0a36ecdc52915e 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Plug-in transfer function "EvalCall" now takes as an argument the current
GRStmtNodeBuilder and is now responsible for adding its own nodes to the graph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
c9358578fcbbceca8f9ff524f1e0c5c2202e8008 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Cleaned up typedefs involving StateTy so that we always use "StateTy*" instead of StateTy.
This is conceptually much cleaner, as it shows that the state is always a pointer.
It also makes it easier to marshall these values around across the internal APIs
of the path-sensitive engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
e5f4dcb6bd73a10df6eb6c3cfe057c88cb2362cc 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Cleaned up typedefs involving StateTy so that we always use "StateTy*" instead of StateTy.
This is conceptually much cleaner, as it shows that the state is always a pointer.
It also makes it easier to marshall these values around across the internal APIs
of the path-sensitive engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
bbd18e9cf60c2a0be46e54a0ca301caa13990bf6 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Make GRStmtNodeBuilder only depend on StateTy, and not the type definition
of the entire checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
f116bd654bcdb5d7c22656f224deeb7a67f7d0cd 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Make GRStmtNodeBuilder only depend on StateTy, and not the type definition
of the entire checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47920 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
65f841f8469ea2def561d4776a2df939cfcfe6d4 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Moved implementation of GRExprEngine::Nodify into GRStmtNodeBuilder. This will
allow us to pass the builder to plug-in transfer functions and allow those
functions to create intermediate nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
5c684c4be01fb98077a9b5e07ca1fdc01d8d97cb 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Moved implementation of GRExprEngine::Nodify into GRStmtNodeBuilder. This will
allow us to pass the builder to plug-in transfer functions and allow those
functions to create intermediate nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47919 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
e788ca9256957b3cdb1a68ef1bda9aab2d92e18c 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Moved GRExprEngine::NodeSet out of GRExprEngine and made it a standalone class: ExplodedNodeSet.
Made GRExprEngine::NodeSet a typedef of ExplodedNodeSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
f6f5ef4aaa66b60270e84d1fe1292886369d2f38 05-Mar-2008 Ted Kremenek <kremenek@apple.com> Moved GRExprEngine::NodeSet out of GRExprEngine and made it a standalone class: ExplodedNodeSet.
Made GRExprEngine::NodeSet a typedef of ExplodedNodeSet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47914 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
65f40305f9ba9f1c3248579cb5d179a3c6e17071 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed another obscure node-caching bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ValueState.h
7fa6a4079fd68344e4d38c30f7681b3a7d30fbd1 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed another obscure node-caching bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ValueState.h
e1cfa99e0753a71c26d6d5d831fe5bb08c448218 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Implemented "print" method for ValueState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
59894f9d4560021b12ff3e0207ae6046bc3b050a 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Implemented "print" method for ValueState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ValueState.h
d507bab9ac623edb72caee75a96bac8f1caeba7f 04-Mar-2008 Ted Kremenek <kremenek@apple.com> TargetInfo objects now own the TargetInfoImpl objects they refer to.
TargetInfo::AddSecondaryTarget is now private, as it is only used during
object construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
fb79f7cc00f9c1e04f11ed636eefb36d246b0fb8 04-Mar-2008 Ted Kremenek <kremenek@apple.com> TargetInfo objects now own the TargetInfoImpl objects they refer to.
TargetInfo::AddSecondaryTarget is now private, as it is only used during
object construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
ef7ea077f8e97529cc5580a14b992bf42e43944c 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed insidious state propagation bug that would sometimes cause the state
to bifurcate at the wrong places and not propagate at others.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
ed2d2edecc0c5b92df99baf0ee31ac915b2e7c6a 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed insidious state propagation bug that would sometimes cause the state
to bifurcate at the wrong places and not propagate at others.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47876 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
4aa575903f6e45e037bb7075c6296e9262301b6a 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Enhanced pretty-printing of undefined-argument errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
1e80aa49ec689d1937e54fb353d6626e0a58f0db 04-Mar-2008 Ted Kremenek <kremenek@apple.com> Enhanced pretty-printing of undefined-argument errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47873 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
547e77f36006acd19f25b12e2accd6ff96fa04fd 03-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed subtle caching bug in ExplodedGraph that would cause some nodes to
be incorrectly merged together.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/ProgramPoint.h
5226755ab5ce6346f98b5f41cdcffbe84c5bb484 03-Mar-2008 Ted Kremenek <kremenek@apple.com> Fixed subtle caching bug in ExplodedGraph that would cause some nodes to
be incorrectly merged together.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47851 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/ProgramPoint.h
402b337840023aa37ec402be193717ce6caed5d4 03-Mar-2008 Chris Lattner <sabre@nondot.org> Add a bunch of attributes, patch by Nuno Lopes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
ddee4231e9bdfbac1e1f5385ff1a17fd0e0b0e39 03-Mar-2008 Chris Lattner <sabre@nondot.org> Add a bunch of attributes, patch by Nuno Lopes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47837 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
b9f54c31e6775bd74ab01284d61862252684fcf3 01-Mar-2008 Chris Lattner <sabre@nondot.org> newline at end of file, by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
72fc3b30d775a6b720dd0dd87aa853226f0625dd 01-Mar-2008 Chris Lattner <sabre@nondot.org> newline at end of file, by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
9b31f5b5ac931ca9ab7790b61f36832e595a15cb 01-Mar-2008 Ted Kremenek <kremenek@apple.com> Added extra check for calls to functions where we pass undefined values
as arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
2ded35a576e3899553ea0ccfcbf5cbdb3d8cf664 01-Mar-2008 Ted Kremenek <kremenek@apple.com> Added extra check for calls to functions where we pass undefined values
as arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
73cf87e59c2e06cc8c7292ed50a34d1625de4925 01-Mar-2008 Steve Naroff <snaroff@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=2103.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bcb2b6112072b071aafb0a7a28f16239c6a006a5 01-Mar-2008 Steve Naroff <snaroff@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=2103.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47775 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
43863eb0d2edb95eaa24b77b8ab669fc51b66d46 01-Mar-2008 Ted Kremenek <kremenek@apple.com> Add checks for function calls via a function pointer that is NULL, Undefined,
or otherwise a constant integer value that doesn't evaluate to an address.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
5e03fcb5420c33207433dd6f800588e256dd9bdb 01-Mar-2008 Ted Kremenek <kremenek@apple.com> Add checks for function calls via a function pointer that is NULL, Undefined,
or otherwise a constant integer value that doesn't evaluate to an address.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47774 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
70f16246dc0be87dabc42e6ef78b0fbfae3a7388 29-Feb-2008 Steve Naroff <snaroff@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=2106.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
da323adbb99cee19a203ead852d5d9bfebb23fb7 29-Feb-2008 Steve Naroff <snaroff@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=2106.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5c6eeb16a2f15c85c0a07a9b6ec9eee4f541ee55 29-Feb-2008 Ted Kremenek <kremenek@apple.com> "Refinement" of hack to bound loop-traversals: visit any block at a maximum of 3 times along a given path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
6a6719a3a11087b48d9f1a4eb08b3bd43cb05a65 29-Feb-2008 Ted Kremenek <kremenek@apple.com> "Refinement" of hack to bound loop-traversals: visit any block at a maximum of 3 times along a given path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47766 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
ee4c3bfe73bf1302b8e59c76e057f0f79e649650 29-Feb-2008 Chris Lattner <sabre@nondot.org> Add support for attribute(deprecated), patch by Nuno Lopes!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
7e669b25144c7cfae0e51d4098016d6982504dbd 29-Feb-2008 Chris Lattner <sabre@nondot.org> Add support for attribute(deprecated), patch by Nuno Lopes!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
c2d0720cb9bcc6a0fdfc496ca8c50015b8f52ffa 28-Feb-2008 Ted Kremenek <kremenek@apple.com> Added checking for undefined results of '<<' and '>>' (shifting by too many bits, etc.)
This current implementation only works when both operands are concrete values; later we will add support for symbolic values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/ValueManager.h
8cc13ea74fea1c04042a2f4087665bc5182e8408 28-Feb-2008 Ted Kremenek <kremenek@apple.com> Added checking for undefined results of '<<' and '>>' (shifting by too many bits, etc.)
This current implementation only works when both operands are concrete values; later we will add support for symbolic values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47726 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/ValueManager.h
f4b49dfa7ea6100c196d713adbeac87328064209 28-Feb-2008 Ted Kremenek <kremenek@apple.com> Merged ValueState and ValueStateImpl into just ValueState, with GRExprEngine::StateTy just becoming ValueState*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
aed9b6ac2ed0013133e4d4aebf2fad2ccd27f3e6 28-Feb-2008 Ted Kremenek <kremenek@apple.com> Merged ValueState and ValueStateImpl into just ValueState, with GRExprEngine::StateTy just becoming ValueState*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/ValueState.h
b31af24d7deec9f2893037605c99565e0da7ab7c 28-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SymbolManager.h
4a4e524afef40d6f3ddb25d0e407c814e4ca56a8 28-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed "Uninitialized" -> "Undefined" in path-sensitive value tracking engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SymbolManager.h
59938cadaf8aba59a5dba4e0f11fc55f413bf952 27-Feb-2008 Ted Kremenek <kremenek@apple.com> End paths when calling a function marked "noreturn."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
affb2159712b2373a18a89ed205c1a309d3aec12 27-Feb-2008 Ted Kremenek <kremenek@apple.com> End paths when calling a function marked "noreturn."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
13bfae66b70d770df75dcdc4f624f9a596b48e78 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Added support for attribute "noreturn."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
aecb38368546aa2cdb58d53bbcb3e8ad46365fc6 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Added support for attribute "noreturn."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Parse/AttributeList.h
5778d62432c481798479b7fba71c9da577cd076f 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Removed VarDecl::hasStaticStorage() (redundant with hasGlobalStorage())
Removed VarDecl::hasAutoStorage() (only used by hasLocalStorage())

Merged logic from VarDecl::hasAutoStorage() into VarDecl::hasLocalStorage(),
and expanded (fixed) the logic of hasLocalStorage() to handle Extern and PrivateExtern.

Renamed Expr::hasStaticStorage() to Expr::hasGlobalStorage().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
2e5f54aa1dd15a62c34a9d1d24a5a0692f43934a 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Removed VarDecl::hasStaticStorage() (redundant with hasGlobalStorage())
Removed VarDecl::hasAutoStorage() (only used by hasLocalStorage())

Merged logic from VarDecl::hasAutoStorage() into VarDecl::hasLocalStorage(),
and expanded (fixed) the logic of hasLocalStorage() to handle Extern and PrivateExtern.

Renamed Expr::hasStaticStorage() to Expr::hasGlobalStorage().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
b5175bf752f1ae00da4aefcf7e2bfbf8a6357e49 27-Feb-2008 Ted Kremenek <kremenek@apple.com> When analyzing a function, eagerly create symbolic values for all
globals/parameters at the beginning of the analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
0793263741a2343e0cf9b9ca5079ac4992657037 27-Feb-2008 Ted Kremenek <kremenek@apple.com> When analyzing a function, eagerly create symbolic values for all
globals/parameters at the beginning of the analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueState.h
9f6b161217d8653058fd2b9b578286c33a52ae25 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Header file cleanups: reduce number of includes; move ValueState.h into include directory tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/PathSensitive/ValueState.h
0f5f0595d6a038843a7051c5a65fca7bce2915a0 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Header file cleanups: reduce number of includes; move ValueState.h into include directory tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47661 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/ValueManager.h
lang/Analysis/PathSensitive/ValueState.h
ad5d5c55b23f0441a32dbddddb74dd618c6ecdef 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Fix bug when processing '?' operator: invalidate the old "Uninitialized" value of the block-level expression for ?.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
5a7b3821c6abed7f58a53a94eac128bd23d23289 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Fix bug when processing '?' operator: invalidate the old "Uninitialized" value of the block-level expression for ?.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
348d7858c662417a89c5bd6d40ae8a787a7b76f0 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate for plug-in transfer function support for CallExprs.
GRSimpleVals performs the following action: invalidate all values passed-by-reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
06747691096654742d9ed7342e63828456b4f40c 27-Feb-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate for plug-in transfer function support for CallExprs.
GRSimpleVals performs the following action: invalidate all values passed-by-reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47638 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
f69c06ffebac44c5224209eb29f652b73045ab05 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Changed VarDecl::hasGlobalStorage() to be the negation of hasLocalStorage().
Before it was the negation of hasAutoStorage(), which is incorrect.
"Register" storage for Decls do not indicate global variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9cae51aa5027dfb57bf1cc6b5fd1bdcec632aa14 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Changed VarDecl::hasGlobalStorage() to be the negation of hasLocalStorage().
Before it was the negation of hasAutoStorage(), which is incorrect.
"Register" storage for Decls do not indicate global variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47630 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f567a8227b3f675735a02f9f0b2c7237fa3888e2 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Removed static analysis-specific diagnostics from DiagnosticKinds.def.
Use custom diagnostics for static analysis checkers. Added warnings
for dereferencing uninitialized values and divide-by-zeroes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Basic/DiagnosticKinds.def
d87a321a3c3902f7acfc6539b8946a00da6e45cc 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Removed static analysis-specific diagnostics from DiagnosticKinds.def.
Use custom diagnostics for static analysis checkers. Added warnings
for dereferencing uninitialized values and divide-by-zeroes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47626 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Basic/DiagnosticKinds.def
99ecce7bdeb690c751ce446d6ecf59d55c407163 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Major cleanup of the transfer function logic for '&&', '||', and '?'. We
now store in the state essentially which branch we took. This removes
a bunch of bogus assumptions (and likely bugs), reduces the complexity of
the implementation, and facilitates more optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
05a2378c708688c8ef498a5cea40ed7f5db15fa5 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Major cleanup of the transfer function logic for '&&', '||', and '?'. We
now store in the state essentially which branch we took. This removes
a bunch of bogus assumptions (and likely bugs), reduces the complexity of
the implementation, and facilitates more optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
bb37a046baa47e074d4f7a8903d0fd4e8509e8cd 26-Feb-2008 Lauro Ramos Venancio <lauro.venancio@gmail.com> Convert x86 target specific inline asm constraints to LLVM.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
a5694b8b0096215137bf1c273764ec93ac4898fd 26-Feb-2008 Lauro Ramos Venancio <lauro.venancio@gmail.com> Convert x86 target specific inline asm constraints to LLVM.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
ef0007f55dd270b4db49b38d27e525ec3bcb9137 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Added lazy "symbolication" of parameter variables and global variables.
Added recording of divide-by-zero and divide-by-uninitialized nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SymbolManager.h
d763eb91aab5bdecd11825fadb35d6d8cc905f63 26-Feb-2008 Ted Kremenek <kremenek@apple.com> Added lazy "symbolication" of parameter variables and global variables.
Added recording of divide-by-zero and divide-by-uninitialized nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47586 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/SymbolManager.h
a7447ba9898d5534c9a9ce63784cdbeb30aa366d 26-Feb-2008 Chris Lattner <sabre@nondot.org> add parsing, ast building and pretty printing support for C++ throw expressions.
Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
50dd289f45738ed22b7583d52ed2525b927042ff 26-Feb-2008 Chris Lattner <sabre@nondot.org> add parsing, ast building and pretty printing support for C++ throw expressions.
Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
467d9d2f39f56ac637167c9cc4c2d91addfb084d 26-Feb-2008 Chris Lattner <sabre@nondot.org> fix const correctness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b22ef6feb04e6c960f2bfe7bb9ffa8d2ebb4fa14 26-Feb-2008 Chris Lattner <sabre@nondot.org> fix const correctness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
61fff7dfad1a2d2272c3e07962b3c7aa8bc5103d 25-Feb-2008 Ted Kremenek <kremenek@apple.com> doxygenify some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2de4a9b1d6186f83d98975e02daeb71bd9605440 25-Feb-2008 Ted Kremenek <kremenek@apple.com> doxygenify some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
43b885f70c4b4a2813c020e18415ebd052caabb8 25-Feb-2008 Chris Lattner <sabre@nondot.org> convert tabs to spaces, patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
c81c8144a661a49d7b9dae8d2080dee2e43186ec 25-Feb-2008 Chris Lattner <sabre@nondot.org> convert tabs to spaces, patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
d25c7e78c3cc631cb45c0f8dca0d9bfaaae8e921 25-Feb-2008 Lauro Ramos Venancio <lauro.venancio@gmail.com> Fix PR2086.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MultipleIncludeOpt.h
0184cc719f06d2c5da6ae0725847ef875c6128cd 25-Feb-2008 Lauro Ramos Venancio <lauro.venancio@gmail.com> Fix PR2086.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MultipleIncludeOpt.h
6ff5f7f19960f8de836ef264fe85b24ba00e204a 25-Feb-2008 Ted Kremenek <kremenek@apple.com> Added transfer function support for checking for divide-by-zero errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
07d83aa220567bef263ef76cfc9b0159320bb640 25-Feb-2008 Ted Kremenek <kremenek@apple.com> Added transfer function support for checking for divide-by-zero errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
0297c76e5752f99540cdf3d06dc755088142db6b 25-Feb-2008 Chris Lattner <sabre@nondot.org> enable digraphs for C94, thanks to Neil for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
3426b9bdc236df389f3aa00b56bf9154659511f2 25-Feb-2008 Chris Lattner <sabre@nondot.org> enable digraphs for C94, thanks to Neil for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
91cdf9f40847cec1bee7981833bd23bec7fa932c 24-Feb-2008 Chris Lattner <sabre@nondot.org> Update comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
edf9c7f1bc0cb329df87ca3388fce8b6234f0359 24-Feb-2008 Chris Lattner <sabre@nondot.org> Update comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
dbd96b23eae3784172d91cfb086abb8ca732f92e 24-Feb-2008 Ted Kremenek <kremenek@apple.com> Two more Windows-related fixes:

- More enum signeness bitfield fixes (MSVC treats enums as signed).

- Fixed in Lex/HeaderSearch.cpp an unsafe copy between two
HeaderSearch::PerFileInfo entries in a common vector. The copy involved two
calls to getFileInfo() within the assignment; these calls could have
side-effects that enlarged the internal vector, and with MSVC this would
invalidate one of the values in the assignment.

Patch by Argiris Kirtzidis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Type.h
lang/Basic/IdentifierTable.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Parse/DeclSpec.h
ca63fa00786e51c207c829f4182f11a6c6b552be 24-Feb-2008 Ted Kremenek <kremenek@apple.com> Two more Windows-related fixes:

- More enum signeness bitfield fixes (MSVC treats enums as signed).

- Fixed in Lex/HeaderSearch.cpp an unsafe copy between two
HeaderSearch::PerFileInfo entries in a common vector. The copy involved two
calls to getFileInfo() within the assignment; these calls could have
side-effects that enlarged the internal vector, and with MSVC this would
invalidate one of the values in the assignment.

Patch by Argiris Kirtzidis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Type.h
lang/Basic/IdentifierTable.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Parse/DeclSpec.h
c692520545ef3c9ecae8f1c5e17c12ca28e074c5 24-Feb-2008 Ted Kremenek <kremenek@apple.com> In FileManager: use full paths to unique files and directories on Windows,
since inodes are bogus abstraction on that platform.

Patch by Argiris Kirtzidis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
6bb816a3b895e9c983d89b22d510dca58a0eb75e 24-Feb-2008 Ted Kremenek <kremenek@apple.com> In FileManager: use full paths to unique files and directories on Windows,
since inodes are bogus abstraction on that platform.

Patch by Argiris Kirtzidis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
d938a896228445480990577df0d2b47273443eb0 23-Feb-2008 Ted Kremenek <kremenek@apple.com> Change encoding of TokenKind in IdentifierTable to be of type "unsigned"
instead of TokenKind because of signedness issues with MSVC and enums.

Patch from Argiris Kirtzidis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/Token.h
8e748ab52395328f2905855b295a22e33dc800b2 23-Feb-2008 Ted Kremenek <kremenek@apple.com> Change encoding of TokenKind in IdentifierTable to be of type "unsigned"
instead of TokenKind because of signedness issues with MSVC and enums.

Patch from Argiris Kirtzidis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Lex/Token.h
38706196dce13df25ff6a1b3891d9724b1710f06 22-Feb-2008 Ted Kremenek <kremenek@apple.com> Added "assumption" logic for lval::FuncVal and lval::GotoLabel, and simplified
assumption logic for lval::DeclVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
dc3936b0557ce7377905b387d3c69bc8fa484b9c 22-Feb-2008 Ted Kremenek <kremenek@apple.com> Added "assumption" logic for lval::FuncVal and lval::GotoLabel, and simplified
assumption logic for lval::DeclVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47466 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
08cd370a26313462fc11fd8596782f8fc4c06585 21-Feb-2008 Ted Kremenek <kremenek@apple.com> Regression fix: Handle binary operators where both the left and right
operands are symbolic lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
10c16657eec144def180ee53d1e0249c9ed2b3b5 21-Feb-2008 Ted Kremenek <kremenek@apple.com> Regression fix: Handle binary operators where both the left and right
operands are symbolic lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
754d3fcd1db30ab9db9f03db80b81ff887e79eef 21-Feb-2008 Nate Begeman <natebegeman@mac.com> Handle __attribute__((annotate("string")))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
c398f0b5efb2f8ba39cd5b0170cf697f714afbcb 21-Feb-2008 Nate Begeman <natebegeman@mac.com> Handle __attribute__((annotate("string")))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47451 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
lang/Parse/AttributeList.h
3087ac2c41bb5b8b8894801addc938e595b51ed4 21-Feb-2008 Ted Kremenek <kremenek@apple.com> RemoveDeadBindings should now check for UninitalizedVal, as it is a now
an error to cast it to LVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
c3055ab39ac3535ffd581d33e21b72133099a6eb 21-Feb-2008 Ted Kremenek <kremenek@apple.com> RemoveDeadBindings should now check for UninitalizedVal, as it is a now
an error to cast it to LVal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
9cfda3fdcb1214c67a84c8b26a327c428d7d8b9f 21-Feb-2008 Ted Kremenek <kremenek@apple.com> Simplified and generalized transfer function logic for casts, allowing
the transfer function to be invoked without an Expr* for the Cast operation.

Added implicit promotions to the transfer function logic for compound
assignments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
9ef1ec98a8fc17e7560e07641184bc4daee39b46 21-Feb-2008 Ted Kremenek <kremenek@apple.com> Simplified and generalized transfer function logic for casts, allowing
the transfer function to be invoked without an Expr* for the Cast operation.

Added implicit promotions to the transfer function logic for compound
assignments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
07baa25305b8021347bd6010ce193b3397717d9a 21-Feb-2008 Ted Kremenek <kremenek@apple.com> Major cleanup of path-sensitive analysis engine and the current analysis
based on constant. prop. and limited symbolics.

- Renamed class: RValue -> RVal, LValue -> LVal, etc.
- Minor method renamings and interface cleanups.
- Tightened the RVal "type system" so that UninitializedVal and UnknownVal
cannot be cast to LVal or NonLVal. This forces these corner cases values
to be explicitly handled early before being dispatched to plug-in transfer
function logic.
- Major cleanup in the transfer function logic for binary and unary operators.
Still fixing some regressions, but we now explicitly handle Uninitialized
and Unknown values in a more rigorous way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
aa1c4e5a6b87b62d991c55a0d4522bcd778068d7 21-Feb-2008 Ted Kremenek <kremenek@apple.com> Major cleanup of path-sensitive analysis engine and the current analysis
based on constant. prop. and limited symbolics.

- Renamed class: RValue -> RVal, LValue -> LVal, etc.
- Minor method renamings and interface cleanups.
- Tightened the RVal "type system" so that UninitializedVal and UnknownVal
cannot be cast to LVal or NonLVal. This forces these corner cases values
to be explicitly handled early before being dispatched to plug-in transfer
function logic.
- Major cleanup in the transfer function logic for binary and unary operators.
Still fixing some regressions, but we now explicitly handle Uninitialized
and Unknown values in a more rigorous way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47441 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
69f0193ae38db8d347b69ef27e51b4c268f91309 21-Feb-2008 Chris Lattner <sabre@nondot.org> Collect and build and process type attributes on pointers. For
example, we can now correctly build the type for things like:
_AS1 float * _AS2 *B;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
7654914fc5c6e2683d9e7358a64b3b53f368a8fc 21-Feb-2008 Chris Lattner <sabre@nondot.org> Collect and build and process type attributes on pointers. For
example, we can now correctly build the type for things like:
_AS1 float * _AS2 *B;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
9e98250ac056f5deb05a0afdad155377a7a6b11a 21-Feb-2008 Chris Lattner <sabre@nondot.org> move type attribute processing into the creatively named ProcessTypeAttributes method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
f1d705c3e2276f7f5b97b8b3394b9b3068fdf25b 21-Feb-2008 Chris Lattner <sabre@nondot.org> move type attribute processing into the creatively named ProcessTypeAttributes method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
49d15cb040bdae6a8697ddeb281847edb0e689ef 21-Feb-2008 Chris Lattner <sabre@nondot.org> Correctly handle address space qualifiers in declspecs. This
allows us to correctly handle stuff like:

_AS1 float *B;

and to reject stuff like:

_AS1 _AS2* x;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
74788ba1dc1dd836edd1956c1a4b071b2bb71574 21-Feb-2008 Chris Lattner <sabre@nondot.org> Correctly handle address space qualifiers in declspecs. This
allows us to correctly handle stuff like:

_AS1 float *B;

and to reject stuff like:

_AS1 _AS2* x;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
9384f50a52e5db0610b88da495898d28006141c5 21-Feb-2008 Chris Lattner <sabre@nondot.org> rename some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
2070d809d208ae17fe81dfe6fad445e7bd8e3283 21-Feb-2008 Chris Lattner <sabre@nondot.org> rename some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
d243eb4ab264d2c2144b27bad7845f738a7c0301 21-Feb-2008 Chris Lattner <sabre@nondot.org> add a method to AttributeList that converts an identifier to an enum.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
2335191341a58fa3f8abea3c9b391c5bb03d67b3 21-Feb-2008 Chris Lattner <sabre@nondot.org> add a method to AttributeList that converts an identifier to an enum.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
d496fb9f073b0169f367b5f87ffd74985b1ba9bf 20-Feb-2008 Chris Lattner <sabre@nondot.org> add some code that will be used to remove processed attrs from
declspec, it is currently nonfunctional though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
38d8b98803ac354dba15578d65ea99a83dead046 20-Feb-2008 Chris Lattner <sabre@nondot.org> add some code that will be used to remove processed attrs from
declspec, it is currently nonfunctional though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47405 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/AttributeList.h
35fef52886c88e3855745917fcb0bf6a19fa0ba1 20-Feb-2008 Chris Lattner <sabre@nondot.org> Alternate address spaces work:

rename QualType::getQualifiers to getCVRQualifiers.
Add some fixme's and clean up some code relevant to qualifiers.
Change ASQualType to contain a Type* instead of a QualType.
Any CVR qualifiers should be on the outer qual type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
f46699ce225811d8d9dbab9d00189a0e54469457 20-Feb-2008 Chris Lattner <sabre@nondot.org> Alternate address spaces work:

rename QualType::getQualifiers to getCVRQualifiers.
Add some fixme's and clean up some code relevant to qualifiers.
Change ASQualType to contain a Type* instead of a QualType.
Any CVR qualifiers should be on the outer qual type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47398 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
0cd9635bb3b4b52f69d8375c88f49747a410a71a 20-Feb-2008 Ted Kremenek <kremenek@apple.com> Implemented transfer function logic for unary '+'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
90e420321f60860f4c4e7a68ca9f7567824b46ec 20-Feb-2008 Ted Kremenek <kremenek@apple.com> Implemented transfer function logic for unary '+'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
b996ebcb6f8d3bf4354e83994a5ebea14c971fa7 20-Feb-2008 Ted Kremenek <kremenek@apple.com> Placed transfer function logic for dereferences in its own method, while at
the same time clearing up some logic of how the unary '*' operator is processed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
d8e9f0dc737133d4e8342f39389064620f5a7f8f 20-Feb-2008 Ted Kremenek <kremenek@apple.com> Placed transfer function logic for dereferences in its own method, while at
the same time clearing up some logic of how the unary '*' operator is processed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47356 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
9d4895cead5a9a0d88e1a9720483e2febe4ccb97 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Added special handling for UninitializedVals for the transfer function logic
for pointer dereferences.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b5339121f63f2754d4f26e8f3a092caf9f7d9290 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Added special handling for UninitializedVals for the transfer function logic
for pointer dereferences.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47340 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
962af8b169ab3ee296d30bff2dcdccbbab28a756 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Implemented "getType()" for symbolic values representing the "contents" of
another symbolic value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
a888c98b424b0232c45ae61d13b073bf81eaa859 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Implemented "getType()" for symbolic values representing the "contents" of
another symbolic value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SymbolManager.h
319ef15b2cb4cce30739106157bbbd28c7cbd067 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Fixed bug classof() bug with RValues that could cause an UninitializedVal
or UnknownVal to be interpreted as an actual NonLValue/LValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
e6ea2d572d8e09670c8d143e58380bf8145b123d 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Fixed bug classof() bug with RValues that could cause an UninitializedVal
or UnknownVal to be interpreted as an actual NonLValue/LValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47304 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
d9268e3948b2274780ed1d230ca01d599b73aded 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate transfer function support for CallExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
de43424560f1a744de6214dab6bbee28ad8437f5 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate transfer function support for CallExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/RValues.h
bf988d01ec6dfdee28cdf983ce199a28485591b3 19-Feb-2008 Ted Kremenek <kremenek@apple.com> --grsimple now reports the number of nodes in the ExplodedGraph for
an analyzed function.

GRExprEngine now records stores to "uninitialized lvalues" (which are sinks in
the ExplodedGraph).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/GRExprEngine.h
9dca062461a6244cf0f733346657fa3eee853f9b 19-Feb-2008 Ted Kremenek <kremenek@apple.com> --grsimple now reports the number of nodes in the ExplodedGraph for
an analyzed function.

GRExprEngine now records stores to "uninitialized lvalues" (which are sinks in
the ExplodedGraph).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/GRExprEngine.h
7f5efbbbab5f19a98ae36122881f5e5a72a9e544 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Added "size()" and "empty()" methods to ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
39b4c6c98d391b25c376782cf92346aa88c96f7e 19-Feb-2008 Ted Kremenek <kremenek@apple.com> Added "size()" and "empty()" methods to ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
bc965a603a67c59d49fad2ea0d4d2eef2e5c52ad 18-Feb-2008 Ted Kremenek <kremenek@apple.com> Added more assertions and checks in transfer function logic to check for
UninitializedVals and UnknownVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
692416c214a3b234236dedcf875735a9cc29e90b 18-Feb-2008 Ted Kremenek <kremenek@apple.com> Added more assertions and checks in transfer function logic to check for
UninitializedVals and UnknownVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47288 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
7dce029af034c8a9794ea55590f05aac159422ae 16-Feb-2008 Anders Carlsson <andersca@mac.com> Better handling of the aligned attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
042c4e7e9f0b54104f4f2e098c028aa8247b6bed 16-Feb-2008 Anders Carlsson <andersca@mac.com> Better handling of the aligned attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47216 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/Basic/DiagnosticKinds.def
8d2b2b7adf81184ea632dafa42caa94294d6a9c7 16-Feb-2008 Anders Carlsson <andersca@mac.com> Make sizeof and __alignof work correctly with packed structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6a24acbb3dbb3bea9426716bee6ad6023ad15f3f 16-Feb-2008 Anders Carlsson <andersca@mac.com> Make sizeof and __alignof work correctly with packed structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47202 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
94e915e640e0d8092410fe3c9cbfa48af6568466 16-Feb-2008 Ted Kremenek <kremenek@apple.com> Further cleanup. Moved definitions for SymbolManager and ValueManager into
their own [.cpp;.h] files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/StateVariant.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
d70d0b05e5143be9e952eceb5aad7914b2ecab97 16-Feb-2008 Ted Kremenek <kremenek@apple.com> Further cleanup. Moved definitions for SymbolManager and ValueManager into
their own [.cpp;.h] files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
lang/Analysis/PathSensitive/StateVariant.h
lang/Analysis/PathSensitive/SymbolManager.h
lang/Analysis/PathSensitive/ValueManager.h
136cdc36af5ac4c9c98930b111f3a3a7c756a0d6 16-Feb-2008 Anders Carlsson <andersca@mac.com> Handle packed attribute correctly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ad148069328e73c839c9284f70635cbc0d366bf8 16-Feb-2008 Anders Carlsson <andersca@mac.com> Handle packed attribute correctly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47197 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5cf4d81c323fe4b16ea517a70fad62a95440f194 16-Feb-2008 Anders Carlsson <andersca@mac.com> Address comments from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
baa66fc389ca0a9f11e0c864304bcfd89de39439 16-Feb-2008 Anders Carlsson <andersca@mac.com> Address comments from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47195 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
e6da55e20f225677fb3cf1e59d8552db201c1a17 16-Feb-2008 Anders Carlsson <andersca@mac.com> Store attributes in a global hash map instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
adf21bdb3d17acfdb74657fcbc5035a404c6c8f4 16-Feb-2008 Anders Carlsson <andersca@mac.com> Store attributes in a global hash map instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47193 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
484eb5f5dcfd2620539e2fa89955d277da9d8c46 16-Feb-2008 Anders Carlsson <andersca@mac.com> Store attributes in a global hash map instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
b0dd26825e58a5f2982fd6d4ffa4c4ae6e24ff17 16-Feb-2008 Anders Carlsson <andersca@mac.com> Store attributes in a global hash map instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
521d97270ea22580264212433c9036dd6f1af029 16-Feb-2008 Ted Kremenek <kremenek@apple.com> Refactored code for transfer functions for binary operators involving two LValues.

Fixed bug in transfer functions for sizeof(*); we were incorrectly evaluating to
a value of the wrong type.

Fixed bug in transfer functions for compound assignments where we did not properly
handle assignments involving dereferences of symbolic values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
c6fbdcdb3b84d8a6bffa59b0848a8f53cf0bd11a 16-Feb-2008 Ted Kremenek <kremenek@apple.com> Refactored code for transfer functions for binary operators involving two LValues.

Fixed bug in transfer functions for sizeof(*); we were incorrectly evaluating to
a value of the wrong type.

Fixed bug in transfer functions for compound assignments where we did not properly
handle assignments involving dereferences of symbolic values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47190 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
22640cead67382ee76dfef913c4ecfcd8990ab73 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Simplified transfer function logic for ++/-- operators.
Added more boilerplate transfer function support for pointer arithmetic.
Added more pretty-printing support for symbolic constraints.
Added transfer function support for handling enum values.
Minor pointer types cleanup in ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
50d0ac299c641bee9024f3fbae2ea0640898a040 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Simplified transfer function logic for ++/-- operators.
Added more boilerplate transfer function support for pointer arithmetic.
Added more pretty-printing support for symbolic constraints.
Added transfer function support for handling enum values.
Minor pointer types cleanup in ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47183 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
851392614b02103894cb132000527e9d168df22e 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added predicate function "UnaryOperator::isIncrementOp()".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5d826b82936beb2c32dd02460332ba8035192c65 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added predicate function "UnaryOperator::isIncrementOp()".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47181 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8ff077864feed2c2b75424d37724f60e56d5a597 15-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Split out incomplete arrays from VariableArrayType into
IncompleteArrayType. This should make code dealing with both incomplete
and variable length arrays much more readable, plus it allows properly
making the distinction between isVariableArrayType() and
isVariablyModifiedType(). The patch is a little big, but it's
strightforward. so I don't think there should be any issues.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c5773c4b8ce1ed6ed5c7112c9020c954a47dce96 15-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Split out incomplete arrays from VariableArrayType into
IncompleteArrayType. This should make code dealing with both incomplete
and variable length arrays much more readable, plus it allows properly
making the distinction between isVariableArrayType() and
isVariablyModifiedType(). The patch is a little big, but it's
strightforward. so I don't think there should be any issues.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47165 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
d717b22edd21a3c9e226bc804b33aa5713d79d31 15-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR2041: restrict is not a keyword in c90.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
3e5849ecfc02e362beb195d35100f868b1699176 15-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR2041: restrict is not a keyword in c90.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47160 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
62f67fd7f670f1a8b222c6565b257c05e8e80fae 15-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Remove useless parameter from isConstantSizeType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3c2b3170041f69a92904e3bab9b6d654eaf260ac 15-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Remove useless parameter from isConstantSizeType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3f70c54223bb78cfdb6699dc296c3467c86e3b04 15-Feb-2008 Anders Carlsson <andersca@mac.com> Get rid of AttributeList in the AST and use the new Attr class instead

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
f78915fa196b3d284ad756f65eecadaefef71eef 15-Feb-2008 Anders Carlsson <andersca@mac.com> Get rid of AttributeList in the AST and use the new Attr class instead

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
lang/AST/Decl.h
775e0d81349c97209eaca9cd0079dae346e95c81 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate transfer function support for pointer arithmetic operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
b640b3b5dfccaf259967cb2cb6755c9aa20d4423 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate transfer function support for pointer arithmetic operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47147 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
lang/Analysis/PathSensitive/GRTransferFuncs.h
1da5b146c90221aeb387f8ef7e5f65d8ad7e8ca9 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added --grsimple-view option to clang driver; this is the same as
--grsimple except that it visualizes the ExplodedGraph using dot and
outputs the current function being analyzed. --grsimple is now silent
except when it emits diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
d55fe520e79960afa796bda53cb4273fb1be4811 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added --grsimple-view option to clang driver; this is the same as
--grsimple except that it visualizes the ExplodedGraph using dot and
outputs the current function being analyzed. --grsimple is now silent
except when it emits diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRSimpleVals.h
0e39dcf9939c48d2568f17ec31de397b4c5bd57d 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added "symbol iterators" for RValues, allowing easy iteration over the symbols
referenced by an RValue, instead of having to query the type of the RValue.

Modified ValueState::RemoveDeadBindings to also prune dead symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
90e1481ef15ec75e3503e0c6e5effad5bd639f01 15-Feb-2008 Ted Kremenek <kremenek@apple.com> Added "symbol iterators" for RValues, allowing easy iteration over the symbols
referenced by an RValue, instead of having to query the type of the RValue.

Modified ValueState::RemoveDeadBindings to also prune dead symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47142 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
3862eb1450ba3995c5ebc0f7bfc7acd3c8d95f73 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed GRConstants => GRSimpleVals.
Moved driver logic for --grsimple to GRSimpleVals.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/GRExprEngine.h
e01c98767dfd7153c3c84637c36659e3bbe16ff7 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed GRConstants => GRSimpleVals.
Moved driver logic for --grsimple to GRSimpleVals.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Analysis/Analyses/GRSimpleVals.h
lang/Analysis/PathSensitive/GRExprEngine.h
d446743981dce050bbe003ff92d8f6a5b40407c3 14-Feb-2008 Ted Kremenek <kremenek@apple.com> #include cleanups in GRExprEngine.cpp/GRExprEngine.h. Moved GRExprEngine to
clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b387a3f23e423d62c053be86294b703da1d1a222 14-Feb-2008 Ted Kremenek <kremenek@apple.com> #include cleanups in GRExprEngine.cpp/GRExprEngine.h. Moved GRExprEngine to
clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
50df4f4c829e61dd7cef79179158a2eedf123181 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Partitioned definition/implementation of GRExperEngine into .h and .cpp.
Still some cleanup to do, but this initial checkin compiles and runs correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
77349cb20bfd7069d081f84c91975bfa8ef60a32 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Partitioned definition/implementation of GRExperEngine into .h and .cpp.
Still some cleanup to do, but this initial checkin compiles and runs correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRExprEngine.h
b193413054de04eedc7db27cbfb9b9e0a190f0c8 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Migrated transfer functions for binary operators for simple value tracking
from RValues to GRTransferFuncs/GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
6cb0b541fee2cac9b242b1666cecc464feaabaf5 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Migrated transfer functions for binary operators for simple value tracking
from RValues to GRTransferFuncs/GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
c9922fd8c6ef9e65b4a952926bc775d1fa74a43b 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Migrated transfer functions for unary "~" and "-" to GRTransferFuncs/GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
c3f261de2d3a48d412ec4a9ce44b3b4a3982dddb 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Migrated transfer functions for unary "~" and "-" to GRTransferFuncs/GRSimpleVals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
25a484d696f19b4d8cf104c06ec0f0df79379a5a 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Started partitioning of transfer function logic (and thus the policy behind
these operations) into GRTransferFuncs and its subclasses. Originally all
of this logic was handled by the class RValue, but in reality different
analyses will want more flexibility on how they evaluate different values.

Transfer functions migrated so far: "Cast"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
d59cccc0b6cd4485897526699fe98514805c1883 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Started partitioning of transfer function logic (and thus the policy behind
these operations) into GRTransferFuncs and its subclasses. Originally all
of this logic was handled by the class RValue, but in reality different
analyses will want more flexibility on how they evaluate different values.

Transfer functions migrated so far: "Cast"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47125 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRTransferFuncs.h
lang/Analysis/PathSensitive/RValues.h
5a535ba2448a4e07c7d988f245bdd1390c045961 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
cc409b764e12ff81d422bc4317e0b7552cf10011 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Moved Rvalues.h from "Analysis/" to "include/clang/Analysis/PathSensitive".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47123 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/RValues.h
cee3de855472f38a1014945d070f9a1c44b44229 14-Feb-2008 Anders Carlsson <andersca@mac.com> Address comments from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
81226601148d7e7c187b96c6ef86e83df204f59f 14-Feb-2008 Anders Carlsson <andersca@mac.com> Address comments from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47118 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
3c0e34853256d096b794944bea52853d3a711ab7 14-Feb-2008 Anders Carlsson <andersca@mac.com> Add Attr.h which is an AST-level class for GCC attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
d429cd459aef723fa0e7a44ac957d4c2256e241c 14-Feb-2008 Anders Carlsson <andersca@mac.com> Add Attr.h which is an AST-level class for GCC attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47112 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Attr.h
91cf86e759e34bd597d13921e05fe1049f3a0b0e 14-Feb-2008 Steve Naroff <snaroff@apple.com> Remove DeclSpec::Invalid, a recently added bool that allowed the parser to detect if the decl spec was invalid.

For now, we will stick with the original strategy - clients of Parse::ParseDeclarationSpecifiers() should never have to know this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
96715ae0c6a88d6f40cdd6e1164a1308a15874ea 14-Feb-2008 Steve Naroff <snaroff@apple.com> Remove DeclSpec::Invalid, a recently added bool that allowed the parser to detect if the decl spec was invalid.

For now, we will stick with the original strategy - clients of Parse::ParseDeclarationSpecifiers() should never have to know this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
8329885b8af3c6556a05c2e49a79bb548c8d7962 14-Feb-2008 Steve Naroff <snaroff@apple.com> A much better fix for http://llvm.org/bugs/show_bug.cgi?id=1987.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e39bfd0c52975dfb038413aa55147df2fc709ce2 14-Feb-2008 Steve Naroff <snaroff@apple.com> A much better fix for http://llvm.org/bugs/show_bug.cgi?id=1987.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
aee121c53a4c9a85548c89286f4eeb3aa0397152 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Added support to GRCoreEngine/GRExprEngine for processing control-flow
from switch...case...default statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
daeb9a7376830d637e02b5bc51faf4750a7bce70 14-Feb-2008 Ted Kremenek <kremenek@apple.com> Added support to GRCoreEngine/GRExprEngine for processing control-flow
from switch...case...default statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47100 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRCoreEngine.h
8f348096ef79c6b09da9e48b76becaa53e935665 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed files to match class renaming in r47070:

http://llvm.org/viewvc/llvm-project?rev=47070&view=rev


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GREngine.h
a82799e63f42646ca878792f9f9a982510dc6e83 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed files to match class renaming in r47070:

http://llvm.org/viewvc/llvm-project?rev=47070&view=rev


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47071 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRCoreEngine.h
lang/Analysis/PathSensitive/GREngine.h
30fa28b155fbe6c3ccfc63e11c2b56dd6b6daf3a 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed class GREngine => GRCoreEngine.
Renamed class GRConstants => GRExprEngine.

This was done with a Perl script, and will result in 80 col. violations that
I will gradually fix up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
4d4dd85923ecfc9c38ac0e94fb2602e1cce4406b 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Renamed class GREngine => GRCoreEngine.
Renamed class GRConstants => GRExprEngine.

This was done with a Perl script, and will result in 80 col. violations that
I will gradually fix up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
79f63f5e144078f4e138824865947aaddd3ade98 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Simplify GRIndirectGotoNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
24f1a967741ff9f8025ee23be12ba6feacc31f77 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Simplify GRIndirectGotoNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47068 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
7a48d9c7189d7f7271d8c92aa51a63c79ee4c0cc 13-Feb-2008 Chris Lattner <sabre@nondot.org> Move IgnoreParenCasts to be a method on Expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
56f349400c5932a196509c0480ff6f99a9a0b48f 13-Feb-2008 Chris Lattner <sabre@nondot.org> Move IgnoreParenCasts to be a method on Expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
677f4ef0ab9da17cd49f9ded4ed7a55ceeed24ee 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Added support to GREngine/GRConstants for handling computed gotos.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/ProgramPoint.h
754607e7cff2d902d9af8b771409449fb2f8d2bf 13-Feb-2008 Ted Kremenek <kremenek@apple.com> Added support to GREngine/GRConstants for handling computed gotos.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/ProgramPoint.h
61814ffd7455e59135e6f32b682357e8c1c1ef8a 12-Feb-2008 Ted Kremenek <kremenek@apple.com> Fixed misspelling in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6083ea3723ec3996ae3bdf8d1b352b0c3b3922c8 12-Feb-2008 Ted Kremenek <kremenek@apple.com> Fixed misspelling in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
9dd8a70fc9e35488c437f200adc4d3f0bd574205 12-Feb-2008 Ted Kremenek <kremenek@apple.com> Moved class declaration for ObjCForCollectionStmt to be co-located with
the class declarations for the other ObjC***Stmt classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
78492dae00fb85e0da0f966df4745edafdafb66c 12-Feb-2008 Ted Kremenek <kremenek@apple.com> Moved class declaration for ObjCForCollectionStmt to be co-located with
the class declarations for the other ObjC***Stmt classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47013 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
4b170e59391e6cd89a1de3ea328399f3f50ac9de 12-Feb-2008 Ted Kremenek <kremenek@apple.com> Added GRBlockCounter class, which tracks the number of times blocks
have been visited in a path. Added GRBlockCounter as an item to be
enqueued to the worklist.

Modified "ProcessBranch" in GRConstants to prune branches with symbolic
conditions that have been already taken.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
8e49dd6e7e73b275a74338a5127a524f0765303c 12-Feb-2008 Ted Kremenek <kremenek@apple.com> Added GRBlockCounter class, which tracks the number of times blocks
have been visited in a path. Added GRBlockCounter as an item to be
enqueued to the worklist.

Modified "ProcessBranch" in GRConstants to prune branches with symbolic
conditions that have been already taken.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GRBlockCounter.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
fdd35d727f251c4d314521645534d80b38cf6ba3 12-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Add wchar_t type to ASTContext. Will be needed for wide strings, since
they are of type wchar_t[].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fd888a581d6d329f5b447c8ff4d37cf396315993 12-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Add wchar_t type to ASTContext. Will be needed for wide strings, since
they are of type wchar_t[].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47004 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3cd7fc3d4d63d89391a0f09978c315b86538f0a8 12-Feb-2008 Steve Naroff <snaroff@apple.com> Allow the parser to detect invalid DeclSpec's. This fixes http://llvm.org/bugs/show_bug.cgi?id=1987.

This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition().

We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
9532414c45a7114d9e94a733121655a5b5d5b473 12-Feb-2008 Steve Naroff <snaroff@apple.com> Allow the parser to detect invalid DeclSpec's. This fixes http://llvm.org/bugs/show_bug.cgi?id=1987.

This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition().

We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
6f9f95522ab5bcf07275a3bb7a3d0649b6a042be 12-Feb-2008 Steve Naroff <snaroff@apple.com> Several cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicrosoftAsmStatement().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
5f8aa696619e32bf307232841fedb704ba733b4d 12-Feb-2008 Steve Naroff <snaroff@apple.com> Several cleanups surrounding Parser::ParseAsmStatement() and Parser::FuzzyParseMicrosoftAsmStatement().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46977 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
cfe7821216b8450d4d846f554b347778b1ecb138 11-Feb-2008 Steve Naroff <snaroff@apple.com> Move Microsoft __declspec hack from the parser to the preprocessor. Since we have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
705b5b532939740344d9a65cffc82f798d9332e6 11-Feb-2008 Steve Naroff <snaroff@apple.com> Move Microsoft __declspec hack from the parser to the preprocessor. Since we have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
576df2979dd20306289699d4926f3025aa12d80a 11-Feb-2008 Steve Naroff <snaroff@apple.com> After yesterday's discussion (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType().

This commit simply changes a couple comments to reflect this decision.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
406db935610a6e4f41c151d85b623c43967ba422 11-Feb-2008 Steve Naroff <snaroff@apple.com> After yesterday's discussion (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType().

This commit simply changes a couple comments to reflect this decision.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a6dcce3fa6567d1cef5e7388a7fb06d3c7fe97fa 11-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1992 by computing the right type for string literals, which
is an array type not a pointer type. This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a7ad98ff0919d6a24ea7c46634ea29bea551c1a0 11-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1992 by computing the right type for string literals, which
is an array type not a pointer type. This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46941 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
871fd79d634934b8a7d1c61ed6ee3d1ce9a2f19d 11-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1999, by emitting a hard error only if an argument declarator is completely
missing. Otherwise, it is an implicit int case, which is valid in c90 and invalid
elsewhere, but accepted as an extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
99d724f6a31b5521ded95adf10ef7f3c62a0b18e 11-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1999, by emitting a hard error only if an argument declarator is completely
missing. Otherwise, it is an implicit int case, which is valid in c90 and invalid
elsewhere, but accepted as an extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
749d7b06fc657e6785bc4ad19a8b0eaa7cb6cfaa 09-Feb-2008 Anders Carlsson <andersca@mac.com> Behave correctly if a constraint expression is invalid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
8bd36fcb4427519f41197d88b9121e2bbe9e3fc3 09-Feb-2008 Anders Carlsson <andersca@mac.com> Behave correctly if a constraint expression is invalid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b268d2a13860f49f2ff0c20253eab52ee6b1c185 08-Feb-2008 Steve Naroff <snaroff@apple.com> A bunch-o changes to fix <rdar://problem/5716046> incomplete implementation of ObjC class warning is incomplete

As part of this fix, I made a low-level change to the text diagnostics machinery (to basically avoid printing duplicate source lines/carets when you have multiple diagnostics that refer to the same exact place). For now, this only happens with we don't have a source range (could be extended to support source ranges as well).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
efe7f36f4d87b6e64b87128a81018350b2f21987 08-Feb-2008 Steve Naroff <snaroff@apple.com> A bunch-o changes to fix <rdar://problem/5716046> incomplete implementation of ObjC class warning is incomplete

As part of this fix, I made a low-level change to the text diagnostics machinery (to basically avoid printing duplicate source lines/carets when you have multiple diagnostics that refer to the same exact place). For now, this only happens with we don't have a source range (could be extended to support source ranges as well).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6528099ff8e22a9d2e3e8d06ef84d71ac44b99b8 08-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Improve diagnostic for illegal array initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a312ce2bdaaff62f21d560bad6cb0519f613d334 08-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Improve diagnostic for illegal array initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46869 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4f7f441db1d7b7137a39219ed3e0198385831b71 08-Feb-2008 Anders Carlsson <andersca@mac.com> Put back the top-level asm code; all tests pass now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
dfab6cb59a703f2ce4d58371652ce879f4c85a09 08-Feb-2008 Anders Carlsson <andersca@mac.com> Put back the top-level asm code; all tests pass now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
f41100b0236a5561c6c72635493c2d21d66121e9 08-Feb-2008 Anders Carlsson <andersca@mac.com> Back out 46855 for now, it causes test failures on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
3f9424f3206b834b5dd0e7c403348651ab6fafbb 08-Feb-2008 Anders Carlsson <andersca@mac.com> Back out 46855 for now, it causes test failures on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
be880ece609fa70a2516558ce2131990e30c9932 08-Feb-2008 Steve Naroff <snaroff@apple.com> - Add support for fuzzy parsing line-oriented __asm's (yuck).
- Change handling of __w64 to a built-in macro.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
b746ce84fb5c3fd2c5659f84dc6f2a883b499dc2 08-Feb-2008 Steve Naroff <snaroff@apple.com> - Add support for fuzzy parsing line-oriented __asm's (yuck).
- Change handling of __w64 to a built-in macro.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
7deb29f2d1d8e062e52c5ccba9994039db6a554b 07-Feb-2008 Anders Carlsson <andersca@mac.com> Handle top-level asm declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
61900f0ef4fc705e62609939f30a375a9576e43d 07-Feb-2008 Anders Carlsson <andersca@mac.com> Handle top-level asm declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46855 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
f9bba1315276a41b65f42a9ffcece0bf583eaffe 07-Feb-2008 Steve Naroff <snaroff@apple.com> Minor cleanup from yesterday's -fms-extension commit. Move __int* MS keywords to predefined macros. This removes some of the MS-madness from Parser::ParseDeclarationSpecifiers().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
419154d6d8e80ff2083dd039095781a0eb99444f 07-Feb-2008 Steve Naroff <snaroff@apple.com> Minor cleanup from yesterday's -fms-extension commit. Move __int* MS keywords to predefined macros. This removes some of the MS-madness from Parser::ParseDeclarationSpecifiers().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46852 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
e086636e93be8a146df429076e4258b3303b0532 07-Feb-2008 Ted Kremenek <kremenek@apple.com> Added proof-of-concept NULL pointer diagnostics to GRConstants.
Modified the driver to pass the Diagnostic object to GRConstants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Basic/DiagnosticKinds.def
19227e32af1f903541214ef24f693688e67c58d6 07-Feb-2008 Ted Kremenek <kremenek@apple.com> Added proof-of-concept NULL pointer diagnostics to GRConstants.
Modified the driver to pass the Diagnostic object to GRConstants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Basic/DiagnosticKinds.def
64b32ecc7a2d768b96d2f6d98d247bd7c3f01b4d 07-Feb-2008 Chris Lattner <sabre@nondot.org> Implement support for the extremely atrocious MS /##/ extension,
which pastes together a comment. This is only enabled with
-fms-extensions of course.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
3f1cc838f9caf469990f23fccd0940263c0c61ff 07-Feb-2008 Chris Lattner <sabre@nondot.org> Implement support for the extremely atrocious MS /##/ extension,
which pastes together a comment. This is only enabled with
-fms-extensions of course.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
10cccdc0b10d6416e00073dc1ada3bff6471ae44 07-Feb-2008 Chris Lattner <sabre@nondot.org> these aren't tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
18354de8c0e408a9a07cac75af2105d36587bc57 07-Feb-2008 Chris Lattner <sabre@nondot.org> these aren't tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46844 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
73a07035d0559b5d02f3bac9eec5a4f763639a40 07-Feb-2008 Steve Naroff <snaroff@apple.com> Implement -fms-extensions. This allows us to fuzzy parse non-standard MS constructs used in "windows.h".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
d62701bc5321049353017e9abf1963edd57646aa 07-Feb-2008 Steve Naroff <snaroff@apple.com> Implement -fms-extensions. This allows us to fuzzy parse non-standard MS constructs used in "windows.h".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
76b4983f4c80a8f51c57bc29dd2368353cdf4743 06-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Make sure to propagate qualifiers through the member operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
510190777c4bd53e960eea4665b204778fec1b64 06-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Make sure to propagate qualifiers through the member operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6b806042bb9da382ec2d0f8ae42cc17f967fb52d 06-Feb-2008 Chris Lattner <sabre@nondot.org> explicitly document that return statement argument does not necessarily follow the result type of the function. Add testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
c8edf6bd5f76bf50411d037c83d36847edfa68f0 06-Feb-2008 Chris Lattner <sabre@nondot.org> explicitly document that return statement argument does not necessarily follow the result type of the function. Add testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
f5e9db0e0fa71929155ec088996f7ee29eee8f9f 06-Feb-2008 Chris Lattner <sabre@nondot.org> move the codegen ASTConsumer out of the driver into libcodegen,
eliminating a bunch of forwarding methods and generally
simplifying things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
8ee3c0340ff10f0d98e2e138813ada3b36239038 06-Feb-2008 Chris Lattner <sabre@nondot.org> move the codegen ASTConsumer out of the driver into libcodegen,
eliminating a bunch of forwarding methods and generally
simplifying things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
a8c2d59f71f037e273a9b7e351aa3352a5ae3a73 06-Feb-2008 Chris Lattner <sabre@nondot.org> pass the astconsumer into Sema's ctor, clean up some stuff in
Sema::ActOnTranslationUnitScope. The various ObjC pieces at the top
of Sema.cpp should be moved into SemaObjC or something.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
2ae34ed8caf90ca4044feca07811561053c08666 06-Feb-2008 Chris Lattner <sabre@nondot.org> pass the astconsumer into Sema's ctor, clean up some stuff in
Sema::ActOnTranslationUnitScope. The various ObjC pieces at the top
of Sema.cpp should be moved into SemaObjC or something.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
0bed6ecb468e91a14a6062ac6934eb3f2e8163a5 06-Feb-2008 Chris Lattner <sabre@nondot.org> rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ASTStreamer.h
lang/Sema/ParseAST.h
e91c134d8fee0179d4e88235fe3ac721bb467cd8 06-Feb-2008 Chris Lattner <sabre@nondot.org> rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ASTStreamer.h
lang/Sema/ParseAST.h
de6a9c48c246c04625d9cdca499f2d089c7fb55a 06-Feb-2008 Anders Carlsson <andersca@mac.com> Handle simple asm statements correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
dfab34a696d1dba8622248c31aaf605906cb6109 06-Feb-2008 Anders Carlsson <andersca@mac.com> Handle simple asm statements correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
c949a46e9184ae4e3c2eade3665af9623e068dc7 05-Feb-2008 Steve Naroff <snaroff@apple.com> Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword statements/expressions.

This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
64515f31850024a263e8f55f81e9ea4b39925cfa 05-Feb-2008 Steve Naroff <snaroff@apple.com> Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword statements/expressions.

This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0a3324940837ae34bc166f89f4d23c82c4dd049a 05-Feb-2008 Anders Carlsson <andersca@mac.com> Use correct flag value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
ef09d2b70a3b6f04c5d31c4c2bab2b7849f22561 05-Feb-2008 Anders Carlsson <andersca@mac.com> Use correct flag value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
1b22f8b1cea81aa432ca8bf57ac2ec3b402f53c0 05-Feb-2008 Chris Lattner <sabre@nondot.org> rewrite some of the type refinement code to eliminate dangling pointers
simplify the code and generally make it more robust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
d86e6bc7ab4388a578daf46e7c76be9122a25072 05-Feb-2008 Chris Lattner <sabre@nondot.org> rewrite some of the type refinement code to eliminate dangling pointers
simplify the code and generally make it more robust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
5ff8c2c80586688a8062a32f6a0c1520bb478500 05-Feb-2008 Ted Kremenek <kremenek@apple.com> ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
768ad16a4ab79fbc52f6f3bdc9362fd4e1d51d53 05-Feb-2008 Ted Kremenek <kremenek@apple.com> ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46740 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
1f0eb99f0a4ebf826b3d7a3079efd84d23d8eef7 05-Feb-2008 Ted Kremenek <kremenek@apple.com> Implemented initial transfer function support for '&&', '||', '?', and
__builtin_choose.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
f233d48cfc513b045e2c2cfca5c175220fbd0a82 05-Feb-2008 Ted Kremenek <kremenek@apple.com> Implemented initial transfer function support for '&&', '||', '?', and
__builtin_choose.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46731 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
2a72bb32dfda134cb2bab50f5bb4a6b214f84348 04-Feb-2008 Christopher Lamb <christopher.lamb@gmail.com> Add experimental support for address space qualified types. Address space
qualifiers use the __attribute__((address_space(id))) syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
ebb97e98c03f8d7034bd3748a10e35f39a95c289 04-Feb-2008 Christopher Lamb <christopher.lamb@gmail.com> Add experimental support for address space qualified types. Address space
qualifiers use the __attribute__((address_space(id))) syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46691 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
84602d71f7bedbbe0619db1c16a9f0d59f00c4b4 03-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1966 by ignoring non-error diagnostics from system headers even if they are
*mapped* onto errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
7097d9167dc6b5d6ab5ebf149b296a43939d4b36 03-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1966 by ignoring non-error diagnostics from system headers even if they are
*mapped* onto errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46686 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
dfcad7862e9f9d219f64dadad8eed0c77e80b9f9 03-Feb-2008 Chris Lattner <sabre@nondot.org> the macro start and macro end bits in source location are dead, remove them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
f8484542bbd9f3445b22fe8d240a1eac790cd8ca 03-Feb-2008 Chris Lattner <sabre@nondot.org> the macro start and macro end bits in source location are dead, remove them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
543c7c6ea0ef655d5c7391ce049e17ef1a851a92 02-Feb-2008 Steve Naroff <snaroff@apple.com> Cleanup previous patch (based on feedback from Ted).

Since this behavior is useful for most classes, we might consider adding a simple 3 method class that implements the behavior. Ted said that Boost has such a class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/HeaderSearch.h
49c1f4aa2a6c360d25d605004ec3c4affd62db77 02-Feb-2008 Steve Naroff <snaroff@apple.com> Cleanup previous patch (based on feedback from Ted).

Since this behavior is useful for most classes, we might consider adding a simple 3 method class that implements the behavior. Ted said that Boost has such a class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/HeaderSearch.h
30b6d143523cac3b728abc7e60a891bb6db9f65e 02-Feb-2008 Steve Naroff <snaroff@apple.com> Make sure SourceManager/HeaderSearch don't support default copy constructors (since they result in bad runtime behavior).

I'm sure there are other classes that might need this "guard", however I was bitten by these 2 recently (so I thought I'd fix them).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/HeaderSearch.h
27e2eb40b9adc876c05e0260d1100385c9f0e5f5 02-Feb-2008 Steve Naroff <snaroff@apple.com> Make sure SourceManager/HeaderSearch don't support default copy constructors (since they result in bad runtime behavior).

I'm sure there are other classes that might need this "guard", however I was bitten by these 2 recently (so I thought I'd fix them).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/HeaderSearch.h
232324e1ea952421e63228d58fa11f81b6418f0c 01-Feb-2008 Steve Naroff <snaroff@apple.com> Rename diagnostic to reflect it's role...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c0ff1caab20f13e99cd94e4263ba3e625e1aae92 01-Feb-2008 Steve Naroff <snaroff@apple.com> Rename diagnostic to reflect it's role...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46650 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
397c4ce5d9535c21cb52679327960fd349c25cdf 01-Feb-2008 Steve Naroff <snaroff@apple.com> Minor API cleanup...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
be4b3332c2d17c03af6d015d9e8e2cc524806e6e 01-Feb-2008 Steve Naroff <snaroff@apple.com> Minor API cleanup...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
61aa7f9fda3864fb86e1efe6c1c33259a9e4d76f 01-Feb-2008 Ted Kremenek <kremenek@apple.com> For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the next @catch)
and put the the next ObjcAtCatchStmt* as part of SubExprs. This fixes a bug with
iterating over the children of ObjcAtCatch, where the next @catch was not
properly being iterated over as a child.

Altered serialization of ObjCAtCatchStmt to reflect this new layout of
its subexpressions, and fixed an ownership issue with the next @catch not
being serialized as an owned pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ff981021554a4965943ca2d19019cea811614602 01-Feb-2008 Ted Kremenek <kremenek@apple.com> For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the next @catch)
and put the the next ObjcAtCatchStmt* as part of SubExprs. This fixes a bug with
iterating over the children of ObjcAtCatch, where the next @catch was not
properly being iterated over as a child.

Altered serialization of ObjCAtCatchStmt to reflect this new layout of
its subexpressions, and fixed an ownership issue with the next @catch not
being serialized as an owned pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
05fd1cc23a6f2407ccf10eb9b3997fadb39daeef 01-Feb-2008 Chris Lattner <sabre@nondot.org> make some diagnostics more terse, update testcases.

Fix Sema::ActOnInstanceMessage to correctly do things in terms of canonical
types, fixing bogus errors like:

NSDistantObject.m:10383:120: error: bad receiver type 'typeof((id<NSMutableCopying>)self)'
id mess = ({ id __inv__ = ((void *)0); id __mb__ = _NSMessageBuilder((id <NSMutableCopying>)self, &__inv__); (void)[(__typeof__((id <NSMutableCopying>)self))__mb__ mutableCopyWithZone:((void *)0)]; if (!objc_collecting_enabled()) object_dispose(__mb__); __inv__; });



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6e10a08fe0427ab34c463dd59d9c0997d4f72170 01-Feb-2008 Chris Lattner <sabre@nondot.org> make some diagnostics more terse, update testcases.

Fix Sema::ActOnInstanceMessage to correctly do things in terms of canonical
types, fixing bogus errors like:

NSDistantObject.m:10383:120: error: bad receiver type 'typeof((id<NSMutableCopying>)self)'
id mess = ({ id __inv__ = ((void *)0); id __mb__ = _NSMessageBuilder((id <NSMutableCopying>)self, &__inv__); (void)[(__typeof__((id <NSMutableCopying>)self))__mb__ mutableCopyWithZone:((void *)0)]; if (!objc_collecting_enabled()) object_dispose(__mb__); __inv__; });



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46633 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5f8c60921d638abb845afcdad93f59b13ed869a8 01-Feb-2008 Anders Carlsson <andersca@mac.com> Implement __builtin_huge_val.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
f7682b039609e1394f0f711de11ab3fb640289f2 01-Feb-2008 Anders Carlsson <andersca@mac.com> Implement __builtin_huge_val.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46627 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
b8a1b045231632158301b71c37eebabc828e5c53 31-Jan-2008 Chris Lattner <sabre@nondot.org> add some helper methods for removing and replacing text, this makes the
rewriter more robust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
aadaf78d65daef3ac1b45e4ad6136ce859962fe2 31-Jan-2008 Chris Lattner <sabre@nondot.org> add some helper methods for removing and replacing text, this makes the
rewriter more robust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46622 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
b154837c1300a155ae147d6b6d51530126df22c1 31-Jan-2008 Chris Lattner <sabre@nondot.org> Make rewriter::inserttext return a bool to indicate if it failed.

Add a RewriteTest::ReplaceStmt method to factor the 'checking for
rewrite failed + emitting diagnostic if so' code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
dcbc5b0b0722282a0fdd829359fe0d7e22adb882 31-Jan-2008 Chris Lattner <sabre@nondot.org> Make rewriter::inserttext return a bool to indicate if it failed.

Add a RewriteTest::ReplaceStmt method to factor the 'checking for
rewrite failed + emitting diagnostic if so' code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
e5db29f53fdc9f1fa5a535dfa6ca8e43e21e56df 31-Jan-2008 Chris Lattner <sabre@nondot.org> Fix PR1965: missing diagnostics for parameters that are missing
type specifiers. This required updating some (buggy) tests, and the
testcase was previously accidentally committed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e0e713b661ed07b7e012147344220583a91ab1bf 31-Jan-2008 Chris Lattner <sabre@nondot.org> Fix PR1965: missing diagnostics for parameters that are missing
type specifiers. This required updating some (buggy) tests, and the
testcase was previously accidentally committed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c6078c9d9f70ba6fbcc3bc0150de889e397ba7a9 31-Jan-2008 Nate Begeman <natebegeman@mac.com> Remainder of the __builtin_overload feedback


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
796ef3d4a32ce8d9e76df0d5bcab07db97883064 31-Jan-2008 Nate Begeman <natebegeman@mac.com> Remainder of the __builtin_overload feedback


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46601 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
44aec4c8f8e3a76485a9238176285413a2a548c1 31-Jan-2008 Steve Naroff <snaroff@apple.com> Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is used to support CFConstantStrings. Can be extended to support other built-in functions.

This allows the following code to compile without error...

#include <CoreFoundation/CoreFoundation.h>

#define CONST_STRING_DECL(S, V) const CFStringRef S = (const CFStringRef)__builtin___CFStringMakeConstantString(V);

CONST_STRING_DECL(kCFTimeZoneSystemTimeZoneDidChangeNotification, "kCFTimeZoneSystemTimeZoneDidChangeNotification")



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c4f8e8b645b8e0e685c089dde0674c6f29a24168 31-Jan-2008 Steve Naroff <snaroff@apple.com> Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is used to support CFConstantStrings. Can be extended to support other built-in functions.

This allows the following code to compile without error...

#include <CoreFoundation/CoreFoundation.h>

#define CONST_STRING_DECL(S, V) const CFStringRef S = (const CFStringRef)__builtin___CFStringMakeConstantString(V);

CONST_STRING_DECL(kCFTimeZoneSystemTimeZoneDidChangeNotification, "kCFTimeZoneSystemTimeZoneDidChangeNotification")



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
428d39e600ded5adff2eabf0e705400fabb0a10d 31-Jan-2008 Ted Kremenek <kremenek@apple.com> We now delay adding nodes created by GRBranchNodeBuilder to the analysis
worklist until the dstor of GRBranchNodeBuilderImpl. This way clients can mark
creates nodes as "sinks" before they are added to the worklist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
3b4f6702860208692f6ef28401e68de4e3ff9af9 31-Jan-2008 Ted Kremenek <kremenek@apple.com> We now delay adding nodes created by GRBranchNodeBuilder to the analysis
worklist until the dstor of GRBranchNodeBuilderImpl. This way clients can mark
creates nodes as "sinks" before they are added to the worklist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46582 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
90960979d4875317037e8d3af4d20c8fae0be2a3 31-Jan-2008 Ted Kremenek <kremenek@apple.com> Implemented some branch pruning in GRConstants using != and == for
constant integers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
b38911f16b4943548db6a3695fc6ae23070b25d2 31-Jan-2008 Ted Kremenek <kremenek@apple.com> Implemented some branch pruning in GRConstants using != and == for
constant integers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46581 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
1eaa671cb983cb325022fa58a64f48782ca02aa3 31-Jan-2008 Ted Kremenek <kremenek@apple.com> Added method "printTerminator" to CFGBlock so that external clients can
pretty-print a block's terminator.

When building CFGs, for IfStmts ('if'), we no longer add the ParenExpr
that is the subexpression of the IfStmt to the CFG; instead we add its
first descendant subexpression that is not a ParenExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
a292585207adbf6dcf6347db3526a7ec861d8eac 31-Jan-2008 Ted Kremenek <kremenek@apple.com> Added method "printTerminator" to CFGBlock so that external clients can
pretty-print a block's terminator.

When building CFGs, for IfStmts ('if'), we no longer add the ParenExpr
that is the subexpression of the IfStmt to the CFG; instead we add its
first descendant subexpression that is not a ParenExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
bd881ef0b56faad84f6e81ba56c6d107b8dac28e 30-Jan-2008 Nate Begeman <natebegeman@mac.com> Implement first round of feedback on __builtin_overload



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
67295d05c50ab0b5d1b0f9ef82a906701c348715 30-Jan-2008 Nate Begeman <natebegeman@mac.com> Implement first round of feedback on __builtin_overload



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
f0154e97e54100534ea0fb0495c9f91a6cbcda4a 30-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
bd144b7ac70cc96cb1ff822347c2bb9b330729ec 30-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5f5d622213a719e1da54300bf14639a6b677ab0e 30-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed misc. issues raised by Chris L. on @synchronized implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
78a677bbb5fa115fa0995b5783adeeefad67167e 30-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed misc. issues raised by Chris L. on @synchronized implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
26a9d928c664d0584828590755a9a8944412a5bb 30-Jan-2008 Chris Lattner <sabre@nondot.org> Eli points out this can only happen for scalar elements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3fd1dfa22f2642c627ad2139b048b99fc5507ef3 30-Jan-2008 Chris Lattner <sabre@nondot.org> Eli points out this can only happen for scalar elements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
61f8977174bd3b0dff44c921d600aea6a2ff0c46 30-Jan-2008 Chris Lattner <sabre@nondot.org> Be more explicit about what flavors of initlistexpr's we can see. I don't
know if all of this is exactly right, but it seems like the right thing to
aim for. Steve, please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
196ef51bc4d008ec1c69851fb3b0f8d036065931 30-Jan-2008 Chris Lattner <sabre@nondot.org> Be more explicit about what flavors of initlistexpr's we can see. I don't
know if all of this is exactly right, but it seems like the right thing to
aim for. Steve, please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
006d1542188bc9b77c31246cbc344f724dce64a0 30-Jan-2008 Chris Lattner <sabre@nondot.org> move some constructors out of line and fix indentation in ObjCAtThrowStmt::getSourceRange.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
db6ed1786bf460e1143f67d14bf2d71ad9856f81 30-Jan-2008 Chris Lattner <sabre@nondot.org> move some constructors out of line and fix indentation in ObjCAtThrowStmt::getSourceRange.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46547 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b00247fd2fbaa3106c0863d88f94abd8837fecee 30-Jan-2008 Steve Naroff <snaroff@apple.com> Many refinements to Sema::MergeVarDecl(). This routine still needs some re-work to fully handle tentative decls.

This includes a fix to bz1908.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b7b032ecb23e5a2ebff89d62478f93313c04d367 30-Jan-2008 Steve Naroff <snaroff@apple.com> Many refinements to Sema::MergeVarDecl(). This routine still needs some re-work to fully handle tentative decls.

This includes a fix to bz1908.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
707108bc6a081e4662644c00e48ceffad8ba16e3 30-Jan-2008 Ted Kremenek <kremenek@apple.com> Added method "markInfeasible" to GRBranchNodeBuilder to disable the
auto-propagation of state along a branch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
52a16499df87730c0252b431abdf2b2e32d756a6 30-Jan-2008 Ted Kremenek <kremenek@apple.com> Added method "markInfeasible" to GRBranchNodeBuilder to disable the
auto-propagation of state along a branch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46537 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
6ff3cea6ddf953777c093a9de93790f39e1d83fa 30-Jan-2008 Ted Kremenek <kremenek@apple.com> Implemented more boilerplate in GREngine for processing branches. Now
we automatically generate a new successor node along an edge if the checker
did not explicitly do so (i.e., we just propagate the current state).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
71c29bdc931bc49644c581ec7d698f0dbf01a0aa 30-Jan-2008 Ted Kremenek <kremenek@apple.com> Implemented more boilerplate in GREngine for processing branches. Now
we automatically generate a new successor node along an edge if the checker
did not explicitly do so (i.e., we just propagate the current state).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
499bf41ed7af222723eda7d0e0e3364f688d92ab 29-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Rewriting of @synchronized. This has one FIXME in it. But this should allow @sychronized to be rewritten.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
a0f55792409289d1d343023fa8292cff6355e538 29-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Rewriting of @synchronized. This has one FIXME in it. But this should allow @sychronized to be rewritten.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46533 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
19fbb10dc35473198b6343063b0301e03ae3e210 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate logic in GREngine for processing branches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
7d7fe6d539b3bdb1701835223cca306c325614a7 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Added boilerplate logic in GREngine for processing branches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
1118e582637e263b4a012e75621498bf5484ba25 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed GRNodeBuilder to GRStmtNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
f4b7a6940070f04d7845ac55f0d1e300a8bee0d9 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed GRNodeBuilder to GRStmtNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
c9fd4d19ac2d2884dfceb8bbf8186b6529dde192 29-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> AST for @synchronized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
fa3ee8e6776634caf064ba5928ca7699d317a280 29-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> AST for @synchronized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
993360a70feeeb16068ad9d1342ababab6ee35d7 29-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Bunch of type defs, etc. for @synchronized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Parser.h
c385c90c68dfa376650e2facfbb444b2ec9bd110 29-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Bunch of type defs, etc. for @synchronized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46520 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Parser.h
52774ad4dcf54d85813a93001c3b866842f792cf 29-Jan-2008 Anders Carlsson <andersca@mac.com> Implement __builtin_offsetof.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5a1deb8d9c0722beae28d693fa137bbb942bd11f 29-Jan-2008 Anders Carlsson <andersca@mac.com> Implement __builtin_offsetof.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d3df8e76334b0bdaec2e0ec783cecba4109b571a 29-Jan-2008 Chris Lattner <sabre@nondot.org> fix comment typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
12fe558612303cb2188c321a77a21f7df23b6ae8 29-Jan-2008 Chris Lattner <sabre@nondot.org> fix comment typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46505 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
e890f4b302b9a2517803ef03bcb7e50b5220bc2a 29-Jan-2008 Chris Lattner <sabre@nondot.org> add diagnostic


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
73bd901764906cc0a9a2aef5f55eeae207bb5743 29-Jan-2008 Chris Lattner <sabre@nondot.org> add diagnostic


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d03aecea5161b7ab01ad57028bf4c1d1fcafe993 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Modified LiveVariables to perform all of its base initialization in the ctor,
and now we require a FunctionDecl* object so that we can also keep track of
all of the ParmDecls.

Modified clients of LiveVariables to conform to the new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/LocalCheckers.h
bffaa831478baf584e74dfb7917861e865d99640 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Modified LiveVariables to perform all of its base initialization in the ctor,
and now we require a FunctionDecl* object so that we can also keep track of
all of the ParmDecls.

Modified clients of LiveVariables to conform to the new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/LocalCheckers.h
7c647411547751aec6ea11b2771bceb49760eab1 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Driver now passes the top-level FunctionDecl* to GRConstants.

Refactoring: for GREngine and GRConstants, pushed references to CFG, ASTContext,
and the top-level FunctionDecl into ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
cb48b9c9c3c95f2650b74530264c288d1f58c73c 29-Jan-2008 Ted Kremenek <kremenek@apple.com> Driver now passes the top-level FunctionDecl* to GRConstants.

Refactoring: for GREngine and GRConstants, pushed references to CFG, ASTContext,
and the top-level FunctionDecl into ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
d404c3524e2e00e8c859fff659d5444a412dda23 28-Jan-2008 Steve Naroff <snaroff@apple.com> Implement "private extern" on function decls!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7dd0bd4f8f83d9e679c830b30d67028b3609fde1 28-Jan-2008 Steve Naroff <snaroff@apple.com> Implement "private extern" on function decls!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46464 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1cbb276ad30a12054198499ccd12bb608c695eae 25-Jan-2008 Steve Naroff <snaroff@apple.com> Add more support for Apple's "private extern" extension...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/DeclSpec.h
d6326c6fe586ba178734c49ba33a2c1af021822c 25-Jan-2008 Steve Naroff <snaroff@apple.com> Add more support for Apple's "private extern" extension...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46371 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/DeclSpec.h
c0587e1b7355076066538e31257050ec9f6c248f 25-Jan-2008 Chris Lattner <sabre@nondot.org> Factor a complex predicate out to a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
14dd98a7952c9559e0d17fff8272bf3be67135af 25-Jan-2008 Chris Lattner <sabre@nondot.org> Factor a complex predicate out to a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46365 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
ed27a53fb4967394fa6d111dda26b8dcf1e30c22 25-Jan-2008 Chris Lattner <sabre@nondot.org> split the second half of ParseObjCMessageExpression into a new
ParseObjCMessageExpressionBody method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
699b66138ac307a32e238463e0eff513ff17d337 25-Jan-2008 Chris Lattner <sabre@nondot.org> split the second half of ParseObjCMessageExpression into a new
ParseObjCMessageExpressionBody method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
bc662011993dbe26d4416f8c61b6dc44f7d1bcfb 25-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Diagnose bad receiver type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1dad5b2f0e5737afe6847b97a18492bab93517d5 25-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Diagnose bad receiver type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46358 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f3cb514bc61842b54776e106dcb4e06456e19232 25-Jan-2008 Steve Naroff <snaroff@apple.com> Replace Sema::CheckVariableInitList, CheckConstantInitList, and CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers.

This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-)

Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a99603333fffb57cf9ac37eabb190c8f5afc914b 25-Jan-2008 Steve Naroff <snaroff@apple.com> Replace Sema::CheckVariableInitList, CheckConstantInitList, and CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers.

This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-)

Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
54eddaea23ac4de145b7cf5a5c230ec20ab4b25d 24-Jan-2008 Ted Kremenek <kremenek@apple.com> Added passing "ASTContext" to both GREngine and GRConstants.
Added initial support for integer casting operations to GRConstants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Analysis/PathSensitive/GREngine.h
874d63fc63387365a21775a14c01963b10fde689 24-Jan-2008 Ted Kremenek <kremenek@apple.com> Added passing "ASTContext" to both GREngine and GRConstants.
Added initial support for integer casting operations to GRConstants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
lang/Analysis/PathSensitive/GREngine.h
c884988f88ef700a358fb137bdcb8b5bf0af732c 23-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed a nasty bug which took a while to come up with a test case,
diagnose, and took even longer to fix. It has to do with rewriting of a message
receiver which is an 'ivar' reference. Fix, however, is to remove a code which
was not doing the right thing and no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7da8d94cb79f311c5b126483b8edfe5dc70d6c8f 23-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed a nasty bug which took a while to come up with a test case,
diagnose, and took even longer to fix. It has to do with rewriting of a message
receiver which is an 'ivar' reference. Fix, however, is to remove a code which
was not doing the right thing and no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46279 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a616ee3e95d4f6084990c01b16d4f66d718a2485 23-Jan-2008 Chris Lattner <sabre@nondot.org> add support for -Wundef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
116a4b148ec9ad3f3a60044c7fb03f28dc620b7b 23-Jan-2008 Chris Lattner <sabre@nondot.org> add support for -Wundef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46274 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
248db26430b2f5b826001755dc998b0e9dcfcd01 22-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Problem with ObjC's type-encoding of nested structs causing infinit recursion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7d6b46d9a9d75dea8ef9f6973dd50633c1f37963 22-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Problem with ObjC's type-encoding of nested structs causing infinit recursion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
00a313b920df9931e893c7194f932ff6f7580e04 21-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Elimate bogus warning when va_start is correctly used in
a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2338d58a905191c4205d4f73affd0bdaa13493b4 21-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Elimate bogus warning when va_start is correctly used in
a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46232 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
771d8f421cc12a168e92a45f7f0be713ebda5b11 21-Jan-2008 Steve Naroff <snaroff@apple.com> Add a predicate/getter when checking for incomplete array types ("[]").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5c06a69a3ef19cc6dbeed7f2acb9de28b66c45d4 21-Jan-2008 Steve Naroff <snaroff@apple.com> Add a predicate/getter when checking for incomplete array types ("[]").



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
be72efa82435bb10430db4a5608ef3f8fb2f4907 19-Jan-2008 Steve Naroff <snaroff@apple.com> Fix two bugs with an @throw that doesn't have a statement.
- ObjCAtThrowStmt::getSourceRange() needs to check if it has a statement (and not go "boom":-)
- RewriteTest::RewriteObjCThrowStmt() needs to generate refer to the current exception.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
20ebf8f15df48f27ce2bf7c1b3ae87565235600f 19-Jan-2008 Steve Naroff <snaroff@apple.com> Fix two bugs with an @throw that doesn't have a statement.
- ObjCAtThrowStmt::getSourceRange() needs to check if it has a statement (and not go "boom":-)
- RewriteTest::RewriteObjCThrowStmt() needs to generate refer to the current exception.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
1c5027795c4a48ce4b9202b767b58cd7697c5204 18-Jan-2008 Ted Kremenek <kremenek@apple.com> Changed DataflowSolver to always associated recorded dataflow values with
the position *before* a statement, regardless of whether we are doing a
forward or backwards analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
51f5499420e3e2344c1e6c3eff4764c4ec0b47ca 18-Jan-2008 Ted Kremenek <kremenek@apple.com> Changed DataflowSolver to always associated recorded dataflow values with
the position *before* a statement, regardless of whether we are doing a
forward or backwards analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
ab6c590678b82ae86a72e024eac9dda6437eb76b 17-Jan-2008 Ted Kremenek <kremenek@apple.com> Modified the notion of "Block-level expressions" in CFGs to include Stmt*. This
is because GNU-style Statement-expressions cause the last statement in the
statement-expression to act like an expression.

We now have two notions: block-level statements and block-level expressions.

The former are all Stmt* that appear in the list of statements in CFGBlocks. The
latter is the subset of the former; these block-level statements are used as
subexpressions somewhere in the AST. CFG::isBlockExpr() returns true for the
latter, not the former (previously isBlockExpr() always returned true for
non-Expr Stmt*).

Modified the LiveVariables analysis to also track liveness state for block-level
expressions (using the updated definition of block-level expressions).

Modified the dataflow solver so that when it records values for block-level
statements, it records the dataflow value *before* the transfer function for a
Stmt* is evaluated (not after). This is more in sync in what clients will want.

Modified CFGStmtVisitor to record the current block-level statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/Visitors/CFGStmtVisitor.h
86946745225096243f6969dc745267b78fc211a6 17-Jan-2008 Ted Kremenek <kremenek@apple.com> Modified the notion of "Block-level expressions" in CFGs to include Stmt*. This
is because GNU-style Statement-expressions cause the last statement in the
statement-expression to act like an expression.

We now have two notions: block-level statements and block-level expressions.

The former are all Stmt* that appear in the list of statements in CFGBlocks. The
latter is the subset of the former; these block-level statements are used as
subexpressions somewhere in the AST. CFG::isBlockExpr() returns true for the
latter, not the former (previously isBlockExpr() always returned true for
non-Expr Stmt*).

Modified the LiveVariables analysis to also track liveness state for block-level
expressions (using the updated definition of block-level expressions).

Modified the dataflow solver so that when it records values for block-level
statements, it records the dataflow value *before* the transfer function for a
Stmt* is evaluated (not after). This is more in sync in what clients will want.

Modified CFGStmtVisitor to record the current block-level statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/Visitors/CFGStmtVisitor.h
0eeeece004bb2c8cb850673a961faa9bd7d6ca1b 17-Jan-2008 Steve Naroff <snaroff@apple.com> Improve diagnostic wording...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2c0f01a65d727407f803b69f93ad597fda454e87 17-Jan-2008 Steve Naroff <snaroff@apple.com> Improve diagnostic wording...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ab8ed959c2840957d56462f1332d75639f81a54c 17-Jan-2008 Ted Kremenek <kremenek@apple.com> Added support to dataflow solver to (when requested) also record dataflow
values for the block-level expressions.

Modified 'LiveVariables' to provide the option to clients to record
liveness information for block-level expressions (using the above feature).

Modified 'DeadStores' to conform to the new interface of 'LiveVariables'.

Modified 'GRConstants' to compute liveness information for block-level
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
79649dfed2fc4b8cf0f7b6890df69458dbceeb04 17-Jan-2008 Ted Kremenek <kremenek@apple.com> Added support to dataflow solver to (when requested) also record dataflow
values for the block-level expressions.

Modified 'LiveVariables' to provide the option to clients to record
liveness information for block-level expressions (using the above feature).

Modified 'DeadStores' to conform to the new interface of 'LiveVariables'.

Modified 'GRConstants' to compute liveness information for block-level
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
9f3bfb7f98f3e4eb7641c700081eecd16d055c3a 17-Jan-2008 Nate Begeman <natebegeman@mac.com> Implement basic overload support via a new builtin, __builtin_overload.

__builtin_overload takes 2 or more arguments:
0) a non-zero constant-expr for the number of arguments the overloaded
functions will take
1) the arguments to pass to the matching overloaded function
2) a list of functions to match.

The return type of __builtin_overload is inferred from the function whose args
match the types of the arguments passed to the builtin. For example:

float a;
float sinf(float);
int sini(int);

float b = __builtin_overload(1, a, sini, sinf);

Says that we are overloading functions that take one argument, and trying to
pass an argument of the same type as 'a'. sini() does not match since it takes
and argument of type int. sinf does match, so at codegen time this will turn
into float b = sinf(a);


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
lang/Parse/Action.h
e2ce1d9440186cf3332368291cd884a6e3ae8946 17-Jan-2008 Nate Begeman <natebegeman@mac.com> Implement basic overload support via a new builtin, __builtin_overload.

__builtin_overload takes 2 or more arguments:
0) a non-zero constant-expr for the number of arguments the overloaded
functions will take
1) the arguments to pass to the matching overloaded function
2) a list of functions to match.

The return type of __builtin_overload is inferred from the function whose args
match the types of the arguments passed to the builtin. For example:

float a;
float sinf(float);
int sini(int);

float b = __builtin_overload(1, a, sini, sinf);

Says that we are overloading functions that take one argument, and trying to
pass an argument of the same type as 'a'. sini() does not match since it takes
and argument of type int. sinf does match, so at codegen time this will turn
into float b = sinf(a);


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46132 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
lang/Parse/Action.h
dcecd5cbbe024118ef7432299a44dbb511588cfc 17-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Renamed getSynthesizedSelectorSize to getSynthesizedMethodSize. Compute method name
size in accordance with how rewriter synthesizes method name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
faf5e779d16bb4590f2a97e1c7ded255eddd90f3 17-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Renamed getSynthesizedSelectorSize to getSynthesizedMethodSize. Compute method name
size in accordance with how rewriter synthesizes method name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46131 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
87e30c5f73ee7a900367a5f776f03a49807bf7c7 17-Jan-2008 Ted Kremenek <kremenek@apple.com> Added method Expr::IgnoreParens(), which returns the first non-ParenExpr Expr*.
Refactored the use of this method into both the Sema module and Analysis module,
which were using their own static functions that did the same thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4e99a5fc3b203397a91136c6e695e405fb8fc606 17-Jan-2008 Ted Kremenek <kremenek@apple.com> Added method Expr::IgnoreParens(), which returns the first non-ParenExpr Expr*.
Refactored the use of this method into both the Sema module and Analysis module,
which were using their own static functions that did the same thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46129 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4aaf0c933f55f2cfcb8fa873ba56272bad5658a2 17-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Computed length of a __func__ identifier used in an objective-c method correctly,
when creating its type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
847794a7620bfd5fda09ee06bc0205d30e17e2aa 17-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Computed length of a __func__ identifier used in an objective-c method correctly,
when creating its type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
aa43cc1718abd85165acdb43a9f6d152bfdb118d 17-Jan-2008 Steve Naroff <snaroff@apple.com> Declarator::clear(): Null out variable after it's been deleted.

This avoids a double free (which is good:-)

Bug submitted by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
1b4a6227f3ee6fca074d0f521757d1ed4f95ef38 17-Jan-2008 Steve Naroff <snaroff@apple.com> Declarator::clear(): Null out variable after it's been deleted.

This avoids a double free (which is good:-)

Bug submitted by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
ba9a28748502398a323994d6d43b26c669b77dc4 17-Jan-2008 Steve Naroff <snaroff@apple.com> Type::isArithmeticType(): disallow incomplete enum decls.

Bug submitted by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
67c49e892b50a9ccb64f7296e00c23c61a8b7186 17-Jan-2008 Steve Naroff <snaroff@apple.com> Type::isArithmeticType(): disallow incomplete enum decls.

Bug submitted by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46102 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f8f582c7b5ce4ccdff9ca4e884a7cfea056d1e14 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed invalid typedefs in the root and eop iterators for ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
1501c82ecb0a853f7e6bb9622e49bfc2f0413c0e 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed invalid typedefs in the root and eop iterators for ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
2c421bc2e631478472181d7c958b292f97149b93 16-Jan-2008 Chris Lattner <sabre@nondot.org> add accessors to switchstmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
20dabe8b8ff7ed6d2d0158fee43755a4bc7642c3 16-Jan-2008 Chris Lattner <sabre@nondot.org> add accessors to switchstmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46082 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5d0c778c885374348e9e443a794aa56c381354eb 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed broken bitmasking in the ctor of ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
b365b702229999bf90b668bbe4a95bc0d2293d69 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed broken bitmasking in the ctor of ProgramPoint.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46081 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
0fe3f3a78eba3e14534a4d87be4fe124bb621e61 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Added missing call to the checker's Initialize() method in the alternate
ctor for GREngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
faa5b48710cc5c4c85df3218e567745b81b0ace4 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Added missing call to the checker's Initialize() method in the alternate
ctor for GREngine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
f11dcf3290bc5e4ea11e34e9cf35366183ee0704 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Added missing ctor to ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
b2d763a7987a2c5854d302f82f8b3c7ac5b92e20 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Added missing ctor to ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
f32a96bae9b29b13973461fcb0a768e590ceb092 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed incorrect pointer mask.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
5e2fa75c211519719687a81c6b6db85fbaa80254 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed incorrect pointer mask.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46078 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
bbb8a52e535a94593bb959e3f4a43674c74c6b29 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Add missing header file for GRConstants analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
1f3722b29fbf0791ba0fc5411f624359672c5685 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Add missing header file for GRConstants analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/GRConstants.h
d2500ab93d31c358b045eb53e525408cb1067549 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Hooked up the GRConstants analysis to the driver.
Fixed some compilation errors with GREngine that showed up during
template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
ee98546b0d5f3439c4a590b0d7d1545af794a0ec 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Hooked up the GRConstants analysis to the driver.
Fixed some compilation errors with GREngine that showed up during
template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
6c9e792f8f8127cbbb79e43f2cdf803f305d432b 16-Jan-2008 Steve Naroff <snaroff@apple.com> Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function declarations/definitions). Patch by Carl Lewis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
837618c0945e1f67ec1e39000c568a1fa857a5a9 16-Jan-2008 Steve Naroff <snaroff@apple.com> Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function declarations/definitions). Patch by Carl Lewis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3eef64dd904fbc1651b25dbf63047ce0b65693be 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Added ctor to GRNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
4992b7333c3ede5a97c8657833304df8d9a00ac1 16-Jan-2008 Ted Kremenek <kremenek@apple.com> Added ctor to GRNodeBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
4300121ffff80d4b23d17689930e2aa2a83086b9 15-Jan-2008 Steve Naroff <snaroff@apple.com> - Change Type::isComplexType() to exlude GCC's complex integer extension. In general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec).
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().

This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
02f62a9fedbc370fba081303399410a3afdde29f 15-Jan-2008 Steve Naroff <snaroff@apple.com> - Change Type::isComplexType() to exlude GCC's complex integer extension. In general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec).
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().

This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8888c7acd5cd43c7f910bfe03f5979ed4011de2a 15-Jan-2008 Steve Naroff <snaroff@apple.com> Add a comment...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
96d2c438f5c9ada8229f7f2ac049d2e9957bc954 15-Jan-2008 Steve Naroff <snaroff@apple.com> Add a comment...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
36e35e652e28cbdffbeda8cc3362888357ec7173 15-Jan-2008 Steve Naroff <snaroff@apple.com> Rework commit r45976, which was incorrect.

- Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType().
- Don't inlude complex types with Type::isIntegerType(), which is too general.
- Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4cdec1c3ca80124024a787ce32833fd5b20cbb15 15-Jan-2008 Steve Naroff <snaroff@apple.com> Rework commit r45976, which was incorrect.

- Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType().
- Don't inlude complex types with Type::isIntegerType(), which is too general.
- Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45992 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3226a651485897528178af195dc57550ab119770 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed implicit transitions to a "BlockExit" location; we now handle
the end of the block by processing empty blocks (at BlockEntrance) or
when we have just processed the last statement in a block (at PostStmt).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
425c08c53ccbfb84e52129406b259ec59da22e64 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed implicit transitions to a "BlockExit" location; we now handle
the end of the block by processing empty blocks (at BlockEntrance) or
when we have just processed the last statement in a block (at PostStmt).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/GREngine.h
f3b25969dfe50a46b0a655cb2d1587e55a8e8c08 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed mutation of CFGBlock through operator[]. For now the underlying ASTs,
however, can still be manipulated through the returned Stmt*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
3bf49e3fa8fa4630c48d78c19e3640fcaf67d07c 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed mutation of CFGBlock through operator[]. For now the underlying ASTs,
however, can still be manipulated through the returned Stmt*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
ef27b4b4889c9da0e5e77a328e34551a041b233a 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Added prototype implementation of path-sens. analysis core engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
f24af5bc2e01ca8e7396ed997378a77fddfa521e 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Added prototype implementation of path-sens. analysis core engine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/GREngine.h
lang/Analysis/PathSensitive/GRWorkList.h
3b1c3c095fca9acb7976cf11b2055cfa07996c6d 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Added operator[] for CFGBlock. This provides random access to the statements
of a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
be7a7d6f2e5b86807afd08a568863df973baaa38 15-Jan-2008 Ted Kremenek <kremenek@apple.com> Added operator[] for CFGBlock. This provides random access to the statements
of a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45984 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
229bcdd2b25343e76da813ac6ef5391519a06676 14-Jan-2008 Ted Kremenek <kremenek@apple.com> Cleaned up comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
86d1777a6b7723865c1e67a7aafc797ec0a574ff 14-Jan-2008 Ted Kremenek <kremenek@apple.com> Cleaned up comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
a4f6b1f476b7094acedf1acfd23e2e8d09c6cd9d 14-Jan-2008 Ted Kremenek <kremenek@apple.com> Cleaned up comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
95b1a9055ea7a27c231f6e082e5bcee4947ea0ce 14-Jan-2008 Ted Kremenek <kremenek@apple.com> Cleaned up comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
be37fc0e62b9eba4f30a54e6188382bfb462b627 14-Jan-2008 Steve Naroff <snaroff@apple.com> Record if a compound literal expression is @ file scope. This allows us to implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.

Bug/patch by Eli Friedman!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e9b12198c4cc7f5687960100351b4af006c14469 14-Jan-2008 Steve Naroff <snaroff@apple.com> Record if a compound literal expression is @ file scope. This allows us to implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.

Bug/patch by Eli Friedman!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1efb45ecf34a78cba57e95882f8e5c033bd41f96 14-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed 'inline' keywords from methods now defined in ExplodedGraph.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
5d5480380d7b7c3590a0283ddf239220e514e576 14-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed 'inline' keywords from methods now defined in ExplodedGraph.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45965 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
9d4c97eea6412798fd4317d566fa1b8bf12d4455 14-Jan-2008 Anders Carlsson <andersca@mac.com> _asm is another valid alias for asm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
579712091a22f12de911f9949aedc4366f492c78 14-Jan-2008 Anders Carlsson <andersca@mac.com> _asm is another valid alias for asm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
9c6c3590c1e7b6f878f10f5d001a688a7bd4a03f 13-Jan-2008 Steve Naroff <snaroff@apple.com> Change Sema::CheckAddressOfOperation() to respect C99-only addressof rules.
Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below).

void
foo (void)
{
struct b;
struct b* x = 0;
struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type")
}

With this patch, the above is now allowed.

Bug/Patch by Eli Friedman!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
08f196716775e3b5a5406b588f5f01a0169a8a5b 13-Jan-2008 Steve Naroff <snaroff@apple.com> Change Sema::CheckAddressOfOperation() to respect C99-only addressof rules.
Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below).

void
foo (void)
{
struct b;
struct b* x = 0;
struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type")
}

With this patch, the above is now allowed.

Bug/Patch by Eli Friedman!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
811d430842cc5116af3398e1fb5f87e1d4775930 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Moved destructor logic of templated class ExplodedGraph to non-templated
parent class ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
d880c1829395f55129fee31e2df542a475ec3cd7 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Moved destructor logic of templated class ExplodedGraph to non-templated
parent class ExplodedGraphImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
b997adec16c1ca931835a6e6198746d4c861d195 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Added node cleanup to dstor of ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
90e2280fd242b02d9829365570ba3966217cb0e0 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Added node cleanup to dstor of ExplodedGraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45929 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
f7c3becda680aba20d7040970eb376524c23f134 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Created ExplodedGraph.cpp and moved most method implementations of
ExplodedNodeImpl::NodeGroup from being defined inline to being defined
"out-of-line" in ExplodedGraph.cpp. This removes a dependence on including
<vector> in ExplodedGraph.h, and will hopefully result in smaller generated code
with negligible performance impact.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
9eb49a40df510313132eef147419c5abefff23eb 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Created ExplodedGraph.cpp and moved most method implementations of
ExplodedNodeImpl::NodeGroup from being defined inline to being defined
"out-of-line" in ExplodedGraph.cpp. This removes a dependence on including
<vector> in ExplodedGraph.h, and will hopefully result in smaller generated code
with negligible performance impact.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45928 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
7d3ab545c5685bac9dce2a5bf4afb738884f698d 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Moved 'ExplodedNodeGroup' into class 'ExplodedNode' as the nested class
'NodeGroup.'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
4c4cb527a44037d076da82ad9d12b4e655e64dbb 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Moved 'ExplodedNodeGroup' into class 'ExplodedNode' as the nested class
'NodeGroup.'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
d82124288caa17aaf009685604dc143c520638cd 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed lines preventing compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
37d887c6c8e3c653fc581183d012a646d1653f57 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed lines preventing compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
0f0daa779783d9ad33d004e267edec006fd2a2f5 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Now include "CFG.h" because the inline methods of "BlockEntrance" accessor
the methods of CFGBlock.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
05e14cd46ef44c07385aae96ec2fdcb9bf7e9467 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Now include "CFG.h" because the inline methods of "BlockEntrance" accessor
the methods of CFGBlock.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45925 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramPoint.h
702ae069cbec5f1679a9f9d0dff9b778346c11d5 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
51125a21eafc29c925cac3655b46cfd8ef55f764 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45924 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
a750f3ec402ed1d68c907a9b2d6cfa9091a29f15 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed ExplodedNode.h, since its contents are now in ExplodedGraph.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
ce9328bd3b22ac46256501bc63660b7de820a197 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed ExplodedNode.h, since its contents are now in ExplodedGraph.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45923 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
5a6fc1285c8e20db476469c3c7508d7c9285f958 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Merged ExplodedNode.h into ExplodedGraph.h, since the ExplodedNode class will
only be used in the context of the ExplodedGraph class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
4a0f5f1646637fcf90eb236b5a46f40e5a5dd739 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Merged ExplodedNode.h into ExplodedGraph.h, since the ExplodedNode class will
only be used in the context of the ExplodedGraph class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45922 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
dafa1ecedf263ceb56b0a97e3a14f45fb9366939 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Changed implementation of successor and predecessor sets for ExplodedNode
to optimize for the common case of having a single predecessor and a single
successor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
46dc4e5f526407a089a4fb3fdf12e20d04f08c86 13-Jan-2008 Ted Kremenek <kremenek@apple.com> Changed implementation of successor and predecessor sets for ExplodedNode
to optimize for the common case of having a single predecessor and a single
successor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45921 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
e12ca5d11e69e0c5e0ec5a5dcd185637e43f7fc4 12-Jan-2008 Chris Lattner <sabre@nondot.org> Tighten up handling of __func__ and friends: it should be an array
of const char, and it should error if it occurs outside a function.

Is it valid in an objc method? If so we should handle that too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1423ea4146f0f71e027adbcd04c9e715711d8063 12-Jan-2008 Chris Lattner <sabre@nondot.org> Tighten up handling of __func__ and friends: it should be an array
of const char, and it should error if it occurs outside a function.

Is it valid in an objc method? If so we should handle that too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45910 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
806a5f566a37736a7de1eae35d324ce5ce7669ae 12-Jan-2008 Chris Lattner <sabre@nondot.org> Add first pieces of support for parsing and representing
extern "C" in C++ mode. Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/CodeGen/ModuleBuilder.h
lang/Parse/Action.h
lang/Parse/Parser.h
c6fdc34ac0183bfa03d65f317c78b7bdac52897e 12-Jan-2008 Chris Lattner <sabre@nondot.org> Add first pieces of support for parsing and representing
extern "C" in C++ mode. Patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/CodeGen/ModuleBuilder.h
lang/Parse/Action.h
lang/Parse/Parser.h
ca12e19b518e615c35d4634abd55e7bb4fed39d8 11-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed ProgramEdge.h to ProgramPoint.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramEdge.h
lang/Analysis/ProgramPoint.h
a1d44b5b7dbd39d4cfdbbb5ceb1885499ea03c77 11-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed ProgramEdge.h to ProgramPoint.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramEdge.h
lang/Analysis/ProgramPoint.h
5ee98a7de4266ec2de0bff9fcb270c3960aa52e6 11-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed ProgramEdge to ProgramPoint and changed subclasses of ProgramEdge
to have a much simpler, cleaner interpretation of what is a "location"
in a function (as encoded by a CFG).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramEdge.h
83c01da96f57cf732a5da9a83e2981241f205dc4 11-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed ProgramEdge to ProgramPoint and changed subclasses of ProgramEdge
to have a much simpler, cleaner interpretation of what is a "location"
in a function (as encoded by a CFG).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45846 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/ProgramEdge.h
59df76ba7573b3724ea60aa7655278a0ced40273 10-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Remove non-ascii chaaracter from diagnostic


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a12a75faa61d7298ea27d8606a7d8f8f3584f9fa 10-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Remove non-ascii chaaracter from diagnostic


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45836 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3aa34e22fc739d80152c97b54b82ec21a3a1e348 10-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed non-ASCII quote.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8c04a4ca98454236e612e6e5c8eb791579e0e9ca 10-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed non-ASCII quote.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1a8dcaf20aa59a039eb78f3fea98091f4d736c07 10-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Warn (as gcc does) when @end does not close anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
94cdb25a49bd3716ab56ef6de0ea57d29e686bf2 10-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Warn (as gcc does) when @end does not close anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f103f0c903f55cc54bd35200a51691ecb3284458 10-Jan-2008 Ted Kremenek <kremenek@apple.com> Added "InfeasibleEdge" to represent an infeasible state transition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
b6d2360787e5a0bb5d26f3bc7a83059a8b050dc4 10-Jan-2008 Ted Kremenek <kremenek@apple.com> Added "InfeasibleEdge" to represent an infeasible state transition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
df2b095116b8d71caeb20cf9b54c51c727403c67 10-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Allow messaging expression as foreach's collection expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7571228ec9b31de7733ae96352ee4eaa8afcf2b5 10-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Allow messaging expression as foreach's collection expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
c9c9136990e722603929070e5daefcbd20919602 10-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed various traits and classes. Added "Infeasible" bit to ExplodedNodeImpl
so that nodes can be marked as representing an infeasible program point. This
flag lets the path-sensitive solver know that no successors should be generated
for such nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ExplodedNode.h
974c676306758c8c84f5c25e3708186557a678bd 10-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed various traits and classes. Added "Infeasible" bit to ExplodedNodeImpl
so that nodes can be marked as representing an infeasible program point. This
flag lets the path-sensitive solver know that no successors should be generated
for such nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45788 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ExplodedNode.h
548d10c594d88c15a8f3adc5e5a8f9c778a5b1ef 09-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed Stmt***Edge and ***StmtEdge (where *** = "Stmt" or "Blk") classes to
BExpr*** and ***BExpr respectively. These edges represent program locations
between the entrance/exit of a block and Block-level Expressions.

Also added ***SExpr and SExpr*** ProgramEdges to represent the locations in the
program between the evaluation of subexpressions and block-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
bd129696c554fbbcd9405104641e292f0fb4678d 09-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed Stmt***Edge and ***StmtEdge (where *** = "Stmt" or "Blk") classes to
BExpr*** and ***BExpr respectively. These edges represent program locations
between the entrance/exit of a block and Block-level Expressions.

Also added ***SExpr and SExpr*** ProgramEdges to represent the locations in the
program between the evaluation of subexpressions and block-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45786 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
91876868dc74e69f9076ee1b99742a3134028006 09-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed some files related to the path-sensitive solver as part of some
code restructuring. (new files will be introduced shortly)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ReachabilityEngine.h
a2f4ef2c11c5cd8dcd5aa3d691f3a4bd971f96c2 09-Jan-2008 Ted Kremenek <kremenek@apple.com> Removed some files related to the path-sensitive solver as part of some
code restructuring. (new files will be introduced shortly)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ReachabilityEngine.h
43cdbf5cfe2da354d3d54655952ee7a8ae142485 09-Jan-2008 Chris Lattner <sabre@nondot.org> implement proper support for _Bool in memory, which is usually i8, not i1.
This fixes a crash reported by Seo Sanghyeon


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
19009e6fe7e0f51d2e49f4c94928a048c11c5281 09-Jan-2008 Chris Lattner <sabre@nondot.org> implement proper support for _Bool in memory, which is usually i8, not i1.
This fixes a crash reported by Seo Sanghyeon


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
2ea769b494649b5ca4864acf154f2fedc7718029 09-Jan-2008 Chris Lattner <sabre@nondot.org> Fix a typo, patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3830f68e9e461a1b812b70f93103f8fb4ccb8c40 09-Jan-2008 Chris Lattner <sabre@nondot.org> Fix a typo, patch by Mike Stump!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45763 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
16420585203608517b029404a3a7ea363535cb87 08-Jan-2008 Chris Lattner <sabre@nondot.org> readability improvement suggested by Sam Bishop, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
94b3cdb57fd5d245963e597626e0dfd88d479795 08-Jan-2008 Chris Lattner <sabre@nondot.org> readability improvement suggested by Sam Bishop, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45735 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ca6769676d1b0170bc3b3bc6230a4185b09593fd 08-Jan-2008 Ted Kremenek <kremenek@apple.com> Added nodes_iterator to the GraphTrait for ExplodedNode<>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
3f51a20208ddb0dd4ae0495832c1872cb1efe021 08-Jan-2008 Ted Kremenek <kremenek@apple.com> Added nodes_iterator to the GraphTrait for ExplodedNode<>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
3142c535e91b5bdfae637482868069beb94a2b31 08-Jan-2008 Ted Kremenek <kremenek@apple.com> Added GraphTraits<> partial specializations for ExplodedNode<> classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
5d78cf787b1c702ba2172e7a68ca7a272a8f3c65 08-Jan-2008 Ted Kremenek <kremenek@apple.com> Added GraphTraits<> partial specializations for ExplodedNode<> classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45729 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedNode.h
bcf8d5b3b47ea6bdeb5e3ac54b8c205d7a333b2d 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Added more boilerplate for processing end-of-paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ReachabilityEngine.h
d25725e2f1b2aecc45a70b7e3b63d52caae4e9cd 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Added more boilerplate for processing end-of-paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ReachabilityEngine.h
20d1d4b34f4c3481e48f790205336d25b4136e14 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Added ownership of "checker state" within the ExplodedGraph. Moved code that
creates the initial root node from the constructor of ReachabilityEngine to
ReachabilityEngine::ExecuteWorklist.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ReachabilityEngine.h
ede5a4ba111f0590879670b6cb07f4d6d0bd9075 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Added ownership of "checker state" within the ExplodedGraph. Moved code that
creates the initial root node from the constructor of ReachabilityEngine to
ReachabilityEngine::ExecuteWorklist.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ReachabilityEngine.h
c834ea640f7d32f28c9080131a2ea5664f0c9857 07-Jan-2008 Chris Lattner <sabre@nondot.org> Fix a nasty corner case that Neil noticed in PR1900, where we would
incorrectly apply the multiple include optimization to files with
guards like:

#if !defined(x) MACRO

where MACRO could expand to different things in different contexts.
Thanks Neil!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MultipleIncludeOpt.h
4d730461735cc5cb8ecbd2f6106da9ec234064ad 07-Jan-2008 Chris Lattner <sabre@nondot.org> Fix a nasty corner case that Neil noticed in PR1900, where we would
incorrectly apply the multiple include optimization to files with
guards like:

#if !defined(x) MACRO

where MACRO could expand to different things in different contexts.
Thanks Neil!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MultipleIncludeOpt.h
42730c53aeef9ac6c258d317065fdf38da4e043c 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Substituted all instances of the string "Objc" for "ObjC". This fixes
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
a526c5c67e5a0473c340903ee542ce570119665f 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Substituted all instances of the string "Objc" for "ObjC". This fixes
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/Type.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
324949ada542f6eabd2989c2240475a6526f829a 07-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Make interfaceTypesAreCompatible a private method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8cc71e8d00896e758cf56ea86cfc1f62ade16478 07-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Make interfaceTypesAreCompatible a private method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
8e513d62f6d690801f240f95c12debad2852a510 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed SimulVertex, SimulGraph, and SimulEngine to:
ExplodedNode, ExplodedGraph (to match the vocabulary in the RHS paper)
ReachabilityEngine

The implementation of the core of the path-sensitive dataflow solver has
been de-templatized and places in ReachabilityEngine.cpp.

The solver is still incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ExplodedNode.h
lang/Analysis/PathSensitive/ReachabilityEngine.h
lang/Analysis/PathSensitive/SimulEngine.h
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
4241b3d1ad87e9a593bbc6cdf0f49435d5aec235 07-Jan-2008 Ted Kremenek <kremenek@apple.com> Renamed SimulVertex, SimulGraph, and SimulEngine to:
ExplodedNode, ExplodedGraph (to match the vocabulary in the RHS paper)
ReachabilityEngine

The implementation of the core of the path-sensitive dataflow solver has
been de-templatized and places in ReachabilityEngine.cpp.

The solver is still incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ExplodedGraph.h
lang/Analysis/PathSensitive/ExplodedNode.h
lang/Analysis/PathSensitive/ReachabilityEngine.h
lang/Analysis/PathSensitive/SimulEngine.h
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
e677f5a78ca92206850f387345e27a6173a5c408 07-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Issue diagnostics if more than one declaration in objectove-c's foreach-stmt header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
8ce5da30642cd23968daf5bc2af5f6cd658c9c16 07-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Issue diagnostics if more than one declaration in objectove-c's foreach-stmt header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
fabcc645e309b3037595ed15ccce3ed39083fe79 06-Jan-2008 Chris Lattner <sabre@nondot.org> Emit warnings like "dereferencing void pointer" instead of trying to
pretty print the type name for void.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5d5d210062b44ba40c1bb90b73c67be91428f54e 06-Jan-2008 Chris Lattner <sabre@nondot.org> Emit warnings like "dereferencing void pointer" instead of trying to
pretty print the type name for void.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45664 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
cadb0704e778f9ebdf6e58c399f435a5eae354cb 05-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Minor changes as suggested by Chris L.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Parser.h
335a2d4122e41343fe11a775889b8bec5b14be60 05-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Minor changes as suggested by Chris L.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45598 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Parser.h
d951b7ba63db86731592cfdab84cf8c87ed35136 04-Jan-2008 Chris Lattner <sabre@nondot.org> add comments for the various AssignConvertType's, and split int->pointer from pointer->int.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b7b61159325e002998ff950fdc70a6425a6b13b3 04-Jan-2008 Chris Lattner <sabre@nondot.org> add comments for the various AssignConvertType's, and split int->pointer from pointer->int.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
005ed756c8250ca96ff88fa7582752d5e9c9141b 04-Jan-2008 Chris Lattner <sabre@nondot.org> Merge all the 'assignment' diagnostic code into one routine, decloning
it from several places. This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.

Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5cf216b7fa64b933b60743b0b26053e8e7aa87be 04-Jan-2008 Chris Lattner <sabre@nondot.org> Merge all the 'assignment' diagnostic code into one routine, decloning
it from several places. This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.

Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
662d7089946c48822e5665c69e46a0e5844a4ea0 04-Jan-2008 Chris Lattner <sabre@nondot.org> fix a build problem where NULL isn't implicitly defined by the headers this file includes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
6d9b9e4f61e790d71e134cb84ec21230fb41341f 04-Jan-2008 Chris Lattner <sabre@nondot.org> fix a build problem where NULL isn't implicitly defined by the headers this file includes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
fe0982d3e8a15eaa22ae8443e4ae916bd1971b32 04-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to add semantics check for ObjC2's foreacn statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1f990d67c2d24cb330434f42dd62a3a0cc4aa6e9 04-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to add semantics check for ObjC2's foreacn statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
01e854d5f285424a565355abade7ff49ef76a111 04-Jan-2008 Chris Lattner <sabre@nondot.org> generalize some of the conversion warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4667ac39be4a96725373c0317ad6827e1bb71502 04-Jan-2008 Chris Lattner <sabre@nondot.org> generalize some of the conversion warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45560 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e62d63840904e24dc387bf9a60c7194fbfaf5c2b 04-Jan-2008 Chris Lattner <sabre@nondot.org> regroup assignment-related diagnostics, fix a mistake in one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2119c489cd251e104e1d472bafacd78784758536 04-Jan-2008 Chris Lattner <sabre@nondot.org> regroup assignment-related diagnostics, fix a mistake in one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4ca3d77f132bff94d7ea6bf90d2dc3a8f41bb9bb 03-Jan-2008 Chris Lattner <sabre@nondot.org> give better diagnostics for converting between function pointer and void*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bfe639e4d39b1afa05d66aaea0378d6c10df4ffc 03-Jan-2008 Chris Lattner <sabre@nondot.org> give better diagnostics for converting between function pointer and void*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
17a2b52b972037d57a78e4b53be6862c917a4ae9 03-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed misuse of pointer within SimulVertex::addPredecessor()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
1dcf0a4546df4edbc7e8c660de0be46ae60c95cc 03-Jan-2008 Ted Kremenek <kremenek@apple.com> Fixed misuse of pointer within SimulVertex::addPredecessor()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
a5dd7a67b0d08a7ede7a1564a706994e1873757b 03-Jan-2008 Ted Kremenek <kremenek@apple.com> SimulGraph::getVertex() now also returns a bool indicating if the returned
vertex was freshly created.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
f3b92122623a9341411b65afc89fceaf743de08f 03-Jan-2008 Ted Kremenek <kremenek@apple.com> SimulGraph::getVertex() now also returns a bool indicating if the returned
vertex was freshly created.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
04379f1f873cb08721223dabf4fa23e964b5087d 03-Jan-2008 Ted Kremenek <kremenek@apple.com> Constified methods front() and back() in CFGBlock.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
5156ad8b2e64850a13d4e9d9ddeb3f9c6b9d3ebb 03-Jan-2008 Ted Kremenek <kremenek@apple.com> Constified methods front() and back() in CFGBlock.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45549 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
1b5f5e1ff997799926d3cd3253121999c9e3f225 03-Jan-2008 Ted Kremenek <kremenek@apple.com> De-constified the pointers returned by the Dst() and Src() methods of
the various ProgramEdge classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
02ad1a2c515683ae5365d31c2c86c735d6104c13 03-Jan-2008 Ted Kremenek <kremenek@apple.com> De-constified the pointers returned by the Dst() and Src() methods of
the various ProgramEdge classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ProgramEdge.h
1300bc7d727d199bb0634bc074de9deda7d48c29 03-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to parse/build AST ObjC2's foreach statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
3ba5a0f90a03d5e13d02cbee9abd2a1ba01b18bc 03-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to parse/build AST ObjC2's foreach statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45539 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9e920f38a2b2fb3c019f518c82d798452cd8b3b4 02-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> New declarations/defs for Objc2's foreach-statement. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Parser.h
0196cab54007ff072ec2642da8911c6b7e8d3fb5 02-Jan-2008 Fariborz Jahanian <fjahanian@apple.com> New declarations/defs for Objc2's foreach-statement. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45511 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Parser.h
11ed4ca362958162d11612c9318cde7760cb7afe 02-Jan-2008 Ted Kremenek <kremenek@apple.com> SimulVertex: Inverted argument order when calling the Profile method of StateTy.

SimulGraph: Inverted argument order when calling the Profile method of VertexTy
(plus minor cleanups)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
f56dac9ae9b1f3061b24d2a8257327a97adc6bd7 02-Jan-2008 Ted Kremenek <kremenek@apple.com> SimulVertex: Inverted argument order when calling the Profile method of StateTy.

SimulGraph: Inverted argument order when calling the Profile method of VertexTy
(plus minor cleanups)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
386ab8a072825ab47365159a2a078e3da1d752ae 02-Jan-2008 Chris Lattner <sabre@nondot.org> Compute the proper sourcerange for an CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0fc53dfc7a33f68e71ef245389c4e7cd34a62a39 02-Jan-2008 Chris Lattner <sabre@nondot.org> Compute the proper sourcerange for an CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
71b99c4b22f730792e63ebd7bcefa99f354db993 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Converted state reference within SimulVertex from StateTy* to StateTy.
This is more flexible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
41bc5cda96a8893e12d2750779e307ae92da4be6 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Converted state reference within SimulVertex from StateTy* to StateTy.
This is more flexible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
b18ca46f912086ef8a36fe6718858ae2bb0d1c1c 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Added/fixed some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
e8599e570ed55a9c170fed43e39a1e1d4c3f70a8 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Added/fixed some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45490 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
ad6442ede2fd94cda32b8e1ecfd782ee64a6cc16 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Sprinkled 'typename' and fixed a few typos and type declaration errors to
make these headers compile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
5d5c462e416ef29ad2005daf7d39a82c6e4c61bf 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Sprinkled 'typename' and fixed a few typos and type declaration errors to
make these headers compile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45488 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
0a4df30e653aed6948f5e63ca91ee70afc0be388 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Added fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
a5c999d518823df28761a9326907b20beb8c4d5d 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Added fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45487 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
5c0563177d9abdca1697bbb80d18ab97cefef6cb 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Allocate vertices using a BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
b679fed0008131f18d2f8034146732c7dad9367f 02-Jan-2008 Ted Kremenek <kremenek@apple.com> Allocate vertices using a BumpPtrAllocator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45486 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
350b6ddaea5f7b260edc07567b6710077c786a31 29-Dec-2007 Chris Lattner <sabre@nondot.org> remove attributions from .def files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/PPCBuiltins.def
lang/AST/StmtNodes.def
lang/AST/X86Builtins.def
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
0538bc56e3fbb580921082bd80b2ddefb6ed2532 29-Dec-2007 Chris Lattner <sabre@nondot.org> remove attributions from .def files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/PPCBuiltins.def
lang/AST/StmtNodes.def
lang/AST/X86Builtins.def
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
959e5be188a505881058777f35abaaa3fe2de40b 29-Dec-2007 Chris Lattner <sabre@nondot.org> Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/Builtins.h
lang/AST/CFG.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/PrettyPrinter.h
lang/AST/RecordLayout.h
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
lang/AST/StmtVisitor.h
lang/AST/TargetBuiltins.h
lang/AST/TranslationUnit.h
lang/AST/Type.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/SimulEngine.h
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
lang/Analysis/PathSensitive/StateVariant.h
lang/Analysis/ProgramEdge.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
lang/Basic/Diagnostic.h
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.h
lang/CodeGen/ModuleBuilder.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroExpander.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
lang/Sema/ASTStreamer.h
0bc735ffcfb223c0186419547abaa5c84482663e 29-Dec-2007 Chris Lattner <sabre@nondot.org> Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/ASTConsumer.h
lang/AST/ASTContext.h
lang/AST/Builtins.h
lang/AST/CFG.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/PrettyPrinter.h
lang/AST/RecordLayout.h
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
lang/AST/StmtVisitor.h
lang/AST/TargetBuiltins.h
lang/AST/TranslationUnit.h
lang/AST/Type.h
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/LocalCheckers.h
lang/Analysis/PathSensitive/SimulEngine.h
lang/Analysis/PathSensitive/SimulGraph.h
lang/Analysis/PathSensitive/SimulVertex.h
lang/Analysis/PathSensitive/StateVariant.h
lang/Analysis/ProgramEdge.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
lang/Basic/Diagnostic.h
lang/Basic/FileManager.h
lang/Basic/IdentifierTable.h
lang/Basic/LangOptions.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.h
lang/CodeGen/ModuleBuilder.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroExpander.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
lang/Sema/ASTStreamer.h
e9064e7d2ba2a867fdcc334fa5dd9b9b5c70cf67 29-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Fix an error in the base/idx accessors for ArraySubscriptExpr's that crops up with vector element access.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
33fd5c124aac15bab7cad95e4e0e7761356d2c06 29-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Fix an error in the base/idx accessors for ArraySubscriptExpr's that crops up with vector element access.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c257c0df2ed131339c32d69f8c0da15628acef1f 28-Dec-2007 Chris Lattner <sabre@nondot.org> Add accessors + iterator interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d18b3299debb7b0dbd9d34d9369189dc98c87f53 28-Dec-2007 Chris Lattner <sabre@nondot.org> Add accessors + iterator interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45378 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d57e9bfcceb57e62a46416e6154099c4102ed99c 22-Dec-2007 Ted Kremenek <kremenek@apple.com> Added (incomplete) implementation of SimulEngine, a worklist-based dataflow
solver for path-sensitive, intra-procedural analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulEngine.h
lang/Analysis/PathSensitive/SimulGraph.h
1cbb58f1e846f282679ce314307753dc1a76bb77 22-Dec-2007 Ted Kremenek <kremenek@apple.com> Added (incomplete) implementation of SimulEngine, a worklist-based dataflow
solver for path-sensitive, intra-procedural analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulEngine.h
lang/Analysis/PathSensitive/SimulGraph.h
050377b183597320de429520595686068b85fbe0 22-Dec-2007 Ted Kremenek <kremenek@apple.com> Converted Loc back to being of type ProgramEdge. Ultimately I believe we want
the ability to refer to the vertex set for all the vertices associated with an
edge. This will allow some nice queries over the graph, and (hopefully) will
reduce the memory footprint of SimulVertex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
30f790afe175c3d5dba7acd8bb31997da8773add 22-Dec-2007 Ted Kremenek <kremenek@apple.com> Converted Loc back to being of type ProgramEdge. Ultimately I believe we want
the ability to refer to the vertex set for all the vertices associated with an
edge. This will allow some nice queries over the graph, and (hopefully) will
reduce the memory footprint of SimulVertex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45299 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
e33b9c1b7bf714bb803dcd6bf724df9e43cd41e9 22-Dec-2007 Ted Kremenek <kremenek@apple.com> Added preliminary implementation of SimulGraph, which represents the
intra-procedural supergraph of a path-sensitive dataflow analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
0b506a11425daafe85ada555dd37da2d9fea76f0 22-Dec-2007 Ted Kremenek <kremenek@apple.com> Added preliminary implementation of SimulGraph, which represents the
intra-procedural supergraph of a path-sensitive dataflow analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45298 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulGraph.h
63376be78abc208c4a9b3cb03cec360b87df0b96 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
memory representation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
9db9bd9850aac7c90fc902307a742400c4d72d10 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
memory representation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
e74bc483d75be1065b81c87a11ff518316e6a0fe 21-Dec-2007 Ted Kremenek <kremenek@apple.com> SimulVertex now subclasses FoldingSetNode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
5facce90d015c3785d8052990ca88b7e4bf77892 21-Dec-2007 Ted Kremenek <kremenek@apple.com> SimulVertex now subclasses FoldingSetNode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45296 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
3752e70ab66261a1be0cb777256b5b10a49390b9 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Added Profile method to SimulVertex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
a3b859120923648dc91a0bc7e7c4e471abe10cef 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Added Profile method to SimulVertex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/SimulVertex.h
cdf8e84f5df032b9d47792ab88e91055228aa0a4 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Directory restructing of Analysis files.

Created include/clang/Analysis/Analyses directory.
- Moved LiveVariables.h and UninitializedValues.h into this dir.

Moved ExprDeclBitVector.h into Analysis/Support.

Updated all clients who use these headers to reflect the new paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/ExprDeclBitVector.h
lang/Analysis/LiveVariables.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/UninitializedValues.h
cf6e41baf2b23b6b56f0f79fff5554b7745737ac 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Directory restructing of Analysis files.

Created include/clang/Analysis/Analyses directory.
- Moved LiveVariables.h and UninitializedValues.h into this dir.

Moved ExprDeclBitVector.h into Analysis/Support.

Updated all clients who use these headers to reflect the new paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Analyses/LiveVariables.h
lang/Analysis/Analyses/UninitializedValues.h
lang/Analysis/ExprDeclBitVector.h
lang/Analysis/LiveVariables.h
lang/Analysis/Support/ExprDeclBitVector.h
lang/Analysis/UninitializedValues.h
5cc97646e41a6791beb443ad308cd0dca942e800 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed file AnalysisVertex.h to SimulVertex.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisVertex.h
lang/Analysis/PathSensitive/SimulVertex.h
7bb371da749a414c301562eee9d18da4d52aec86 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed file AnalysisVertex.h to SimulVertex.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45291 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisVertex.h
lang/Analysis/PathSensitive/SimulVertex.h
682d7d6cff97acbe9bfae86b1130cd56b9f5c049 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed class AnalysisVertex to SimulVertex


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisVertex.h
b3144968b6a99258327eef453b7d3e151e32b6ca 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed class AnalysisVertex to SimulVertex


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisVertex.h
cd71bf4d38c564db4147a53aad25adbc82406436 21-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> More objective-c type analysis. This time involving objective types
of conforming protocols (or not).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
d0c89c4609494e4aae0afb7704c35c0e9523f532 21-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> More objective-c type analysis. This time involving objective types
of conforming protocols (or not).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45276 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
04f2dcf671b4524d0412699220a9048b223d6752 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Added class "StateVariant", a template class which serves to wrap states that
are generated by transfer functions used by the path-sensitive dataflow solver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/StateVariant.h
eaac0b0d727a7fd5df08bd548ffdcfd354b91480 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Added class "StateVariant", a template class which serves to wrap states that
are generated by transfer functions used by the path-sensitive dataflow solver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/StateVariant.h
5caa75781d5cb1cb42999d8a8ff68f4376b200ec 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Added initial implementation of "AnalysisVertex", a class to represent a
location*state vertex in an intra-procedural, path-sensitive dataflow
supergraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisVertex.h
2a11a5f13aec18eb8c076bc2c3249afc932c921a 21-Dec-2007 Ted Kremenek <kremenek@apple.com> Added initial implementation of "AnalysisVertex", a class to represent a
location*state vertex in an intra-procedural, path-sensitive dataflow
supergraph.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45272 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/AnalysisVertex.h
8782907922eb4311cd1ae35703695f9499a14362 20-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to do type-checking for objctive-c's object types.
More is yet to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
c395bda57a0b2f6d8433a462caa780a7dcb7307b 20-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to do type-checking for objctive-c's object types.
More is yet to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45263 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3900a1d8cc0ee7815f928dd588032d5b29166269 20-Dec-2007 Chris Lattner <sabre@nondot.org> add accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
18b2515e1bf8c86a4900792692e42fe1296be28d 20-Dec-2007 Chris Lattner <sabre@nondot.org> add accessor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45262 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0fcdfd48a9c2ed3903f8eb70316ec506a9c821cf 20-Dec-2007 Seo Sanghyeon <sanxiyn@gmail.com> Add newline

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
7360f9f2a5445064ae9728d19245104600886235 20-Dec-2007 Seo Sanghyeon <sanxiyn@gmail.com> Add newline

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
73bb782e7409719aa45626220429204e3847dda3 20-Dec-2007 Chris Lattner <sabre@nondot.org> Fix trivial self-infinite-recursion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
7697b5c5a918729718da9ecd9e374bbd973a69e9 20-Dec-2007 Chris Lattner <sabre@nondot.org> Fix trivial self-infinite-recursion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
5319d9cf6aa4db4992d7c426d0fabfec0a49011a 20-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7359f04a80cae1dcbd944ee07eb50a27ce7f5077 20-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> More objective-c typechecking stuff. This is work in progress and more patches
are due to arrive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45244 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c338e4cc44f426e11866caf0d8409d2684851454 20-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed "FileEntry::getDev()" to "FileEntry::getDevice()"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
7f1752797d4a4344b539ad9452471871c0eec64b 20-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed "FileEntry::getDev()" to "FileEntry::getDevice()"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45240 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
7c8d1afe531dc6c6a8d88fb161a84c7eb2730f01 20-Dec-2007 Chris Lattner <sabre@nondot.org> implement semantic analysis for __builtin_islessequal and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
1b9a0793955070738cac6f04b5abe9496be9b317 20-Dec-2007 Chris Lattner <sabre@nondot.org> implement semantic analysis for __builtin_islessequal and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45239 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d41db190ddfe4eecc2c97da9a4c50253beec1ad9 20-Dec-2007 Ted Kremenek <kremenek@apple.com> Added method getFileEntryForID() to SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
97394f23ca55c35beaa1538e446e5154f311f49c 20-Dec-2007 Ted Kremenek <kremenek@apple.com> Added method getFileEntryForID() to SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
5333a6b1be5e1df8217a1997cc1958efd7d2f0dc 20-Dec-2007 Chris Lattner <sabre@nondot.org> Add iterator interface to function/method parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
d57f635d520e8cb5b93d3d770ff58db06c62de54 20-Dec-2007 Chris Lattner <sabre@nondot.org> Add iterator interface to function/method parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45233 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
6d1d3ac57f9ed8cad6755ab73b201e85ef8b3fda 20-Dec-2007 Ted Kremenek <kremenek@apple.com> Added methods createMainFileID() and createMainFileIDForMemBuffer() to
SourceManager to allow SourceManager to directly intern the MainFileID
when it is created. Removed setMainFileID().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
1036b68525f39cb69ac22c679ed440acd8392a16 20-Dec-2007 Ted Kremenek <kremenek@apple.com> Added methods createMainFileID() and createMainFileIDForMemBuffer() to
SourceManager to allow SourceManager to directly intern the MainFileID
when it is created. Removed setMainFileID().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45231 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
17861c5ed9cb5eab947d99520a6ef9c706e65dbc 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Interned MainFileID within SourceManager. Since SourceManager is referenced by
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Lex/Preprocessor.h
lang/Sema/ASTStreamer.h
95041a2029a069386ee67439f6d0fb524a9d184f 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Interned MainFileID within SourceManager. Since SourceManager is referenced by
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Lex/Preprocessor.h
lang/Sema/ASTStreamer.h
0fd6e49fb57aea918976cef1119797ba2248c79b 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Typo fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
7dcc968f17a6ff9088c9651dddccc8d4025a1271 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Typo fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
2578dd0ff5f589c79bfb55d4c1a7bddc2c69ac53 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Added storage of the FileID of the the main source file of a translation unit
in SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
76edd0e4ae0592a7225d50d0bad6732ac64dca2a 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Added storage of the FileID of the the main source file of a translation unit
in SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45225 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
74273de1e1c97b860e811d4917f11e1bfe6e0120 19-Dec-2007 Steve Naroff <snaroff@apple.com> Various tweaks to the get/lookup instance/class method API's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
94a5c3334bba3cc8cd1da85ba1118bc2c080add9 19-Dec-2007 Steve Naroff <snaroff@apple.com> Various tweaks to the get/lookup instance/class method API's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45224 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d890f6a31b4814021ccaf8f2d82667a061b23bd5 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed "SourceFile" from TranslationUnit. This same information will (soon)
be available by querying the SourceManager within the ASTContext referenced by
the TranslationUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
fdfc198013c372c41669957639eac56d27fd57f4 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed "SourceFile" from TranslationUnit. This same information will (soon)
be available by querying the SourceManager within the ASTContext referenced by
the TranslationUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45223 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
c0f6b22f9985a19805ee41c9f2a551340886c742 19-Dec-2007 Chris Lattner <sabre@nondot.org> Add support for #pragma mark, which shouldn't warn about bogus tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
2243449253475574fc6f14986ff8f7fce5d46799 19-Dec-2007 Chris Lattner <sabre@nondot.org> Add support for #pragma mark, which shouldn't warn about bogus tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ab74937a9a27abd5b5ca8456e0bd4f19f1f76a42 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed storing inode and device number in TranslationUnit.

Added "SourceFile" string to TranslationUnit to record corresponding
source file.

Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
63ea863d4715249551ab10ae207386ddc383419e 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed storing inode and device number in TranslationUnit.

Added "SourceFile" string to TranslationUnit to record corresponding
source file.

Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
89296c5e0beffc12f0e604716a53f2b19ed4903f 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Updated locations of TranslationUnit.[cpp,h] in XCode project.
Added AST/ASTConsumer.cpp to XCode project.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
9dadf5a3ffe04bfe7c00668557a947b5d474268b 19-Dec-2007 Ted Kremenek <kremenek@apple.com> Updated locations of TranslationUnit.[cpp,h] in XCode project.
Added AST/ASTConsumer.cpp to XCode project.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45206 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
957442db1d23f62ee2d0d71310bee240606b267d 19-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> This patch concludes implementation of dynamic objective-c type qualified by
protocol list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
411f373abf5692a1bd90d35a139d955fa67ae82d 19-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> This patch concludes implementation of dynamic objective-c type qualified by
protocol list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
e4e5e26d50a11cd848c54028599f3fdebfafa96b 19-Dec-2007 Steve Naroff <snaroff@apple.com> Emit errors when attempting to rewrite ObjC expressions that originate from a macro expansion.

We plan on fixing this and removing this restriction after the break...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5ca4020c6e1e4f8d81cf4c2890ca8a7c0dd28d56 19-Dec-2007 Steve Naroff <snaroff@apple.com> Emit errors when attempting to rewrite ObjC expressions that originate from a macro expansion.

We plan on fixing this and removing this restriction after the break...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6ad7e885c1ef78f9d4ff957b4dd85047e889ea71 19-Dec-2007 Chris Lattner <sabre@nondot.org> Implement C99 6.7.5.3p1


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
cd8812948bc8a65dcf10c541c1775e5ba44def6c 19-Dec-2007 Chris Lattner <sabre@nondot.org> Implement C99 6.7.5.3p1


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45188 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c94f9092eb2032a21aad48b454260483eae55c35 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Refactored inode and device number into FileEntry, and changed the
ADT storing FileEntry's in FileManager from a map to a set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
bca6d125c77c93c7fa41798c15348175a6bb1267 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Refactored inode and device number into FileEntry, and changed the
ADT storing FileEntry's in FileManager from a map to a set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45184 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
eccf070720b0db3d1ab9b55aca49347b927afda5 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile
respectively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
dca29279d724a5a84343d27644e7ba172570079f 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile
respectively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
c863207fa9c8b0bea3b99f381914db3c8e2a0b1d 18-Dec-2007 Steve Naroff <snaroff@apple.com> Fix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean undefined, we need to change the respective getters from unsigned->int.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
49747fdd0a05dfc1f15910267d6f86dfe83e6fc8 18-Dec-2007 Steve Naroff <snaroff@apple.com> Fix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean undefined, we need to change the respective getters from unsigned->int.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3f08f18630d9a41a933051510f9dd74604b1b43e 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Moved TranslationUnit.h to include path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
9765ec210b8df446fd591ebbac848d805f7d4836 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Moved TranslationUnit.h to include path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45176 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TranslationUnit.h
dcb2b1e489948a570ee07ca65e12d42edffa20ef 18-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
d58fabf7ed279be18a5e82617f809c9deff9be67 18-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
3e2dcaac0891017f356faeda2945cc497ed4b299 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Added to FileEntry a pointer to the <dev_t,ino_t> pair for the file, and
accessors to FileEntry to query these values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
da9954400aab56bc3df60eb1b7be2489121c6166 18-Dec-2007 Ted Kremenek <kremenek@apple.com> Added to FileEntry a pointer to the <dev_t,ino_t> pair for the file, and
accessors to FileEntry to query these values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
0448b4f2fecceebc0bddd67fe0f2c89afe604fdf 18-Dec-2007 Chris Lattner <sabre@nondot.org> remove the loc argument to Type::isConstantSizeType, which isn't useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
9bfa73c5ab7bf4b0e749d04f29da6884e8d5bd9f 18-Dec-2007 Chris Lattner <sabre@nondot.org> remove the loc argument to Type::isConstantSizeType, which isn't useful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45155 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6df9359cad97dc722c01e3ddbc6686ebcf21189c 18-Dec-2007 Chris Lattner <sabre@nondot.org> Fix const propagation bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6e999782a102eb444cfc7b8eaa64f84911fdcf4f 18-Dec-2007 Chris Lattner <sabre@nondot.org> Fix const propagation bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45152 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f258a0f7ad1d658c249488382d34f21c35f390e2 18-Dec-2007 Steve Naroff <snaroff@apple.com> Add __private_extern__ keyword and recognize it. Added a FIXME to indicate there is still work to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
8d54bf2e280bdfc917e7faacbf99ae477d8aa6db 18-Dec-2007 Steve Naroff <snaroff@apple.com> Add __private_extern__ keyword and recognize it. Added a FIXME to indicate there is still work to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45135 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
78ee226e9da7aa94293501521d0e3ecc6c2269c5 17-Dec-2007 Chris Lattner <sabre@nondot.org> implement enough helper functions to successfully dump out the
contents of the header map. Look ma, no assumptions about input data
here (aka, corrupt header maps can't crash the compiler - crazy thought).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
1adbf6349d4701771a814542008386ad39e3d614 17-Dec-2007 Chris Lattner <sabre@nondot.org> implement enough helper functions to successfully dump out the
contents of the header map. Look ma, no assumptions about input data
here (aka, corrupt header maps can't crash the compiler - crazy thought).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45122 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
e76e8416ff29ee39140b64ed47731237c67434ae 17-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to implemented objective-c's dynamic object pointer qualified with
the protocol list (id<P,...> types).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
c569249ca0ab755ac79d8cbbfcb2bcae19743624 17-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to implemented objective-c's dynamic object pointer qualified with
the protocol list (id<P,...> types).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45121 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
22387e196a19662752e52789a202e2c10ec98ed6 17-Dec-2007 Chris Lattner <sabre@nondot.org> Finish hooking up the scaffolding for headermaps. They can now do everything
except resolve lookups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
98751314c4ba596860b574c3d3551030f01ff7d8 17-Dec-2007 Chris Lattner <sabre@nondot.org> Finish hooking up the scaffolding for headermaps. They can now do everything
except resolve lookups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45111 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
9af36d3a23be82668281ebbf9e3030adc6193b3d 17-Dec-2007 Chris Lattner <sabre@nondot.org> Start reading the headermap header, drop the 'errorstr' argument to
the create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
1bfd4a6313ea8ebf710c46c10111732cc65d51f6 17-Dec-2007 Chris Lattner <sabre@nondot.org> Start reading the headermap header, drop the 'errorstr' argument to
the create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
1df68f9c8ca691c7341625fa08b673ae52fbecd0 17-Dec-2007 Chris Lattner <sabre@nondot.org> Sink getName into DirectoryLookup to simplify the client in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
3af66a9335966e9114e660cf7aafbb9272190ec2 17-Dec-2007 Chris Lattner <sabre@nondot.org> Sink getName into DirectoryLookup to simplify the client in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
6707f27fc045df4c44024cd0290dd1f68f9ab06c 17-Dec-2007 Chris Lattner <sabre@nondot.org> add headermap.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
0f441ab20ccd8d21fd3d034de866bfcaf6cb72b2 17-Dec-2007 Chris Lattner <sabre@nondot.org> add headermap.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45095 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
61349712347a36a87257625dcb4f830a59ac1f65 17-Dec-2007 Chris Lattner <sabre@nondot.org> finish stubbing out support for HeaderMap. Now we just need an implementation!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
b09e71fd52d0e7fdf3e88b1df72ea0cee5d9b37b 17-Dec-2007 Chris Lattner <sabre@nondot.org> finish stubbing out support for HeaderMap. Now we just need an implementation!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderMap.h
7d0ad4a8cb4d596bef4ffb6f8e63afe1a9161aa8 17-Dec-2007 Chris Lattner <sabre@nondot.org> refactor an better comment framework lookup code. This moves it from
HeaderSearch into DirectoryLookup, as a particular framework lookup is
specific to the directory we are currently querying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
afded5bbb85607023c710c3d6a96c372feb84d7f 17-Dec-2007 Chris Lattner <sabre@nondot.org> refactor an better comment framework lookup code. This moves it from
HeaderSearch into DirectoryLookup, as a particular framework lookup is
specific to the directory we are currently querying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
b74267886889242367f2665a91529b097554ac3a 17-Dec-2007 Chris Lattner <sabre@nondot.org> as it turns out, frameworks and headermaps are orthogonal. Make this so in
the internal representation. This also fixes a bug where -I foo -F foo would
not search foo as both a normal and framework include dir.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
df772336655fd84ee2c0ce514c93cef0b29d60d4 17-Dec-2007 Chris Lattner <sabre@nondot.org> as it turns out, frameworks and headermaps are orthogonal. Make this so in
the internal representation. This also fixes a bug where -I foo -F foo would
not search foo as both a normal and framework include dir.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
cf33e93a9f9d6d04d0cfc3b565c395a501bc5b4d 17-Dec-2007 Chris Lattner <sabre@nondot.org> teach RemoveDuplicates about header maps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
b94c707350ee2099996a80c8d97f28b61ff98c7b 17-Dec-2007 Chris Lattner <sabre@nondot.org> teach RemoveDuplicates about header maps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
c2043bffa47bf90087652a673efa22aa1f5c4500 17-Dec-2007 Chris Lattner <sabre@nondot.org> Step #1 in adding headermap support to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
822da61b74ce14e89b3fa8774db18c833aa5748b 17-Dec-2007 Chris Lattner <sabre@nondot.org> Step #1 in adding headermap support to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45089 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderMap.h
lang/Lex/HeaderSearch.h
6d7ea52e0877109e4be0969d83b6071fbc314529 15-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed "isSizeOfExpr" mode from StmtIterator. It turned out not to be
so useful and introduced a few bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
f816f77480e70caadfdbd741cf17d84a6be30b71 15-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed "isSizeOfExpr" mode from StmtIterator. It turned out not to be
so useful and introduced a few bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
e726eb4f743e253c666958e2517479e305e9cfcb 15-Dec-2007 Ted Kremenek <kremenek@apple.com> Added "mode" to StmtIterator to record if the expression being iterated
over is the subexpression of a sizeof(expression). Different clients
will wish to handle iteration over such subexpressions differently, and can
now easily query if they are iterating over such statements using the
StmtIterator's inSizeOfExpr().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
b51d2b2d5497693783338c58dd778b6427e85ba7 15-Dec-2007 Ted Kremenek <kremenek@apple.com> Added "mode" to StmtIterator to record if the expression being iterated
over is the subexpression of a sizeof(expression). Different clients
will wish to handle iteration over such subexpressions differently, and can
now easily query if they are iterating over such statements using the
StmtIterator's inSizeOfExpr().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
2ce399af4d1d1e32b32241b284f41484d810ffa6 15-Dec-2007 Steve Naroff <snaroff@apple.com> - Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class.
- Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage.
- Various changes to convert all clients to the above API's...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
58dbdeb69c063f82d644504fc638120198f7fad2 15-Dec-2007 Steve Naroff <snaroff@apple.com> - Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class.
- Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage.
- Various changes to convert all clients to the above API's...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b7cf09564c2681feac87ffa509dab98174e6ea06 14-Dec-2007 Ted Kremenek <kremenek@apple.com> Added support to StmtIterator to traverse the size expression of a VLA type
declared in a sizeof. For example:

sizeof(int[foo()]);

the expression "foo()" is an expression that is executed during the evaluation
of sizeof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
699e9fbeae34cdd651b8e6308649c8939f090cbd 14-Dec-2007 Ted Kremenek <kremenek@apple.com> Added support to StmtIterator to traverse the size expression of a VLA type
declared in a sizeof. For example:

sizeof(int[foo()]);

the expression "foo()" is an expression that is executed during the evaluation
of sizeof.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45043 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
0c2f214d3500d1d080afa36b96db40407b91e70d 13-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to make ObjcQualifiedInterfaceType inherit ObjcInterfaceType



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
06cef25d0b8c383217413f061441c7ea40d1052b 13-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to make ObjcQualifiedInterfaceType inherit ObjcInterfaceType



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
54e10418b0a93e9c5e902254cae018f6990b72d5 13-Dec-2007 Chris Lattner <sabre@nondot.org> add some builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
99852af849df426018ba84d28b3a8f621dbf9e60 13-Dec-2007 Chris Lattner <sabre@nondot.org> add some builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
e33928b6572c72f7fe87b57db4f8ae3ed7baa9f1 13-Dec-2007 Ted Kremenek <kremenek@apple.com> Updated serialization of ParmVarDecl to serialize out objcDeclQualifier.
Previously this field was serialized out in VarDecl (a parent class), but
now the field belongs to ParmVarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
137bd91e8ef5fb407dce910704101bf730b13696 13-Dec-2007 Ted Kremenek <kremenek@apple.com> Updated serialization of ParmVarDecl to serialize out objcDeclQualifier.
Previously this field was serialized out in VarDecl (a parent class), but
now the field belongs to ParmVarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7208a4b192e4ea66009267cdc56cc0b3ba77cac3 13-Dec-2007 Chris Lattner <sabre@nondot.org> add a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
53702cd401b8fdca985aede7732c2f6a82ad9b1c 13-Dec-2007 Chris Lattner <sabre@nondot.org> add a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44976 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
2e1eb2049a9823869b8d96ea400c9098acd85509 13-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Moved ObjcDeclQualifier to ParmVarDecl from VarDecl.
Ted, this change necessitates (de)/serialization of ParmVarDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
de7b4cd12d0d1d3bb781a6633c46131747c8dc27 13-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Moved ObjcDeclQualifier to ParmVarDecl from VarDecl.
Ted, this change necessitates (de)/serialization of ParmVarDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44972 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d7f64cde88c04e9f4a2c6295bf797fa31921296c 12-Dec-2007 Ted Kremenek <kremenek@apple.com> TargetInfo no longer includes a reference to SourceManager.

Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:

FullLoc.getManager().someMethod(FullLoc.getLocation());

instead we have:

FullLoc.someMethod();

Modified TextDiagnostics (and related classes) to use this short-hand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Diagnostic.h
lang/Basic/SourceLocation.h
lang/Basic/TargetInfo.h
lang/Parse/DeclSpec.h
9c728dc4d8da89c73fcae74c9e72d7a83ffd7b6d 12-Dec-2007 Ted Kremenek <kremenek@apple.com> TargetInfo no longer includes a reference to SourceManager.

Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:

FullLoc.getManager().someMethod(FullLoc.getLocation());

instead we have:

FullLoc.someMethod();

Modified TextDiagnostics (and related classes) to use this short-hand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Diagnostic.h
lang/Basic/SourceLocation.h
lang/Basic/TargetInfo.h
lang/Parse/DeclSpec.h
239192354804a1a9a231fe6b7d2b4f0eb164743b 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed "NULL" from default construction of FullSourceLoc (compilation errors on
some systems).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
21584fe015705ca1ea2d852b7ad188c4baf9ffcf 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed "NULL" from default construction of FullSourceLoc (compilation errors on
some systems).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
c92da85bbc99797721d80dcfa6c9914e78a76c67 12-Dec-2007 Ted Kremenek <kremenek@apple.com> constified getFullLoc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
e0579f08d4a4ae57971b74ca1863106df4c6399f 12-Dec-2007 Ted Kremenek <kremenek@apple.com> constified getFullLoc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
6bdf7e428e37a6274d20f0776e0893c9e753e1c3 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Changes to FullSourceLoc:
- Added cstor that takes no arguments to create an "invalid" location.
- Removed non-const version of getSourceManager().
- Renamed getSourceManager() to getManager.
- Remover operator SourceLocatio().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
1b924fd6a9730e7de1b175fb82434de6e7e0f0f8 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Changes to FullSourceLoc:
- Added cstor that takes no arguments to create an "invalid" location.
- Removed non-const version of getSourceManager().
- Renamed getSourceManager() to getManager.
- Remover operator SourceLocatio().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44950 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
718ba816fc383128aaa39f001937b42d8c128275 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed getFullSourceLoc() -> getFullLoc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
2a2da1d0522b59c8c56f97a8607106be977a14af 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed getFullSourceLoc() -> getFullLoc().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44949 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
db87dfe7db4de738a4a6ec3e37b447a5535a43c4 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Added method: Preprocessor::getFullSourceLoc. Used by clients of Preprocessor
to get a FullSourceLoc from a SourceLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ea8646993741739d8a04d67396fe466dcc3a104f 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Added method: Preprocessor::getFullSourceLoc. Used by clients of Preprocessor
to get a FullSourceLoc from a SourceLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
ae9a97798bba8a1ddd7cbd50ede549515ad6bd2d 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed FullContextSourceLocation to FullSourceLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
e03a2f39accad260c021b7f24f082363578e7a93 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed FullContextSourceLocation to FullSourceLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44947 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
2e941fa862f9cc78fa51a93a6cde9ec11751d62e 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Added utility static method to FullContextSourceLocation
for creating "invalid" location objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
b71d5f8111d750ba4b3c70aee45bf04a081c6329 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Added utility static method to FullContextSourceLocation
for creating "invalid" location objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44946 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
847de6f7b3aec443adc2d093efde67bae54c770a 12-Dec-2007 Chris Lattner <sabre@nondot.org> make it a bit more clear in what way the ivar is consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0e391052d74eaff4de2ac15a7194673d39444b5b 12-Dec-2007 Chris Lattner <sabre@nondot.org> make it a bit more clear in what way the ivar is consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44945 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c26188aa9644a3575a86966d675972577ca1bde2 12-Dec-2007 Chris Lattner <sabre@nondot.org> add an ivar_size() method that never returns -1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
5564e07af5e62875f3b83fc2e5a8823588b5adea 12-Dec-2007 Chris Lattner <sabre@nondot.org> add an ivar_size() method that never returns -1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44944 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9efc035aedaabaddf1a58ca0b65da129d107c857 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Constified a predicate method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
25bb23aa20b69b107bbb4526b2d156599c2434ca 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Constified a predicate method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
e1c6ea71e47f9f28e2ca7702ebae304abcff5c23 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Added class FullContextSourceLocation: a tuple class that
contains both a SourceLocation and its associated
SourceManager. This class is useful for argument passing to
functions that expect both objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
a9793ed6a77946c988ee38035baf4cde6ff2e864 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Added class FullContextSourceLocation: a tuple class that
contains both a SourceLocation and its associated
SourceManager. This class is useful for argument passing to
functions that expect both objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44942 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
38591a27d9bde16a0c337d5400fb146fca964e57 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Moved construction of TargetInfo objects out of the Driver
and into the "Basic" library. TargetInfo objects are now
constructed from triples by calling the static method
TargetInfo::CreateTargetInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
bbced580c92afa09cd4423a9bdc90ff61cb1e79a 12-Dec-2007 Ted Kremenek <kremenek@apple.com> Moved construction of TargetInfo objects out of the Driver
and into the "Basic" library. TargetInfo objects are now
constructed from triples by calling the static method
TargetInfo::CreateTargetInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
69b38e8c570cf37dac82e9cc0c735f12b9bec3f8 12-Dec-2007 Chris Lattner <sabre@nondot.org> handle the -1'ness of undefined lists


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
23c3bb768fd3eb24ff1a7402856405129afac0e3 12-Dec-2007 Chris Lattner <sabre@nondot.org> handle the -1'ness of undefined lists


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9d76c72cd3748d1b1e105129614220cea8d665af 12-Dec-2007 Chris Lattner <sabre@nondot.org> unbreak the build. I'm still working on test failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
4c52509ffb9fdd6c93aa7b50812e316f1d920a26 12-Dec-2007 Chris Lattner <sabre@nondot.org> unbreak the build. I'm still working on test failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44938 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
c7b06750b64b3898d5bcbaf68dcdd9ba0aba9f40 12-Dec-2007 Chris Lattner <sabre@nondot.org> more cleanups changing things like getInstanceVariables to iterators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
be6df088d69bca0e99c7845a6cd8c1ca85034f31 12-Dec-2007 Chris Lattner <sabre@nondot.org> more cleanups changing things like getInstanceVariables to iterators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
dea5bece2eca7fcfa93656588cf6d5535fb65897 12-Dec-2007 Chris Lattner <sabre@nondot.org> resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ab4c4d5e5ececa77aae7e291fafcba3049319cdc 12-Dec-2007 Chris Lattner <sabre@nondot.org> resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44927 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ac9ab53d381740181c97506d8a1c95b11d9bef1f 12-Dec-2007 Chris Lattner <sabre@nondot.org> start cleaning up interfaces for objc bits and pieces by switching to an
iterator interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0157c5144513438bb74aebf50d18f95df4104acb 12-Dec-2007 Chris Lattner <sabre@nondot.org> start cleaning up interfaces for objc bits and pieces by switching to an
iterator interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44926 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ddd3e63a9b951abcd6b2731d79e3902ab515e574 12-Dec-2007 Chris Lattner <sabre@nondot.org> Add ObjC parser support for concatenated ObjC strings. Note that
this is passed to sema and ignored there, so the second part of the
string will not make it into the AST. Passing to Fariborz to finish
Sema + AST construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
b3a99cd5bcaeff0c5ff6a60788b5eb68e52a3953 12-Dec-2007 Chris Lattner <sabre@nondot.org> Add ObjC parser support for concatenated ObjC strings. Note that
this is passed to sema and ignored there, so the second part of the
string will not make it into the AST. Passing to Fariborz to finish
Sema + AST construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
12519d477514bb7c7ff3431211f43d08e15e3966 12-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Implemented type checking for pointer of objects of protocol-qualified types.
Note that incompatible-protocol-qualified-types.m is currently failing. This is
unrelated to this patch and Steve is looking at the general problem of not reporting
incompitible pointer types in return stetement..


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4ffc54111fdc0baa45bb287f59774e06dea8caa4 12-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Implemented type checking for pointer of objects of protocol-qualified types.
Note that incompatible-protocol-qualified-types.m is currently failing. This is
unrelated to this patch and Steve is looking at the general problem of not reporting
incompitible pointer types in return stetement..


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
de79f79ec5c281d13b992494139ce25762afee65 11-Dec-2007 Ted Kremenek <kremenek@apple.com> Modified the internals of Diagnostic and DiagnosticClient to use
SourceManager*'s instead of SourceManager&'s. This allows the client specify a
NULL SourceManager when using a default constructed SourceLocation. Thus the
SourceManager can be NULL when the SourceLocation's isValid() == false.

The interface to most clients of Diagnostic remains the same.
Diagnostic::Report() is overload to either accept a SourceLocation and a
SourceManager&, or neither. Thus clients that do not have a SourceManager
cannot specify a SourceLocation.

Modified TextDiagnostics* to use this new interface.
Modified the driver to not passed in SourceManager when warning about "-I-".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
2eefd8657c233bc7c9330acfe475fc270bbe7cab 11-Dec-2007 Ted Kremenek <kremenek@apple.com> Modified the internals of Diagnostic and DiagnosticClient to use
SourceManager*'s instead of SourceManager&'s. This allows the client specify a
NULL SourceManager when using a default constructed SourceLocation. Thus the
SourceManager can be NULL when the SourceLocation's isValid() == false.

The interface to most clients of Diagnostic remains the same.
Diagnostic::Report() is overload to either accept a SourceLocation and a
SourceManager&, or neither. Thus clients that do not have a SourceManager
cannot specify a SourceLocation.

Modified TextDiagnostics* to use this new interface.
Modified the driver to not passed in SourceManager when warning about "-I-".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b3ee1931bdd9322d3e29b7d104273eced454844c 11-Dec-2007 Ted Kremenek <kremenek@apple.com> Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.

Modified all users of Diagnostics to comply with this new interface.

Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).

Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Diagnostic.h
lang/Basic/TargetInfo.h
lang/Parse/DeclSpec.h
7a9d49fd2bfac00e905b361ba76d26ab5b6c3b09 11-Dec-2007 Ted Kremenek <kremenek@apple.com> Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.

Modified all users of Diagnostics to comply with this new interface.

Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).

Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/Diagnostic.h
lang/Basic/TargetInfo.h
lang/Parse/DeclSpec.h
9a3dedfe1e7680bd985a5e125b183136766cff94 11-Dec-2007 Chris Lattner <sabre@nondot.org> properly namespacify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
fb344d3ddd538746be75941d50b78ff148441abc 11-Dec-2007 Chris Lattner <sabre@nondot.org> properly namespacify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
1a4a74f4fe25144d11fb507a532dcf44196c1f9e 11-Dec-2007 Steve Naroff <snaroff@apple.com> Change err_undef_protocolref to warn_undef_protocolref (this is consistent with GCC).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
afedd225ffcbe39aee080ef7b7245d26dbb0ce58 11-Dec-2007 Steve Naroff <snaroff@apple.com> Change err_undef_protocolref to warn_undef_protocolref (this is consistent with GCC).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
962212dbd2a11bc4e6148681a6fad9a4dd75074a 11-Dec-2007 Ted Kremenek <kremenek@apple.com> Fixed bug in CFG::PopulateBlkExprMap where the ordering
between fetching the size of the expression map (for use as
the next integer id for an Expr*) and the creation of the
entry in the map could be non-deterministic. This could
cause the size of the map to be incremented prior to the
index being determine.

On Linux the map entry would be created first, causing the
map to the "size" to be incremented prior to it being
queried. On Mac OS X we had the reverse behavior. Now the
size is always queried prior to the new id being inserted
into the map.

This was the real cause of the bit-overrun triggered in
PR 1847:

http://llvm.org/bugs/show_bug.cgi?id=1847

Also reverted the change in patch 44813, which was a bogus
fix to this problem:

http://llvm.org/viewvc/llvm-project?rev=44813&view=rev


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
9a8385d6653a50169284fa031be287645ae4b114 11-Dec-2007 Ted Kremenek <kremenek@apple.com> Fixed bug in CFG::PopulateBlkExprMap where the ordering
between fetching the size of the expression map (for use as
the next integer id for an Expr*) and the creation of the
entry in the map could be non-deterministic. This could
cause the size of the map to be incremented prior to the
index being determine.

On Linux the map entry would be created first, causing the
map to the "size" to be incremented prior to it being
queried. On Mac OS X we had the reverse behavior. Now the
size is always queried prior to the new id being inserted
into the map.

This was the real cause of the bit-overrun triggered in
PR 1847:

http://llvm.org/bugs/show_bug.cgi?id=1847

Also reverted the change in patch 44813, which was a bogus
fix to this problem:

http://llvm.org/viewvc/llvm-project?rev=44813&view=rev


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
cb69fb7e1aa5ae6627e993c6b39fa3c66e0ea36c 10-Dec-2007 Steve Naroff <snaroff@apple.com> Add support for initializing char arrays from string literals.

Adapted from a patch by Anders Carlsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2fdc3749097a581567dbd9fe66c48c0458bd3e34 10-Dec-2007 Steve Naroff <snaroff@apple.com> Add support for initializing char arrays from string literals.

Adapted from a patch by Anders Carlsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c3ec0a785e2c1707def7be0c21c335f9edf29993 10-Dec-2007 Ted Kremenek <kremenek@apple.com> Fixed off-by-one-error when resizing Bitvectors used for
dataflow analysis over expressions and decls.

This should fix bug 1847:

http://llvm.org/bugs/show_bug.cgi?id=1847

Thanks to Török Edwin for providing a test case that
identified the problem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
76315cabb3d65145dd1f49696c725c04df378cd5 10-Dec-2007 Ted Kremenek <kremenek@apple.com> Fixed off-by-one-error when resizing Bitvectors used for
dataflow analysis over expressions and decls.

This should fix bug 1847:

http://llvm.org/bugs/show_bug.cgi?id=1847

Thanks to Török Edwin for providing a test case that
identified the problem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44813 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
c55a288e30894fbe804aad36581df1d7bf327aed 10-Dec-2007 Anders Carlsson <andersca@mac.com> Revert change that broke the build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
05f753b996a6ea712ab06787190fb3287610fc59 10-Dec-2007 Anders Carlsson <andersca@mac.com> Revert change that broke the build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44808 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
e8b36072c2d8b1577f1d03c364492c7689207ddb 10-Dec-2007 Anders Carlsson <andersca@mac.com> Address comments from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
c099b9a94f52f9d2c9135cfcfbc32bc17401500b 10-Dec-2007 Anders Carlsson <andersca@mac.com> Address comments from Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
7484e11f3388384be75237ca032161961a22bc93 10-Dec-2007 Anders Carlsson <andersca@mac.com> Forgot this file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
c916d70e0b65bbf6c2800e2818995ab1ce31388e 10-Dec-2007 Anders Carlsson <andersca@mac.com> Forgot this file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44790 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/TargetBuiltins.h
e1449c127b59bae6266b307ec551e67c9558967c 10-Dec-2007 Anders Carlsson <andersca@mac.com> Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PPCBuiltins.def
lang/AST/X86Builtins.def
564f1de67d7ba43646b8740db86d6269e3dfbe0b 10-Dec-2007 Anders Carlsson <andersca@mac.com> Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44748 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PPCBuiltins.def
lang/AST/X86Builtins.def
f6da2916d4691154254e51bf970ff336d25a8e95 09-Dec-2007 Chris Lattner <sabre@nondot.org> Implement correct semantic analysis of subtractions, implementing
C99 6.5.6.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6e4ab61300e77f3cc303046c0107b8a961d7dc66 09-Dec-2007 Chris Lattner <sabre@nondot.org> Implement correct semantic analysis of subtractions, implementing
C99 6.5.6.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44746 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c0f7c51c02d5ebf867b1794980d2b7f3a13c5633 09-Dec-2007 Chris Lattner <sabre@nondot.org> Add dumping support for locations, make -dumptokens print out the location
info of each token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44741 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
c3d8d57b010e2ed15a2a7685d5761db14f5d2252 09-Dec-2007 Chris Lattner <sabre@nondot.org> Add dumping support for locations, make -dumptokens print out the location
info of each token.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44741 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
333052c8f19ae074707208a23ef66e7bf09e5ebd 08-Dec-2007 Anders Carlsson <andersca@mac.com> Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
44fe49c9ccf29b8e9b66ce1f2375be6ec591c03c 08-Dec-2007 Anders Carlsson <andersca@mac.com> Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
be4283cec1365a49e88859586c7caea491501892 07-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Implemented when static typing is combined with protocols and use as receiver
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7dd82836dca87cf828ce994f161b53a34f6cdb7e 07-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Implemented when static typing is combined with protocols and use as receiver
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3b1caacf673de9811fea28268f33707b24a1d759 07-Dec-2007 Steve Naroff <snaroff@apple.com> Rewrite 'super' within a class method. This required some minor tweaks to the front-end.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9bcb5fc1fd48c1f40c6a3b5a59130ebc313b4957 07-Dec-2007 Steve Naroff <snaroff@apple.com> Rewrite 'super' within a class method. This required some minor tweaks to the front-end.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44673 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b4452ed9cfeba4dfbb9155b828e2b052dbd6cdbf 07-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to implement "Protocol" as a built-in type declared as
"@class Protocol;"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
66c5dfc193c4090b67c5effb0e80e287b94de17e 07-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to implement "Protocol" as a built-in type declared as
"@class Protocol;"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
cb1262c45ad249a93e5566c38bcc743d82e72a7d 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
491420984f3276fdc1343ab399d9afe199f9828d 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
3102df94d63800bf0dbfbf7ede77c86848d4244b 05-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to prevent crash on use of objc2 syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5ef404f08b42c58fd8d4c93d1672ab28f61befa6 05-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to prevent crash on use of objc2 syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a8897f00c3e8bee75e248feb9ad6fafbd541e264 05-Dec-2007 Anders Carlsson <andersca@mac.com> Implement codegen for builtin infinity functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
c8ee7988c4ea9ec784625d2a47a8575feb191421 05-Dec-2007 Anders Carlsson <andersca@mac.com> Implement codegen for builtin infinity functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
1defb8d5ad19aeafd348b63463abd3844908ccf8 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of: ObjCEncodeExpr, ObjCSelectorExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8f6dc77d1fa6c9fd71d26c96bfa007775d8e3905 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of: ObjCEncodeExpr, ObjCSelectorExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44593 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bc54abfb6bf59fbc6b30e82d146fb69753e030e3 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed SourceManager::Read to SourceManager::CreateAndRegister.
Now sourcemanager deserializer automatically self-registers itself with
the deserializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
1f94100e53a7d45cea706c09ac0f35cf723a8d83 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Renamed SourceManager::Read to SourceManager::CreateAndRegister.
Now sourcemanager deserializer automatically self-registers itself with
the deserializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44591 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
9c856e9a30971beb84123094b543530edc4641bb 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented initial serialization support for SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
099b4747042352f69184481a48508b599a8d3f73 05-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented initial serialization support for SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44590 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
2b238dfc15e90e2e27087fd7306c0ae4f5c6ca18 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed serialization of FileEntry and DirectoryEntry. This objects will
now be lazily recreated upon deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
8fbc88e5faee291e2e5039ec4c1dac3cfd219704 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed serialization of FileEntry and DirectoryEntry. This objects will
now be lazily recreated upon deserialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
0ad06d124033f75fc3b8d269ec3a04dd3f54c893 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SrcMgr::ContentCache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
e21272fbdbfbf5bf3461d3e9b42279f4d47caa42 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SrcMgr::ContentCache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44578 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
336b2e876f0748659dbf8415e24d41ba88e66f8a 04-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Simplified setting up Method's scope before generating AST for its nody.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
b107ce82d425939ce32fc3c02faf7c2364abc1a3 04-Dec-2007 Fariborz Jahanian <fjahanian@apple.com> Simplified setting up Method's scope before generating AST for its nody.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44576 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6a186355042fdbfd31749d030e8082225a2fa0bd 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Fixed a few more comments to change "FileInfo" to "ContentCache."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
b6427f821de8cce1566fb6e755143ea0918d5543 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Fixed a few more comments to change "FileInfo" to "ContentCache."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
16a070770469b5fec47c890a1902258c9a96f3fe 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FileEntry and DirectoryEntry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
9551a2cbe5fdf316c126a39ec310208c2121321f 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FileEntry and DirectoryEntry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44573 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
1c3728ea5f0d868e9e383243df9afb91e2435162 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed IntrusiveSPtr. There are no clients of this class anymore, so it is
not needed, and it was never extensively tested. If we need an intrusive
reference-counting smart pointer, we can always import intrusive_ptr from
boost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/IntrusiveSPtr.h
05db37eb596d8a2cc3d1b8e9e04b1c33aea34cd1 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Removed IntrusiveSPtr. There are no clients of this class anymore, so it is
not needed, and it was never extensively tested. If we need an intrusive
reference-counting smart pointer, we can always import intrusive_ptr from
boost.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44571 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/IntrusiveSPtr.h
abb4f6ac8b35246285fe31035ee915e6a137c68b 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ObjCStringLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
46dc0a54ed6deb165117a6b0166d9bb7acb785f5 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ObjCStringLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
461155627628ee992cd92e7d60920e84b2a675ea 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ObjcAtThrowStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5bdd4e300b432246b9d261702828e9875414128b 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ObjcAtThrowStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b006fb3973661ac21f589829bf573b403371111b 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ObjcAtTryStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9c1efff14b0e001f73c875ed5b184fb3569d641d 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ObjcAtTryStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44566 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
54ef3bd4604692e1671d9e8466be598c86490750 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ObjcAtFinallyStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
04be5aae2dc17292e2007401599638f3c6ba30de 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ObjcAtFinallyStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44564 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
a0c7df3c56442c64697595b4fa499defe31f7fd9 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ObjcAtCatchStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
af526779b36f43f59e47cfc5b10bb0c48562f4a9 04-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ObjcAtCatchStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44563 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
40499489f0f4449591cfefa7c3e7f158affe7421 03-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented initial support for "-triple" option to the clang driver. This
replaces the functionality previously provided by just "-arch" (which is still
supported but has different semantics).

The new behavior is as follows:

(1) If the user does not specify -triple:

(a) If no -arch options are specified, the target triple used is the host
triple (in llvm/Config/config.h).

(b) If one or more -arch's are specified (and no -triple), then there is
one triple for each -arch, where the specified arch is substituted
for the arch in the host triple. Example:
host triple = i686-apple-darwin9
command: clang -arch ppc -arch ppc64 ...
triples used: ppc-apple-darwin9 ppc64-apple-darwin9

(2) The user does specify a -triple (only one allowed):

(a) If no -arch options are specified, the triple specified by -triple
is used. E.g clang -triple i686-apple-darwin9

(b) If one or more -arch options are specified, then the triple specified
by -triple is used as the primary target, and the arch's specified
by -arch are used to create secondary targets. For example:

clang -triple i686-apple-darwin9 -arch ppc -arch ppc64

has the following targets:
i686-apple-darwin9 (primary target)
ppc-apple-darwin9
ppc64-apple-darwin9


Other changes related to the changes to the driver:

- TargetInfoImpl now includes the triple string.

- TargetInfo::getTargetTriple returns the triple for its primary target.

- test case test/Parser/portability.c has been updated because "-arch linux" is
no longer valid ("linux" is an OS, not an arch); instead we use a bogus
architecture "bogusW16W16" where WCharWidth=16 and WCharAlign=16.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
ae3607684c5978dc2d877141015056c9d24f17ea 03-Dec-2007 Ted Kremenek <kremenek@apple.com> Implemented initial support for "-triple" option to the clang driver. This
replaces the functionality previously provided by just "-arch" (which is still
supported but has different semantics).

The new behavior is as follows:

(1) If the user does not specify -triple:

(a) If no -arch options are specified, the target triple used is the host
triple (in llvm/Config/config.h).

(b) If one or more -arch's are specified (and no -triple), then there is
one triple for each -arch, where the specified arch is substituted
for the arch in the host triple. Example:
host triple = i686-apple-darwin9
command: clang -arch ppc -arch ppc64 ...
triples used: ppc-apple-darwin9 ppc64-apple-darwin9

(2) The user does specify a -triple (only one allowed):

(a) If no -arch options are specified, the triple specified by -triple
is used. E.g clang -triple i686-apple-darwin9

(b) If one or more -arch options are specified, then the triple specified
by -triple is used as the primary target, and the arch's specified
by -arch are used to create secondary targets. For example:

clang -triple i686-apple-darwin9 -arch ppc -arch ppc64

has the following targets:
i686-apple-darwin9 (primary target)
ppc-apple-darwin9
ppc64-apple-darwin9


Other changes related to the changes to the driver:

- TargetInfoImpl now includes the triple string.

- TargetInfo::getTargetTriple returns the triple for its primary target.

- test case test/Parser/portability.c has been updated because "-arch linux" is
no longer valid ("linux" is an OS, not an arch); instead we use a bogus
architecture "bogusW16W16" where WCharWidth=16 and WCharAlign=16.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44551 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
7a5f9d58033a557549ad5717c746522143f78afa 03-Dec-2007 Ted Kremenek <kremenek@apple.com> Added getTrueExpr() and getFalseExpr() to ConditionalOperator. These methods
provide handy accessors to the subexpressions of ConditionalOperator that
automatically take into account the GCC extension where the "LHS" expression is
omitted: e.g x ?: y;. When the LHS expression is available, getTrueExpr() is the
same as getLHS(); when LHS is NULL, getTrueExpr() returns the condition expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
395a2abf0028968d85958610e393e067885dc14f 03-Dec-2007 Ted Kremenek <kremenek@apple.com> Added getTrueExpr() and getFalseExpr() to ConditionalOperator. These methods
provide handy accessors to the subexpressions of ConditionalOperator that
automatically take into account the GCC extension where the "LHS" expression is
omitted: e.g x ?: y;. When the LHS expression is available, getTrueExpr() is the
same as getLHS(); when LHS is NULL, getTrueExpr() returns the condition expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e5860b7c6e1e6933b6c5602fc0259ef14d1dd5ce 03-Dec-2007 Chris Lattner <sabre@nondot.org> add a fixme


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
7c6b3d3ac3f8526c3ae444620ed7d58d25311aed 03-Dec-2007 Chris Lattner <sabre@nondot.org> add a fixme


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44523 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
56118007865a64979aa30c1d77d1363bfaabd7ad 02-Dec-2007 Anders Carlsson <andersca@mac.com> Implement __builtin_bswap32 and __builtin_bswap64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
df4852ac816e6050d53b808b86d7c1c9738eb99e 02-Dec-2007 Anders Carlsson <andersca@mac.com> Implement __builtin_bswap32 and __builtin_bswap64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
6db92f3c6c455fbb4c5be97cfaf39df67ec1c8df 02-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Treat discarding array initializer elements as an extwarn (so -pedantic-errors flags it). Allow CodeGen to truncate the initializer if needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ce39faa836d0fe2f3be9ff11865c6433f734b2c6 02-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Treat discarding array initializer elements as an extwarn (so -pedantic-errors flags it). Allow CodeGen to truncate the initializer if needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d22cc722e595723dfd77330c9efb64848fd3adf9 02-Dec-2007 Chris Lattner <sabre@nondot.org> all filevar's have static storage. Previously a global with
extern storage class was returning false from hasStaticStorage.
Ted, please review this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d411e04db18f7d07a889d51086861b23cbe05518 02-Dec-2007 Chris Lattner <sabre@nondot.org> all filevar's have static storage. Previously a global with
extern storage class was returning false from hasStaticStorage.
Ted, please review this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44515 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
db3fb0318d9bb4018161106a991fb5de8d96f263 02-Dec-2007 Chris Lattner <sabre@nondot.org> Teach clang the prototype for __builtin_alloca.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
434415af9de3cd9d72d43a78ffe714250fab83dc 02-Dec-2007 Chris Lattner <sabre@nondot.org> Teach clang the prototype for __builtin_alloca.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44504 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
22595b82d58fedcc01441558b8f8bef5e878db77 02-Dec-2007 Chris Lattner <sabre@nondot.org> Warn about unsupported codegen with the diags machinery, giving us:

t.c:3322:5: warning: cannot codegen this yet
__asm__ ("bswap %0" : "+r" (_data));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

instead of:

Unimplemented stmt!
(AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
fb97b03e42d397405f617be0252be83e77a66f6e 02-Dec-2007 Chris Lattner <sabre@nondot.org> Warn about unsupported codegen with the diags machinery, giving us:

t.c:3322:5: warning: cannot codegen this yet
__asm__ ("bswap %0" : "+r" (_data));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

instead of:

Unimplemented stmt!
(AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
5fec5968c1b24fe70629e4ba13e013e461acfb58 02-Dec-2007 Chris Lattner <sabre@nondot.org> register clz and ctz builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
bbb75f63001af0d9b62995d3a5d62f7469bd74d3 02-Dec-2007 Chris Lattner <sabre@nondot.org> register clz and ctz builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
217df51d120a8290117d9e95e8e1314af9ac8504 02-Dec-2007 Chris Lattner <sabre@nondot.org> add support for custom client-specific diagnostics. As a testcase, make the
rewriter emit this error if it fails to rewrite an @encode:

t.m:17:9: error: rewriter could not replace sub-expression due to macros
c = ENC(char *)[2] + 4;
^~~~~~~~~~~

... where ENC is: #define ENC @encode



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
182745ae7892bca0842d9c023370ade5f8d1c6e8 02-Dec-2007 Chris Lattner <sabre@nondot.org> add support for custom client-specific diagnostics. As a testcase, make the
rewriter emit this error if it fails to rewrite an @encode:

t.m:17:9: error: rewriter could not replace sub-expression due to macros
c = ENC(char *)[2] + 4;
^~~~~~~~~~~

... where ENC is: #define ENC @encode



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
b8eb007afdef9e27fc536d6f693c974895cab374 02-Dec-2007 Oliver Hunt <oliver@apple.com> Add support for __builtin_expect which is needed for assert,
among other things.

Also change a codegen warning to dump to stderr so it doesn't
mess with -emit-llvm output



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
6f0768bc565028d2536fc41ee0d466c13985a921 02-Dec-2007 Oliver Hunt <oliver@apple.com> Add support for __builtin_expect which is needed for assert,
among other things.

Also change a codegen warning to dump to stderr so it doesn't
mess with -emit-llvm output



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44497 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
bb95a38f096c649c28e1c77b55071904c9f54fd1 02-Dec-2007 Chris Lattner <sabre@nondot.org> improve VC++ compatibility, patch by Cédric Venet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
2efcd2f04e6151ff3144e697529cfa483ad4cb65 02-Dec-2007 Chris Lattner <sabre@nondot.org> improve VC++ compatibility, patch by Cédric Venet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
d883a78da130374f8adc471769917b6bbdaa37d8 01-Dec-2007 Chris Lattner <sabre@nondot.org> Add #include, patch by Cédric Venet


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
6e340496341a4704be0ede9c1ff4f8eacea7ee2c 01-Dec-2007 Chris Lattner <sabre@nondot.org> Add #include, patch by Cédric Venet


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
4478db98dbface605441f93b77073d219a15f2a2 30-Nov-2007 Chris Lattner <sabre@nondot.org> start partitioning the diagnostics into two classes: those
that are builtin and those that are aren't. This is a bunch
of API refactoring that will make this possible, but there is
no functionality change yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
0750618b0beacdc9b0a9e210a661e4746823ced7 30-Nov-2007 Chris Lattner <sabre@nondot.org> start partitioning the diagnostics into two classes: those
that are builtin and those that are aren't. This is a bunch
of API refactoring that will make this possible, but there is
no functionality change yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
a8a6a48299e311a3bb58acb4a06f37ad70f333fe 30-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SelectorTable and Selectors.
Modified serialization of IdentifierTable to self-register itself with
the Deserializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
bdbb285aed1bb1e20090a16929f4c1da33d2d5c5 30-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SelectorTable and Selectors.
Modified serialization of IdentifierTable to self-register itself with
the Deserializer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
0fcdcadb2b4e1ebd91a434a0c4667339df79cad9 30-Nov-2007 Anders Carlsson <andersca@mac.com> Initialize LaxVectorConversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
b0ff33a9f4b2a75b6949976bbf3782ff0d839cb1 30-Nov-2007 Anders Carlsson <andersca@mac.com> Initialize LaxVectorConversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
e87cd98ad8fb36695704af0849c8edc2ed98b369 30-Nov-2007 Anders Carlsson <andersca@mac.com> Support lax vector conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
695dbb697d78d4c507e12b0acc6129b9650d4c3e 30-Nov-2007 Anders Carlsson <andersca@mac.com> Support lax vector conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44449 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
ca44ffdd6b645e52e041b92a1cd93d3be2c0eac8 30-Nov-2007 Steve Naroff <snaroff@apple.com> Yesterday, I simplified how we stream top-level decls.

After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).

TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
89307ffaf8acf4d6fdffd72b607ca4fbcfdffc9d 30-Nov-2007 Steve Naroff <snaroff@apple.com> Yesterday, I simplified how we stream top-level decls.

After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).

TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
3663e0c0126aeaf3f725b88c8555a257233b50b0 30-Nov-2007 Ted Kremenek <kremenek@apple.com> Added method "HandleTopLevelDeclaration" to ASTConsumer. This will eventually
be the new hook that ASTStreamer calls to feed top-level Decls to
ASTConsumers.

The difference between "HandleTopLevelDeclaration" and "HandleTopLevelDecl" is
that "HandleTopLevelDecl" is currently called by ASTStreamer for every
top-level declaration, including those that appear within a Decl chain. Using
the new interface, ASTStreamer would only call HandleTopLevelDeclaration for
Decls that appear that the beginning of a Decl chain (i.e., a group of related
decls).

To preserve the behavior that all subclasses of ASTConsumer currently expect,
the default implementation of HandleTopLevelDeclaration simply calls
HandleTopLevelDecl, and for decl chains it calls HandleTopLevelDecl for each
Decl* in a chain of Decls.

The advantage of this interface is that some subclasses of ASTConsumer only
really want the Decl chain, and not each individual Decl passed to them. This
extra level of indirection allows subclasses to override the default behavior
if they so desire.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
2ff3e691ecc63a5d82d4023b46b5b47ce14ace53 30-Nov-2007 Ted Kremenek <kremenek@apple.com> Added method "HandleTopLevelDeclaration" to ASTConsumer. This will eventually
be the new hook that ASTStreamer calls to feed top-level Decls to
ASTConsumers.

The difference between "HandleTopLevelDeclaration" and "HandleTopLevelDecl" is
that "HandleTopLevelDecl" is currently called by ASTStreamer for every
top-level declaration, including those that appear within a Decl chain. Using
the new interface, ASTStreamer would only call HandleTopLevelDeclaration for
Decls that appear that the beginning of a Decl chain (i.e., a group of related
decls).

To preserve the behavior that all subclasses of ASTConsumer currently expect,
the default implementation of HandleTopLevelDeclaration simply calls
HandleTopLevelDecl, and for decl chains it calls HandleTopLevelDecl for each
Decl* in a chain of Decls.

The advantage of this interface is that some subclasses of ASTConsumer only
really want the Decl chain, and not each individual Decl passed to them. This
extra level of indirection allows subclasses to override the default behavior
if they so desire.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44444 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
ddedbe29217898338b166385b058bb7512fbc0e1 29-Nov-2007 Ted Kremenek <kremenek@apple.com> Added "isExact" field to FloatingLiteral. This flag indicates whether or not
the APFloat representing the parsed literal can represent the literal value
exactly. This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
720c4ec57b6110873cd533ad434853a27e7c3f4a 29-Nov-2007 Ted Kremenek <kremenek@apple.com> Added "isExact" field to FloatingLiteral. This flag indicates whether or not
the APFloat representing the parsed literal can represent the literal value
exactly. This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6fd865b6c22e31d8e9be0b3fa0773bc47613273a 28-Nov-2007 Steve Naroff <snaroff@apple.com> Several fixes/simplifications surrounding how we stream top-level decl AST's.

The following code...

typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;

struct Y { int A; };

struct X { int A; } D;

struct X E, F;

...now produces the following output...

> ../../Debug/bin/clang xx.c -ast-print
Read top-level tag decl: 'cssm_data'
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data *CSSM_DATA_PTR;
Read top-level tag decl: 'Y'
Read top-level tag decl: 'X'
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'F'

...which is much more accurate than the previous -ast-print output...

typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data CSSM_DATA;
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'E'




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1f6443255894429fba384de0d5b6389ef578a5e9 28-Nov-2007 Steve Naroff <snaroff@apple.com> Several fixes/simplifications surrounding how we stream top-level decl AST's.

The following code...

typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;

struct Y { int A; };

struct X { int A; } D;

struct X E, F;

...now produces the following output...

> ../../Debug/bin/clang xx.c -ast-print
Read top-level tag decl: 'cssm_data'
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data *CSSM_DATA_PTR;
Read top-level tag decl: 'Y'
Read top-level tag decl: 'X'
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'F'

...which is much more accurate than the previous -ast-print output...

typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data CSSM_DATA;
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'E'




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
db6be56204791960f4c36bb66a7b467e9aceec43 28-Nov-2007 Chris Lattner <sabre@nondot.org> Implement support for -fwritable-strings and make the code generator
merge string literals when it is not provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/CodeGen/ModuleBuilder.h
45e8cbdce25c2e16c7aac2036a591f6190097ae6 28-Nov-2007 Chris Lattner <sabre@nondot.org> Implement support for -fwritable-strings and make the code generator
merge string literals when it is not provided.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/CodeGen/ModuleBuilder.h
743ec37b37ef887b855c24a8ebbb21d91572b1b5 27-Nov-2007 Chris Lattner <sabre@nondot.org> add several cases that Expr::hasStaticStorage missed, pointed out by Oliver Hunt


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4cc627111453b75519d5130b57e06256da7b00e8 27-Nov-2007 Chris Lattner <sabre@nondot.org> add several cases that Expr::hasStaticStorage missed, pointed out by Oliver Hunt


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fb0d1395d81a1e202d11efc838921d0915fddf8b 27-Nov-2007 Anders Carlsson <andersca@mac.com> Add builtin type signature support for vector types. Add correct type signatures for a bunch of MMX builtins. We now parse all the intrinsics in mmintrin.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
142f36de332925dbe19d73d0612d9879b4f80e84 27-Nov-2007 Anders Carlsson <andersca@mac.com> Add builtin type signature support for vector types. Add correct type signatures for a bunch of MMX builtins. We now parse all the intrinsics in mmintrin.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44357 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
f257b4c5fec245de36cac7cefa8cb2b70f298d48 27-Nov-2007 Anders Carlsson <andersca@mac.com> Report errors for invalid casts from/to vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a64db8fa2a7b4e24d0aeef7c22046fa37d8f1f3b 27-Nov-2007 Anders Carlsson <andersca@mac.com> Report errors for invalid casts from/to vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44350 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4ce42301dacf13aae7a5340ec6fb02c496fb0669 27-Nov-2007 Anders Carlsson <andersca@mac.com> Add more semantic analysis for inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticKinds.def
lang/Basic/TargetInfo.h
d04c6e23f2e10eeb9936778d67f4a1c4a14cc4f6 27-Nov-2007 Anders Carlsson <andersca@mac.com> Add more semantic analysis for inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44349 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticKinds.def
lang/Basic/TargetInfo.h
fc2ebebefc4e3aee631f56a7bad24b41fa040e88 27-Nov-2007 Ted Kremenek <kremenek@apple.com> Added optional pass-by-reference argument "isExact" to
NumericLiteralParser::GetFloatValue(). Upon method return, this flag has the value
true if the returned APFloat can exactly represent the number in the parsed text,
and false otherwise.

Modified the implementation of GetFloatValue() to parse literals using APFloat's
convertFromString method (which allows us to set the value of isExact).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
427d5af5b601985093b6b4b33ba1e30fc24d86dc 27-Nov-2007 Ted Kremenek <kremenek@apple.com> Added optional pass-by-reference argument "isExact" to
NumericLiteralParser::GetFloatValue(). Upon method return, this flag has the value
true if the returned APFloat can exactly represent the number in the parsed text,
and false otherwise.

Modified the implementation of GetFloatValue() to parse literals using APFloat's
convertFromString method (which allows us to set the value of isExact).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44339 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
49dadd61b69613ecec27633129bea68a5eccafaf 25-Nov-2007 Anders Carlsson <andersca@mac.com> Check that the clobber registers are valid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TargetInfo.h
6fa9086043b0338d895a4cdb0ec8542530af90d7 25-Nov-2007 Anders Carlsson <andersca@mac.com> Check that the clobber registers are valid.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TargetInfo.h
7dd1c95885c9c27979d59718b68fa1c273038fd2 25-Nov-2007 Anders Carlsson <andersca@mac.com> Add tables for GCC register names and aliases. This will be used for inline asm

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3346ae6bba10da0d08c8d548134ddab4e13d040f 25-Nov-2007 Anders Carlsson <andersca@mac.com> Add tables for GCC register names and aliases. This will be used for inline asm

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44308 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
759f45d5cfb417b39d6e249dbf4925492939d51c 24-Nov-2007 Anders Carlsson <andersca@mac.com> Keep track of whether the asm is volatile or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
39c47b56f45437bbc49c9568b7308a400234a730 24-Nov-2007 Anders Carlsson <andersca@mac.com> Keep track of whether the asm is volatile or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44297 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
b4487a88b714d33d366a62f14347a4ae1b4d9b56 23-Nov-2007 Anders Carlsson <andersca@mac.com> Check asm input and output expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
04728b7ea928b029f165fc67d32ced40e6868b31 23-Nov-2007 Anders Carlsson <andersca@mac.com> Check asm input and output expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44289 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
965d52002ff8e79e8ac26a4bd5b8df87d93bdaf4 22-Nov-2007 Anders Carlsson <andersca@mac.com> Store output and input operands as well as clobber information in the AsmStmt. Ted, could you please review the serialization/deserialization code?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
b235fc2cf37621c7fc6511bb2b8788c95f9fb9fc 22-Nov-2007 Anders Carlsson <andersca@mac.com> Store output and input operands as well as clobber information in the AsmStmt. Ted, could you please review the serialization/deserialization code?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
076c11195af18f4af5765239dc25bff2697fbce3 20-Nov-2007 Anders Carlsson <andersca@mac.com> Store inline asm code in the AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
6a0ef4b83c91a6d6d5acb4ed5577c4659fe022a3 20-Nov-2007 Anders Carlsson <andersca@mac.com> Store inline asm code in the AST.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44255 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
lang/Parse/Parser.h
e79dbe20141db33e67e8576ff04ae31eac3456be 20-Nov-2007 Anders Carlsson <andersca@mac.com> Add __builtin_abs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
c2251dc59b0edc28f9303637dec970a7520939ad 20-Nov-2007 Anders Carlsson <andersca@mac.com> Add __builtin_abs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44254 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
705386b208de04270c6fe62e29a52ca756172be6 20-Nov-2007 Ted Kremenek <kremenek@apple.com> Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion of
"block-expressions" when visiting arbitrary expressions (via calls to
"Visit()"). This results in a refactoring where a dataflow analysis no
longer needs to always special case when handling block-expressions versus
non-block expressions.

Updated LiveVariables and UninitializedValues to conform to the slightly
altered interface of these visitor classes.

Thanks to Nuno Lopes for providing a test case that illustrated some
fundamental problems in the current design of the CFGXXXStmtVisitor classes
and how they were used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
9f9141cd46b87cefd74625d92634a5aa93d2c9c6 20-Nov-2007 Ted Kremenek <kremenek@apple.com> Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion of
"block-expressions" when visiting arbitrary expressions (via calls to
"Visit()"). This results in a refactoring where a dataflow analysis no
longer needs to always special case when handling block-expressions versus
non-block expressions.

Updated LiveVariables and UninitializedValues to conform to the slightly
altered interface of these visitor classes.

Thanks to Nuno Lopes for providing a test case that illustrated some
fundamental problems in the current design of the CFGXXXStmtVisitor classes
and how they were used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44246 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
a1d79b7080bd898912888e048bf65fd7173cc3f1 19-Nov-2007 Ted Kremenek <kremenek@apple.com> Removed PersistentMap. It is now superseded in every way by the ImmutableMap
and ImmutableSet classes in the main LLVM libraries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ADT/PersistentMap.h
f57ef1ff27f2065785c5c80def628b7cf373acf3 19-Nov-2007 Ted Kremenek <kremenek@apple.com> Removed PersistentMap. It is now superseded in every way by the ImmutableMap
and ImmutableSet classes in the main LLVM libraries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ADT/PersistentMap.h
a917bbfd1821c5eabd2ec0782913a6866cbab5d7 15-Nov-2007 Chris Lattner <sabre@nondot.org> Fix transient failure on Lex/c90.c due to an uninit variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
825502a9ee613fdfb73b84cc85b9fdc58e680d86 15-Nov-2007 Chris Lattner <sabre@nondot.org> Fix transient failure on Lex/c90.c due to an uninit variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
d1670c4b3b60d1baa9d651ed4274cecaad749e97 15-Nov-2007 Chris Lattner <sabre@nondot.org> add header file I forgot to check in


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
25bfcb927d9169ea675ce6e98d8992efceeb0e42 15-Nov-2007 Chris Lattner <sabre@nondot.org> add header file I forgot to check in


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
9f176d13cf85ed4d3ecfb172ea206a6400253637 15-Nov-2007 Steve Naroff <snaroff@apple.com> Finish up variadic methods/messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
49f109c786f99eb7468dac3976db083a65493444 15-Nov-2007 Steve Naroff <snaroff@apple.com> Finish up variadic methods/messages.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
29fe74607889cd56d40c4958800f0abf1f73a436 15-Nov-2007 Steve Naroff <snaroff@apple.com> Implement support for variadic methods (work in progress).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
335eafa5be51f6440672a74c73d588af72e96732 15-Nov-2007 Steve Naroff <snaroff@apple.com> Implement support for variadic methods (work in progress).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44171 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
ca89334a3ac1627fe1a110e4705d296e6baeef68 15-Nov-2007 Nate Begeman <natebegeman@mac.com> Break out bool/true/false support into a LangOption



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Basic/TokenKinds.def
8aebcb739a4aff5ccf007fd740aa9105071feff4 15-Nov-2007 Nate Begeman <natebegeman@mac.com> Break out bool/true/false support into a LangOption



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44164 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Basic/TokenKinds.def
6b759ce37a32bd56946d9fb72109cf46365e8da7 15-Nov-2007 Steve Naroff <snaroff@apple.com> - Implement ivar rewrite (patch by Fariborz).
- RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7e3411b23eb3724da5461dc6d6f97d14b3b0a52f 15-Nov-2007 Steve Naroff <snaroff@apple.com> - Implement ivar rewrite (patch by Fariborz).
- RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
64be4ada44c719304c1dee75fb1e551f84b7779a 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Added QualType::ReadBackpatch to allow QualType initialization with
backpatching. This original was available, but then we removed it. It is back
again to help with deserialization of FieldDecls. Because FieldDecls are
currently owned by RecordDecls, which are owned by a TagType, the type of the
FieldDecl may not be deserialized prior to deserializing the FieldDecl. Thus
backpatching solves the problem of constructing a FieldDecl that references a
type that has not yet been deserialized.

Simplified serialization of TagType to not require passing in the
SerializedPtrID. Registration of the materialized type object is done after
the CreateImpl method returns (as with other types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
21d50e12c3c412d8457071dc419363b7a7e8b855 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Added QualType::ReadBackpatch to allow QualType initialization with
backpatching. This original was available, but then we removed it. It is back
again to help with deserialization of FieldDecls. Because FieldDecls are
currently owned by RecordDecls, which are owned by a TagType, the type of the
FieldDecl may not be deserialized prior to deserializing the FieldDecl. Thus
backpatching solves the problem of constructing a FieldDecl that references a
type that has not yet been deserialized.

Simplified serialization of TagType to not require passing in the
SerializedPtrID. Registration of the materialized type object is done after
the CreateImpl method returns (as with other types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44143 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
387539fbcc04cafeb648771cb5db9c4faab03e48 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of InitListExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6336f8dbae5145eb7b1429a8ec424c44e668f7cb 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of InitListExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44137 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2d85710dea4040b1a3d0503cc8a4f0e88a9be610 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4b7d9ca9fd65a5a68e907b1b7effe33bf1e93629 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CompoundLiteralExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9c2b8bd3ec1facd60e14e326db05b96f1f5a9b2a 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of EnumDecl and EnumConstantDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
583e008bbfbb937524d567ad6450b8f0e8485bca 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of EnumDecl and EnumConstantDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2f260e5577624b69d5b112babaea59ee34e9e6ef 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FieldDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f9d56c8be593e539098df95b636469104f2967a4 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FieldDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44126 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
581571c848395ba6c7401b5384f91ead457c9adc 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of RecordDecls. Changed serialization of TagType to
have an owning pointer to the referred TagDecl. This should hopefully fix a
bug where TagDecls (including decls from structs, etc.) were not serialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
aad48b6b2dfc81ad36a05d161c775cd6aab5b339 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of RecordDecls. Changed serialization of TagType to
have an owning pointer to the referred TagDecl. This should hopefully fix a
bug where TagDecls (including decls from structs, etc.) were not serialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
87f0429f888ee5d332304641611b88f7b54b5065 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FunctionTypeNoProto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2b14d46231fd75ad1e58043e9fab029c54c817cb 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FunctionTypeNoProto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44094 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5cde3834f43c0946ec8debfda9c6fb588b6b33fd 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of VariableArrayTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ed1a01d4d0ee773eb6478ff9701b46d2f0c06952 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of VariableArrayTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44093 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2f665cd2aa263b89ac880dc45283847e5322a6c2 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of TypedefType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b28166d11e788bc99fd5cd47c4f649ea0195c3b1 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of TypedefType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4234c1b1a9c858b005f4ad7dc85908b63adcafdd 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ConstantArrayType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
da5dbb4a0ad091791bdb0dad1b9ceba3c04a7f5c 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ConstantArrayType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
8db5aa1ca0d42cf8aeaa78cbe196a50f70fc9fc1 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of TagTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a225400804cc53dd9cf6b28cf0e8e7f103a7522f 14-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of TagTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
18c833800e358afc9926f2ba2874b4091f3a1258 14-Nov-2007 Steve Naroff <snaroff@apple.com> Rewrite method definition bodies. Also renamed a method to distinguish between method declarations and definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
71c0a951d08dc7a2a057df8c15f22b36f6aa47c7 14-Nov-2007 Steve Naroff <snaroff@apple.com> Rewrite method definition bodies. Also renamed a method to distinguish between method declarations and definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44080 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a7392b33f5f6a4fe080b3713877d5c58428cf39f 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Removed line with typo (declared friendship with ASTContext). Line was
not needed since friendship is declared elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
950ba9cc6aaa508381fbf56224c68d2da81caa4b 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Removed line with typo (declared friendship with ASTContext). Line was
not needed since friendship is declared elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
1dfb01cfef910819019c6ef028b82265241868b8 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of AsmStmt (or rather what is currently implemented
in AsmStmt).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
1f85acd5ff54345788b93111197088160fe9f06e 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of AsmStmt (or rather what is currently implemented
in AsmStmt).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44077 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
deac9c3cf701b04f18af21c222f75c9f6b9ae60b 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for SizeOfAlignOfTypeExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ea2fe9b435e1b55135de32dcac97366554706ac4 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for SizeOfAlignOfTypeExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
24160d3509ca6890815069aa59182fc07e650ea1 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
bd57e7c4754c0ce5d7d460041c8fd613e45c4319 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for MemberExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
84079d78c2a044e19e74609b356750fff3661fa5 13-Nov-2007 Nate Begeman <natebegeman@mac.com> Give AST-walk passes a way to access DeclSpec attributes on functions and
variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/DeclSpec.h
1b4e251f6d73997732f64e550a2b9cb5ac945c78 13-Nov-2007 Nate Begeman <natebegeman@mac.com> Give AST-walk passes a way to access DeclSpec attributes on functions and
variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/DeclSpec.h
034a78cafc3505323698ea72db19dc5095324e06 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Rewrote type serialization to used the same methodology as we do for Decls.
Removed tons of dead code in ASTContext concerning how types use to be
serialized.
Removed serialization methods from QualType that are no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
03ed44061df258e74a40383bda849e14b892a8c6 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Rewrote type serialization to used the same methodology as we do for Decls.
Removed tons of dead code in ASTContext concerning how types use to be
serialized.
Removed serialization methods from QualType that are no longer used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
07f44dcac259134ce962a2517430d2196f27652f 13-Nov-2007 Chris Lattner <sabre@nondot.org> Clean up types, removing some casts. Patch contributed by
Cedric Venet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
a36c48676c0a48953c1a0885fa333be5851bbf94 13-Nov-2007 Chris Lattner <sabre@nondot.org> Clean up types, removing some casts. Patch contributed by
Cedric Venet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
ba3ddb21e973cc5e9ce9daf1cefe2e05813b78e9 13-Nov-2007 Chris Lattner <sabre@nondot.org> improve handling of address of global when checking for
constants and initializers. Patch by Sanghyeon Seo, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1d09ecca892185ba067e47ba879f424de59950ef 13-Nov-2007 Chris Lattner <sabre@nondot.org> improve handling of address of global when checking for
constants and initializers. Patch by Sanghyeon Seo, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44049 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
16c1f61097a33cb93c71ff4661cd918f6a7d276a 13-Nov-2007 Steve Naroff <snaroff@apple.com> Minor indenting changes and removed a level of casting in getClassInterface();



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0b9cc05556c47b8aa02aea57c7679ff68f196051 13-Nov-2007 Steve Naroff <snaroff@apple.com> Minor indenting changes and removed a level of casting in getClassInterface();



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44039 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
a645d8779ae4e8f57136d5bfe1c661dc4adb4d3c 13-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to set context (interface, category, etc.) in which method is declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
b245a33e6f562377946dc9cb5694a2d3cb8a98a3 13-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to set context (interface, category, etc.) in which method is declared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
acba361778a020cd919fca85cf45088e9b81a0af 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Renamed all serialization "Materialize" methods to "Create" to conform with
the new serialization API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/Type.h
lang/Basic/IdentifierTable.h
0f84c0059cec39fd1c73ac05bc2864dca664e7f4 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Renamed all serialization "Materialize" methods to "Create" to conform with
the new serialization API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44035 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/Type.h
lang/Basic/IdentifierTable.h
ddf953af0136f591dd34f4ba7e6a7867ca564714 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Restructured serialization code for decls to make it cleaner, easier to
understand, and batched the emission owned subobjects (using
BatchEmitOwnedPtr) to get a smaller output bitcode size.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
928fd7f76808b895b68a9c6ed55a8f185fad6a35 13-Nov-2007 Ted Kremenek <kremenek@apple.com> Restructured serialization code for decls to make it cleaner, easier to
understand, and batched the emission owned subobjects (using
BatchEmitOwnedPtr) to get a smaller output bitcode size.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44033 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4af724922ea737ae8726aa879a50f36a4a667318 12-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to do statically typed ivar references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
232220c6982e3a70d8f7fc06a011ead490a2f516 12-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to do statically typed ivar references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44028 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3123363889ae55dd0f3b35f776c4916d1ad5bbb3 12-Nov-2007 Steve Naroff <snaroff@apple.com> Add category method definitions incrementally, removing a FIXME (like we do for class implementations).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e1e6c0d5c79c0ee7ed62fef47a19aa7ecef40db4 12-Nov-2007 Steve Naroff <snaroff@apple.com> Add category method definitions incrementally, removing a FIXME (like we do for class implementations).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44027 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2ce5dc5f1986d12bf95a869670c3a9c2116f2b0c 12-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> 'super' nailed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0523aaf9759cd9524956f0930558737458849743 12-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> 'super' nailed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e015e9c5d8ef48fc703ea6d90c5ed179b1100e83 12-Nov-2007 Steve Naroff <snaroff@apple.com> Add an error diagnostic to Parse::ParseObjCMessageExpression().

This now exposes the following bug...

******************** TEST 'Sema/message.m' FAILED! ********************
Command:
clang -fsyntax-only -verify Sema/message.m
Output:
Errors seen but not expected:
Line 9: invalid receiver to message expression
******************** TEST 'Sema/message.m' FAILED! ********************

As far as I can tell, all messages to method agruments fail.

The method arguments are built by Sema::ObjcActOnStartOfMethodDef().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
11508212aacde5199b0475a578a481febf5dc067 12-Nov-2007 Steve Naroff <snaroff@apple.com> Add an error diagnostic to Parse::ParseObjCMessageExpression().

This now exposes the following bug...

******************** TEST 'Sema/message.m' FAILED! ********************
Command:
clang -fsyntax-only -verify Sema/message.m
Output:
Errors seen but not expected:
Line 9: invalid receiver to message expression
******************** TEST 'Sema/message.m' FAILED! ********************

As far as I can tell, all messages to method agruments fail.

The method arguments are built by Sema::ObjcActOnStartOfMethodDef().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d732bbd0e362ed22de357c22b40e708ba99ad614 12-Nov-2007 Ted Kremenek <kremenek@apple.com> In Stmt serialization, renamed directEmit to EmitImpl and
directMaterialize to CreateImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
ec0aa78745f7b3bc96c20fffd1115bf26aaa0ead 12-Nov-2007 Ted Kremenek <kremenek@apple.com> In Stmt serialization, renamed directEmit to EmitImpl and
directMaterialize to CreateImpl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44020 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
5eb2a4a41a9c7df7124a79de8776cc8e7667547e 12-Nov-2007 Steve Naroff <snaroff@apple.com> Implement instance variable references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
7779db42c94405ecbd6ee45efb293483fa6cbeff 12-Nov-2007 Steve Naroff <snaroff@apple.com> Implement instance variable references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44016 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
dd2e26c9fbdd9097180b4d864551ddd14c0b02d3 12-Nov-2007 Steve Naroff <snaroff@apple.com> - Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();
- Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr.
- Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars.
- A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0330071714f1ba09e926becd666f4fc0ed62bc0b 12-Nov-2007 Steve Naroff <snaroff@apple.com> - Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();
- Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr.
- Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars.
- A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44015 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
84c3cb12f2570204568cf3e81426a3aff5f81234 12-Nov-2007 Steve Naroff <snaroff@apple.com> Forgot this file from my last commit...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d2baa9e075b8dd427fe16245cd91967bfb792c13 12-Nov-2007 Steve Naroff <snaroff@apple.com> Forgot this file from my last commit...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
99ee4309ff4a83dfd6ddad78d346a2668f76160b 12-Nov-2007 Steve Naroff <snaroff@apple.com> Replace 2 method definition actions (ActOnFunctionDefBody, ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d6d054da8e0cfd320f2bba2f97ecdb1511b1cbc4 12-Nov-2007 Steve Naroff <snaroff@apple.com> Replace 2 method definition actions (ActOnFunctionDefBody, ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9191a9e87a31cf970c4c50e875ba3f68b89a8d13 11-Nov-2007 Steve Naroff <snaroff@apple.com> Replace 3 method definition functions (ObjcParseMethodDefinition, ParseObjCInstanceMethodDefinition, ParseObjCClassMethodDefinition) with 1 method definition function (ParseObjCMethodDefinition).

Less code/confusion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
409be835b68344e0de56f99ef9a1e12760bc69ee 11-Nov-2007 Steve Naroff <snaroff@apple.com> Replace 3 method definition functions (ObjcParseMethodDefinition, ParseObjCInstanceMethodDefinition, ParseObjCClassMethodDefinition) with 1 method definition function (ParseObjCMethodDefinition).

Less code/confusion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43999 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b82c50f435ecf93eccd42b07af631c776918a53f 11-Nov-2007 Steve Naroff <snaroff@apple.com> This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).

While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).

Other details...

- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
0416fb9f379b49abb3eb0c1cb2ca75107e5a71d1 11-Nov-2007 Steve Naroff <snaroff@apple.com> This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).

While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).

Other details...

- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43995 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
b1c7ad904eaf27fbcc33363c991efff5edd3575d 11-Nov-2007 Steve Naroff <snaroff@apple.com> Teach Sema::ActOnInstanceMessage() about private methods. That is, methods declared in an implementation (but not listed in the interface).

This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late).

I will complete this later...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
c43d868355374d48296ad3be2c9c536698a5e9a8 11-Nov-2007 Steve Naroff <snaroff@apple.com> Teach Sema::ActOnInstanceMessage() about private methods. That is, methods declared in an implementation (but not listed in the interface).

This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late).

I will complete this later...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
92053fda11f2576d503a6e3f33bb9abd293e2c5c 10-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Minor code clean up in method def area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
439d28c1be7abc962afeb6a30f621b7b3b8bb13f 10-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Minor code clean up in method def area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43980 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e6f59f1f5da7205cb942de24e5d121cbabdcae4b 10-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Represent method definitions as separate AST nodes. Pretty print will come next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
60fbca0b027ff5a6579f16cb6e3abab826e0d967 10-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Represent method definitions as separate AST nodes. Pretty print will come next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43979 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
b8a39d9bbbb65ed5afc542d4e2e4b12ab2269a9c 10-Nov-2007 Chris Lattner <sabre@nondot.org> rename getInstantiationLoc to match the scheme of isPhysicalLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
18807d2bfb9282a35b921b4feeda09ffaa110e6b 10-Nov-2007 Chris Lattner <sabre@nondot.org> rename getInstantiationLoc to match the scheme of isPhysicalLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43969 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c17d26c1c094001ce1b6a5b4309bf372703539bb 10-Nov-2007 Chris Lattner <sabre@nondot.org> change source location to have two bits for macros, tracking
whether the location is the start and/or end of an expansion.
These are currently not set or used by anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
b7489d8129136437953d412e2a6cf0ef87f4a461 10-Nov-2007 Chris Lattner <sabre@nondot.org> change source location to have two bits for macros, tracking
whether the location is the start and/or end of an expansion.
These are currently not set or used by anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
ff746bc490247a7a4919ca449940ce9476392691 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Some code clean up in the form of name changes for functions which
process method definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
360300ca2ee298d585d29baf006519507d968812 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Some code clean up in the form of name changes for functions which
process method definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
8473b22fde0b777a9151cb4c06aed7ac3e81ce17 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Added class context to method declarations. Provide "interface *" type
to 'self' method of instance methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
1f7b6f88f18d7f6b10265acec5d41c4ed1897487 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Added class context to method declarations. Provide "interface *" type
to 'self' method of instance methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
dfb1c379a56177941067f86bc67b284e5b8057bd 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> First patch toward rewriting of method definitions. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
306d68f5ef2eab86e0e86ebadd5a6eee1f752c0b 09-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> First patch toward rewriting of method definitions. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43915 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
233875dfaa3dd0fb0dce7965bbb2d0e9d8a3df15 08-Nov-2007 Chris Lattner <sabre@nondot.org> add a getAtOffset() member to simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
fab21b6d735a8f96e7dda595fecf72946d745871 08-Nov-2007 Chris Lattner <sabre@nondot.org> add a getAtOffset() member to simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
9d182bb855af4f0e9bc47bf947d5d13cbbefbd00 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Rewrote serialization of IdentifierInfo and IdentifierTable to use methods Emit
and Materialize/Read instead of using specializations of SerializeTrait<>. The
resulting code is much cleaner. We are also setting the stage so that only the
parts of the IdentifierTable that are ever referenced within the ASTs are
serialized, and not the whole table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
93a9ab4bdc607b12fdcf6aa5cf56950dd45ae0f5 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Rewrote serialization of IdentifierInfo and IdentifierTable to use methods Emit
and Materialize/Read instead of using specializations of SerializeTrait<>. The
resulting code is much cleaner. We are also setting the stage so that only the
parts of the IdentifierTable that are ever referenced within the ASTs are
serialized, and not the whole table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43904 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
f2dbbe37fa7dec3fa17aab7c01245525ab38bc56 08-Nov-2007 Chris Lattner <sabre@nondot.org> add a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
474b29ee01a827075878ab1a101128d7969f2eba 08-Nov-2007 Chris Lattner <sabre@nondot.org> add a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43902 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
6efaea56b10e82bbb5b23170abf991d019c5e2b1 08-Nov-2007 Chris Lattner <sabre@nondot.org> significantly simplify the implementation of RewriteRope by changing the
implementation to be list<RopePiece> instead of vector<RopePiece*>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
3585fcac5160d1498098e2abc364e00af86cd737 08-Nov-2007 Chris Lattner <sabre@nondot.org> significantly simplify the implementation of RewriteRope by changing the
implementation to be list<RopePiece> instead of vector<RopePiece*>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
829dfe5b13887f535326619aa79566d921f1ffa3 08-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Refactored parsing of main function body for reuse by objective-c methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
f9ed3157c93495474003a5ec360039030fd42e9c 08-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Refactored parsing of main function body for reuse by objective-c methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
aad0374dce1dc6e60a53ea3518d896d80b6418d9 08-Nov-2007 Chris Lattner <sabre@nondot.org> improve MakeRopeString to avoid doing a malloc for every 2-character string
that gets inserted. This speeds up the rewriter another 10%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
6969fd4292adfa44024f3bdac7c45bcfee75754f 08-Nov-2007 Chris Lattner <sabre@nondot.org> improve MakeRopeString to avoid doing a malloc for every 2-character string
that gets inserted. This speeds up the rewriter another 10%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43896 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
e6efb47fb6bebd734fcb80fa2e1af8808a4a2fc2 08-Nov-2007 Chris Lattner <sabre@nondot.org> Simplify interface to MakeRopeString.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
ca305a0bbbf6a33a010c7e89f0c7a5a23a1bcf43 08-Nov-2007 Chris Lattner <sabre@nondot.org> Simplify interface to MakeRopeString.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43895 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
3a4dfc1434039e7ba4cbefa965be906998116acd 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of AddrLabelExpr.
Implemented serialization of ConditionalOperator.
Implemented serialization of StmtExpr.
Fixed bug in serialization of IndirectGoto (did not properly serialize subexpression).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
aa33763cc3dfa2fcb4fdb3c5b4be0c37f8d8f8e9 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of AddrLabelExpr.
Implemented serialization of ConditionalOperator.
Implemented serialization of StmtExpr.
Fixed bug in serialization of IndirectGoto (did not properly serialize subexpression).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43891 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9c75223141b06c586e902f4a76b565fc2e694e3e 08-Nov-2007 Chris Lattner <sabre@nondot.org> Add a new RewriteRope data structure which is a smarter way to represent the text
backing a rewrite buffer than using an std::vector<char>. This class was hacked
together very quickly and needs to be cleaned up, but it seems to work. It speeds
up rewriting a a 7M file from 6.43s to 0.24s on my machine. The impl could also
be made to be a lot more algorithmically sound.

This produces identical output to using vector on this testcase, if it causes a
problems or bugs are encountered, it can be disabled by changing the
RewriteBuffer::Buffer typedef back.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
8b0c2f659d350118cceee33c211a3dd5e3138ac2 08-Nov-2007 Chris Lattner <sabre@nondot.org> Add a new RewriteRope data structure which is a smarter way to represent the text
backing a rewrite buffer than using an std::vector<char>. This class was hacked
together very quickly and needs to be cleaned up, but it seems to work. It speeds
up rewriting a a 7M file from 6.43s to 0.24s on my machine. The impl could also
be made to be a lot more algorithmically sound.

This produces identical output to using vector on this testcase, if it causes a
problems or bugs are encountered, it can be disabled by changing the
RewriteBuffer::Buffer typedef back.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/RewriteRope.h
lang/Rewrite/Rewriter.h
162b32b02a24df680019e897723a3dc940acd8d3 08-Nov-2007 Chris Lattner <sabre@nondot.org> abstract out buffer type a bit better


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
cdd808e2af9f92ef406065c4855ac72d121dbcda 08-Nov-2007 Chris Lattner <sabre@nondot.org> abstract out buffer type a bit better


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
6d4adb27e6b9fdb74ea48d3ccda8df3daedc9d64 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Revised serialization of CaseStmt to emit all of the owned pointers (its
subexpressions) all together in one block at the end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
103fc81f12aa635aa0a573c94b1aceb496b4e587 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Revised serialization of CaseStmt to emit all of the owned pointers (its
subexpressions) all together in one block at the end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
dc4fc278b4511d15d6b3576eb38e9a589f8ff0e4 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CompoundAssignOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
83efb151a0c1df8cb8fb25d6dbb6c0f12f07f60a 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CompoundAssignOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e21b584bd53571c08456c493181aec7f2657779d 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of UnaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1049436d4b53d928b555f7381bc1639dd302bbc7 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of UnaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7a87333172641d9cf8327c3fb7a3649da2664c38 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d7fe4ea296646f049e4ff4cc37aa92ff4014a6b3 08-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CallExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43854 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
d7017492da8cb998874185450c2e9b06a8ecc9e1 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ArraySubscriptExpr.
Added "using ..." for "Serializer" and "Deserializer" to reduce amount
of typing for serialization methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
96fa54fc6dc7f4c8dad1fb22fc7fc4f4d775d6c0 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ArraySubscriptExpr.
Added "using ..." for "Serializer" and "Deserializer" to reduce amount
of typing for serialization methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43849 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
705cb5d216ced7e2529f82bf351eaf3bc3d99a4e 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CastExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9971c9ace70624987cd74645a75f4bfbc05afdf2 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CastExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43848 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8c9833bef9ae1fb5460b7c8f4ac8b0378a34c4d6 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ImplicitCastExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a7c20dd6c78db562ff463ee5fb13e248a1d3c93f 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ImplicitCastExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
efa540d7a27ba91dba8cdc05c6fc80890201c837 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of StringLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7febad7377c04607aa2c744d58af61e1abea6250 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of StringLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43834 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
105f21a0c5ca4d97e0e8c3ebd726b4c43561cb77 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ImaginaryLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1c72de1be77fc43cc27e9bf1cbfe7bd25bee2f81 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ImaginaryLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43833 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
18abf6b786e506dcd062485d18d7c81689f00aa6 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FloatingLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
612c9b9ca73593b3194866c9e1a51554db9752e7 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FloatingLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43832 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1d635454ecd6bb90a2185726f54e7f3147be1ea0 07-Nov-2007 Steve Naroff <snaroff@apple.com> Remove old asserts from ASTContext::isObjcIdType() and isObjcClassType(). Instead, return false if the declarations aren't in scope. This was a hold over from when 'id' and 'Class' were initialized lazily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
45ecd5daa36385b7e0b2f657357805e01f5d8cbf 07-Nov-2007 Steve Naroff <snaroff@apple.com> Remove old asserts from ASTContext::isObjcIdType() and isObjcClassType(). Instead, return false if the declarations aren't in scope. This was a hold over from when 'id' and 'Class' were initialized lazily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43827 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
ce14dd1144de1dc6bd1f85e47b2d28d2f3bdd084 07-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed an array overflow bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
89079eac7d6e3091b74b477a4a5ff0cdaf35496c 07-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed an array overflow bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b80a1af42d7f4c388805fec58037970eac25dd72 07-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/DeclSpec.h
564576b225386cbff375351597dd5e2a92872d38 07-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43825 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/DeclSpec.h
42f440c6f76e9df129ed4878904db4112f8705e1 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CharacterLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7338a8299ec393eaf6bb580b5ef9ab2b08b5bd11 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of CharacterLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43824 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
539a418f6ac1f4a529ff003db85e36214539b195 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialiation of PreDefinedExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1ba485e582edfc8636afc25a6d7453c869530688 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialiation of PreDefinedExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43823 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
6c4dba7d96b48b6e5eefe05f62c60d8efaf16ab9 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ContinueStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
96f22423c52c22d263b4e5f7ee762122b607459e 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of ContinueStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43822 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e7d27d5205b282b7955e53d39a699b427e0d9c60 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of IndirectGotoStmt.
Added "FIXME" regarding the lack of source location information for IndirectGotoStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
225a2d946f73aed3b38f265fcb4e7d7d88136928 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of IndirectGotoStmt.
Added "FIXME" regarding the lack of source location information for IndirectGotoStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43821 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
affd8beaaea7ecc28eb0317cb8e639e32e848580 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of GotoStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
3f0767b74b16b37bcce60ff457609161a0665784 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of GotoStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
f34da90170a3847a5d8cd44d1302f9a24215e538 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ForStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
07ba046c7d7bbc1f42b86b3ed012eec8fc7849da 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for ForStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ab97f4d0cd659bc71bac626acb6618bb16c2a7c7 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of DoStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e3299ef345bb8a71901108bf83a824591eae6c1a 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of DoStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43816 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
55e559a710c4777fb8c0652d25e1f528e1b12e27 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for WhileStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5572b94b76a78a35bac32d1ef04907c7a651adba 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for WhileStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43815 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ca22d35b4eb4d109425bbbf844cdfae952c974e3 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of IfStmt.

Fixed declarations of several "directEmit" methods of classes that subclass
Stmt that were missing a "virtual" keyword.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
4210f3dfd73ad3482f9cfa0a382e1fd78f22976d 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of IfStmt.

Fixed declarations of several "directEmit" methods of classes that subclass
Stmt that were missing a "virtual" keyword.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
249d7cdaa6eb9a1849ba2695c817082d9a8c018d 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SwitchStmt, CaseStmt, BreakStmt, DefaultStmt,
and ParenExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
9eea2ca5f2cb5d77569274702b5b06273e426dc2 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SwitchStmt, CaseStmt, BreakStmt, DefaultStmt,
and ParenExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43806 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
e9f69847484fc16fa464717edc0414d2bf8752e9 07-Nov-2007 Steve Naroff <snaroff@apple.com> Rewrite ObjC @try/@catch/@finally. Some minor tweaks to the AST nodes...

Still need to rewrite @throw (and do more testing)...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7573098b83e780d1c5bea13b384b610d8f155676 07-Nov-2007 Steve Naroff <snaroff@apple.com> Rewrite ObjC @try/@catch/@finally. Some minor tweaks to the AST nodes...

Still need to rewrite @throw (and do more testing)...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43803 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
08df2c65dc1843d432507088f8bad65738191a5f 07-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST for objective-c's @throw statement and its pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
39f8f159c488a900e5958d5aab3e467af9ec8a2b 07-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST for objective-c's @throw statement and its pretty-printing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
56a74bb45bf095baa0cb3a097f03ba0816683fa5 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of LabelStmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
b15132fda52046ba65eafd6f4b448f7aa16b7e8d 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of LabelStmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43800 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
25aaa265c75cadf0b85924bee245726a6c5419b2 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Added serialization/deserialization of NullStmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
4927be6102784fc69c50234f7e2253283b3e99e4 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Added serialization/deserialization of NullStmts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
2bd6e653973498d04da27eef1c855b194a0990fb 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Added serialization/deserialization of DeclStmts.
Reordered stmt serialization method implementations to be in alphabetical order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
0965f446e7685dc01fc0b5e718610530eed3cc63 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Added serialization/deserialization of DeclStmts.
Reordered stmt serialization method implementations to be in alphabetical order.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43796 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
47281109ed285b89e60e3c52c5bc3edc79c16daf 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Overhauled serialization of statements. We no longer use specialized SerializeTrait<> classes,
but methods in Stmt (like other objects we are serializing). Full serialization of all statements
is not yet complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
2dc9ac73a8a34cabf261a81a1653d7379065ac61 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Overhauled serialization of statements. We no longer use specialized SerializeTrait<> classes,
but methods in Stmt (like other objects we are serializing). Full serialization of all statements
is not yet complete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
ca14c33a9b2c6548130e92759368494f37ef46d5 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Added static inline method "ReadVal" to QualType for more succinct
deserialization code of objects containing QualTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f623c85c80f875be9d20caf4a0c15092e42e0b9e 07-Nov-2007 Ted Kremenek <kremenek@apple.com> Added static inline method "ReadVal" to QualType for more succinct
deserialization code of objects containing QualTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43792 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d8df6d8004cd9784179ccc94d90bd368d1625b81 06-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for objc2's property ASTs, as well as pretty-priting the ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
82a5fe3d1cf204b672cdab24d72275b6ad2c3527 06-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for objc2's property ASTs, as well as pretty-priting the ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
b3b786280c1146b90ecc9156bce9065c930060ce 06-Nov-2007 Steve Naroff <snaroff@apple.com> Fix a "basic" bug that resulted in a bogus SourceLocation.

Off hand, I don't know why this change makes a difference (I thought the two constructor idioms were equivalent).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ccdbc5c6f14965d91a352d114c109a9d4d9552b8 06-Nov-2007 Steve Naroff <snaroff@apple.com> Fix a "basic" bug that resulted in a bogus SourceLocation.

Off hand, I don't know why this change makes a difference (I thought the two constructor idioms were equivalent).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5d9929476ce28d1c121a20b6256b72f4f74f5bd3 05-Nov-2007 Ted Kremenek <kremenek@apple.com> Made methods "Emit" and "Materialize" in ASTContext (used for serialization) public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
aa499b6ab30975d0cea225f71b33e7ee60b88a1f 05-Nov-2007 Ted Kremenek <kremenek@apple.com> Made methods "Emit" and "Materialize" in ASTContext (used for serialization) public.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43713 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1e1c391211712f267804d5a0f6cc27e4195fe5bf 03-Nov-2007 Steve Naroff <snaroff@apple.com> Add a method prototype slot/getter to the ObjCMessageExpr AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
db611d556f71f98b66b69514d45958d76e5727ab 03-Nov-2007 Steve Naroff <snaroff@apple.com> Add a method prototype slot/getter to the ObjCMessageExpr AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0add5d23d9c69bf307e94cacc195f253af6501a5 03-Nov-2007 Steve Naroff <snaroff@apple.com> Implement rewrite rules for ObjC string constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/Parse/Action.h
lang/Parse/Parser.h
beaf299a2701c5559a4e5d76b0c40f805afb8e6a 03-Nov-2007 Steve Naroff <snaroff@apple.com> Implement rewrite rules for ObjC string constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43665 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/Parse/Action.h
lang/Parse/Parser.h
8593cbf821294b7ffe0889fc056db5fbe41afff8 03-Nov-2007 Chris Lattner <sabre@nondot.org> Fix ownership model of ParseAST to allow the dtor of
ASTConsumer to process the AST before it is destroyed.
This allows elimination of HandleObjcMetaDataEmission.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Sema/ASTStreamer.h
31e6c7ddfeeefe05b67220bc87fa23d4338d1056 03-Nov-2007 Chris Lattner <sabre@nondot.org> Fix ownership model of ParseAST to allow the dtor of
ASTConsumer to process the AST before it is destroyed.
This allows elimination of HandleObjcMetaDataEmission.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43659 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Sema/ASTStreamer.h
2da6b3d1320e61f96c018ebaef5bef5a03d2c72e 03-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Provide both const and non-const accessor methods for @try and @finally ASTs.
My previous patch did the same for @catch AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8aab17e82aab6b3f266ef1884253226d2cb8b8d8 03-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Provide both const and non-const accessor methods for @try and @finally ASTs.
My previous patch did the same for @catch AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43654 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d45362449f3ffbc770ce1a20fe3a0efb20681121 03-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Provide const and none-const version of methods accessing various @catch nodes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
606efdfeb9eef70871eb62a26dfd115e209e899c 03-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Provide const and none-const version of methods accessing various @catch nodes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43653 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
59e9e043c380fd4dbef9096dd1b00cbc83ce049e 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> pretty-print @try/@catch/@finally from AST as the validation of AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7794cb85d394750db0631c02b7aa7837ae56764c 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> pretty-print @try/@catch/@finally from AST as the validation of AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e607c9ec6128dddca21c6f9b8ff6edd85ea06818 02-Nov-2007 Ted Kremenek <kremenek@apple.com> Added most of the boilerplate code for Decl serialization. Still a few
key functions to implement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0497331350e9f7838c03eca5f2782a53160f7423 02-Nov-2007 Ted Kremenek <kremenek@apple.com> Added most of the boilerplate code for Decl serialization. Still a few
key functions to implement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
b8bf60729f38262374422c27cc761a37d94a36c4 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST for @try statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
bd49a647afd9cc534fef13cadf652d4e9c396e2b 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST for @try statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
de3abf821fab1fd7ac1d399e52559afa0f4670d9 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST for @finally statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
161a9c5afaafb4d527b7efba9675a8b2cbbe32e0 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST for @finally statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43629 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0679836a831c0feef62acf2e2a75002419349bf3 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST build for @catch clause (this is work in progress).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
3b1191d7eaf2f4984564e01ab84b6713a9d80e70 02-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> AST build for @catch clause (this is work in progress).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43628 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Parse/Action.h
414bf8f439a8f8656ec48f79438232119d83cac2 01-Nov-2007 Ted Kremenek <kremenek@apple.com> Simplified Serialization code for SourceLocation and SourceRange, and
updated it to the recently updated Serialization API.

Changed clients of SourceLocation serialization to call the
appropriate new methods.

Updated Decl serialization code to put new skeleton serialization code
in place that is much better than the older trait-specialization
approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/SourceLocation.h
beb7713c6102687f7e49e27b8228e84a69d8f6c6 01-Nov-2007 Ted Kremenek <kremenek@apple.com> Simplified Serialization code for SourceLocation and SourceRange, and
updated it to the recently updated Serialization API.

Changed clients of SourceLocation serialization to call the
appropriate new methods.

Updated Decl serialization code to put new skeleton serialization code
in place that is much better than the older trait-specialization
approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43625 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/SourceLocation.h
709524816623144c1c9d25a1506573245cd1bd16 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Bunch of class declarations for objective-c's @try-catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Parser.h
b210bd0404f84b99259c9987d347a44d3c202238 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Bunch of class declarations for objective-c's @try-catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43623 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Parser.h
7a78e43db820f48c784ab6d24d2e4c85ac7c5ed6 01-Nov-2007 Devang Patel <dpatel@apple.com> Rename classes and collections that maintain record layout information.
Now, at AST level record info is maintained by ASTRecordLayout class.
Now, at code gen level record info is maintained by CGRecordLayout class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
88a981b47c7face1b1fdaa9074256245107b9ca9 01-Nov-2007 Devang Patel <dpatel@apple.com> Rename classes and collections that maintain record layout information.
Now, at AST level record info is maintained by ASTRecordLayout class.
Now, at code gen level record info is maintained by CGRecordLayout class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43619 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
e1fed7a7fd266a5fc8da531668dcdc785a0ea5c6 01-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of QualTypes within ASTContext. Clarified
ownership model of some type pointers. Added FIXMEs to serialization.

Added comments to ASTContext indicating which variables we are intentionally
*not* serializing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a9a4a24592a2164114a8a36717650e6341eb67a4 01-Nov-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of QualTypes within ASTContext. Clarified
ownership model of some type pointers. Added FIXMEs to serialization.

Added comments to ASTContext indicating which variables we are intentionally
*not* serializing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
65e7eb5a21e5114763acfb37c201d0c425060ebb 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Remaining work to collect objective-c's type qualifiers and use them to encode
method types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
ecb01e666665efabd2aa76a76f6080e2a78965fa 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> Remaining work to collect objective-c's type qualifiers and use them to encode
method types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43617 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
48532db77bc2c5321cbc5818d4c9cbd7d80c87f4 01-Nov-2007 Ted Kremenek <kremenek@apple.com> Reverted unnecessary inlining of operator!=, since negating operator== is
just as efficient and much more succinct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
385cdaa3f583e600ffebc3f1035de76cd177f299 01-Nov-2007 Ted Kremenek <kremenek@apple.com> Reverted unnecessary inlining of operator!=, since negating operator== is
just as efficient and much more succinct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43614 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
f616a24cbc5870ff19b33f70e1f8dbb1ead65ab4 01-Nov-2007 Devang Patel <dpatel@apple.com> Propagate bitfield info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
54e62357516ace7175a923dad4f94463e793e516 01-Nov-2007 Devang Patel <dpatel@apple.com> Propagate bitfield info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5003e8bfcd7cf7a6e0ed8c5dd61a6c998bead4d7 01-Nov-2007 Chris Lattner <sabre@nondot.org> add support for vector type compatibility checking. Patch by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
770951b5bb6028a8d326ddb4a13cef7d4a128162 01-Nov-2007 Chris Lattner <sabre@nondot.org> add support for vector type compatibility checking. Patch by Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43604 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2fd0daa387fb0fdd938e63b84bf0463b1027c3ed 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> 1) More additions for objective-c's qualifier type.
2) Fixed a test failure (which should have failed all along!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
f1de0ca05e2df6f23bd559028693a12d1ebdaaf6 01-Nov-2007 Fariborz Jahanian <fjahanian@apple.com> 1) More additions for objective-c's qualifier type.
2) Fixed a test failure (which should have failed all along!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43589 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
68228a90a7da28494437c03bcb2d93d4cda15d73 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented more of serialization/deserialization for ASTContext. We now
(hypothetically) read in/write out most of the types. Bugs likely exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fee0452973f28691a61aab0fb074468ce3e34b9b 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented more of serialization/deserialization for ASTContext. We now
(hypothetically) read in/write out most of the types. Bugs likely exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6dab49b1916962f50e2c390d5a6f611a1e06e54c 31-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
19d74e1494fe399f0e2a94e9419c095f8214851b 31-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
ebeb42830bb84346a3d0c2a1e494fa14547b65c2 31-Oct-2007 Steve Naroff <snaroff@apple.com> Implement ObjC built-in types in MinimalAction.

This fixes the recent regression with selector-1.m and -parse-noop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b4292f221fb879fd2274683ace4f73d3d99af8c5 31-Oct-2007 Steve Naroff <snaroff@apple.com> Implement ObjC built-in types in MinimalAction.

This fixes the recent regression with selector-1.m and -parse-noop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43575 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
a092334bb4bee918977af3b904efdf5cb51c33ee 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented short-circuited version of Builtin::Info::operator!=.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
9b181b3eec13686ac05fb2c57c3f4baf2d4074a9 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented short-circuited version of Builtin::Info::operator!=.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.h
a8fccb84112bc0fef64b015a02dca5f9d535ce4e 31-Oct-2007 Devang Patel <dpatel@apple.com> Take 2.

Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.

At the moment target triplet and target description strings are hard coded in clang::TargetInfo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/ModuleBuilder.h
7a4718e813e5e99d478567a482217c7eef8572c5 31-Oct-2007 Devang Patel <dpatel@apple.com> Take 2.

Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.

At the moment target triplet and target description strings are hard coded in clang::TargetInfo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/ModuleBuilder.h
8709373142dde1f527d9b0b3e319449995dc4782 31-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
A new test case added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3a3ca1b35a7121aea0bf465a192dce748465e10f 31-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
A new test case added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ae84af8bf8a9251c9d044dc738d4009926653ab6 31-Oct-2007 Steve Naroff <snaroff@apple.com> Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).

This removes several gross hacks to work around the previous "lazy" behavior.

Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
8ee529b5671295ea38c249df8b9d3766c905cfa7 31-Oct-2007 Steve Naroff <snaroff@apple.com> Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).

This removes several gross hacks to work around the previous "lazy" behavior.

Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43567 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c8253192b917a5684717c58f4032e0891d089b00 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of Variable Array Types (VLAs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/Type.h
2e7d352dbec06755105237afba183492d31d03cb 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of Variable Array Types (VLAs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43561 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/Type.h
738e6c088f67beb174062d6161528f8b7ee1a489 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Renamed ivar "ArrayTypes" in ASTContext to "ComplexArrayTypes".

Added skeleton code for serialization of ASTContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7192f8e9592729882a09d84d77838db26e39ebd4 31-Oct-2007 Ted Kremenek <kremenek@apple.com> Renamed ivar "ArrayTypes" in ASTContext to "ComplexArrayTypes".

Added skeleton code for serialization of ASTContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43558 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
07e823291fdbab9283cd77ea04d39a293f6af494 31-Oct-2007 Chris Lattner <sabre@nondot.org> temporarily revert devang's patch to link in the llvm codegen etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/ModuleBuilder.h
e03cd7b7c8dfcc2615fd6d53fffecd1c07c89fc6 31-Oct-2007 Chris Lattner <sabre@nondot.org> temporarily revert devang's patch to link in the llvm codegen etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/ModuleBuilder.h
7f23e3d8d24dfa5043e720b5057d51381f8391f8 31-Oct-2007 Anders Carlsson <andersca@mac.com> Encode Class, SEL and Objective-C objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
8baaca50f07d0c10bba69c8d88c1b9078c92d06d 31-Oct-2007 Anders Carlsson <andersca@mac.com> Encode Class, SEL and Objective-C objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43540 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
2f1a2fc977dd7503ba8062673487667c38269210 31-Oct-2007 Devang Patel <dpatel@apple.com> Make target info available to clang code generator.
This is far from complete but this helps clang codegen module
make progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/ModuleBuilder.h
f767e218ee1a900475db90e8a44fff07f3ef3a09 31-Oct-2007 Devang Patel <dpatel@apple.com> Make target info available to clang code generator.
This is far from complete but this helps clang codegen module
make progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43536 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/CodeGen/ModuleBuilder.h
2e09e44dfb579f93fe6e1c5051a9fe532b66c865 31-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
Added initialization of Class/SEMA types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
8be9d0a9cdce8baa53844e54f6045c4600274269 31-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
Added initialization of Class/SEMA types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
7670cca1f5dc931d9db246b52012a61e19812c02 30-Oct-2007 Ted Kremenek <kremenek@apple.com> Updated some comments.
Disabled assignments for ContentCache.
Copy-ctor for ContentCache now has an assertion preventing it to
be copied from an object that already has an allocated buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
0d892d8bfddd4916cc4f3467e1184a623d0716da 30-Oct-2007 Ted Kremenek <kremenek@apple.com> Updated some comments.
Disabled assignments for ContentCache.
Copy-ctor for ContentCache now has an assertion preventing it to
be copied from an object that already has an allocated buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43526 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
dd364ea78bcc505a34851bcfb68df6ce251c1964 30-Oct-2007 Ted Kremenek <kremenek@apple.com> Removed SrcMgr::FileInfo and SrcMgr::InfoRec and replaced them with a
single class: ContentCache. This simplifies the logic in
SourceManager and makes the ownership of MemoryBuffers clearer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
78d85f53b093867bbb0123f016956178eea7343e 30-Oct-2007 Ted Kremenek <kremenek@apple.com> Removed SrcMgr::FileInfo and SrcMgr::InfoRec and replaced them with a
single class: ContentCache. This simplifies the logic in
SourceManager and makes the ownership of MemoryBuffers clearer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43518 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
c48deecfd383ba2d0f26fc439e11c4bcc4472d74 30-Oct-2007 Chris Lattner <sabre@nondot.org> shrinkify storage class to a bitfield, add a fixme about merging it in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e6889f961f2f29d10f6b4ce3e23fadb9309ddab7 30-Oct-2007 Chris Lattner <sabre@nondot.org> shrinkify storage class to a bitfield, add a fixme about merging it in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43509 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
acc56d446a0ef2f7a3bb2b9ba658829f278b5fd8 30-Oct-2007 Chris Lattner <sabre@nondot.org> update some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Basic/SourceManager.h
f17765d202d1ec34ada7ff3f18d18731588143c2 30-Oct-2007 Chris Lattner <sabre@nondot.org> update some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43506 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/FileManager.h
lang/Basic/SourceManager.h
2058dc43f8d01d65fce80b6287891b624c98e14a 30-Oct-2007 Ted Kremenek <kremenek@apple.com> Added vector to ASTContext to store references to "complete" VLA types
(VLAs with a specified size expresssion). This vector owns the
references to these type objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
347b9f33b3216459bcf60cdd52c739fa3028321e 30-Oct-2007 Ted Kremenek <kremenek@apple.com> Added vector to ASTContext to store references to "complete" VLA types
(VLAs with a specified size expresssion). This vector owns the
references to these type objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43502 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
667f16849c15fa9f75f81f369a48fba80c889949 30-Oct-2007 Steve Naroff <snaroff@apple.com> - Add location info to category/protocol AST's
- Rewrite categories.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
423cb565abc681b770fb4b9b4bc24d398c98157b 30-Oct-2007 Steve Naroff <snaroff@apple.com> - Add location info to category/protocol AST's
- Rewrite categories.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43501 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
ef20ed3ac942b1f3af877e7d9c0c58f6f50c8ddd 30-Oct-2007 Steve Naroff <snaroff@apple.com> More support for rewriting ObjC intefaces. Still some edge cases to handle...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
f908a87299d278164540f90b5b6e6cab7b14fb41 30-Oct-2007 Steve Naroff <snaroff@apple.com> More support for rewriting ObjC intefaces. Still some edge cases to handle...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43493 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
9b57fbac2b861414bf1e4c2320067da8574757ac 30-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Assert if isObjcIdType is called before 'id' type is built.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7ed05071969757ef84d7fd43168a82cb46d610fd 30-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Assert if isObjcIdType is called before 'id' type is built.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43484 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3793e1ab25169c0d5be43f3abe2b4dc92989c043 30-Oct-2007 Ted Kremenek <kremenek@apple.com> VariableArrayTypes (VLAs) without a size expression are now uniqued
and inserted into a FoldingSet owned by ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
2bd24ba6d10f8c811c8e2a57c8397e07082ba497 30-Oct-2007 Ted Kremenek <kremenek@apple.com> VariableArrayTypes (VLAs) without a size expression are now uniqued
and inserted into a FoldingSet owned by ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c81f316d260b8b8b9da21a0f9a22baa334e063fb 29-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Encoding for objectiive-c methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
33e1d64ab5cd5d27f8530ccd056191fe2c9f3f2e 29-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Encoding for objectiive-c methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
7f70eb7d19fd81f10779a0a2e5b02aea48229ad2 29-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Added a missing #include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
481038b5f37b77d7aa24c3ed5a751bc9c37e32e6 29-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Added a missing #include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
1a7fa7ba1d5f4eed5870e8953e1d794190602c28 29-Oct-2007 Steve Naroff <snaroff@apple.com> This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
60fcceeedbfc8b4a99cb942e2bc5aeb9e2f92a1f 29-Oct-2007 Steve Naroff <snaroff@apple.com> This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
fce813e3159a67a57a03cdca45ac4e10d4cffac3 29-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified StmtIterator to support iteration over the size expressions
of VariableTypeArray types that appear in DeclStmts.

Removed operator-- from StmtIterator. operator-- added undesired
complexity, and we have no consumers of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/AST/Type.h
92866e2e90f6d93fb95e25a7ac4438e239d89ce6 29-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified StmtIterator to support iteration over the size expressions
of VariableTypeArray types that appear in DeclStmts.

Removed operator-- from StmtIterator. operator-- added undesired
complexity, and we have no consumers of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtIterator.h
lang/AST/Type.h
e0f97619d1bf13541971e1601fa0bf157c7102d9 29-Oct-2007 Ted Kremenek <kremenek@apple.com> Renamed internal variables of StmtIteratorBase to make the code
slightly more succinct.

Introduced VariableArrayType* within StmtIteratorBase to (soon)
support iteration over the size expressions of variable length arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
65f31e451c8d631f0e76cb9c8935465d68830cb1 29-Oct-2007 Ted Kremenek <kremenek@apple.com> Renamed internal variables of StmtIteratorBase to make the code
slightly more succinct.

Introduced VariableArrayType* within StmtIteratorBase to (soon)
support iteration over the size expressions of variable length arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
cf8b77d47f0c9dde19da4de74e42f095a7cc2723 29-Oct-2007 Ted Kremenek <kremenek@apple.com> For non-floating point types, added check for expressions of the form
"x == x" and "x != x". We emit a warning for these since they always evaluate
to a constant value and often indicate a logical error.

Added test case for this check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3ca0bf2a0ac27b1644ed73b8fc61077d2b9c6995 29-Oct-2007 Ted Kremenek <kremenek@apple.com> For non-floating point types, added check for expressions of the form
"x == x" and "x != x". We emit a warning for these since they always evaluate
to a constant value and often indicate a logical error.

Added test case for this check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43450 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
36f07d8c36fad7b71488d5ba147b472d779b37f0 29-Oct-2007 Anders Carlsson <andersca@mac.com> Add (partial) support for @encode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
85f9bceab1542aafff012d4d28e998f4ba16e362 29-Oct-2007 Anders Carlsson <andersca@mac.com> Add (partial) support for @encode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43439 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
de4d2bd06970a2914ab172431a1b741bb5a7adb2 29-Oct-2007 Chris Lattner <sabre@nondot.org> Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on
PR1750


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
52735a0339dd31750251a13aac73677693410c9d 29-Oct-2007 Chris Lattner <sabre@nondot.org> Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on
PR1750


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43435 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
8a40a83b02506a093be6649b11a67bbc04545387 29-Oct-2007 Chris Lattner <sabre@nondot.org> Implement *skeletal* support for representing GNU inline asm stmts in the AST,
resolving a crash on a .i file in PR1750. We now generate 49 errors on the
.i file in that bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
fe795956194141c91ae555985c9b930595bff43f 29-Oct-2007 Chris Lattner <sabre@nondot.org> Implement *skeletal* support for representing GNU inline asm stmts in the AST,
resolving a crash on a .i file in PR1750. We now generate 49 errors on the
.i file in that bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43433 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
2afc72b0b6b3d2f44ca2576c98d307310d556983 29-Oct-2007 Chris Lattner <sabre@nondot.org> Fix a major bug in the Type::getAs*Type methods: they didn't strip off
typeof(type) and typeof(expr) correctly. Now provide a single point of
contact (Type::getDesugaredType) for doing the shallow stripping we need.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
dea6146deede4b89a1757d46cd92ebf158659c25 29-Oct-2007 Chris Lattner <sabre@nondot.org> Fix a major bug in the Type::getAs*Type methods: they didn't strip off
typeof(type) and typeof(expr) correctly. Now provide a single point of
contact (Type::getDesugaredType) for doing the shallow stripping we need.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43432 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
68ee6a63fe3a1a4d386d57057c8ad4859c85748d 28-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for TypedefType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4f50ee3e6db9d5ec8c1a56fa07510dab06194564 28-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for TypedefType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43423 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0b365b4f0b4aa1fdd5d89942342f6c6f6fefd882 28-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FunctionTypeProto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4340bfa9f442b450b8d81081fb463b03a0096230 28-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FunctionTypeProto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43419 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b4498bd320cffda59566b658b59fbbc70978adf5 27-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FunctionTypeNoProto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e81e24c84bae6d5a999d9e34a21c4ec73f91d37e 27-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of FunctionTypeNoProto.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43418 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b90d06fb38d0b1862749bd0a0d24c3b94d4d5e4f 27-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for VectorType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
71ac846a4e20ad378700df040abeb3eb06163bca 27-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for VectorType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
27a32d6f18844a97446d6e2002bf181da591332a 27-Oct-2007 Ted Kremenek <kremenek@apple.com> More work on type serialization: added support for serializing BuiltinTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a4cb4525cf4bf8f61299147f22ffc187ed1eac9e 27-Oct-2007 Ted Kremenek <kremenek@apple.com> More work on type serialization: added support for serializing BuiltinTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3774dd9126402b3979f045f184ec7bb6d0d592c4 26-Oct-2007 Steve Naroff <snaroff@apple.com> Start rewriting ObjC interfaces. As a start, we comment out all the methods. This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
bef1185418705e16012b3dd50cd7c260c8d6b79c 26-Oct-2007 Steve Naroff <snaroff@apple.com> Start rewriting ObjC interfaces. As a start, we comment out all the methods. This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43404 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
lang/Parse/Parser.h
78f138f44886abc5ab7fc1551d501308f1846d80 26-Oct-2007 Ted Kremenek <kremenek@apple.com> Added skeleton implementation of serialization for types (not complete).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
73af669633e13c813f80cd15ecf3e6414778aee4 26-Oct-2007 Ted Kremenek <kremenek@apple.com> Added skeleton implementation of serialization for types (not complete).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43397 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f185aef283b7faf2db1887a6693d3172843e6a50 26-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to synthesize computation of Ivar offset in rewritten c file.
Thanks to Steve N. to point out using of offsetof for this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
26e4cd331c389a9b7d51c91981a7a10c8a909bf4 26-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to synthesize computation of Ivar offset in rewritten c file.
Thanks to Steve N. to point out using of offsetof for this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
15294058128b89eb2973536cd76891649b6e80c6 26-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified StmtIterator to now include visiting the initialization expression for EnumConstantDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/StmtIterator.h
b990f1834b4ba1c8e67ace010b0f554d0e59c1ea 26-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified StmtIterator to now include visiting the initialization expression for EnumConstantDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/StmtIterator.h
17377da57cc24b845a4fb5bbf9e227c71e1fc270 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Added skeleton for Decl serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2f1f8cb1b8f487086053579802407d64ca2b587f 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Added skeleton for Decl serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43361 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ec8696628940a3aa3304513feec54f575102f088 25-Oct-2007 Ted Kremenek <kremenek@apple.com> changed #include of Serialization.h to SerializationFwd.h to reduce
compilation time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/SourceLocation.h
0a449eed1dd2439b4b9c0a6291084816eab390c1 25-Oct-2007 Ted Kremenek <kremenek@apple.com> changed #include of Serialization.h to SerializationFwd.h to reduce
compilation time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43354 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/SourceLocation.h
9511ec8b102f18908a7171fac7f1b8ed43615b2b 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SourceLocation and SourceRange objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
19a95bcf3561ed977c48d5f2a2793b60a8c8e573 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization of SourceLocation and SourceRange objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43343 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
000f48fc683f280bbb16fe9926d1385f8bbf1319 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Added constness to accessors in CompoundStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
cc326204dd97771c336b9aab3b9963ea30d69c29 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Added constness to accessors in CompoundStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43342 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
f624cd28f1a58e7eff980eb3740a6ba192bb3833 25-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new ChooseExpr::isConditionTrue method to unify
some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
27437caadea35f84d550cd29f024fcf3ea240eec 25-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new ChooseExpr::isConditionTrue method to unify
some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43322 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
68e02272f5cc0e349ed568d005fd5de45ef630b2 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Added accessors to CompoundStmt to retrieve the source locations for the
left and right bracket. This is useful for serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
54395d440dc82a5e51b945c6c2a7f4bc4bea0358 25-Oct-2007 Ted Kremenek <kremenek@apple.com> Added accessors to CompoundStmt to retrieve the source locations for the
left and right bracket. This is useful for serialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43318 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7122603bb762d042baf25e20bcb2d357cb3992ce 25-Oct-2007 Steve Naroff <snaroff@apple.com> More work on translating message expressions.

Still to do:

- Chris will fix a bug in the rewriting engine for nested stmts. For example, the following:

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

tranlates to:

NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init];

...which is correct, except there is garbage after sel_getUid("init"). This is because the rewriter isn't updating the extent of the containing message expression.

- Do the crazy cast thang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
934f276cc5b45e19cd12ebb2d04fd7972a23865c 25-Oct-2007 Steve Naroff <snaroff@apple.com> More work on translating message expressions.

Still to do:

- Chris will fix a bug in the rewriting engine for nested stmts. For example, the following:

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

tranlates to:

NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init];

...which is correct, except there is garbage after sel_getUid("init"). This is because the rewriter isn't updating the extent of the containing message expression.

- Do the crazy cast thang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43316 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
ce797d997b61815daa9220659534ffb959603361 24-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified current clients of Bitcode-Object serialization to use the
new split-header file configuration (Serialize.h and Deserialize.h)
now in place in the core LLVM repository.

Removed unneeded SerializeTrait specializations for enums in
TokenKinds.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Basic/TokenKinds.h
a2bfb91c55a9baeb368dec97cd5971484b1d0656 24-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified current clients of Bitcode-Object serialization to use the
new split-header file configuration (Serialize.h and Deserialize.h)
now in place in the core LLVM repository.

Removed unneeded SerializeTrait specializations for enums in
TokenKinds.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43306 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Basic/TokenKinds.h
c65a1fc4f4f84c5a08db7d08bbc2e49f0bb75ff5 24-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified operator* for StmtIterator to return Stmt*& instead of Stmt*.
This permits in-place replacement of the original AST statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/StmtIterator.h
22c0fcba14e069bd3d35305ecd6d952f41666610 24-Oct-2007 Ted Kremenek <kremenek@apple.com> Modified operator* for StmtIterator to return Stmt*& instead of Stmt*.
This permits in-place replacement of the original AST statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43295 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/StmtIterator.h
9b7c4ac68212fc094954a838423785abdd55ca5a 24-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Silenced a VC++ warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
79016528d20b6e95d94baefdee2d8f9b764e38f7 24-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Silenced a VC++ warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43277 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
634cadf816ddc884fa5c097ceafaffbb44f4e63e 24-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for IdentifierInfo and IdentifierTable.
Updated serialization test code in the driver to test serialization of
these types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Basic/TokenKinds.h
c637e6b7afeebc6b4f751e4373715b6a8ea77272 24-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented serialization for IdentifierInfo and IdentifierTable.
Updated serialization test code in the driver to test serialization of
these types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43266 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
lang/Basic/TokenKinds.h
4c4abed3000046bc27a919fbccc0df1a33cb6c43 23-Oct-2007 Steve Naroff <snaroff@apple.com> - Add rewrite rule for @class.
- Add setter/getter to ObjcClassDecl.
- Predefined key runtime functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7e15891fc89256fc013bd1003676ad3197b85c25 23-Oct-2007 Steve Naroff <snaroff@apple.com> - Add rewrite rule for @class.
- Add setter/getter to ObjcClassDecl.
- Predefined key runtime functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43257 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
ce7357d49e780ed5414257a59eb2b4cfa5a9c419 19-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Silenced a VC++ warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e203877d239454182c94bc2f730d69f4937bf818 19-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Silenced a VC++ warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43179 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a6478551aaf4095fe3b0d6a41905223c951f82a2 19-Oct-2007 Ted Kremenek <kremenek@apple.com> Fixed DeclStmt::child_begin() to actually create an iterator that
visits its decls, rather than just creating an "end()" iterator.

Fixed child_end() for statements and expressions to use
child_iterator() to create the end() iterator, rather than just
returning NULL.

Fixed bug in StmtIterator where we did not correctly detect if we had
marched off the end of the ScopedDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
9ac5928abeb3a47592201e1c30fe2930c20a507e 19-Oct-2007 Ted Kremenek <kremenek@apple.com> Fixed DeclStmt::child_begin() to actually create an iterator that
visits its decls, rather than just creating an "end()" iterator.

Fixed child_end() for statements and expressions to use
child_iterator() to create the end() iterator, rather than just
returning NULL.

Fixed bug in StmtIterator where we did not correctly detect if we had
marched off the end of the ScopedDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43156 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
45d52f7b948d91fc8816c860f1192b09300d0941 19-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to rewrite ivar tables metadata for classes defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
f4d331dd922f92478ebf30e808c0ca97ce49418b 19-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to rewrite ivar tables metadata for classes defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43151 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6d1126731f34672a1eb196b064d2ee331bb3d61b 18-Oct-2007 Ted Kremenek <kremenek@apple.com> Refactored StmtIterator into classes StmtIteratorBase (non-templated)
and StmtIteratorImpl (templated), which StmtIterator and
ConstStmtIterator now succintly subclass.

Implemented iteration over the initializers in DeclStmts. This is not
thoroughly tested, so there may be bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
c325e7f51b4c92efd711b8ad289ec16da8cd64f0 18-Oct-2007 Ted Kremenek <kremenek@apple.com> Refactored StmtIterator into classes StmtIteratorBase (non-templated)
and StmtIteratorImpl (templated), which StmtIterator and
ConstStmtIterator now succintly subclass.

Implemented iteration over the initializers in DeclStmts. This is not
thoroughly tested, so there may be bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43138 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtIterator.h
4f398258f5e55a2fab236b4f515115ab0dd69e5d 18-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented 90% functionality of new child_iterator for Stmt objects
that will (soon) allow iteration over the initializers in
declarations. This new iterator mechanism is implemented by the
classes StmtIterator and ConstStmtIterator.

Patched a few files to use "operator++" instead of "operator+" on
child_iterators.

Friendship added in VarDecl to StmtIterator to allow returning a
reference to the initializer within the VarDecl. We may not wish this
as a permanent solution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
9caf8b1ca6beb254f420dada3c0e94d5ef027f58 18-Oct-2007 Ted Kremenek <kremenek@apple.com> Implemented 90% functionality of new child_iterator for Stmt objects
that will (soon) allow iteration over the initializers in
declarations. This new iterator mechanism is implemented by the
classes StmtIterator and ConstStmtIterator.

Patched a few files to use "operator++" instead of "operator+" on
child_iterators.

Friendship added in VarDecl to StmtIterator to allow returning a
reference to the initializer within the VarDecl. We may not wish this
as a permanent solution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
lang/AST/StmtIterator.h
bf0bfa6ec1ef631ea5bf11596105db3a0e5a5851 18-Oct-2007 Chris Lattner <sabre@nondot.org> Add new API to rewrite one stmt/expr with another.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
01c5748c29e75b29cab5fc7d8ad1b173b29c7ecf 18-Oct-2007 Chris Lattner <sabre@nondot.org> Add new API to rewrite one stmt/expr with another.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43101 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
dcb9f5dca11b62e14b1b7788fd6e35f70935ee84 17-Oct-2007 Chris Lattner <sabre@nondot.org> Fix assertion for raw lexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
fd1f344f874799ce8a320d81043a431b65fd1fe2 17-Oct-2007 Chris Lattner <sabre@nondot.org> Fix assertion for raw lexer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43091 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
761d76bc9e98198cfe12f4995e5acf810a4d6853 17-Oct-2007 Chris Lattner <sabre@nondot.org> Move token length calculation out of the diagnostics machinery into
the lexer, where it can be shared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
9a6119437672f42be5f50c3fe89fe843b1bfa5b5 17-Oct-2007 Chris Lattner <sabre@nondot.org> Move token length calculation out of the diagnostics machinery into
the lexer, where it can be shared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43090 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
342dccb41228e7c365fedfc70b8b579ca567107a 17-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new type of lexer: a raw lexer, which does not require a preprocessor
object in order to do its thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
168ae2d44a443da75ea85db5f3b5081eb0bce113 17-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new type of lexer: a raw lexer, which does not require a preprocessor
object in order to do its thing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43084 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
eb6d6b592d035568ef38820a92efc13f9f296c4e 17-Oct-2007 Chris Lattner <sabre@nondot.org> add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
e5956bd2730c051835f9acd9e957c5d79f99e7c3 17-Oct-2007 Chris Lattner <sabre@nondot.org> add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43079 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
b391e6e2a8faa67ecdb1ad5d1b86e01ec4f2aa05 17-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Implementation of AST for @protocol expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
390d50a725497e99247dc104a7d2c2a255d3af14 17-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Implementation of AST for @protocol expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43075 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
ff08d2c2d4e1f348d27dd8c33682b42adb23e853 17-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Updated VC++ build system.
Silenced some VC++ warnings.
Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review.
Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
7b66000bdfc2684351fb03208e672f23012ed569 17-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Updated VC++ build system.
Silenced some VC++ warnings.
Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review.
Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43074 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
221bb8d0bbbc573b8f221e384d18d59b810f8e22 17-Oct-2007 Ted Kremenek <kremenek@apple.com> Started work on clang object serialization. Experimental
serialization logic as well as driver code is now in
Driver/SerializationTest.cpp. The status of this code is that it
should be used by no clients.

Added --test-pickling option to driver to run the serialization code.

Modified IdentifierInfo and IdentifierTable to have friend classes
that permit object serialization. Such friendship may not be needed
in the final design.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
bfa82c4c23ce96fdcf357a8f7ef70a9b71b69144 17-Oct-2007 Ted Kremenek <kremenek@apple.com> Started work on clang object serialization. Experimental
serialization logic as well as driver code is now in
Driver/SerializationTest.cpp. The status of this code is that it
should be used by no clients.

Added --test-pickling option to driver to run the serialization code.

Modified IdentifierInfo and IdentifierTable to have friend classes
that permit object serialization. Such friendship may not be needed
in the final design.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43052 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
957448a2bf1ce1fcda4f1dbbf99658a013fdb3ab 17-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fix location processing of @selector: the range should include the @ sign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
lang/Parse/Parser.h
2a35fa9b5e0f9d9429c04adb2e1249b6fd425e7a 17-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fix location processing of @selector: the range should include the @ sign.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43051 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
lang/Parse/Parser.h
5266418f8cd86a47d491bd089bfd1a605af559cd 17-Oct-2007 Steve Naroff <snaroff@apple.com> Add Sema::CheckMessageArgumentTypes()...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
81bfde990c327ba6e5225cf207d71431937730f3 17-Oct-2007 Steve Naroff <snaroff@apple.com> Add Sema::CheckMessageArgumentTypes()...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
cfd61c8faf638962f1f37807b5a8a565c20f4b57 17-Oct-2007 Chris Lattner <sabre@nondot.org> Fix location processing of @encode: the range should include the @ sign.
@selector probably gets this wrong also.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
lang/Parse/Parser.h
674af9541256dc3ef803e3723027a8b028f1f7a2 17-Oct-2007 Chris Lattner <sabre@nondot.org> Fix location processing of @encode: the range should include the @ sign.
@selector probably gets this wrong also.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43048 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
lang/Parse/Parser.h
6fe8b27c7cda9a6a307469be94770aed9c6ae343 17-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new Rewriter::getRangeSize method.
Rename SourceRange::Begin()/End() to getBegin()/getEnd() for
consistency with other code.
Start building the rewriter towards handling @encode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/Basic/SourceLocation.h
lang/Rewrite/Rewriter.h
311ff02fae0392bee6abe7723cdf5a69b2899a47 17-Oct-2007 Chris Lattner <sabre@nondot.org> Add a new Rewriter::getRangeSize method.
Rename SourceRange::Begin()/End() to getBegin()/getEnd() for
consistency with other code.
Start building the rewriter towards handling @encode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43047 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/Basic/SourceLocation.h
lang/Rewrite/Rewriter.h
171f5b1258848d2b35a87b3ec345f7db899d69c6 16-Oct-2007 Steve Naroff <snaroff@apple.com> Remove ObjcMethodDecl::getNumMethodParams/getMethodParamDecl, they aren't used/needed.
Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3bea81bbae827195acfdf7bedfb7ac80c487dc63 16-Oct-2007 Steve Naroff <snaroff@apple.com> Remove ObjcMethodDecl::getNumMethodParams/getMethodParamDecl, they aren't used/needed.
Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43045 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
034beb260956032bfa6bceb97dfeb3aa5b98dcfa 16-Oct-2007 Chris Lattner <sabre@nondot.org> publish location info


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
05de8bc173c217f349f09b143bf5c6f6e82b87ae 16-Oct-2007 Chris Lattner <sabre@nondot.org> publish location info


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43044 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
74db1684571b0c7b77a5c2efdf012453d790654f 16-Oct-2007 Chris Lattner <sabre@nondot.org> Push the rewriter forward a bit more. Now it rewrites
#import to #include's as a test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Rewrite/Rewriter.h
2c64b7b9381be4ff62fbdc404ed3f14c8086898d 16-Oct-2007 Chris Lattner <sabre@nondot.org> Push the rewriter forward a bit more. Now it rewrites
#import to #include's as a test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Rewrite/Rewriter.h
53a24b70fa220fb20bccfcb33a2dbf7c062baf7f 16-Oct-2007 Chris Lattner <sabre@nondot.org> these aren't const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
10864b47250df7ae039fe9932bdf7a5b0c21280e 16-Oct-2007 Chris Lattner <sabre@nondot.org> these aren't const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43040 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
f807c2061e08c74432b054a54c1b3da385bf0838 16-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to implement AST generation for objective-c's @selector expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
b62f6813406a03bf8a371c4e46c9fad51d102121 16-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to implement AST generation for objective-c's @selector expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43038 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
7e46145da63391e7c81e18f65271ba9f73391e30 16-Oct-2007 Steve Naroff <snaroff@apple.com> Emit diagnostics for methods not found.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
983df5b2280980e59b0b062bcc2882230465a61e 16-Oct-2007 Steve Naroff <snaroff@apple.com> Emit diagnostics for methods not found.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43037 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
056c6b076f495f267fc150d0e5dd217f4ae8b2f6 16-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse @selector expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
a0818e3cd7d59d05e6da41015033b5574c3d7893 16-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse @selector expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43022 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
f2e3031fe4911c5b82735c9495c2bb459d414693 16-Oct-2007 Steve Naroff <snaroff@apple.com> Change the type of ObjCStringLiteral from "struct __builtin_CFString *" to "NSConstantString *".

This makes the typecheck much happier. Without this change, the type checker would have to special case "struct __builtin_CFString *". This change does assume the interface for NSConstantString is declared in the translation unit.

I left ASTContext::getCFConstantStringType() around for now (with a comment that says it is currently unused).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
2198891824c38d45b2279de5d5e3ef9394eb457c 16-Oct-2007 Steve Naroff <snaroff@apple.com> Change the type of ObjCStringLiteral from "struct __builtin_CFString *" to "NSConstantString *".

This makes the typecheck much happier. Without this change, the type checker would have to special case "struct __builtin_CFString *". This change does assume the interface for NSConstantString is declared in the translation unit.

I left ASTContext::getCFConstantStringType() around for now (with a comment that says it is currently unused).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43021 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fb9dd7516fb564dab9980a84af0b2d01d500b2f2 15-Oct-2007 Steve Naroff <snaroff@apple.com> Fix a parser bug with message expressions - need to call ParsePostfixExpressionSuffix().

Now were correctly allow the following...

i = [str rangeOfString:@"]"].length;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
a642beb9f143130588dcf622f5f7020832b22707 15-Oct-2007 Steve Naroff <snaroff@apple.com> Fix a parser bug with message expressions - need to call ParsePostfixExpressionSuffix().

Now were correctly allow the following...

i = [str rangeOfString:@"]"].length;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
85f0dc588193fc73c58e73769e266cd83ed415fe 15-Oct-2007 Steve Naroff <snaroff@apple.com> Move type compatibility predicates from Type to ASTContext. In addition, the predicates are now instance methods (they were previously static class methods on Type).

This allowed me to fix the following hack from this weekend...

// FIXME: Devise a way to do this without using strcmp.
// Would like to say..."return getAsStructureType() == IdStructType;", but
// we don't have a pointer to ASTContext.
bool Type::isObjcIdType() const {
if (const RecordType *RT = getAsStructureType())
return !strcmp(RT->getDecl()->getName(), "objc_object");
return false;
}

...which is now...

bool isObjcIdType(QualType T) const {
return T->getAsStructureType() == IdStructType;
}

Side notes:

- I had to remove a convenience function from the TypesCompatibleExpr class.

int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);}

Which required a couple clients get a little more verbose...

- Result = TCE->typesAreCompatible();
+ Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2());

Overall, I think this change also makes sense for a couple reasons...

1) Since ASTContext vends types, it makes sense for the type compatibility API to be there.
2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/Type.h
ec0550fa3653d46560bf4484a2e988329c228e39 15-Oct-2007 Steve Naroff <snaroff@apple.com> Move type compatibility predicates from Type to ASTContext. In addition, the predicates are now instance methods (they were previously static class methods on Type).

This allowed me to fix the following hack from this weekend...

// FIXME: Devise a way to do this without using strcmp.
// Would like to say..."return getAsStructureType() == IdStructType;", but
// we don't have a pointer to ASTContext.
bool Type::isObjcIdType() const {
if (const RecordType *RT = getAsStructureType())
return !strcmp(RT->getDecl()->getName(), "objc_object");
return false;
}

...which is now...

bool isObjcIdType(QualType T) const {
return T->getAsStructureType() == IdStructType;
}

Side notes:

- I had to remove a convenience function from the TypesCompatibleExpr class.

int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);}

Which required a couple clients get a little more verbose...

- Result = TCE->typesAreCompatible();
+ Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2());

Overall, I think this change also makes sense for a couple reasons...

1) Since ASTContext vends types, it makes sense for the type compatibility API to be there.
2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43009 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Expr.h
lang/AST/Type.h
36760330e9e1cff31a7bcb5581bc7244e347f9e0 15-Oct-2007 Anders Carlsson <andersca@mac.com> Add code generation and sema checking for __builtin_va_arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
7c50aca2fe36f6daa9bf1c8c428f30e72f96470a 15-Oct-2007 Anders Carlsson <andersca@mac.com> Add code generation and sema checking for __builtin_va_arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
9d12c90f8c5aedbc20737a35feb370f9457d4e8e 15-Oct-2007 Steve Naroff <snaroff@apple.com> Added ASTContext::setObjcIdType/getObjcIdType(), set by Sema.

Also noticed ASTContext::BuiltinVaListType wasn't being initialized to the null type (so I set it).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
7e219e47de26346885d667131977bd9ca2d7662a 15-Oct-2007 Steve Naroff <snaroff@apple.com> Added ASTContext::setObjcIdType/getObjcIdType(), set by Sema.

Also noticed ASTContext::BuiltinVaListType wasn't being initialized to the null type (so I set it).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42983 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
1a402e6eccba8d1de9e1ceb5d6d271678af5933f 15-Oct-2007 Steve Naroff <snaroff@apple.com> Teach the type checker about "id". This removes the following bogus warning...

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.m
t.m:29:18: warning: incompatible pointer types assigning 'id' to 'NSString *'
resultString = [[NSString alloc] initWithFormat:0 arguments:0];
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
954ea17353d3b24be52424bc287bdb6bef787fec 15-Oct-2007 Steve Naroff <snaroff@apple.com> Teach the type checker about "id". This removes the following bogus warning...

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.m
t.m:29:18: warning: incompatible pointer types assigning 'id' to 'NSString *'
resultString = [[NSString alloc] initWithFormat:0 arguments:0];
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42975 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
55bfe0d2638f678e24e618a754859f7f26aa8c5b 15-Oct-2007 Anders Carlsson <andersca@mac.com> Add support for Pascal strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/LangOptions.h
lang/Lex/LiteralSupport.h
ee98ac5a1330db432b188dd2d38b6631aac47bf1 15-Oct-2007 Anders Carlsson <andersca@mac.com> Add support for Pascal strings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42974 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/LangOptions.h
lang/Lex/LiteralSupport.h
705380bc9b8eaa0e7285eb64f22ef18112fe9057 15-Oct-2007 Steve Naroff <snaroff@apple.com> - Teach ObjcInterfaceDecl::lookupInstance/ClassMethod to look through protocols.
- Start looking up methods in the global method pools (for "id").
- Start integrating interface types into the type system.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ff1afdb4f5ee2fc74ec0af788e18b3a036eaaafe 15-Oct-2007 Steve Naroff <snaroff@apple.com> - Teach ObjcInterfaceDecl::lookupInstance/ClassMethod to look through protocols.
- Start looking up methods in the global method pools (for "id").
- Start integrating interface types into the type system.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42971 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f66d84aea51d377e0c24853a3d5cb689be1887ff 14-Oct-2007 Steve Naroff <snaroff@apple.com> Add category lookup (removing a couple FIXME's).
Changed ObjcInterfaceDecl::ListCategories->CategoryList.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
3d58138992b9bc7b34aaa680f3ddf3971292eb7d 14-Oct-2007 Steve Naroff <snaroff@apple.com> Add category lookup (removing a couple FIXME's).
Changed ObjcInterfaceDecl::ListCategories->CategoryList.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42968 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8255b040036fd3b0156fad380995c94bcb444de5 14-Oct-2007 Steve Naroff <snaroff@apple.com> - Added Sema::AddFactoryMethodToGlobalPool and Sema::AddInstanceMethodToGlobalPool and DenseMaps. This will allow us to efficiently lookup a method from a selector given no type information (for the "id" data type).

- Fixed some funky "}
else {" indentation in Sema::ActOnAddMethodsToObjcDecl(). I'd prefer we stay away from this style...it wastes space and isn't any easier to read (from my perspective, at least:-)

- Changed Parser::ParseObjCInterfaceDeclList() to only call Action::ActOnAddMethodsToObjcDecl() when it actually has methods to add (since most interface have methods, this is a very minor cleanup).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
58ff9e8f06a88b74c093d67983c9a1808da1001c 14-Oct-2007 Steve Naroff <snaroff@apple.com> - Added Sema::AddFactoryMethodToGlobalPool and Sema::AddInstanceMethodToGlobalPool and DenseMaps. This will allow us to efficiently lookup a method from a selector given no type information (for the "id" data type).

- Fixed some funky "}
else {" indentation in Sema::ActOnAddMethodsToObjcDecl(). I'd prefer we stay away from this style...it wastes space and isn't any easier to read (from my perspective, at least:-)

- Changed Parser::ParseObjCInterfaceDeclList() to only call Action::ActOnAddMethodsToObjcDecl() when it actually has methods to add (since most interface have methods, this is a very minor cleanup).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42957 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
8b58e8aa66b5acdbfaaa39e0b915b2bd28e8d974 13-Oct-2007 Anders Carlsson <andersca@mac.com> Add __builtin_va_list definitions for x86_64 and ppc64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
fb5e5ba3c7708f3aef4db0ed30e8470b3ed4206a 13-Oct-2007 Anders Carlsson <andersca@mac.com> Add __builtin_va_list definitions for x86_64 and ppc64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
3cfe3d3885904b9fdc56aa99fed1cba1c2d5f0f0 13-Oct-2007 Chris Lattner <sabre@nondot.org> another step forward in rewriter stuff. This still has
some incredibly subtle details that I'm working on getting
right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
7c239606f3a7a685653a0a7e64459c3f43522666 13-Oct-2007 Chris Lattner <sabre@nondot.org> another step forward in rewriter stuff. This still has
some incredibly subtle details that I'm working on getting
right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42940 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
cebb8d62894435f30d3fc740faae304db4015b92 13-Oct-2007 Anders Carlsson <andersca@mac.com> Generate code for va_start and va_end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/TargetInfo.h
793680ed8104bf088d1b382b963a8badcb3f07de 13-Oct-2007 Anders Carlsson <andersca@mac.com> Generate code for va_start and va_end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42939 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/Basic/TargetInfo.h
1003f49442e4f7ff2aba44c5732234a9e4238000 13-Oct-2007 Chris Lattner <sabre@nondot.org> remove dead method with bogus comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
833b2eb738a2a7a77b5c758555694a0d6bc10e1b 13-Oct-2007 Chris Lattner <sabre@nondot.org> remove dead method with bogus comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42937 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
550e05034c6c8efcb7ab4c65f58048eee0892237 13-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Check and diagnose that objective-c objects may not be statically allocated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
e7f64cc250245aa6c0e1ef6da7e9b6f62d5fedde 13-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Check and diagnose that objective-c objects may not be statically allocated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42936 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
035d87969d36950ea23f47b3dee507020b47b187 12-Oct-2007 Ted Kremenek <kremenek@apple.com> Added notion of '*' specified format width/specifiers when checking
printf format strings. Added type checking to see if the matching
width/precision argument was of type 'int'.

Thanks to Anders Carlsson for reporting this missing feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
580b664e9c2acd3bffddfea79b1ce2863cfd9dd0 12-Oct-2007 Ted Kremenek <kremenek@apple.com> Added notion of '*' specified format width/specifiers when checking
printf format strings. Added type checking to see if the matching
width/precision argument was of type 'int'.

Thanks to Anders Carlsson for reporting this missing feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42933 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
136df561df786ecb1b14b469ca637055e0d628c7 12-Oct-2007 Chris Lattner <sabre@nondot.org> add a new SM::getDecomposedFileLoc method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
3457e8cbaa8a6fec5d69173450655fe0bc38634b 12-Oct-2007 Chris Lattner <sabre@nondot.org> add a new SM::getDecomposedFileLoc method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
e267480a5dd16830c456700af628ef8a80778d7d 12-Oct-2007 Anders Carlsson <andersca@mac.com> Add some more diagnostics for va_start, fix tests so they pass with these new diags.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6eda8c9cefb498ac8403bc65854e6ce411a07855 12-Oct-2007 Anders Carlsson <andersca@mac.com> Add some more diagnostics for va_start, fix tests so they pass with these new diags.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42917 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
4a6e453e115cce570c0e01ee12b620a4d89eb7af 12-Oct-2007 Chris Lattner <sabre@nondot.org> add comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
cde8bc49a19bdb18643085e87bf1135d0a6672c0 12-Oct-2007 Chris Lattner <sabre@nondot.org> add comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
05d212ac3137d7f82471526a7cdc581ec8981a94 12-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> This patch implementa objective-c's @compatibilty-alias declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
243b64b0001172405ff803c61bdcaa8e98ec1552 12-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> This patch implementa objective-c's @compatibilty-alias declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42883 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
569faa641ff1afcc7bf1a433e0ee360b6db58083 11-Oct-2007 Chris Lattner <sabre@nondot.org> Push the rewriting APIs along. Build a trivial client that replaces tabs
with x's for now. The APIs are all unimplemented, so it doesn't do
anything yet! :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Rewrite/Rewriter.h
8a12c2777cccdf629b89745b6ecc89a8c1641e4e 11-Oct-2007 Chris Lattner <sabre@nondot.org> Push the rewriting APIs along. Build a trivial client that replaces tabs
with x's for now. The APIs are all unimplemented, so it doesn't do
anything yet! :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Rewrite/Rewriter.h
d855a6ead44e3a875179400c472ac0b37df35f70 11-Oct-2007 Chris Lattner <sabre@nondot.org> slightly simplify interface


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
00bb283ecdfb1d5c69261c7663d166cee3f11a9b 11-Oct-2007 Chris Lattner <sabre@nondot.org> slightly simplify interface


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42858 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fb5b1e8f29523072ac5a2bf230de8b5334408e75 11-Oct-2007 Anders Carlsson <andersca@mac.com> Add __builtin_va_start to the list of builtins, make __builtin_va_list available to builtin functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
b2cf3573d7351094f6247fcca94703ce88eb9ee0 11-Oct-2007 Anders Carlsson <andersca@mac.com> Add __builtin_va_start to the list of builtins, make __builtin_va_list available to builtin functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42857 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
91193f64449fe1faf9306a04ade6539d26f44037 11-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to create protocol conforming class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
4b6c9051c6522894978c9ba6a819a659d102db36 11-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to create protocol conforming class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42856 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
7aeeda0c4b17182f87e249322d6db94d6095176e 11-Oct-2007 Steve Naroff <snaroff@apple.com> Refinements to Sema::GetObjcIdType()...

- Cache the typedef, not the type (avoids importing AST/Type.h).
- Emit an error if "id" cannot be found.
- Comment the routine and add a FIXME to reconsider how we emulate GCC's new fangled behavior. This isn't a priority for now, since almost no code depends on having "id" built-in.
- Add a test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e21b573bbfa7f53de694b81455d0627b7a3b6554 11-Oct-2007 Steve Naroff <snaroff@apple.com> Refinements to Sema::GetObjcIdType()...

- Cache the typedef, not the type (avoids importing AST/Type.h).
- Emit an error if "id" cannot be found.
- Comment the routine and add a FIXME to reconsider how we emulate GCC's new fangled behavior. This isn't a priority for now, since almost no code depends on having "id" built-in.
- Add a test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42845 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
663733e9a0cfa1aae3644169d5f71b69db7be408 10-Oct-2007 Anders Carlsson <andersca@mac.com> Emit a warning when the body of an if block is a NullStmt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
2d85f8ba62fd6fdcf0ae303d77112b413d412cae 10-Oct-2007 Anders Carlsson <andersca@mac.com> Emit a warning when the body of an if block is a NullStmt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
77cec47d0e45a620a5ea9d9f83fa8ddbd5b70042 10-Oct-2007 Chris Lattner <sabre@nondot.org> resolve a fixme, by moving __builtin_va_list to a more logical
place and making it correctly parameterized on the target.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
d19144b244f86227fcc2b0da794929fe83968dd5 10-Oct-2007 Chris Lattner <sabre@nondot.org> resolve a fixme, by moving __builtin_va_list to a more logical
place and making it correctly parameterized on the target.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
bd5c5fbb2038593120fecaff11bfa514b32db1b8 10-Oct-2007 Steve Naroff <snaroff@apple.com> Fix a latent bug in MinimalActions (created by a recent name change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
640db42222c9f3f6716cf4d4cbcabb0538c7f4d7 10-Oct-2007 Steve Naroff <snaroff@apple.com> Fix a latent bug in MinimalActions (created by a recent name change).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42829 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
415c183e6e2bb95f3c8f1337006c295f267240d6 10-Oct-2007 Steve Naroff <snaroff@apple.com> Remove Scope argument from ObjC actions that either don't need it or can now use TUScope.
Also improve a recently added comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e440eb8158e71deb1e4ab11618ae3d680aac6da1 10-Oct-2007 Steve Naroff <snaroff@apple.com> Remove Scope argument from ObjC actions that either don't need it or can now use TUScope.
Also improve a recently added comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42826 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d1f21e12121a100ef17e7e80343b92a0797eeedc 10-Oct-2007 Chris Lattner <sabre@nondot.org> Make a significant change to invert the control flow handling
predefined macros. Previously, these were handled by the driver,
now they are handled by the preprocessor.

Some fallout of this:

1. Instead of preprocessing two buffers (the predefines, then the
main source file) we now start preprocessing the main source
file and inject the predefines as a "psuedo #include" from the
main source file.
2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
Preprocessor::isInPrimaryFile.
3. The driver doesn't have to know about standard #defines, the
preprocessor knows, which is nice for people wanting to define
their own drivers.
4. This allows us to put normal tokens in the predefine buffer,
for example a definition for __builtin_va_list that is
target-specific, and a typedef for id in objc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
53b0dabbe52219a8057659b90539837394ef0fa1 10-Oct-2007 Chris Lattner <sabre@nondot.org> Make a significant change to invert the control flow handling
predefined macros. Previously, these were handled by the driver,
now they are handled by the preprocessor.

Some fallout of this:

1. Instead of preprocessing two buffers (the predefines, then the
main source file) we now start preprocessing the main source
file and inject the predefines as a "psuedo #include" from the
main source file.
2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
Preprocessor::isInPrimaryFile.
3. The driver doesn't have to know about standard #defines, the
preprocessor knows, which is nice for people wanting to define
their own drivers.
4. This allows us to put normal tokens in the predefine buffer,
for example a definition for __builtin_va_list that is
target-specific, and a typedef for id in objc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42818 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
9637a9be52c572af8bda21818126c76276bba7f3 10-Oct-2007 Steve Naroff <snaroff@apple.com> Make sure methods with no return type default to "id".

This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added).

Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope.

Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b216c8861c60af9c56c900a485233255c4452df2 10-Oct-2007 Steve Naroff <snaroff@apple.com> Make sure methods with no return type default to "id".

This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added).

Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope.

Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42817 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e51672d4e025afa6990962c2eb5d0e50ae4be789 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Remove comment about protocols and namespace no longer relevant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0be657cb85538ff20358b700062a17450716419b 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Remove comment about protocols and namespace no longer relevant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42804 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
042e6e8101dfcd3401f8cd7df50a4ac5e91612df 09-Oct-2007 Chris Lattner <sabre@nondot.org> Update DeclKind enums to reflect ObjcProtocolDecl's inheritance change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4de884d3fba3250b3f2e7b54145f1e878ce7c3c3 09-Oct-2007 Chris Lattner <sabre@nondot.org> Update DeclKind enums to reflect ObjcProtocolDecl's inheritance change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42802 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ac142de525ab05fe14f21cfbb364833d1e7507a4 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Remove addition of protocol names to declaration scopes, use a separate
DenseMap to keep track of such declarations and derive ObjcProtocolDecl
directyly from NamedScope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
05672a0ce85f6a203a960a856d30c4606ab136a7 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Remove addition of protocol names to declaration scopes, use a separate
DenseMap to keep track of such declarations and derive ObjcProtocolDecl
directyly from NamedScope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
17a5fb67dd338ebcfa755a69a844b865dff397f7 09-Oct-2007 Chris Lattner <sabre@nondot.org> Add two new Token helper functions, "is" and "isNot". This allows us to write
stuff like this:

// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.isNot(tok::comma))
break;
instead of:
// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.getKind() != tok::comma)
break;

There is obviously no functionality change, but the code reads a bit better and is
more terse.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
000732226610650837478cba97843d19b75f648e 09-Oct-2007 Chris Lattner <sabre@nondot.org> Add two new Token helper functions, "is" and "isNot". This allows us to write
stuff like this:

// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.isNot(tok::comma))
break;
instead of:
// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.getKind() != tok::comma)
break;

There is obviously no functionality change, but the code reads a bit better and is
more terse.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
c5a342d3b1cc5fa6eef09653a6d8d091928366c0 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Added better comment about protocol list for class ObjcQualifiedInterfaceType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
878520b6413663a13b1b56c7e3f256b1ecbb8db4 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Added better comment about protocol list for class ObjcQualifiedInterfaceType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ea14870788f4b1d08258121cde3faf1fa9e83546 09-Oct-2007 Chris Lattner <sabre@nondot.org> rename some "Parse" actions to "ActOn". Move code around in
ParseFunctionDefinition so that ActOnFunctionDefBody is always
called if ActOnStartOfFunctionDef is called. This fixes a crash
reported by Nuno Lopes.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
b652cea7d7b70ebe3744fb6d72c9ad9cf3c95429 09-Oct-2007 Chris Lattner <sabre@nondot.org> rename some "Parse" actions to "ActOn". Move code around in
ParseFunctionDefinition so that ActOnFunctionDefBody is always
called if ActOnStartOfFunctionDef is called. This fixes a crash
reported by Nuno Lopes.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
90120e89387d474b5c8dfeb749e7d16db0fa9231 09-Oct-2007 Steve Naroff <snaroff@apple.com> Remove 2 protocol related actions from MinimalActions (protocols shouldn't be recognized as types).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
71e99080e7b2d79bd6f23573124917cda96e8f33 09-Oct-2007 Steve Naroff <snaroff@apple.com> Remove 2 protocol related actions from MinimalActions (protocols shouldn't be recognized as types).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42777 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
c04aff17dcfaa5f628bcfed0e393f2e946ea5184 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Added a new class for Interfaces qualified by protocol list.
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e37882ad335896dedf345102bb425383e6221c37 09-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Added a new class for Interfaces qualified by protocol list.
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3fc54197f86651e64f81d14410db2fd4e1e5af8e 08-Oct-2007 Steve Naroff <snaroff@apple.com> Removed unused instance variable from FieldDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
22cdd239dc1a5ed3635afc67465b12d5e6437578 08-Oct-2007 Steve Naroff <snaroff@apple.com> Removed unused instance variable from FieldDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42773 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3289bca033c3d7e3ee9089b6abe26db01e3f0e08 08-Oct-2007 Chris Lattner <sabre@nondot.org> Rename FileVariable -> FileVar for consistency with its class name,
likewise block and param. Reorder the layout of the Decl kind enum
so that the inheritance tree is reflected in the ordering. This allows
trivial range comparisons to determine whether something is an instance
of some abstract class, making classof faster.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
aa9fc46c6a797c86ae004092ab4f2b1bed6c4616 08-Oct-2007 Chris Lattner <sabre@nondot.org> Rename FileVariable -> FileVar for consistency with its class name,
likewise block and param. Reorder the layout of the Decl kind enum
so that the inheritance tree is reflected in the ordering. This allows
trivial range comparisons to determine whether something is an instance
of some abstract class, making classof faster.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42772 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
ef93303b885c292b3df3d195cf21a05e203c763e 08-Oct-2007 Chris Lattner <sabre@nondot.org> add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
2d29581d2b7ad5ec5df6ff3947fb0711339361a4 08-Oct-2007 Chris Lattner <sabre@nondot.org> add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42771 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/IdentifierTable.h
ac20be2b3aaae316b1f7e17b5c2c1d0ad9250c52 08-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Several small patches to do pretty printing for objective-c top-level decls
(minimal printing), Derive ObjcClassDecl from Decl. Ted may want to
take note of the change I made to CFGRecStmtDeclVisitor.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
ab0aeb0bf3eb289013e9f37e75c3dfc4c618f53c 08-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Several small patches to do pretty printing for objective-c top-level decls
(minimal printing), Derive ObjcClassDecl from Decl. Ted may want to
take note of the change I made to CFGRecStmtDeclVisitor.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
935877d6939694f69d612d8d8d673e178e4ebb8e 08-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Removed unnecessary base class from some of objective-c classes:
ObjcProtocolDecl is now derived from ScopedDecl. ObjcForwardProtocolDecl from Decl.
ObjcImplementationDecl fom NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6d4caf26945095cc21dd7c79d2442668ed3a61b6 08-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Removed unnecessary base class from some of objective-c classes:
ObjcProtocolDecl is now derived from ScopedDecl. ObjcForwardProtocolDecl from Decl.
ObjcImplementationDecl fom NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42756 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
2fd1c65311af21735a004f3cb1e1250d79c57bee 07-Oct-2007 Chris Lattner <sabre@nondot.org> move IdentifierTable.h from liblex to libbasic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/Basic/IdentifierTable.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
c7229c338c21ef26b01ef3ecf9eec4fd373fa9ec 07-Oct-2007 Chris Lattner <sabre@nondot.org> move IdentifierTable.h from liblex to libbasic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42730 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/AST/Expr.h
lang/Basic/IdentifierTable.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
7a1b0889b003583bf276f9a698c5122fe86a1a62 07-Oct-2007 Chris Lattner <sabre@nondot.org> improve layering:
Now instead of IdentifierInfo knowing anything about MacroInfo,
only the preprocessor knows. This makes MacroInfo truly private
to the Lex library (and its direct clients) instead of being
accessed in the Basic library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42727 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
cc1a875f94630e58d24a55577ffbf0e89b7da8c7 07-Oct-2007 Chris Lattner <sabre@nondot.org> improve layering:
Now instead of IdentifierInfo knowing anything about MacroInfo,
only the preprocessor knows. This makes MacroInfo truly private
to the Lex library (and its direct clients) instead of being
accessed in the Basic library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42727 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
4826cbc22a5906cbc34932e86b7148a74c3a8e02 07-Oct-2007 Chris Lattner <sabre@nondot.org> add a hasMacroDefinition() method to IdentifierInfo, strength reduce a
call to getMacroInfo to call it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
9c46de446d18f4a28446cb798d4131bd05515699 07-Oct-2007 Chris Lattner <sabre@nondot.org> add a hasMacroDefinition() method to IdentifierInfo, strength reduce a
call to getMacroInfo to call it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42725 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
9899020887dad62b0d287b3701ac824c421f5aec 07-Oct-2007 Chris Lattner <sabre@nondot.org> update comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
6d9a3e648d6bf6b347174152f191bd1377528f8c 07-Oct-2007 Chris Lattner <sabre@nondot.org> update comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
11f32778a8e330c4268df6172c8ef15cce3982d7 07-Oct-2007 Chris Lattner <sabre@nondot.org> Remove the PPID bitfield from IdentifierInfo, shrinking it by a word
(because all bitfields now fit in 32 bits). This shrinks the identifier
table for carbon.h from 1634428 to 1451424 bytes (12%) and has no impact
on compile time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/IdentifierTable.h
387b98d37e08f7aa9ddf23e067e1d27e39ce16f3 07-Oct-2007 Chris Lattner <sabre@nondot.org> Remove the PPID bitfield from IdentifierInfo, shrinking it by a word
(because all bitfields now fit in 32 bits). This shrinks the identifier
table for carbon.h from 1634428 to 1451424 bytes (12%) and has no impact
on compile time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Lex/IdentifierTable.h
0371c0e8bc1b304cb0b88be07232c42afbe1d199 07-Oct-2007 Chris Lattner <sabre@nondot.org> First step to fixing a long lived layering violation: this
moves the MacroInfo pointer to a side hash table (which currently
lives in IdentifierTable.cpp). This removes a pointer from
Identifier info, but doesn't shrink it, as it requires a new bit
be added. This strange approach with the 'hasmacro' bit is needed
to not lose preprocessor performance.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
4365a7e46822700357a272d839ee2656d9603d5a 07-Oct-2007 Chris Lattner <sabre@nondot.org> First step to fixing a long lived layering violation: this
moves the MacroInfo pointer to a side hash table (which currently
lives in IdentifierTable.cpp). This removes a pointer from
Identifier info, but doesn't shrink it, as it requires a new bit
be added. This strange approach with the 'hasmacro' bit is needed
to not lose preprocessor performance.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42722 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
b2aa7cea4c96befa4a122c21d22aad7b4bb9edf7 07-Oct-2007 Chris Lattner <sabre@nondot.org> classof isn't right. This is causing assertion failures somehow now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f47a7f8531668b0b84a7638b6d899c0fbfb483fa 07-Oct-2007 Chris Lattner <sabre@nondot.org> classof isn't right. This is causing assertion failures somehow now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42720 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
70f10f68fb028f196ab806382f39ca250761ce08 07-Oct-2007 Chris Lattner <sabre@nondot.org> Shrink the builtinID down by 3 bits, allowing all the bitfields to
fit in 32-bits, shrinking IdentifierInfo by a word.

This shrinks the total size of the identifier pool from
1817264 to 1634428 bytes (11%) on carbon.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
adb83b41cb00acac7a9c035996318d88ecf2e6c8 07-Oct-2007 Chris Lattner <sabre@nondot.org> Shrink the builtinID down by 3 bits, allowing all the bitfields to
fit in 32-bits, shrinking IdentifierInfo by a word.

This shrinks the total size of the identifier pool from
1817264 to 1634428 bytes (11%) on carbon.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42719 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
d031a45ae433b647baf4688bcaf9c58f8ee6e2c1 07-Oct-2007 Chris Lattner <sabre@nondot.org> simplify the interfaces to create selectors: getSelector can take any
number of arguments now and does the right thing, but the nullary/unary
accessors are preserved as convenience functions. This allows us to
slightly simplify clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
ff38491c18b060526d754765b952f4a497a89416 07-Oct-2007 Chris Lattner <sabre@nondot.org> simplify the interfaces to create selectors: getSelector can take any
number of arguments now and does the right thing, but the nullary/unary
accessors are preserved as convenience functions. This allows us to
slightly simplify clients.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42716 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
64610dd798e056f378a7095bd5d89f2c8039d093 07-Oct-2007 Chris Lattner <sabre@nondot.org> simplify some Selector interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
f836e3fea2c77fdbb18170fb313ee0d45551320b 07-Oct-2007 Chris Lattner <sabre@nondot.org> simplify some Selector interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
a7a191caaabffadaddc6e3ce26ca5718a8ca19b6 07-Oct-2007 Chris Lattner <sabre@nondot.org> move ImplementationClassInfo out of ASTContext into Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f38766870882b8cdd3d9de05f734c024f556b5bc 07-Oct-2007 Chris Lattner <sabre@nondot.org> move ImplementationClassInfo out of ASTContext into Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42714 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
e8d6ae78cb12747ce077a91b0e05fe66d44a0cca 07-Oct-2007 Chris Lattner <sabre@nondot.org> add comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
675218bd93229b0b63f172711391234f66f5f62a 07-Oct-2007 Chris Lattner <sabre@nondot.org> add comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42712 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
79b008459bd61e5f67f052fd07e168920f292d17 07-Oct-2007 Chris Lattner <sabre@nondot.org> switch ObjcCategoryImplDecl over to being a NamedDecl, remove dead ctor argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6a0e89eece63e238ce873810f6f9bb50822e0296 07-Oct-2007 Chris Lattner <sabre@nondot.org> switch ObjcCategoryImplDecl over to being a NamedDecl, remove dead ctor argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42711 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
910435b63b345aaf5c2cdac9d3fc1efba8a0fe37 07-Oct-2007 Chris Lattner <sabre@nondot.org> introduce a new NamedDecl class, switch a couple of things over to using it.
NamedDecl is a Decl that has an IdentifierInfo (for example, ScopedDecl),
but not ObjcMethodDecl.

Simplify some code in ActOnAddMethodsToObjcDecl, by doing the cast from
DeclTy to Decl at the start of the method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
fd5de471478a507dd2495c4ea9bcab801ea5fa65 07-Oct-2007 Chris Lattner <sabre@nondot.org> introduce a new NamedDecl class, switch a couple of things over to using it.
NamedDecl is a Decl that has an IdentifierInfo (for example, ScopedDecl),
but not ObjcMethodDecl.

Simplify some code in ActOnAddMethodsToObjcDecl, by doing the cast from
DeclTy to Decl at the start of the method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42710 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
8d336eed195f3ae2a24753571f59ebd899d2f2f0 07-Oct-2007 Chris Lattner <sabre@nondot.org> Every decl has a SourceLocation, move the location info into the Decl class instead of being in subclasses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
e5ab7f31054e87ee812830480a828a762cd9eb73 07-Oct-2007 Chris Lattner <sabre@nondot.org> Every decl has a SourceLocation, move the location info into the Decl class instead of being in subclasses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
2443d912f8b779a65180dda5309fabb34205f0d3 06-Oct-2007 Chris Lattner <sabre@nondot.org> simplify the interface to create ObjcClassDecl's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7e620729fcb5a0042107f999dcf524f7357ce819 06-Oct-2007 Chris Lattner <sabre@nondot.org> simplify the interface to create ObjcClassDecl's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42706 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
6b1ed8d95b813c214fb3ee7e00dc1d31c4116067 06-Oct-2007 Chris Lattner <sabre@nondot.org> simplify the interface for creating ObjcForwardProtocolDecl



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Type.h
b97de3eddf0a0f7ff97204e7def6b7e0aa8953f2 06-Oct-2007 Chris Lattner <sabre@nondot.org> simplify the interface for creating ObjcForwardProtocolDecl



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Type.h
d5c9d3dfe91d5928fc2eb98d1dd60079605a7c80 06-Oct-2007 Chris Lattner <sabre@nondot.org> stub out some printing of objc decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
9fa5e65d08aee1875c5f2a841c8b0b4069bd00e5 06-Oct-2007 Chris Lattner <sabre@nondot.org> stub out some printing of objc decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42703 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0db667aadbc4d6f698be4dce56b6473e2fc49aac 06-Oct-2007 Chris Lattner <sabre@nondot.org> speed up clang startup another 28% by avoiding std::vector<std::string>
for holding builtin target-specific macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
d15fa82aebca0c26160805497bd88a4e61ebe011 06-Oct-2007 Chris Lattner <sabre@nondot.org> speed up clang startup another 28% by avoiding std::vector<std::string>
for holding builtin target-specific macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42689 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
94067f8bf133f81b419ef8cfa359d371e3709768 06-Oct-2007 Ted Kremenek <kremenek@apple.com> Removed DataflowStmtVisitor. It is no longer used, and is obsoleted
by newer visitor interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/DataflowStmtVisitor.h
48569ed9223bf60aabcd7605bb54d8ba8999e7be 06-Oct-2007 Ted Kremenek <kremenek@apple.com> Removed DataflowStmtVisitor. It is no longer used, and is obsoleted
by newer visitor interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42662 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/DataflowStmtVisitor.h
a096e1dc691004efeaca00a597caf287e9568e4a 05-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> This is the first patch toward supporting protocol conforming
objective-c types. It also removes use of Scope* parameter in
getObjCProtocolDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
245f92a8867c02378ab485ac256ca2315a0ef94d 05-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> This is the first patch toward supporting protocol conforming
objective-c types. It also removes use of Scope* parameter in
getObjCProtocolDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42649 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
48ed6f88bdfc88c5b596fee868b72309d81a4bdb 05-Oct-2007 Chris Lattner <sabre@nondot.org> Implement DenseMapInfo for Selector, allowing use of DenseMap/DenseSet of
Selector's instead of requiring void* to be used. I converted one use of
DenseSet<void*> over to use DenseSet<Selector> but the others should change
as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
85994260c41a54cab061a434ed378fc448333a4e 05-Oct-2007 Chris Lattner <sabre@nondot.org> Implement DenseMapInfo for Selector, allowing use of DenseMap/DenseSet of
Selector's instead of requiring void* to be used. I converted one use of
DenseSet<void*> over to use DenseSet<Selector> but the others should change
as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42645 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
f9e80dbb8e4fe683f6c20071d5cee8b7c8c7a015 05-Oct-2007 Steve Naroff <snaroff@apple.com> Layering refinements for selectors (suggested by Chris). Specifics...

- Add SelectorTable, which enables us to remove MultiKeywordSelector from the public header.
- Remove FoldingSet from IdentifierInfo.h and Preprocessor.h.
- Remove Parser::ObjcGetUnarySelector and Parser::ObjcGetKeywordSelector, they are subsumed by SelectorTable.
- Add MultiKeywordSelector to IdentifierInfo.cpp.
- Move a bunch of selector related methods from ParseObjC.cpp to IdentifierInfo.cpp.
- Added some comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
29238a0bf7cbf5b396efb451a0adb5fe4aa037ca 05-Oct-2007 Steve Naroff <snaroff@apple.com> Layering refinements for selectors (suggested by Chris). Specifics...

- Add SelectorTable, which enables us to remove MultiKeywordSelector from the public header.
- Remove FoldingSet from IdentifierInfo.h and Preprocessor.h.
- Remove Parser::ObjcGetUnarySelector and Parser::ObjcGetKeywordSelector, they are subsumed by SelectorTable.
- Add MultiKeywordSelector to IdentifierInfo.cpp.
- Move a bunch of selector related methods from ParseObjC.cpp to IdentifierInfo.cpp.
- Added some comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42643 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Parser.h
67907bd05f10d430df8a0c8b4e13e8026bca4060 05-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for 1) Checking for duplicate methods decls in intterface and category.
2) Use of the new DenseSet<t> abstractions instead of DenseMap<t,char>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
85ff2646c1aeedd1105f867a5bba8a58febd1d2a 05-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for 1) Checking for duplicate methods decls in intterface and category.
2) Use of the new DenseSet<t> abstractions instead of DenseMap<t,char>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42641 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
e58e080af0f4949d8acffe5960751f1b9c44c7e6 05-Oct-2007 Devang Patel <dpatel@apple.com> switch statement code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
51b09f2c528c8460b5465c676173324e44176d62 05-Oct-2007 Devang Patel <dpatel@apple.com> switch statement code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
37c9c61fc340220487a31d4055590615f41d27e8 04-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> this patch accomodates clattner's comments on expression processing in @try-statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b384d329e0b727d4f2effa28fbb9aba2ac420e7b 04-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> this patch accomodates clattner's comments on expression processing in @try-statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42611 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
d77ce0edf1977c138b0dc05174df320080e3e758 04-Oct-2007 Chris Lattner <sabre@nondot.org> minor cleanups, make code more defensive, less branchy in Selector ctor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
0e2dfd3963465d238e791eb8996e4d49fa47b615 04-Oct-2007 Chris Lattner <sabre@nondot.org> minor cleanups, make code more defensive, less branchy in Selector ctor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42603 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
9dd383ac2f38fd7c2ea27a5c5ef9726e4eaa2da5 04-Oct-2007 Chris Lattner <sabre@nondot.org> fix an incorrect assertion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
1b386424dfbea0175430345172b5306fda03a3ff 04-Oct-2007 Chris Lattner <sabre@nondot.org> fix an incorrect assertion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
fa601d5b9f81a4c43c45f58844b1defde5dac54a 04-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed all my recent test cases to have the RUN command and
fixed consequence of these changes in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
4b6df3fa953267c5d755628c8afd818bb571e579 04-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Fixed all my recent test cases to have the RUN command and
fixed consequence of these changes in clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
25aace8f19a9d952350a99be2ff01191ec116117 03-Oct-2007 Steve Naroff <snaroff@apple.com> Finish renaming ObjC declaration actions.
Add comments.
Switch to new indentation style for the Action class. Since many actions take many arguments, the new style will...
- make it easier to add/remove arguments without messing up the indentation...
- make it easier to add comments to each argument (see ActOnMethodDeclaration for an example)...
- in general, just makes it easier to see what is being passed.

The rest of Actions will be converted "lazily"...there is no immediate need to hack all the existing methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
3a165b066e665870c163af64844073a664c042d0 03-Oct-2007 Steve Naroff <snaroff@apple.com> Finish renaming ObjC declaration actions.
Add comments.
Switch to new indentation style for the Action class. Since many actions take many arguments, the new style will...
- make it easier to add/remove arguments without messing up the indentation...
- make it easier to add comments to each argument (see ActOnMethodDeclaration for an example)...
- in general, just makes it easier to see what is being passed.

The rest of Actions will be converted "lazily"...there is no immediate need to hack all the existing methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42587 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
78adb3998130b04401da53def39b65dacccdace0 03-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Renamed getCatLoc() to getLocation() to be consistant for such
getter names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
79139a121781854c3742273dd7b8289fa215341a 03-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Renamed getCatLoc() to getLocation() to be consistant for such
getter names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7f58c140d0b0fbeee832f90c75ac29af2dff6bd6 03-Oct-2007 Ted Kremenek <kremenek@apple.com> Fixed bug where intrusive_ptr_add_ref and intrusive_ptr_release were
not declared "static inline."

Removed member templates for operator= and copy constructor. They simply
didn't work as expected.

Fixed reference counting bug when a smart pointer is assigned the
value of another smart pointer that refers to the same address.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/IntrusiveSPtr.h
e260e62ddaefa0db5226f88313d30d5b50182d3a 03-Oct-2007 Ted Kremenek <kremenek@apple.com> Fixed bug where intrusive_ptr_add_ref and intrusive_ptr_release were
not declared "static inline."

Removed member templates for operator= and copy constructor. They simply
didn't work as expected.

Fixed reference counting bug when a smart pointer is assigned the
value of another smart pointer that refers to the same address.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42562 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/IntrusiveSPtr.h
b4dfe3670ab33eac91ddfb8402007e46b3772943 03-Oct-2007 Steve Naroff <snaroff@apple.com> Rename several ObjC action methods to use the "ActOn" prefix (still a few more to do).
Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused.
.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
37e58d104d7756f7c18f525b74e46b8eeec8ef81 03-Oct-2007 Steve Naroff <snaroff@apple.com> Rename several ObjC action methods to use the "ActOn" prefix (still a few more to do).
Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused.
.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42559 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
91b708d7144f9ba5ac06d5552f375dde032e892c 03-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Unified SuperClass field name in an objective-c class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
93efc029bf485de724fd783ad14b58aaec9c919b 03-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Unified SuperClass field name in an objective-c class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42556 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
1c095a701313edd270c3ef5c5f17ed00d883c9eb 03-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Unified such names as protocol references, instance methods and class methods
and their accessors in a variety of objective-c classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
7ed9e0f97f4645edc5d4670385b985ea4c617ce7 03-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Unified such names as protocol references, instance methods and class methods
and their accessors in a variety of objective-c classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
89529b1f2cb5b36563c2c1eb67b56d7e13ceec20 02-Oct-2007 Steve Naroff <snaroff@apple.com> Remove Action::ActOnImpleIvarVsClassIvars(), it is only called by Sema (not Parser).
Add Sema::CheckImplementationIvars() to replace the previous action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
a5997c4f36e0f5aa44623a5b1e3b914760d1ec68 02-Oct-2007 Steve Naroff <snaroff@apple.com> Remove Action::ActOnImpleIvarVsClassIvars(), it is only called by Sema (not Parser).
Add Sema::CheckImplementationIvars() to replace the previous action.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42553 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Parse/Action.h
f4bc79a4abcf7bd4a628ba1b2dc46bd5891089ad 02-Oct-2007 Steve Naroff <snaroff@apple.com> Rename ObjcInterfaceDecl::getIsForwardDecl() to isForwardDecl().
Rename ObjcProtocolDecl::getIsForwardProtoDecl() to isForwardDecl().
Rename ObjcInterfaceDecl::setIsForwardDecl() to setForwardDecl().
Rename ObjcProtocolDecl::setIsForwardProtoDecl() to setForwardDecl().

Two reasons:

#1: boolean predicates should start with "is".
#2: Since these two sets of methods represent the same concept, they should be named the same (polymorphism is good:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
768f26ee5892cd63ff0335a15d71a2385ba7c5ea 02-Oct-2007 Steve Naroff <snaroff@apple.com> Rename ObjcInterfaceDecl::getIsForwardDecl() to isForwardDecl().
Rename ObjcProtocolDecl::getIsForwardProtoDecl() to isForwardDecl().
Rename ObjcInterfaceDecl::setIsForwardDecl() to setForwardDecl().
Rename ObjcProtocolDecl::setIsForwardProtoDecl() to setForwardDecl().

Two reasons:

#1: boolean predicates should start with "is".
#2: Since these two sets of methods represent the same concept, they should be named the same (polymorphism is good:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
d3952f3baefee27164f4001d6b16df443e30feec 02-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Previously, I warned those methods not implemented in implementation class/category.
Now, I also warn those class/categories which are incomplete because of this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
ca3adf7e8cac8c9fbaf592b1e5c2be6f082de7ba 02-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Previously, I warned those methods not implemented in implementation class/category.
Now, I also warn those class/categories which are incomplete because of this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42544 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Basic/DiagnosticKinds.def
fa465d1b96a38ec63dcdd4577630bf4710cff5cc 02-Oct-2007 Steve Naroff <snaroff@apple.com> - Add ObjcInterfaceDecl::lookupInstanceMethod(), lookupClassMethod().
- Add ObjcMessageExpr::getSelector(), getClassName().
- Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed).
- Remove FIXME for printing ObjCMessageExpr's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Expr.h
6a8a9a41e9067b708498c02180159bafecfa044f 02-Oct-2007 Steve Naroff <snaroff@apple.com> - Add ObjcInterfaceDecl::lookupInstanceMethod(), lookupClassMethod().
- Add ObjcMessageExpr::getSelector(), getClassName().
- Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed).
- Remove FIXME for printing ObjCMessageExpr's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/AST/Expr.h
97456458081dc6ca251199da0cab7dc8b32b493f 02-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> ObjcCategoryDecl Does not subclass from ScopedDecl any more.
Ted may want to take a look at the change I made at
FGRecStmtDeclVisitor.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
60199032e41216fa2fca635c7a942e5473cdf979 02-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> ObjcCategoryDecl Does not subclass from ScopedDecl any more.
Ted may want to take a look at the change I made at
FGRecStmtDeclVisitor.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42535 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
35bc4d26039ff5633a8c4edf9697a2f81a2a6429 02-Oct-2007 Ted Kremenek <kremenek@apple.com> Moved ProgramEdge out out include/.../Analysis/PathSensitive to include/.../Analysis, as it is now used by the FlowSensitive subsystem as well.

Removed "Edge" nested class by CFG, as it is now subsumed by ProgramEdge.

Adjusted DataflowSolver and DataflowValues to use ProgramEdges instead
of CFG::Edge.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/PathSensitive/ProgramEdge.h
lang/Analysis/ProgramEdge.h
4d20f2dd79e7829ade5e23945a2ef65a8fe1cf39 02-Oct-2007 Ted Kremenek <kremenek@apple.com> Moved ProgramEdge out out include/.../Analysis/PathSensitive to include/.../Analysis, as it is now used by the FlowSensitive subsystem as well.

Removed "Edge" nested class by CFG, as it is now subsumed by ProgramEdge.

Adjusted DataflowSolver and DataflowValues to use ProgramEdges instead
of CFG::Edge.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42534 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/PathSensitive/ProgramEdge.h
lang/Analysis/ProgramEdge.h
a91aa32e224397b875e51e463dc6bf88c5bf5951 02-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> This patch introduces the ObjcCategoryImplDecl class and does the checking related to
unimplemented methods in category implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Parse/Action.h
8f3fde00ad4d4f943321e338b914ae4740711c84 02-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> This patch introduces the ObjcCategoryImplDecl class and does the checking related to
unimplemented methods in category implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Parse/Action.h
9e99008f75a31ff44e857509fd6a9a74c1cb98e9 02-Oct-2007 Ted Kremenek <kremenek@apple.com> Added DenseMapInfo traits for ProgramEdges


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ProgramEdge.h
4c3fbe33194cd9b1bfff773647ed785b403e1ba5 02-Oct-2007 Ted Kremenek <kremenek@apple.com> Added DenseMapInfo traits for ProgramEdges


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ProgramEdge.h
379cf513af71280a53c9be51a3bbc022946b629d 02-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Added a missing #include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
c1581a0d64b0ee4f822ed2fca4442a111d03569a 02-Oct-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Added a missing #include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42516 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
f280f5fb53b34dc171390f4ebf6c80088e291f2a 02-Oct-2007 Steve Naroff <snaroff@apple.com> Add comment to ObjcClassDecl.
Move ObjcClassDecl to be next to ObjcForwardProtocolDecl. Since they are very similar, might want to unify their names (e.g. ObjcForwardClassDecl).
Change indentation of ObjcForwardProtocolDecl to conform to everything else in DeclObjC.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
06ae8d68ef258ccd40c9cd1ce762eaae6f3d4432 02-Oct-2007 Steve Naroff <snaroff@apple.com> Add comment to ObjcClassDecl.
Move ObjcClassDecl to be next to ObjcForwardProtocolDecl. Since they are very similar, might want to unify their names (e.g. ObjcForwardClassDecl).
Change indentation of ObjcForwardProtocolDecl to conform to everything else in DeclObjC.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
e8f248dc3f1ac362aa989ce8a091d2cccd82dba1 02-Oct-2007 Steve Naroff <snaroff@apple.com> Add comments for ObjC Decl's.
Removed a constructor that was #if 0's out.
Added a FIXME for fariborz...categories shouldn't inherit from ScopedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
0c6b6243d3efd958c17943130e2a773653511edc 02-Oct-2007 Steve Naroff <snaroff@apple.com> Add comments for ObjC Decl's.
Removed a constructor that was #if 0's out.
Added a FIXME for fariborz...categories shouldn't inherit from ScopedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42507 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/DeclObjC.h
8ce772b211cea74357ae57348c386c6b589aca7e 01-Oct-2007 Ted Kremenek <kremenek@apple.com> Migrated LiveVariables and UninitializedVariables to now use the
tracked BlkExpr information now maintained by the CFG class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
lang/Analysis/LiveVariables.h
lang/Analysis/UninitializedValues.h
11e7218db51efc825ec24e80d5b071892ca268bd 01-Oct-2007 Ted Kremenek <kremenek@apple.com> Migrated LiveVariables and UninitializedVariables to now use the
tracked BlkExpr information now maintained by the CFG class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42498 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
lang/Analysis/LiveVariables.h
lang/Analysis/UninitializedValues.h
3a8198213c7834c5f122fc73ea90180f885b699e 01-Oct-2007 Ted Kremenek <kremenek@apple.com> CFG objects now internally store a (lazily created) map from block-level
expressions to IDs. This is used by various dataflow analyses, but is
also useful for anyone querying a CFG to determine where an expression
is evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
63f5887f316fb52d243fcbb3631c039de6c4b993 01-Oct-2007 Ted Kremenek <kremenek@apple.com> CFG objects now internally store a (lazily created) map from block-level
expressions to IDs. This is used by various dataflow analyses, but is
also useful for anyone querying a CFG to determine where an expression
is evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
3fafa108e3efbcc21b9a69e2564307350120566b 01-Oct-2007 Steve Naroff <snaroff@apple.com> Move ObjC decls to DeclObjC.h, a new AST header.
Update clients and add to project file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
980e508ca70d6de75d2abfd96b4681fc98bb2698 01-Oct-2007 Steve Naroff <snaroff@apple.com> Move ObjC decls to DeclObjC.h, a new AST header.
Update clients and add to project file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42494 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/DeclObjC.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
a950a57363fb95ff32f182b32b31583021ef9ac6 01-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Moved two bitfields back to top of class ObjcMethodDecl so they pack
with those in their base class. In response to clattner's
September 30, 2007 12:54:49 AM PDT email.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
991e48b283e6c683f91fdaa467776bdc4b50f099 01-Oct-2007 Fariborz Jahanian <fjahanian@apple.com> Moved two bitfields back to top of class ObjcMethodDecl so they pack
with those in their base class. In response to clattner's
September 30, 2007 12:54:49 AM PDT email.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42491 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ad5682f2e714da183ed07cbc4c8592e4f72620d7 01-Oct-2007 Ted Kremenek <kremenek@apple.com> Removed "hasImplicitControlFlow" from class CFG, and moved it to class Stmt
as a member function. This function is no longer needed within the CFG
class, and logically belongs to the Stmt class as a predicate for a
Stmt instance.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/Stmt.h
d48ade633d96b94cb435d73e2c935ea457152dec 01-Oct-2007 Ted Kremenek <kremenek@apple.com> Removed "hasImplicitControlFlow" from class CFG, and moved it to class Stmt
as a member function. This function is no longer needed within the CFG
class, and logically belongs to the Stmt class as a predicate for a
Stmt instance.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42489 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/Stmt.h
ad21a61bb1f1f3e834ae028c6fd70dcce91d6625 30-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Unused ObjcProtoMethod is removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d664ff7beb054a2f2f56ec438ff3ce65be96eddc 30-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Unused ObjcProtoMethod is removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42485 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2edb1731218065561e80fc0bd378396afd497939 30-Sep-2007 Chris Lattner <sabre@nondot.org> Add a new getLength() method to IdentifierInfo, which relies on a newly added
method to StringMapEntry. Steve, please use this to remove the
strlen calls in selector processing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
1f945f632ae993bbb9f9e69d908f7526924c1a88 30-Sep-2007 Chris Lattner <sabre@nondot.org> Add a new getLength() method to IdentifierInfo, which relies on a newly added
method to StringMapEntry. Steve, please use this to remove the
strlen calls in selector processing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42481 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
90f163b4e94137e85019271a7a06155bca6f3466 30-Sep-2007 Chris Lattner <sabre@nondot.org> improve comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
7cb8491a8bb09de32174959f3f634a44264fd48f 30-Sep-2007 Chris Lattner <sabre@nondot.org> improve comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42478 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
a00e0747ef35b1aa6a5d570e29e6a2c4689e231c 29-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch fixes all issues mentioned in clattner's feedback of
September 28, 2007 4:39:24 PM PDT
Please let me know if I missed anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
3a63da7053b07583fe3881388ef35181b2d34d3e 29-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch fixes all issues mentioned in clattner's feedback of
September 28, 2007 4:39:24 PM PDT
Please let me know if I missed anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42473 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
dd243eff0724a4ba016415bf3c809de920e404d2 29-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to remove use of has table for protocol name lookup. This patch mirrors my
previous patch to do the same for class name lookup using a hash table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
1b6351f76e1e06893337441641c0e349939afb31 29-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to remove use of has table for protocol name lookup. This patch mirrors my
previous patch to do the same for class name lookup using a hash table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42471 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
0c5affb00a28ede46ad76793708b7c6ec5d8f14f 29-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Removed use of hash table for class decls and do a name look up directly.
There is still an issue if doing ScopedLookup is an overkill and we can
just access the decl using the identifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Parse/Action.h
9d048ff59ffb5d41e57297c6509c11920052cf67 29-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Removed use of hash table for class decls and do a name look up directly.
There is still an issue if doing ScopedLookup is an overkill and we can
just access the decl using the identifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42463 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Parse/Action.h
5b82d959fd7622cba372b694d551a7d345fb389b 29-Sep-2007 Steve Naroff <snaroff@apple.com> Add some comments to MultiKeywordSelector, make all methods private, add a friend, move some methods around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
5b6b72f53ad164497cf62484b60cdbb4361f1978 29-Sep-2007 Steve Naroff <snaroff@apple.com> Add some comments to MultiKeywordSelector, make all methods private, add a friend, move some methods around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42456 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
319e89ef7557195ea13e4b49f758c46d836b63ac 29-Sep-2007 Ted Kremenek <kremenek@apple.com> Added ProgramEdge.h, which defines ProgramEdge (and subclasses) that
encapsulate a program point within a CFG for use by our path-sensitive
dataflow solver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ProgramEdge.h
eb19188e668d0ad2c968fc0286a6922f9194deb4 29-Sep-2007 Ted Kremenek <kremenek@apple.com> Added ProgramEdge.h, which defines ProgramEdge (and subclasses) that
encapsulate a program point within a CFG for use by our path-sensitive
dataflow solver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42455 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/PathSensitive/ProgramEdge.h
6cb1d3671bd17eb439e0f0742a9ee6a0f50dbbc0 29-Sep-2007 Steve Naroff <snaroff@apple.com> Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument.

This motivated implementing a devious clattner inspired solution:-)

This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).

This change was critical to make now, before we have too many clients.

I still need to add some comments to the Selector class...will likely add later today/tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/Parser.h
bcfb06ac6da1aa3c74ac1ef7a49c2807522366e7 29-Sep-2007 Steve Naroff <snaroff@apple.com> Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument.

This motivated implementing a devious clattner inspired solution:-)

This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).

This change was critical to make now, before we have too many clients.

I still need to add some comments to the Selector class...will likely add later today/tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42452 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/Parser.h
eebf131945a2aae91ea7921cd9da52a2f61c35d7 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Significant cleanups and bug-fixes to LiveVariables. Uses new refactored
ExprDeclBitVector class for defining dataflow state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
f63aa45ca9d4f4782aa236415c63e00f7ffaf185 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Significant cleanups and bug-fixes to LiveVariables. Uses new refactored
ExprDeclBitVector class for defining dataflow state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42446 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
67c0b618bde39b42683e10eed8c4bb3cebcbeb41 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Refactored ExprDeclBitVector into two classes:
DeclBitVector
ExprDeclBitVector (which subclasses the former)

DeclBitVector is for analyses that just want to track bitvector state
for declarations.

ExprDeclBitVector is for analyses that want to track bitvector state
for both both declarations and CFGBlock-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
ca64cef65c2fcc3d22908b121bc101993604c286 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Refactored ExprDeclBitVector into two classes:
DeclBitVector
ExprDeclBitVector (which subclasses the former)

DeclBitVector is for analyses that just want to track bitvector state
for declarations.

ExprDeclBitVector is for analyses that want to track bitvector state
for both both declarations and CFGBlock-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42445 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
528e2a5bd2c8897141df229882b95a8a0dfb6872 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed bug where declaration initializer expressions were not
traversed by the visitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
677190ffddcc12fc57d10e217ee7b61c87d4edc3 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed bug where declaration initializer expressions were not
traversed by the visitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
3a887aaad8ef830806ebf974118a0d28bf170ac6 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Added iterator mechanism to iterator over the decls and expressions
tracked by an ExprDeclBitVector analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
cb152a7e8718324ef7c2f2f01c18049319078041 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Added iterator mechanism to iterator over the decls and expressions
tracked by an ExprDeclBitVector analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42437 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
5975f77cfa30e87b5e59827e57799b364e0a350c 28-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to warn on umimplemented methods coming from class's
protocols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
00ae8d595534c0a444326204adee3486bbb43dcd 28-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to warn on umimplemented methods coming from class's
protocols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42436 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
6b57649b2dcd47feeae608965c6316324f11f4a2 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed several bugs in the propagation of "uninitialized value"
taintness across expressions.

Made "smart-culling" of taint propagation (for error reporting)
correctly handle conditional expressions and a few other edge cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/UninitializedValues.h
a1de8c784a574a89a8a828331a8ce6b1aa57bed1 28-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed several bugs in the propagation of "uninitialized value"
taintness across expressions.

Made "smart-culling" of taint propagation (for error reporting)
correctly handle conditional expressions and a few other edge cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42421 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/UninitializedValues.h
1e4e82f98a9fb1d08c9bdb1259af99ad0f10b45b 27-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations .
It checks and warns on those methods declared in class interface and not implemented.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
d0b015461a819913efa1161c56a8b897d7e8cdb2 27-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations .
It checks and warns on those methods declared in class interface and not implemented.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
e41de35c7128a2d89f9bc6df0fdbadafa5ecbcfc 27-Sep-2007 Steve Naroff <snaroff@apple.com> Fix bug in SelectorInfo::getName() - method buffer needs to be passed by reference.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
4cbcb897fe7c4ff1ed5322ee4dfd490c581e33d5 27-Sep-2007 Steve Naroff <snaroff@apple.com> Fix bug in SelectorInfo::getName() - method buffer needs to be passed by reference.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/IdentifierTable.h
bfbb7fb831324d275da33689ddc0cc2267e0697e 27-Sep-2007 Ted Kremenek <kremenek@apple.com> Created new "ExprDeclBitVector" type bundle for dataflow analyses that need boolean
values associated with ScopedDecls and CFGBlock-level Exprs. This is the common
boilerplate needed by UninitializedValues and LiveVariables.

Refactored UninitializedValues to use ExprDeclBitVector.

Shortened the string diagnostic for UninitializedValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
lang/Analysis/UninitializedValues.h
lang/Basic/DiagnosticKinds.def
aead1539e7481fde73725d8eadeea82087982bf3 27-Sep-2007 Ted Kremenek <kremenek@apple.com> Created new "ExprDeclBitVector" type bundle for dataflow analyses that need boolean
values associated with ScopedDecls and CFGBlock-level Exprs. This is the common
boilerplate needed by UninitializedValues and LiveVariables.

Refactored UninitializedValues to use ExprDeclBitVector.

Shortened the string diagnostic for UninitializedValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42408 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ExprDeclBitVector.h
lang/Analysis/UninitializedValues.h
lang/Basic/DiagnosticKinds.def
4ed9d662047bb65315e1fe1b0a4175c87f5fe627 27-Sep-2007 Steve Naroff <snaroff@apple.com> Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:

#1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.

#2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.

#3: It results in many API simplifications. Here are some highlights:

- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).

I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.

Thanks to Chris for talking this through with me and suggesting this approach.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
68d331a78e655d97294e94fcfa63f92cc1f40578 27-Sep-2007 Steve Naroff <snaroff@apple.com> Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:

#1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.

#2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.

#3: It results in many API simplifications. Here are some highlights:

- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).

I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.

Thanks to Chris for talking this through with me and suggesting this approach.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42395 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/Lex/IdentifierTable.h
lang/Lex/Preprocessor.h
lang/Parse/Action.h
lang/Parse/DeclSpec.h
85a7ea342eb0e5b580676d4cad0040f0e001d272 26-Sep-2007 Ted Kremenek <kremenek@apple.com> Added extra guard for null Stmt* when traversing the AST using VisitChildren.
Added assertion that Block-level statements should not be NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
c592522b86fa3ea7d5a0f81c186e5ccba41d3b85 26-Sep-2007 Ted Kremenek <kremenek@apple.com> Added extra guard for null Stmt* when traversing the AST using VisitChildren.
Added assertion that Block-level statements should not be NULL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42376 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
d34caf9a80dfb04817f8e2f1f5932d3fc3f00bb6 26-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch inserts ivars declared in @implementation in its object and verifies
that they conform(in type, name and numbers) to those declared in @interface.
Test case highlights kind of checking we do here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
d0b90bff98bafb72ea9809f509bf37c93c60e74e 26-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch inserts ivars declared in @implementation in its object and verifies
that they conform(in type, name and numbers) to those declared in @interface.
Test case highlights kind of checking we do here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42360 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
10d8046a19cd088cbe9b0cb2a8d2ba05c6ae0bdb 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved "DataflowSolver.h" to the "include/" subtree. Adjusted client
code that uses the solver to reflect the new location.

Created "FlowSensitive" subdirectory in include/clang/Analysis to hold
header files relating to flow-sensitive analyses. Moved
"DataflowValues.h" into this subdirectory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/LiveVariables.h
lang/Analysis/UninitializedValues.h
1de632bf4abb75fcd39f5d6fdf59337f0ff0edd4 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved "DataflowSolver.h" to the "include/" subtree. Adjusted client
code that uses the solver to reflect the new location.

Created "FlowSensitive" subdirectory in include/clang/Analysis to hold
header files relating to flow-sensitive analyses. Moved
"DataflowValues.h" into this subdirectory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
lang/Analysis/FlowSensitive/DataflowSolver.h
lang/Analysis/FlowSensitive/DataflowValues.h
lang/Analysis/LiveVariables.h
lang/Analysis/UninitializedValues.h
1c0eedbb720bbc574e4833fad59b36b629e03950 25-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to make ObjcImplementationDecl derived from TypeDecl and supprt legacy
objective-c code with no @interface declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0da1c1033832b572d23ff2fe7bb2ab959768727e 25-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to make ObjcImplementationDecl derived from TypeDecl and supprt legacy
objective-c code with no @interface declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42319 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c091b5df8f32a4805837fb909bbff82a01faafb5 25-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch introduces a new class to keep track of class implementation info. It also adds more
semantic checks for class and protocol declarations. Test cases are good indications of kind of
checking being done in this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
ccb4f314248fb2202637d3290f2b17af5646da08 25-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch introduces a new class to keep track of class implementation info. It also adds more
semantic checks for class and protocol declarations. Test cases are good indications of kind of
checking being done in this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42311 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
d7a2f811896a028916f515abcf9a6be90a742558 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Further refactored DataflowSolver. Now most code for the solver is shared
between forward and backward analyses, with trait classes being used
to implement the key differences in operations/functionality.

Converted the LiveVariables analysis to use the generic DataflowSolver. This,
along with removing some extra functionality that was not needed, reduced
the code for LiveVariables by over half.

Modified Driver code to handle the updated interface to LiveVariables.

Modified the DeadStores checker to handle the update interface to
LiveVariables.

Updated DataflowValues (generic ADT to store dataflow values) to also
store values for blocks. This is used by DeadStores. Updated some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
lang/Analysis/LiveVariables.h
lang/Analysis/LocalCheckers.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
fdd225ed6f362a8550e597eb875d9c402b8a309c 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Further refactored DataflowSolver. Now most code for the solver is shared
between forward and backward analyses, with trait classes being used
to implement the key differences in operations/functionality.

Converted the LiveVariables analysis to use the generic DataflowSolver. This,
along with removing some extra functionality that was not needed, reduced
the code for LiveVariables by over half.

Modified Driver code to handle the updated interface to LiveVariables.

Modified the DeadStores checker to handle the update interface to
LiveVariables.

Updated DataflowValues (generic ADT to store dataflow values) to also
store values for blocks. This is used by DeadStores. Updated some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
lang/Analysis/LiveVariables.h
lang/Analysis/LocalCheckers.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
22cbc57b598953e2a27a553b9319f28e19b70625 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Added extra "constness" to parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
d9bfa8c49c22de789ca719a6324f80ec90bb18f0 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Added extra "constness" to parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42292 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
9b8c88b8e41c80548f6cf7933d7e1f583dc99a68 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Added PersistentMap, an ADT that implements a map data structure that
is persistent. Adds/removals to a PersistentMap do not result in
a map being modified, but a new map being created. This will be useful
for path-sensitive analyses.

The current implementation mainly makes copies to implement this
functionality. If the map turns out to be extensively used, this
implementation will be replaced with a more efficient one that uses
data sharing (see comments in PersistentMap.h for more information).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ADT/PersistentMap.h
67cfad6fda64fd8d1a22142a894a3892e87e76be 25-Sep-2007 Ted Kremenek <kremenek@apple.com> Added PersistentMap, an ADT that implements a map data structure that
is persistent. Adds/removals to a PersistentMap do not result in
a map being modified, but a new map being created. This will be useful
for path-sensitive analyses.

The current implementation mainly makes copies to implement this
functionality. If the map turns out to be extensively used, this
implementation will be replaced with a more efficient one that uses
data sharing (see comments in PersistentMap.h for more information).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42290 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/ADT/PersistentMap.h
058dfe0af30469ffe7384f042e3fe17e3769e384 24-Sep-2007 Ted Kremenek <kremenek@apple.com> Added smart pointer class "IntrusiveSPtr" that handles reference
counted objects that maintain their own internal reference count.
This smart pointer implementation is compatible with LLVM-style
down-casting (see in llvm: include/llvm/Support/Casting.h).

Implemented "RefCounted", a base class that objects that wish to be
managed using IntrusiveSPtrs can subclass.

Reference counted objects are being targeted for use in path-sensitive
dataflow analyses where managing many live objects becomes difficult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/IntrusiveSPtr.h
d33218cd684ff38ad3e197f4128768906e72f0c5 24-Sep-2007 Ted Kremenek <kremenek@apple.com> Added smart pointer class "IntrusiveSPtr" that handles reference
counted objects that maintain their own internal reference count.
This smart pointer implementation is compatible with LLVM-style
down-casting (see in llvm: include/llvm/Support/Casting.h).

Implemented "RefCounted", a base class that objects that wish to be
managed using IntrusiveSPtrs can subclass.

Reference counted objects are being targeted for use in path-sensitive
dataflow analyses where managing many live objects becomes difficult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42260 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/Support/IntrusiveSPtr.h
4351e711c580b92eacd82d6e7043bb2efadbb0e4 24-Sep-2007 Chris Lattner <sabre@nondot.org> Fix for 64-bit systems.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
031b2d21fe1b0ad8c8fd927f654353035ed06562 24-Sep-2007 Chris Lattner <sabre@nondot.org> Fix for 64-bit systems.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42253 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
92803daaa6a40a3899c2e599bddc42732c2ce593 24-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Fixed VC++ bitfield to unsigned/signed sign propagation issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a8ae51f79d35b7c1822ba4a086176b4a8c862862 24-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Fixed VC++ bitfield to unsigned/signed sign propagation issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
4e33ba30e07959f8f24b614617bd2e1f15578601 22-Sep-2007 Chris Lattner <sabre@nondot.org> add comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
3d2313ef5de46228b157b1f1f6e306812dae3942 22-Sep-2007 Chris Lattner <sabre@nondot.org> add comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42237 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7f298768e81651806d11343b9b1c6434002055cf 22-Sep-2007 Chris Lattner <sabre@nondot.org> further apfloat'ize the front-end, allowing codegen to pass
APFloat straight through to LLVM now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c9bec4bfea9090a08dd83a7b213f0c8adf8d78ec 22-Sep-2007 Chris Lattner <sabre@nondot.org> further apfloat'ize the front-end, allowing codegen to pass
APFloat straight through to LLVM now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42236 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
36f46b8a6b4c0c8274b8f2ea63f13098a0ef3351 22-Sep-2007 Chris Lattner <sabre@nondot.org> work around bugs and missing features in apfloat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1c9bdaef20398390818e9114269cd9925534b89c 22-Sep-2007 Chris Lattner <sabre@nondot.org> work around bugs and missing features in apfloat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42235 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
858eece2d335c82c4de7773d1da968298f858f44 22-Sep-2007 Chris Lattner <sabre@nondot.org> Use APFloat for the representation of FP immediates, ask the target
for *which* apfloat to use for a particular type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/TargetInfo.h
lang/Lex/LiteralSupport.h
525a05093a4816af961fe2bc6b8a81c17e2e26c2 22-Sep-2007 Chris Lattner <sabre@nondot.org> Use APFloat for the representation of FP immediates, ask the target
for *which* apfloat to use for a particular type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42234 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/TargetInfo.h
lang/Lex/LiteralSupport.h
ac7758315f120e0cfd7d7bc3ea5974c10f0987c4 22-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch adds to new things to clang:
1. Handles saving and checking on protocols used in an @interface declaration
2. Checks and saves class's super class.
3. Adds semantic check to category declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
b27c156688ca557cb277ecdfea6dccc1dac5b49f 22-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch adds to new things to clang:
1. Handles saving and checking on protocols used in an @interface declaration
2. Checks and saves class's super class.
3. Adds semantic check to category declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42218 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
766afb8a7f1ecde2060728637ab20f85b50c2265 21-Sep-2007 Chris Lattner <sabre@nondot.org> Make case sorting deterministic by not depending on pointer
values. Patch mostly by Gabor Greif for PR1682.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
764a7ce5217f9569e100a3445f47496ee82daf86 21-Sep-2007 Chris Lattner <sabre@nondot.org> Make case sorting deterministic by not depending on pointer
values. Patch mostly by Gabor Greif for PR1682.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42203 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
c716c94b77c762aaa320b24b51d238cfdcc6b6c5 21-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch instantiates objects for forward protocols and in general handles use of
protocols referenced in @protocol declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
894c57f565869b26a65436d250a9ca7a04d2abe0 21-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> This patch instantiates objects for forward protocols and in general handles use of
protocols referenced in @protocol declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42191 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
a36bd923626cc8a75c4f7e3814cfd414a265be78 20-Sep-2007 Ted Kremenek <kremenek@apple.com> Renamed "include/clang/Analysis/CFGVisitors" "<snip>/Analysis/Visitors".

"Visitors" is more general than "CFGVisitors", as we aren't just using
visitation useful for CFG analysis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGVisitors/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGVisitors/CFGRecStmtVisitor.h
lang/Analysis/CFGVisitors/CFGStmtVisitor.h
lang/Analysis/CFGVisitors/CFGVarDeclVisitor.h
lang/Analysis/CFGVisitors/DataflowStmtVisitor.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
lang/Analysis/Visitors/DataflowStmtVisitor.h
57634c7cecef75a13b21856376347f1c7cb5bc93 20-Sep-2007 Ted Kremenek <kremenek@apple.com> Renamed "include/clang/Analysis/CFGVisitors" "<snip>/Analysis/Visitors".

"Visitors" is more general than "CFGVisitors", as we aren't just using
visitation useful for CFG analysis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42174 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGVisitors/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGVisitors/CFGRecStmtVisitor.h
lang/Analysis/CFGVisitors/CFGStmtVisitor.h
lang/Analysis/CFGVisitors/CFGVarDeclVisitor.h
lang/Analysis/CFGVisitors/DataflowStmtVisitor.h
lang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
lang/Analysis/Visitors/CFGRecStmtVisitor.h
lang/Analysis/Visitors/CFGStmtVisitor.h
lang/Analysis/Visitors/CFGVarDeclVisitor.h
lang/Analysis/Visitors/DataflowStmtVisitor.h
73a70e9f94f4693deb1e076a17553c492b88c238 20-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved include/clang/Analysis/*Visitor.h to include/clang/Analysis/CFGVisitors.

We had enough visitors that it was cluttering the Analysis directory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGRecStmtVisitor.h
lang/Analysis/CFGStmtVisitor.h
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/CFGVisitors/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGVisitors/CFGRecStmtVisitor.h
lang/Analysis/CFGVisitors/CFGStmtVisitor.h
lang/Analysis/CFGVisitors/CFGVarDeclVisitor.h
lang/Analysis/CFGVisitors/DataflowStmtVisitor.h
lang/Analysis/DataflowStmtVisitor.h
adfb987d1936fb4f955236ccf77ec4be888a6456 20-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved include/clang/Analysis/*Visitor.h to include/clang/Analysis/CFGVisitors.

We had enough visitors that it was cluttering the Analysis directory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42173 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGRecStmtVisitor.h
lang/Analysis/CFGStmtVisitor.h
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/CFGVisitors/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGVisitors/CFGRecStmtVisitor.h
lang/Analysis/CFGVisitors/CFGStmtVisitor.h
lang/Analysis/CFGVisitors/CFGVarDeclVisitor.h
lang/Analysis/CFGVisitors/DataflowStmtVisitor.h
lang/Analysis/DataflowStmtVisitor.h
a5f40405e24ca51e92e5ff9b692bad588edae078 20-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Handle forward declaration of classes and prevent re-instantiation of
ObjcInterfaceClass Objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
bd51b8745c7424fb95abb91370d1a38a24451a6e 20-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Handle forward declaration of classes and prevent re-instantiation of
ObjcInterfaceClass Objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42172 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
0b59d9cbe33a1062a9795c09a04d2f15d4f54cca 20-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Match to do some semantic analysis on objective-c class decl.
1. Detect used of undeclared/forward declared super class.
2. Detect duplicate definition of a class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
1d5b0e37cd569f3d1ddfc5cabff649ef7e42f3c6 20-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Match to do some semantic analysis on objective-c class decl.
1. Detect used of undeclared/forward declared super class.
2. Detect duplicate definition of a class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42168 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
51b0acaa81a2070b66fa5ebd8669dfc8f8fc0c3d 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved GraphTraits<Stmt*> to StmtGraphTraits.h. This allows consumers of Stmt.h not to have to pay the cost
of parsing the GraphTraits templates if they don't need that functionality.

Defined nodes_iterator for GraphTraits<Stmt*> to be based on llvm::df_iterator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
d2a4a1af1088fca80e2dc76eb3369db0fbbfdefd 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved GraphTraits<Stmt*> to StmtGraphTraits.h. This allows consumers of Stmt.h not to have to pay the cost
of parsing the GraphTraits templates if they don't need that functionality.

Defined nodes_iterator for GraphTraits<Stmt*> to be based on llvm::df_iterator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42150 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtGraphTraits.h
64b864e855ff1e44fe9f8d31e46ba6ef5982e52a 19-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse objective-c's @try-statement and @throw-statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
397fcc117e5631db53879fbfcca66966088f3f07 19-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse objective-c's @try-statement and @throw-statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42148 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
2f491fb1bf65cf0349371c6882442b058c7bc901 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Added GraphTraits template specialization for Stmt* to treat ASTs like graphs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5e97d4b5ec7ce97e311d7aa4e8bd2b4fd9dbfa2e 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Added GraphTraits template specialization for Stmt* to treat ASTs like graphs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42146 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
1ff4115fefef0abe23a514d6e7d802e4bd28344a 19-Sep-2007 Ted Kremenek <kremenek@apple.com> More refactoring: decl and expr regisitration now uses CFGRecStmtDeclVisitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
b2977544b4372fd54a8c24e12920d7c7c50cd7ef 19-Sep-2007 Ted Kremenek <kremenek@apple.com> More refactoring: decl and expr regisitration now uses CFGRecStmtDeclVisitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42145 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
9fa28891f079faee36b300e02d1b6e3c6ed6e9e4 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Added two new visitors that extend CFGStmtVisitor: CFGRecStmtVisitor and CFGRecStmtDeclVisitor.
The extended functionality of these visitors is that they automatically visit all statements in
an AST (no explicit recursion is required from subclasses), and the for the latter, decls are visited
as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGRecStmtVisitor.h
ba0c5d6305a6fd164d0e4f186a735aca799194c3 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Added two new visitors that extend CFGStmtVisitor: CFGRecStmtVisitor and CFGRecStmtDeclVisitor.
The extended functionality of these visitors is that they automatically visit all statements in
an AST (no explicit recursion is required from subclasses), and the for the latter, decls are visited
as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42144 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGRecStmtDeclVisitor.h
lang/Analysis/CFGRecStmtVisitor.h
4bc52cec7be91d70529b409efaeebf1b69705df3 19-Sep-2007 Steve Naroff <snaroff@apple.com> Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable.

Rationale:

We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).

It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:

Two tables:

*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated: 1999824

One table:

*** Identifier Table Stats:
# Identifiers: 49500
Bytes allocated: 1990316




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/Lex/IdentifierTable.h
21d5a95b8f50be3e0fdd8c53f92fc201f665a4b4 19-Sep-2007 Steve Naroff <snaroff@apple.com> Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable.

Rationale:

We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).

It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:

Two tables:

*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated: 1999824

One table:

*** Identifier Table Stats:
# Identifiers: 49500
Bytes allocated: 1990316




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42139 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/Lex/IdentifierTable.h
c39ca26d397ee4d285d4f9fa1caf5e3c33e1874a 19-Sep-2007 Steve Naroff <snaroff@apple.com> Progress on message expressions...

- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.

Next step, installing a correct type, among other tweaks...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
563477da25f824e37c535131695dc4dc9b68c465 19-Sep-2007 Steve Naroff <snaroff@apple.com> Progress on message expressions...

- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.

Next step, installing a correct type, among other tweaks...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42116 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
5b3036e422499a86776581e16a6047be7453ef87 19-Sep-2007 Ted Kremenek <kremenek@apple.com> DataflowSolver now acccepts an "_Equal" template parameter that allows the user
to specify how two dataflow values should be compared for equality. The default
is to use std::equal_to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
fe1b1e686f6bd97995a15081cae343708f22b496 19-Sep-2007 Ted Kremenek <kremenek@apple.com> DataflowSolver now acccepts an "_Equal" template parameter that allows the user
to specify how two dataflow values should be compared for equality. The default
is to use std::equal_to.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42115 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
05d09a2ecf326371e598414c8bb2f5f5dbd6ea9c 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed bug where getBitRef would incorrectly grab the bit from the
wrong bitvector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
f5a9518ec408de44a4dac6e2cbfe44ddbfc45d89 19-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed bug where getBitRef would incorrectly grab the bit from the
wrong bitvector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42114 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
f92ba51c4814e61f31e4a2ab2679bc455224c5cb 18-Sep-2007 Ted Kremenek <kremenek@apple.com> More refactoring and code reduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
43a1698cfbdd6623737d72bdf6ab9a13cdeadd14 18-Sep-2007 Ted Kremenek <kremenek@apple.com> More refactoring and code reduction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42109 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
68447a6a4556976021ef856989ec561a2dd264fc 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Added member template CFG::VisitBlockStmts to provide a succinct way
of visiting all block-level statements in a CFG.

Tightened implementation of UninitializedValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
a90b0d1e585d993621a342d0b2874e61941372d5 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Added member template CFG::VisitBlockStmts to provide a succinct way
of visiting all block-level statements in a CFG.

Tightened implementation of UninitializedValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42106 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
9439387416ec6dd0cec4ddfb58d6ef47dd30642d 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Additional comments and cosmetic cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
a36c6540346266f570b2fc7457950dea45d89988 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Additional comments and cosmetic cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
f25220eb00bec12652342dfb98668ab3d310dfd1 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for object creation and handling of category declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
fd225cc227143553898f2d3902242d25db9a4902 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for object creation and handling of category declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
2e3e6303db220be622ac426779236af620020cd1 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Modified DataFlowValues and DataflowSolver to associate dataflow value
with CFG *edges* instead of blocks. This will fascilitate dataflow
analyses that are sensitive to block terminators, and also simplifies
some reasoning.

Updated UninitializedValues to comply to this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
105bfee9d691b56bfa75a7c44b411533c5a369f0 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Modified DataFlowValues and DataflowSolver to associate dataflow value
with CFG *edges* instead of blocks. This will fascilitate dataflow
analyses that are sensitive to block terminators, and also simplifies
some reasoning.

Updated UninitializedValues to comply to this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42099 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowValues.h
d1472a55c9f8534547157abf95671ee43c78950f 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Added type "CFG::Edge" to encapsulate the notion of directed-edges
within source-level CFGs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
4c64e8ee46ad6e2336f9c160a79eded6b16c68f8 18-Sep-2007 Ted Kremenek <kremenek@apple.com> Added type "CFG::Edge" to encapsulate the notion of directed-edges
within source-level CFGs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42098 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
8b5ab6f93f260d2dfce140fc6b852c74faf8d9b7 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Uses more description name for method implementation kind argument.
Moves such argument as the last argument and uses defaul value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
00933591a2795d09dd1acff12a2d21bce7cb12c5 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Uses more description name for method implementation kind argument.
Moves such argument as the last argument and uses defaul value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42073 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
4a2b0acffc9516aad938da641d0b4201be4e8281 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to remove ObjcProtoMethodDecl and use ObjcMethodDecl
instead for @protocol method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
146fbb0c8b81cb62c8bf0e9a10ce8bc8403132c8 18-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to remove ObjcProtoMethodDecl and use ObjcMethodDecl
instead for @protocol method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42070 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
65a506b364fb5cb27f18851f313c551dc6d56b3b 17-Sep-2007 Steve Naroff <snaroff@apple.com> Add a comment and remove unused constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
6d6cfbfa8cff13deaad662ef8b8cd190917c37b4 17-Sep-2007 Steve Naroff <snaroff@apple.com> Add a comment and remove unused constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42063 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/DeclSpec.h
6d87ce556801a0e0e596bec8fd25287800d00ee0 17-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Fixed a VC++ issue related to bitmasks. As it turns out the compiler fills the unused bits of the word a bitmask is stored in with '1' (or randomly, I can't tell, I've seen '1' so far only), which creates wrong results in certain cases.

Please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
0bcccc763bef79171015c3b270e505b9c864ea8b 17-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Fixed a VC++ issue related to bitmasks. As it turns out the compiler fills the unused bits of the word a bitmask is stored in with '1' (or randomly, I can't tell, I've seen '1' so far only), which creates wrong results in certain cases.

Please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42061 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
63ca8ae2f3f4a1ecfc0fa5a938f68419ce4e3140 17-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to add objective-c's @protocl type declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
25e077d59a8e8e43b65882b69610a3d5e2aaf53c 17-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to add objective-c's @protocl type declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42060 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Parser.h
d3f5ee4f162fb5c6f832e3ae9b95c0042ab9cc56 17-Sep-2007 Steve Naroff <snaroff@apple.com> Finish defining Action API for message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
708391a0e6cf848acc5277a1b9eaa919912944f5 17-Sep-2007 Steve Naroff <snaroff@apple.com> Finish defining Action API for message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42059 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
0a03ce6781c509e8620e2ee1e212dd819a2c3838 17-Sep-2007 Ted Kremenek <kremenek@apple.com> UninitialuzedValues now only tracks BlockVarDecls; obviating false positives with
globals and function parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/UninitializedValues.h
2bf55140b893c874ef16929bfe953f7cc7823425 17-Sep-2007 Ted Kremenek <kremenek@apple.com> UninitialuzedValues now only tracks BlockVarDecls; obviating false positives with
globals and function parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/UninitializedValues.h
253118ba5c0603d6d34b91836fca75d8def34f81 17-Sep-2007 Steve Naroff <snaroff@apple.com> - Refactored ObjcKeywordInfo into ObjcKeywordInfo, ObjcKeywordDecl, and ObjcKeywordMessage.
- Removed helper ObjcGetSelectorInfo(), moving the code directly into ObjcBuildMethodDeclaration().
- Many refinements to ParseObjCMessageExpression().
- Add ActOnMessageExpression().

Next step, finish the message actions and (finally) create/instantiate an ObjcMessageExpr AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
37387c932855c6d58d70bdd705cd3a9fdcd2a931 17-Sep-2007 Steve Naroff <snaroff@apple.com> - Refactored ObjcKeywordInfo into ObjcKeywordInfo, ObjcKeywordDecl, and ObjcKeywordMessage.
- Removed helper ObjcGetSelectorInfo(), moving the code directly into ObjcBuildMethodDeclaration().
- Many refinements to ParseObjCMessageExpression().
- Add ActOnMessageExpression().

Next step, finish the message actions and (finally) create/instantiate an ObjcMessageExpr AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42050 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
3871d8ee4dd8d4b33a7a67e6db7cb0dd5ad04266 17-Sep-2007 Ted Kremenek <kremenek@apple.com> More progress on UnitializedValues checker. We now have preliminary support
for reporting errors and running the checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/UninitializedValues.h
lang/Basic/DiagnosticKinds.def
cd5860ce7a793cdad1e55552bb23937263ea2921 17-Sep-2007 Ted Kremenek <kremenek@apple.com> More progress on UnitializedValues checker. We now have preliminary support
for reporting errors and running the checker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42046 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
lang/Analysis/UninitializedValues.h
lang/Basic/DiagnosticKinds.def
334b30a6b7b303ef4acd63e07e754180f58fb216 17-Sep-2007 Ted Kremenek <kremenek@apple.com> Split tracking of unitialized values for Decls and CFGBlock-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
20ee4fbee7db6b551de7d509801bbe25367aacf2 17-Sep-2007 Ted Kremenek <kremenek@apple.com> Split tracking of unitialized values for Decls and CFGBlock-level expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42041 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/UninitializedValues.h
3e03975356e847c4503c95946346097cfc1c2fb6 17-Sep-2007 Ted Kremenek <kremenek@apple.com> Removed "ObserverTy" from core DataflowValues types. The observer
mechanism can be implemented simply by affixing the Observer to an
analysis meta data, so it doesn't need to be a required type. This
also permits analyses not to implement an Observer if it doesn't make
sense.

Changed "DataflowValues::MetaDataTy" to
"DataflowValues::AnalysisDataTy" to reflect that the type
enscapsulated the data associated with analyzing a given CFG.

Changed CFGStmtVisitor::BlockStmt_VisitImplicitControlFlowStmt(Stmt*)
to ...VisitImplicitControlFlowExpr(Expr*). The type narrowing is more
precise and more useful to clients.

Added CFGStmtVisitor::BlockStmt_VisitExpr to reflect the visitation of
expressions at the block statement level. This captures all implicit
control-flow statements as well as other expressions that are hoisted
to the block level (such as conditions for terminators and function
calls). This is especially useful for dataflow analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGStmtVisitor.h
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/DataflowValues.h
lang/Analysis/UninitializedValues.h
56d516d18a789a13696a310dbca67d4b5d9fc798 17-Sep-2007 Ted Kremenek <kremenek@apple.com> Removed "ObserverTy" from core DataflowValues types. The observer
mechanism can be implemented simply by affixing the Observer to an
analysis meta data, so it doesn't need to be a required type. This
also permits analyses not to implement an Observer if it doesn't make
sense.

Changed "DataflowValues::MetaDataTy" to
"DataflowValues::AnalysisDataTy" to reflect that the type
enscapsulated the data associated with analyzing a given CFG.

Changed CFGStmtVisitor::BlockStmt_VisitImplicitControlFlowStmt(Stmt*)
to ...VisitImplicitControlFlowExpr(Expr*). The type narrowing is more
precise and more useful to clients.

Added CFGStmtVisitor::BlockStmt_VisitExpr to reflect the visitation of
expressions at the block statement level. This captures all implicit
control-flow statements as well as other expressions that are hoisted
to the block level (such as conditions for terminators and function
calls). This is especially useful for dataflow analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42034 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGStmtVisitor.h
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/DataflowValues.h
lang/Analysis/UninitializedValues.h
590aba84dc921d487378ca65d7e0b47b9dcdd1f0 17-Sep-2007 Steve Naroff <snaroff@apple.com> Add const to debug hook...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e5ea380858f3d0a168c44ba42684e821997933d7 17-Sep-2007 Steve Naroff <snaroff@apple.com> Add const to debug hook...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42025 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
948fd378c0fb7aec046ef8a5d16929d2d7601fce 17-Sep-2007 Steve Naroff <snaroff@apple.com> Add support for ObjC keyword selectors.

- Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable.
- Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo().
- Add SelectorInfo slot to ObjcMethodDecl.
- Add helper function to derive a SelectorInfo from ObjcKeywordInfo.

Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Lex/IdentifierTable.h
3f128ad2691d299b96663da85a9e069c4081ea7c 17-Sep-2007 Steve Naroff <snaroff@apple.com> Add support for ObjC keyword selectors.

- Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable.
- Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo().
- Add SelectorInfo slot to ObjcMethodDecl.
- Add helper function to derive a SelectorInfo from ObjcKeywordInfo.

Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42023 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Lex/IdentifierTable.h
b4134a8fee91c78653ad9af2d7e013087f593db4 16-Sep-2007 Chris Lattner <sabre@nondot.org> remove some obsolete interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ASTStreamer.h
4b1aa816bb62e4610bb1c5ea369cbff6f624fcca 16-Sep-2007 Chris Lattner <sabre@nondot.org> remove some obsolete interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42014 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Sema/ASTStreamer.h
03c512e38cbee5bf4f8d586be8461c7a92b358ed 16-Sep-2007 Chris Lattner <sabre@nondot.org> Fix a GCC warning, patch by Justin Handville


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9e6622dbf397edd79a4300240e0c06ef22c55774 16-Sep-2007 Chris Lattner <sabre@nondot.org> Fix a GCC warning, patch by Justin Handville


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f0c31dd3324dd50bc2d3177f3a789db70fe8982c 16-Sep-2007 Steve Naroff <snaroff@apple.com> Fixes/tweaks that prevent "defaults-i.m" from compiling.

- Allow classnames as the receiver (removing a FIXME from ParseObjCMessageExpression).
- Added a FIXME to ParseObjCMessageExpression()...we need to return a message expr AST node!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8c9f13e494109426f358ef73bf873f77b1221564 16-Sep-2007 Steve Naroff <snaroff@apple.com> Fixes/tweaks that prevent "defaults-i.m" from compiling.

- Allow classnames as the receiver (removing a FIXME from ParseObjCMessageExpression).
- Added a FIXME to ParseObjCMessageExpression()...we need to return a message expr AST node!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42001 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5cbb02ff6d1067e6dd7a055f884dcd3048bc31e5 16-Sep-2007 Steve Naroff <snaroff@apple.com> Rename statement actions (from Parse-prefix to ActOn-prefix).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
1b273c403734d343d720acb28f04011807c8aa56 16-Sep-2007 Steve Naroff <snaroff@apple.com> Rename statement actions (from Parse-prefix to ActOn-prefix).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42000 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
87d58b4d035ff3643b530cfcea4247cc567ca652 16-Sep-2007 Steve Naroff <snaroff@apple.com> Rename expression actions (from Parse-prefix to ActOn-prefix).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f69936d1ba843c2d3186e4aa2faa87c68e5bf2fb 16-Sep-2007 Steve Naroff <snaroff@apple.com> Rename expression actions (from Parse-prefix to ActOn-prefix).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41997 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
612f174209fca0b927fe1ef48f1c515d9282d821 16-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Updated VC++ build system.
Silenced a couple of VC++ warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Parse/Action.h
1ff4f0cc794561e9a71f984551894be0f8660ead 16-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Updated VC++ build system.
Silenced a couple of VC++ warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41994 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
lang/Parse/Action.h
52332d08ad8f40145cf5ca375998d1d6148c9c8c 16-Sep-2007 Chris Lattner <sabre@nondot.org> switch the various CFG-based stuff over to using ASTConsumer interface,
this eliminates their dependence on the preprocessor and eliminates some
duplicated code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
c0508f9fe37a3afb1ccad39879348272545e55db 16-Sep-2007 Chris Lattner <sabre@nondot.org> switch the various CFG-based stuff over to using ASTConsumer interface,
this eliminates their dependence on the preprocessor and eliminates some
duplicated code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41993 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
1cc0171e8276e7cb3875b65784800a0a2abc8035 16-Sep-2007 Chris Lattner <sabre@nondot.org> add a new ASTConsumer consumer to simplify stuff in the driver.
Switch -parse-ast over to it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Sema/ASTStreamer.h
556beb71b8820ed5243e385ffcc91433a494c170 16-Sep-2007 Chris Lattner <sabre@nondot.org> add a new ASTConsumer consumer to simplify stuff in the driver.
Switch -parse-ast over to it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41991 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTConsumer.h
lang/Sema/ASTStreamer.h
576293755221f8309360879ca982b06f298b79a3 16-Sep-2007 Chris Lattner <sabre@nondot.org> Initial checkin of rewriter interface. It is just stubbed out for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
8bd12b848bc353a9d34b54144c3dd3407b064292 16-Sep-2007 Chris Lattner <sabre@nondot.org> Initial checkin of rewriter interface. It is just stubbed out for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41990 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Rewrite/Rewriter.h
0acc9c9e548751e89229f8476156f331b7254d26 15-Sep-2007 Steve Naroff <snaroff@apple.com> Start converting Action methods from Parse-prefix to ActOn-prefix.

The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
08d92e46d2ec2895f3c2ca14876830120bbe4f78 15-Sep-2007 Steve Naroff <snaroff@apple.com> Start converting Action methods from Parse-prefix to ActOn-prefix.

The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41986 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
c2e4644913c3c831b6498085c39fe05f3596ed7f 15-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Couple of new classes for objective-c's @protocol typings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e1076476e948325af6b867180d4b20b50bc89cf6 15-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Couple of new classes for objective-c's @protocol typings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41985 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ffeaa55db4b1d84ee8796eec07f4d70a01ae4f49 15-Sep-2007 Steve Naroff <snaroff@apple.com> Rename Action::ParseRecordBody() to ProcessFieldDecls(), and add a visibility argument.

Remove Action::ObjcAddVisibilityToIvars(). No need for an extra API when it is trivial to add this info to the previous hook.

In general, I want to start migrating away from having Actions prefixed with "Parse" (which is confusing, since the Action API doesn't do any parsing, per se).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f13271f8402b4434f978b64143f236db0a99c13a 15-Sep-2007 Steve Naroff <snaroff@apple.com> Rename Action::ParseRecordBody() to ProcessFieldDecls(), and add a visibility argument.

Remove Action::ObjcAddVisibilityToIvars(). No need for an extra API when it is trivial to add this info to the previous hook.

In general, I want to start migrating away from having Actions prefixed with "Parse" (which is confusing, since the Action API doesn't do any parsing, per se).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41973 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7f49f50d6015179cb1b1809215de63fb616c3af6 15-Sep-2007 Ted Kremenek <kremenek@apple.com> Prototype implementation of new template-based dataflow solver.

Preliminary implementation of UninitializedValues, which is based on
new solver (doesn't work yet, but compiles).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/DataflowValues.h
lang/Analysis/UninitializedValues.h
13ed7fea9728a89abc8fe1530d148a3589867b4c 15-Sep-2007 Ted Kremenek <kremenek@apple.com> Prototype implementation of new template-based dataflow solver.

Preliminary implementation of UninitializedValues, which is based on
new solver (doesn't work yet, but compiles).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41970 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGVarDeclVisitor.h
lang/Analysis/DataflowValues.h
lang/Analysis/UninitializedValues.h
9bb759f16cf586e4439a78fea0fc8870c52a03c1 15-Sep-2007 Steve Naroff <snaroff@apple.com> Several improvement to Sema::ParseRecordBody()...

- Adding a safer prologue. The previous prologue would accept a null and therefore assume we had an interface (which was incorrect).
- Fixed FieldDecl's classof method. This allowed me to simplify some unnecessary casting.
- When diagnosing errors, make sure the FieldDecl/EnclosingDecl are marked as invalid. In addition, don't delete the field...rather, add all fields to the enclosing decl. Memory management can/should be done elsewhere. This code was never "upgraded" to the recently added invalid decl strategy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
74216648a51e3aee7e59c27e1f1e5c132c024830 15-Sep-2007 Steve Naroff <snaroff@apple.com> Several improvement to Sema::ParseRecordBody()...

- Adding a safer prologue. The previous prologue would accept a null and therefore assume we had an interface (which was incorrect).
- Fixed FieldDecl's classof method. This allowed me to simplify some unnecessary casting.
- When diagnosing errors, make sure the FieldDecl/EnclosingDecl are marked as invalid. In addition, don't delete the field...rather, add all fields to the enclosing decl. Memory management can/should be done elsewhere. This code was never "upgraded" to the recently added invalid decl strategy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41964 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
ebcc9b632f62f436f56e10b6eddffc7dd1d7ab32 14-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to store ivars into interface class object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
b04a02184c5ec8745ea8a639fbdff2293fe0ae96 14-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to store ivars into interface class object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41961 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
dc1ad7633d6628a1c0fbbf47404ed6b1fc0e37cd 14-Sep-2007 Steve Naroff <snaroff@apple.com> Now that the dust has settled on the Decl refactoring, I noticed FieldDecl didn't need NextDeclarator. As a result, I'm removing it.

Removing both slots (NextDeclarator/Next) end up reducing the size of fields/ivars by 40%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f38661ec6e803b553bddae17325ac59809b45d83 14-Sep-2007 Steve Naroff <snaroff@apple.com> Now that the dust has settled on the Decl refactoring, I noticed FieldDecl didn't need NextDeclarator. As a result, I'm removing it.

Removing both slots (NextDeclarator/Next) end up reducing the size of fields/ivars by 40%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41948 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
2591e1be4e9470da55cca6bdfe7e1ecf98919ba8 14-Sep-2007 Steve Naroff <snaroff@apple.com> Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.

Decl is now svelte:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
9474504790f11617479b8d6ef8b64e32d071f251 14-Sep-2007 Steve Naroff <snaroff@apple.com> Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.

Decl is now svelte:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41935 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
cb59747c5e40847b0886355bcd97eeaa94dfb9ae 13-Sep-2007 Steve Naroff <snaroff@apple.com> Phase 2 of making the Decl class more lightweight...

Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl.

Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/Stmt.h
8e74c93ddaa8268a999e1b25c723dc1984a434b4 13-Sep-2007 Steve Naroff <snaroff@apple.com> Phase 2 of making the Decl class more lightweight...

Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl.

Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41934 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/Stmt.h
3957dae352cd9508fc97833b679b54060db17adc 13-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for collecting ivars before running action on them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
7d6402f753916a82d93ef0bf0f703ae4243a52be 13-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for collecting ivars before running action on them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
d21bc0d43b0e3f89e4aa55ad417e378ce7dc6c59 13-Sep-2007 Steve Naroff <snaroff@apple.com> Add "ScopedDecl" AST, used by ValueDecl and TypeDecl.

This allows us to sink the "Next" field, which isn't used by FieldDecl and ObjcIvarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c752d041b5d9bdd31dfb8ec9b059e6be9247b5af 13-Sep-2007 Steve Naroff <snaroff@apple.com> Add "ScopedDecl" AST, used by ValueDecl and TypeDecl.

This allows us to sink the "Next" field, which isn't used by FieldDecl and ObjcIvarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41931 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
409dfd126d424555116e0c561e95d961b6dbd7fb 13-Sep-2007 Chris Lattner <sabre@nondot.org> make the sourcemgr available through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
b800dc2d5e27ec60f567567b623cdc61152b8fb8 13-Sep-2007 Chris Lattner <sabre@nondot.org> make the sourcemgr available through ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41906 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f7f1a1f7600c7ee836ebd8773f70c3c2d64c7522 13-Sep-2007 Steve Naroff <snaroff@apple.com> Add ASTContext::StringMap<char> to unique selector names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
a9aa5e69d8253e196be90c070738ab5bd9813730 13-Sep-2007 Steve Naroff <snaroff@apple.com> Add ASTContext::StringMap<char> to unique selector names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41894 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
420d0f515b45377be0bac00ca898d4a824dd2533 12-Sep-2007 Steve Naroff <snaroff@apple.com> Remove a FIXME. Replace a couple asserts with an appropriate error
diagnostic for illegal initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
410e3e206b50e0336bd294fa5fb8dfcca3ee1af5 12-Sep-2007 Steve Naroff <snaroff@apple.com> Remove a FIXME. Replace a couple asserts with an appropriate error
diagnostic for illegal initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41889 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
de8e2bcadc2c44da562217ffea62e52014d533f9 12-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed logic bug in recursion to visiting child statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowStmtVisitor.h
85d28b4e5de6119712110705090da804f02cbd56 12-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed logic bug in recursion to visiting child statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41887 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/DataflowStmtVisitor.h
8cd5abaae77da2bfd6b3789d92738e89afc4d40f 12-Sep-2007 Ted Kremenek <kremenek@apple.com> Added extensions (subclasses) to the StmtVisitor class that
are useful for dataflow analysis: CFGStmtVisitor and DataflowStmtVisitor.

CFGStmtVisitor is the same as StmtVisitor is that it has separate visitors
for "root" statements in a CFGBlock (statements that have a designated
slot int the list of statements in a CFGBlock). It also recognizes statements
that have implicit control-flow, and calls special visitor methods for those.

DataflowStmtVisitor extends CFGStmtVisitor to serve as a template for
implementing transfer functions. It does a pre-/post-order traversal of
substatements depending on whether we are doing a forward/backward analysis.
It also has special handling for implicit-control-flow statements so that
they are visited only once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGStmtVisitor.h
lang/Analysis/DataflowStmtVisitor.h
73c80c2b8adec0b86de16f3a0c2c5c7861a3e6c2 12-Sep-2007 Ted Kremenek <kremenek@apple.com> Added extensions (subclasses) to the StmtVisitor class that
are useful for dataflow analysis: CFGStmtVisitor and DataflowStmtVisitor.

CFGStmtVisitor is the same as StmtVisitor is that it has separate visitors
for "root" statements in a CFGBlock (statements that have a designated
slot int the list of statements in a CFGBlock). It also recognizes statements
that have implicit control-flow, and calls special visitor methods for those.

DataflowStmtVisitor extends CFGStmtVisitor to serve as a template for
implementing transfer functions. It does a pre-/post-order traversal of
substatements depending on whether we are doing a forward/backward analysis.
It also has special handling for implicit-control-flow statements so that
they are visited only once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/CFGStmtVisitor.h
lang/Analysis/DataflowStmtVisitor.h
86f74a46b4f62a9b403e646b5118c2a3171435f4 12-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for building method declaration nodes. Also fixed a segfault in cocoa.m due
to use of @property.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
e55cd00d23f0951c29b3b93e6034b2c4b3933a23 12-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch for building method declaration nodes. Also fixed a segfault in cocoa.m due
to use of @property.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41880 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6a0e2094e7d41c9e601e70b47298a4b0be8dc9da 12-Sep-2007 Steve Naroff <snaroff@apple.com> Fix the following bug submitted by Ted Kremenek:

void func() {
int xx = xx; // incorrectly diagnosed 'xx' as an undeclared identifier.
}

This smallish bug resulted in a largish fix. Here are some highlights:

- Needed to make sure ParseDeclarator is called *before* parsing any
initializer. Removed the "Init" argument to ParseDeclarator.
- Added AddInitializerToDecl() to the Action & Sema classes.
In Sema, this hook is responsible for validating the initializer and
installing it into the respective decl.
- Moved several semantic checks from ParseDeclarator() to
FinalizeDeclaratorGroup(). Previously, this hook was only responsible for
reversing a list. Now it plays a much larger semantic role.

All of the above changes ended up simplifying ParseDeclarator(), which
is goodness...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
bb204693855fe87a6e4b23dfd053722026dbe87c 12-Sep-2007 Steve Naroff <snaroff@apple.com> Fix the following bug submitted by Ted Kremenek:

void func() {
int xx = xx; // incorrectly diagnosed 'xx' as an undeclared identifier.
}

This smallish bug resulted in a largish fix. Here are some highlights:

- Needed to make sure ParseDeclarator is called *before* parsing any
initializer. Removed the "Init" argument to ParseDeclarator.
- Added AddInitializerToDecl() to the Action & Sema classes.
In Sema, this hook is responsible for validating the initializer and
installing it into the respective decl.
- Moved several semantic checks from ParseDeclarator() to
FinalizeDeclaratorGroup(). Previously, this hook was only responsible for
reversing a list. Now it plays a much larger semantic role.

All of the above changes ended up simplifying ParseDeclarator(), which
is goodness...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41877 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
999c58d3d11af5647c73d3bab8157b19c5a8c0a1 12-Sep-2007 Ted Kremenek <kremenek@apple.com> Added static method "CFG::hasImplicitControlFlow".

This method is used to determine if an expression contains implicit
control-flow, and thus appears in a distinct statement slot in the CFG.

For example:

(1) x = ... ? ... ? ...

logically becomes:

(1) ... ? ... : ... (a unique statement slot for the ternary ?)
(2) x = [E1] (where E1 is actually the ConditionalOperator*)

A client of the CFG, when walking the statement at (2), will encounter
E1. In this case, hasImplicitControlFlow(E1) == true, and the client
will know that the expression E1 is explicitly placed into its own statement
slot to capture the implicit control-flow it has.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
155383b0fcd0a12a103310010f8c0d084b90b090 12-Sep-2007 Ted Kremenek <kremenek@apple.com> Added static method "CFG::hasImplicitControlFlow".

This method is used to determine if an expression contains implicit
control-flow, and thus appears in a distinct statement slot in the CFG.

For example:

(1) x = ... ? ... ? ...

logically becomes:

(1) ... ? ... : ... (a unique statement slot for the ternary ?)
(2) x = [E1] (where E1 is actually the ConditionalOperator*)

A client of the CFG, when walking the statement at (2), will encounter
E1. In this case, hasImplicitControlFlow(E1) == true, and the client
will know that the expression E1 is explicitly placed into its own statement
slot to capture the implicit control-flow it has.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41868 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
75494896d07edfb63a46a9f82e132641447b1e29 11-Sep-2007 Steve Naroff <snaroff@apple.com> - Add an ObjcIvarDecl AST node (a subclass of FieldDecl).
- Instantiate the node in Sema::ParseField(), based on the type of the TagDecl.
- Add Sema::ObjcAddInstanceVariable(), responsible for adorning/adding the ObjcIvarDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
4473921b663539cc489435d6eae5c14df1bc4a96 11-Sep-2007 Steve Naroff <snaroff@apple.com> - Add an ObjcIvarDecl AST node (a subclass of FieldDecl).
- Instantiate the node in Sema::ParseField(), based on the type of the TagDecl.
- Add Sema::ObjcAddInstanceVariable(), responsible for adorning/adding the ObjcIvarDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
4d627f5423338381d3465e2bf01e6f83bdfb65a5 11-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Change ObjcMethodDecl class derivation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
8a4010d40c7ba61a92c728814639674726888e8f 11-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Change ObjcMethodDecl class derivation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
61ce98c13c4e13f2f399533cac2f0c7469c4aea7 11-Sep-2007 Gabor Greif <ggreif@gmail.com> get rid of ugly "warning: no newline at end of file"
warnings that some compilers diagnose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
8467583c2704e7a9691ea56939a029015f0ade0a 11-Sep-2007 Gabor Greif <ggreif@gmail.com> get rid of ugly "warning: no newline at end of file"
warnings that some compilers diagnose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41847 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/PrettyPrinter.h
74a340749eb63af1ba7098c67f3ef72bd48f5ae8 11-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed isFunctionPointerType to correctly handle typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
01c2c6e3c94a3fa2ac15851b4af5de6dc3ae2af8 11-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed isFunctionPointerType to correctly handle typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3dc7cbc04c4f7e80829dd526e869b3188d2e6b09 10-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Early patch to collect objective-c methods inserts them in
class object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
e3a2ca7e30601cdd31c77a830f4cc487851e8096 10-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Early patch to collect objective-c methods inserts them in
class object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41801 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/Action.h
lang/Parse/Parser.h
6b2b4e3a9a0f9c938341d7517ff3eaec13a1ec8e 10-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed LiveVariables to no longer track the liveness of function pointers
that refer to direct function calls.

Modified interface of LiveVariables to only track liveness of VarDecls.
This cleans up a bunch of edge cases, and removed the bug just mentioned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
c0576ca6c6ba136e583985041bd324b0acc38f40 10-Sep-2007 Ted Kremenek <kremenek@apple.com> Fixed LiveVariables to no longer track the liveness of function pointers
that refer to direct function calls.

Modified interface of LiveVariables to only track liveness of VarDecls.
This cleans up a bunch of edge cases, and removed the bug just mentioned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41797 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
83b01279f2e6718581eeb1e5bdba58aa88e4649b 10-Sep-2007 Ted Kremenek <kremenek@apple.com> Added "isFunctionPointerType()" so that we can readily see if a DeclRefExpr
refers to a function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
498b0d1aba38f5ec64d566d1dd9e6be237ecc50f 10-Sep-2007 Ted Kremenek <kremenek@apple.com> Added "isFunctionPointerType()" so that we can readily see if a DeclRefExpr
refers to a function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d1d882631b038edbcaecff44998812da4ecd225d 10-Sep-2007 Ted Kremenek <kremenek@apple.com> Renaming of the LiveVariablesAuditor interface. Changed "Auditor" and
"Audit" to "Observer" and "Observe"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
b00c95eab9919ee1dd7805a0e6f2218129a9733e 10-Sep-2007 Ted Kremenek <kremenek@apple.com> Renaming of the LiveVariablesAuditor interface. Changed "Auditor" and
"Audit" to "Observer" and "Observe"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
3d06ad9e5e5ca3b1f7e73cda36b3428641af15d7 08-Sep-2007 Chris Lattner <sabre@nondot.org> Don't rely on ADL to find this member, patch by Justin Handville


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
4d33275624e53bf0c16e188d9b1f6a08b2068fcc 08-Sep-2007 Chris Lattner <sabre@nondot.org> Don't rely on ADL to find this member, patch by Justin Handville


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41783 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
7c6f0c755e48a2782bc0a0a4cfc63dc84e0f11d5 07-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Fixed compilation on Windows.
Silenced a couple of warnings.
Added *.vcproj file for new clangAnalysis library.
Renamed Basic to clangBasic projects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
124dd7b5777e29ecac006822bd4d4623f0dc4264 07-Sep-2007 Hartmut Kaiser <hartmut.kaiser@gmail.com> Fixed compilation on Windows.
Silenced a couple of warnings.
Added *.vcproj file for new clangAnalysis library.
Renamed Basic to clangBasic projects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41767 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/AST/Type.h
e9646a0d0fd5f6e6e5de53a8892582e01085a36b 07-Sep-2007 Ted Kremenek <kremenek@apple.com> Forgot to check in the actual "dead stores" checker in the last commit!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
1ed6d2e4fda310af2de2ec09cdfedfa280cce948 07-Sep-2007 Ted Kremenek <kremenek@apple.com> Forgot to check in the actual "dead stores" checker in the last commit!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41755 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LocalCheckers.h
e805c4ab96e8698386e4166ea47cbe096fedbd49 07-Sep-2007 Ted Kremenek <kremenek@apple.com> Added "Dead Stores", a flow-sensitive checker that checks for stores
to variables that are no longer live. This analysis is built on top
of CFGs and the LiveVariables analysis.

changes to driver:
added driver option "-check-dead-stores" to run the analysis


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
lang/Basic/DiagnosticKinds.def
055c275fabcbe1ef246942c8b5f7d49b3a173500 07-Sep-2007 Ted Kremenek <kremenek@apple.com> Added "Dead Stores", a flow-sensitive checker that checks for stores
to variables that are no longer live. This analysis is built on top
of CFGs and the LiveVariables analysis.

changes to driver:
added driver option "-check-dead-stores" to run the analysis


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41754 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
lang/Basic/DiagnosticKinds.def
0533468f00d9817a48b8d8db560adaa40f838d35 06-Sep-2007 Ted Kremenek <kremenek@apple.com> LiveVariables:
- Finished 99% of analysis logic. Probably a few bugs.
- Added querying functions to query liveness.
- Added better pretty printing of liveness.
- Added better bookkeeping of per-variable liveness information.
- Added LiveVariablesAuditor interface, which allows "lazy" querying
of intra-basic block liveness information.

Driver:
- Minor cleanups involved in dumping liveness information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
27b07c5fb9926c9d69fa1d8239e96ad0b7a178f7 06-Sep-2007 Ted Kremenek <kremenek@apple.com> LiveVariables:
- Finished 99% of analysis logic. Probably a few bugs.
- Added querying functions to query liveness.
- Added better pretty printing of liveness.
- Added better bookkeeping of per-variable liveness information.
- Added LiveVariablesAuditor interface, which allows "lazy" querying
of intra-basic block liveness information.

Driver:
- Minor cleanups involved in dumping liveness information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41753 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
81f1bbabbdb7dce07802111e2d9648eedc866d51 06-Sep-2007 Steve Naroff <snaroff@apple.com> The goal of this commit is to get just enough Sema support to recognize Objective-C classes
as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very*
preliminary.

The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/Parser.h
3536b443bc50d58a79f14fca9b6842541a434854 06-Sep-2007 Steve Naroff <snaroff@apple.com> The goal of this commit is to get just enough Sema support to recognize Objective-C classes
as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very*
preliminary.

The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41752 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/AST/Type.h
lang/Parse/Action.h
lang/Parse/Parser.h
a65ad464c65453caee78a7c811682afcf42aefb5 06-Sep-2007 Ted Kremenek <kremenek@apple.com> Added LabelLoc to GotoStmt to record the source location of the label token
in the actual GotoStmt.

Fixed bug where GotoStmt::getSourceRange incorrectly used the target LabelStmt
to compute its extent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
61f62165220e75694fe333179c78815e2e48d71f 06-Sep-2007 Ted Kremenek <kremenek@apple.com> Added LabelLoc to GotoStmt to record the source location of the label token
in the actual GotoStmt.

Fixed bug where GotoStmt::getSourceRange incorrectly used the target LabelStmt
to compute its extent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41745 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
aa04c514ff8f1b5d1c51cf157249fa401b32d7d8 06-Sep-2007 Ted Kremenek <kremenek@apple.com> Added an early implementation of Live-Variables analysis built on
source-level CFGs. This code may change significantly in the near
future as we explore different means to implement dataflow analyses.

Added a driver option, -dump-live-variables, to view the output of
live variable analysis. This output is very ALPHA; it will be improved shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
e4e633400b1993c1174b47b774fa015220fa695c 06-Sep-2007 Ted Kremenek <kremenek@apple.com> Added an early implementation of Live-Variables analysis built on
source-level CFGs. This code may change significantly in the near
future as we explore different means to implement dataflow analyses.

Added a driver option, -dump-live-variables, to view the output of
live variable analysis. This output is very ALPHA; it will be improved shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41737 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Analysis/LiveVariables.h
ef371a09917003d38e64f39ab1b6f2f2275dab84 06-Sep-2007 Chris Lattner <sabre@nondot.org> remove the FATAL classifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f3a031f47d87cb9925cf8d28eaa26dc81a5dde50 06-Sep-2007 Chris Lattner <sabre@nondot.org> remove the FATAL classifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41736 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
eb851e889684b8b58fc8601c09e005a0454af27c 06-Sep-2007 Chris Lattner <sabre@nondot.org> remove sorry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
3936c585cc07361a69cdf0c2c66c72f482b39dbe 06-Sep-2007 Chris Lattner <sabre@nondot.org> remove sorry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
304ed3940b99c01e770c27989f5800402cede047 06-Sep-2007 Steve Naroff <snaroff@apple.com> Start implementing Actions interface for ObjC classes, instance variables, and methods.

Lot's of small changes to the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
f28b264437053fb0deacc9ba02b18a0966f7290a 06-Sep-2007 Steve Naroff <snaroff@apple.com> Start implementing Actions interface for ObjC classes, instance variables, and methods.

Lot's of small changes to the parser.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41732 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
145945746c3eae2a8d82558a33f6dc661649a57b 05-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved tracking of CFG block IDs into the CFG class.
Added CFG::getNumBlockIDs() to query the number of distinct block ids created.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
9438252ad2ecae5338df565ca33c6969e4fbfa41 05-Sep-2007 Ted Kremenek <kremenek@apple.com> Moved tracking of CFG block IDs into the CFG class.
Added CFG::getNumBlockIDs() to query the number of distinct block ids created.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41724 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
1e534dc2c740d9cb4c00781319bbfbfb3ea736af 05-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> 1. Fix parsing of method prototype involving c-style argument declarations.
2. Fixes all allowable key-words used as selectors.
3. Template to do the messaging parse.
4. A test case for all allowable selector names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
0ccb27ded12fd03eb6818a880f50901bb70254fe 05-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> 1. Fix parsing of method prototype involving c-style argument declarations.
2. Fixes all allowable key-words used as selectors.
3. Template to do the messaging parse.
4. A test case for all allowable selector names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41723 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4f9109983a4b4e69c41436ac4b3ae9a370e9a725 04-Sep-2007 Steve Naroff <snaroff@apple.com> Simplified initializer semantic analysis by adding the following 2 methods:

- ArrayType::getBaseType(), and
- ConstantArrayType::getMaximumElements().

Wanted to do this cleanup before adding structure support, which will add more complexity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7cf8c444320313f0e5b8a483daa996ba844b11ff 04-Sep-2007 Steve Naroff <snaroff@apple.com> Simplified initializer semantic analysis by adding the following 2 methods:

- ArrayType::getBaseType(), and
- ConstantArrayType::getMaximumElements().

Wanted to do this cleanup before adding structure support, which will add more complexity.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41715 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
b62aff34d2ced9bed9b18ad29d2f0ea7930a72d1 04-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse objective-c's @compatibility_alias directive.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e992af01d14e2e31037562c123af0a71ae1ed374 04-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse objective-c's @compatibility_alias directive.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41709 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
e6a8c9bf9c09ff6528ede8d0c472f3a12431cdb9 04-Sep-2007 Steve Naroff <snaroff@apple.com> Make sure initializer type promotions get propagated.

This fixes a recent regression with Codegen/mandel.c.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9e8925e72f53a9e2c4633b6b48e965ed01702fe4 04-Sep-2007 Steve Naroff <snaroff@apple.com> Make sure initializer type promotions get propagated.

This fixes a recent regression with Codegen/mandel.c.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41696 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
509d0b5869d31184dcbdd12aef0a8889ff8af5ad 04-Sep-2007 Steve Naroff <snaroff@apple.com> More fun with initializers!

- Fixed many bugs, enhanced test case considerably, added a diagnostic, etc.
- Refactored CheckInitList() into CheckVariableInitList()/CheckConstantInitList().
- Added CheckInitExpr().
- Support for multi-dimensional arrays looking good.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
371227d6dc3cf89a3165d592cd9a4cbb400ec45c 04-Sep-2007 Steve Naroff <snaroff@apple.com> More fun with initializers!

- Fixed many bugs, enhanced test case considerably, added a diagnostic, etc.
- Refactored CheckInitList() into CheckVariableInitList()/CheckConstantInitList().
- Added CheckInitExpr().
- Support for multi-dimensional arrays looking good.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41690 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c75ccff9e318638cac63fe392f68893ab4177f45 03-Sep-2007 Chris Lattner <sabre@nondot.org> Eliminate some VC++ warnings, patch by Hartmut Kaiser!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TargetInfo.h
lang/Lex/IdentifierTable.h
lang/Lex/Token.h
lang/Parse/DeclSpec.h
b8128140956c6f8f0ab143818775a81f4b4aa477 03-Sep-2007 Chris Lattner <sabre@nondot.org> Eliminate some VC++ warnings, patch by Hartmut Kaiser!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41685 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/TargetInfo.h
lang/Lex/IdentifierTable.h
lang/Lex/Token.h
lang/Parse/DeclSpec.h
1c9de71e63999f59f49d24893dc188e8167f70a5 03-Sep-2007 Steve Naroff <snaroff@apple.com> Finish getting "array-init.c" to work properly.

Array scalar initialization is now is reasonable shape.

Next step, structure and array of structure initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
d35005ece906cca5238d75b031b8db7eac0ac6e1 03-Sep-2007 Steve Naroff <snaroff@apple.com> Finish getting "array-init.c" to work properly.

Array scalar initialization is now is reasonable shape.

Next step, structure and array of structure initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41681 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
7c9d72d2c2077df381e3b66460333a7ff90d8ecb 02-Sep-2007 Steve Naroff <snaroff@apple.com> More progress on array initializers.

- Added Expr::isConstantExpr().
- Added type checking for InitListExpr elements.
- Added diagnostic for trying to initialize a variable sized object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
38374b05791ee93300b9fbe8ceb3957f54184b37 02-Sep-2007 Steve Naroff <snaroff@apple.com> More progress on array initializers.

- Added Expr::isConstantExpr().
- Added type checking for InitListExpr elements.
- Added diagnostic for trying to initialize a variable sized object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41674 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
9091f3fd683b9f5063970616c6c6e6031d8bc146 02-Sep-2007 Steve Naroff <snaroff@apple.com> More semantic analysis of initializers.

Added 2 errors and one warning, updated test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6f9f307d527e3451470dd07ae932475f26c6de6e 02-Sep-2007 Steve Naroff <snaroff@apple.com> More semantic analysis of initializers.

Added 2 errors and one warning, updated test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41672 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a610eabeb3fed484c251fa67c8de4437f43b4af6 01-Sep-2007 Steve Naroff <snaroff@apple.com> Finish converting SwitchStmt AST to source ranges.
Move DumpSourceRange() to DumpStmt().

Now -parse-ast-dump will display source range info for all stmts/exprs.

One day we should implement the source range protocol for Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
9dcbfa450d751bd68fc4af8b75da381d4f6984b9 01-Sep-2007 Steve Naroff <snaroff@apple.com> Finish converting SwitchStmt AST to source ranges.
Move DumpSourceRange() to DumpStmt().

Now -parse-ast-dump will display source range info for all stmts/exprs.

One day we should implement the source range protocol for Decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41670 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
027c23b42f2741324b581c52901ecdfb56c97964 01-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse @implementation prologue, method definitions,
objc2's @synthesize and @dynamic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
ac00b7f4a933e60e2f0afd83092339160adc140c 01-Sep-2007 Fariborz Jahanian <fjahanian@apple.com> Patch to parse @implementation prologue, method definitions,
objc2's @synthesize and @dynamic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41667 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
c32a20d907fcfde8a078c903241665a823a7fae9 01-Sep-2007 Steve Naroff <snaroff@apple.com> Convert more statments over to SourceRanges...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
507f2d5811bd7da1a4d9d2f4960f32177dfab9de 01-Sep-2007 Steve Naroff <snaroff@apple.com> Convert more statments over to SourceRanges...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41666 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
5d2fff8f77b7e6d127af1d3fa25d1c4b24cd52f6 01-Sep-2007 Steve Naroff <snaroff@apple.com> Move SourceRange protocol from Expr->Stmt.

Converted many of the statements over. Still a hanful left...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
b5a69586f1b8855ee4c1f0bb7a8f0ff4fe32ce09 01-Sep-2007 Steve Naroff <snaroff@apple.com> Move SourceRange protocol from Expr->Stmt.

Converted many of the statements over. Still a hanful left...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41663 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
f2b0757000544812f2fd83027823873ba9164a0c 31-Aug-2007 Chris Lattner <sabre@nondot.org> Fix a bug/missing-feature Ted noticed: the 'unused' warning should not
warn about the last stmt in a stmtexpr, f.e. there should be no warning for:

int maxval_stmt_expr(int x, int y) {
return ({int _a = x, _b = y; _a > _b ? _a : _b; });
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
98414c1b7d1944a57156d52e29bd41c005de09ac 31-Aug-2007 Chris Lattner <sabre@nondot.org> Fix a bug/missing-feature Ted noticed: the 'unused' warning should not
warn about the last stmt in a stmtexpr, f.e. there should be no warning for:

int maxval_stmt_expr(int x, int y) {
return ({int _a = x, _b = y; _a > _b ? _a : _b; });
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41655 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
lang/Parse/Parser.h
21701c7aac527d34953b3002e8a1413d7b608094 31-Aug-2007 Chris Lattner <sabre@nondot.org> new diag


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e436dda806afee42b630b2153385661f1f882f8d 31-Aug-2007 Chris Lattner <sabre@nondot.org> new diag


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41652 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
08176a5484771ab326f230aca24029ac40d11088 31-Aug-2007 Ted Kremenek <kremenek@apple.com> Added "PrinterHelper" interface (include/AST/PrinterHelper) that can
be passed as an (optional) argument to StmtPrinter to customize
printing of AST nodes.

Used new PrinterHelper interface to enhance printing and visualization
of CFGs. The CFGs now illustrate the semantic connectives between
statements and terminators, wheras in the previous printing certain
expressions would (visible) be printed multiple times to reflect which
expressions used the results of other expressions.

The end result is that the CFG is easier to read for flow of
expression values (following principles similar to the LLVM IR).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
42a509f6a4f71bb805cc4abbb26722a34dffddde 31-Aug-2007 Ted Kremenek <kremenek@apple.com> Added "PrinterHelper" interface (include/AST/PrinterHelper) that can
be passed as an (optional) argument to StmtPrinter to customize
printing of AST nodes.

Used new PrinterHelper interface to enhance printing and visualization
of CFGs. The CFGs now illustrate the semantic connectives between
statements and terminators, wheras in the previous printing certain
expressions would (visible) be printed multiple times to reflect which
expressions used the results of other expressions.

The end result is that the CFG is easier to read for flow of
expression values (following principles similar to the LLVM IR).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
lang/AST/PrettyPrinter.h
lang/AST/Stmt.h
ce9d5fe7e23345c3822d23e53ab837732d8f7616 31-Aug-2007 Ted Kremenek <kremenek@apple.com> Added #ifndef/#endif statements to protect the header from multiple inclusion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
cd881d534517f09a2fae10445f9b865f49ccc6c8 31-Aug-2007 Ted Kremenek <kremenek@apple.com> Added #ifndef/#endif statements to protect the header from multiple inclusion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41648 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
5eb879b0ab7cc0b98c5700b0c19cae3797530d9c 31-Aug-2007 Steve Naroff <snaroff@apple.com> Removed Sema::VerifyConstantArrayType(). With the new Array/ConstantArray/VariableArray nodes, this
routine was causing more trouble than it was worth. Anders/Chris noticed that it could return an error code
without emiting a diagnostic (which results in an silent invalid decl, which should *never* happen). In addition,
this routine didn't work well for typedefs and field decls. Lastly, it didn't consider that initializers aren't
in place yet.

Added Type::getAsConstantArrayType(), Type::getAsVariableArrayType(), Type::getAsVariablyModifiedType(),
and Type::isVariablyModifiedType();

Modified Sema::ParseDeclarator() and Sema::ParseField() to use the new predicates. Also added a FIXME for
the initializer omission. Also added a missing test for "static" @ file scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d7444aac1af1c2c1d5e5b7467ecf6006ee2d8abe 31-Aug-2007 Steve Naroff <snaroff@apple.com> Removed Sema::VerifyConstantArrayType(). With the new Array/ConstantArray/VariableArray nodes, this
routine was causing more trouble than it was worth. Anders/Chris noticed that it could return an error code
without emiting a diagnostic (which results in an silent invalid decl, which should *never* happen). In addition,
this routine didn't work well for typedefs and field decls. Lastly, it didn't consider that initializers aren't
in place yet.

Added Type::getAsConstantArrayType(), Type::getAsVariableArrayType(), Type::getAsVariablyModifiedType(),
and Type::isVariablyModifiedType();

Modified Sema::ParseDeclarator() and Sema::ParseField() to use the new predicates. Also added a FIXME for
the initializer omission. Also added a missing test for "static" @ file scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41647 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
6668b8c77696e66e713e51520c6756c3a149b7a0 31-Aug-2007 Fariborz Jahanian <fjahanian@apple.com> Author: F. Jahanian
Log:
Implement parsing of objective-c's new @property declaration.

Modified:
include/clang/Basic/DiagnosticKinds.def
include/clang/Parse/Parser.h
Parse/ParseObjc.cpp
Parse/Parser.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
d0f97d1716a138a8d9e0df8e5af77334663723d8 31-Aug-2007 Fariborz Jahanian <fjahanian@apple.com> Author: F. Jahanian
Log:
Implement parsing of objective-c's new @property declaration.

Modified:
include/clang/Basic/DiagnosticKinds.def
include/clang/Parse/Parser.h
Parse/ParseObjc.cpp
Parse/Parser.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41644 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
762b7c71edb68cf759f947bceae37654f900ab45 31-Aug-2007 Anders Carlsson <andersca@mac.com> Add InitListExpr class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
66b5a8a39088598c01a9fa6f032dc908612dc8ec 31-Aug-2007 Anders Carlsson <andersca@mac.com> Add InitListExpr class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41636 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
b26b7adce1e4a01d12a6ddef46f7e6777e60469f 31-Aug-2007 Chris Lattner <sabre@nondot.org> add actions for deleting expr/stmt nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
394a3fd57d2430f26dd1872cc7226437f5698e63 31-Aug-2007 Chris Lattner <sabre@nondot.org> add actions for deleting expr/stmt nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41635 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e1765f25167e1cafcb9f2013e60a2dcc45afa482 31-Aug-2007 Chris Lattner <sabre@nondot.org> add some accessors for querying attributes of builtins. Add the new 'F' attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
d74c15fc0a492fe3ca32cd1865d84911dd0d6e99 31-Aug-2007 Chris Lattner <sabre@nondot.org> add some accessors for querying attributes of builtins. Add the new 'F' attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
lang/AST/Builtins.h
63b6a647e9dc9dcb0e0d9580388c446e9074abee 31-Aug-2007 Steve Naroff <snaroff@apple.com> Final phase of array cleanup (for now), removing a FIXME from yesterday.

Moved several array constraints checks from Sema::VerifyConstantArrayType() to
Sema::GetTypeForDeclarator(). VerifyConstantArrayType() is now very simple, and
could be removed eventually.

Now, we get the following (correct) messages for BlockVarDecls:-)

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang x.c -pedantic
x.c:4:20: error: size of array has non-integer type 'float'
int size_not_int[f];
^
x.c:5:21: error: array size is negative
int negative_size[1-2];
^~~
x.c:6:17: warning: zero size arrays are an extension
int zero_size[0];
^
3 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
42471f8bc6c1179a54941fac3c483ec1bd319436 31-Aug-2007 Steve Naroff <snaroff@apple.com> Final phase of array cleanup (for now), removing a FIXME from yesterday.

Moved several array constraints checks from Sema::VerifyConstantArrayType() to
Sema::GetTypeForDeclarator(). VerifyConstantArrayType() is now very simple, and
could be removed eventually.

Now, we get the following (correct) messages for BlockVarDecls:-)

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang x.c -pedantic
x.c:4:20: error: size of array has non-integer type 'float'
int size_not_int[f];
^
x.c:5:21: error: array size is negative
int negative_size[1-2];
^~~
x.c:6:17: warning: zero size arrays are an extension
int zero_size[0];
^
3 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41624 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e2579e398d370a480f4803d3337630a4a1f2f68a 30-Aug-2007 Steve Naroff <snaroff@apple.com> Fix a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
bdbf7b030a3e0ddb95240076683830e6f78c79a5 30-Aug-2007 Steve Naroff <snaroff@apple.com> Fix a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41618 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
24c9b98cc6a8de4a080e2dedb2797bdc2eeb688b 30-Aug-2007 Steve Naroff <snaroff@apple.com> Polish yesterday's Array/ConstantArray/VariableArray rewrite, removing a couple FIXME's.

Refactored Array/VariableArray, moving SizeModifier/IndexTypeQuals back up to Array. These
attributes are not specific to VLA's. Most of them are specific to array parameter types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
c9406125e2cac9208098655ac8058c095c2c3a65 30-Aug-2007 Steve Naroff <snaroff@apple.com> Polish yesterday's Array/ConstantArray/VariableArray rewrite, removing a couple FIXME's.

Refactored Array/VariableArray, moving SizeModifier/IndexTypeQuals back up to Array. These
attributes are not specific to VLA's. Most of them are specific to array parameter types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41616 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
2af6a80d611735efcba1dd0d8f9ee09b60a21e8f 30-Aug-2007 Chris Lattner <sabre@nondot.org> implement pretty printing of offsetof


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
704fe35d13c6c7c17ee8472da2321211fc5197c9 30-Aug-2007 Chris Lattner <sabre@nondot.org> implement pretty printing of offsetof


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41615 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
0d9bcea5eeecaa5c0e91951d185056154f65d102 30-Aug-2007 Chris Lattner <sabre@nondot.org> implement initial sema support for __builtin_offsetof


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
lang/Basic/DiagnosticKinds.def
73d0d4fac161ed12926e010dcf8b448a8de6a2ec 30-Aug-2007 Chris Lattner <sabre@nondot.org> implement initial sema support for __builtin_offsetof


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41613 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
lang/Basic/DiagnosticKinds.def
1b6b5be72f1216435647138517bc7e62659b9558 30-Aug-2007 Chris Lattner <sabre@nondot.org> Pass the location of the type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
9fddf0afb57a863be04369a268dab33b2a7f76f6 30-Aug-2007 Chris Lattner <sabre@nondot.org> Pass the location of the type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41612 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
e07b67e2390fd269d2dd1e9a8bc46aac6988583a 30-Aug-2007 Ted Kremenek <kremenek@apple.com> Fixed bug for CaseStmt where the child_begin/child_end methods were not
including the expressions in the case statement itself (not the body of
the case).

This required moving SubStmt out of SwitchCase into CaseStmt and DefaultStmt
respectively. getSubStmt() now is a virtual call for SwitchCase, but is
a direct (static) call for CaseStmt and DefaultStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
d97bb6c1384cb773ba5cdbd198008dec127cebad 30-Aug-2007 Ted Kremenek <kremenek@apple.com> Fixed bug for CaseStmt where the child_begin/child_end methods were not
including the expressions in the case statement itself (not the body of
the case).

This required moving SubStmt out of SwitchCase into CaseStmt and DefaultStmt
respectively. getSubStmt() now is a virtual call for SwitchCase, but is
a direct (static) call for CaseStmt and DefaultStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41609 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
69638b1512434b196336faa4a0bff864bd50e979 30-Aug-2007 Chris Lattner <sabre@nondot.org> add an action callback for __builtin_offsetof


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
f9aa3cb0348cb567a930248992eb54b0e6915961 30-Aug-2007 Chris Lattner <sabre@nondot.org> add an action callback for __builtin_offsetof


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41606 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
99b994b4386a39a2d784e57ac411770d729e9b0a 30-Aug-2007 Chris Lattner <sabre@nondot.org> Teach the stmtdumper to dump location/range info when a SourceMgr is available.
For example, -parse-ast-dump now prints:

static inline int __inline_isinff(float __x)
(CompoundStmt 0x2409a20
(ReturnStmt 0x2409a10
(BinaryOperator 0x24099f0 'int' <///usr/include/architecture/i386/math.h:183:63, col:102> '=='
(CallExpr 0x24098f0 'float' <col:63, col:82>
(ImplicitCastExpr 0x24098e0 'float (*)(float)' <col:63>
(DeclRefExpr 0x2409880 'float (float)' <col:63> Decl='__builtin_fabsf' 0x2409840))
(DeclRefExpr 0x24098a0 'float' <col:79> Decl='__x' 0x2409810))
(CallExpr 0x24099c0 'float' <col:87, col:102>
(ImplicitCastExpr 0x2409870 'float (*)(void)' <col:87>
(DeclRefExpr 0x2409980 'float (void)' <col:87> Decl='__builtin_inff' 0x2409940))))))

where it only prints filename/line# if it changes from the previous value. We
really need loc info on stmts though, like we have on exprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
e300c870f08d08badf2ebcb53ded49f304af37fc 30-Aug-2007 Chris Lattner <sabre@nondot.org> Teach the stmtdumper to dump location/range info when a SourceMgr is available.
For example, -parse-ast-dump now prints:

static inline int __inline_isinff(float __x)
(CompoundStmt 0x2409a20
(ReturnStmt 0x2409a10
(BinaryOperator 0x24099f0 'int' <///usr/include/architecture/i386/math.h:183:63, col:102> '=='
(CallExpr 0x24098f0 'float' <col:63, col:82>
(ImplicitCastExpr 0x24098e0 'float (*)(float)' <col:63>
(DeclRefExpr 0x2409880 'float (float)' <col:63> Decl='__builtin_fabsf' 0x2409840))
(DeclRefExpr 0x24098a0 'float' <col:79> Decl='__x' 0x2409810))
(CallExpr 0x24099c0 'float' <col:87, col:102>
(ImplicitCastExpr 0x2409870 'float (*)(void)' <col:87>
(DeclRefExpr 0x2409980 'float (void)' <col:87> Decl='__builtin_inff' 0x2409940))))))

where it only prints filename/line# if it changes from the previous value. We
really need loc info on stmts though, like we have on exprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41602 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
37f0411779e6acce0999770abcb0efb79de7f403 30-Aug-2007 Chris Lattner <sabre@nondot.org> constify a method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
8b6ca8866f09fd8e018a329a0749d2dcf11b146a 30-Aug-2007 Chris Lattner <sabre@nondot.org> constify a method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41600 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
83c13010359c33354c581acee65d0c986a75247e 30-Aug-2007 Steve Naroff <snaroff@apple.com> Fix the following redefinition errors submitted by Keith Bauer...

[dylan:~/llvm/tools/clang] admin% cat tentative_decls.c
// incorrectly generates redefinition error
extern int array[3];
int array[3];

// incorrectly generates a redefinition error
extern void nup(int a[3]);
void nup(int a[3]) {}

It turns out that this exposed a fairly major flaw in the type system,
array types were never getting uniqued! This is because all array types
contained an expression, which aren't unique.

To solve this, we now have 2 array types, ConstantArrayType and
VariableArrayType. ConstantArrayType's are unique, VAT's aren't.

This is a fairly extensive set of fundamental changes. Fortunately,
all the tests pass. Nevertheless, there may be some collateral damage:-)
If so, let me know!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
fb22d96692c5240fb8d611290dbf7eeed3759c73 30-Aug-2007 Steve Naroff <snaroff@apple.com> Fix the following redefinition errors submitted by Keith Bauer...

[dylan:~/llvm/tools/clang] admin% cat tentative_decls.c
// incorrectly generates redefinition error
extern int array[3];
int array[3];

// incorrectly generates a redefinition error
extern void nup(int a[3]);
void nup(int a[3]) {}

It turns out that this exposed a fairly major flaw in the type system,
array types were never getting uniqued! This is because all array types
contained an expression, which aren't unique.

To solve this, we now have 2 array types, ConstantArrayType and
VariableArrayType. ConstantArrayType's are unique, VAT's aren't.

This is a fairly extensive set of fundamental changes. Fortunately,
all the tests pass. Nevertheless, there may be some collateral damage:-)
If so, let me know!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41592 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
bbc51adc4e01ab1bda471ac39ab924c4fd7ee316 30-Aug-2007 Chris Lattner <sabre@nondot.org> Allow a SourceManager to optionally be passed into Stmt::dump


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
0c727a35718556866a978f64ac549d9798735f08 30-Aug-2007 Chris Lattner <sabre@nondot.org> Allow a SourceManager to optionally be passed into Stmt::dump


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41588 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
ec055e1daa47fad09e4a430ab2926c48a35bf2c1 30-Aug-2007 Ted Kremenek <kremenek@apple.com> Added an (optional) explicit "Label" statement to CFGBlock. If a
block begins with a label or case statement, CFGBlock::getLabel() will
return the corresponding LabelStmt/CaseStmt/DefaultStmt.

LabelStmts and SwitchCases no longer appear within the "executable"
statements of a CFGBlock.

More cleanups on visualization/pretty-printing of CFGs (less verbose).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
9cffe7366ea3beb33c2d58f43a8c3a04c1873e11 30-Aug-2007 Ted Kremenek <kremenek@apple.com> Added an (optional) explicit "Label" statement to CFGBlock. If a
block begins with a label or case statement, CFGBlock::getLabel() will
return the corresponding LabelStmt/CaseStmt/DefaultStmt.

LabelStmts and SwitchCases no longer appear within the "executable"
statements of a CFGBlock.

More cleanups on visualization/pretty-printing of CFGs (less verbose).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
323524648d5d48d144ccb06c433f74b81b1e0a61 30-Aug-2007 Chris Lattner <sabre@nondot.org> cleanup context-sensitive objc keyword recognition. Patch by Fariborz Jahanian.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
34870da70fa42b0391b79627ebd0cfc6eb22213b 30-Aug-2007 Chris Lattner <sabre@nondot.org> cleanup context-sensitive objc keyword recognition. Patch by Fariborz Jahanian.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41583 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
b3bb91b8e968ca4e40567de7809306cc61a0163b 29-Aug-2007 Ted Kremenek <kremenek@apple.com> Added GraphTraits to source-level CFGs (CFG and CFGBlock) to allow
(LLVM-provided) graph algorithms such as DFS and graph visualization
to work effortless on source-level CFGs.

Further cleanup on pretty printing of CFGs. CFGBlock::dump and
CFGBlock::print now take the parent CFG as an argument. This allows
CFGBlocks to print their own appropriate label indicating whether or
not they are the Entry/Exit/IndirectGotoBlock without the CFG::print
routine doing it instead.

Added Graphviz visualization for CFGs: CFG::viewCFG. This employs the
GraphTraits just implemented.

Added "-view-cfg" mode the to clang driver. This is identical to
"-dump-cfg" except that it calls Graphviz to visualize the CFGs
instead of dumping them to the terminal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
7dba8607e59096014b7139ff20ef00870041d518 29-Aug-2007 Ted Kremenek <kremenek@apple.com> Added GraphTraits to source-level CFGs (CFG and CFGBlock) to allow
(LLVM-provided) graph algorithms such as DFS and graph visualization
to work effortless on source-level CFGs.

Further cleanup on pretty printing of CFGs. CFGBlock::dump and
CFGBlock::print now take the parent CFG as an argument. This allows
CFGBlocks to print their own appropriate label indicating whether or
not they are the Entry/Exit/IndirectGotoBlock without the CFG::print
routine doing it instead.

Added Graphviz visualization for CFGs: CFG::viewCFG. This employs the
GraphTraits just implemented.

Added "-view-cfg" mode the to clang driver. This is identical to
"-dump-cfg" except that it calls Graphviz to visualize the CFGs
instead of dumping them to the terminal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41580 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
ec761afe9c2c37e775af6ec1df24ebe96e7daf48 29-Aug-2007 Ted Kremenek <kremenek@apple.com> Added checking (during parsing) of comparison of floating point values using == or !=.
This is the same functionality gcc provides via --Wfloat-equal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
9b3d3a9f3d60eff7b7c8d383203ff348527e3874 29-Aug-2007 Ted Kremenek <kremenek@apple.com> Added checking (during parsing) of comparison of floating point values using == or !=.
This is the same functionality gcc provides via --Wfloat-equal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41574 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
bbe686be29157b575e53fbed328613117b525f26 29-Aug-2007 Chris Lattner <sabre@nondot.org> Teach Type::is[un]SignedIntegerType about enum decls. This allows the code generator
to emit signed comparisons when needed for enum decl references. This implements
test/CodeGen/enum.c. I think enums should be good now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
d5bbce4382622feb4ca5978c4bb8fcceb7aaec00 29-Aug-2007 Chris Lattner <sabre@nondot.org> Teach Type::is[un]SignedIntegerType about enum decls. This allows the code generator
to emit signed comparisons when needed for enum decl references. This implements
test/CodeGen/enum.c. I think enums should be good now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41572 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e0d976993a47507ddb565c660ed95845600cee34 29-Aug-2007 Chris Lattner <sabre@nondot.org> add some accessors



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
293c0baa7db9a338c7478a04457dc6801af5d308 29-Aug-2007 Chris Lattner <sabre@nondot.org> add some accessors



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41570 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d1ad6ae336bfad6062147f187b9973d47a3c355b 28-Aug-2007 Steve Naroff <snaroff@apple.com> Finish converting decls over to the new invalid decl API.

Also removed an old FIXME (FIXME: "auto func();" passes through...).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5912a3544e438a92832b8c52c13f48d4f54795dc 28-Aug-2007 Steve Naroff <snaroff@apple.com> Finish converting decls over to the new invalid decl API.

Also removed an old FIXME (FIXME: "auto func();" passes through...).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41555 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
0edd3a990acf17ccdde8d3e6e15caf324e302b57 28-Aug-2007 Ted Kremenek <kremenek@apple.com> Added support for indirect-gotos (GCC extension) in source-level CFGs.
This involves the construction of a specialized "dispatch" block that
all basic blocks containing indirect gotos unconditionally transfer
control-flow to. The successors of the dispatch block has as its successors
all of the blocks containing labels whose address was taken somewhere in
the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
19bb356317952445b03ee341c02f6147083c9eea 28-Aug-2007 Ted Kremenek <kremenek@apple.com> Added support for indirect-gotos (GCC extension) in source-level CFGs.
This involves the construction of a specialized "dispatch" block that
all basic blocks containing indirect gotos unconditionally transfer
control-flow to. The successors of the dispatch block has as its successors
all of the blocks containing labels whose address was taken somewhere in
the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41554 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
cae537d8b590de1e8cd0247563703188789c9c2d 28-Aug-2007 Steve Naroff <snaroff@apple.com> Move the "invalid decl" idiom up to Decl (where we have some bits to steal:-)

Converted ParmVarDecl, FileVarDecl, BlockVarDecl, and Sema::ParseIdentifierExpr() to use the idiom.

Updated array-constraint.c to make sure we no longer get "undeclared identifier" errors:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
53a3234f4bc3fd5c7e2403321bff9c907e1f2de6 28-Aug-2007 Steve Naroff <snaroff@apple.com> Move the "invalid decl" idiom up to Decl (where we have some bits to steal:-)

Converted ParmVarDecl, FileVarDecl, BlockVarDecl, and Sema::ParseIdentifierExpr() to use the idiom.

Updated array-constraint.c to make sure we no longer get "undeclared identifier" errors:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41552 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
f420df1c16b610f6741168d5ac5dbb8b677c7311 28-Aug-2007 Chris Lattner <sabre@nondot.org> add a sourcelocation to binary operator to keep track of the location of the operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
17d1b2ac9f8371a0a2e79d4f8e0008658164f080 28-Aug-2007 Chris Lattner <sabre@nondot.org> add a sourcelocation to binary operator to keep track of the location of the operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41550 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
90a018d9bb3d506fb9c240135fd76f4d4fccac05 28-Aug-2007 Chris Lattner <sabre@nondot.org> Change EnumDecl to store its corresponding integer type
directly in it. Remove TargetInfo::getEnumPolicy, as there is only
one policy that we support right now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/TargetInfo.h
e00b18cfc3967a0349745055b49d0f3196d28f75 28-Aug-2007 Chris Lattner <sabre@nondot.org> Change EnumDecl to store its corresponding integer type
directly in it. Remove TargetInfo::getEnumPolicy, as there is only
one policy that we support right now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41548 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Decl.h
lang/Basic/TargetInfo.h
47958f63a455276b136ccafc49135599fd98739d 28-Aug-2007 Chris Lattner <sabre@nondot.org> extwarn about VLAs in C89 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
94f81fd0b0f81a99d215b225c8c5616295b063f6 28-Aug-2007 Chris Lattner <sabre@nondot.org> extwarn about VLAs in C89 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41545 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
11f20f9abaeeb895ce09ddc9bd1dd5f63ecb2ba0 28-Aug-2007 Chris Lattner <sabre@nondot.org> warn about long long when in c89 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b23deda7333cfc2316c989d10745c145dfbea6d6 28-Aug-2007 Chris Lattner <sabre@nondot.org> warn about long long when in c89 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41543 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c02f4a9efaf8d81291d284d2e66defeaf2041450 28-Aug-2007 Steve Naroff <snaroff@apple.com> Tweak declaration...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4e6526b2de501f2bbc261fd8017c92c75bd8d8f7 28-Aug-2007 Steve Naroff <snaroff@apple.com> Tweak declaration...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41542 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
206754a1aacecbaf10a86a2a4025acfe956d6d6e 28-Aug-2007 Chris Lattner <sabre@nondot.org> compute the required destination type for an enum, emitting various warnings.

TODO: update the types of the constants and the enum.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TargetInfo.h
ac60968d4541aa4e80fa71f64c36adfe5aa586e4 28-Aug-2007 Chris Lattner <sabre@nondot.org> compute the required destination type for an enum, emitting various warnings.

TODO: update the types of the constants and the enum.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41532 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TargetInfo.h
2b8d885f5b49ff8714ebde12073f558e3376e317 28-Aug-2007 Chris Lattner <sabre@nondot.org> remove dead method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
050785860b8541c837982beef3f06d292d1d0c1d 28-Aug-2007 Chris Lattner <sabre@nondot.org> remove dead method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41531 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
cb33ae1fe495b75343024a60f9be8930a56336bc 28-Aug-2007 Chris Lattner <sabre@nondot.org> add a diagnostic:

t.c:1:12: warning: ISO C restricts enumerator values to range of 'int' (180388626432 is too large)
enum e {A, B = 42LL << 32, C = -4, D = 12456 };
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
211a30e92837fb32199d0c2700246b0c7cba5543 28-Aug-2007 Chris Lattner <sabre@nondot.org> add a diagnostic:

t.c:1:12: warning: ISO C restricts enumerator values to range of 'int' (180388626432 is too large)
enum e {A, B = 42LL << 32, C = -4, D = 12456 };
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41530 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
06611052eb69e018bf26ad0af90e3b5b2355a92d 28-Aug-2007 Chris Lattner <sabre@nondot.org> now that all the infrastructure is in place, enforce C99 6.8.5p3.

Note the FIXME: we need some way to mark a decl erroneous :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ae3b701f59e78e058b83344be17206af3bf5d277 28-Aug-2007 Chris Lattner <sabre@nondot.org> now that all the infrastructure is in place, enforce C99 6.8.5p3.

Note the FIXME: we need some way to mark a decl erroneous :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41524 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
91b03f7ab33aa738411a4aab073d4965726b642e 28-Aug-2007 Steve Naroff <snaroff@apple.com> Implement more thoughful error recovery when dealing with bogus declarator types.

For example, the following code was resulting in spurious warnings. This was the result of
Sema::GetTypeForDeclarator() synthesizing a type to hand back to the caller (in this case,
"int []", instead of "struct s[]", which is invalid).

struct s;
struct s* t (struct s z[]) { // expected-error {{array has incomplete element type}}
return z;
}

Strategy: Flag the error in Declarator/DeclaratorChunk. This info is later stored in
the ParmVarDecl. If the decl is referenced, Sema::ParseIdentifierExpr() will check if
the type is invalid. If so, it quietly returns "true", without instantiating a DeclRefExpr.

This seems to work nicely. If Chris is happy with the approach, I will generalize this to
all VarDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/DeclSpec.h
e1223f7246c2c297f7b62816fd8c6a0a14151977 28-Aug-2007 Steve Naroff <snaroff@apple.com> Implement more thoughful error recovery when dealing with bogus declarator types.

For example, the following code was resulting in spurious warnings. This was the result of
Sema::GetTypeForDeclarator() synthesizing a type to hand back to the caller (in this case,
"int []", instead of "struct s[]", which is invalid).

struct s;
struct s* t (struct s z[]) { // expected-error {{array has incomplete element type}}
return z;
}

Strategy: Flag the error in Declarator/DeclaratorChunk. This info is later stored in
the ParmVarDecl. If the decl is referenced, Sema::ParseIdentifierExpr() will check if
the type is invalid. If so, it quietly returns "true", without instantiating a DeclRefExpr.

This seems to work nicely. If Chris is happy with the approach, I will generalize this to
all VarDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41521 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
lang/Parse/DeclSpec.h
2cda879f409a0a529b4608d88759619c859fac55 27-Aug-2007 Chris Lattner <sabre@nondot.org> Fix a few enum-related fixme's



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
421a23d405a28920fb4d6dd83b0f825fd7808c88 27-Aug-2007 Chris Lattner <sabre@nondot.org> Fix a few enum-related fixme's



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41513 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6f1231830505f26b31dcb52c1e4e2b9fef648441 27-Aug-2007 Chris Lattner <sabre@nondot.org> constify some stuff



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fb071532de6ebd5685de34d65a5440604ee570bb 27-Aug-2007 Chris Lattner <sabre@nondot.org> constify some stuff



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41503 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
eb56d2997a2f6751afa78a2f6cefc5cbda1c1ad2 27-Aug-2007 Chris Lattner <sabre@nondot.org> implement sizeof(enum x), patch inspired by Keith Bauer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
6cd862c631eb4fc10755c146bbeaea37c330e815 27-Aug-2007 Chris Lattner <sabre@nondot.org> implement sizeof(enum x), patch inspired by Keith Bauer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41500 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
86630055ef3c9c06e51bfd1dc2224efc1b53d9e6 27-Aug-2007 Chris Lattner <sabre@nondot.org> add some accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5ae962da4dc277f1819a00361d4dcd49dc66bd89 27-Aug-2007 Chris Lattner <sabre@nondot.org> add some accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41496 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
277f23c26b6f8facce4a28952eacc37123fcb516 27-Aug-2007 Chris Lattner <sabre@nondot.org> Add enum type conversion policies, patch by Keith Bauer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
6569ce02671c7b33995e7ff0ee8387020fca2459 27-Aug-2007 Chris Lattner <sabre@nondot.org> Add enum type conversion policies, patch by Keith Bauer


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41495 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
45fc9823e1978b227826409ffa8d54e7e0facf1f 27-Aug-2007 Steve Naroff <snaroff@apple.com> Replaced ASTContext::maxFloatingType() with ASTContext::compareFloatingType().

Changed Sema::UsualArithmeticConversions to use the new API.

This fixes the following case...

_Complex double X;
double y;

void foo() {
X = X + y;
}

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -parse-ast-dump
Read top-level variable decl: 'X'
Read top-level variable decl: 'y'

void foo()
(CompoundStmt 0x2605cc0
(BinaryOperator 0x2605ca0 '_Complex double' '='
(DeclRefExpr 0x2605c10 '_Complex double' Decl='X' 0x2605ab0)
(BinaryOperator 0x2605c80 '_Complex double' '+'
(DeclRefExpr 0x2605c30 '_Complex double' Decl='X' 0x2605ab0)
(ImplicitCastExpr 0x2605c70 '_Complex double'
(DeclRefExpr 0x2605c50 'double' Decl='y' 0x2605ae0)))))



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
fb0d49669aa370b4c0993c5cee60275ef9fd6518 27-Aug-2007 Steve Naroff <snaroff@apple.com> Replaced ASTContext::maxFloatingType() with ASTContext::compareFloatingType().

Changed Sema::UsualArithmeticConversions to use the new API.

This fixes the following case...

_Complex double X;
double y;

void foo() {
X = X + y;
}

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -parse-ast-dump
Read top-level variable decl: 'X'
Read top-level variable decl: 'y'

void foo()
(CompoundStmt 0x2605cc0
(BinaryOperator 0x2605ca0 '_Complex double' '='
(DeclRefExpr 0x2605c10 '_Complex double' Decl='X' 0x2605ab0)
(BinaryOperator 0x2605c80 '_Complex double' '+'
(DeclRefExpr 0x2605c30 '_Complex double' Decl='X' 0x2605ab0)
(ImplicitCastExpr 0x2605c70 '_Complex double'
(DeclRefExpr 0x2605c50 'double' Decl='y' 0x2605ae0)))))



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41483 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3ea3b66260920973fbd4cda53c6049b2880fc326 27-Aug-2007 Chris Lattner <sabre@nondot.org> extwarn about decls intermixed with code in c89 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c30ebfbf23d6a471146e3c68c2cf7f170b7e55dc 27-Aug-2007 Chris Lattner <sabre@nondot.org> extwarn about decls intermixed with code in c89 mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41477 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
c33c060e2f4e7c7e89e3b809f52cfc6d55ea9838 27-Aug-2007 Steve Naroff <snaroff@apple.com> Add Type::getAsBuiltinType() and Type::builtinTypesAreCompatible().
Modified Type::typesAreCompatible() to use the above.

This fixes the following bug submitted by Keith Bauer (thanks!).

int equal(char *a, const char *b)
{
return a == b;
}

Also tweaked Sema::CheckCompareOperands() to ignore the qualifiers when
comparing two pointer types (though it doesn't relate directly to this bug).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
77878cc5aa6ad01fc0c91bac1a61819dbf3bf691 27-Aug-2007 Steve Naroff <snaroff@apple.com> Add Type::getAsBuiltinType() and Type::builtinTypesAreCompatible().
Modified Type::typesAreCompatible() to use the above.

This fixes the following bug submitted by Keith Bauer (thanks!).

int equal(char *a, const char *b)
{
return a == b;
}

Also tweaked Sema::CheckCompareOperands() to ignore the qualifiers when
comparing two pointer types (though it doesn't relate directly to this bug).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41476 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fa0c453f572da6441d5a5997025bf0301d471b3b 27-Aug-2007 Steve Naroff <snaroff@apple.com> Tweak a comment and assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
716c7304ff5d27a95e1e7823acd1d09d5ec3e37f 27-Aug-2007 Steve Naroff <snaroff@apple.com> Tweak a comment and assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
3cf497f1272a7f6ca5066af13db1a7adbba81a7a 27-Aug-2007 Steve Naroff <snaroff@apple.com> Replaced ASTContext::maxComplexType() with ASTContext::getFloatingTypeOfSizeWithinDomain().

Changed Sema::UsualArithmeticConversions to correctly implement complex/float conversions,
using maxFloatingType() with getFloatingTypeOfSizeWithinDomain().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
f1448a0e4a1e868ff873a8530a61a09cb68666cc 27-Aug-2007 Steve Naroff <snaroff@apple.com> Replaced ASTContext::maxComplexType() with ASTContext::getFloatingTypeOfSizeWithinDomain().

Changed Sema::UsualArithmeticConversions to correctly implement complex/float conversions,
using maxFloatingType() with getFloatingTypeOfSizeWithinDomain().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41474 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
4716005144b12ee54ece88667eaacfecafdd03ab 27-Aug-2007 Chris Lattner <sabre@nondot.org> If a visitor doesn't define VisitBinMulAssign, fallback to VisitCompoundAssignOperator
instead of VisitBinaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
61919a125a9422002588a7b59e9d1df70089ee17 27-Aug-2007 Chris Lattner <sabre@nondot.org> If a visitor doesn't define VisitBinMulAssign, fallback to VisitCompoundAssignOperator
instead of VisitBinaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41462 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
26d8315f8ded4b34bd43990998f18f4cf91c4020 26-Aug-2007 Chris Lattner <sabre@nondot.org> dispatch to functions like VisitBinRemAssign with knowledge that
the operand is of type CompoundAssignOperator, not just BinaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
402f72f83f433a4b45bcad0c35f4d9f692b6a0fd 26-Aug-2007 Chris Lattner <sabre@nondot.org> dispatch to functions like VisitBinRemAssign with knowledge that
the operand is of type CompoundAssignOperator, not just BinaryOperator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
a75499065c9f9260dbca98ed3bdbe6148a45af2b 26-Aug-2007 Chris Lattner <sabre@nondot.org> Break the assumption that any sort of scope (e.g. a loop scope) can
hold declarations. Instead, introduce a new "DeclScope" scope type that
holds them explicitly. For now, all scopes have this bit, but in the
future we can use them to fix some issues Neil noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
31e057270232c1c37602579cb6461c2704175672 26-Aug-2007 Chris Lattner <sabre@nondot.org> Break the assumption that any sort of scope (e.g. a loop scope) can
hold declarations. Instead, introduce a new "DeclScope" scope type that
holds them explicitly. For now, all scopes have this bit, but in the
future we can use them to fix some issues Neil noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41431 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
5f5cd4eb3711826e4cbdca5eb40ed43f99425f65 26-Aug-2007 Chris Lattner <sabre@nondot.org> remove some dead enum values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
a7c98959345da4cbfa4988b1806e111c40d4f335 26-Aug-2007 Chris Lattner <sabre@nondot.org> remove some dead enum values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41430 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Scope.h
a16e42d4deeb897d854d1a62c525e8f9842b9fc6 26-Aug-2007 Chris Lattner <sabre@nondot.org> require that operands to __real/__imag are complex or arithmetic. This
fixes GCC PR33193




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
cc26ed7dfc54b39f4b7ad1778c3fff93fc63c0d0 26-Aug-2007 Chris Lattner <sabre@nondot.org> require that operands to __real/__imag are complex or arithmetic. This
fixes GCC PR33193




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41428 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
0b80eee9df670f090d4679aba84f4b6cc5aae87b 26-Aug-2007 Neil Booth <neil@daikokuya.co.uk> Make some diags EXTENSION so they are errors with pedantic errors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
48a80946f5632bf7287984e3f7b515a336d43acd 26-Aug-2007 Neil Booth <neil@daikokuya.co.uk> Make some diags EXTENSION so they are errors with pedantic errors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41422 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
42deafb3a1fb04cab328b4400b90392746fb66f2 26-Aug-2007 Chris Lattner <sabre@nondot.org> Why didn't gcc catch this? :(


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
d3f6ca6942169131ce55dac18366d80f0393ed4f 26-Aug-2007 Chris Lattner <sabre@nondot.org> Why didn't gcc catch this? :(


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41420 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c7ac5ed8019764850639ece242b43bd8bdd5304e 26-Aug-2007 Chris Lattner <sabre@nondot.org> fix a bug introduced by the recent childification of ForStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
af458c9f658335bdea482395ff4a25c75935e129 26-Aug-2007 Chris Lattner <sabre@nondot.org> fix a bug introduced by the recent childification of ForStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41417 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
987058afafa52e7cca35fd27100a385b7be53b8c 26-Aug-2007 Chris Lattner <sabre@nondot.org> Make parse-ast-print print the storage class and inline
specifier of functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
70c8b2eccc9f1739a85cea9c4776b6b4c130071c 26-Aug-2007 Chris Lattner <sabre@nondot.org> Make parse-ast-print print the storage class and inline
specifier of functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41416 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
1de66eb40361fa106b7cbe7f7095d9392ebb24ae 26-Aug-2007 Chris Lattner <sabre@nondot.org> add a new ImaginaryLiteral AST node that is used to
represent imaginary literals:

float _Complex A;
void foo() {
A = 1.0iF;
}

generates:

(BinaryOperator 0x2305ec0 '_Complex float' '='
(DeclRefExpr 0x2305e60 '_Complex float' Decl='A' 0x2305cf0)
(ImaginaryLiteral 0x2305f40 '_Complex float'
(FloatingLiteral 0x2305ea0 'float' 1.000000))))



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
5d66145eed1c319df5a69977cb8ff74f597ea544 26-Aug-2007 Chris Lattner <sabre@nondot.org> add a new ImaginaryLiteral AST node that is used to
represent imaginary literals:

float _Complex A;
void foo() {
A = 1.0iF;
}

generates:

(BinaryOperator 0x2305ec0 '_Complex float' '='
(DeclRefExpr 0x2305e60 '_Complex float' Decl='A' 0x2305cf0)
(ImaginaryLiteral 0x2305f40 '_Complex float'
(FloatingLiteral 0x2305ea0 'float' 1.000000))))



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41413 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
c04a0bd24f09ffaf61850d6f4032a5165a9a6bcf 26-Aug-2007 Chris Lattner <sabre@nondot.org> 1.0 is double, 1.0F is a float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
6e400c286b485e28d04a742ea87860ddfefa672e 26-Aug-2007 Chris Lattner <sabre@nondot.org> 1.0 is double, 1.0F is a float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41412 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
ae71e4845f921f96a8def22c73ab00e755b3bc97 26-Aug-2007 Chris Lattner <sabre@nondot.org> 1) refactor some code.
2) Add support for lexing imaginary constants (a GCC extension):

t.c:5:10: warning: imaginary constants are an extension
A = 1.0iF;
^

3) Make the 'invalid suffix' diagnostic pointer more accurate:

t.c:6:10: error: invalid suffix 'qF' on floating constant
A = 1.0qF;
^

instead of:

t.c:6:10: error: invalid suffix 'qF' on floating constant
A = 1.0qF;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/LiteralSupport.h
506b8dec4ed3db3c60bf9e0dd37901f0cf3d6749 26-Aug-2007 Chris Lattner <sabre@nondot.org> 1) refactor some code.
2) Add support for lexing imaginary constants (a GCC extension):

t.c:5:10: warning: imaginary constants are an extension
A = 1.0iF;
^

3) Make the 'invalid suffix' diagnostic pointer more accurate:

t.c:6:10: error: invalid suffix 'qF' on floating constant
A = 1.0qF;
^

instead of:

t.c:6:10: error: invalid suffix 'qF' on floating constant
A = 1.0qF;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41411 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Lex/LiteralSupport.h
ac5d4f13e3dd13d6e26cd8e4cbf41ec4623561ef 25-Aug-2007 Steve Naroff <snaroff@apple.com> Give CXXBoolLiteralExpr a type (all expressions need a valid type).

This fixes the following:

******************** TEST 'Parser/cxx-bool.cpp' FAILED! ********************
Command:
clang -fsyntax-only Parser/cxx-bool.cpp
Output:
SemaExpr.cpp:731: failed assertion `!t.isNull() && "DefaultFunctionArrayConversion - missing type"'
Output/cxx-bool.cpp.out.script: line 1: 22697 Abort trap clang -fsyntax-only Parser/cxx-bool.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
210679cacc47640107e46090de1a138977a0431e 25-Aug-2007 Steve Naroff <snaroff@apple.com> Give CXXBoolLiteralExpr a type (all expressions need a valid type).

This fixes the following:

******************** TEST 'Parser/cxx-bool.cpp' FAILED! ********************
Command:
clang -fsyntax-only Parser/cxx-bool.cpp
Output:
SemaExpr.cpp:731: failed assertion `!t.isNull() && "DefaultFunctionArrayConversion - missing type"'
Output/cxx-bool.cpp.out.script: line 1: 22697 Abort trap clang -fsyntax-only Parser/cxx-bool.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41401 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
f7b2e5527ff496c5011340aca2c789796bfd140d 25-Aug-2007 Chris Lattner <sabre@nondot.org> refactor enough of the top-level parsing logic to parse and
ignore 'namespace foo {}'



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
8f08cb7d0b97786b17ef05e05caa55aad4d6bd39 25-Aug-2007 Chris Lattner <sabre@nondot.org> refactor enough of the top-level parsing logic to parse and
ignore 'namespace foo {}'



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41400 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
06078d28fdbd047463840f78986c3193e14007af 25-Aug-2007 Chris Lattner <sabre@nondot.org> Split the ASTNode out for compound assignments out from binary operators. Now
they show up in dumps etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
eb14fe839ec24c2ca14e5f094be147a34e3d3339 25-Aug-2007 Chris Lattner <sabre@nondot.org> Split the ASTNode out for compound assignments out from binary operators. Now
they show up in dumps etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41393 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
d10426a074d37ef9ff0bf20b9fee807ee906c79d 25-Aug-2007 Chris Lattner <sabre@nondot.org> Fix clang -parse-ast-dump carbon.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
94f67810bcbdff4cef9177f7727caf91f3e1efa1 25-Aug-2007 Chris Lattner <sabre@nondot.org> Fix clang -parse-ast-dump carbon.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41391 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
03931a70695381cc41ae6f19ddc880d0b2d33cae 24-Aug-2007 Chris Lattner <sabre@nondot.org> Implement sema support for __real/__imag nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dbb36971c68ea944ac4b1fbe2d97fe7cca3b20ac 24-Aug-2007 Chris Lattner <sabre@nondot.org> Implement sema support for __real/__imag nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41375 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
51be056a9c4fbb98da0a457eb4b52f34d76ba9e8 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Added child_begin/child_end to all subclasses of Stmt in Stmt.h. All
concrete subclasses of Stmt are now required to implement
child_begin/child_end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8297777fbe19c4d39e8a70c55346474868055fa1 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Added child_begin/child_end to all subclasses of Stmt in Stmt.h. All
concrete subclasses of Stmt are now required to implement
child_begin/child_end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41374 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
3cb01e268be3307b41932fa118e2c88babbfb551 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Implemented child_begin/child_end for our current set of C++ expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
c10d33c01478f2444b2b87aefa090493f028d2d5 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Implemented child_begin/child_end for our current set of C++ expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41368 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
9fdc8a9aba187772c470e52314fce5d1c5b42647 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Finished adding child_begin/child_end to all subclasses of Stmt in Expr.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1237c673c07f9d827129ba02720108816abde562 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Finished adding child_begin/child_end to all subclasses of Stmt in Expr.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41366 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
8f708368adf41c6b1ee0e028b574232d609f4e8b 24-Aug-2007 Steve Naroff <snaroff@apple.com> Surpress ImplicitCastExprs for compound assignment expressions. For compound assignments,
it is o.k. for the LHS and RHS to have different types. Converting the type can cause
errors like the one Chris noticed (below).

This change required a fair number of diffs (since there is a lot of shared code
between single and compound assignments). This makes the API's look a bit uglier,
however I couldn't think of a better way to do it (without duplicating code).

Fix the following (incorrect) error:

int A;
long long B;

void foo() {
A /= B;
}

$ clang ~/scalar.c -emit-llvm
/Users/sabre/scalar.c:6:5: error: expression is not assignable
A /= B;
~ ^

Now it works properly...

[dylan:~/llvm/tools/clang] admin% cat compound.c
int A;
long long B;

void foo() {
A /= B;
}
[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang compound.c -parse-ast-dump
Read top-level variable decl: 'A'
Read top-level variable decl: 'B'

void foo()
(CompoundStmt 0x2605c40
(BinaryOperator 0x2605c20 'int' '/=' ComputeTy='long long'
(DeclRefExpr 0x2605be0 'int' Decl='A' 0x2605a80)
(DeclRefExpr 0x2605c00 'long long' Decl='B' 0x2605ab0)))




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
9f5fa9bfc37c3e15895cd777e42f3dd8a7ec7a9d 24-Aug-2007 Steve Naroff <snaroff@apple.com> Surpress ImplicitCastExprs for compound assignment expressions. For compound assignments,
it is o.k. for the LHS and RHS to have different types. Converting the type can cause
errors like the one Chris noticed (below).

This change required a fair number of diffs (since there is a lot of shared code
between single and compound assignments). This makes the API's look a bit uglier,
however I couldn't think of a better way to do it (without duplicating code).

Fix the following (incorrect) error:

int A;
long long B;

void foo() {
A /= B;
}

$ clang ~/scalar.c -emit-llvm
/Users/sabre/scalar.c:6:5: error: expression is not assignable
A /= B;
~ ^

Now it works properly...

[dylan:~/llvm/tools/clang] admin% cat compound.c
int A;
long long B;

void foo() {
A /= B;
}
[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang compound.c -parse-ast-dump
Read top-level variable decl: 'A'
Read top-level variable decl: 'B'

void foo()
(CompoundStmt 0x2605c40
(BinaryOperator 0x2605c20 'int' '/=' ComputeTy='long long'
(DeclRefExpr 0x2605be0 'int' Decl='A' 0x2605a80)
(DeclRefExpr 0x2605c00 'long long' Decl='B' 0x2605ab0)))




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41364 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtNodes.def
e4acb9c47c9ab4d2e9d5cff04735dcbd59ac84c0 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Began implementing "child iterator" interface for Stmts and Exprs. Each
subclass of Stmt will implement child_begin() and child_end(), which will
be used to iterate over all the children (subexpressions/substatements) of
a Stmt object. This will provide for easy traversal over the AST, which
is useful for a variety of purposes.

None of the interfaces to subclasses of Stmt will be changed (other than
adding the child_begin and child_end methods).

The only caveat is that the implementation of subclasses of Stmt will require
colocating all substatements (subexpressions) in an array. This is because
we define child_iterator as Stmt**. All accessor methods to subexpressions
will need to be altered to reflect this new implementation.

This patch includes the typedefs for child_iterator, as well the implementation
for child_begin/child_end for the primary expressions and some postfix
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
77ed8e4edf6ed78c53fb20ec3210aff2a59c9d87 24-Aug-2007 Ted Kremenek <kremenek@apple.com> Began implementing "child iterator" interface for Stmts and Exprs. Each
subclass of Stmt will implement child_begin() and child_end(), which will
be used to iterate over all the children (subexpressions/substatements) of
a Stmt object. This will provide for easy traversal over the AST, which
is useful for a variety of purposes.

None of the interfaces to subclasses of Stmt will be changed (other than
adding the child_begin and child_end methods).

The only caveat is that the implementation of subclasses of Stmt will require
colocating all substatements (subexpressions) in an array. This is because
we define child_iterator as Stmt**. All accessor methods to subexpressions
will need to be altered to reflect this new implementation.

This patch includes the typedefs for child_iterator, as well the implementation
for child_begin/child_end for the primary expressions and some postfix
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41363 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
d30e19361364e68f2cbce0ee657edf9dc06c5788 24-Aug-2007 Steve Naroff <snaroff@apple.com> Make sure we get extension diagnostics for GCC's complex extensions.

Now we emit the following when -pedantic-errors is enabled...

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -pedantic-errors
complex.c:4:3: error: ISO C does not support '++'/'--' on complex integer types
++x;
^ ~
complex.c:9:7: error: ISO C does not support '~' for complex conjugation
X = ~Y;
^
complex.c:10:7: error: ISO C does not support '~' for complex conjugation
x = ~y;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
084f9ed404a4cb266a2b5343b7bfb8393cf4aeea 24-Aug-2007 Steve Naroff <snaroff@apple.com> Make sure we get extension diagnostics for GCC's complex extensions.

Now we emit the following when -pedantic-errors is enabled...

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang complex.c -pedantic-errors
complex.c:4:3: error: ISO C does not support '++'/'--' on complex integer types
++x;
^ ~
complex.c:9:7: error: ISO C does not support '~' for complex conjugation
X = ~Y;
^
complex.c:10:7: error: ISO C does not support '~' for complex conjugation
x = ~y;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41362 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
87c329f3b3134925198049ebc4f6fb587d289e85 23-Aug-2007 Steve Naroff <snaroff@apple.com> Add helper functions Token::isObjCAtKeyword() and Token::getObjCKeywordID().

Convert all clients to the new cleaner, more robust API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
861cf3effdc0fbc97d401539bc3050da76b2476f 23-Aug-2007 Steve Naroff <snaroff@apple.com> Add helper functions Token::isObjCAtKeyword() and Token::getObjCKeywordID().

Convert all clients to the new cleaner, more robust API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41330 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Token.h
320956f9547c896722ce891d4b9ab2a84d10cc32 23-Aug-2007 Ted Kremenek <kremenek@apple.com> Refactored "getSubStmt" and "SubStmt" from the CaseStmt and DefaultStmt
class to their common parent class SwitchCase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
edcc752060be38bfa7e7b32691c0cc4d843622a8 23-Aug-2007 Ted Kremenek <kremenek@apple.com> Refactored "getSubStmt" and "SubStmt" from the CaseStmt and DefaultStmt
class to their common parent class SwitchCase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41329 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
7443e0f09990abd8b9d73eb56b5c476e98ae452b 23-Aug-2007 Chris Lattner <sabre@nondot.org> detect and diagnose empty case ranges:

switch.c:16:8: warning: empty case range specified
case 100 ... 99: ; // expected-warning {{empty case range}}
^~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
6efc4d3659632ddcea4a58cb62e9ee54ca4a373e 23-Aug-2007 Chris Lattner <sabre@nondot.org> detect and diagnose empty case ranges:

switch.c:16:8: warning: empty case range specified
case 100 ... 99: ; // expected-warning {{empty case range}}
^~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41328 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ff2a8c57663f8976360916f3cea8ea6601efa7a3 23-Aug-2007 Ted Kremenek <kremenek@apple.com> Modified CFG to have explicit "Exit" pointer for exit block. This should
have been committed with my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
504927ac167053f3b5c2ae38c7ee3fa55bbf3a6c 23-Aug-2007 Ted Kremenek <kremenek@apple.com> Modified CFG to have explicit "Exit" pointer for exit block. This should
have been committed with my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41324 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
2996b4e62611f25f5c388bb7d9a36c547d865f7d 23-Aug-2007 Anders Carlsson <andersca@mac.com> Parse ObjC @protocol expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
29b2cb1ff1a3dd78edd38e2f43ee7041d3e4ec3c 23-Aug-2007 Anders Carlsson <andersca@mac.com> Parse ObjC @protocol expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41320 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
1a4066d4b8df0cc7383434a0772b665a0a6c6aa0 23-Aug-2007 Chris Lattner <sabre@nondot.org> report duplicate case values. TODO: report duplicate/overlapping ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
b2ec9d6fede9cccc170a202de7bf7f523dea8be4 23-Aug-2007 Chris Lattner <sabre@nondot.org> report duplicate case values. TODO: report duplicate/overlapping ranges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41315 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
3429a81b729428df85333bf49a4b758f0ccad65f 23-Aug-2007 Chris Lattner <sabre@nondot.org> start checking case values of switch stmts more closely. Emit overflow
warnings when converting case values to the expression type.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f4021e7d5228a2be5a380269dffa0331a6c78b95 23-Aug-2007 Chris Lattner <sabre@nondot.org> start checking case values of switch stmts more closely. Emit overflow
warnings when converting case values to the expression type.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41313 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a8ee2260ef407e1e23d8e8c183b0dfe0d65a5411 23-Aug-2007 Steve Naroff <snaroff@apple.com> With this commit, we now successfully parse "Cocoa.h"!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4fa7afd07421e7276d1717e4fdf43a5fdd65a622 23-Aug-2007 Steve Naroff <snaroff@apple.com> With this commit, we now successfully parse "Cocoa.h"!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41303 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
228ed36c06e55b9dcb8ce8cbeffd5faf0b3c9a9f 23-Aug-2007 Steve Naroff <snaroff@apple.com> Fix a misleading comment...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
a5e7df5cc9f486495c55e7dc754dc9efd9bfcf7d 23-Aug-2007 Steve Naroff <snaroff@apple.com> Fix a misleading comment...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41301 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
72f17fbab5fc87f7b68f44656b2e0f025ba5bc6a 23-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for parsing protocols.

Now we can parse quite a bit of "Foundation.h" (a couple bugs remain).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
7ef58fdbefddf693910e6403a71b3d367444c897 23-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for parsing protocols.

Now we can parse quite a bit of "Foundation.h" (a couple bugs remain).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41300 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
2e41cb30170a23478ee199c5ce8484f697c17370 22-Aug-2007 Ted Kremenek <kremenek@apple.com> Added explicit pointer within class CFG to the Entry block.
Before we assumed that the first block in the list of blocks was the entry
block, but this has posed hurdles during CFG construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
fa2be43dbd6fdc4414e261db69aaf35dfb21a416 22-Aug-2007 Ted Kremenek <kremenek@apple.com> Added explicit pointer within class CFG to the Entry block.
Before we assumed that the first block in the list of blocks was the entry
block, but this has posed hurdles during CFG construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41293 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
0bbffd8ed31055dc64532712c552f871e38d1d93 22-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for parsing method prototypes (and other stuff required by @interface).

Still need to finish Parser::ParseObjCMethodDecl(). Before I do, I need to do a minor
refactoring of ParseDeclarationOrFunctionDefinition(), to disallow function definitions.
At the moment, @inteface allows function defs (which is incorrect).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
294494e1cce92043562b4680c613df7fd028c02e 22-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for parsing method prototypes (and other stuff required by @interface).

Still need to finish Parser::ParseObjCMethodDecl(). Before I do, I need to do a minor
refactoring of ParseDeclarationOrFunctionDefinition(), to disallow function definitions.
At the moment, @inteface allows function defs (which is incorrect).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41275 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
8be1d4083346393791752ecec48c99e499bd252a 22-Aug-2007 Anders Carlsson <andersca@mac.com> Parse @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
f9bcf01f82dfd2688f81e57bcc6300c9b13c51a6 22-Aug-2007 Anders Carlsson <andersca@mac.com> Parse @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41273 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
c5de2228fbca2371924a413536ad11050edc98ad 22-Aug-2007 Ted Kremenek <kremenek@apple.com> Added CFG support for gotos and labels.

Modified CFG so that getEntry(), getExit(), front() and back() return
CFGBlock& instead of CFGBlock*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
0cebe3e29b22d11f2c65ef28fcfb5f0431877266 22-Aug-2007 Ted Kremenek <kremenek@apple.com> Added CFG support for gotos and labels.

Modified CFG so that getEntry(), getExit(), front() and back() return
CFGBlock& instead of CFGBlock*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41258 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
97f7531cdce6c2e875aaae42195d1724053e9f04 21-Aug-2007 Ted Kremenek <kremenek@apple.com> Added CFG infrastructure (CFG.cpp and CFG.h) for clang ASTs.

Added builder code to translate ASTs to CFGs. This currently supports
if, return, and non-control flow statements.

Added pretty-printer to debug CFGs.

Added a "-dump-cfg" option to the clang driver to dump CFGs for code
sent through the frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
fddd51853f8ccaa1df2476376e6fd74d2f315c73 21-Aug-2007 Ted Kremenek <kremenek@apple.com> Added CFG infrastructure (CFG.cpp and CFG.h) for clang ASTs.

Added builder code to translate ASTs to CFGs. This currently supports
if, return, and non-control flow statements.

Added pretty-printer to debug CFGs.

Added a "-dump-cfg" option to the clang driver to dump CFGs for code
sent through the frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41252 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/CFG.h
c4474990a3f90e61f55d8fa3e022fa1cf2fe9fcb 21-Aug-2007 Steve Naroff <snaroff@apple.com> Implement parsing for objc instance variables.

Next step, method...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
ddbff78fb719a645b04bd27099fa6ec8c4693b3c 21-Aug-2007 Steve Naroff <snaroff@apple.com> Implement parsing for objc instance variables.

Next step, method...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41251 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/TokenKinds.def
lang/Parse/Parser.h
26116566c7e9a4d286c65fd2c0b81765a9ce0b21 21-Aug-2007 Ted Kremenek <kremenek@apple.com> Added reverse iterators for the body of CompountStmt. These are useful for
CFG construction (among other potential uses).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
4ce854736dd196e2304f554ebeac8b43c89cf9e2 21-Aug-2007 Ted Kremenek <kremenek@apple.com> Added reverse iterators for the body of CompountStmt. These are useful for
CFG construction (among other potential uses).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41248 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
94ac052f0a7c16f1265d1e39158be86129991837 21-Aug-2007 Chris Lattner <sabre@nondot.org> add unary operator support to the stmtvisitor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
13d130c3d225cdb5b1e6d9e86cea12eea718c707 21-Aug-2007 Chris Lattner <sabre@nondot.org> add unary operator support to the stmtvisitor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41242 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
a66cad4cbdef80f34d163983e1d7a79c4cfc5c19 21-Aug-2007 Anders Carlsson <andersca@mac.com> Implement parsing and code generation of Objective-C string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
5508518a2702b00be3b15a26d772bde968972f54 21-Aug-2007 Anders Carlsson <andersca@mac.com> Implement parsing and code generation of Objective-C string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41238 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Parser.h
7a85fa1ba94c9f4cf960463dd3eb444ef6f89446 21-Aug-2007 Chris Lattner <sabre@nondot.org> add getAsComplexType() for consistency


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c6fb90a7246c2d5d3233e70107bf9d8c7c9e535b 21-Aug-2007 Chris Lattner <sabre@nondot.org> add getAsComplexType() for consistency


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41229 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fb3befa4a5029542a98b14395c714637e988759a 21-Aug-2007 Chris Lattner <sabre@nondot.org> Add the comparisons and logical binops to the visitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
2d5049fcbb4cb9b67086de32b806fffd9f856e30 21-Aug-2007 Chris Lattner <sabre@nondot.org> Add the comparisons and logical binops to the visitor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41227 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
76cb1893629e72f4781b3c308aa8fd554be39d58 21-Aug-2007 Chris Lattner <sabre@nondot.org> Add the ability to visit binary operators without having to
match on binop then explicitly switching again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
03d6fb99224c36935c9af9f4785cb33453c99b2b 21-Aug-2007 Chris Lattner <sabre@nondot.org> Add the ability to visit binary operators without having to
match on binop then explicitly switching again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41214 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtVisitor.h
66ef2b998a19aadfa01bfec702a8263a81feac84 21-Aug-2007 Chris Lattner <sabre@nondot.org> Now that the visitor is defined in one place, it is nice and easy to allow clients
to have visitors that return non-void.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
e12b4301820bbae6b67a88fa98617dc571331555 21-Aug-2007 Chris Lattner <sabre@nondot.org> Now that the visitor is defined in one place, it is nice and easy to allow clients
to have visitors that return non-void.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41212 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/StmtVisitor.h
7ba21fafbb3cd2958bcdcfaf05a213086c185a27 21-Aug-2007 Chris Lattner <sabre@nondot.org> Switch StmtVisitor from using dynamic to static dispatch. This makes it
significantly faster and actually reduces the amount of code in the system.
This also allows for future visitor changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtVisitor.h
c5598cbc4c3f2fb515af7f142f78ff630bdb5c01 21-Aug-2007 Chris Lattner <sabre@nondot.org> Switch StmtVisitor from using dynamic to static dispatch. This makes it
significantly faster and actually reduces the amount of code in the system.
This also allows for future visitor changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41211 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtVisitor.h
a9adf11afa4a6eb66d5ab78dc44b47de18d99295 21-Aug-2007 Steve Naroff <snaroff@apple.com> Added Parser::ParseStructDeclaration() as a result of refactoring Parser::ParseStructUnionBody().

Motivation: Objective-C can now share this rule. It also makes Parser::ParseStructUnionBody()
a bit smaller/cleaner..



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
28a7ca80da5dd2d0fca75d9a3b7a5f4851712592 21-Aug-2007 Steve Naroff <snaroff@apple.com> Added Parser::ParseStructDeclaration() as a result of refactoring Parser::ParseStructUnionBody().

Motivation: Objective-C can now share this rule. It also makes Parser::ParseStructUnionBody()
a bit smaller/cleaner..



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41201 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
fb36788a4ccc1609d2124ba0a60efae0381be743 20-Aug-2007 Steve Naroff <snaroff@apple.com> Start parsing ObjC classes/categories!

Next step, refactor Parser::ParseStructUnionBody() so that struct declarations can
be shared with Objective-C (for declaring instance variables).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
dac269b65eed82182fc3e96566dedd6562dfe11e 20-Aug-2007 Steve Naroff <snaroff@apple.com> Start parsing ObjC classes/categories!

Next step, refactor Parser::ParseStructUnionBody() so that struct declarations can
be shared with Objective-C (for declaring instance variables).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41200 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Parse/Parser.h
1c1700f559db902f4c170a5aa0d0d697e06c2fa0 20-Aug-2007 Ted Kremenek <kremenek@apple.com> Modified ArraySubscriptExpr to have accessors getLHS and getRHS in addition
to getBase and getIdx. getBase and getIdx now return a "normalized" view
of the expression (e.g., always "A[4]" instead of possibly "4[A]"). getLHS
and getRHS return the expressions with syntactic fidelity to the original
source code.

Also modified client code of ArraySubscriptExpr, including the AST dumper
and pretty printer, the return-stack value checker, and the LLVM code
generator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2324512285caac0332bbbc6e4cab6245d2a370a1 20-Aug-2007 Ted Kremenek <kremenek@apple.com> Modified ArraySubscriptExpr to have accessors getLHS and getRHS in addition
to getBase and getIdx. getBase and getIdx now return a "normalized" view
of the expression (e.g., always "A[4]" instead of possibly "4[A]"). getLHS
and getRHS return the expressions with syntactic fidelity to the original
source code.

Also modified client code of ArraySubscriptExpr, including the AST dumper
and pretty printer, the return-stack value checker, and the LLVM code
generator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41180 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1fadcd86b36392e4f31569c22a4a2d2eef6119a9 18-Aug-2007 Ted Kremenek <kremenek@apple.com> Fixed bug in VarDecl::hasAutoStorage: function parameters implicitly have
auto storage, but this routine would incorrectly return false.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
602f754796e00662445d58e1263d168f2b13490a 18-Aug-2007 Ted Kremenek <kremenek@apple.com> Fixed bug in VarDecl::hasAutoStorage: function parameters implicitly have
auto storage, but this routine would incorrectly return false.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
45925abcaca19794f63988d30f4158f4977c0070 17-Aug-2007 Ted Kremenek <kremenek@apple.com> Added extra semantic checking to do basic detection of
"return of stack addresses." ParseReturnStmt now calls CheckReturnStackAddr
to determine if the expression in the return statement evaluates to an
address of a stack variable. If so, we issue a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
06de276fff91264437fa75111ed76de43097e089 17-Aug-2007 Ted Kremenek <kremenek@apple.com> Added extra semantic checking to do basic detection of
"return of stack addresses." ParseReturnStmt now calls CheckReturnStackAddr
to determine if the expression in the return statement evaluates to an
address of a stack variable. If so, we issue a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41141 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e7e7aa2c1a2d87e2ac26da4645dd881f66f24763 17-Aug-2007 Anders Carlsson <andersca@mac.com> Add initial support for constant CFStrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
71993dd85eed9cc42c6b2fa61ee5c53026b74817 17-Aug-2007 Anders Carlsson <andersca@mac.com> Add initial support for constant CFStrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41136 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/Basic/DiagnosticKinds.def
4462cb085276cc634c469057d9c76557421f9054 16-Aug-2007 Steve Naroff <snaroff@apple.com> Fixed Sema::CheckEqualityOperands() and Sema::CheckRelationalOperands() to deal more
thoughtfully with incompatible pointers. This includes:

- Emit a diagnostic when two pointers aren't compatible!
- Promote one of the pointers/integers so we maintain the invariant expected by the
code generator (i.e. that the left/right types match).
- Upgrade the pointer/integer comparison diagnostic to include the types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
e77fd3c15c8c4a2f1225e75d5742b6ad07578913 16-Aug-2007 Steve Naroff <snaroff@apple.com> Fixed Sema::CheckEqualityOperands() and Sema::CheckRelationalOperands() to deal more
thoughtfully with incompatible pointers. This includes:

- Emit a diagnostic when two pointers aren't compatible!
- Promote one of the pointers/integers so we maintain the invariant expected by the
code generator (i.e. that the left/right types match).
- Upgrade the pointer/integer comparison diagnostic to include the types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41127 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
43a30985dfd581255d367932c960e9bd428fbc8a 16-Aug-2007 Ted Kremenek <kremenek@apple.com> Added a comment to ArraySubscriptExpr to note that the expressions like
"A[4]" are equivalent to "4[A]", and that a test that the expression
returned by "getBase()" has a pointer type is required to resolve which
subexpression is the "true" base expression of the array index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
fc4a1601a84d280d7e5c424b77843fdd743beec8 16-Aug-2007 Ted Kremenek <kremenek@apple.com> Added a comment to ArraySubscriptExpr to note that the expressions like
"A[4]" are equivalent to "4[A]", and that a test that the expression
returned by "getBase()" has a pointer type is required to resolve which
subexpression is the "true" base expression of the array index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5c41c215b79370ae71c45d703aa0dbb71b3eb072 15-Aug-2007 Ted Kremenek <kremenek@apple.com> Added the following utility methods to VarDecl that provide
canonicalized queries of a variable's storage:

hasAutoStorage - Does a variable have (implicit) auto storage?

hasStaticStorage - Does a variable have (implicit) static storage?

hasLocalStorage - Is the variable a non-static local variable?

hasGlobalStorage - Is the variable a global variable or a static
local variable?

Additional comments documenting these functions are included in the
source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
87ce144920a4f9c4cc8d6b021b1d759d7785317c 15-Aug-2007 Ted Kremenek <kremenek@apple.com> Added the following utility methods to VarDecl that provide
canonicalized queries of a variable's storage:

hasAutoStorage - Does a variable have (implicit) auto storage?

hasStaticStorage - Does a variable have (implicit) static storage?

hasLocalStorage - Is the variable a non-static local variable?

hasGlobalStorage - Is the variable a global variable or a static
local variable?

Additional comments documenting these functions are included in the
source.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41092 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
081ed87ede8040ec379846de94c062e4bc7ea238 14-Aug-2007 Ted Kremenek <kremenek@apple.com> Added support for additional format string checking for the printf
family of functions. Previous functionality only included checking to
see if the format string was a string literal. Now we check parse the
format string (if it is a literal) and perform the following checks:

(1) Warn if: number conversions (e.g. "%d") != number data arguments.

(2) Warn about missing format strings (e.g., "printf()").

(3) Warn if the format string is not a string literal.

(4) Warn about the use se of '%n' conversion. This conversion is
discouraged for security reasons.

(5) Warn about malformed conversions. For example '%;', '%v'; these
are not valid.

(6) Warn about empty format strings; e.g. printf(""). Although these
can be optimized away by the compiler, they can be indicative of
broken programmer logic. We may need to add additional support to
see when such cases occur within macro expansion to avoid false
positives.

(7) Warn if the string literal is wide; e.g. L"%d".

(8) Warn if we detect a '\0' character WITHIN the format string.

Test cases are included.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
71895b9aa3ad71957359497e136b50fcb6136bdf 14-Aug-2007 Ted Kremenek <kremenek@apple.com> Added support for additional format string checking for the printf
family of functions. Previous functionality only included checking to
see if the format string was a string literal. Now we check parse the
format string (if it is a literal) and perform the following checks:

(1) Warn if: number conversions (e.g. "%d") != number data arguments.

(2) Warn about missing format strings (e.g., "printf()").

(3) Warn if the format string is not a string literal.

(4) Warn about the use se of '%n' conversion. This conversion is
discouraged for security reasons.

(5) Warn about malformed conversions. For example '%;', '%v'; these
are not valid.

(6) Warn about empty format strings; e.g. printf(""). Although these
can be optimized away by the compiler, they can be indicative of
broken programmer logic. We may need to add additional support to
see when such cases occur within macro expansion to avoid false
positives.

(7) Warn if the string literal is wide; e.g. L"%d".

(8) Warn if we detect a '\0' character WITHIN the format string.

Test cases are included.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41076 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
5ac50b585c1a9dd73a84db81690f4f4f9f0bf339 14-Aug-2007 Ted Kremenek <kremenek@apple.com> Added documentation to StringLiteral noting that the strings returned by
getStrData() are not null-terminated, and the lengths of these strings should
be determined using getByteLength().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
e6a82b2c29ad05534841e5f8fd033fb17b6f61e2 14-Aug-2007 Ted Kremenek <kremenek@apple.com> Added documentation to StringLiteral noting that the strings returned by
getStrData() are not null-terminated, and the lengths of these strings should
be determined using getByteLength().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41055 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2e64c078269a9ab8352b531bda7c3511aee72a8d 10-Aug-2007 Chris Lattner <sabre@nondot.org> initial support for checking format strings, patch by Ted Kremenek:

"I've coded up some support in clang to flag warnings for non-constant format strings used in calls to printf-like functions (all the functions listed in "man fprintf"). Non-constant format strings are a source of many security exploits in C/C++ programs, and I believe are currently detected by gcc using the flag -Wformat-nonliteral."



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
59907c4d8f6fc8aacfdaa0273bd7a9c140fbb45f 10-Aug-2007 Chris Lattner <sabre@nondot.org> initial support for checking format strings, patch by Ted Kremenek:

"I've coded up some support in clang to flag warnings for non-constant format strings used in calls to printf-like functions (all the functions listed in "man fprintf"). Non-constant format strings are a source of many security exploits in C/C++ programs, and I believe are currently detected by gcc using the flag -Wformat-nonliteral."



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41003 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
ac485c1382b200b6d26d23e24adf0d47e5310326 09-Aug-2007 Chris Lattner <sabre@nondot.org> move a switch to common code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
36460eea641bf20a67b8b767b6d26373a90f0965 09-Aug-2007 Chris Lattner <sabre@nondot.org> move a switch to common code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40967 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ExprCXX.h
538590e41d60834560e967650be749112b3bb1ca 09-Aug-2007 Chris Lattner <sabre@nondot.org> minor fixes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
06184086c10c6672f4bcc3630a5a2b0bed048f63 09-Aug-2007 Chris Lattner <sabre@nondot.org> minor fixes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40966 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
95578787e1c051dcec0637fc0a2e2d22c4829a9c 09-Aug-2007 Chris Lattner <sabre@nondot.org> add a new AST dumper interface (E->dump()). This dumps out
the AST in a structural, non-pretty, form useful for understanding
the AST. It isn't quite done yet, but is already somewhat useful.

For this example:

int test(short X, long long Y) {
return X < ((100));
}

we get (with -parse-ast-dump):

int test(short X, long long Y)
(CompoundStmt 0x2905ce0
(ReturnStmt 0x2905cd0
(BinaryOperator 0x2905cb0 '<'
(ImplicitCastExpr 0x2905ca0
(DeclRefExpr 0x2905c20 Decl='X' 0x2905bb0))
(ParenExpr 0x2905c80
(ParenExpr 0x2905c60
(IntegerLiteral 0x2905c40 100))))))




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
6000dace22f110d8768476989313e9d981d690d0 09-Aug-2007 Chris Lattner <sabre@nondot.org> add a new AST dumper interface (E->dump()). This dumps out
the AST in a structural, non-pretty, form useful for understanding
the AST. It isn't quite done yet, but is already somewhat useful.

For this example:

int test(short X, long long Y) {
return X < ((100));
}

we get (with -parse-ast-dump):

int test(short X, long long Y)
(CompoundStmt 0x2905ce0
(ReturnStmt 0x2905cd0
(BinaryOperator 0x2905cb0 '<'
(ImplicitCastExpr 0x2905ca0
(DeclRefExpr 0x2905c20 Decl='X' 0x2905bb0))
(ParenExpr 0x2905c80
(ParenExpr 0x2905c60
(IntegerLiteral 0x2905c40 100))))))




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40954 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
8d3b170e5cb1700b5cbd227182bc29ca0d16819d 09-Aug-2007 Steve Naroff <snaroff@apple.com> Finish implementing __builtin_classify_type()...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
13b7c5ff42d6077a8d59e2c9ec9e7fedd0150ae6 09-Aug-2007 Steve Naroff <snaroff@apple.com> Finish implementing __builtin_classify_type()...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40951 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
48a87933ae7a1bfc3cbc43879eba6d3510125e88 08-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for __builtin_classify_type(). This builtin function isn't "public", however
it is used by "tgmath.h" (so we need to support it). It might also come in handy when
developing the overloaded function macros for OpenCU.

Next check-in will make this an integer constant expression...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
e8770421d8463db203b78eb96f93a75ea5e58346 08-Aug-2007 Steve Naroff <snaroff@apple.com> Add support for __builtin_classify_type(). This builtin function isn't "public", however
it is used by "tgmath.h" (so we need to support it). It might also come in handy when
developing the overloaded function macros for OpenCU.

Next check-in will make this an integer constant expression...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40930 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Builtins.def
2e3b1d2ed22e5638fa9c55cc1ea5dac4db6aecdc 07-Aug-2007 Chris Lattner <sabre@nondot.org> add some helpers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7effa1aceac1219529af23c776835f855b8d905c 07-Aug-2007 Chris Lattner <sabre@nondot.org> add some helpers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40901 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
5e4f6bd2743aeff08f409f198b7ab4422c1a57ca 05-Aug-2007 Steve Naroff <snaroff@apple.com> Make sure the good old "function/array conversion" is done to function parameters.

This resulted in the following error...

[dylan:clang/test/Parser] admin% cat parmvardecl_conversion.c
// RUN: clang -parse-ast-check %s

void f (int p[]) { p++; }

[dylan:clang/test/Parser] admin% clang -parse-ast-check parmvardecl_conversion.c
Errors seen but not expected:
Line 3: cannot modify value of type 'int []'

With this fix, the test case above succeeds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
69625f4925646669f68caa234cd9133261acaaa1 05-Aug-2007 Steve Naroff <snaroff@apple.com> Make sure the good old "function/array conversion" is done to function parameters.

This resulted in the following error...

[dylan:clang/test/Parser] admin% cat parmvardecl_conversion.c
// RUN: clang -parse-ast-check %s

void f (int p[]) { p++; }

[dylan:clang/test/Parser] admin% clang -parse-ast-check parmvardecl_conversion.c
Errors seen but not expected:
Line 3: cannot modify value of type 'int []'

With this fix, the test case above succeeds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40831 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
4048bab9bc3c0aedfa4d564b709da60135db5218 04-Aug-2007 Chris Lattner <sabre@nondot.org> fix constness issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
c1b607db38501f73c8e1461fc749a6b0e469f157 04-Aug-2007 Chris Lattner <sabre@nondot.org> fix constness issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40798 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
893455279ca8cafde80cbf54fb47260ad5255ac8 04-Aug-2007 Steve Naroff <snaroff@apple.com> Restrict vector component access (using "." and "[]") to variables.
Chris suggested this, since it simplifies the code generator.
If this features is needed (and we don't think it is), we can revisit.

The following test case now produces an error.
[dylan:~/llvm/tools/clang] admin% cat t.c

typedef __attribute__(( ocu_vector_type(4) )) float float4;

static void test() {
float4 vec4;

vec4.rg.g;
vec4.rg[1];
}
[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.c
t.c:8:12: error: vector component access limited to variables
vec4.rg.g;
^~
t.c:9:12: error: vector component access limited to variables
vec4.rg[1];
^~~
2 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
608e0ee4b4b8c313dd5e1b4407f742d8bff246b3 04-Aug-2007 Steve Naroff <snaroff@apple.com> Restrict vector component access (using "." and "[]") to variables.
Chris suggested this, since it simplifies the code generator.
If this features is needed (and we don't think it is), we can revisit.

The following test case now produces an error.
[dylan:~/llvm/tools/clang] admin% cat t.c

typedef __attribute__(( ocu_vector_type(4) )) float float4;

static void test() {
float4 vec4;

vec4.rg.g;
vec4.rg[1];
}
[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.c
t.c:8:12: error: vector component access limited to variables
vec4.rg.g;
^~
t.c:9:12: error: vector component access limited to variables
vec4.rg[1];
^~~
2 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
93c53018b1bf9f4299e1469b4b902da997e14471 03-Aug-2007 Steve Naroff <snaroff@apple.com> Implement __builtin_choose_expr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
d04fdd5f99f985abf2e7b7d7d4d427eebe001e55 03-Aug-2007 Steve Naroff <snaroff@apple.com> Implement __builtin_choose_expr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40794 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
9ae0ec74e1a444b7eadbffccee8a72b8f638991f 03-Aug-2007 Chris Lattner <sabre@nondot.org> fix a buggy comment I added


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
dd652cdb7046155437eeb3dff512768f0a57369b 03-Aug-2007 Chris Lattner <sabre@nondot.org> fix a buggy comment I added


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40787 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
a0d03a715738f38c1f7a7e8a757eabd629786ab1 03-Aug-2007 Chris Lattner <sabre@nondot.org> Rename AddrLabel and OCUVectorComponent -> AddrLabelExpr and OCUVectorElementExpr respectively. This is for consistency with other expr nodes end with *Expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
6481a57fefbf1a313ff439028470fe4c27a3b7a3 03-Aug-2007 Chris Lattner <sabre@nondot.org> Rename AddrLabel and OCUVectorComponent -> AddrLabelExpr and OCUVectorElementExpr respectively. This is for consistency with other expr nodes end with *Expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40785 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
5054785f432e9c057af52fafbf01d5167d63ef0d 03-Aug-2007 Chris Lattner <sabre@nondot.org> add OCUVectorComponent::getNumComponents()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4d0ac88428b3ed7c6f3a2f4e758ea5424ecd70ae 03-Aug-2007 Chris Lattner <sabre@nondot.org> add OCUVectorComponent::getNumComponents()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
42158e7b3a95f41d3482f1fb3a67392dbbf745da 03-Aug-2007 Chris Lattner <sabre@nondot.org> Add support for encoding a OCUVectorComponent into a single integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
b8f849da3cedee2f61ad98389115ddd04e439d60 03-Aug-2007 Chris Lattner <sabre@nondot.org> Add support for encoding a OCUVectorComponent into a single integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40768 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
9096b795541c783297fb19684a58c54d0fe823b8 03-Aug-2007 Chris Lattner <sabre@nondot.org> rename some helpers, have them return the idx of the field being accessed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
88dca0464804b8b26ae605f89784c927e8493ddd 03-Aug-2007 Chris Lattner <sabre@nondot.org> rename some helpers, have them return the idx of the field being accessed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40764 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ea255914df6c2d8fb79de53b5c2728b7b69e0d99 03-Aug-2007 Chris Lattner <sabre@nondot.org> mark some methods static, don't consider a vector to be an ocuvector


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
667405a3b00b04a36537d3a35ab7bdc6e2dd8c38 03-Aug-2007 Chris Lattner <sabre@nondot.org> mark some methods static, don't consider a vector to be an ocuvector


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40762 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f4bf5510976068f53ef19996aa1fbcc7cd3708a0 02-Aug-2007 Chris Lattner <sabre@nondot.org> Minor comment improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
cb92a118145c2a425666068d37c4049c38e24914 02-Aug-2007 Chris Lattner <sabre@nondot.org> Minor comment improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40760 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
0434327934aa574471aac7eb1955cfdc5e32ee5e 02-Aug-2007 Chris Lattner <sabre@nondot.org> switch a fixme to an assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
4cabcfea26bc3465d8723fe7997ab4a1a657aea8 02-Aug-2007 Chris Lattner <sabre@nondot.org> switch a fixme to an assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40717 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
18d38be41b6bb22b6f6378c868d237ae13a3d59f 02-Aug-2007 Steve Naroff <snaroff@apple.com> Add a couple const modifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
7f28fe8e00ec4fac17977374d8da491f873a3b05 02-Aug-2007 Steve Naroff <snaroff@apple.com> Add a couple const modifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40708 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
1200b5a897982a428411e5fea413d065f517f996 02-Aug-2007 Steve Naroff <snaroff@apple.com> Hack Expr::isConstantExpr() to allow for __builtin_types_compatible_p.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
389cecc83f33e93c8ba6bf2e8269b8690404416f 02-Aug-2007 Steve Naroff <snaroff@apple.com> Hack Expr::isConstantExpr() to allow for __builtin_types_compatible_p.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40705 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5b5289288e689ff5bafde0af7716f05e076b3d71 02-Aug-2007 Steve Naroff <snaroff@apple.com> - Finish hooking up support for __builtin_types_compatible_p().
- Fix type printing code for recently added TypeOfExpr/TypeOfType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
363bcff47df2fda3cfcfcd994b7888157df58c43 02-Aug-2007 Steve Naroff <snaroff@apple.com> - Finish hooking up support for __builtin_types_compatible_p().
- Fix type printing code for recently added TypeOfExpr/TypeOfType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40700 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Parse/Action.h
63bad2d3e9e4fecaa6fb9e7ccf4e7419f74a4b16 02-Aug-2007 Steve Naroff <snaroff@apple.com> Add AST/Sema support for __builtin_types_compatible_p (a GNU extension).
Todo...still need to call the action from the parser...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
d34e915f33224c508ad55fbf975bd10b7876e197 02-Aug-2007 Steve Naroff <snaroff@apple.com> Add AST/Sema support for __builtin_types_compatible_p (a GNU extension).
Todo...still need to call the action from the parser...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40693 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
11b649c13734d15817f4780084bb220a338b1431 01-Aug-2007 Steve Naroff <snaroff@apple.com> Two typeof() related changes...

- Changed the name of ASTContext::getTypeOfType(Expr*)->getTypeOfExpr().
- Remove FIXME for TypeOfExpr::getAsStringInternal(). This will work fine for printing the AST. It isn't ideal
for error diagnostics (since it's more natural to display the expressions type).

One "random" (or at least delayed:-) change...

- Changed all "ext_typecheck_*" diagnostics from EXTENSION->WARNING. Reason: Since -pedantic is now
off (by default), these diagnostics were never being emitted (which is bad). With this change, clang will
emit the warning all the time. The only downside (wrt GCC compatibility) is -pedantic-errors will not turn
this diagnostics into errors (a "feature" of making tagging them with EXTENSION). When/if this becomes
an issue, we can revisit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
8d1a3b8ca1e5fcc4567b5a6f51d82be2e460de1c 01-Aug-2007 Steve Naroff <snaroff@apple.com> Two typeof() related changes...

- Changed the name of ASTContext::getTypeOfType(Expr*)->getTypeOfExpr().
- Remove FIXME for TypeOfExpr::getAsStringInternal(). This will work fine for printing the AST. It isn't ideal
for error diagnostics (since it's more natural to display the expressions type).

One "random" (or at least delayed:-) change...

- Changed all "ext_typecheck_*" diagnostics from EXTENSION->WARNING. Reason: Since -pedantic is now
off (by default), these diagnostics were never being emitted (which is bad). With this change, clang will
emit the warning all the time. The only downside (wrt GCC compatibility) is -pedantic-errors will not turn
this diagnostics into errors (a "feature" of making tagging them with EXTENSION). When/if this becomes
an issue, we can revisit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40676 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/DiagnosticKinds.def
b0fdfd50e1e4011486d5cb3773e1e87c8ec4325a 31-Jul-2007 Chris Lattner <sabre@nondot.org> move trivial type predicates inline.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
611c1fff195d32df97706e0920c92468b2509900 31-Jul-2007 Chris Lattner <sabre@nondot.org> move trivial type predicates inline.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40651 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
e35a104a7d5caf8fa71117fbaa6f18cacc53c7a7 31-Jul-2007 Chris Lattner <sabre@nondot.org> split the rest of the type predicates into pure predicates:
there is now an isXXXType and a getAsXXXType


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
c8629630ce3e7f0da231bf10a4b39240caaac68a 31-Jul-2007 Chris Lattner <sabre@nondot.org> split the rest of the type predicates into pure predicates:
there is now an isXXXType and a getAsXXXType


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40646 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
f0c4a0a830c9154b1ae72e497c2ce586c10e9b71 31-Jul-2007 Chris Lattner <sabre@nondot.org> rename isReferenceType to follow the new scheme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
a1d9fdea79ba7bbd71862b9f9f78f5f117331fc7 31-Jul-2007 Chris Lattner <sabre@nondot.org> rename isReferenceType to follow the new scheme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40640 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7931f4a186bc76b21dd4629ee74d64264a7fb8a2 31-Jul-2007 Chris Lattner <sabre@nondot.org> make isPointerType() a pure predicate, rename the
existing one to getAsPointerType()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
befee48ff2a1dab236c5700f00ecca1cfdcd5837 31-Jul-2007 Chris Lattner <sabre@nondot.org> make isPointerType() a pure predicate, rename the
existing one to getAsPointerType()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40639 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7cbb14653934a298c09002b87704dc6531261771 31-Jul-2007 Steve Naroff <snaroff@apple.com> Add parsing and AST support for GNU "typeof".
Many small changes to lot's of files.
Still some FIXME's, however the basic support is in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
d1861fd633d5096a00777c918eb8575ea7162fe7 31-Jul-2007 Steve Naroff <snaroff@apple.com> Add parsing and AST support for GNU "typeof".
Many small changes to lot's of files.
Still some FIXME's, however the basic support is in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40631 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
6154214e20225a883a8a00226499534e9b514315 30-Jul-2007 Steve Naroff <snaroff@apple.com> Upgrade a comment...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
fcac0fff877a461bc5d5a57e6c6727a4c819d95a 30-Jul-2007 Steve Naroff <snaroff@apple.com> Upgrade a comment...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40585 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ba67f698f4380bf0533195e7332f45501c10504e 30-Jul-2007 Steve Naroff <snaroff@apple.com> Finish up semantic analysis for vector components.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
fec0b49c3fa621fbf63e420f3d54a5bb3a0265d2 30-Jul-2007 Steve Naroff <snaroff@apple.com> Finish up semantic analysis for vector components.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40584 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/Basic/DiagnosticKinds.def
82113e3a7b26c1a4b71d253c86de95f87cc8892e 29-Jul-2007 Steve Naroff <snaroff@apple.com> Implement pretty diagnostics when doing on-the-fly vector sizing (for vector component access).

For example, before this commit, the following diagnostics would be emitted...

ocu.c:49:12: error: incompatible types assigning 'float __attribute__((ocu_vector_type(3)))' to 'float4'
vec4_2 = vec4.rgb; // shorten
~~~~~~ ^ ~~~~~~~~
ocu.c:51:7: error: incompatible types assigning 'float __attribute__((ocu_vector_type(2)))' to 'float'
f = vec2.xx; // shorten
~ ^ ~~~~~~~

Now, the diagnostics look as you would expect...

ocu.c:49:12: error: incompatible types assigning 'float3' to 'float4'
vec4_2 = vec4.rgb; // shorten
~~~~~~ ^ ~~~~~~~~
ocu.c:51:7: error: incompatible types assigning 'float2' to 'float'
f = vec2.xx; // shorten
~ ^ ~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
bea0b34d99dddb7829857bbc96628713ab9c274b 29-Jul-2007 Steve Naroff <snaroff@apple.com> Implement pretty diagnostics when doing on-the-fly vector sizing (for vector component access).

For example, before this commit, the following diagnostics would be emitted...

ocu.c:49:12: error: incompatible types assigning 'float __attribute__((ocu_vector_type(3)))' to 'float4'
vec4_2 = vec4.rgb; // shorten
~~~~~~ ^ ~~~~~~~~
ocu.c:51:7: error: incompatible types assigning 'float __attribute__((ocu_vector_type(2)))' to 'float'
f = vec2.xx; // shorten
~ ^ ~~~~~~~

Now, the diagnostics look as you would expect...

ocu.c:49:12: error: incompatible types assigning 'float3' to 'float4'
vec4_2 = vec4.rgb; // shorten
~~~~~~ ^ ~~~~~~~~
ocu.c:51:7: error: incompatible types assigning 'float2' to 'float'
f = vec2.xx; // shorten
~ ^ ~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40579 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
c11705f9b742b542724dd56796bf90e07191e342 29-Jul-2007 Steve Naroff <snaroff@apple.com> Added a new expression, OCUVectorComponent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/AST/Type.h
31a458462c6cf417a84e0c47852b18fb22d79acb 29-Jul-2007 Steve Naroff <snaroff@apple.com> Added a new expression, OCUVectorComponent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40577 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/AST/Type.h
1b8a46c945927340ae7e79b771e93e7d36da4851 28-Jul-2007 Steve Naroff <snaroff@apple.com> Implement syntax/semantic analysis for OCU Vector Components.
Next step, AST support...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
e1b31fedbc006e6e4071bbb4f74c6116b56cfa9f 28-Jul-2007 Steve Naroff <snaroff@apple.com> Implement syntax/semantic analysis for OCU Vector Components.
Next step, AST support...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40568 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
806b319509d01bffe47317f11140c930da800dbb 26-Jul-2007 Steve Naroff <snaroff@apple.com> Add Type::isOCUVectorType().
Convert isFunctionType(), isStructureType(), and isUnionType() to the new API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
7064f5c95bbdb17680d0ea658d4090898c2592d3 26-Jul-2007 Steve Naroff <snaroff@apple.com> Add Type::isOCUVectorType().
Convert isFunctionType(), isStructureType(), and isUnionType() to the new API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40541 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
2cb6638a26cfa999e5fb999e6af9211127e681c1 26-Jul-2007 Steve Naroff <snaroff@apple.com> Various improvements to Sema::ParseMemberReferenceExpr().

- Added source range support to Diag's.
- Used the new type predicate API to remove dealing with the canonical
type explicitly.
- Added Type::isRecordType().
- Removed some casts.
- Removed a const qualifier from RecordType::getDecl().




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
dfa6aae5a119a527e537c35566ba3272fd8c5d74 26-Jul-2007 Steve Naroff <snaroff@apple.com> Various improvements to Sema::ParseMemberReferenceExpr().

- Added source range support to Diag's.
- Used the new type predicate API to remove dealing with the canonical
type explicitly.
- Added Type::isRecordType().
- Removed some casts.
- Removed a const qualifier from RecordType::getDecl().




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40508 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
756440670c6e7f338b95d38bc5ad82b70cf65b00 25-Jul-2007 Steve Naroff <snaroff@apple.com> - Fix commit in Parser.h (patch by Kevin Andre).
- Add comment and minor cleanup to yesterday's fix to ParseCallExpr().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
82c7e6d8215567935d3d52741ccca9876a8ea461 25-Jul-2007 Steve Naroff <snaroff@apple.com> - Fix commit in Parser.h (patch by Kevin Andre).
- Add comment and minor cleanup to yesterday's fix to ParseCallExpr().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40492 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
4b0096578e961587d1ec0ed5dce45f592a65ed41 25-Jul-2007 Chris Lattner <sabre@nondot.org> Fix a couple of bugs, add some new cool stuff.

1. Fix a todo in Parser::ParseTag, to recover better. On code like
that in test/Sema/decl-invalid.c it causes us to return a single
error instead of multiple.
2. Fix an error in Sema::ParseDeclarator, where it would crash if the
declarator didn't have an identifier. Instead, diagnose the problem.
3. Start adding infrastructure to track the range of locations covered
by a declspec or declarator. This is mostly implemented for declspec,
but could be improved, it is missing for declarator.

Thanks to Neil for pointing out this crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/RecordLayout.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
lang/AST/Type.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
lang/Basic/FileManager.h
lang/Basic/LangOptions.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.def
lang/Basic/TokenKinds.h
lang/CodeGen/ModuleBuilder.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Lex/IdentifierTable.h
lang/Lex/Lexer.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroExpander.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/ScratchBuffer.h
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Sema/ASTStreamer.h
e80a59cc41d42a970466cb020b6f44c5b8831d70 25-Jul-2007 Chris Lattner <sabre@nondot.org> Fix a couple of bugs, add some new cool stuff.

1. Fix a todo in Parser::ParseTag, to recover better. On code like
that in test/Sema/decl-invalid.c it causes us to return a single
error instead of multiple.
2. Fix an error in Sema::ParseDeclarator, where it would crash if the
declarator didn't have an identifier. Instead, diagnose the problem.
3. Start adding infrastructure to track the range of locations covered
by a declspec or declarator. This is mostly implemented for declspec,
but could be improved, it is missing for declarator.

Thanks to Neil for pointing out this crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40482 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
lang/Basic/SourceLocation.h
lang/Parse/DeclSpec.h
700204c74b455746752e851b25565ebf932f5340 24-Jul-2007 Steve Naroff <snaroff@apple.com> Fix Sema::ParseCallExpr()...it wasn't doing the default array/function promotions on it's argument types.

This resulted in the following errors when compiling promote_types_in_proto.c test...

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang test/Parser/promote_types_in_proto.c
test/Parser/promote_types_in_proto.c:7:24: error: incompatible types passing 'char *[]' to function expecting 'char *const []'
arrayPromotion(argv);
~~~~~~~~~~~~~~ ^~~~
test/Parser/promote_types_in_proto.c:8:27: error: incompatible types passing 'void (char *const [])' to function expecting 'void (char *const [])'
functionPromotion(arrayPromotion);
~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
2 diagnostics generated.

When fixing this, noticed that both ParseCallExpr() and ParseReturnStmt() were prematurely comparing types for
equivalence. This is incorrect (since the expr. promotions haven't been done yet). To fix this, I moved the
check "down" to Sema::CheckAssignmentConstraints().

I also converted Type::isArrayType() to the modern API (since I needed it). Still more Type predicates to
convert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40475 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ab18c4c0ac1a46a38aa84c2c8ea485612e21a614 24-Jul-2007 Chris Lattner <sabre@nondot.org> implement ast building and trivial semantic analysis of stmt exprs.
This implements test/Sema/stmt_exprs.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40465 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
d8e3083840fef752d11ca183f42786470ed061e3 24-Jul-2007 Chris Lattner <sabre@nondot.org> Use a smallstring instead of an std::string in FileChanged to avoid some malloc traffic.

This speeds up -E on xalancbmk by 2.4%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40461 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
5e36a7a89da5d69ece23fc8228624a053f75c645 24-Jul-2007 Chris Lattner <sabre@nondot.org> Add a cache to SourceManager to accellerate line # lookup. This is a
bottleneck for -E computation, because every token that starts a line needs
to determine *which* line it is on (so -E mode can insert the appropriate
vertical whitespace). This optimization improves this common case where
it is striding through the line # table.

This speeds up -E on xalancbmk by 3.2%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40459 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
8a87e57beb96212ee61dc08a5f691cd7f7710703 23-Jul-2007 Chris Lattner <sabre@nondot.org> correctly verify that default and case are in a switchstmt,
this fixes test/Sema/switch.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40438 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
f1c99acc544a4e70f308db4e7200ca04cd5a06d2 23-Jul-2007 Chris Lattner <sabre@nondot.org> refactor the interface to Preprocessor::GetIncludeFilenameSpelling,
no functionality changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40414 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Preprocessor.h
448cec4c1c3705f6f49ffdefb58a7329942a2dd8 22-Jul-2007 Chris Lattner <sabre@nondot.org> Change hte lexer to start a start pointer to the underlying
memorybuffer instead of a pointer to the memorybuffer itself. This
reduces coupling and eliminates a pointer dereference on a hot path.
This speeds up -Eonly on 483.xalancbmk by 2.1%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40394 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
9960ae8ecfa2c4278dac708a02e463f83fdf17e8 22-Jul-2007 Chris Lattner <sabre@nondot.org> Implement a simple cache in headersearch. This speeds up
preprocessing 483.xalancbmk by about 10%, reducing the number
of file lookup queries from 2139411 to 199466 (over 10x)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40390 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/HeaderSearch.h
c1fcb7762673be706b0a40477d5e93411e918f93 22-Jul-2007 Anders Carlsson <andersca@mac.com> Refactor switch analysis to make it possible to detect duplicate case values

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40388 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
lang/Parse/Scope.h
bd24776a825a18a59067c68a9d32f2d22e4cbf79 22-Jul-2007 Chris Lattner <sabre@nondot.org> when running in -E mode on multiple files, there is no reason to accumulate
fileid's and macroid's across files. Clearing between files keeps the tables
smaller and slightly speeds up compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40383 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
9c683062752a26014197df1c8792a19efa9e93cf 22-Jul-2007 Chris Lattner <sabre@nondot.org> Fix a really subtle bug in the macro expander caching code, where
redefinition of a macro could cause invalid memory to be deleted.
Found preprocessing 253.perlbmk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40380 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
d1623a81992a24abbfcd5520b32a0dd90857b8a8 21-Jul-2007 Chris Lattner <sabre@nondot.org> Add support for reusing macroid's with negative physical loc deltas. This
keeps the MacroInfo table more compact.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40281 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
aa4166c6c86e174362c0dc4e2cb63345f72cc5a0 21-Jul-2007 Chris Lattner <sabre@nondot.org> implement getSourceRange for ImplicitCast


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40264 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
4565d4e83cec55356fe9c75929579eacced9da36 21-Jul-2007 Chris Lattner <sabre@nondot.org> better wording for an error, suggested by Neil.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40163 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
227426661be33ff3e21f2b6b9f97971da2da044f 21-Jul-2007 Anders Carlsson <andersca@mac.com> Implement code generation for __func__, __FUNCTION__ and __PRETTY_FUNCTION__

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40162 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
lang/Parse/Action.h
0fa152e72bb71c4aa184d0edd91caa9cbebbf70e 21-Jul-2007 Chris Lattner <sabre@nondot.org> Two fixes:
1) fix a crash on test/Sema/default.c by making
sure that the switch scope is non-null.
2) if there is an error sema'ing a default or case stmt,
make sure to return the substmt up, so that the error
recovery code has more acurate info to continue with.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40134 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
942cfd37297528918616d06cd6e4e8bd6e4915a2 20-Jul-2007 Chris Lattner <sabre@nondot.org> Fix a valgrind error noticed by Benoit Boissinot


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40113 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
31bb8be680ee2facf7fbb3c6c87b9bbd20248328 20-Jul-2007 Chris Lattner <sabre@nondot.org> improve comments, implement a trivial single-entry cache in
SourceManager::getInstantiationLoc. With this change, every token
expanded from a macro doesn't get its own MacroID. :)

This reduces # macro IDs in carbon.h from 16805 to 9197



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40108 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
d217773f106856a11879ec79dc468efefaf2ee75 20-Jul-2007 Chris Lattner <sabre@nondot.org> At one point there were going to be lexer and parser tokens.
Since that point is now long gone, we should rename LexerToken to
Token, as it is the only kind of token we have.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40105 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/LexerToken.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroExpander.h
lang/Lex/MacroInfo.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/Token.h
lang/Parse/Action.h
lang/Parse/Parser.h
25bdb51276d3bfc180a68688082071505a00ed27 20-Jul-2007 Chris Lattner <sabre@nondot.org> simplify the lexer ctor to take a SLoc instead of a sloc and a redundant buffer*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40104 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
9dc1f530c086d2c16f8cba758b0f59a5bf41323a 20-Jul-2007 Chris Lattner <sabre@nondot.org> Reimplement SourceLocation. Instead of having a
fileid/offset pair, it now contains a bit discriminating between
mapped locations and file locations. This separates the tables for
macros and files in SourceManager, and allows better separation of
concepts in the rest of the compiler. This allows us to have *many*
macro instantiations before running out of 'addressing space'.

This is also more efficient, because testing whether something is a
macro expansion is now a bit test instead of a table lookup (which
also used to require having a srcmgr around, now it doesn't).

This is fully functional, but there are several refinements and
optimizations left.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40103 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Lex/Lexer.h
aff1edd84aaafef15b737acd8ec61abcca6d6bc3 19-Jul-2007 Steve Naroff <snaroff@apple.com> Finish fixing crasher with compound literals.

We still need to do sematic analysis (and implement initializers), however this
should complete the parsing & ast building for compound literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40067 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
4aa88f8d8469ced8fe04a0c411bbccc5d313e055 19-Jul-2007 Steve Naroff <snaroff@apple.com> Work towards fixing crasher with compound literals...

Before this commit, we crashed in ParseBinOp...

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang -parse-ast-check compound_literal.c
SemaExpr.cpp:1298: failed assertion `(rhs != 0) && "ParseBinOp(): missing right expression"'

With this commit, we still crash in the newly added action ParseCompoundLiteral (which is progress:-)

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang -parse-ast-check compound_literal.c
SemaExpr.cpp:478: failed assertion `(Op != 0) && "ParseCompoundLiteral(): missing expression"'

The crash go away once the actions return AST nodes. I will do this in a separate commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40032 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Action.h
76e773a443be9f006610f46529e07d4c8d857680 18-Jul-2007 Chris Lattner <sabre@nondot.org> implement i-c-e correct evaluation for sizeof/alignof, remove some obsolete fixme's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40012 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
5d2a6303467184b1f159bb6556efc434e50e3c28 18-Jul-2007 Chris Lattner <sabre@nondot.org> implement sizeof/alignof support for structs, unions and complex.

This allows us to compile this:

struct abc { char A; double D; };

int foo() {
return sizeof(struct abc);
return __alignof__(struct abc);
}

Into:

ret i32 16
ret i32 8



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40010 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/RecordLayout.h
lang/AST/Type.h
73322924127c873c13101b705dd823f5539ffa5f 18-Jul-2007 Steve Naroff <snaroff@apple.com> First round of extended vector support. Here is an overview...

- added ocu_vector_type attribute, Sema::HandleOCUVectorTypeAttribute().
- added new AST node, OCUVectorType, a subclass of VectorType.
- added ASTContext::getOCUVectorType.
- changed ASTContext::convertToVectorType() to ASTContext::getVectorType(). This is
unrelated to extended vectors, however I was in the vicinity and it was on my todo list.
Added a FIXME to Sema::HandleVectorTypeAttribute to deal with converting complex types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40007 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
lang/Basic/DiagnosticKinds.def
464175bba1318bef7905122e9fda20cff926df78 18-Jul-2007 Chris Lattner <sabre@nondot.org> initial layout support for structures and unions. This isn't actually
hooked up to anything, so it's not very useful yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40006 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/RecordLayout.h
a8fe39eb2b955253c113162533d62b555f389de7 18-Jul-2007 Chris Lattner <sabre@nondot.org> add accessors


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40005 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
6c36be5b383875b490684bcf439d6d427298c1af 18-Jul-2007 Chris Lattner <sabre@nondot.org> Add initial switch stmt support, patch by Anders Carlsson!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39989 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Stmt.h
lang/Basic/DiagnosticKinds.def
lang/Parse/Action.h
lang/Parse/Scope.h
251dcaf8616c6f04051e214f35cadb7de42aef7e 17-Jul-2007 Bill Wendling <isanbard@gmail.com> Return the correct type from isReferenceType().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39956 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
08ad47cbd1f81fcb31dbc731c13b885a07e12704 17-Jul-2007 Bill Wendling <isanbard@gmail.com> Fix references:
According to the spec (C++ 5p6[expr]), we need to adjust "T&" to
"T" before further analysis. We do this via the "implicit cast"
thingy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39953 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
16beff840865ce36794e495bce10fd0a3e473ab0 17-Jul-2007 Steve Naroff <snaroff@apple.com> Implement semantic analysis for the cast operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39943 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/DiagnosticKinds.def
a2c7767ce7d8feb10253f4b650826a20f3324c6f 17-Jul-2007 Chris Lattner <sabre@nondot.org> In the final step for preserving typedef info better in the AST, upgrade
isPointerType and isVectorType to only look through a single level of typedef
when one is present. For this invalid code:

typedef float float4 __attribute__((vector_size(16)));
typedef int int4 __attribute__((vector_size(16)));
typedef int4* int4p;
void test(float4 a, int4p result, int i) {
result[i] = a;
}

we now get:

t.c:5:15: error: incompatible types assigning 'float4' to 'int4'
result[i] = a;
~~~~~~~~~ ^ ~

instead of:

t.c:5:15: error: incompatible types assigning 'float4' to 'int __attribute__((vector_size(16)))'
result[i] = a;
~~~~~~~~~ ^ ~

The rest of the type predicates should be upgraded to do the same thing.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39932 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
ca51c97fbb10b9d48e1857e01c532493f87cd5f0 16-Jul-2007 Bill Wendling <isanbard@gmail.com> Constify the is*Lvalue() methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39907 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
97ba77cf09bf7b83b679165ce67ad7d49ffd568c 16-Jul-2007 Chris Lattner <sabre@nondot.org> Add a new Preprocessor::AdvanceToTokenCharacter method which, given a sloc
specifying the start of a token and a logical (phase 3) character number,
returns a sloc representing the input character corresponding to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39905 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
lang/Lex/Preprocessor.h
f66d3e390fac1dce6b0e3ff1a3d0180638e560f6 16-Jul-2007 Chris Lattner <sabre@nondot.org> factor a common predicate into a static method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39903 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/Lexer.h
9505581a3a89dec7f4fa323dd3e23ca9c3bcdce2 16-Jul-2007 Chris Lattner <sabre@nondot.org> Doug Gregor pointed out that _Complex actually isn't C++ at all.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39898 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TokenKinds.def
d4b80f1a0e946aa38c5db7d6f8afcdf05ed57116 16-Jul-2007 Chris Lattner <sabre@nondot.org> Add support for C++'0x keywords, patch by Doug Gregor



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39897 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/LangOptions.h
lang/Basic/TokenKinds.def
7a2e047c602d6ba28d6c434c990d4b9f7ef8c694 16-Jul-2007 Chris Lattner <sabre@nondot.org> Now that isPointerType can return a pointer type, avoid stripping off typedef
information in the common case. On this invalid code:

typedef float float4 __attribute__((vector_size(16)));
typedef int int4 __attribute__((vector_size(16)));
void test(float4 a, int4 *result, int i) {
result[i] = a;
}

we now generate:
t.c:5:15: error: incompatible types assigning 'float4' to 'int4'
instead of:
t.c:5:15: error: incompatible types assigning 'float4' to 'int __attribute__((vector_size(16)))'

This implements test/Sema/typedef-retain.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39892 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
3acb13805673d47be95829bd5a4b1707952c0b6f 16-Jul-2007 Chris Lattner <sabre@nondot.org> as a very useful feature, make isVectorType and isPointerType return
the actual vectortype or pointertype when they return success.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39890 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Type.h
26dc7b39267b7d29b35a7887a5b8e54697192192 16-Jul-2007 Chris Lattner <sabre@nondot.org> Remove an extraneous QualType from CastExpr, it's type is always
the result type of the expr node.

Implement isIntegerConstantExpr for ImplicitCastExpr nodes the same
was as for CastExpr nodes.

Implement proper sign/zero extension as well as truncation and noop
conversion in the i-c-e evaluator. This allows us to correctly
handle i-c-e's like these:

char array[1024/(sizeof (long))];
int x['\xBb' == (char) 187 ? 1: -1];

this implements test/Sema/i-c-e2.c



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39888 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
2eadfb638eb1bb6ccfd6fd0453e764d47e27eed9 16-Jul-2007 Chris Lattner <sabre@nondot.org> set the correct width for a character literal when evaluating it as an i-c-e.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39886 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
590b6646ef747d2f7b42e5f40487ff07642d7b6f 16-Jul-2007 Chris Lattner <sabre@nondot.org> Refactor code so that isIntegerConstantExpr has an ASTContext available.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39884 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/Type.h
abca2bba54197256f2830f757218cfbea2ed9cd1 15-Jul-2007 Chris Lattner <sabre@nondot.org> Change SourceManager::getInstantiationLoc to take virtual locations, doing its
virtual->physical mapping explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39867 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
fa2eaabd304172dd8afc561f6156a65f8d0e442b 15-Jul-2007 Steve Naroff <snaroff@apple.com> This is the final step/commit for implementing exlicit implicit casts. Unlike the
previous two checkins, which involved lot's of tedious refactoring, this checkin is nice and clean:-)

- Hacked UsualUnaryConversions, UsualArithmeticConversions, and DefaultFunctionArrayConversion
to create the AST node (using a helper function promoteExprToType).
- Added a setType method to Expr.
- Changed Expr::isIntegerConstantExpr to allow for the new node.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39866 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
9594acf32de2939b15eafa8fe818607bfc56bf66 15-Jul-2007 Chris Lattner <sabre@nondot.org> Cache macro expander objects to avoid thrashing malloc in heavy expansion situations.
This doesn't significantly improve carbon.h, but it does speed up
INPUTS/macro_pounder_obj.c by 48%



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39864 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroExpander.h
lang/Lex/Preprocessor.h
9e344c65b1e8b83e1d3ada507cf653526ff2c005 15-Jul-2007 Chris Lattner <sabre@nondot.org> Make parser scope cache be a member of the parser instead of a global,
which makes it multithread clean.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39863 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Parse/Parser.h
25c9648909193d380a4e135d2e3d25394ba12922 15-Jul-2007 Chris Lattner <sabre@nondot.org> switch function-like macros from using a vector for their arguments to an
explicitly new'd array. The array never mutates once created, so a vector
is overkill.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39862 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
f46f68b5587b6933a92260220567ea7c36924a80 15-Jul-2007 Chris Lattner <sabre@nondot.org> switch from using a vector to a smallvector for macro replacement tokens
This speeds up parsing carbon.h by 3.3% by avoiding some malloc traffic for
small macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39861 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
c215bd659d8266a1d6b66ce231a63405a4c61daf 15-Jul-2007 Chris Lattner <sabre@nondot.org> expose an iterator interface to getReplacementTokens instead of the datastructure itself.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39860 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/MacroInfo.h
d2d2a11a91d7ddf468bfb70f66362d24806ed601 14-Jul-2007 Chris Lattner <sabre@nondot.org> A significant refactoring of the type size stuff to also
compute type alignment. This info is needed for struct layout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39850 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/Basic/TargetInfo.h
90045e8ebabf50d6f1b3a67081a621b20b5e5341 14-Jul-2007 Steve Naroff <snaroff@apple.com> More changes related to implementing ImplicitCastExpr.

- Fixed a recent regression discovered by Keith Bauer (thanks!).
The fix involved adding (back) two arguments to UsualArithmeticConversions.
Without the reference arguments, no unary conversions were being passed back
to the caller. This had the effect of turning off the UsualUnaryConversions.
- Refactored CheckAssignmentConstraints into 3 functions. CheckAssignmentConstraints,
CheckSingleAssignmentConstraints, and CheckCompoundAssignmentConstraints.
- Changed the argument type of DefaultFunctionArrayConversion from QualType->Expr*&.
- Removed a bunch of casts in routines I was working on (cleanup).
- Fixed the visitor for ImplicitCastExpr (oops).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39840 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
692233e90a99c3a81dd04879d36eb9688f137c44 14-Jul-2007 Chris Lattner <sabre@nondot.org> Use target info to decide the sizes of basic types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39838 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/TargetInfo.h
a7674d8a9a69f3f6fe16e70cf2a3b2b15fb7c43d 14-Jul-2007 Chris Lattner <sabre@nondot.org> Move getSize() out of type, into ASTContext, where it has target info, and
where ASTContext can manage caches for struct layout, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39835 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
d0d560a0975c2f8c4a9559e84ec556b6a0baf7df 13-Jul-2007 Chris Lattner <sabre@nondot.org> eliminate extraneous type, add accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39830 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
49b4526992a8c8a6a290aa3efa9828154a24af8d 13-Jul-2007 Steve Naroff <snaroff@apple.com> Add (explicit) AST support for implicit casts. This should simplify the
code generator. Source translation tools can simply ignore this node.

- Added a new Expr node, ImplicitCastExpr.
- Changed UsualUnaryConversions/UsualArithmeticConversions to take references
to Expr *'s. This will allow these routines to instantiate the new AST node
and pass it back.
- Changed all clients of UsualUnary/UsualArithmetic (lot's of diff's).
- Changed some names in CheckConditionalOperands. Several variables where
only distinguished by their case (e.g. Cond, cond). Yuck (what was I thinking).
- Removed an old/crufty constructor in CastExpr (cleanup).

This check-in does not actually create the new AST node. I wanted to separate
the mechanical changes from the semantic changes. In addition, I need to
coordinate with Chris, since the semantic change will break the code generator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39814 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Expr.h
lang/AST/StmtNodes.def
88a69ad80e1550e9932666e6efa050a5b1223889 13-Jul-2007 Chris Lattner <sabre@nondot.org> implement support for basic codegen of global variables with no initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39795 91177308-0d34-0410-b5e6-96231b3b80d8
lang/CodeGen/ModuleBuilder.h
8b9023ba35a86838789e2c9034a6128728c547aa 13-Jul-2007 Chris Lattner <sabre@nondot.org> Implement codegen for + and - with pointers. Patch contributed by
Keith Bauer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39793 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/ASTContext.h
lang/AST/Type.h
6fa5f0943a84233b2e1ec9716eae55643225bfd4 12-Jul-2007 Chris Lattner <sabre@nondot.org> Fix "no newline at end of file" warnings. Patch contributed by
Benoit Boissinot!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39780 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Lex/LiteralSupport.h
9dc62f044a6ba21f503bd56607d94b32704e7945 12-Jul-2007 Chris Lattner <sabre@nondot.org> Improve portability to compilers where <cassert> is not implicitly
included. Patch contributed by Benoit Boissinot!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39779 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/SourceManager.h
lang/Lex/IdentifierTable.h
lang/Lex/Lexer.h
lang/Lex/MacroInfo.h
f86638365f4801ec2d2970f7c0663e94590618b8 12-Jul-2007 Chris Lattner <sabre@nondot.org> Allow this to compile on compilers where <string>
doesn't imply <cassert>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39778 91177308-0d34-0410-b5e6-96231b3b80d8
lang/Basic/Diagnostic.h
3724c00ab70b1f86ae1afa01587c4cb811570433 12-Jul-2007 Chris Lattner <sabre@nondot.org> add missing specification for a default argument. I guess g++ 4.0 doesn't
notice this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39776 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
24c3990cd2469f9692c4b0c3edea4fba67baaf6e 12-Jul-2007 Chris Lattner <sabre@nondot.org> remember the initializer for a variable in the AST and teach the
pretty printer to print it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39770 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/Decl.h
5f016e2cb5d11daeb237544de1c5d59f20fe1a6e 11-Jul-2007 Reid Spencer <rspencer@reidspencer.com> Stage two of getting CFE top correct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
lang/AST/AST.h
lang/AST/ASTContext.h
lang/AST/Builtins.def
lang/AST/Builtins.h
lang/AST/Decl.h
lang/AST/Expr.h
lang/AST/ExprCXX.h
lang/AST/Stmt.h
lang/AST/StmtNodes.def
lang/AST/StmtVisitor.h
lang/AST/Type.h
lang/Basic/Diagnostic.h
lang/Basic/DiagnosticKinds.def
lang/Basic/FileManager.h
lang/Basic/LangOptions.h
lang/Basic/SourceLocation.h
lang/Basic/SourceManager.h
lang/Basic/TargetInfo.h
lang/Basic/TokenKinds.def
lang/Basic/TokenKinds.h
lang/CodeGen/ModuleBuilder.h
lang/Lex/DirectoryLookup.h
lang/Lex/HeaderSearch.h
lang/Lex/IdentifierTable.h
lang/Lex/Lexer.h
lang/Lex/LexerToken.h
lang/Lex/LiteralSupport.h
lang/Lex/MacroExpander.h
lang/Lex/MacroInfo.h
lang/Lex/MultipleIncludeOpt.h
lang/Lex/PPCallbacks.h
lang/Lex/Pragma.h
lang/Lex/Preprocessor.h
lang/Lex/ScratchBuffer.h
lang/Parse/Action.h
lang/Parse/AttributeList.h
lang/Parse/DeclSpec.h
lang/Parse/Parser.h
lang/Parse/Scope.h
lang/Sema/ASTStreamer.h