]> granicus.if.org Git - clang/log
clang
14 years agotypo
Gabor Greif [Thu, 30 Sep 2010 15:22:01 +0000 (15:22 +0000)]
typo

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

14 years agoAdded two new command line arguments:
Marcin Swiderski [Thu, 30 Sep 2010 07:41:24 +0000 (07:41 +0000)]
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

14 years agoUpdated scan-build:
Tom Care [Thu, 30 Sep 2010 01:12:05 +0000 (01:12 +0000)]
Updated scan-build:
- Idempotent operations are on by default, to match --analyze in the driver.
- Integrated stats calculation based on parsing warnings emitted with the -analyzer-stats flag. The new -stats flag enables this.
- New -maxloop flag to pass down a maxloop value to the analyzer.

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

14 years agoInclude changes to VisitCXXMemberCallExpr (call visitor functions).
Ted Kremenek [Thu, 30 Sep 2010 01:06:29 +0000 (01:06 +0000)]
Include changes to VisitCXXMemberCallExpr (call visitor functions).

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

14 years agoChange CheckerVisitor so that [Pre,Post]VisitCallExpr only handles CallExprs for...
Ted Kremenek [Thu, 30 Sep 2010 01:06:26 +0000 (01:06 +0000)]
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

14 years agoMake the FileID import map key on FileID.
Sebastian Redl [Thu, 30 Sep 2010 01:03:06 +0000 (01:03 +0000)]
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

14 years agoIn MeasureTokenLength, the FileLoc supplied to the lexer must point to the start...
Sebastian Redl [Thu, 30 Sep 2010 01:03:03 +0000 (01:03 +0000)]
In MeasureTokenLength, the FileLoc supplied to the lexer must point to the start of the buffer, or we risk overflow.

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

14 years agoTweak nil receiver checker to not warning about 64-bit return values.
Ted Kremenek [Thu, 30 Sep 2010 00:37:10 +0000 (00:37 +0000)]
Tweak nil receiver checker to not warning about 64-bit return values.

Fixes: <rdar://problem/7513117>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115113 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAnalyzerStatsChecker improvements:
Tom Care [Wed, 29 Sep 2010 23:48:34 +0000 (23:48 +0000)]
AnalyzerStatsChecker improvements:
- Use BlockEntrance rather than BlockEdge to bring in line with UnreachableCodeChecker. Fixes an issue where unreached blocks would still be counted as reachable.
- Added warnings for all BlockAborted locations. This allows us to see where the analyzer stopped analyzing.

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

14 years agoModified the ccc-analyzer script to print the compiler command when log level verbosi...
Tom Care [Wed, 29 Sep 2010 23:48:31 +0000 (23:48 +0000)]
Modified the ccc-analyzer script to print the compiler command when log level verbosity is enabled. This is handy for debugging.

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

14 years agoChange -analyzer-max-nodes to allow 0 as a parameter. This allows the analyzer to...
Tom Care [Wed, 29 Sep 2010 23:48:13 +0000 (23:48 +0000)]
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

14 years agoAttach aritifical attribute with implicit parameters.
Devang Patel [Wed, 29 Sep 2010 23:09:21 +0000 (23:09 +0000)]
Attach aritifical attribute with implicit parameters.
Radar 8493141.

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

14 years agoImplicitParamDecl is always implicit.
Devang Patel [Wed, 29 Sep 2010 23:08:00 +0000 (23:08 +0000)]
ImplicitParamDecl is always implicit.

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

14 years agoEmit method access specifier.
Devang Patel [Wed, 29 Sep 2010 21:46:16 +0000 (21:46 +0000)]
Emit method access specifier.
Radar 8490416.

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

14 years agoUpdate docs to include proper location of clang binary.
Ted Kremenek [Wed, 29 Sep 2010 21:41:56 +0000 (21:41 +0000)]
Update docs to include proper location of clang binary.

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

14 years agoWhen performing template argument deduction of a function template
Douglas Gregor [Wed, 29 Sep 2010 21:14:36 +0000 (21:14 +0000)]
When performing template argument deduction of a function template
against a function type, be sure to check the type of the resulting
function template specialization against the desired function type
after substituting the deduced/defaulted template arguments. Fixes PR8196.

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

14 years agoUpdate to reflect DIFactory::CreateSubprogram() interface change from r115084.
Devang Patel [Wed, 29 Sep 2010 21:05:52 +0000 (21:05 +0000)]
Update to reflect DIFactory::CreateSubprogram() interface change from r115084.

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

14 years agoRemove dead code.
Devang Patel [Wed, 29 Sep 2010 20:05:01 +0000 (20:05 +0000)]
Remove dead code.

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

14 years agoBasic: Simplify getClangRepositoryPath and getClangRevision.
Daniel Dunbar [Wed, 29 Sep 2010 19:15:29 +0000 (19:15 +0000)]
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

14 years agoTest case for r115067.
Devang Patel [Wed, 29 Sep 2010 19:08:35 +0000 (19:08 +0000)]
Test case for r115067.

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

14 years agoAdd support for attribute((naked)), patch by Zoxc on cfe-commits!
Daniel Dunbar [Wed, 29 Sep 2010 18:20:25 +0000 (18:20 +0000)]
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

14 years agoFix handling of dependent nested namespace specifiers in UsingDecls
Douglas Gregor [Wed, 29 Sep 2010 17:58:28 +0000 (17:58 +0000)]
Fix handling of dependent nested namespace specifiers in UsingDecls
during template instantiation, from Martin Vejnar!

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

14 years agoBasic: Add support for git svn to get the repo version in clang executable,
Daniel Dunbar [Wed, 29 Sep 2010 17:57:10 +0000 (17:57 +0000)]
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

14 years agoFrontend/XML: Add support for printing nested structures, patch by Martin Vejnár!
Daniel Dunbar [Wed, 29 Sep 2010 16:09:28 +0000 (16:09 +0000)]
Frontend/XML: Add support for printing nested structures, patch by Martin Vejnár!

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

14 years agoDefine _Bool, bool, true, and false macros in <stdbool.h> when we're
Douglas Gregor [Wed, 29 Sep 2010 04:57:11 +0000 (04:57 +0000)]
Define _Bool, bool, true, and false macros in <stdbool.h> when we're
in a GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>.

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

14 years agoMove the management of the set of conversion functions in a C++ class
Douglas Gregor [Wed, 29 Sep 2010 04:25:11 +0000 (04:25 +0000)]
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

14 years agoVisit the type information for CXXUnresolvedConstructExpr, just like
Craig Silverstein [Wed, 29 Sep 2010 04:14:20 +0000 (04:14 +0000)]
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

14 years agoMove the maintenance of CXXRecordDecl::DefinitionData's Abstract bit
Douglas Gregor [Wed, 29 Sep 2010 00:15:42 +0000 (00:15 +0000)]
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

14 years agoenhance tentative parsing to handle ms extensions, patch by Martin Vejnar!
Chris Lattner [Tue, 28 Sep 2010 23:35:09 +0000 (23:35 +0000)]
enhance tentative parsing to handle ms extensions, patch by Martin Vejnar!

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

14 years agoTeach FunctionDecl::setPure() to (indirectly) mark the Abstract bit in
Douglas Gregor [Tue, 28 Sep 2010 21:55:22 +0000 (21:55 +0000)]
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

14 years agoAdd test case for <rdar://problem/8452791> (fixed in r114392).
Ted Kremenek [Tue, 28 Sep 2010 21:11:07 +0000 (21:11 +0000)]
Add test case for <rdar://problem/8452791> (fixed in r114392).

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

14 years agoReinstate r114925 and r114929, both steps toward
Douglas Gregor [Tue, 28 Sep 2010 20:50:54 +0000 (20:50 +0000)]
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

14 years agovla expressions used in __typeof__ must be evaluated.
Fariborz Jahanian [Tue, 28 Sep 2010 20:42:35 +0000 (20:42 +0000)]
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

14 years agoCentralize the management of CXXRecordDecl::DefinitionData's Empty bit
Douglas Gregor [Tue, 28 Sep 2010 20:38:10 +0000 (20:38 +0000)]
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

14 years agoFollow-up to r114978, used wrong tag.
Sebastian Redl [Tue, 28 Sep 2010 20:28:50 +0000 (20:28 +0000)]
Follow-up to r114978, used wrong tag.

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

14 years agoMove ExternalSemaSource::ReadMethodPool's implementation to Sema.cpp so that the...
Sebastian Redl [Tue, 28 Sep 2010 20:23:00 +0000 (20:23 +0000)]
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

14 years agoReinstate r114921, which I've exonerated via a self-host build.
Douglas Gregor [Tue, 28 Sep 2010 19:45:33 +0000 (19:45 +0000)]
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

14 years agoWhen we have two identifiers in a row in Objective-C, make sure to
Douglas Gregor [Tue, 28 Sep 2010 17:48:56 +0000 (17:48 +0000)]
When we have two identifiers in a row in Objective-C, make sure to
verify that we aren't in a message-send expression before digging into
the identifier or looking ahead more tokens. Fixes a regression
(<rdar://problem/8483253>) I introduced with bracket insertion.

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

14 years agoDon't warn with -Wbool-conversions if the user wrote an explicit cast like "(void...
Argyrios Kyrtzidis [Tue, 28 Sep 2010 14:54:11 +0000 (14:54 +0000)]
Don't warn with -Wbool-conversions if the user wrote an explicit cast like "(void *)false".
Fixes rdar://8459342.

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

14 years agoDon't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.
Argyrios Kyrtzidis [Tue, 28 Sep 2010 14:54:07 +0000 (14:54 +0000)]
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

14 years agoFix a bug in loading macro records. Fixes yet another crash in libclang.
Sebastian Redl [Tue, 28 Sep 2010 02:55:49 +0000 (02:55 +0000)]
Fix a bug in loading macro records. Fixes yet another crash in libclang.

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

14 years agoFix a use of an invalidated reference due to a hash map reallocating.
Sebastian Redl [Tue, 28 Sep 2010 02:24:44 +0000 (02:24 +0000)]
Fix a use of an invalidated reference due to a hash map reallocating.

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

14 years agoAccidentally committed some temporary changes on my branch when reverting patches.
Bill Wendling [Tue, 28 Sep 2010 01:28:56 +0000 (01:28 +0000)]
Accidentally committed some temporary changes on my branch when reverting patches.

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

14 years agoTemporarily revert 114929 114925 114924 114921. It looked like they (or at least
Bill Wendling [Tue, 28 Sep 2010 01:09:49 +0000 (01:09 +0000)]
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

14 years agoCentralize the management of CXXRecordDecl::DefinitionData's
Douglas Gregor [Tue, 28 Sep 2010 00:00:00 +0000 (00:00 +0000)]
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

14 years agoCentralize the management of CXXRecordDecl::DefinitionData's
Douglas Gregor [Mon, 27 Sep 2010 23:39:06 +0000 (23:39 +0000)]
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

14 years agoCentralize the management of CXXRecordDecl::DefinitionData's Empty bit
Douglas Gregor [Mon, 27 Sep 2010 23:31:14 +0000 (23:31 +0000)]
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

14 years agoMy previous fix was incorrect for non-chained PCH reuse. Fix again.
Sebastian Redl [Mon, 27 Sep 2010 23:20:01 +0000 (23:20 +0000)]
My previous fix was incorrect for non-chained PCH reuse. Fix again.

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

14 years agoCentralize the management of CXXRecordDecl::DefinitionData's Aggregate
Douglas Gregor [Mon, 27 Sep 2010 23:16:44 +0000 (23:16 +0000)]
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

14 years agoCentralize the handling of CXXRecordDecl::DefinitionData's
Douglas Gregor [Mon, 27 Sep 2010 22:48:58 +0000 (22:48 +0000)]
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

14 years agoPatch to support transparent_union arguments
Fariborz Jahanian [Mon, 27 Sep 2010 22:42:37 +0000 (22:42 +0000)]
Patch to support transparent_union arguments
passed to nonnull attributed functions. Implements radar
6857843.

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

14 years agoKill FunctionDecl's IsCopyAssignment bit; it duplicated what could
Douglas Gregor [Mon, 27 Sep 2010 22:37:28 +0000 (22:37 +0000)]
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

14 years agoWhen chaining PCHs, only write PPRecords that don't come from PCH, and give them...
Sebastian Redl [Mon, 27 Sep 2010 22:18:47 +0000 (22:18 +0000)]
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

14 years agoCentralize the handling of
Douglas Gregor [Mon, 27 Sep 2010 22:06:20 +0000 (22:06 +0000)]
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

14 years agoRevert my patch changing the MMX "shift" intrinsics that take immediates into
Bill Wendling [Mon, 27 Sep 2010 21:22:25 +0000 (21:22 +0000)]
Revert my patch changing the MMX "shift" intrinsics that take immediates into
"shift with non-immediate" intrinsics. It gets here because we they aren't
immediates anymore.

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

14 years agoClean up the handling of the DeclaredDefaultConstructor and
Douglas Gregor [Mon, 27 Sep 2010 21:17:54 +0000 (21:17 +0000)]
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

14 years agoCorrectly set "explicit template instantiation" kind on inner structs of templates...
Nico Weber [Mon, 27 Sep 2010 21:02:09 +0000 (21:02 +0000)]
Correctly set "explicit template instantiation" kind on inner structs of templates whose explicit instantiation is first declared and then defined.

Fixes http://llvm.org/pr8207

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

14 years agoLet lit give helpful advice if 'make test' was not run yet.
Nico Weber [Mon, 27 Sep 2010 20:40:32 +0000 (20:40 +0000)]
Let lit give helpful advice if 'make test' was not run yet.

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

14 years agoutils/ABITest: Factor out type naming code slightly.
Daniel Dunbar [Mon, 27 Sep 2010 20:13:24 +0000 (20:13 +0000)]
utils/ABITest: Factor out type naming code slightly.

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

14 years agoutils/ABITest: Tweak default bit-field types to cover some more interesting cases.
Daniel Dunbar [Mon, 27 Sep 2010 20:13:22 +0000 (20:13 +0000)]
utils/ABITest: Tweak default bit-field types to cover some more interesting cases.

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

14 years agoutils/ABITest: Add a workaround for mismatches due to PR5579.
Daniel Dunbar [Mon, 27 Sep 2010 20:13:19 +0000 (20:13 +0000)]
utils/ABITest: Add a workaround for mismatches due to PR5579.

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

14 years agoutils/ABITest: Add option to skip individual tests by index.
Daniel Dunbar [Mon, 27 Sep 2010 20:13:17 +0000 (20:13 +0000)]
utils/ABITest: Add option to skip individual tests by index.

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

14 years agoFrontend: Teach clang -cc1as to respond to -v.
Daniel Dunbar [Mon, 27 Sep 2010 20:13:13 +0000 (20:13 +0000)]
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

14 years agoIssue warning for trivial cases of nonnull attributes
Fariborz Jahanian [Mon, 27 Sep 2010 19:05:51 +0000 (19:05 +0000)]
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

14 years agoCopying result of object property reference expression
Fariborz Jahanian [Mon, 27 Sep 2010 17:30:38 +0000 (17:30 +0000)]
Copying result of object property reference expression
into a temporary is elidable as well.
(Finishes up radar 8291337).

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

14 years agoRemove libclang logging code
Douglas Gregor [Mon, 27 Sep 2010 16:43:25 +0000 (16:43 +0000)]
Remove libclang logging code

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

14 years agoFixed isConstantInitializer for __builtin_choose_expr.
Abramo Bagnara [Mon, 27 Sep 2010 07:13:32 +0000 (07:13 +0000)]
Fixed isConstantInitializer for __builtin_choose_expr.

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

14 years agoFix coding standard mistake from my last commit.
Michael J. Spencer [Mon, 27 Sep 2010 06:34:47 +0000 (06:34 +0000)]
Fix coding standard mistake from my last commit.

That, and keep aKor happy :P.

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

14 years agoLexer: Implement GCC's version of pragma message.
Michael J. Spencer [Mon, 27 Sep 2010 06:19:02 +0000 (06:19 +0000)]
Lexer: Implement GCC's version of pragma message.

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

14 years agoEnable caching of global code completion results in the suggested
Douglas Gregor [Mon, 27 Sep 2010 05:49:58 +0000 (05:49 +0000)]
Enable caching of global code completion results in the suggested
libclang options for editing a translation unit.

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

14 years agoDriver/Linux: Translate rewritten lib options back to standard -l form when
Daniel Dunbar [Sat, 25 Sep 2010 18:10:05 +0000 (18:10 +0000)]
Driver/Linux: Translate rewritten lib options back to standard -l form when
using generic GCC tools.

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

14 years agoIn preparation for adding generation of destructors for objects with automatic storag...
Marcin Swiderski [Sat, 25 Sep 2010 11:05:21 +0000 (11:05 +0000)]
In preparation for adding generation of destructors for objects with automatic storage added:
- LocalScope class with iterator used to pointing into it,
- fat doxygen comment for LocalScope indended usage,
- BlockScopePosPair class used for storing jump targets/sources (for: goto, break, continue), that replaces raw CFGBlock pointer used earlier for this purpose.

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

14 years agoFix a NYI in IRGen which was due to incorrect AST
Fariborz Jahanian [Sat, 25 Sep 2010 01:08:05 +0000 (01:08 +0000)]
Fix a NYI in IRGen which was due to incorrect AST
for property reference expression (of c++ object type)
in the conditional expression. Fixes // rdar://8291337

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

14 years agoWhen setting the globally-visible declarations for a particular
Douglas Gregor [Fri, 24 Sep 2010 23:29:12 +0000 (23:29 +0000)]
When setting the globally-visible declarations for a particular
identifier, we may have a Sema object but no translation unit scope
(because parsing is finished). In this case, we still need to update
the IdResolver, which might still be used when writing a PCH
containing another PCH (without chaining). This bug manifested as a
failure with precompiled preambles.

Also, add a little environment-variable-sensitive logging for
libclang.

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

14 years agoAllow the use of C++0x deleted functions as an extension in C++98.
Anders Carlsson [Fri, 24 Sep 2010 21:25:25 +0000 (21:25 +0000)]
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

14 years agoTeach libclang to enable multithreading in LLVM, since libclang clients are likely...
Douglas Gregor [Fri, 24 Sep 2010 21:18:36 +0000 (21:18 +0000)]
Teach libclang to enable multithreading in LLVM, since libclang clients are likely to be multithreaded. Also move the printing of timers to somewhere better for multithreaded libclang clients

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

14 years agoDriver: Add -fallow-unsupported which disables some of the eager error'ing we do
Daniel Dunbar [Fri, 24 Sep 2010 19:39:37 +0000 (19:39 +0000)]
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

14 years agoFix rewriting of property declared in @protocol's.
Fariborz Jahanian [Fri, 24 Sep 2010 18:36:58 +0000 (18:36 +0000)]
Fix rewriting of property declared in @protocol's.
Fixed //rdar://8472487.

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

14 years agoPatch implements passing arrays to functions expecting
Fariborz Jahanian [Fri, 24 Sep 2010 17:30:16 +0000 (17:30 +0000)]
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

14 years agoUpdate Clang man page to say a little bit more about C++
Douglas Gregor [Fri, 24 Sep 2010 17:26:14 +0000 (17:26 +0000)]
Update Clang man page to say a little bit more about C++

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

14 years agoRemove this test for now until I figure out how to get it to work with c-index-test...
Ted Kremenek [Fri, 24 Sep 2010 02:43:32 +0000 (02:43 +0000)]
Remove this test for now until I figure out how to get it to work with c-index-test in a portable way.

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

14 years agoPass -fobjc-nonfragile-abi2 in test.
Ted Kremenek [Fri, 24 Sep 2010 02:00:46 +0000 (02:00 +0000)]
Pass -fobjc-nonfragile-abi2 in test.

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

14 years agoSince this test depends on default ivar synthesis, specify the target triple. This...
Ted Kremenek [Fri, 24 Sep 2010 01:51:38 +0000 (01:51 +0000)]
Since this test depends on default ivar synthesis, specify the target triple.  This hopefully unbreaks the buildbot
on some archs.

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

14 years agoUpdate comment in test with reference to bug report.
Ted Kremenek [Fri, 24 Sep 2010 01:24:15 +0000 (01:24 +0000)]
Update comment in test with reference to bug report.

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

14 years agoDefault synthesized ivars don't really have a location in the source. Using the...
Ted Kremenek [Fri, 24 Sep 2010 01:23:01 +0000 (01:23 +0000)]
Default synthesized ivars don't really have a location in the source.  Using the location of the @implementation
is just confusing for clients that want to use SourceLocations for syntactic references.

Fixes: <rdar://problem/8470540>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114714 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert r114712 due to failure on darwin buildbot.
Nick Lewycky [Fri, 24 Sep 2010 00:46:53 +0000 (00:46 +0000)]
Revert r114712 due to failure on darwin buildbot.

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

14 years agoMake -M/-MM behave like in gcc; use -MF first then -o else use stdout.
Nick Lewycky [Thu, 23 Sep 2010 23:49:25 +0000 (23:49 +0000)]
Make -M/-MM behave like in gcc; use -MF first then -o else use stdout.

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

14 years agoFix header comment so we don't break emacs.
Nick Lewycky [Thu, 23 Sep 2010 23:48:20 +0000 (23:48 +0000)]
Fix header comment so we don't break emacs.

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

14 years agoSynchronize globally-cached code completion results with the results
Douglas Gregor [Thu, 23 Sep 2010 23:01:17 +0000 (23:01 +0000)]
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

14 years agoFix typo.
Nick Lewycky [Thu, 23 Sep 2010 21:43:57 +0000 (21:43 +0000)]
Fix typo.

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

14 years agoWhen warning about comparing an unsigned int to being >= 0, don't issue a warning...
Ted Kremenek [Thu, 23 Sep 2010 21:43:44 +0000 (21:43 +0000)]
When warning about comparing an unsigned int to being >= 0, don't issue a warning if the zero value was an
enum or was expanded from a macro.

Fixes: <rdar://problem/8414119>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114695 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd test case for c-index-test showing that @property declarations added in class...
Ted Kremenek [Thu, 23 Sep 2010 21:25:13 +0000 (21:25 +0000)]
Add test case for c-index-test showing that @property declarations added in class extensions don't get reported
in the @interface.

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

14 years agoFor properties declared in a @protocol and redeclared in a class extension, use the...
Ted Kremenek [Thu, 23 Sep 2010 21:18:05 +0000 (21:18 +0000)]
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

14 years agoAdd some missing concurrency checks into libclang
Douglas Gregor [Thu, 23 Sep 2010 18:47:53 +0000 (18:47 +0000)]
Add some missing concurrency checks into libclang

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

14 years agoFix bogus compiler errors when declaring anonymous union, outside a class, with
Argyrios Kyrtzidis [Thu, 23 Sep 2010 14:26:01 +0000 (14:26 +0000)]
Fix bogus compiler errors when declaring anonymous union, outside a class, with
members with the same name as a decl outside the scope where the members are actually introduced.
Fixes http://llvm.org/PR6741

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

14 years agoIf -fcolor-diagnostics is explicitly passed to the driver respect that even if the...
Argyrios Kyrtzidis [Thu, 23 Sep 2010 12:56:06 +0000 (12:56 +0000)]
If -fcolor-diagnostics is explicitly passed to the driver respect that even if the driver is of the opinion that
stderr can't handle them. (see http://llvm.org/PR8150)
Patch by Frits van Bommel!

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

14 years agoDon't crash on _Imaginary.
Argyrios Kyrtzidis [Thu, 23 Sep 2010 09:40:31 +0000 (09:40 +0000)]
Don't crash on _Imaginary.

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

14 years agoUse -emit-llvm-only in the test.
Argyrios Kyrtzidis [Thu, 23 Sep 2010 09:40:20 +0000 (09:40 +0000)]
Use -emit-llvm-only in the test.

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

14 years agoRefactor GRExprEngine::VisitCall() to use EvalArguments(), just like VisitCXXMemberCa...
Ted Kremenek [Thu, 23 Sep 2010 05:14:51 +0000 (05:14 +0000)]
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

14 years agoTweak test to pass -ffreestanding, to avoid platform dependent header issues.
Daniel Dunbar [Thu, 23 Sep 2010 04:40:10 +0000 (04:40 +0000)]
Tweak test to pass -ffreestanding, to avoid platform dependent header issues.

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