Ted Kremenek
87f475a329
Return null pointer instead of 'false' (fixes clang warning).
...
llvm-svn: 106755
2010-06-24 16:26:12 +00:00
Zhongxing Xu
facf8a8e74
Add check for illegal whence argument of fseek.
...
llvm-svn: 106742
2010-06-24 13:36:41 +00:00
Zhongxing Xu
a7e5dd6c3a
Should return stateNotNull.
...
llvm-svn: 106741
2010-06-24 13:09:02 +00:00
Zhongxing Xu
ae45144d81
Let StreamChecker::CheckNullStream() return a GRState after successful check.
...
llvm-svn: 106738
2010-06-24 12:52:28 +00:00
Benjamin Kramer
322ab26387
Don't depend on system headers in clang -cc1 tests.
...
The constant was copied from clang's limits.h.
llvm-svn: 106732
2010-06-24 11:06:12 +00:00
Argyrios Kyrtzidis
bfcacee9b3
Support a couple more C++ Exprs for PCH.
...
llvm-svn: 106727
2010-06-24 08:57:31 +00:00
Argyrios Kyrtzidis
30d98f3d9e
Fix broken de/serialization for a couple of C++ Exprs.
...
llvm-svn: 106726
2010-06-24 08:57:09 +00:00
Eric Christopher
03256c32ff
More clang support for darwin tls. Add a __has_feature macro and
...
target specific preprocessor define as well.
llvm-svn: 106715
2010-06-24 02:02:00 +00:00
Fariborz Jahanian
9b5528d278
Patch to correctly mangle block helper functions
...
when block literal is declared inside a ctor/dtor.
Fixes radr 8096995.
llvm-svn: 106700
2010-06-24 00:08:06 +00:00
Ted Kremenek
574f304631
Add 'VisitEndAnalysis' callback to Checker class. This callback is called by GRExprEngine
...
when the worklist algorithm has terminated. This allows some checkers to do a post-analysis
phase after all paths have been analyzed.
llvm-svn: 106689
2010-06-23 22:08:00 +00:00
Duncan Sands
d3e231eb3c
Add parentheses suggested by gcc.
...
llvm-svn: 106668
2010-06-23 19:34:52 +00:00
Daniel Dunbar
b016d6c3d8
Revert "Tweak tests to hopefully fix include of limits.h on win32.", tweak fails on linux.
...
llvm-svn: 106661
2010-06-23 18:31:33 +00:00
Daniel Dunbar
a99a3c108f
Driver: Add make variable to allow disabling default integrated assembler, till
...
all the kinks are worked out.
llvm-svn: 106641
2010-06-23 18:15:13 +00:00
Ted Kremenek
7fe8e2d770
Add USR tests for ObjC class extensions.
...
llvm-svn: 106640
2010-06-23 18:10:30 +00:00
Daniel Dunbar
08748457b9
Tweak tests to hopefully fix include of limits.h on win32.
...
llvm-svn: 106639
2010-06-23 18:06:20 +00:00
Sebastian Redl
1fc3bdc61e
Add isArrayType() to CanProxy's forwarders.
...
llvm-svn: 106629
2010-06-23 15:57:03 +00:00
Argyrios Kyrtzidis
818c5db054
Support C++ class template specializations and partial specializations for PCH.
...
llvm-svn: 106625
2010-06-23 13:48:30 +00:00
Argyrios Kyrtzidis
fe6ba881b6
Modify ClassTemplateSpecializationDecl and ClassTemplatePartialSpecializationDecl to allow PCH read/write.
...
llvm-svn: 106624
2010-06-23 13:48:23 +00:00
Chris Lattner
37141f4fb4
improve altivec vector bool/pixel support, patch by Anton Yartsev
...
with several tweaks by me.
llvm-svn: 106619
2010-06-23 06:00:24 +00:00
Chris Lattner
b48a2d5d2f
polish the -finstrument-functions implementation, patch by Nelson Elhage!
...
llvm-svn: 106618
2010-06-23 05:21:28 +00:00
Zhongxing Xu
2213aa360a
add comments.
...
llvm-svn: 106617
2010-06-23 02:12:00 +00:00
Zhongxing Xu
93cef8665c
add comments.
...
llvm-svn: 106616
2010-06-23 02:06:56 +00:00
Ted Kremenek
2a33a0deef
Correctly construct an ElementRegion for alloca() + pointer arithmetic. Fixes analyzer
...
crash reported in PR 7450.
llvm-svn: 106609
2010-06-22 23:58:31 +00:00
Douglas Gregor
689999da1f
String literals enclosed in parentheses are still string
...
literals. Fixes PR7488.
llvm-svn: 106607
2010-06-22 23:47:37 +00:00
Douglas Gregor
769ba3e50c
Make c++ and C++ valid extensions for C++ source files, from Seth Cantrell!
...
llvm-svn: 106602
2010-06-22 23:43:22 +00:00
Douglas Gregor
a3208f9e7c
Vector types are not arithmetic types, either. Note that we now ban
...
__real myvec and __imag myvec, since they aren't all that useful (it's
just an identity function) but we might want to use them in more
restricted cases in the future (e.g., "__real mycomplexvec" could
extract the real parts of a vector of complex numbers).
llvm-svn: 106601
2010-06-22 23:41:02 +00:00
Fariborz Jahanian
3bf0ded346
Patch to provide separate ASTs for multiple ObjC class extension
...
declarations (implements radar 7928731).
llvm-svn: 106597
2010-06-22 23:20:40 +00:00
Douglas Gregor
c646d13054
Teach Type::isRealType() that vector types are never real types. All
...
of the callers of isRealType() already assumed this, and one of them
(increment/decrement) mistakenly permitted increments of vector types
because of it.
llvm-svn: 106596
2010-06-22 23:13:52 +00:00
Douglas Gregor
49b4d73451
Type Type::isRealFloatingType() that vectors are not floating-point
...
types, updating callers of both isFloatingType() and
isRealFloatingType() accordingly. Caught at least one issue where we
allowed one to declare a vector of vectors (!), along with cleaning up
the standard-conversion logic for C++.
llvm-svn: 106595
2010-06-22 23:07:26 +00:00
Daniel Dunbar
adef9327fe
Support -mios-version-min= as an alias for -miphoneos-version-min=.
...
llvm-svn: 106587
2010-06-22 22:27:12 +00:00
Douglas Gregor
4ffbad1904
Change Type::isFloatingType() to reflect the actual definition of a
...
"floating type" in C, which does not include vector types. Introduce
Type::hasFloatingRepresentation() for the places where we want to know
whether the underlying representation is one or more floating-point
values. Remove some hacks we had where the former behavior of
Type::isFloatingType() was at odds with the language definition of the
term.
llvm-svn: 106584
2010-06-22 22:12:46 +00:00
Daniel Dunbar
a91c0ba88a
Driver: Remove some dead code left around after a refactoring. Found by the
...
Clang static analyzer!
llvm-svn: 106568
2010-06-22 20:18:18 +00:00
Ted Kremenek
55081f9317
Don't assert on C++ casts that are currently not handled by the static analyzer.
...
Instead, halt the analysis of the current path, which is what we do in GRExprEngine::ProcessStmt
for all other C++ constructs not currently handled by the analyzer.
llvm-svn: 106561
2010-06-22 19:05:10 +00:00
Fariborz Jahanian
a9f90275cc
Trying to make BuildBot happy again (related to PR7431).
...
llvm-svn: 106553
2010-06-22 17:08:32 +00:00
Argyrios Kyrtzidis
6e57c35513
Read/write CXXDeleteExpr from/to PCH.
...
llvm-svn: 106552
2010-06-22 17:07:59 +00:00
Douglas Gregor
db48cf3c31
Don't allow vector conversions to sneak in under the guise of
...
floating-point conversions or floating-integral conversions. We
really, really, really need to make isFloatingType() and friends not
apply to vector types.
llvm-svn: 106551
2010-06-22 16:52:27 +00:00
Fariborz Jahanian
7966aff294
Fixes a problem in generation of meta-data for
...
category implementation whereby property list was missing.
NeXt ObjC runtime (radar 8093297).
llvm-svn: 106550
2010-06-22 16:33:55 +00:00
Anders Carlsson
ea836bc41c
Switch over to the new caching version of getMangledName.
...
llvm-svn: 106549
2010-06-22 16:16:50 +00:00
Anders Carlsson
2e2f4d2e6d
Add a new variant of getMangledName that caches the mangling for decls.
...
llvm-svn: 106547
2010-06-22 16:05:32 +00:00
Anders Carlsson
16d9f1788e
Add GlobalDecl::getCanonicalDecl.
...
llvm-svn: 106546
2010-06-22 16:00:14 +00:00
Douglas Gregor
a46d66122f
When we ask for the enumerators of an EnumDecl, make sure we get them even if we have a EnumDecl that is not the definition of the enumeration
...
llvm-svn: 106541
2010-06-22 14:45:56 +00:00
Douglas Gregor
c9ea2d5a67
In C++, allow a declaration of an enum to follow a definition of that
...
enum as a GNU extension.
llvm-svn: 106540
2010-06-22 14:26:35 +00:00
Argyrios Kyrtzidis
75000b6814
Fix PR7180.
...
For
void f( a:🅱️ :c );
we would cache the tokens "a:🅱️ :" but then we would try to annotate them using the range "a::".
Before annotating them with the (invalid) C++ scope spec, set it to the range of "a:🅱️ :".
llvm-svn: 106536
2010-06-22 11:30:04 +00:00
Argyrios Kyrtzidis
69da4a8f07
Support emitting/reading function templates to/from PCH.
...
llvm-svn: 106534
2010-06-22 09:55:07 +00:00
Argyrios Kyrtzidis
ae85e2414c
-Introduce PCHReader::ReadTemplateArgumentLoc()
...
-Introduce PCHWriter::AddTemplateArgumentLocInfo()
-Modify PCHWriter::AddTemplateArgumentLoc() to also write TemplateArgumentLoc's TemplateArgument
and move the existing calls of AddTemplateArgumentLoc() to AddTemplateArgumentLocInfo().
llvm-svn: 106533
2010-06-22 09:54:59 +00:00
Argyrios Kyrtzidis
cb6f346873
Make it easier to read/write the template part of FunctionDecl.
...
Introduce:
-FunctionDecl::getTemplatedKind() which returns an enum signifying what kind of templated
FunctionDecl it is.
-An overload of FunctionDecl::setFunctionTemplateSpecialization() which accepts arrays of
TemplateArguments and TemplateArgumentLocs
-A constructor to TemplateArgumentList which accepts an array of TemplateArguments.
llvm-svn: 106532
2010-06-22 09:54:51 +00:00
Benjamin Kramer
1e63c74f60
Silence warning about C++-style comments.
...
llvm-svn: 106531
2010-06-22 09:29:44 +00:00
Zhongxing Xu
4505747979
Add a bunch of stream APIs to SteamChecker.
...
llvm-svn: 106530
2010-06-22 07:50:21 +00:00
Douglas Gregor
ef4a2a2b54
Apply array-to-pointer decay when instantiating a MemberExpr. Fixes
...
PR7405, patch by Kyle Lippincott!
llvm-svn: 106523
2010-06-22 02:41:05 +00:00
Douglas Gregor
de049cdbe6
Attempt to fix test
...
llvm-svn: 106522
2010-06-22 02:17:07 +00:00