]>
granicus.if.org Git - clang/log
Anders Carlsson [Sun, 13 Mar 2011 20:32:45 +0000 (20:32 +0000)]
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
Sebastian Redl [Sun, 13 Mar 2011 17:09:40 +0000 (17:09 +0000)]
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
Oscar Fuentes [Sun, 13 Mar 2011 15:10:24 +0000 (15:10 +0000)]
Build libclang as a static library too. Now tested on Windows!
On Windows only the shared library is created. The reason for this is
that clang.lib the static library would clash with clang.lib the
export library of the dll.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 13 Mar 2011 04:28:29 +0000 (04:28 +0000)]
Reverting "Build libclang as a static library too."
This reverts commit r127556. It breaks the build for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 13 Mar 2011 03:48:04 +0000 (03:48 +0000)]
Fix CFG assertion failure reported in PR 9467. This was due to recent changes in optimizing CFGs for switch statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 13 Mar 2011 00:55:43 +0000 (00:55 +0000)]
XFAIL this on windows where <vector> contains surprises.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sat, 12 Mar 2011 22:01:58 +0000 (22:01 +0000)]
Build libclang as a static library too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127556
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 12 Mar 2011 18:54:30 +0000 (18:54 +0000)]
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
Sebastian Redl [Sat, 12 Mar 2011 13:53:51 +0000 (13:53 +0000)]
Revert "Disable delegating constructors for 2.9"
It is only meant for the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 12 Mar 2011 13:53:47 +0000 (13:53 +0000)]
Disable delegating constructors for 2.9
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 12 Mar 2011 13:44:32 +0000 (13:44 +0000)]
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
Sebastian Redl [Sat, 12 Mar 2011 13:44:23 +0000 (13:44 +0000)]
Disable inherited constructors for 2.9.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Sat, 12 Mar 2011 12:03:11 +0000 (12:03 +0000)]
Use CharUnits for argument passed to AppendPadding() from AppendBitField().
No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sat, 12 Mar 2011 11:50:43 +0000 (11:50 +0000)]
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
Abramo Bagnara [Sat, 12 Mar 2011 11:17:06 +0000 (11:17 +0000)]
Forgotten part of previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127536
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Sat, 12 Mar 2011 11:02:00 +0000 (11:02 +0000)]
Fixed type and declaration source range in presence of typeQuals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Abramo Bagnara [Sat, 12 Mar 2011 09:45:03 +0000 (09:45 +0000)]
Renamed OffsetOfNode::getRange to getSourceRange for uniformity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Mar 2011 08:19:43 +0000 (08:19 +0000)]
Tweak test to hopefully appease FreeBSD buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Mar 2011 06:15:01 +0000 (06:15 +0000)]
Remove stray output file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Mar 2011 06:14:28 +0000 (06:14 +0000)]
Re-enable the IdempotentOperations checker for --analyze, and put it and the DeadStores checker into the "deadcode" group.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Mar 2011 04:08:07 +0000 (04:08 +0000)]
Don't have side-effects (or rather non-trivial computation) in StringSwitch "cases."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Mar 2011 02:49:15 +0000 (02:49 +0000)]
Add initial version of "IteratorsChecker", a checker to find misues uses of C++ iterators.
This checker was created by Jim Goodnow II, and I migrated it to the
new Checker interface (recent changes by Argiris).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Mar 2011 02:49:11 +0000 (02:49 +0000)]
Fix comments, and force auto progagation in VisitAggExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Mar 2011 02:49:09 +0000 (02:49 +0000)]
static analyzer: Handle 'ExprWithCleanups' in ExprEngine by essentially ignoring them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127523
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 12 Mar 2011 01:48:56 +0000 (01:48 +0000)]
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
Douglas Gregor [Sat, 12 Mar 2011 00:14:31 +0000 (00:14 +0000)]
When we're determining whether to complain about a conversion from one
enumeration type to another in C, classify enumeration constants as if
they had the type of their enclosing enumeration. Fixes
<rdar://problem/
9116337 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127514
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Fri, 11 Mar 2011 23:42:54 +0000 (23:42 +0000)]
Change parameter to AppendPadding from bytes to CharUnits. No change in
functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 11 Mar 2011 23:27:41 +0000 (23:27 +0000)]
Don't ask if a depenendent CXXRecordDecl has any dependent bases
unless we already know that it has a definition. Fixes
PR9449/<rdar://problem/
9115785 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 11 Mar 2011 23:10:44 +0000 (23:10 +0000)]
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
John McCall [Fri, 11 Mar 2011 20:59:21 +0000 (20:59 +0000)]
Use a slightly more semantic interface for emitting call arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 11 Mar 2011 19:24:59 +0000 (19:24 +0000)]
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
Peter Collingbourne [Fri, 11 Mar 2011 19:24:49 +0000 (19:24 +0000)]
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
Rafael Espindola [Fri, 11 Mar 2011 04:56:58 +0000 (04:56 +0000)]
Fix PR9453 by not trying to print a warning about ignored qualifiers
in conversion functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127460
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 11 Mar 2011 04:25:25 +0000 (04:25 +0000)]
When comparing a null pointer and something else, always cast the null
pointer instead of the other operand.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127458
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Fri, 11 Mar 2011 02:17:05 +0000 (02:17 +0000)]
Convert the RecordSize parameter of AppendTailPadding() to CharUnits to
avoid converting to bits and back again. No change in functionality
intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ken Dyck [Fri, 11 Mar 2011 02:13:43 +0000 (02:13 +0000)]
Overload IntExprEvaluator::Success() with a function that takes a CharUnits
parameter to tidy up the places where the expression is a size.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127454
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Mar 2011 21:10:08 +0000 (21:10 +0000)]
Tweak ccc-analyzer's 'Analyze' function to not mutate the original arguments list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Mar 2011 20:03:42 +0000 (20:03 +0000)]
Profiling showed that 'CheckImplicitConversions' was very slow because of the call to getSpellingLoc(). On 'aes.c'
in the LLVM test suite, this function was consuming 7.4% of -fsyntax-only time. This change fixes this issue
by delaying the check that the warning would be issued within a system macro by as long as possible. The
main negative of this change is now the logic for this check is done in multiple places in this function instead
of just in one place up front.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127425
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 10 Mar 2011 14:02:21 +0000 (14:02 +0000)]
lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127405
91177308 -0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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