Douglas Gregor
e9e27d95db
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.
llvm-svn: 127507
2011-03-11 23:10:44 +00:00
John McCall
32ea969415
Use a slightly more semantic interface for emitting call arguments.
...
llvm-svn: 127494
2011-03-11 20:59:21 +00:00
Peter Collingbourne
c77f85b4b0
OpenCL: if double precision floating point constant encountered
...
without cl_khr_fp64, warn and cast to single precision
llvm-svn: 127476
2011-03-11 19:24:59 +00:00
Peter Collingbourne
e190dee7a5
Add support for the OpenCL vec_step operator, by generalising and
...
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.
llvm-svn: 127475
2011-03-11 19:24:49 +00:00
Rafael Espindola
6b7e3bc992
Fix PR9453 by not trying to print a warning about ignored qualifiers
...
in conversion functions.
llvm-svn: 127460
2011-03-11 04:56:58 +00:00
John McCall
7684ddee7c
When comparing a null pointer and something else, always cast the null
...
pointer instead of the other operand.
llvm-svn: 127458
2011-03-11 04:25:25 +00:00
Ken Dyck
327b77a442
Convert the RecordSize parameter of AppendTailPadding() to CharUnits to
...
avoid converting to bits and back again. No change in functionality
intended.
llvm-svn: 127455
2011-03-11 02:17:05 +00:00
Ken Dyck
dbc0191181
Overload IntExprEvaluator::Success() with a function that takes a CharUnits
...
parameter to tidy up the places where the expression is a size.
llvm-svn: 127454
2011-03-11 02:13:43 +00:00
Ted Kremenek
339f7c3c58
Tweak ccc-analyzer's 'Analyze' function to not mutate the original arguments list.
...
llvm-svn: 127428
2011-03-10 21:10:08 +00:00
Ted Kremenek
4c0826c236
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.
llvm-svn: 127425
2011-03-10 20:03:42 +00:00
NAKAMURA Takumi
dd63436808
lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang.
...
llvm-svn: 127405
2011-03-10 14:02:21 +00:00
Abramo Bagnara
0adf29a5bd
Avoid do drop outer template parameter lists on the floor.
...
llvm-svn: 127404
2011-03-10 13:28:31 +00:00
Abramo Bagnara
19fd03e277
Fixed class type generation for MemberPointerType.
...
llvm-svn: 127401
2011-03-10 10:18:27 +00:00
Ted Kremenek
a099c595bf
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.
llvm-svn: 127396
2011-03-10 03:50:34 +00:00
Ken Dyck
a1a2e8decb
Instead of round up sizes to '8', round them up to the alignment of the char
...
type.
llvm-svn: 127391
2011-03-10 02:00:35 +00:00
Ken Dyck
e73807538a
Round up the non-virtual size to the next char instead of rounding down.
...
llvm-svn: 127390
2011-03-10 01:53:59 +00:00
Ted Kremenek
7c58d35240
Require AddStmtChoice::alwaysAdd() to take a CFGBuilder& and Stmt*. Prep for functionality changes.
...
llvm-svn: 127387
2011-03-10 01:14:11 +00:00
Ted Kremenek
2866bab5fa
Remove unused 'AddStmtChoice' argument to CFGBuilder::appendStmt().
...
llvm-svn: 127386
2011-03-10 01:14:08 +00:00
Ted Kremenek
f9d8290af1
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.
llvm-svn: 127385
2011-03-10 01:14:05 +00:00
Daniel Dunbar
334b2136f6
Revert r127206 "Detect attempts to provide a specialization of a function within
...
a...", it appears to cause us to reject various valid codes.
llvm-svn: 127373
2011-03-09 23:24:34 +00:00
Argyrios Kyrtzidis
4b8093ab5e
Silence gcc warnings.
...
llvm-svn: 127370
2011-03-09 23:15:22 +00:00
Fariborz Jahanian
b296e330a3
Property setter/getter must be looked up in property type's
...
list of protocols as well. // rdar://9078584
llvm-svn: 127367
2011-03-09 22:17:12 +00:00
Argyrios Kyrtzidis
4dfe569d93
Fix CMake build.
...
llvm-svn: 127360
2011-03-09 21:12:34 +00:00
Fariborz Jahanian
3dc11ad796
Lookup selector in protocol list of qualified objc type
...
to avoid a bogus warning. // rdar:// 9072298
llvm-svn: 127355
2011-03-09 20:18:06 +00:00
Argyrios Kyrtzidis
35dcda7922
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.
llvm-svn: 127339
2011-03-09 17:21:42 +00:00
Douglas Gregor
20cbd059d4
Mention an XML printer on the Open Projects page
...
llvm-svn: 127336
2011-03-09 16:27:48 +00:00
Abramo Bagnara
29c2d46786
Fixed InnerLocStart.
...
llvm-svn: 127330
2011-03-09 14:09:51 +00:00
NAKAMURA Takumi
4e8c365e9a
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.
llvm-svn: 127329
2011-03-09 12:00:19 +00:00
Chandler Carruth
1b7cc20fd8
FileCheckize this test.
...
llvm-svn: 127327
2011-03-09 10:56:54 +00:00
NAKAMURA Takumi
e56d8cf846
include/clang/Makefile: [PR2928] "make install" may install include files along explicit pattern, not to install CMake's building stuff.
...
llvm-svn: 127326
2011-03-09 09:12:20 +00:00
John McCall
85915250c0
Remove a rather egregious use of getFunctionInfo.
...
llvm-svn: 127324
2011-03-09 08:39:33 +00:00
John McCall
46288eff24
Fix three of the four places where I left breadcrumbs to avoid unnecessary
...
recomputation.
llvm-svn: 127322
2011-03-09 08:12:35 +00:00
John McCall
5fe009660d
Tame this assert, hopefully fixing self-host.
...
llvm-svn: 127319
2011-03-09 07:12:35 +00:00
Anders Carlsson
1f13bb5f00
When deserializing CXXBaseSpecifiers (and offsets), make sure to walk the chain in the correct order.
...
llvm-svn: 127315
2011-03-09 05:09:32 +00:00
John McCall
a738c25f5e
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.
llvm-svn: 127314
2011-03-09 04:27:21 +00:00
John McCall
6a014d5c30
Add a bit to ParmVarDecl indicating whether the parameter undergoes
...
K&R-style default argument promotion.
llvm-svn: 127313
2011-03-09 04:22:44 +00:00
NAKAMURA Takumi
d3cc220d97
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) */
llvm-svn: 127308
2011-03-09 03:02:28 +00:00
Ted Kremenek
2f1f023283
#include Store.h into BasicValueFactory.cpp to provide definitions of StoreRef constructor.
...
llvm-svn: 127291
2011-03-08 23:39:37 +00:00
Argyrios Kyrtzidis
97d3a38c3e
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.
llvm-svn: 127289
2011-03-08 23:35:24 +00:00
Ted Kremenek
4bb6c6b37e
static analyzer: Fix use-after-free bug in RegionStore involving LazyCompoundValueData not reference counting Store objects.
...
llvm-svn: 127288
2011-03-08 23:18:00 +00:00
Abramo Bagnara
6111db9e9c
Fixed isEmbeddedInDeclarator flag loading.
...
llvm-svn: 127285
2011-03-08 22:33:38 +00:00
NAKAMURA Takumi
2201582115
test/Makefile: Reapply r127079, use $(ECHOPATH) to make lit.site.cfg(s).
...
llvm-svn: 127284
2011-03-08 22:17:40 +00:00
NAKAMURA Takumi
d24228afeb
libclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated one.
...
llvm-svn: 127283
2011-03-08 22:17:33 +00:00
Anders Carlsson
3c50aea73f
Make the Objective-C checker look for subclasses of NSString instead of just NSString and NSMutableString.
...
llvm-svn: 127268
2011-03-08 20:05:26 +00:00
Douglas Gregor
95d3e370f4
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.
llvm-svn: 127259
2011-03-08 19:17:54 +00:00
Fariborz Jahanian
08891f5249
Warn on usage of unavailable objc 'class' in
...
varienty of cases. // rdar://9092208
llvm-svn: 127257
2011-03-08 19:12:46 +00:00
Douglas Gregor
f2f0806f71
Teach libclang's token-annotation logic about context-sensitive
...
keywords for Objective-C+ and C++0x.
llvm-svn: 127253
2011-03-08 17:10:18 +00:00
Abramo Bagnara
ea94788cf4
Fixed source range for StaticAssertDecl and LinkageSpecDecl. Fixed source range for declarations using postfix types.
...
llvm-svn: 127251
2011-03-08 16:41:52 +00:00
Anders Carlsson
a426705cc6
When writing file references in a pch, make sure to ask the file manager for the absolute path.
...
llvm-svn: 127248
2011-03-08 16:04:35 +00:00
Abramo Bagnara
b5545be14b
Fixed NamespaceDecl source range.
...
llvm-svn: 127242
2011-03-08 12:38:20 +00:00