Anders Carlsson
72fb384a65
Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.
...
llvm-svn: 77190
2009-07-27 15:31:55 +00:00
Anders Carlsson
b97a3ec4e7
Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.
...
llvm-svn: 77189
2009-07-27 14:55:54 +00:00
Anders Carlsson
b7130ed888
Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.
...
llvm-svn: 77185
2009-07-27 05:54:15 +00:00
Chris Lattner
4ead0b9e1c
add bugzilla #
...
llvm-svn: 77183
2009-07-27 04:49:58 +00:00
Anders Carlsson
bff6b49cd0
More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.
...
llvm-svn: 77180
2009-07-27 02:56:37 +00:00
Anders Carlsson
ba4c6d1c91
More work on bitfield support in the new constant struct builder.
...
llvm-svn: 77177
2009-07-27 01:23:51 +00:00
Mike Stump
21e0f895a1
Fix PR4624.
...
llvm-svn: 77176
2009-07-27 00:44:23 +00:00
Nuno Lopes
bd2cd92907
fix segfault (because of erasing after the vector boundaries) when the cached token position is at the end
...
llvm-svn: 77159
2009-07-26 16:36:45 +00:00
Nuno Lopes
0b797b1c9d
add gentoo 2009.0 g++ header locations
...
llvm-svn: 77158
2009-07-26 16:14:05 +00:00
Daniel Dunbar
e59313a298
Switch to getName()
...
llvm-svn: 77151
2009-07-26 09:28:40 +00:00
Daniel Dunbar
600dfac30a
Switch to using llvm::Value::getName()
...
llvm-svn: 77147
2009-07-26 08:32:30 +00:00
Daniel Dunbar
4f7dfaf650
Update for API change.
...
llvm-svn: 77112
2009-07-26 02:21:04 +00:00
Daniel Dunbar
6a82e424d0
Lookup targets by Triple instead of Module.
...
llvm-svn: 77108
2009-07-26 01:27:26 +00:00
Mike Stump
ea086c7263
Preserve qualifiers.
...
llvm-svn: 77097
2009-07-25 23:24:03 +00:00
Ryan Flynn
e5dc8594ea
PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.
...
llvm-svn: 77095
2009-07-25 22:29:44 +00:00
Argyrios Kyrtzidis
39c348d915
Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
...
ObjCImplDecl::getMethod.
llvm-svn: 77094
2009-07-25 22:16:03 +00:00
Argyrios Kyrtzidis
553376be19
Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
...
ObjCInterfaceDecl::lookupMethod.
llvm-svn: 77093
2009-07-25 22:15:51 +00:00
Argyrios Kyrtzidis
e6ed65bee0
Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
...
ObjCProtocolDecl::lookupMethod.
llvm-svn: 77092
2009-07-25 22:15:38 +00:00
Argyrios Kyrtzidis
6de0560b97
Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
...
ObjCContainerDecl::getMethod.
Avoids code duplication.
llvm-svn: 77091
2009-07-25 22:15:22 +00:00
Mike Stump
81db910eb9
Improve comments (Thanks Fariborz).
...
llvm-svn: 77090
2009-07-25 22:12:02 +00:00
Mike Stump
8c5d7996e8
Add noreturn as a type attribute, handle printing for them and handle
...
calls to noreturn function pointers when CFG building.
llvm-svn: 77089
2009-07-25 21:26:53 +00:00
Fariborz Jahanian
dedf1e4b1a
ir-gen for non-virtual base class initialization
...
in constructors.
llvm-svn: 77087
2009-07-25 21:12:28 +00:00
Sebastian Redl
9f831dbbcd
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
...
Add custom conversions to static_cast.
llvm-svn: 77076
2009-07-25 15:41:38 +00:00
Daniel Dunbar
605bd11311
MultiTestRunner: Make sure to point at src dir, for out of tree builds.
...
Factor out routine for executing the script commands.
llvm-svn: 77075
2009-07-25 15:26:08 +00:00
Daniel Dunbar
4edf8a17d5
MultiTestRunner: Cleanup test execution & output.
...
- Stop writing everything to files.
- Make test output more standard.
llvm-svn: 77074
2009-07-25 14:46:05 +00:00
Daniel Dunbar
f7e06f946c
MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
...
- We don't use the former, and the latter doesn't actually work.
llvm-svn: 77073
2009-07-25 13:19:40 +00:00
Daniel Dunbar
6db90064f8
MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
...
it currently.
llvm-svn: 77072
2009-07-25 13:13:06 +00:00
Daniel Dunbar
a2f6b0dde0
MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
...
files.
llvm-svn: 77071
2009-07-25 12:57:15 +00:00
Daniel Dunbar
595c98729b
Make having no RUN line a failure.
...
Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure
if they are actually testing the right thing / anything.
llvm-svn: 77070
2009-07-25 12:47:38 +00:00
Daniel Dunbar
b6372fa7bb
Remove TESTDIR initialization, MultiTestRunner can find the test dirs itself.
...
llvm-svn: 77069
2009-07-25 12:44:58 +00:00
Daniel Dunbar
6d8adef9a0
Remove empty tests, left over from an svn revert.
...
llvm-svn: 77068
2009-07-25 12:41:25 +00:00
Daniel Dunbar
011e3c9905
Remove this Makefile, it is unused.
...
llvm-svn: 77067
2009-07-25 12:37:21 +00:00
Daniel Dunbar
6c6c0e1769
MultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
...
cxx-using-declaration test case started exhibiting different behavior. It still
needs to be fixed, however...
llvm-svn: 77066
2009-07-25 12:23:35 +00:00
Daniel Dunbar
e87599356f
MultiTestRunner: Always use absolute path names for tests.
...
Also, fix a function name I forgot to update.
llvm-svn: 77064
2009-07-25 12:05:55 +00:00
Daniel Dunbar
14d9d2fb78
Disable this test: cxx-using-declaration.cpp
...
Something strange is going on here; this test randomly started failing after
unrelated changes to TestRunner.py (even though it runs the same
script).
Argiris or Doug, can one of you investigate?
llvm-svn: 77063
2009-07-25 11:55:03 +00:00
Daniel Dunbar
97ea867690
MultiTestRunner: Validate '&&' at the end of RUN lines.
...
- This is just to normalize, these will go away soon hopefully.
Added all the missing '&&'s that have crept in. :)
llvm-svn: 77062
2009-07-25 11:27:37 +00:00
Daniel Dunbar
3ab3b5e17a
MultiTestRunner: Explicitly define child environment, the only variable we need
...
to import is the PATH.
llvm-svn: 77061
2009-07-25 10:14:19 +00:00
Daniel Dunbar
3c2da2bb7e
MultiTestRunner.py improvements.
...
- Tweak output directories for temp files, derive the temporary base from the
test's parent directory name, and the test name (instead of the whole path).
llvm-svn: 77059
2009-07-25 09:53:43 +00:00
Daniel Dunbar
e6475f1192
MultiTestRunner.py improvements.
...
- Not improved: the horribly lousy name. :)
- Suppress stderr when capturing output.
- Rewrite which() to do the right PATH search instead of being lazy and
shelling out to 'which'.
- On Windows, run scripts as batch files (via 'cmd /c ...').
llvm-svn: 77058
2009-07-25 09:42:24 +00:00
Daniel Dunbar
6bdd19a7e2
Change these tests to not depend as much on the name of the input.
...
llvm-svn: 77057
2009-07-25 09:01:12 +00:00
John McCall
02dee0a46a
Semantic checking for main().
...
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
llvm-svn: 77047
2009-07-25 04:36:53 +00:00
John McCall
732d15b9b9
Flesh out the QualifierSet API.
...
llvm-svn: 77046
2009-07-25 04:35:50 +00:00
Anders Carlsson
3b484b928d
More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.
...
llvm-svn: 77038
2009-07-25 01:40:29 +00:00
Fariborz Jahanian
f464edf81f
Some code refactoring per Daniel's feedback.
...
llvm-svn: 77030
2009-07-25 01:08:28 +00:00
Anders Carlsson
e9e9abb2fb
Whoops, did not mean to check this in.
...
llvm-svn: 77022
2009-07-25 00:26:00 +00:00
Anders Carlsson
87a9a34e5b
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
...
llvm-svn: 77021
2009-07-25 00:24:56 +00:00
Owen Anderson
b7a2fe6f81
Update for LLVM API change.
...
llvm-svn: 77012
2009-07-24 23:12:58 +00:00
Douglas Gregor
a6ef8f0813
Template instantiation for static data members that are defined out-of-line.
...
Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.
llvm-svn: 77002
2009-07-24 20:34:43 +00:00
Fariborz Jahanian
4dcc53f312
Fixes broken test by accident.
...
llvm-svn: 77001
2009-07-24 20:33:35 +00:00
Fariborz Jahanian
a5c335527d
More Sema check for constructor's member initializer along
...
with type conversion to fix ir-gen crash.
llvm-svn: 77000
2009-07-24 20:28:49 +00:00
Ted Kremenek
b9cb11391d
In the "use of floating point variable as loop counter" check, check
...
if the DeclRefExpr is a float, not just either argument.
llvm-svn: 76998
2009-07-24 20:26:31 +00:00
Ted Kremenek
9c3952c03e
Have 'clang --analyze' run syntactic static analysis security checks.
...
llvm-svn: 76996
2009-07-24 20:03:11 +00:00
Mike Stump
d3bb557559
Fix 80-col violations, reflow a few comments and zap some extra
...
whitespace at ends of lines.
llvm-svn: 76992
2009-07-24 19:02:52 +00:00
Anders Carlsson
5e66fb5d16
Fix a release build warning.
...
llvm-svn: 76985
2009-07-24 18:20:38 +00:00
Fariborz Jahanian
2a1b5af130
More work toward initialization of objects
...
in constructors.
llvm-svn: 76980
2009-07-24 17:57:02 +00:00
Steve Naroff
e87026a08f
Allow front-end 'isa' access on object's of type 'id'.
...
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).
Still need back-end CodeGen for ObjCIsaExpr.
llvm-svn: 76979
2009-07-24 17:54:45 +00:00
Anders Carlsson
e2c6baf629
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
...
llvm-svn: 76978
2009-07-24 17:23:54 +00:00
Anders Carlsson
e1d5ca583f
Check in a half finished new constant struct builder (Obviously not used yet).
...
llvm-svn: 76969
2009-07-24 15:20:52 +00:00
Daniel Dunbar
c46a079957
Fix declaration of obc_enumerationMutation function, for GNU runtime.
...
llvm-svn: 76959
2009-07-24 07:40:24 +00:00
Ted Kremenek
963cc31583
Add doxygen comments and simplify expression.
...
llvm-svn: 76955
2009-07-24 06:55:42 +00:00
Ted Kremenek
3075428d16
Introduce a new variant type 'TryResult' to represent the result of
...
TryEvaluateBool instead of using a raw 'int'. This avoids any
confusion of how 'int' converts to bool, and makes the resultant code
easier to read.
Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the
ternary operator instead.
llvm-svn: 76947
2009-07-24 04:47:11 +00:00
Zhongxing Xu
30ac7607be
Add getDecl() to CallGraph and CallGraphNode.
...
llvm-svn: 76940
2009-07-24 03:41:11 +00:00
Zhongxing Xu
6c82313375
Constify methods.
...
llvm-svn: 76939
2009-07-24 03:38:27 +00:00
John McCall
d9baf6aed8
Test commit: make a little stub routine for semantic checking of main().
...
llvm-svn: 76934
2009-07-24 03:03:21 +00:00
Ted Kremenek
cd31df0f3f
Enable the '-warn-security-syntactic' checker option by default.
...
llvm-svn: 76933
2009-07-24 02:52:07 +00:00
Mike Stump
8e79f99b16
Implement new warning for functions declared 'noreturn' when they fall off the end.
...
llvm-svn: 76932
2009-07-24 02:49:01 +00:00
Anders Carlsson
6e853bf2b7
Get rid of the size parameter to AppendField. No functionality change.
...
llvm-svn: 76931
2009-07-24 02:45:50 +00:00
Ted Kremenek
745088c49e
Mark destructor of Checker virtual.
...
llvm-svn: 76924
2009-07-24 00:40:31 +00:00
Douglas Gregor
c04e2d9bd6
We now do complete semantic checking for unions
...
llvm-svn: 76918
2009-07-24 00:05:42 +00:00
Douglas Gregor
020e4a9bbb
Update C++ status to reflect progress on out-of-line definitions of class template members
...
llvm-svn: 76917
2009-07-23 23:58:15 +00:00
Douglas Gregor
79f83eda84
This patch fixes the implementations of the __has_trivial_destructor
...
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!
llvm-svn: 76916
2009-07-23 23:49:00 +00:00
Daniel Dunbar
91ade14197
Output UTF-16 string literals independent of host byte order.
...
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.
llvm-svn: 76915
2009-07-23 23:41:22 +00:00
Fariborz Jahanian
ca2f085a4e
Diagnose when base classes and members to be intialized
...
with constructors don't have a matching constructor.
llvm-svn: 76913
2009-07-23 23:32:59 +00:00
Mike Stump
773582dbb8
Refactor and push the evaluation as late as possible.
...
llvm-svn: 76911
2009-07-23 23:25:26 +00:00
Daniel Dunbar
64509b2765
Factor out map lookup for CFString constants.
...
llvm-svn: 76908
2009-07-23 22:52:48 +00:00
Anders Carlsson
085395426c
Don't just store the field/bit field info one field, do it for all fields in the union.
...
llvm-svn: 76907
2009-07-23 22:52:34 +00:00
Mike Stump
9620889f67
Some cleanups suggested by Daniel.
...
llvm-svn: 76906
2009-07-23 22:40:11 +00:00
Ted Kremenek
6610c0326b
Implement: <rdar://problem/6335715> rule request: gets() buffer overflow
...
llvm-svn: 76905
2009-07-23 22:29:41 +00:00
Anders Carlsson
e2accf4404
Fix another thinko.
...
llvm-svn: 76903
2009-07-23 21:52:03 +00:00
Ted Kremenek
70e5526a61
Add comments.
...
llvm-svn: 76901
2009-07-23 21:44:18 +00:00
Ted Kremenek
9c49762776
Refine checking and diagnostics for use of floating point variable as a counter.
...
This implements <rdar://problem/6336718> and checks for CERT secure coding
advisory FLP30-C.
llvm-svn: 76900
2009-07-23 21:34:35 +00:00
Anders Carlsson
516e5e7835
Correct a thinko in bitfield layout code. Fixes PR4611.
...
llvm-svn: 76898
2009-07-23 21:16:33 +00:00
Daniel Dunbar
2a5b83c7e6
Simplify, NFC.
...
llvm-svn: 76897
2009-07-23 20:38:28 +00:00
Daniel Dunbar
07b749230c
Switch the driver back to always using clang-cc by default (for C++, and
...
regardless of the architecture).
- This is a good default for development & testing; for example without this
any tests using 'clang' in the test suite will fail on PowerPC, since the
driver will avoid using clang.
- We don't want to actually ship something built this way, but that should be
handled via some sort of configuration file.
llvm-svn: 76886
2009-07-23 17:48:59 +00:00
Daniel Dunbar
635d481de0
Simplify.
...
llvm-svn: 76885
2009-07-23 17:33:49 +00:00
Anders Carlsson
d78fc89fcb
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.
...
llvm-svn: 76884
2009-07-23 17:24:40 +00:00
Anders Carlsson
8af896c10a
Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.
...
llvm-svn: 76882
2009-07-23 17:01:21 +00:00
Douglas Gregor
27bdf00fd7
Clean up the ActOnTag action, so that there is only a single entry
...
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.
Removed the ActOnClassTemplate action, which is no longer used.
llvm-svn: 76881
2009-07-23 16:36:45 +00:00
Douglas Gregor
2aff97c9e6
Unbreak the CMake build
...
llvm-svn: 76878
2009-07-23 15:15:06 +00:00
Zhongxing Xu
ee5d708e55
Add two nodes to the call graph:
...
- Root is the main function or 0.
- ExternalCallingNode has edges to all external functions.
llvm-svn: 76876
2009-07-23 13:39:38 +00:00
Zhongxing Xu
a598e5c9d5
Add template specializations to view the call graph in dot format.
...
- change the DenseMap used in callgraph to std::map, since DenseMap cannot
be used with mapped_iterator and friends.
llvm-svn: 76874
2009-07-23 09:04:23 +00:00
Zhongxing Xu
fdd52922c2
constify methods.
...
llvm-svn: 76873
2009-07-23 08:32:25 +00:00
Zhongxing Xu
ef5cfd43b3
Add getter methods.
...
llvm-svn: 76871
2009-07-23 07:37:14 +00:00
Daniel Dunbar
3cdf80589f
Add newline at EOF.
...
llvm-svn: 76870
2009-07-23 07:07:43 +00:00
Daniel Dunbar
7c02cf609d
Shield clang from LLVM API changes, until the dust settles.
...
llvm-svn: 76862
2009-07-23 05:30:36 +00:00
Daniel Dunbar
34169976d0
Fix test case, which has a control-reaches-end-of-non-void warning that was
...
being masked by previous bug.
llvm-svn: 76858
2009-07-23 05:06:51 +00:00
Daniel Dunbar
a2f7c95dca
Use llvm::BitVector instead of managing memory by hand.
...
- As it happens, this also fixes a use-of-uninitialized memory that was causing
non-deterministic test failures.
llvm-svn: 76857
2009-07-23 05:01:54 +00:00
Anders Carlsson
f55922b8b8
Set field info for unions.
...
llvm-svn: 76856
2009-07-23 04:59:05 +00:00
Anders Carlsson
718a89a501
Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.
...
llvm-svn: 76854
2009-07-23 04:50:01 +00:00
Daniel Dunbar
8e31e77fd8
Revert r76831, there are many Analyzer test failures on multiple platforms.
...
--- Reverse-merging r76831 into '.':
U include/clang/Analysis/PathSensitive/GRExprEngine.h
U lib/Analysis/GRExprEngine.cpp
llvm-svn: 76851
2009-07-23 04:41:06 +00:00
Anders Carlsson
f814ee6003
Handle zero width bit fields in unions correctly (by ignoring them).
...
llvm-svn: 76847
2009-07-23 04:00:39 +00:00
Anders Carlsson
697f65943d
Implement union layout support.
...
llvm-svn: 76846
2009-07-23 03:43:54 +00:00
Anders Carlsson
307846fe67
Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)
...
llvm-svn: 76845
2009-07-23 03:17:50 +00:00
Daniel Dunbar
a244814e6f
These IRgen improvements have been done.
...
Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.
llvm-svn: 76844
2009-07-23 03:03:07 +00:00
Ted Kremenek
c5b4c0ec64
Add initial implementation of checking for uses of floating point as a loop counter.
...
llvm-svn: 76833
2009-07-23 01:07:19 +00:00
Ted Kremenek
4cd5577cdf
Add instance predicate method to match static method.
...
llvm-svn: 76832
2009-07-23 01:06:10 +00:00
Ted Kremenek
5939402e2c
Add 'previsit' Checker pass for ObjCMessageExprs.
...
llvm-svn: 76831
2009-07-23 01:05:31 +00:00
Steve Naroff
8e6aee5821
Remove a bunch of FIXME's related to ObjC type checking.
...
- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.
llvm-svn: 76830
2009-07-23 01:01:38 +00:00
Fariborz Jahanian
0228bc1a41
Add constructor used to initialize base/member in
...
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.
llvm-svn: 76826
2009-07-23 00:42:24 +00:00
Mike Stump
671cc00ce1
Fix case, apparently some people still build on case sensitive
...
filesystems.
llvm-svn: 76824
2009-07-23 00:20:25 +00:00
Mike Stump
33979f75a0
Add warning for falling off the end of a function that should return a
...
value. This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall). I believe there should be very few false positives, though
the most interesting case would be:
int() { bar(); }
when bar does:
bar() { while (1) ; }
Here, we assume functions return, unless they are marked with the
noreturn attribute. I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.
If anyone spots other false positives, let me know!
llvm-svn: 76821
2009-07-22 23:56:57 +00:00
Douglas Gregor
e93e46c690
Implement support for out-of-line definitions of the class members of class
...
templates, e.g.,
template<typename T>
struct Outer {
struct Inner;
};
template<typename T>
struct Outer<T>::Inner {
// ...
};
Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.
There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.
llvm-svn: 76820
2009-07-22 23:48:44 +00:00
Eli Friedman
f32f0a7146
Fix test breakage.
...
llvm-svn: 76816
2009-07-22 23:24:42 +00:00
Argyrios Kyrtzidis
3a24c4aa00
Change Preprocessor to keep a copy of LangOptions instead of reference, like ASTContext.
...
Now when creating a Preprocessor we can pass it a temporary LangOptions object instead of having to remember to keep it around.
llvm-svn: 76815
2009-07-22 23:13:42 +00:00
Mike Stump
8dd1b6bd10
Improve CFG support for C++ throw expressions.
...
llvm-svn: 76814
2009-07-22 22:56:04 +00:00
Mike Stump
24cbfc370b
Prep for new warning.
...
llvm-svn: 76813
2009-07-22 22:55:09 +00:00
Ted Kremenek
bfd28fd596
Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.
...
Educate GRExprEngine::VisitGraph() about 'PreStmt'.
Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.
Constify a bunch of arguments, which falls out of the changes to ProgramPoint.
llvm-svn: 76809
2009-07-22 22:35:28 +00:00
Eli Friedman
6aea57560f
Slight code reorganization to allow instantiating post-inc/dec.
...
llvm-svn: 76807
2009-07-22 22:25:00 +00:00
Douglas Gregor
1a7ba62e3a
Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order of evaluation of their arguments to be correct.
...
llvm-svn: 76804
2009-07-22 22:05:02 +00:00
Ted Kremenek
b8725e2099
Use SaveAndRestore in 'clang/Analysis/Support/SaveAndRestore.h'
...
llvm-svn: 76800
2009-07-22 21:52:10 +00:00
Ted Kremenek
5b9b066aeb
Add AssumeDual method.
...
llvm-svn: 76798
2009-07-22 21:51:00 +00:00
Ted Kremenek
915c351496
Migrate the path-sensitive checking of 'nonnull' arguments over to the new
...
'Checker' interface. An updated test case illustrates that after calling a
function with the 'nonnull' attribute we now register the fact that the passed
pointer must be non-null. This retention of information was not possible with
the previously used GRSimpleAPICheck interface.
llvm-svn: 76797
2009-07-22 21:46:56 +00:00
Eli Friedman
3af2a77717
Fix the parsing of default arguments for inline member function
...
definitions.
I'm not very familiar with this code, so please review.
llvm-svn: 76796
2009-07-22 21:45:50 +00:00
Ted Kremenek
b1c170e64b
Make 'SaveAndRestore' and friends reusable classes in libAnalysis.
...
llvm-svn: 76795
2009-07-22 21:45:16 +00:00
Ted Kremenek
49513ccaec
Add support for registering 'Checker' objects with GRExprEngine.
...
Add a 'previsit' stage (that dispatches to registered Checkers) when evaluating the effects of CallExprs.
llvm-svn: 76794
2009-07-22 21:43:51 +00:00
Ted Kremenek
63fc4352b6
Add new 'Checker' and 'CheckerVisitor' classes, which represent a more powerful
...
interface to plug in domain-specific checker logic than the current
GRSimpleAPICheck interface. The new 'Checker' interface can actually generate
new nodes, allowing it to modify the state and refine the analysis (which
GRSimpleAPIChecks could not).
llvm-svn: 76793
2009-07-22 21:42:34 +00:00
Ted Kremenek
2776079844
Add support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.
...
llvm-svn: 76792
2009-07-22 21:40:46 +00:00
Ted Kremenek
8a2cb9cede
Add 'PreStmt' program point. This will be used to represent checking for
...
preconditions (in GRExprEngine) before the statement itself is evaluated.
llvm-svn: 76791
2009-07-22 21:39:25 +00:00
Ted Kremenek
0af7e85bf7
Implement operator= for ExplodedNodeSet.
...
llvm-svn: 76790
2009-07-22 21:38:15 +00:00
Douglas Gregor
d6605dbbc0
Fix the problems with template argument deduction and array types for
...
real. It turns out that we need to actually move all of the qualifiers
up to the array type itself, then recanonicalize the deduced template
argument type.
llvm-svn: 76788
2009-07-22 21:30:48 +00:00
Mike Stump
aa19375206
Make -Wreturn-type be part of -Wmost and therefore -Wall.
...
llvm-svn: 76784
2009-07-22 21:00:27 +00:00
Douglas Gregor
b77af8f4aa
Fix some memory allocation/deallocation issues
...
llvm-svn: 76783
2009-07-22 20:55:49 +00:00
Eli Friedman
2729132ec3
Fix a nasty little use-after-free bug.
...
llvm-svn: 76779
2009-07-22 20:29:16 +00:00
Douglas Gregor
7ac44f4cfb
Canonicalize the types produced by template argument deduction.
...
llvm-svn: 76777
2009-07-22 20:25:36 +00:00
Fariborz Jahanian
f87fbc058d
Improved on performance of the algorithm for proper ordering of
...
ctor's initialization of bases and fields.
llvm-svn: 76776
2009-07-22 20:25:00 +00:00
Douglas Gregor
b3a1fdc363
Slighty more testing for template argument deduction with array arguments
...
llvm-svn: 76774
2009-07-22 20:07:21 +00:00
Douglas Gregor
6045482792
Improve template argument deduction for array types, so that a parameter
...
const T
can be matched with, e.g.,
volatile int [5]
llvm-svn: 76773
2009-07-22 20:02:25 +00:00
Mike Stump
af6ab88979
Prep for new warning.
...
llvm-svn: 76772
2009-07-22 20:02:03 +00:00
Mike Stump
212005c1b4
Use isa instead of dyn_cast for conditionals.
...
llvm-svn: 76771
2009-07-22 18:58:19 +00:00
Devang Patel
06cceef545
Use DICompositeType->replaceAllUsesWith().
...
This requires llvm rev. 76769 or higher.
llvm-svn: 76770
2009-07-22 18:57:00 +00:00
Douglas Gregor
8a27391190
"This patch implements the restrictions on union members detailed in
...
[class.union]p1", from John McCall!
llvm-svn: 76766
2009-07-22 18:25:24 +00:00
Ted Kremenek
f1282074c3
Move bug reporter "visitors" to their own file and make them part of the public
...
BugReporter API. No real functionality change.
llvm-svn: 76760
2009-07-22 17:55:28 +00:00
Fariborz Jahanian
5c14ec30cd
Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodes
...
via ASTContext.
llvm-svn: 76758
2009-07-22 17:41:53 +00:00
Douglas Gregor
b09f3d82cc
Implement parsing and semantic analysis for out-of-line definitions of static
...
data members of class templates. We don't instantiate the definitions yet,
however.
llvm-svn: 76756
2009-07-22 17:18:37 +00:00
Steve Naroff
3de6b70730
Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).
...
It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.
llvm-svn: 76755
2009-07-22 17:14:51 +00:00
Eli Friedman
5173349565
Switch some functions from using x86 builtins to using vector
...
operations.
llvm-svn: 76753
2009-07-22 17:08:01 +00:00
Mike Stump
7a5eaf6dd4
Add some documentation, to make it so the next person doens't select
...
the wrong function. :-)
llvm-svn: 76752
2009-07-22 16:55:20 +00:00
Steve Naroff
51d4f79ffa
Fix <rdar://problem/6770276> Support Class<Proto> syntax.
...
llvm-svn: 76741
2009-07-22 16:07:01 +00:00
Douglas Gregor
a3a4dd5d03
Test template instantiation for member functions of class templates defined
...
out of line.
llvm-svn: 76740
2009-07-22 15:45:39 +00:00
Eli Friedman
5ac69057c0
Make vectorized floating-point comparisons work without crashing.
...
llvm-svn: 76726
2009-07-22 06:07:16 +00:00