Michael J. Spencer
a0a820fadb
Lexer: Implement GCC's version of pragma message.
...
llvm-svn: 114814
2010-09-27 06:19:02 +00:00
Douglas Gregor
176d286c96
Enable caching of global code completion results in the suggested
...
libclang options for editing a translation unit.
llvm-svn: 114810
2010-09-27 05:49:58 +00:00
Daniel Dunbar
f247675c55
Driver/Linux: Translate rewritten lib options back to standard -l form when
...
using generic GCC tools.
llvm-svn: 114793
2010-09-25 18:10:05 +00:00
Marcin Swiderski
8b99b8a782
In preparation for adding generation of destructors for objects with automatic storage added:
...
- LocalScope class with iterator used to pointing into it,
- fat doxygen comment for LocalScope indended usage,
- BlockScopePosPair class used for storing jump targets/sources (for: goto, break, continue), that replaces raw CFGBlock pointer used earlier for this purpose.
llvm-svn: 114790
2010-09-25 11:05:21 +00:00
Fariborz Jahanian
c60da031c5
Fix a NYI in IRGen which was due to incorrect AST
...
for property reference expression (of c++ object type)
in the conditional expression. Fixes // rdar://8291337
llvm-svn: 114783
2010-09-25 01:08:05 +00:00
Douglas Gregor
2fb99df2c3
When setting the globally-visible declarations for a particular
...
identifier, we may have a Sema object but no translation unit scope
(because parsing is finished). In this case, we still need to update
the IdResolver, which might still be used when writing a PCH
containing another PCH (without chaining). This bug manifested as a
failure with precompiled preambles.
Also, add a little environment-variable-sensitive logging for
libclang.
llvm-svn: 114774
2010-09-24 23:29:12 +00:00
Anders Carlsson
991285e425
Allow the use of C++0x deleted functions as an extension in C++98.
...
llvm-svn: 114762
2010-09-24 21:25:25 +00:00
Douglas Gregor
2c84482abd
Teach libclang to enable multithreading in LLVM, since libclang clients are likely to be multithreaded. Also move the printing of timers to somewhere better for multithreaded libclang clients
...
llvm-svn: 114760
2010-09-24 21:18:36 +00:00
Daniel Dunbar
4ed214a191
Driver: Add -fallow-unsupported which disables some of the eager error'ing we do
...
to prevent users from trying unsupported stuff. Useful for testing.
llvm-svn: 114749
2010-09-24 19:39:37 +00:00
Fariborz Jahanian
aa0f2b3016
Fix rewriting of property declared in @protocol's.
...
Fixed //rdar://8472487.
llvm-svn: 114741
2010-09-24 18:36:58 +00:00
Fariborz Jahanian
8fb87aec78
Patch implements passing arrays to functions expecting
...
vla. Implements pr7827.
llvm-svn: 114737
2010-09-24 17:30:16 +00:00
Douglas Gregor
3aa045491f
Update Clang man page to say a little bit more about C++
...
llvm-svn: 114735
2010-09-24 17:26:14 +00:00
Ted Kremenek
45c42ec2f1
Remove this test for now until I figure out how to get it to work with c-index-test in a portable way.
...
llvm-svn: 114721
2010-09-24 02:43:32 +00:00
Ted Kremenek
2c2d146488
Pass -fobjc-nonfragile-abi2 in test.
...
llvm-svn: 114720
2010-09-24 02:00:46 +00:00
Ted Kremenek
f93eb1b09e
Since this test depends on default ivar synthesis, specify the target triple. This hopefully unbreaks the buildbot
...
on some archs.
llvm-svn: 114716
2010-09-24 01:51:38 +00:00
Ted Kremenek
25cfb3b511
Update comment in test with reference to bug report.
...
llvm-svn: 114715
2010-09-24 01:24:15 +00:00
Ted Kremenek
74a9f98522
Default synthesized ivars don't really have a location in the source. Using the location of the @implementation
...
is just confusing for clients that want to use SourceLocations for syntactic references.
Fixes: <rdar://problem/8470540>
llvm-svn: 114714
2010-09-24 01:23:01 +00:00
Nick Lewycky
6e1ce29b01
Revert r114712 due to failure on darwin buildbot.
...
llvm-svn: 114713
2010-09-24 00:46:53 +00:00
Nick Lewycky
e351fed104
Make -M/-MM behave like in gcc; use -MF first then -o else use stdout.
...
llvm-svn: 114712
2010-09-23 23:49:25 +00:00
Nick Lewycky
e47c245b90
Fix header comment so we don't break emacs.
...
llvm-svn: 114711
2010-09-23 23:48:20 +00:00
Douglas Gregor
0ac41389a4
Synchronize globally-cached code completion results with the results
...
provided when the optimization is disabled. In particular, split
the completion context CCC_Other into two contexts: CCC_Other, which
means that it's an undisclosed context for which any other results are
unwelcome, and CCC_Recovery, which is used in recovery cases.
Since we're now using the completion context within the completion
results builder, make sure that it's always set to something.
Fixes <rdar://problem/8470644>.
llvm-svn: 114704
2010-09-23 23:01:17 +00:00
Nick Lewycky
f2b22ab044
Fix typo.
...
llvm-svn: 114697
2010-09-23 21:43:57 +00:00
Ted Kremenek
6274be47fa
When warning about comparing an unsigned int to being >= 0, don't issue a warning if the zero value was an
...
enum or was expanded from a macro.
Fixes: <rdar://problem/8414119>
llvm-svn: 114695
2010-09-23 21:43:44 +00:00
Ted Kremenek
24fb1d03d3
Add test case for c-index-test showing that @property declarations added in class extensions don't get reported
...
in the @interface.
llvm-svn: 114694
2010-09-23 21:25:13 +00:00
Ted Kremenek
cba5849c0b
For properties declared in a @protocol and redeclared in a class extension, use the class extension
...
as the lexical DeclContext for the @property declaration that gets auto-created for the @interface.
Fixes: <rdar://problem/8467189>
llvm-svn: 114693
2010-09-23 21:18:05 +00:00
Douglas Gregor
ca5b053920
Add some missing concurrency checks into libclang
...
llvm-svn: 114682
2010-09-23 18:47:53 +00:00
Argyrios Kyrtzidis
e619e99a1b
Fix bogus compiler errors when declaring anonymous union, outside a class, with
...
members with the same name as a decl outside the scope where the members are actually introduced.
Fixes http://llvm.org/PR6741
llvm-svn: 114641
2010-09-23 14:26:01 +00:00
Argyrios Kyrtzidis
4f92016ed3
If -fcolor-diagnostics is explicitly passed to the driver respect that even if the driver is of the opinion that
...
stderr can't handle them. (see http://llvm.org/PR8150 )
Patch by Frits van Bommel!
llvm-svn: 114638
2010-09-23 12:56:06 +00:00
Argyrios Kyrtzidis
719a46bbf1
Don't crash on _Imaginary.
...
llvm-svn: 114637
2010-09-23 09:40:31 +00:00
Argyrios Kyrtzidis
3446898e90
Use -emit-llvm-only in the test.
...
llvm-svn: 114636
2010-09-23 09:40:20 +00:00
Ted Kremenek
fd5856adcb
Refactor GRExprEngine::VisitCall() to use EvalArguments(), just like VisitCXXMemberCallExpr(). Ideally we should unify these code paths as much as possible, since they only differ by a few details.
...
llvm-svn: 114628
2010-09-23 05:14:51 +00:00
Daniel Dunbar
1fae17a8e5
Tweak test to pass -ffreestanding, to avoid platform dependent header issues.
...
llvm-svn: 114627
2010-09-23 04:40:10 +00:00
Daniel Dunbar
19964dbe3b
IRgen/ABI/ARM: Return large vectors in memory.
...
llvm-svn: 114619
2010-09-23 01:54:32 +00:00
Daniel Dunbar
b34b08098c
IRgen/ABI/ARM: Trust the backend to pass vectors correctly for the given ABI.
...
- Therefore, we can lower out the NEON wrapper structs and pass the vectors
directly. This makes a huge difference in the cleanliness of the IR after
optimization.
- I will trust, but verify, via future ABITest testing (for APCS-GNU, at
least).
llvm-svn: 114618
2010-09-23 01:54:28 +00:00
Ted Kremenek
866ac0a0da
Update checker build.
...
llvm-svn: 114615
2010-09-23 00:35:46 +00:00
Douglas Gregor
0576ce730a
Implement libclang API functions for retrieving the lexical and
...
semantic parents of the given cursor.
llvm-svn: 114587
2010-09-22 21:22:29 +00:00
Devang Patel
f063cb49d8
Testcase for r114585.
...
llvm-svn: 114586
2010-09-22 21:13:48 +00:00
Tom Care
14fefab721
Fix an inverse boolean and unnecessary new line in warning output from AnalyzerStatsChecker.
...
llvm-svn: 114581
2010-09-22 21:07:51 +00:00
Sebastian Redl
c1d035f6a3
Change source manager serialization to be less tied to the PCH model.
...
llvm-svn: 114575
2010-09-22 20:19:08 +00:00
Douglas Gregor
a1ed39be76
Fix a hard-to-reproduce crash-on-invalid, where we weren't checking for a valid result from ActOnIdExpression
...
llvm-svn: 114548
2010-09-22 16:33:13 +00:00
Argyrios Kyrtzidis
ca0d0cd3b9
Implement -Wpadded and -Wpacked.
...
-Wpadded warns when undesired padding is introduced in a struct. (rdar://7469556)
-Wpacked warns if a struct is given the packed attribute, but the packed attribute has no effect
on the layout or the size of the struct. Such structs may be mis-aligned for little benefit.
The warnings are emitted at the point where layout is calculated, that is at RecordLayoutBuilder.
To avoid calculating the layouts of all structs regardless of whether they are needed or not,
I let the layouts be lazily constructed when needed. This has the disadvantage that the above warnings
will be emitted only when they are used for IR gen, and not e.g with -fsyntax-only:
$ cat t.c
struct S {
char c;
int i;
};
void f(struct S* s) {}
$ clang -fsyntax-only -Wpadded t.c
$ clang -c -Wpadded t.c -o t.o
t.c:3:7: warning: padding struct 'struct S' with 3 bytes to align 'i' [-Wpadded]
int i;
^
1 warning generated.
This is a good tradeoff between providing the warnings and not calculating layouts for all
structs in case the user has enabled a couple of rarely used warnings.
llvm-svn: 114544
2010-09-22 14:32:24 +00:00
Chris Lattner
775e635b5a
update a bunch of tests that are using the x86 backend instead of grepping IR :(
...
llvm-svn: 114535
2010-09-22 06:09:31 +00:00
Sebastian Redl
96371b446e
Only preload SLocEntries after the entire PCH chain was loaded.
...
llvm-svn: 114518
2010-09-22 00:42:30 +00:00
Sebastian Redl
949fe9e03b
Reshuffle PerFileData's members to make more sense.
...
llvm-svn: 114517
2010-09-22 00:42:27 +00:00
Daniel Dunbar
da4f6b5151
Driver/Darwin: Add a runtime library just for ___eprintf -- when targeting i386
...
some projects still depend on ___eprintf being available.
llvm-svn: 114509
2010-09-22 00:03:52 +00:00
Chris Lattner
b2f659b7a0
fix the rest of rdar://8461279 - clang miscompiles address-space qualified atomics
...
llvm-svn: 114503
2010-09-21 23:40:48 +00:00
Chris Lattner
c9066d3072
same bug as before, this time with __sync_val_compare_and_swap.
...
llvm-svn: 114502
2010-09-21 23:35:30 +00:00
Chris Lattner
7cf46bfda0
fix __sync_bool_compare_and_swap to work with address-space qualified types.
...
llvm-svn: 114498
2010-09-21 23:24:52 +00:00
Chris Lattner
65dce5eeee
filecheckize.
...
llvm-svn: 114497
2010-09-21 23:22:41 +00:00
Fariborz Jahanian
521c72c756
Fixes an IRgen ICE due to cast of null pointer to
...
a vla type (fixes pr7827).
llvm-svn: 114495
2010-09-21 22:53:33 +00:00