]> granicus.if.org Git - clang/log
clang
13 years agoAvoid do drop outer template parameter lists on the floor.
Abramo Bagnara [Thu, 10 Mar 2011 13:28:31 +0000 (13:28 +0000)]
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

13 years agoFixed class type generation for MemberPointerType.
Abramo Bagnara [Thu, 10 Mar 2011 10:18:27 +0000 (10:18 +0000)]
Fixed class type generation for MemberPointerType.

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

13 years agoWhen doing reachability analysis for warnings issued under DiagRuntimeBehavior, don...
Ted Kremenek [Thu, 10 Mar 2011 03:50:34 +0000 (03:50 +0000)]
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

13 years agoInstead of round up sizes to '8', round them up to the alignment of the char
Ken Dyck [Thu, 10 Mar 2011 02:00:35 +0000 (02:00 +0000)]
Instead of round up sizes to '8', round them up to the alignment of the char
type.

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

13 years agoRound up the non-virtual size to the next char instead of rounding down.
Ken Dyck [Thu, 10 Mar 2011 01:53:59 +0000 (01:53 +0000)]
Round up the non-virtual size to the next char instead of rounding down.

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

13 years agoRequire AddStmtChoice::alwaysAdd() to take a CFGBuilder& and Stmt*. Prep for functio...
Ted Kremenek [Thu, 10 Mar 2011 01:14:11 +0000 (01:14 +0000)]
Require AddStmtChoice::alwaysAdd() to take a CFGBuilder& and Stmt*.  Prep for functionality changes.

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

13 years agoRemove unused 'AddStmtChoice' argument to CFGBuilder::appendStmt().
Ted Kremenek [Thu, 10 Mar 2011 01:14:08 +0000 (01:14 +0000)]
Remove unused 'AddStmtChoice' argument to CFGBuilder::appendStmt().

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

13 years agoRework interaction between AnalysisContext and CFG::BuildOptions to keep a BuildOptio...
Ted Kremenek [Thu, 10 Mar 2011 01:14:05 +0000 (01:14 +0000)]
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

13 years agoRevert r127206 "Detect attempts to provide a specialization of a function within
Daniel Dunbar [Wed, 9 Mar 2011 23:24:34 +0000 (23:24 +0000)]
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

13 years agoSilence gcc warnings.
Argyrios Kyrtzidis [Wed, 9 Mar 2011 23:15:22 +0000 (23:15 +0000)]
Silence gcc warnings.

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

13 years agoProperty setter/getter must be looked up in property type's
Fariborz Jahanian [Wed, 9 Mar 2011 22:17:12 +0000 (22:17 +0000)]
Property setter/getter must be looked up in property type's
list of protocols as well. // rdar://9078584

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

13 years agoFix CMake build.
Argyrios Kyrtzidis [Wed, 9 Mar 2011 21:12:34 +0000 (21:12 +0000)]
Fix CMake build.

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

13 years agoLookup selector in protocol list of qualified objc type
Fariborz Jahanian [Wed, 9 Mar 2011 20:18:06 +0000 (20:18 +0000)]
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

13 years agoIntroduce '-chain-include' option to specify headers that will be converted to chaine...
Argyrios Kyrtzidis [Wed, 9 Mar 2011 17:21:42 +0000 (17:21 +0000)]
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

13 years agoMention an XML printer on the Open Projects page
Douglas Gregor [Wed, 9 Mar 2011 16:27:48 +0000 (16:27 +0000)]
Mention an XML printer on the Open Projects page

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

13 years agoFixed InnerLocStart.
Abramo Bagnara [Wed, 9 Mar 2011 14:09:51 +0000 (14:09 +0000)]
Fixed InnerLocStart.

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

13 years agoinclude/clang/Basic/BuiltinsX86.def: __builtin_ia32_crc32**() should be defined to...
NAKAMURA Takumi [Wed, 9 Mar 2011 12:00:19 +0000 (12:00 +0000)]
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

13 years agoFileCheckize this test.
Chandler Carruth [Wed, 9 Mar 2011 10:56:54 +0000 (10:56 +0000)]
FileCheckize this test.

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

13 years agoinclude/clang/Makefile: [PR2928] "make install" may install include files along expli...
NAKAMURA Takumi [Wed, 9 Mar 2011 09:12:20 +0000 (09:12 +0000)]
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

13 years agoRemove a rather egregious use of getFunctionInfo.
John McCall [Wed, 9 Mar 2011 08:39:33 +0000 (08:39 +0000)]
Remove a rather egregious use of getFunctionInfo.

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

13 years agoFix three of the four places where I left breadcrumbs to avoid unnecessary
John McCall [Wed, 9 Mar 2011 08:12:35 +0000 (08:12 +0000)]
Fix three of the four places where I left breadcrumbs to avoid unnecessary
recomputation.

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

13 years agoTame this assert, hopefully fixing self-host.
John McCall [Wed, 9 Mar 2011 07:12:35 +0000 (07:12 +0000)]
Tame this assert, hopefully fixing self-host.

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

13 years agoWhen deserializing CXXBaseSpecifiers (and offsets), make sure to walk the chain in...
Anders Carlsson [Wed, 9 Mar 2011 05:09:32 +0000 (05:09 +0000)]
When deserializing CXXBaseSpecifiers (and offsets), make sure to walk the chain in the correct order.

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

13 years agoUse the "undergoes default argument promotion" bit on parameters to
John McCall [Wed, 9 Mar 2011 04:27:21 +0000 (04:27 +0000)]
Use the "undergoes default argument promotion" bit on parameters to
simplify the logic of initializing function parameters so that we don't need
both a variable declaration and a type in FunctionArgList.  This also means
that we need to propagate the CGFunctionInfo down in a lot of places rather
than recalculating it from the FAL.  There's more we can do to eliminate
redundancy here, and I've left FIXMEs behind to do it.

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

13 years agoAdd a bit to ParmVarDecl indicating whether the parameter undergoes
John McCall [Wed, 9 Mar 2011 04:22:44 +0000 (04:22 +0000)]
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

13 years agoc-index-test.c: Fix cygwin warning not to pass signed char to islower(c).
NAKAMURA Takumi [Wed, 9 Mar 2011 03:02:28 +0000 (03:02 +0000)]
c-index-test.c: Fix cygwin warning not to pass signed char to islower(c).

Cygwin's ctype.h says;
/* These macros are intentionally written in a manner that will trigger
   a gcc -Wall warning if the user mistakenly passes a 'char' instead
   of an int containing an 'unsigned char'.
   (snip) */

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

13 years ago#include Store.h into BasicValueFactory.cpp to provide definitions of StoreRef constr...
Ted Kremenek [Tue, 8 Mar 2011 23:39:37 +0000 (23:39 +0000)]
#include Store.h into BasicValueFactory.cpp to provide definitions of StoreRef constructor.

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

13 years agoAdd 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceM...
Argyrios Kyrtzidis [Tue, 8 Mar 2011 23:35:24 +0000 (23:35 +0000)]
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

13 years agostatic analyzer: Fix use-after-free bug in RegionStore involving LazyCompoundValueDat...
Ted Kremenek [Tue, 8 Mar 2011 23:18:00 +0000 (23:18 +0000)]
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

13 years agoFixed isEmbeddedInDeclarator flag loading.
Abramo Bagnara [Tue, 8 Mar 2011 22:33:38 +0000 (22:33 +0000)]
Fixed isEmbeddedInDeclarator flag loading.

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

13 years agotest/Makefile: Reapply r127079, use $(ECHOPATH) to make lit.site.cfg(s).
NAKAMURA Takumi [Tue, 8 Mar 2011 22:17:40 +0000 (22:17 +0000)]
test/Makefile: Reapply r127079, use $(ECHOPATH) to make lit.site.cfg(s).

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

13 years agolibclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated one.
NAKAMURA Takumi [Tue, 8 Mar 2011 22:17:33 +0000 (22:17 +0000)]
libclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated one.

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

13 years agoMake the Objective-C checker look for subclasses of NSString instead of just NSString...
Anders Carlsson [Tue, 8 Mar 2011 20:05:26 +0000 (20:05 +0000)]
Make the Objective-C checker look for subclasses of NSString instead of just NSString and NSMutableString.

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

13 years agoClarify the context in which an Objective-C type name is being parsed
Douglas Gregor [Tue, 8 Mar 2011 19:17:54 +0000 (19:17 +0000)]
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

13 years agoWarn on usage of unavailable objc 'class' in
Fariborz Jahanian [Tue, 8 Mar 2011 19:12:46 +0000 (19:12 +0000)]
Warn on usage of unavailable objc 'class' in
varienty of cases. // rdar://9092208

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

13 years agoTeach libclang's token-annotation logic about context-sensitive
Douglas Gregor [Tue, 8 Mar 2011 17:10:18 +0000 (17:10 +0000)]
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

13 years agoFixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for...
Abramo Bagnara [Tue, 8 Mar 2011 16:41:52 +0000 (16:41 +0000)]
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

13 years agoWhen writing file references in a pch, make sure to ask the file manager for the...
Anders Carlsson [Tue, 8 Mar 2011 16:04:35 +0000 (16:04 +0000)]
When writing file references in a pch, make sure to ask the file manager for the absolute path.

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

13 years agoFixed NamespaceDecl source range.
Abramo Bagnara [Tue, 8 Mar 2011 12:38:20 +0000 (12:38 +0000)]
Fixed NamespaceDecl source range.

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

13 years agolib/Basic/Targets.cpp: mingw-w64 should define __MINGW32__, too.
NAKAMURA Takumi [Tue, 8 Mar 2011 12:06:46 +0000 (12:06 +0000)]
lib/Basic/Targets.cpp: mingw-w64 should define __MINGW32__, too.

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

13 years agoFixed bitfields source range.
Abramo Bagnara [Tue, 8 Mar 2011 11:07:11 +0000 (11:07 +0000)]
Fixed bitfields source range.

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

13 years agoEmit block capture initializers as if they were normal initializers for a local
John McCall [Tue, 8 Mar 2011 09:38:48 +0000 (09:38 +0000)]
Emit block capture initializers as if they were normal initializers for a local
variable that just happens to be stored in a wierd place.

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

13 years agoExtract a function to emit an arbitrary expression as if it were the initializer
John McCall [Tue, 8 Mar 2011 09:11:50 +0000 (09:11 +0000)]
Extract a function to emit an arbitrary expression as if it were the initializer
for a local variable.

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

13 years agoFixed source range for all DeclaratorDecl's.
Abramo Bagnara [Tue, 8 Mar 2011 08:55:46 +0000 (08:55 +0000)]
Fixed source range for all DeclaratorDecl's.

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

13 years agoRemoved trailing whitespace as a test commit
John Wiegley [Tue, 8 Mar 2011 08:13:22 +0000 (08:13 +0000)]
Removed trailing whitespace as a test commit

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

13 years agoFix my earlier commit to work with escaped newlines and leave breadcrumbs
John McCall [Tue, 8 Mar 2011 07:59:04 +0000 (07:59 +0000)]
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

13 years agoobjc_gc wants a pointer type, not a function type; give it a more appropriate
John McCall [Tue, 8 Mar 2011 04:17:03 +0000 (04:17 +0000)]
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

13 years agoUpdate the check for a NULL macro to use Preprocessor::getSpelling().
John McCall [Tue, 8 Mar 2011 04:07:54 +0000 (04:07 +0000)]
Update the check for a NULL macro to use Preprocessor::getSpelling().

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

13 years agoAdd an API call to retrieve the spelling data of a token from its SourceLocation.
John McCall [Tue, 8 Mar 2011 04:06:57 +0000 (04:06 +0000)]
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

13 years agoDetect attempts to provide a specialization of a function within a
Douglas Gregor [Tue, 8 Mar 2011 02:04:14 +0000 (02:04 +0000)]
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

13 years agoFix tests to account for new warning "expected ';' at end of declaration list". ...
Carl Norum [Mon, 7 Mar 2011 22:57:45 +0000 (22:57 +0000)]
Fix tests to account for new warning "expected ';' at end of declaration list".  Sorry, folks!

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

13 years agoWhen we adjust the inline ASM type, we need to take into account an early
Bill Wendling [Mon, 7 Mar 2011 22:47:14 +0000 (22:47 +0000)]
When we adjust the inline ASM type, we need to take into account an early
clobber with the 'y' constraint. Otherwise, we get the wrong return type and an
assert, because it created a '<1 x i64>' vector type instead of the x86_mmx
type.

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

13 years agoAllow passing '-###' to ASTUnit::LoadFromCommandLine to print out the cc1 options.
Argyrios Kyrtzidis [Mon, 7 Mar 2011 22:45:01 +0000 (22:45 +0000)]
Allow passing '-###' to ASTUnit::LoadFromCommandLine to print out the cc1 options.

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

13 years agoChange diagnostic message from "Extension" to "ExtWarn" to find more problems with...
Carl Norum [Mon, 7 Mar 2011 22:19:06 +0000 (22:19 +0000)]
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

13 years agoFix null dereference in CFGBlock::FilterEdge that was reported in PR 9412.
Ted Kremenek [Mon, 7 Mar 2011 22:04:39 +0000 (22:04 +0000)]
Fix null dereference in CFGBlock::FilterEdge that was reported in PR 9412.

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

13 years agoCodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGe...
Devang Patel [Mon, 7 Mar 2011 21:53:18 +0000 (21:53 +0000)]
CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGenFunction::GenerateCode()

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

13 years agog++ is more permissive regarding flexible arrays.
Argyrios Kyrtzidis [Mon, 7 Mar 2011 20:04:04 +0000 (20:04 +0000)]
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

13 years agoDebugInfo can be enabled or disabled at function level (e.g. using an attribute)...
Devang Patel [Mon, 7 Mar 2011 18:45:56 +0000 (18:45 +0000)]
DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not.

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

13 years agoDo not emit stop point for CXXDefaultArgExpr. It results in suboptimial user experience.
Devang Patel [Mon, 7 Mar 2011 18:29:53 +0000 (18:29 +0000)]
Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user experience.

21 int main() {
22  A a;

For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr.

This fixes ostream-defined.exp regression from gdb testsuite.

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

13 years agoSupport explicit template specialization and instantiation for members
Douglas Gregor [Mon, 7 Mar 2011 16:54:27 +0000 (16:54 +0000)]
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

13 years agoWhen rebuilding a dependent template specialization type to another
Douglas Gregor [Mon, 7 Mar 2011 15:13:34 +0000 (15:13 +0000)]
When rebuilding a dependent template specialization type to another
dependent template specialization type, make sure to set the keyword
location. Fixes some valgrind issues introduced in r127150.

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

13 years agoThe conditional needs to be pushed before the branch. Make the test less
John McCall [Mon, 7 Mar 2011 03:12:35 +0000 (03:12 +0000)]
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

13 years agoWhen transforming a dependent template specialization type, make sure
Douglas Gregor [Mon, 7 Mar 2011 02:33:33 +0000 (02:33 +0000)]
When transforming a dependent template specialization type, make sure
to set the source-location information for the template arguments to
the *transformed* source-location information, not the original
source-location information. Fixes <rdar://problem/8986308> (a libc++
SFINAE issue) and the Boost.Polygon failure.

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

13 years agoProduce a diagnostic for unused overloaded expressions, from Faisal Vali!
Douglas Gregor [Mon, 7 Mar 2011 02:05:23 +0000 (02:05 +0000)]
Produce a diagnostic for unused overloaded expressions, from Faisal Vali!

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

13 years agoAn operator new with an empty exception specifier returns null on a bad
John McCall [Mon, 7 Mar 2011 01:52:56 +0000 (01:52 +0000)]
An operator new with an empty exception specifier returns null on a bad
allocation and therefore requires a null-check.  We were doing that, but
we weren't treating the new-initializer as being conditionally executed,
which means it was possible to get ill-formed IR as in PR9298.

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

13 years agoCheck in the implementation as well...
Anders Carlsson [Mon, 7 Mar 2011 01:28:33 +0000 (01:28 +0000)]
Check in the implementation as well...

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

13 years agoAdd a non-static FixupRelativePath to FileManager.
Anders Carlsson [Mon, 7 Mar 2011 01:27:37 +0000 (01:27 +0000)]
Add a non-static FixupRelativePath to FileManager.

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

13 years agoRedo part of r127137:
Joerg Sonnenberger [Mon, 7 Mar 2011 01:15:29 +0000 (01:15 +0000)]
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

13 years agoRemove the AST printer (-ast-print-xml), which is too incomplete and
Douglas Gregor [Mon, 7 Mar 2011 01:03:30 +0000 (01:03 +0000)]
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

13 years agoExplicitly initialize CCCIsCPP
Joerg Sonnenberger [Mon, 7 Mar 2011 00:09:32 +0000 (00:09 +0000)]
Explicitly initialize CCCIsCPP

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

13 years agoIf called as *cpp or *cpp-[^-]*, run only the preprocessor. If no
Joerg Sonnenberger [Sun, 6 Mar 2011 23:31:01 +0000 (23:31 +0000)]
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

13 years agoRevert r126422 "Use private linkage to avoid symbol conflicts in
Douglas Gregor [Sun, 6 Mar 2011 23:28:21 +0000 (23:28 +0000)]
Revert r126422 "Use private linkage to avoid symbol conflicts in
corner cases like the one in PR9301." which caused PR9416.

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

13 years agoUsed a nicer cast.
Abramo Bagnara [Sun, 6 Mar 2011 22:48:24 +0000 (22:48 +0000)]
Used a nicer cast.

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

13 years agoConvert FileManager::FixupRelativePath over to using PathV2.
Anders Carlsson [Sun, 6 Mar 2011 22:25:35 +0000 (22:25 +0000)]
Convert FileManager::FixupRelativePath over to using PathV2.

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

13 years agoImproved type source location for long long type.
Abramo Bagnara [Sun, 6 Mar 2011 22:21:56 +0000 (22:21 +0000)]
Improved type source location for long long type.

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

13 years agotest/PCH/headersearch.cpp: Tweak for Windows hosts especially cygming.
NAKAMURA Takumi [Sun, 6 Mar 2011 20:44:33 +0000 (20:44 +0000)]
test/PCH/headersearch.cpp: Tweak for Windows hosts especially cygming.

This test requires shell feature, to change working directory.
On Windows, current directory cannot be moved nor removed.

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

13 years agoWe may fail to map a declaration in a template to its instantiated
Douglas Gregor [Sun, 6 Mar 2011 20:12:45 +0000 (20:12 +0000)]
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

13 years agoFix driver for thumb-capable ARM hosts, from Mikko Lehtonen!
Douglas Gregor [Sun, 6 Mar 2011 19:11:49 +0000 (19:11 +0000)]
Fix driver for thumb-capable ARM hosts, from Mikko Lehtonen!

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

13 years agoRename the type argument for the iboutletcollection attribute to not
Douglas Gregor [Sun, 6 Mar 2011 18:55:32 +0000 (18:55 +0000)]
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

13 years agoWrite CXX base specifier offsets for chained ASTs.
Anders Carlsson [Sun, 6 Mar 2011 18:41:18 +0000 (18:41 +0000)]
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

13 years agoWhen serializing a DeclRefExpr, always store the number of explicit template
Anders Carlsson [Sun, 6 Mar 2011 18:19:42 +0000 (18:19 +0000)]
When serializing a DeclRefExpr, always store the number of explicit template
arguments at the same offset, since it's needed when creating the empty
DeclRefExpr when deserializing. Fixes a memory corruption issue that would lead
to random bugs and crashes.

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

13 years agoAdd MinGW GCC 4.5.2 include paths, from Matthieu Monrocq
Douglas Gregor [Sun, 6 Mar 2011 18:00:59 +0000 (18:00 +0000)]
Add MinGW GCC 4.5.2 include paths, from Matthieu Monrocq

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

13 years agoFix copy-and-paste typo in the transformation of Microsoft __uuidof expressions,...
Douglas Gregor [Sun, 6 Mar 2011 17:40:41 +0000 (17:40 +0000)]
Fix copy-and-paste typo in the transformation of Microsoft __uuidof expressions, from Eric Niebler via John Wiegley

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

13 years ago xpose HeaderSearch::SearchDirs to tools,s, from Paul Holden
Douglas Gregor [Sun, 6 Mar 2011 17:33:53 +0000 (17:33 +0000)]
 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

13 years agoCorrectly unwrap 'auto' types. Fixes PR9414.
Anders Carlsson [Sun, 6 Mar 2011 16:43:04 +0000 (16:43 +0000)]
Correctly unwrap 'auto' types. Fixes PR9414.

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

13 years agoCompleted source ranges fixes for all classes inheriting from TypeDecl.
Abramo Bagnara [Sun, 6 Mar 2011 16:09:14 +0000 (16:09 +0000)]
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

13 years agoFixed TypedefDecl and TemplateTypeParameter source range.
Abramo Bagnara [Sun, 6 Mar 2011 15:48:19 +0000 (15:48 +0000)]
Fixed TypedefDecl and TemplateTypeParameter source range.

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

13 years agoReinstate r127112, "Propagate new-style exception spec information to ExtProtoInfo...
Sebastian Redl [Sun, 6 Mar 2011 10:52:04 +0000 (10:52 +0000)]
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

13 years agoWhen performing template argument deduction for a non-reference
Douglas Gregor [Sun, 6 Mar 2011 09:03:20 +0000 (09:03 +0000)]
When performing template argument deduction for a non-reference
conversion function when we're binding the result to a reference, drop
cv-qualifiers on the type we're referring to, since we should be
deducing a type that can be adjusted (via cv-qualification) to the
requested type. Fixes PR9336, and the remaining Boost.Assign failure.

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

13 years agoRevert r127112, "Propagate new-style exception spec information to ExtProtoInfo."
NAKAMURA Takumi [Sun, 6 Mar 2011 00:17:36 +0000 (00:17 +0000)]
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

13 years agoPropagate new-style exception spec information to ExtProtoInfo.
Sebastian Redl [Sat, 5 Mar 2011 22:42:26 +0000 (22:42 +0000)]
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

13 years agoPropagate new-style exception spec information to Declarator.
Sebastian Redl [Sat, 5 Mar 2011 22:42:13 +0000 (22:42 +0000)]
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

13 years agoRevert r127079: "test/Makefile: Use $(ECHOPATH) to make lit.site.cfg(s)."
Benjamin Kramer [Sat, 5 Mar 2011 20:57:36 +0000 (20:57 +0000)]
Revert r127079: "test/Makefile: Use $(ECHOPATH) to make lit.site.cfg(s)."

It depends on LLVM r127073 that was reverted and is now blocking "make test"

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

13 years agoWhen substituting in for a template name, do not produce a qualified
Douglas Gregor [Sat, 5 Mar 2011 20:06:51 +0000 (20:06 +0000)]
When substituting in for a template name, do not produce a qualified
template name as the result of substitution. The qualifier is handled
separately by the tree transformer, so we would end up in an
inconsistent state.

This is actually the last bit of PR9016, and possibly also fixes
PR8965. It takes Boost.Icl from "epic fail" down to a single failure.

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

13 years agoFixed LabelDecl source range and cleaned creation code.
Abramo Bagnara [Sat, 5 Mar 2011 18:21:20 +0000 (18:21 +0000)]
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

13 years agoWhen determining template instantiation arguments within a function
Douglas Gregor [Sat, 5 Mar 2011 17:54:25 +0000 (17:54 +0000)]
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

13 years agoWhen transforming a substituted template type parameter, try to
Douglas Gregor [Sat, 5 Mar 2011 17:19:27 +0000 (17:19 +0000)]
When transforming a substituted template type parameter, try to
transform the type that replaces the template type parameter. In the
vast majority of cases, there's nothing to do, because most template
type parameters are replaced with something non-dependent that doesn't
need further transformation. However, when we're dealing with the
default template arguments of template template parameters, we might
end up replacing a template parameter (of the template template
parameter) with a template parameter of the enclosing template.

This addresses part of PR9016, but not within function
templates. That's a separate issue.

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

13 years agoNormalize target triple passed out of driver. Basically this means
Anton Korobeynikov [Sat, 5 Mar 2011 16:05:17 +0000 (16:05 +0000)]
Normalize target triple passed out of driver. Basically this means
that at cc1 level we will always have normalized triple and thus can
provide necessary default based on e.g. environment value (e.g. for
"arm-eabi" triple, etc.)

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

13 years agoParser support for noexcept specifications.
Sebastian Redl [Sat, 5 Mar 2011 14:45:16 +0000 (14:45 +0000)]
Parser support for noexcept specifications.

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

13 years agoImproved MemberPointerType source locations.
Abramo Bagnara [Sat, 5 Mar 2011 14:42:21 +0000 (14:42 +0000)]
Improved MemberPointerType source locations.

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