John McCall
d0e23ecdc2
Instantiate enclosing template parameter lists when instantiating friends.
...
llvm-svn: 116789
2010-10-19 02:26:41 +00:00
John McCall
e3df2638ce
Uncomputable contexts are always records but can exist.
...
llvm-svn: 116787
2010-10-19 01:54:45 +00:00
John McCall
ace48cd872
Redirect templated friend class decls to a new Sema callback and
...
construct an unsupported friend when there's a friend with a templated
scope specifier. Fixes a consistency crash, rdar://problem/8540527
llvm-svn: 116786
2010-10-19 01:40:49 +00:00
NAKAMURA Takumi
5a391c97b5
test/Sema/return.c: Cygwin does not have _longjmp().
...
Although Cygwin-1.7 has _longjmp(), it would not be essential for this
to distinguish Cygwin's version with <cygwin/version.h>.
llvm-svn: 116783
2010-10-19 01:17:08 +00:00
NAKAMURA Takumi
3ad833be0e
test/Coverage/html-diagnostics.c: Do not make hit "CHECK: Dereference of null pointer" to the output itself!
...
llvm-svn: 116782
2010-10-19 01:11:16 +00:00
Douglas Gregor
0787b3224d
Tweak code-completion result priorities, so that exact and similar
...
type matches have a bigger impact. The impetus for this change was
that, when initializing an enumeration value, we want enumerators of
that enumeration type to have a higher priority than, e.g., unrelated
local variables.
llvm-svn: 116774
2010-10-19 00:03:23 +00:00
Bill Wendling
9987c0ea42
We shouldn't keep track of MMX registers "needed" separately from the SSE
...
registers needed.
llvm-svn: 116772
2010-10-18 23:51:38 +00:00
Eric Christopher
8a8673ea39
From scratch rewrite of mm_malloc.h.
...
Patch by Matthew Beaumont-Gay!
llvm-svn: 116771
2010-10-18 23:38:51 +00:00
Daniel Dunbar
cb79c22678
tests: Force triple to avoid limited precision warning on win32.
...
llvm-svn: 116770
2010-10-18 23:37:08 +00:00
Ted Kremenek
da8a79ac8d
"Fix" bogus idempotent operations warning due to loop unrolling not unrolling enough loops to show that an invariant
...
doesn't hold. This fix is to increase the loop unrolling count to 4, which experiments show doesn't typically impact
analysis time. The real fix is to modify the IdempotentOperationsChecker to suppress warnings where an analysis point
could be preceded by a point where we gave up due to loop unrolling.
llvm-svn: 116769
2010-10-18 23:36:05 +00:00
Daniel Dunbar
473f8a6f88
Driver: Reject -fasm-blocks except on X86 (where we just ignore it, since
...
passing it is very prevalent in some circles).
llvm-svn: 116761
2010-10-18 22:49:46 +00:00
Daniel Dunbar
2b4de14b1d
Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -c
...
-Wa,-force_cpusubtype_ALL t.c'.
- Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of
arguments and give an obvious unsupported error on others.
llvm-svn: 116759
2010-10-18 22:36:15 +00:00
Daniel Dunbar
767bbabb24
Driver/Darwin: Forward -ObjC when linking, which may be needed when using static
...
libraries with Objective-C code.
llvm-svn: 116758
2010-10-18 22:08:36 +00:00
Douglas Gregor
c769d6e007
Fix the translation of the PCC_ForInit code-completion context for
...
C++/C99/Objective-C, so that we properly include types. This fix
affects global caching of code-completion results; without caching,
the behavior was already correct.
llvm-svn: 116757
2010-10-18 22:01:46 +00:00
Douglas Gregor
643c330b91
Provide code completion for types after the '^' that starts a block
...
literal.
llvm-svn: 116754
2010-10-18 21:34:55 +00:00
John McCall
18e4edae82
Fix some bugs in local class mangling brought up in PR8355.
...
Patch by Richard Smith!
llvm-svn: 116752
2010-10-18 21:28:44 +00:00
Douglas Gregor
8e3e8743fb
Introduce code completion results for Objective-C methods, both when
...
declaring methods and when sending messages to them, by bringing all
of the selector into TypedCheck chunks in the completion result. This
way, we can improve the sorting of these results to account for the
full selector name rather than just the first chunk.
llvm-svn: 116746
2010-10-18 21:05:04 +00:00
Argyrios Kyrtzidis
9beef8e53d
Read/write declaration attributes from/to PCH properly. Embed them in the declaration block instead of trying to create another block.
...
The new block was messing with the assumption that after decls block comes the stmts block.
Fixes http://llvm.org/PR8406
llvm-svn: 116737
2010-10-18 19:20:11 +00:00
Argyrios Kyrtzidis
754fb5ffb3
Merge header & cpp for test/PCH/attrs.c - more convenient to keep the tests in one source file.
...
llvm-svn: 116736
2010-10-18 19:20:05 +00:00
Douglas Gregor
1b035bbe3a
When providing code completions of Objective-C method declarations
...
(after - or +), always traverse superclasses and all categories. The
programmer may want to complete a method from *anywhere*.
llvm-svn: 116723
2010-10-18 18:21:28 +00:00
Fariborz Jahanian
f34011e4ca
patch fixes class names missing from method names in debug information for
...
synthesized property. // rdar: //8498026
llvm-svn: 116717
2010-10-18 17:51:06 +00:00
Anders Carlsson
778ca32c88
Implement the first half of [dcl.attr.override]p6.
...
llvm-svn: 116709
2010-10-18 16:24:27 +00:00
Francois Pichet
a310806ae5
Microsoft enum extensions. 2 things will change on -fms-extensions:
...
1. enum underlying type is int by default.
2. Error "enumerator value is not representable in the underlying type"is a ExtWarning
llvm-svn: 116704
2010-10-18 15:01:13 +00:00
Douglas Gregor
6769922d8c
Add iteration over the preprocessor conditional stack to PreprocessorLexer
...
llvm-svn: 116703
2010-10-18 14:43:21 +00:00
Douglas Gregor
70d80598c5
Add declarations nested in a linkage specification to the output of
...
-ast-print-xml, from Martin Vejnar!
llvm-svn: 116702
2010-10-18 14:35:28 +00:00
Michael J. Spencer
a9e009e5bd
CodeGen: Fix long double on Windows using MSVC runtime.
...
llvm-svn: 116700
2010-10-18 07:11:10 +00:00
Michael J. Spencer
feb799c14b
Fix Whitespace.
...
llvm-svn: 116699
2010-10-18 07:10:59 +00:00
Bill Wendling
5cd41c4b13
Reapply r116684 with fixes. The test cases needed to be updated.
...
llvm-svn: 116696
2010-10-18 03:41:31 +00:00
Oscar Fuentes
16d73f9216
Do not use absolute path on the clang++ symlink.
...
Based on a patch by Ryuta Suzuki!
llvm-svn: 116695
2010-10-18 02:25:54 +00:00
Anders Carlsson
0ea1047d51
Implement [dcl.attr.override]p2 and add tests for p1 and p2.
...
llvm-svn: 116692
2010-10-17 23:36:12 +00:00
Anders Carlsson
fa9de26518
Add test for [dcl.attr.final]p4.
...
llvm-svn: 116691
2010-10-17 22:47:44 +00:00
Oscar Fuentes
95b6f045f1
Use a script for creating the clang++ executable.
...
The previous method used the DESTDIR environment variable at configure
time, but sometimes it is only available at install time. See PR8397.
llvm-svn: 116689
2010-10-17 16:10:32 +00:00
Bill Wendling
c7c9be661f
Temporarily revert r116684. It was causing failures with
...
Clang :: CodeGen/x86_32-arguments-darwin.c
Clang :: CodeGen/x86_32-arguments-linux.c
llvm-svn: 116687
2010-10-17 07:58:46 +00:00
Bill Wendling
812f4b123e
The "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. The
...
function parameters weren't converted to use the correct type (x86_mmx). Add a
check, similar to the one in llvm-gcc, to see if we need the x86_mmx type for
that function parameter. If so, it coerces the type to be that.
llvm-svn: 116684
2010-10-17 07:38:01 +00:00
Argyrios Kyrtzidis
cd86570b93
Xcode keeps modifying the project file and I don't know how to ignore the change; just commit it.
...
llvm-svn: 116673
2010-10-16 17:18:07 +00:00
John McCall
d509182336
Coding by inspection has its problems.
...
llvm-svn: 116672
2010-10-16 16:34:08 +00:00
Gabor Greif
6a46da277f
validator
...
llvm-svn: 116668
2010-10-16 09:40:21 +00:00
Gabor Greif
4b50bd8a2e
these items are done, afaik
...
llvm-svn: 116667
2010-10-16 09:29:38 +00:00
John McCall
17afe45a87
objc_exception_rethrow does not take an exception argument.
...
rdar://problem/8535238
llvm-svn: 116663
2010-10-16 08:21:07 +00:00
John McCall
c9739e30c6
Reformatting.
...
llvm-svn: 116662
2010-10-16 07:23:36 +00:00
John McCall
2c2eb12d9c
White-listing templated-scope friend decls is a good idea, but doing it
...
by marking the decl invalid isn't. Make some steps towards supporting these
and then hastily shut them down at the last second by marking them as
unsupported.
llvm-svn: 116661
2010-10-16 06:59:13 +00:00
Daniel Dunbar
622581b73b
Revert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature for
...
objc_exception_rethrow, so we don't...", since something is actually trying to
call this with the wrong signature (!). Unfortunately I don't understand the new
EH infrastructure well enough to fix it immediately.
llvm-svn: 116660
2010-10-16 05:04:10 +00:00
Daniel Dunbar
b4ece9cf2f
Add an empty robots.txt, mostly just to reduce errors in HTTP log.
...
llvm-svn: 116658
2010-10-16 04:10:37 +00:00
Daniel Dunbar
cc5b831149
Add a favicon.ico, mostly just to reduce errors in HTTP log.
...
llvm-svn: 116657
2010-10-16 04:08:19 +00:00
Daniel Dunbar
90bb5c2315
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
...
generate unnecessary %al clear on x86_64.
llvm-svn: 116656
2010-10-16 04:08:16 +00:00
Fariborz Jahanian
1cee0adea3
Fix a rewriting bug of rewriting properties declared in
...
protocols. // rdar: //8558702
llvm-svn: 116652
2010-10-16 00:29:27 +00:00
Ted Kremenek
51651089ab
Tweak scan-build to work with naked clang commands.
...
llvm-svn: 116651
2010-10-16 00:29:16 +00:00
Chandler Carruth
dc689c4156
Not really sure how this worked, but it seems like a clear typo. =]
...
llvm-svn: 116650
2010-10-16 00:24:52 +00:00
Douglas Gregor
1f81ced14c
Allow list-initialization of a local variable of class type with a
...
flexible array member, so long as the flexibility array member is
either not initialized or is initialized with an empty initializer
list. Fixes <rdar://problem/8540437>.
llvm-svn: 116647
2010-10-15 23:53:28 +00:00
Douglas Gregor
bafff22b91
Disable this test again, which naturally fails on every platform except the one I'm building with
...
llvm-svn: 116642
2010-10-15 23:23:05 +00:00
Ted Kremenek
4f63ac7057
Tweak retain/release checker diagnostics to specify a leak occurs because an object is not referenced later in the path,
...
not that it isn't referenced later in the code. Fixes <rdar://problem/8527839>.
llvm-svn: 116636
2010-10-15 22:50:23 +00:00
Fariborz Jahanian
dddf158c19
Check for ivar being a C++ object before attempting to
...
find a copy constructor/assignment operator used
in getter/setter synthesis. This removes an unintended
diagnostics and makes objc++ consistant with objective-c.
// rdar: //8550657.
llvm-svn: 116631
2010-10-15 22:42:59 +00:00
Daniel Dunbar
6358d6866d
Driver: Error on -fno-for-scope, which we have no intention of supporting.
...
llvm-svn: 116627
2010-10-15 22:30:42 +00:00
Nick Lewycky
c60d6e7af0
Report the location of the syntax error inside a macro. Fixes PR7944.
...
llvm-svn: 116624
2010-10-15 21:43:24 +00:00
Francois Pichet
8c2f519b8b
bool bit fields are causing problems with MSVC. Replace them with unsigned bit fields.
...
llvm-svn: 116623
2010-10-15 21:34:50 +00:00
Dan Gohman
f47df3e02a
Mention the paragraphs in the standards which sanction TBAA.
...
llvm-svn: 116617
2010-10-15 20:54:41 +00:00
Dan Gohman
c44fd6486e
Use a different name for pointer types in tbaa, to be a little
...
more consistent with other names, and to look less like a magic name.
llvm-svn: 116616
2010-10-15 20:26:20 +00:00
Dan Gohman
2d0a3c7b8c
Add a comment.
...
llvm-svn: 116615
2010-10-15 20:24:53 +00:00
Dan Gohman
4a3b1b3ef4
Fix a typo in a comment Frits van Bommel spotted.
...
llvm-svn: 116614
2010-10-15 20:24:10 +00:00
Dan Gohman
2e29eb5a4b
Experimental TBAA support for enum types.
...
llvm-svn: 116613
2010-10-15 20:23:12 +00:00
Argyrios Kyrtzidis
59b34c2bb4
Again, add '-include-pch' option to the driver, so it can get passed to the cc1 driver.
...
llvm-svn: 116608
2010-10-15 18:52:45 +00:00
Argyrios Kyrtzidis
dfe47dba37
Revert r116605, a lot more were committed by mistake.
...
llvm-svn: 116606
2010-10-15 18:51:34 +00:00
Argyrios Kyrtzidis
ffbba26285
Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.
...
llvm-svn: 116605
2010-10-15 18:49:01 +00:00
Fariborz Jahanian
4f99b59df6
Eradicate IsSuper field from ObjCImplicitSetterGetterRefExprClass
...
AST node. (finishing off radar 8525788).
llvm-svn: 116603
2010-10-15 18:40:05 +00:00
Devang Patel
f3ca447c26
TBAA = Type Based Alias Analysis
...
llvm-svn: 116599
2010-10-15 18:23:36 +00:00
Argyrios Kyrtzidis
434383d703
Read/write to/from PCH DeclarationNameLocs, DeclarationNameInfos and QualifierInfos (rdar://8513756).
...
llvm-svn: 116598
2010-10-15 18:21:24 +00:00
Dan Gohman
d19ee8a07f
Don't leak the TBAA object.
...
llvm-svn: 116595
2010-10-15 18:04:46 +00:00
Dan Gohman
f5c5e0773e
Add a comment about odd "signed char" incompatibility between C++ and C.
...
llvm-svn: 116593
2010-10-15 17:52:03 +00:00
David Chisnall
2e16ac52e1
Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.
...
llvm-svn: 116587
2010-10-15 17:07:39 +00:00
Douglas Gregor
26c5578d84
When performing typo correction, keep track of whether the last lookup
...
we did was an acceptable lookup. If it is, then we can re-use that
lookup result. If it isn't, we have to perform the lookup again. This
is almost surely the cause behind the mysterious typo.m failures on
some builders; we were getting the wrong lookup results returned.
llvm-svn: 116586
2010-10-15 16:49:56 +00:00
Daniel Dunbar
2a40abae4d
Disable type.m while failures are investigated.
...
llvm-svn: 116577
2010-10-15 15:28:09 +00:00
Daniel Dunbar
1837dbd4e3
Make test more consistent.
...
llvm-svn: 116576
2010-10-15 15:13:02 +00:00
Douglas Gregor
af9eb59274
When we're in the context of an Objective-C message send's receiver,
...
typo correction prefers "super" over other, equivalent completions. I
believe this will fix the regression on the buildbot.
llvm-svn: 116574
2010-10-15 13:35:25 +00:00
Douglas Gregor
36c22a2335
Diagnose C++ [class.mem]p13-14, where a class member has the same name
...
as the class itself. Fixes PR7082.
llvm-svn: 116573
2010-10-15 13:21:21 +00:00
Gabor Greif
de1f58919a
zap trailing whitespace
...
llvm-svn: 116572
2010-10-15 08:48:51 +00:00
Gabor Greif
7e1dd672fb
testcase for http://llvm.org/PR8371 of my last commit, r116570
...
llvm-svn: 116571
2010-10-15 08:44:44 +00:00
Gabor Greif
eef3197301
fix http://llvm.org/PR8371 in the straightforward way, also adding a comment
...
llvm-svn: 116570
2010-10-15 08:26:25 +00:00
Abramo Bagnara
932e393fda
Treat __extension__ like ParenExpr.
...
llvm-svn: 116569
2010-10-15 07:51:18 +00:00
Craig Silverstein
12a198e5b1
Recurse on a TypeLoc rather than a Type for TypedefDecl, now that the
...
typloc information is available (I don't think it was, originally).
Submitted as a 'trivial' change.
llvm-svn: 116568
2010-10-15 06:51:01 +00:00
John McCall
1c9c3fd50a
Death to blocks, or at least the word "block" in one particular obnoxiously
...
ambiguous context.
llvm-svn: 116567
2010-10-15 04:57:14 +00:00
Douglas Gregor
d4e1fb562e
Don't complain about a variable within a linkage-specification that is
...
initialized. Fixes PR7076.
llvm-svn: 116553
2010-10-15 01:21:46 +00:00
Douglas Gregor
b048402073
When we are missing the ',' or '>' to terminate a template parameter
...
list, complain about it! Fixes PR7053.
llvm-svn: 116551
2010-10-15 01:15:58 +00:00
Douglas Gregor
8a8e0313bf
Add builtin conditional operator candidates for scoped enumeration
...
types, from Alp Toker! Fixes PR8344.
llvm-svn: 116549
2010-10-15 00:50:56 +00:00
Daniel Dunbar
59ae137329
Update CMake.
...
llvm-svn: 116548
2010-10-15 00:39:31 +00:00
Oscar Fuentes
b3ce035c71
Copied some flags from the Makefile build to the list of GCC flags.
...
This removes a lot of warnings.
llvm-svn: 116545
2010-10-15 00:16:22 +00:00
Dan Gohman
d65c196439
Add a TBAA type for pointer types.
...
llvm-svn: 116544
2010-10-15 00:01:39 +00:00
Dan Gohman
3f1cf0f373
Unsigned types are TBAA-compatible with their signed counterparts.
...
Also, handle unknown types conservatively.
llvm-svn: 116541
2010-10-14 23:39:00 +00:00
Fariborz Jahanian
9c07e1767d
Rewrite bug fix rewriting a property assignment when
...
its RHS is an ivar. Fixes //rdar: //8541517.
llvm-svn: 116539
2010-10-14 23:31:39 +00:00
Dan Gohman
947c9af774
Experimental TBAA support.
...
This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.
llvm-svn: 116536
2010-10-14 23:06:10 +00:00
Devang Patel
0f58561907
Use root non-virtual primary base class, not just immediate primary base class, for AT_containing_type.
...
This is tested by virtfunc.exp in gdb testsuite.
llvm-svn: 116535
2010-10-14 22:59:23 +00:00
Dan Gohman
10169b94cf
Wire up the -fstrict-aliasing and -fno-strict-aliasing options
...
to CodeGenOption flags.
llvm-svn: 116530
2010-10-14 22:36:56 +00:00
John McCall
f477659040
template-ids are looked up differently in friend declarations.
...
llvm-svn: 116529
2010-10-14 22:22:28 +00:00
Douglas Gregor
57756eabc9
When performing typo correction, look through the set of known
...
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results.
This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.
There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.
llvm-svn: 116528
2010-10-14 22:11:03 +00:00
Douglas Gregor
c3bbf48f47
Make sure that we diagnose invalid qualifiers on friend functions.
...
llvm-svn: 116527
2010-10-14 22:03:51 +00:00
John McCall
25c9d1170b
At Fariborz's request, a somewhat cleaner bit-combining hack.
...
llvm-svn: 116524
2010-10-14 21:48:26 +00:00
Andrew Trick
6c8ce5c8b5
Reverting r116493: removes a test that failed on clang selfhost and msvc
...
llvm-svn: 116522
2010-10-14 21:41:16 +00:00
Argyrios Kyrtzidis
a665dc0770
Fix compiler error that clang didn't report (probably same problem as rdar://8552377).
...
It's more stress-free without access checking though..
llvm-svn: 116521
2010-10-14 21:35:29 +00:00
Fariborz Jahanian
a895c38928
Put line number on the diagnostic. //rdar: //8550657.
...
llvm-svn: 116519
2010-10-14 21:30:10 +00:00
Francois Pichet
41232a9872
r116509 fixed the Win32 XFAIL.
...
The failing was due to this:
1. preamble.c contains CR+LF new lines
2. write() is called with a buffer containing the original (CR+LF) to output the result on the console.
3. In text mode(the default), write() convert LF to CR+LF even if LF is preceded by CR, hence we have CR+CR+LF which filecheck interprets as 2 lines.
llvm-svn: 116513
2010-10-14 20:49:46 +00:00
Douglas Gregor
0afa7f66cd
Tweak the typo-correction implementation to determine corrections
...
solely based on the names it sees, rather than actual declarations it
gets. In essence, we determine the set of names that are "close
enough" to the typo'd name. Then, we perform name lookup for each of
those names, filtering out those that aren't actually visible, and
typo-correct from the remaining results.
Overall, there isn't much of a change in the behavior of typo
correction here. The only test-suite change comes from the fact that
we make good on our promise to require that the user type 3 characters
for each 1 character corrected.
The real intent behind this change is to set the stage for an
optimization to typo correction (so that we don't need to deserialize
all declarations in a translation unit) and future work in finding
missing qualification ("'vector' isn't in scope; did you mean
'std::vector'?). Plus, the code is cleaner this way.
llvm-svn: 116511
2010-10-14 20:34:08 +00:00
Argyrios Kyrtzidis
6843141d39
Store in PCH the key function of C++ class to avoid deserializing the complete declaration context in order to compute it.
...
Progress for rdar://7260160.
llvm-svn: 116508
2010-10-14 20:14:38 +00:00
Argyrios Kyrtzidis
0e88a565c0
Allow deserialization of just the fields of a record, when we want to iterate over them,
...
instead of deserializing the complete declaration context of the record.
Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.
llvm-svn: 116507
2010-10-14 20:14:34 +00:00
Argyrios Kyrtzidis
55d1fc2d3c
Give a default implementation for ASTDeserializationListener's methods, no functionality change.
...
llvm-svn: 116506
2010-10-14 20:14:28 +00:00
Argyrios Kyrtzidis
0427be938e
Introduce command line option -error-on-deserialized-decl that is accompanied by a name
...
and emits an error if a declaration with this name is deserialized from PCH.
This is for testing, to make sure that we don't deserialize stuff needlessly.
llvm-svn: 116505
2010-10-14 20:14:25 +00:00
Argyrios Kyrtzidis
470c454a61
Don't add the injected class name to the redeclarations chain; the chain should contain actual redeclarations, not implicits.
...
As a bonus, now we don't deserialize it unless we need it.
llvm-svn: 116504
2010-10-14 20:14:21 +00:00
Argyrios Kyrtzidis
a11aca4646
Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.
...
llvm-svn: 116503
2010-10-14 20:14:18 +00:00
David Chisnall
a9d40ee0ab
Test case for r116439
...
llvm-svn: 116493
2010-10-14 18:15:20 +00:00
Fariborz Jahanian
681c0754d9
Eliminate usage of ObjCSuperExpr used for
...
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788
llvm-svn: 116483
2010-10-14 16:04:05 +00:00
Anton Yartsev
73d4023114
support for AltiVec extensions from the Cell architecture
...
llvm-svn: 116478
2010-10-14 14:37:46 +00:00
Zhongxing Xu
23e082d32c
Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
...
llvm-svn: 116473
2010-10-14 05:22:59 +00:00
John McCall
7f570718d3
Compress bit fields / enums from ReferenceType, BuiltinType, FunctionType, and
...
ObjCObjectType into Type.
llvm-svn: 116472
2010-10-14 03:00:17 +00:00
John McCall
e1139e4a88
Whoops. This really shouldn't compile in clang, either.
...
llvm-svn: 116470
2010-10-14 02:06:32 +00:00
John McCall
c153891662
Perform range restrictions on regparm when applied to a type and
...
not a decl.
llvm-svn: 116469
2010-10-14 01:57:10 +00:00
John McCall
43b6168b3b
Teach Diagnostic to recursively expand inside %plural formats.
...
llvm-svn: 116468
2010-10-14 01:55:31 +00:00
Chris Lattner
26f6c227dc
allow I128 suffixes in msextensions mode just like i128 suffixes, patch
...
by Martin Vejnar!
llvm-svn: 116460
2010-10-14 00:24:10 +00:00
Chris Lattner
2edb926880
move logic for computing signed integer overflow when constant folding
...
into APInt.
llvm-svn: 116453
2010-10-13 23:46:56 +00:00
Douglas Gregor
5a2bb5ba98
Diagnose when a 'static' member function overrides a virtual function
...
in a base class. Fixes PR8168.
llvm-svn: 116448
2010-10-13 22:55:32 +00:00
Douglas Gregor
a007d36c1b
Generalize the checking for qualification of (non-friend) class
...
members. Provide a hard error when the qualification doesn't match the
current class type, or a warning + Fix-it if it does match the current
class type. Fixes PR8159.
llvm-svn: 116445
2010-10-13 22:19:53 +00:00
David Chisnall
1822d1f0a8
Don't claim that things that are Objective-C keywords if preceded by an @ are keywords unless they are preceded by an @.
...
For example, don't claim that end is a keyword in:
unsigned end;
llvm-svn: 116439
2010-10-13 21:44:48 +00:00
Douglas Gregor
392a84bdf6
Eliminate the use of ObjCSuperExpr in code completion.
...
llvm-svn: 116436
2010-10-13 21:24:53 +00:00
Douglas Gregor
d07ba34a44
There is no reason for dereferencing a pointer-to-member to require
...
that the class type into which the pointer points be complete, even
though the standard requires it. GCC/EDG do not require a complete
type here, so we're calling this a problem with the standard. Fixes
PR8328.
llvm-svn: 116429
2010-10-13 20:41:14 +00:00
Douglas Gregor
e01d2243d3
Update Type::BitsRemainingInType
...
llvm-svn: 116423
2010-10-13 20:07:36 +00:00
Douglas Gregor
f10c97f36e
_Bool is not a keyword in C++. Fixes PR7388 and PR8349.
...
llvm-svn: 116422
2010-10-13 20:00:38 +00:00
Douglas Gregor
dc13b04a98
Place conversion warnings for non-type template arguments under the
...
control of -Wconversion, and ignore them by default.
llvm-svn: 116415
2010-10-13 18:27:55 +00:00
Douglas Gregor
52051cb173
Introduce a bit into Type that keeps track of whether there are any
...
unnamed or local types within that type. This bit is cached along with
the linkage of a type, so that it can be recomputed (e.g., when we see
that a typedef has given a name to an anonymous declaration).
Use this bit when checking C++03 [temp.arg.type]p2, so that we don't
walk template argument types repeatedly.
llvm-svn: 116413
2010-10-13 18:05:20 +00:00
Douglas Gregor
b39215942e
Fix a silly bug in the suppression of non-error diagnostics in a
...
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.
llvm-svn: 116411
2010-10-13 17:22:14 +00:00
Douglas Gregor
518da18d70
Compute whether a type is variably modified as we build the type,
...
rather than walking the type's structure every time we request this
information. Performance optimization; no functionality change.
llvm-svn: 116409
2010-10-13 16:58:14 +00:00
Fariborz Jahanian
26d1e2b370
Eliminates a clang warning.
...
llvm-svn: 116408
2010-10-13 16:19:16 +00:00
Rafael Espindola
85111907bb
Call InitSections when assembling. This makes clang's output match that of
...
llvm-mc.
llvm-svn: 116405
2010-10-13 14:53:57 +00:00
John McCall
ccbc032146
Preserve the original scope when picking the right scope for a friend
...
declaration, because we'll need it later. Hopefully fixed self-host.
llvm-svn: 116399
2010-10-13 06:22:15 +00:00
John McCall
f7cfb2212c
Support friend function declarations in local classes correctly.
...
Fixes a crash and diagnoses the error condition of an unqualified
friend which doesn't resolve to something. I'm still not certain how
this is useful.
llvm-svn: 116393
2010-10-13 05:45:15 +00:00
Argyrios Kyrtzidis
8c64bbe032
Embrace C++ ABI 5.2.6 and consider that template instantiations don't have key functions (same as GCC).
...
llvm-svn: 116391
2010-10-13 02:39:41 +00:00
Douglas Gregor
7731d3fafc
Teach the warning about unnamed/local types in template arguments to
...
actually walk the template argument type to find any unnamed/local
types within it. Fixes PR6784.
llvm-svn: 116382
2010-10-13 00:27:52 +00:00
Douglas Gregor
5bb5e4ad9d
Introduce support for emitting diagnostics (warnings + their notes)
...
that are suppressed during template argument deduction. This change
queues diagnostics computed during template argument deduction. Then,
if the resulting function template specialization or partial
specialization is chosen by overload resolution or partial ordering
(respectively), we will emit the queued diagnostics at that point.
This addresses most of PR6784. However, the check for unnamed/local
template arguments (which existed before this change) is still only
skin-deep, and needs to be extended to look deeper into types. It must
be improved to finish PR6784.
llvm-svn: 116373
2010-10-12 23:32:35 +00:00
Devang Patel
67f70aaf5a
Fix debug info for anon union.
...
This is tested by anon-union.exp.
llvm-svn: 116372
2010-10-12 23:24:54 +00:00
Devang Patel
e25b5f86d0
Fix anon union member assignment expression's location.
...
This is tested by anon-union.exp in gdb testsuite.
llvm-svn: 116371
2010-10-12 23:23:25 +00:00
John McCall
de3fd2264c
Handle dependent friends more explicitly and deal with the possibility
...
of templated-scope friends by marking them invalid and white-listing all
accesses until such time as we implement them. Fixes a crash, this time
without a broken test case.
llvm-svn: 116364
2010-10-12 23:13:28 +00:00
Eli Friedman
36ebbec121
PR8325: don't do destructor checking when a pointer is thrown.
...
llvm-svn: 116336
2010-10-12 20:32:36 +00:00
John McCall
036855a0ed
Enter the context of the declared function template when performing
...
deduction and the final substitution, but not while substituting the
explicit template arguments. Fixes rdar://problem/8537391
llvm-svn: 116332
2010-10-12 19:40:14 +00:00
Douglas Gregor
6e9cf630f8
When finalizing a function template specialization following template
...
argument deduction, make sure to check the correctness of deduced template
type arguments (which we had previously skipped) along with other
kinds of template arguments. This fixes part of PR6784, but we're
still swallowing the extension warning about unnamed/local template
arguments.
llvm-svn: 116327
2010-10-12 18:51:08 +00:00
Douglas Gregor
758cb67fcf
If we end up instantiating a function parameter whose default argument
...
has not yet been parsed, note that the default argument hasn't been
parsed and keep track of all of the instantiations of that function
parameter. When its default argument does get parsed, imbue the
instantiations with that default argument. Fixes PR8245.
llvm-svn: 116324
2010-10-12 18:23:32 +00:00
Chris Lattner
17c0eac879
fix PR7885, rejecting invalid uses of __builtin_constant_p.
...
llvm-svn: 116317
2010-10-12 17:47:42 +00:00
Nick Lewycky
8d3a1783ba
Replace \r\n with \n in this file.
...
llvm-svn: 116312
2010-10-12 16:46:35 +00:00
Douglas Gregor
efc469587a
Parse default arguments within member functions in source order, from
...
Manuel Klimek! Fixes PR7715.
llvm-svn: 116311
2010-10-12 16:25:54 +00:00
Duncan Sands
38b918c0cf
Pacify gcc-4.4.
...
llvm-svn: 116300
2010-10-12 14:07:59 +00:00
John McCall
73d3618223
C's comma operator performs lvalue conversion on both its operands;
...
require them to have complete types.
llvm-svn: 116297
2010-10-12 07:14:40 +00:00
John McCall
5627fd71c8
Flesh out test.
...
llvm-svn: 116292
2010-10-12 03:38:33 +00:00
John McCall
01cbf2de0f
I just do what the comments tell me to do.
...
llvm-svn: 116289
2010-10-12 02:19:57 +00:00
Chris Lattner
18d853794f
fix the definition of __builtin_constant_p, the first arg isn't a short.
...
Patch by the "pax team"
llvm-svn: 116288
2010-10-12 02:16:39 +00:00
John McCall
36226621f6
Progress.
...
llvm-svn: 116287
2010-10-12 02:09:17 +00:00
Francois Pichet
85e6da1f19
This patch remove the Win32 XFAIL from remap-complete.c
...
The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode.
llvm-svn: 116286
2010-10-12 01:01:43 +00:00
Douglas Gregor
7bb8af613c
When we load an ASTUnit from command-line arguments, hold on to the
...
diagnostics produced by the driver itself. Previously, we were
allowing these to either be dropped or to slip through to stderr.
Fixes <rdar://problem/7595339>.
llvm-svn: 116285
2010-10-12 00:50:20 +00:00
Cameron Esfahani
f6c73c463f
Fix spelling error.
...
llvm-svn: 116283
2010-10-12 00:21:25 +00:00
John McCall
36e7fe31d4
Add some infrastructure for dealing with expressions of 'placeholder' type,
...
i.e. expressions with an internally-convenient type which should not be
appearing in generally valid, complete ASTs.
llvm-svn: 116281
2010-10-12 00:20:44 +00:00
Fariborz Jahanian
77890879dd
Fixes a typo which caused byte offset in debug info
...
for ivars to be 0. Fixes pr8353.
llvm-svn: 116273
2010-10-11 23:55:47 +00:00
Daniel Dunbar
48ed37d98e
Basic: Tweak attempt to make version tags work from 'svn export's again, clip
...
off the extra parts of the $URL$ SVN keyword.
llvm-svn: 116269
2010-10-11 23:50:34 +00:00
Daniel Dunbar
d097d913b6
Basic: Attempt to make version tags work from 'svn export's again.
...
llvm-svn: 116268
2010-10-11 23:44:19 +00:00
Daniel Dunbar
89329cb8f7
Driver/Darwin: Remove a useless warning about missing runtime libraries. These
...
are almost never needed, so the warning isn't very useful.
llvm-svn: 116263
2010-10-11 23:31:07 +00:00
Douglas Gregor
21d0e5a06c
This test should now work on windows, since we're no longer using temporary files badly
...
llvm-svn: 116261
2010-10-11 23:18:55 +00:00
Douglas Gregor
bd82998e35
Eliminate CIndexer::getClangPath(), since libclang no longer depends
...
on the presence of a 'clang' executable. Simplify
CIndexer::getClangResourcesPath() a bit.
Patch up the CMake makefiles to install headers into two locations in
the build tree, for those silly cases where 'clang' will end up
looking into the wrong build directory for headers.
llvm-svn: 116260
2010-10-11 23:17:59 +00:00
Fariborz Jahanian
d06ab4f09e
Test for //rdar: //8493239
...
llvm-svn: 116258
2010-10-11 23:15:47 +00:00
Fariborz Jahanian
fef5d16f45
Some refactoring of property rewriting stuff
...
in rewriter. No functionality change.
llvm-svn: 116254
2010-10-11 22:21:03 +00:00
Douglas Gregor
b9ab0ed33e
Eliminate the (de-)serialization of code completion results, now that
...
libclang does not support out-of-process code completion.
llvm-svn: 116253
2010-10-11 22:12:15 +00:00
Douglas Gregor
4e0f15a4a2
Eliminate -fdiagnostics-binary and all of the infrastructure for
...
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.
llvm-svn: 116250
2010-10-11 22:02:06 +00:00
Devang Patel
33ddf69fb3
Fix debug info for functions whose context is a namespace.
...
This is tested by namespace.exp in gdb testsuite.
llvm-svn: 116248
2010-10-11 21:58:41 +00:00
Douglas Gregor
6a95802893
Eliminate clang_codeComplete(). libclang clients should be using the
...
faster, in-process, more-configurable clang_codeCompleteAt().
llvm-svn: 116245
2010-10-11 21:51:20 +00:00
Douglas Gregor
36e3b5c79e
Switch c-index-test from clang_codeComplete() over to
...
clang_codeCompleteAt(). This uncovered a few issues with the latter:
- ASTUnit wasn't saving/restoring diagnostic state appropriately between
reparses and code completions.
- "Overload" completions weren't being passed through to the client
llvm-svn: 116241
2010-10-11 21:37:58 +00:00
Fariborz Jahanian
f3f903a9f0
This patch does a few things in the area of objective-c
...
properties.
1. Generates the AST for lexical info. of accessing
getter/setter methods using dot-syntax notation.
This fixes //rdar: //8528170.
2. Modifes rewriter to handle the AST putout in 1.
3. Supportes in rewriter ObjCImplicitSetterGetter ASTs.
llvm-svn: 116237
2010-10-11 21:29:12 +00:00
Daniel Dunbar
7cba5a76dd
IRgen/Obj-C: Fix encoding of "long double".
...
- The mind boggles.
llvm-svn: 116226
2010-10-11 21:13:48 +00:00
Daniel Dunbar
a441d81b6b
Merge encode-test-1.m into encode-test.m
...
llvm-svn: 116225
2010-10-11 21:13:46 +00:00
Daniel Dunbar
32708f952b
FileCheck'ize test.
...
llvm-svn: 116224
2010-10-11 21:13:44 +00:00
Douglas Gregor
7845f1e80e
Eliminate clang_setUseExternalASTGeneration() from libclang. Between
...
improvements to the compiler and the introduction of crash recovery,
it no longer makes sense to allow this mode. Moreover, this eliminates
one use of the "clang" executable from within libclang; we'd like them
all to go away.
llvm-svn: 116207
2010-10-11 16:52:23 +00:00
Francois Pichet
c2bc5ac149
Add parsing support for Microsoft attributes. MS attributes will just be skipped and not inserted into the AST for now.
...
llvm-svn: 116203
2010-10-11 12:59:39 +00:00
Francois Pichet
d61f192b1a
Add 2 Microsoft compiler intrinsics that don't require prototypes:
...
__assume
__noop
llvm-svn: 116202
2010-10-11 12:00:10 +00:00
Axel Naumann
b151c3c2d6
Declare argv parameters as const char* const* instead of to char** to clarify that they are not modified, and to allow for string literals as arguments.
...
llvm-svn: 116200
2010-10-11 09:18:43 +00:00
Axel Naumann
89c31490d8
Tighten up constness of argv parameters to allow for string literals as argumants and to reflect actual (non-modifying) use.
...
llvm-svn: 116199
2010-10-11 09:13:46 +00:00
Chris Lattner
a09e8efd1f
Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
...
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.
llvm-svn: 116191
2010-10-11 05:44:49 +00:00
Chris Lattner
29e78ac923
comment out unused function
...
llvm-svn: 116189
2010-10-11 05:38:10 +00:00
Chris Lattner
a45ebd2fd1
be less threatening.
...
llvm-svn: 116187
2010-10-11 05:20:49 +00:00
Argyrios Kyrtzidis
0c34b138df
Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body.
...
llvm-svn: 116186
2010-10-11 03:25:57 +00:00
Argyrios Kyrtzidis
f0e31c8b9c
Don't let typeinfo name symbols be 'internal hidden', it can lead to linker conflicts
...
with similarly named classes in anonymous namespaces.
llvm-svn: 116185
2010-10-11 03:25:53 +00:00
NAKAMURA Takumi
11f6be1ce8
lib/CodeGen/CodeGenModule.cpp: DLLImportLinkage should be processed also on declaration.
...
It enables clang to compile Mingw's headers.
llvm-svn: 116184
2010-10-11 02:30:56 +00:00
NAKAMURA Takumi
89acd1e7ef
lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.
...
llvm-svn: 116183
2010-10-11 02:28:42 +00:00
NAKAMURA Takumi
e4faafba32
lib/Frontend/InitHeaderSearch.cpp: Fix compatibility to Cygming.
...
- lib/gcc/include should not be included. Clang oughta have alternatives. (PR7956)
- Cygwin: /usr/include/w32api should be included. gcc/cygwin does.
- gcc/cygwin uses gcc paths as /usr/lib not /lib. They are same on Cygwin environment, though, We have to take what gcc/cygwin does.
- Cygwin-1.7: Use 4.3.4.
- Cygwin-1.5: Use 4.3.2 for gcc-4.
llvm-svn: 116182
2010-10-11 02:27:37 +00:00
Chris Lattner
88fdea8ad9
fix PR8217, a silent miscompilation of invalid code.
...
llvm-svn: 116166
2010-10-10 18:16:20 +00:00
Chris Lattner
001b29ccc1
Allow a string literal to initialize a tail array (PR8217), patch
...
by Pierre Habouzit!
llvm-svn: 116165
2010-10-10 17:49:49 +00:00
Francois Pichet
52bea03e7a
Unbreak the CMake build.
...
llvm-svn: 116164
2010-10-10 09:17:09 +00:00
Zhongxing Xu
271c9c7b6d
Add experimental chroot check which checks improper use of chroot(). Patch by
...
Lei Zhang.
llvm-svn: 116163
2010-10-10 05:45:30 +00:00
Argyrios Kyrtzidis
073c9cb592
Implement __builtin_ia32_vec_ext_v2si function (required by Qt).
...
llvm-svn: 116162
2010-10-10 03:19:11 +00:00
NAKAMURA Takumi
6bdc8a2d8a
lib/Driver/Tools.cpp: Disable cxa_atexit by default also on Cygwin.
...
llvm-svn: 116161
2010-10-10 01:53:03 +00:00
Benjamin Kramer
bfac7dcda0
Don't rely on a StringRef being null-terminated (it's not) for deprecation messages.
...
Store pointer and length of the message in DelayedDiagnostic and hide the gory union details.
llvm-svn: 116153
2010-10-09 15:49:00 +00:00
Bill Wendling
65b2a965fb
Add target implementations for the X86 builtins:
...
__builtin_ia32_vec_init_v8qi
__builtin_ia32_vec_init_v4hi
__builtin_ia32_vec_init_v2si
They are lowered to bitcasts. (These are all ready tested by the gcc testsuite.)
<rdar://problem/8529957>
llvm-svn: 116147
2010-10-09 08:47:25 +00:00
Abramo Bagnara
718dbd7a4f
Fixed __builtin_constant_p return type.
...
llvm-svn: 116145
2010-10-09 04:51:06 +00:00
Argyrios Kyrtzidis
52da8da03b
Fix g++.dg regressions introduced at r115347 (rdar://8529993)
...
llvm-svn: 116144
2010-10-09 04:39:54 +00:00
John McCall
c8fd6a48cf
Secure this test against slightly different number formatters.
...
llvm-svn: 116141
2010-10-09 02:28:39 +00:00
John McCall
a2fabff4f6
Permit constant evaluation of const floating-point variables with
...
constant initializers.
llvm-svn: 116138
2010-10-09 01:34:31 +00:00
Nico Weber
a6bde81bc8
Add support for UCNs for character literals
...
llvm-svn: 116129
2010-10-09 00:27:47 +00:00
Douglas Gregor
0bf3140424
Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
...
bit by me).
llvm-svn: 116122
2010-10-08 23:50:27 +00:00
Fariborz Jahanian
5eee9f7d30
Rename test name.
...
llvm-svn: 116120
2010-10-08 23:17:27 +00:00
Fariborz Jahanian
73853e5bab
Method implemented in class's implementation may implement
...
one declared in class's extension and not one declared
in class's superclass. This supresses a bogus warning on
method type mismatch.
Fixes //rdar: // 8530080
llvm-svn: 116118
2010-10-08 22:59:25 +00:00
Fariborz Jahanian
163488ffbf
When dealing with an assignment with LHS being a property reference
...
expression, the entire assignment tree is rewritten into a property
setter messaging. This includes rewriting the RHS.
Do not attempt to rewrite RHS again. Never rewrite a rewritten text!
Fixes //rdar: //8527018.
llvm-svn: 116104
2010-10-08 21:12:22 +00:00
Douglas Gregor
be4092138f
Improve XML output for class/struct/union declarations, from Martin Vejnar!
...
llvm-svn: 116103
2010-10-08 21:05:46 +00:00
Douglas Gregor
63b0a1e9fb
Fix a typo in the Clang man page, from Alexander Best.
...
llvm-svn: 116102
2010-10-08 21:03:07 +00:00
Douglas Gregor
7a2b425ee1
Revert the hack Chris Lattner added in r97981 to work around
...
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.
llvm-svn: 116101
2010-10-08 20:56:19 +00:00
Douglas Gregor
559c9fb134
This patch fixes multiple issues in clang's designated init builder and
...
completes support for C1X anonymous struct/union init features:
* Indexed anonymous member initializers should not be expanded. Doing so makes
little sense and would cause unresolvable semantic ambiguity in valid code
(regression introduced by r69153).
* Subobject initialization of (possibly nested) anonymous members are now
referred to with paths relative to the naming record context, eliminating the
synthesis of incorrect implicit InitListExprs that caused CodeGen to assert.
* Field lookup was missing a null check in IdentifierInfo comparison which
caused lookup for a known (already resolved) field to match the first unnamed
data member it encountered leading to silent miscompilation.
* Subobject paths are no longer built using the general purpose
Sema::BuildAnonymousStructUnionMemberPath(). If any corner cases crop up, we
will now assert earlier in Sema instead of passing invalid InitListExprs
through to CodeGen.
Fixes PR6955, from Alp Toker!
llvm-svn: 116098
2010-10-08 20:44:28 +00:00
Douglas Gregor
8ed5b77008
Fix the mapping of vertical-space cursor kinds to produce a newline,
...
rather than a space.
llvm-svn: 116097
2010-10-08 20:39:29 +00:00
Eric Christopher
366c146e79
Try to disable this again.
...
llvm-svn: 116094
2010-10-08 19:36:36 +00:00
Daniel Dunbar
a5af410dc5
libclang: Disable LLVM pretty stack trace functionality, which inadvertently
...
sets up signal handlers it shouldn't when we are being used a shared library.
llvm-svn: 116084
2010-10-08 19:30:33 +00:00
Eric Christopher
2f38b940e3
Disable this test temporarily in an attempt to green the buildbots.
...
llvm-svn: 116082
2010-10-08 19:18:57 +00:00
Devang Patel
3db5480b27
Tighter check in r116060 blcoked enums also. Emit enum const's debug info.
...
llvm-svn: 116071
2010-10-08 18:24:19 +00:00
John McCall
942687084f
__attribute__((aligned(n))) directly specifies the alignment of a declaration
...
unless it's a non-packed field, in which case it can only increase the
alignment. [[align]] effectively works the same way for well-formed code
(because it's ill-formed for [[align]] to decrease alignment ever).
Fixes rdar://problem/8335865
llvm-svn: 116070
2010-10-08 18:24:19 +00:00
Devang Patel
5e8ee2bb89
Do not repeat debug info for file variable constants.
...
This is tested by file-statics.exp in gdb testsuite.
llvm-svn: 116060
2010-10-08 17:02:40 +00:00
Douglas Gregor
bb6a881862
Fix three related, wily issues with the recompilation of precompiled
...
preambles:
- When we rebuild a precompiled preamble, make sure to disable
skipping anything in the main file; we may have had leftover
preamble-skipping values in the lexer, which leads to very empty
preamble. This is a correctness issue.
- When we rebuild a precompiled preamble, clear out any prior state
in the Diagnostic object. Otherwise, we might think that there
were errors when we were building the preamble itself, and
therefore reject the resulting preamble. This is mainly a
performance issue.
- Don't remove old remappings when digging out the remapping for the
main file. Having the old mappings around does not hurt in the
common case (later remappings will just overwrite them), and is
important when we fail to find a preamble: we don't want to have
removed the remapping, because we'll need it later.
llvm-svn: 116041
2010-10-08 04:03:57 +00:00
Argyrios Kyrtzidis
b5c7c51392
When we encounter a '==' in a context expecting a '=', assume the user made a typo:
...
t.c:1:7: error: invalid '==' at end of declaration; did you mean '='?
int x == 0;
^~
=
Implements rdar://8488464.
llvm-svn: 116035
2010-10-08 02:39:23 +00:00
John McCall
acf0ee57b6
Track the location of the context requiring an implicit conversion and use it
...
to white-list conversions required by system headers. rdar://problem/8232669
llvm-svn: 116029
2010-10-08 02:01:28 +00:00
Argyrios Kyrtzidis
74825bcfb9
Implement -fshort-enums (rdar://8490496).
...
llvm-svn: 116020
2010-10-08 00:25:19 +00:00
Devang Patel
251f859b23
Identify functions with prototype appropriately in debug info.
...
This is tested by callfuncs.exp in gdb testsuite.
llvm-svn: 115989
2010-10-07 22:03:49 +00:00
Argyrios Kyrtzidis
15a9edc7cf
Fix an infinite loop, caused by unintended syntax bug (the 'break;' after 'default:' was intended to break out of the while loop).
...
Fixes rdar://8518859&8520617.
llvm-svn: 115985
2010-10-07 21:52:18 +00:00
Fariborz Jahanian
e0587be735
Fix a crash encoding ivars of vector types and
...
to match gcc's encoding. Fixes //rdar: // 8519948.
llvm-svn: 115980
2010-10-07 21:25:25 +00:00
Abramo Bagnara
5d3e724fc5
Fixed cast to union with anonymous bitfields.
...
llvm-svn: 115979
2010-10-07 21:20:44 +00:00
Douglas Gregor
a881010621
Bugs should go to Bugzilla, not the mailing list
...
llvm-svn: 115972
2010-10-07 20:20:57 +00:00
Daniel Dunbar
29b8fb1771
tests: Force a triple to avoid wchar_t differences.
...
llvm-svn: 115970
2010-10-07 20:16:00 +00:00
Daniel Dunbar
355e850c6c
tests: Tweak test to also match MSVC format.
...
llvm-svn: 115969
2010-10-07 20:14:30 +00:00
Fariborz Jahanian
4fc98f664b
Start and end location of a property-dot syntax expression
...
must match start and end location of the expression
as expected by the rewriter client. Fixes // rdar: // 8520727
llvm-svn: 115934
2010-10-07 18:12:21 +00:00
Douglas Gregor
c0f5dfc9d5
Don't force spell checking when code-completing. Let the client decide
...
llvm-svn: 115931
2010-10-07 18:03:24 +00:00
Daniel Dunbar
6036264fb4
Driver: When clang is built with a VENDOR set, include the base LLVM version in
...
the version information, to help prevent user confusion about vendor version
numbers vs. LLVM version numbers.
llvm-svn: 115915
2010-10-07 15:00:30 +00:00
Daniel Dunbar
7bb159b33c
www: Grammar, etc.
...
llvm-svn: 115914
2010-10-07 15:00:19 +00:00
Chris Lattner
586c51e0b7
clang++ sorta works now
...
llvm-svn: 115903
2010-10-07 04:28:56 +00:00
Fariborz Jahanian
c74073cd20
Patch for adding message to unavailable attribute.
...
And its documentation.
Finishes off // rdar: // 6734520.
llvm-svn: 115862
2010-10-06 23:12:32 +00:00
Tom Care
ea53e82c78
UnreachableCodeChecker cleanup and improvements
...
- Fixed some iterator style issues
- Don't process blocks that have been visited already
- Fixed a case where a unreachable block cycle was not reported
- Minor test case changes
- Added one test case from flow-sensitive version of the check. More coming.
llvm-svn: 115861
2010-10-06 23:02:25 +00:00
Fariborz Jahanian
776653a70a
Simplified code for deprecated attribute wih message a little.
...
llvm-svn: 115856
2010-10-06 22:20:08 +00:00
Fariborz Jahanian
55106310ae
Add message to attribute(deprecated).
...
attribute(unavailable) to do next.
// rdar:// 6734520.
llvm-svn: 115842
2010-10-06 21:18:44 +00:00
Douglas Gregor
a3d3ba1cac
Fix a double-free error that can occur in rare cases where loading
...
of the precompiled preamble (or any PCH file it depends on) fails
during reparsing.
llvm-svn: 115838
2010-10-06 21:11:08 +00:00
Devang Patel
284fa417ec
Mark FunctionNoProtoType's argument as unspecified parameters.
...
llvm-svn: 115834
2010-10-06 20:51:45 +00:00
John McCall
569eafce63
Re-enable EH cleanups to destroy __block variables, now that we have a moment to
...
deal with the consequences. Fixes rdar://problem/8224178.
llvm-svn: 115816
2010-10-06 18:56:43 +00:00
Nick Lewycky
3005242401
Silence unused variable warning in Release builds.
...
llvm-svn: 115806
2010-10-06 18:37:39 +00:00
Devang Patel
c0601d1e99
Do not emit subrange for incomplete array type.
...
This is tested by ptype.exp in gdb testsuite.
llvm-svn: 115805
2010-10-06 18:30:00 +00:00
Fariborz Jahanian
4801cc6315
Issue deprecated warning when typeof uses typedef
...
based on underlying type's deprecatedness.
llvm-svn: 115800
2010-10-06 17:00:02 +00:00
Douglas Gregor
3999e15d93
Reject the allocation of variably-modified types in C++ 'new'
...
expressions. Fixes PR8209 in the narrowest way possible. I'm still
considering whether I want to implement the extension that permits the
use of VLA types in a 'new' expression.
llvm-svn: 115790
2010-10-06 16:00:31 +00:00
Devang Patel
5b389f495b
Remove unused argument.
...
llvm-svn: 115789
2010-10-06 15:58:57 +00:00
Francois Pichet
f804a97d4f
_inline is an alias for inline in MSVC.
...
llvm-svn: 115785
2010-10-06 13:02:48 +00:00
Chandler Carruth
a64aedb34b
Remove hard CRLF end-of-line markers from two files. These should be added
...
automatically when syncing due to the auto-props selecting svn:eol-style of
'native'.
llvm-svn: 115758
2010-10-06 06:50:05 +00:00
Nico Weber
9762e0a234
Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.
...
llvm-svn: 115743
2010-10-06 04:57:26 +00:00
Bill Wendling
964f521e85
Erm...this isn't the same as PR6658.
...
llvm-svn: 115737
2010-10-06 03:33:37 +00:00
Bill Wendling
6153d2c7bd
MMX conversion work is done. We can remove the FIXMEs.
...
llvm-svn: 115736
2010-10-06 03:31:26 +00:00
Bill Wendling
8700d39139
Add same hack to mmx-builtins.c as in Headers/c89.c to get it to pass on Win32. PR6658.
...
llvm-svn: 115735
2010-10-06 03:31:09 +00:00
Anders Carlsson
0f7e94fd7b
When checking for uninitialized fields in member initializers, special case static variables and enums. Fixes PR8075.
...
llvm-svn: 115732
2010-10-06 02:43:25 +00:00
John McCall
2a981c2056
Teach the driver to pass -fexceptions in Objective-C inputs on ARM.
...
I don't know when this stopped happening, but this seems to be the
right place to do it.
llvm-svn: 115730
2010-10-06 01:40:51 +00:00
John McCall
2551c1bbcd
Provide a slightly specialized diagnostic for tautological comparisons
...
of an enum value.
llvm-svn: 115725
2010-10-06 00:25:24 +00:00
John McCall
f449926a01
Use a more conventional/efficient implementation for isEnumeralType()
...
and isBuiltinType().
llvm-svn: 115724
2010-10-06 00:23:35 +00:00
Fariborz Jahanian
b292e32fd2
Ue TagType, added a FIXME. Per John's comment.
...
llvm-svn: 115723
2010-10-06 00:23:25 +00:00
Fariborz Jahanian
121f5148fd
Issue deprecated warning when typeof uses an
...
expression of deprecated type.
llvm-svn: 115713
2010-10-05 23:24:00 +00:00
John McCall
09d1369964
When instantiating a new-expression, force a rebuild if there were default
...
arguments in either the placement or constructor arguments. This is
important if the default arguments refer to a declaration or create a
temporary.
llvm-svn: 115700
2010-10-05 22:36:42 +00:00
Fariborz Jahanian
c080a333ce
Method declaration and its implementation must match in all their types.
...
Previously, compiler warned only if it was unsafe if types
did not match. Fixes // rdar: //7933061
llvm-svn: 115683
2010-10-05 21:02:11 +00:00
John McCall
46b4dc32df
...without leaving a temporary file behind.
...
llvm-svn: 115671
2010-10-05 20:53:58 +00:00
John McCall
0ec01b0ca4
Er, this test should actually run IR generation.
...
llvm-svn: 115670
2010-10-05 20:53:00 +00:00
John McCall
e5dd32da11
Teach PopCleanupBlock to correctly handle the possibility of branching through
...
a EH-only cleanup as part of a fallthrough branch-through. That this happens
for this test case is actually a separate bug.
llvm-svn: 115668
2010-10-05 20:48:15 +00:00
Douglas Gregor
44e5c1f16c
Serialize the "inline" bit for namespaces. Fixes <rdar://problem/8515069>.
...
llvm-svn: 115667
2010-10-05 20:41:58 +00:00
Douglas Gregor
9b3932c0bc
Fix a marvelous chained AST writing bug, where we end up with the
...
following amusing sequence:
- AST writing schedules writing a type X* that it had never seen
before
- AST writing starts writing another declaration, ends up
deserializing X* from a prior AST file. Now we have two type IDs for
the same type!
- AST writer tries to write X*. It only has the lower-numbered ID
from the the prior AST file, so references to the higher-numbered ID
that was scheduled for writing go off into lalaland.
To fix this, keep the higher-numbered ID so we end up writing the type
twice. Since this issue occurs so rarely, and type records are
generally rather small, I deemed this better than the alternative: to
keep a separate mapping from the higher-numbered IDs to the
lower-numbered IDs, which we would end up having to check whenever we
want to deserialize any type.
Fixes <rdar://problem/8511624>, I think.
llvm-svn: 115647
2010-10-05 18:37:06 +00:00
Fariborz Jahanian
fc8315f56a
Fix a block rewriter bug where copy/dispose entries in
...
block descriptor for outer block was missing even though
the block was importing objects into its inner blocks.
//rdar://84995992
llvm-svn: 115644
2010-10-05 18:05:06 +00:00
Zhanyong Wan
ea6d7f332d
Fix handling of the 'Invalid' argument in SourceManager's methods (patch by Dean Sturtevant, reviewed by chandlerc and Sebastian Redl).
...
llvm-svn: 115638
2010-10-05 17:56:33 +00:00
Sebastian Redl
009e7f203f
Give every file that ASTReader loads a type: module, PCH, precompiled preamble or main file. Base Decls' PCHLevel on this to make it more sane.
...
llvm-svn: 115626
2010-10-05 16:15:19 +00:00
Sebastian Redl
2c373b9876
Thread PerFileData through the ASTReader again, this time with the LLVM changes.
...
llvm-svn: 115625
2010-10-05 15:59:54 +00:00
Douglas Gregor
2c2c4cd9fd
Register the __builtin_va_list_type node when we parse it, rather than
...
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.
llvm-svn: 115621
2010-10-05 15:41:24 +00:00
Douglas Gregor
aca68323f3
Remove a rogue typo
...
llvm-svn: 115618
2010-10-05 14:58:05 +00:00
Douglas Gregor
93269380e7
Register the __builtin_va_list_type node when we parse it, rather than
...
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.
llvm-svn: 115617
2010-10-05 14:55:45 +00:00
Zhongxing Xu
614e17dddf
* Simplify code
...
* Fix dump() to make it consistent with the test case.
llvm-svn: 115609
2010-10-05 08:38:06 +00:00
Marcin Swiderski
20b88739ed
Added support for base and member destructors in destructor.
...
llvm-svn: 115592
2010-10-05 05:37:00 +00:00
Argyrios Kyrtzidis
a992bbc08a
Add test case for r115588.
...
llvm-svn: 115590
2010-10-05 03:15:43 +00:00
Argyrios Kyrtzidis
dfbdfbba8f
In Sema's TryRefInitWithConversionFunction, suppress user conversions for the overload candidates.
...
Fixes an infinite recursion in overload resolution for rdar://8499524.
Many thanks to Doug!
llvm-svn: 115588
2010-10-05 03:05:30 +00:00
John McCall
0077b22aa4
If we're resolving all outstanding fixups, and there are multiple fixups
...
for the same destination, then we must potentially rewrite the initial branch
of every fixup. Without this patch, a short-circuit check meant to prevent
a switch case from being redundantly added was preventing later fixups from
being processed. Fixes PR8175 (again).
llvm-svn: 115586
2010-10-05 02:33:56 +00:00
John McCall
9916e3fa93
In the fragile ObjC ABI, save the caught exception to the side if there are
...
both @catches and a @finally, because the second call to @objc_exception_try_enter
will clobber the exception slot. Fixes rdar://problem/8440970.
llvm-svn: 115575
2010-10-04 23:42:51 +00:00
Devang Patel
3703ff4163
dyn_cast is more appropriate here.
...
llvm-svn: 115569
2010-10-04 22:28:23 +00:00
Devang Patel
95eea45aa5
Add missing '}' :)
...
llvm-svn: 115568
2010-10-04 22:13:18 +00:00
Devang Patel
44b8bf0f5b
Emit debug info for an aggregate while processing MemberExpr if the aggregate's debug info was delayed untill now.
...
llvm-svn: 115564
2010-10-04 21:46:04 +00:00
Devang Patel
cbc7bc94c9
Fix filename in header comment.
...
llvm-svn: 115561
2010-10-04 21:15:33 +00:00
Douglas Gregor
dc72caa6de
When a type comes from a previously-loaded PCH/AST file, don't try to write it into a chained PCH file.
...
llvm-svn: 115527
2010-10-04 18:21:45 +00:00
Daniel Dunbar
25a3ada060
www: Add a "Clang Related Projects" page, to collect links to external projects
...
using Clang in one way or another. Additions welcome!
llvm-svn: 115508
2010-10-04 15:40:45 +00:00
Marcin Swiderski
87b1bb6fd2
Added support for C++ initializers in CFG.
...
llvm-svn: 115493
2010-10-04 03:38:22 +00:00
Chris Lattner
b9d4dfc86a
Change to match 115473.
...
llvm-svn: 115474
2010-10-03 19:09:22 +00:00
Bill Wendling
a76cdeb783
Do x86_64.
...
llvm-svn: 115460
2010-10-03 08:34:05 +00:00
Bill Wendling
4a58223401
Test to verify that all of the MMX builtins are handled by the front-end.
...
llvm-svn: 115459
2010-10-03 03:39:54 +00:00
Douglas Gregor
af25cfaae0
When providing a block literal as a code completion for a
...
function/method argument, include the parameter name and always
include parentheses (even for zero-parameter blocks). Otherwise, the
block literal placeholder '^' can look very weird.
llvm-svn: 115444
2010-10-02 23:49:58 +00:00
Douglas Gregor
97c7571ef3
Introduce a new libclang function, clang_getCursorDisplayName(), which
...
produces a simple "display" name that captures the
arguments/parameters for a function, function template, class
template, or class template specialization.
llvm-svn: 115428
2010-10-02 22:49:11 +00:00
Douglas Gregor
4e3918c06b
Teach clang_getCursorType() about base specifiers and other references
...
to types.
Also, teach clang_getTypeDeclaration() about template specializations,
injected-class-names, and elaborated types.
Fixes <rdar://problem/8506460>.
llvm-svn: 115425
2010-10-02 21:57:58 +00:00
Chris Lattner
07704f1d7e
the mmx intrinsic for pshufw should map to the IR intrinsic, not
...
to a shufflevector. Otherwise it doesn't turn into a pshufw.
This bug was introduced in the mmx rewrite.
llvm-svn: 115423
2010-10-02 21:32:59 +00:00
Douglas Gregor
3022037787
When we insert a category (or class extension) into an interface, mark
...
the interface as having changed since it was originally
serialized. This ensures that we see class extensions/categories in
chained PCH files.
llvm-svn: 115421
2010-10-02 21:06:43 +00:00
Douglas Gregor
db9fb5a427
Don't add -fno-spell-checking in libclang if a spell-checking-related argument is already in the command-line arguments
...
llvm-svn: 115420
2010-10-02 20:06:51 +00:00
Douglas Gregor
3478c75b71
Provide proper source location and range information for C++ base
...
specifier cursors in libclang. FIXME -=2, fixes the rest of
<rdar://problem/8274883>.
llvm-svn: 115419
2010-10-02 19:51:13 +00:00
Douglas Gregor
9109629e55
Implement chained PCH support for the macro definitions stored within
...
the "detailed" preprocessing record.
llvm-svn: 115417
2010-10-02 19:29:26 +00:00
Anders Carlsson
fe15a78ff2
Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.
...
llvm-svn: 115411
2010-10-02 17:45:21 +00:00
Anders Carlsson
0e523cba82
Rename a test in preparation for fixing PR8169.
...
llvm-svn: 115410
2010-10-02 17:08:38 +00:00
Chris Lattner
64d7f2a014
when expanding a builtin, if the argument is required to be a constant,
...
force it to be a constant instead of emitting with EmitScalarExpr. In
-ftrapv mode, they are not the same.
This fixes rdar://8478728 + PR8221
llvm-svn: 115388
2010-10-02 00:09:12 +00:00
Douglas Gregor
0eaa2bfe79
Don't add an imported function into its lexical context until *after*
...
we've set all of its parameters. Fixes <rdar://problem/8499598>;
thanks to Sean for the diagnosis.
llvm-svn: 115387
2010-10-01 23:55:07 +00:00
Chris Lattner
07e96866a2
tidy
...
llvm-svn: 115383
2010-10-01 23:43:16 +00:00
Chris Lattner
407e7e3ace
kill off CheckX86BuiltinFunctionCall
...
llvm-svn: 115382
2010-10-01 23:40:43 +00:00
Chris Lattner
04b03b1fc4
move imperative code to declarative definitions.
...
llvm-svn: 115381
2010-10-01 23:35:58 +00:00
Devang Patel
d18c5aa20a
Mark explict methods as explict in debug info.
...
llvm-svn: 115379
2010-10-01 23:32:17 +00:00
Chris Lattner
3be167f606
diagnose errors when a builtin that require constant arguments don't have them.
...
For example, on:
#include <emmintrin.h>
int foo(int N) {
__m128i white2;
white2 = _mm_slli_si128(white2, N);
return 0;
}
we used to get:
fatal error: error in backend: Cannot yet select: intrinsic %llvm.x86.sse2.psll.dq
now we get:
/Users/sabre/t.c:4:11: error: argument to '__builtin_ia32_pslldqi128' must be a
constant integer
white2 = _mm_slli_si128(white2, N);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/sabre/t.c:1:
/Volumes/Projects/cvs/llvm/Debug+Asserts/lib/clang/2.9/include/emmintrin.h:781:13: note: instantiated from:
((__m128i)__builtin_ia32_pslldqi128((__m128i)(VEC), (IMM)*8))
^ ~~~~~~~
1 error generated.
llvm-svn: 115374
2010-10-01 23:23:24 +00:00
Chris Lattner
bd6e69368f
enhance ASTContext::GetBuiltinType to return a bitmask indicating which arguments
...
are required to be ICE's. No clients of this new functionality yet!
llvm-svn: 115366
2010-10-01 22:53:11 +00:00
Chris Lattner
dc226c2b9b
random cleanups, no functionality change.
...
llvm-svn: 115361
2010-10-01 22:42:38 +00:00
Gabor Greif
594ce3573a
Doug's feedback
...
llvm-svn: 115356
2010-10-01 22:12:38 +00:00
Gabor Greif
16e028617c
Factor out enumerator APSInt adjustment into
...
a helper function (AdjustAPSInt) and use that
for adjusting the high bounds of case ranges
before APSInt comparisons. Fixes
http://llvm.org/bugs/show_bug.cgi?id=8135
Some minor refacorings while I am here.
llvm-svn: 115355
2010-10-01 22:05:14 +00:00
Fariborz Jahanian
de744dcce1
Restore test. Is for //rdar://8493239
...
llvm-svn: 115349
2010-10-01 21:26:26 +00:00
Francois Pichet
6d76e6cd92
Better diagnostic for superfluous scope specifier inside a class definition for member functions. + Fixit.
...
Example:
class A {
void A::foo(); //warning: extra qualification on member 'foo'
};
llvm-svn: 115347
2010-10-01 21:19:28 +00:00
Douglas Gregor
e6712983d2
Teach clang_getCursorReferenced() about Objective-C property reference
...
and protocol expressions. Fixes <rdar://problem/7833565>.
llvm-svn: 115346
2010-10-01 21:11:22 +00:00
Tom Care
7359459636
UnreachableCodeChecker does not need to inherit from CheckerVisitor, only Checker. It does not use any AST Stmt hooks, only VisitEndAnalysis.
...
llvm-svn: 115345
2010-10-01 20:52:07 +00:00
Douglas Gregor
36ea4d4f45
Revert r115336 ("Thread PerFileData through everything."), because
...
we're missing the corresponding changes in the LLVM repository.
llvm-svn: 115340
2010-10-01 20:33:34 +00:00
Douglas Gregor
99a26afd49
Extend libclang with an API that determines, given a C++ virtual
...
member function or an Objective-C method, which other member
functions/methods it overrides.
llvm-svn: 115338
2010-10-01 20:25:15 +00:00
Sebastian Redl
7b1b2268e2
Thread PerFileData through everything. This allows us to remap stuff later.
...
llvm-svn: 115336
2010-10-01 19:59:15 +00:00
Sebastian Redl
3f6b753f9d
Record module loaders and module source order.
...
llvm-svn: 115334
2010-10-01 19:59:12 +00:00
Chris Lattner
2d084d07c8
fix a bogus "I" that I added to the per-function attribute list.
...
llvm-svn: 115333
2010-10-01 19:47:04 +00:00
Douglas Gregor
7fb25418ed
Implement the C++0x "trailing return type" feature, e.g.,
...
auto f(int) -> int
from Daniel Wallin!
(With a few minor bug fixes from me).
llvm-svn: 115322
2010-10-01 18:44:50 +00:00
Chris Lattner
8473339100
Various builtins a require an integer constant. Not providing
...
one results in an obscure error from the backend that doesn't make
sense. Capture this information in the .def files for builtins with
a new "I" modifier letter indicating the an argument needs to be an ICE.
Nothing uses this yet, but sema will eventually enforce this (eliminating
some special cases from semachecking.cpp) and codegen will use this to
force an ICE value, preventing backend error messages.
llvm-svn: 115302
2010-10-01 07:13:18 +00:00
Chris Lattner
1750cb037d
__builtin_ia32_psrldqi128 too
...
llvm-svn: 115301
2010-10-01 06:58:49 +00:00
Chris Lattner
81f347fe6d
the second argument to __builtin_ia32_pslldqi128 must be an immediate,
...
so it needs to be called from a macro, not a function. This is a necessary
but insufficient step towards fixing PR8221
llvm-svn: 115299
2010-10-01 06:52:23 +00:00
Zhongxing Xu
b06a2cdd2b
Now the whether adding implicit dtors is controlled by cmd option.
...
llvm-svn: 115275
2010-10-01 03:31:06 +00:00
Zhongxing Xu
6d372f7c0f
The return value is never used.
...
llvm-svn: 115272
2010-10-01 03:22:39 +00:00
Zhongxing Xu
307701e1b4
Use default augument.
...
llvm-svn: 115271
2010-10-01 03:09:09 +00:00
Zhongxing Xu
81714f2196
Simplify interface for addLocalScopeForStmt().
...
llvm-svn: 115270
2010-10-01 03:00:16 +00:00
Zhongxing Xu
ea360a3b1a
The old logic would add non-struct and non C++ struct variables to the local
...
scope. Now we only add C++ struct with non-trivial destructor variables to the
local scope.
llvm-svn: 115269
2010-10-01 02:47:11 +00:00
Marcin Swiderski
3546b1aea1
Added generating CFGAutomaticObjDtors for exception variable in catch statement.
...
llvm-svn: 115266
2010-10-01 01:46:52 +00:00
Marcin Swiderski
6d5ee0c7f9
Added generating CFGAutomaticObjDtors for init statement, condition variable and implicit scope in for statement.
...
llvm-svn: 115265
2010-10-01 01:38:14 +00:00
Marcin Swiderski
e407a3ba1e
dded generating CFGAutomaticObjDtors for condition variable and implicit scopes in switch statement.
...
llvm-svn: 115264
2010-10-01 01:24:41 +00:00
Douglas Gregor
aa43301842
If we get a TU_CONTEXT update from a chained PCH file before we
...
actually have an ASTContext, delay the processing of that
update. Patch by Sebastian Redl! Fixes <rdar://problem/8499034>.
llvm-svn: 115263
2010-10-01 01:18:02 +00:00
Marcin Swiderski
1f4e15c56f
Added generating CFGAutomaticObjDtors for condition variable and implicit scopes in while and do statements.
...
llvm-svn: 115262
2010-10-01 01:14:17 +00:00
Douglas Gregor
9e136b544d
Enable chained precompiled headers for use with precompiled preambles
...
llvm-svn: 115260
2010-10-01 01:05:22 +00:00
Douglas Gregor
eb114da506
When an identifier that has a macro definition in the original PCH
...
file is somehow changed in a chained PCH file, make sure that we write
out the macro definition. Fixes part of <rdar://problem/8499034>.
llvm-svn: 115259
2010-10-01 01:03:07 +00:00
Fariborz Jahanian
220d971ace
Remove test until further notice.
...
llvm-svn: 115258
2010-10-01 01:01:03 +00:00
Marcin Swiderski
f883ade880
Added generating CFGAutomaticObjDtors for condition variable and implicit scopes in if statement.
...
llvm-svn: 115256
2010-10-01 00:52:17 +00:00
Marcin Swiderski
e84cb97997
Fixed checking for trivial destructor in CFGBuilder::addLocalScopeForVarDecl. Checked type does not have to represent C++ class.
...
llvm-svn: 115254
2010-10-01 00:31:22 +00:00
Fariborz Jahanian
ef1fb2d1d1
Fix test.
...
llvm-svn: 115253
2010-10-01 00:27:17 +00:00
Marcin Swiderski
667ffecd9e
Added:
...
- Adding LocalScope for CompoundStmt,
- Adding CFGAutomaticObjDtors for end of scope, return, goto, break, continue,
- Regression tests for above cases.
llvm-svn: 115252
2010-10-01 00:23:17 +00:00
Fariborz Jahanian
885e9dff93
Output debug info. for ivars declared in class
...
extension and implementation.
Fixes rdar://8493239.
llvm-svn: 115248
2010-10-01 00:01:53 +00:00
Argyrios Kyrtzidis
1664634cbb
Add test case I forgot for r115159 (support implicit includes along with PCH).
...
llvm-svn: 115247
2010-10-01 00:00:18 +00:00
Dale Johannesen
39d6f4b95c
Clang part of MMX rewrite (goes with 115243).
...
llvm-svn: 115244
2010-09-30 23:57:50 +00:00
Marcin Swiderski
5e41573d26
Added methods for adding LocalScopes and CFGAutomaticObjDtors.
...
llvm-svn: 115237
2010-09-30 23:05:00 +00:00
Marcin Swiderski
321a707c9c
Added methods for inserting CFGAutomaticObjDtors to CFGBlocks,
...
Fixed some misspells in comments.
llvm-svn: 115236
2010-09-30 22:54:37 +00:00
Marcin Swiderski
e9862ce90a
Added:
...
- post-increament, distance and bool conversion methods to LocalScope::const_iterator,
- adding VarDecl to LocalScope.
Fixed some misspells in comments.
llvm-svn: 115227
2010-09-30 22:42:32 +00:00
Dawn Perchik
0d3d0b7489
perform_code_completion(): fix type declaration for TU.
...
llvm-svn: 115224
2010-09-30 22:26:05 +00:00
Nick Lewycky
3fd2928a45
Correct this name so I stop giving out the wrong email address.
...
llvm-svn: 115209
2010-09-30 21:20:23 +00:00
Fariborz Jahanian
7bf13c49c7
Rewriting array element type of qualified-id.
...
Fixes rdra://8475819.
llvm-svn: 115201
2010-09-30 20:41:32 +00:00
Daniel Dunbar
08b33d0791
c-index-test: Run inside a separate thread iff we have pthread support, to
...
ensure we at least get some minimal testing of running in a multithreaded
environment (for example, having a reduced stack size).
llvm-svn: 115200
2010-09-30 20:39:47 +00:00
Devang Patel
91bbb5547d
Introduce -flimit-debug-info.
...
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.
llvm-svn: 115188
2010-09-30 19:05:55 +00:00
Argyrios Kyrtzidis
58c65410ac
Support implicit includes when generating a PCH and allow the user to pass a -include on the command line following the PCH include.
...
Fixes rdar://7382084.
llvm-svn: 115159
2010-09-30 16:53:50 +00:00
Argyrios Kyrtzidis
2f23b414e9
Driver: Ignore the found PCH file if its '-include' is not the first one.
...
llvm-svn: 115158
2010-09-30 16:53:47 +00:00
Gabor Greif
61edf47ec6
typo
...
llvm-svn: 115148
2010-09-30 15:22:01 +00:00
Marcin Swiderski
99a9040a1f
Added two new command line arguments:
...
-cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true,
-cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true.
llvm-svn: 115142
2010-09-30 07:41:24 +00:00
Tom Care
ea7c48ccf7
Updated scan-build:
...
- Idempotent operations are on by default, to match --analyze in the driver.
- Integrated stats calculation based on parsing warnings emitted with the -analyzer-stats flag. The new -stats flag enables this.
- New -maxloop flag to pass down a maxloop value to the analyzer.
llvm-svn: 115123
2010-09-30 01:12:05 +00:00
Ted Kremenek
b0e7d77729
Include changes to VisitCXXMemberCallExpr (call visitor functions).
...
llvm-svn: 115120
2010-09-30 01:06:29 +00:00