NAKAMURA Takumi
1984479896
test/Coverage/html-diagnostics.c: Use find(1) to glob wildcards.
...
MSYS cat(1) does not expand wildcards.
llvm-svn: 116793
2010-10-19 03:38:22 +00:00
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