Ted Kremenek
ec144538ae
Make sure this test case tests analyzing both x86_64 and i386 archs.
...
llvm-svn: 93133
2010-01-10 22:31:25 +00:00
Benjamin Kramer
e056cea3a6
Silence MSVC warning.
...
RewriteObjC.cpp(4419) : warning C4804: '>' : unsafe use of type 'bool' in operation
llvm-svn: 93124
2010-01-10 19:57:50 +00:00
Anton Korobeynikov
3d364fddda
Make clone() method out-of-line for Attr classes.
...
llvm-svn: 93120
2010-01-10 14:38:13 +00:00
Anton Korobeynikov
b322c3a34b
Try to make cmake happy
...
llvm-svn: 93119
2010-01-10 13:06:34 +00:00
Anton Korobeynikov
55bcea1e65
Generalize target weirdness handling having proper layering in mind:
...
1. Add helper class for sema checks for target attributes
2. Add helper class for codegen of target attributes
As a proof-of-concept - implement msp430's 'interrupt' attribute.
llvm-svn: 93118
2010-01-10 12:58:08 +00:00
Anton Korobeynikov
89b14a4309
Rename file to generalization in next commits
...
llvm-svn: 93117
2010-01-10 12:57:30 +00:00
Benjamin Kramer
307c2c7ebc
Simplify code. No functionality change.
...
llvm-svn: 93114
2010-01-10 09:51:00 +00:00
Zhongxing Xu
9635f6f5ef
Enhance test case.
...
llvm-svn: 93101
2010-01-10 02:52:56 +00:00
Chris Lattner
d081f8c851
stringref'ize a bunch of filename handling logic. Much
...
nicer than passing around two const char*'s.
llvm-svn: 93094
2010-01-10 01:35:12 +00:00
Chris Lattner
e0d2e342b3
try to make this more stable?
...
llvm-svn: 93090
2010-01-10 00:59:17 +00:00
Daniel Dunbar
d281a7146a
Fix PR5982, a refacto in checking for '=' in a -D argument.
...
llvm-svn: 93088
2010-01-10 00:46:21 +00:00
Daniel Dunbar
620327d66b
Fix a FIXME.
...
llvm-svn: 93087
2010-01-10 00:46:10 +00:00
Daniel Dunbar
1c4788b66b
Darwin/ld: Don't pass '-weak_reference_mismatches non-weak' when
...
-weak_reference_mismatches is not present, it is the default.
llvm-svn: 93086
2010-01-10 00:46:00 +00:00
Chris Lattner
062a721c46
add comment to test.
...
llvm-svn: 93085
2010-01-10 00:36:16 +00:00
Chris Lattner
abcbb7c05b
clarify comment.
...
llvm-svn: 93084
2010-01-10 00:35:27 +00:00
Chris Lattner
2ceb625f59
implement rdar://7520940: published framework headers should
...
import other headers within the same framework with the full
framework path, not with a relative include.
llvm-svn: 93083
2010-01-10 00:24:58 +00:00
Ted Kremenek
c6aa800eb3
Fix overzealous assertion in GRExprEngine::VisitLValue(). A
...
CallExpr/ObjCMessageExpr can be visited in an "lvalue" context if it
returns a struct temporary. Currently the analyzer doesn't reason
about struct temporary returned by function calls, but we shouldn't
crash here either.
llvm-svn: 93081
2010-01-09 22:58:54 +00:00
Chris Lattner
e23003d1f1
implement -ftabstop=width, patch by Christian Adåker
...
llvm-svn: 93078
2010-01-09 21:54:33 +00:00
Chris Lattner
b71980f888
revert 91891, a workaround for PR5514.
...
llvm-svn: 93077
2010-01-09 21:45:57 +00:00
Chris Lattner
bb8976e36e
implement codegen support for preinc as an lvalue, PR5514.
...
llvm-svn: 93076
2010-01-09 21:44:40 +00:00
Chris Lattner
116ce8f172
refactor pre/postinc logic into CGF and require the caller to pass in the
...
lvalue to poke, no functionality change.
llvm-svn: 93075
2010-01-09 21:40:03 +00:00
Chris Lattner
34c72dd683
revert r92749, which is just dead code.
...
llvm-svn: 93074
2010-01-09 21:14:47 +00:00
Chris Lattner
5ed4390474
make missing prototypes warn by default in c99 mode like GCC does,
...
rdar://7083878
llvm-svn: 93073
2010-01-09 20:43:38 +00:00
Chris Lattner
f9895c48fd
add a bunch of missing prototypes to tests
...
llvm-svn: 93072
2010-01-09 20:43:19 +00:00
Ted Kremenek
9aa01441c3
Fix broken diagnostic when returning the address of a stack-allocated array.
...
llvm-svn: 93071
2010-01-09 20:05:00 +00:00
Benjamin Kramer
60fbd641ad
Simplify with StringSwitch.
...
llvm-svn: 93064
2010-01-09 18:53:11 +00:00
Chris Lattner
09ac1b888c
2010 is here.
...
llvm-svn: 93063
2010-01-09 18:40:42 +00:00
Benjamin Kramer
dc2f006f4e
Hopefully unbreak build with g++ >= 4.3.
...
llvm-svn: 93060
2010-01-09 18:20:57 +00:00
Benjamin Kramer
2d6fda3205
Use MacroBuilder for TargetDefines instead of std::vector.
...
llvm-svn: 93058
2010-01-09 17:55:51 +00:00
Benjamin Kramer
3f6323dea5
Move MacroBuilder into Frontend/Utils.h and clean it up a bit.
...
llvm-svn: 93057
2010-01-09 17:43:21 +00:00
Benjamin Kramer
f65e959035
Rework InitPreprocessor to use a MacroBuilder class instead of pushing around
...
std::vectors.
- MacroBuilder wraps a raw_ostream so it can easily write to any buffer
supported by raw_ostream.
- MacroBuilder's method take Twines for easy string concatenation (this was done
with sprintf and temporary buffers before).
- Targets still use std::vector as they don't have access to the builder.
llvm-svn: 93051
2010-01-09 16:17:37 +00:00
Kovarththanan Rajaratnam
e8ed5be89f
Switch UndefineBuiltinMacro() over to using StringRef
...
llvm-svn: 93049
2010-01-09 09:31:32 +00:00
Kovarththanan Rajaratnam
2f14619d89
Switch DefineBuiltinMacro() over to using StringRef
...
llvm-svn: 93048
2010-01-09 09:27:11 +00:00
Zhongxing Xu
f1eeb78ffc
When binding an rvalue to a reference, create a temporary object. Use
...
CXXObjectRegion to represent it.
In Environment, lookup a literal expression before make up a value for it.
llvm-svn: 93047
2010-01-09 09:16:47 +00:00
Chris Lattner
002ba6b4d0
improve support for dragonfly, patch by Sascha Wildner!
...
llvm-svn: 93044
2010-01-09 05:41:14 +00:00
Mike Stump
b3ed45b67c
Fix indentation.
...
llvm-svn: 93023
2010-01-08 19:28:41 +00:00
Mike Stump
9620622431
Add in final overrider logic.
...
llvm-svn: 93022
2010-01-08 19:25:36 +00:00
Ted Kremenek
b92304b42f
Fix handling in GRExprEngine of 'default' branch in switch statements
...
when the default case is winnowed down to be infeasible. When all
cases were ruled out (and the analysis state for the default case
would be infeasible) we would still consider the default case
possible. This fixes PR 5969.
llvm-svn: 93017
2010-01-08 18:54:04 +00:00
John McCall
af07fbe210
Organize testcase into namespaces.
...
llvm-svn: 93015
2010-01-08 18:40:32 +00:00
Ted Kremenek
ea903067e1
For now, add back clang_getDeclSource().
...
llvm-svn: 93003
2010-01-08 17:11:32 +00:00
John McCall
12f97bc48a
Change the printing of OR_Deleted overload results to print all the candidates,
...
not just the viable ones. This is reasonable because the most common use of
deleted functions is to exclude some implicit conversion during calls; users
therefore will want to figure out why some other options were excluded.
Started sorting overload results. Right now it just sorts by location in the
translation unit (after putting viable functions first), but we can do better than
that.
Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better
self-documentation.
llvm-svn: 92990
2010-01-08 04:41:39 +00:00
Dan Gohman
d1e76b957b
Use -fno-math-errno by default, and remove the IsMathErrnoDefault
...
targethook, which is no longer being used. This fixes PR5971.
llvm-svn: 92987
2010-01-08 02:20:44 +00:00
Fariborz Jahanian
39d70940e4
clang ObjC rewriter: generated code used in "for (x in y)" loop uses
...
incorrect cast, causing compile error (fixes radar 7342867).
llvm-svn: 92986
2010-01-08 01:29:44 +00:00
John McCall
d322416233
Reorganize PrintOverloadCandidates. No functionality change.
...
llvm-svn: 92979
2010-01-08 00:58:21 +00:00
Eli Friedman
5866fe306d
Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring
...
run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.
llvm-svn: 92976
2010-01-08 00:50:11 +00:00
Douglas Gregor
fa1e36d0de
Improve the fix-its for -Wparentheses to ensure that the fix-it
...
suggestions follow recovery. Additionally, add a note to these
diagnostics which suggests a fix-it for changing the behavior to what
the user probably meant. Examples:
t.cpp:2:9: warning: & has lower precedence than ==; == will be evaluated first
[-Wparentheses]
if (i & j == k) {
^~~~~~~~
( )
t.cpp:2:9: note: place parentheses around the & expression to evaluate it first
if (i & j == k) {
^
( )
t.cpp:14:9: warning: using the result of an assignment as a condition
without
parentheses [-Wparentheses]
if (i = f()) {
~~^~~~~
( )
t.cpp:14:9: note: use '==' to turn this assignment into an equality
comparison
if (i = f()) {
^
==
llvm-svn: 92975
2010-01-08 00:20:23 +00:00
David Chisnall
df34917a38
Export a public symbol for classes with the GNU runtime.
...
llvm-svn: 92973
2010-01-08 00:14:31 +00:00
Ted Kremenek
32b79317a2
More crashtracer enhancements to CIndex. When "popping" a crashtracer string
...
restore to the one most recently created.
llvm-svn: 92959
2010-01-07 23:13:53 +00:00
Douglas Gregor
b15af899fb
Add an "implicit" bit to CXXThisExpr, so that we can track
...
implicitness without losing track of the (logical or actual) location
where "this" would occur in the source.
llvm-svn: 92958
2010-01-07 23:12:05 +00:00
Fariborz Jahanian
bc6811c32e
Fixes a bug where we were rewriting two definitions of
...
_objc_method (part of radar 7490408).
llvm-svn: 92957
2010-01-07 22:51:18 +00:00