]>
granicus.if.org Git - clang/log
Richard Smith [Wed, 5 Dec 2012 22:18:04 +0000 (22:18 +0000)]
Fix an egregiously broken test. This pattern doesn't work:
RUN: a
RUN: b || true
lit expands it to a && b || true, and the || true applies to both commands (thus ignoring failures in 'a')! This is PR10867 again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 5 Dec 2012 21:53:37 +0000 (21:53 +0000)]
[c-index-test] Introduce '-index-compile-db' which accepts a compilation database file
and does an '-index-file' for all compile commands in the database.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 5 Dec 2012 21:43:37 +0000 (21:43 +0000)]
Fix name. The array is unboundED.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 5 Dec 2012 21:08:21 +0000 (21:08 +0000)]
[driver, ms-inline asm] MS-Style inline assembly is controlled by the
-fasm-blocks flag, not the -fms-extensions flag.
rdar://
12808010
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 5 Dec 2012 20:10:11 +0000 (20:10 +0000)]
fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169413
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 5 Dec 2012 19:54:11 +0000 (19:54 +0000)]
Testing C++ declarations embedded in
<declaration> tag of Comment XML.
Added DeclPrint support for constructors
and fix tests accordingly.
This is wip. // rdar://
12378714
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169412
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 5 Dec 2012 19:52:05 +0000 (19:52 +0000)]
[ms-inline asm] Add more tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169411
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 5 Dec 2012 18:44:49 +0000 (18:44 +0000)]
Format strings: offer a cast to 'unichar' for %C in Objective-C contexts.
For most cases where a conversion specifier doesn't match an argument,
we usually guess that the conversion specifier is wrong. However, if
the argument is an integer type and the specifier is %C, it's likely
the user really did mean to print the integer as a character.
(This is more common than %c because there is no way to specify a unichar
literal -- you have to write an integer literal, such as '0x2603',
and then cast it to unichar.)
This does not change the behavior of %S, since there are fewer cases
where printing a literal Unicode *string* is necessary, but this could
easily be changed in the future.
<rdar://problem/
11982013 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169400
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 5 Dec 2012 18:44:44 +0000 (18:44 +0000)]
Format strings: add more expression types that don't need parens to cast.
No functionality change (the test change is a comment only, and the new
functionality can't be tested using the current test).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 5 Dec 2012 18:44:40 +0000 (18:44 +0000)]
Format strings: a character literal should be printed with %c, not %d.
The type of a character literal is 'int' in C, but if the user writes a
character /as/ a literal, we should assume they meant it to be a
character and not a numeric value, and thus offer %c as a correction
rather than %d.
There's a special case for multi-character literals (like 'MooV'), which
have implementation-defined value and usually cannot be printed with %c.
These still use %d as the suggestion.
In C++, the type of a character literal is 'char', and so this problem
doesn't exist.
<rdar://problem/
12282316 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169398
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Wed, 5 Dec 2012 18:44:37 +0000 (18:44 +0000)]
Format strings: the correct conversion for 'char' is %c, not %d or %hhd.
We tried to account for 'uint8_t' by saying that /typedefs/ of 'char'
should be corrected as %hhd rather than %c, but the condition was wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 5 Dec 2012 16:24:48 +0000 (16:24 +0000)]
Remove bad and useless enum to bool conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169390
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 5 Dec 2012 15:06:06 +0000 (15:06 +0000)]
Clang-format: parse for and while loops
Summary: Adds support for formatting for and while loops.
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D174
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 5 Dec 2012 14:57:28 +0000 (14:57 +0000)]
Indentation fixes for clang-format.
- Fix behavior of memoization together with optimization
- Correctly attribute the PenaltyIndentLevel (breaking directly after "(" did
not count towards the inner level)
- Recognize more tokens as assignments
Review: http://llvm-reviews.chandlerc.com/D172
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169384
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 5 Dec 2012 13:56:52 +0000 (13:56 +0000)]
Follow-up to r169286, addresses comments in http://llvm-reviews.chandlerc.com/D164#comment-4 : comments and a method rename
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169382
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 5 Dec 2012 13:37:12 +0000 (13:37 +0000)]
Reuse an existing diagnostic for tsan/msan needing -pie error.
Add a diagnosting for -fsanitize=memory conflicting with other sanitizers.
Extend tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169380
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 5 Dec 2012 11:52:45 +0000 (11:52 +0000)]
test/Modules/build-fail-notes.m: Tweak to unbreak Win32 hosts to relax expressions, for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169375
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 5 Dec 2012 11:34:06 +0000 (11:34 +0000)]
In C++, if we hit an error in the class-head, don't try to parse the class body.
Our error recovery path may have made the class anonymous, and that has a pretty
disastrous impact on any attempt to parse a class body containing constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169374
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 5 Dec 2012 11:04:55 +0000 (11:04 +0000)]
PR14049: Don't say "expanded from macro 'foo'" when 'foo' just happens to be
the LHS of a token paste. Use "expanded from here" instead when we're not sure
it's actually a macro.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169373
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 5 Dec 2012 09:47:49 +0000 (09:47 +0000)]
Minor reorganization. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169367
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 5 Dec 2012 09:23:48 +0000 (09:23 +0000)]
Add missing virtual destructors reported by -Wnon-virtual-dtor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Wed, 5 Dec 2012 07:51:39 +0000 (07:51 +0000)]
Small tweaks to automatic formatting.
Recognize '!=' as a binary operator and assume that there are no
type definitions on the RHS of an assignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 5 Dec 2012 06:20:58 +0000 (06:20 +0000)]
Simplify slightly by seperating out the responsibility for emission of a caret
diagnostic from the emission of macro backtraces. Incidentally, we now get the
displayed source location for a diagnostic and the location for the caret from
the same place, rather than computing them separately. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 5 Dec 2012 06:16:54 +0000 (06:16 +0000)]
This test used to fail forever if it failed once, because it does not clean up after itself if it failed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169356
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 5 Dec 2012 04:56:27 +0000 (04:56 +0000)]
Driver.cpp: Restore clang/Config/config.h to be included at last not to prevent llvm-config.h.
Or "llvm/Support/system_error.h" could not be compiled on mingw.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169354
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 5 Dec 2012 03:18:16 +0000 (03:18 +0000)]
Simplify diagnostic emission. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169351
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Wed, 5 Dec 2012 01:20:45 +0000 (01:20 +0000)]
Thread-safety analysis: check locks on method calls, operator=, and
copy constructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Wed, 5 Dec 2012 01:14:37 +0000 (01:14 +0000)]
[analyzer] Implement an opt-in variant of direct ivar assignment.
This will only check the direct ivar assignments in the annotated
methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169349
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Wed, 5 Dec 2012 00:52:33 +0000 (00:52 +0000)]
Thread Safety Analysis: refactor to make more methods accept const pointers,
adjust checkAccess. No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169348
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 5 Dec 2012 00:38:44 +0000 (00:38 +0000)]
Testing C++ declarations embedded in
<declaration> tag of Comment XML and
added support for friend declaration printing.
This is wip. // rdar://
12378714
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169346
91177308 -0d34-0410-b5e6-
96231b3b80d8
DeLesley Hutchins [Wed, 5 Dec 2012 00:06:15 +0000 (00:06 +0000)]
Thread safety analysis: Add a new "beta" warning flag: -Wthread-safety-beta.
As the analysis improves, it will continue to add new warnings that are
potentially disruptive to existing users. From now on, such warnings will
first be introduced under the "beta" flag. Such warnings are not turned on by
default; their purpose is to allow users to test their code against future
planned changes, before those changes are actually made. After a suitable
migration period, beta warnings will be folded into the standard
-Wthread-safety.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 22:54:37 +0000 (22:54 +0000)]
Add -whole-archive around the ASan runtime archive in the link command.
This ensures that even though it comes first, we pick up its .o files.
Note that if we can use this (or something similar / equivalent) on
other platforms, we could potentially remove
ReplaceOperatorsNewAndDelete from the ASan runtimes.
We should probably do something similar for TSan and MSan as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 4 Dec 2012 22:17:32 +0000 (22:17 +0000)]
Alphabetize source files, just like they have been before.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 4 Dec 2012 21:33:58 +0000 (21:33 +0000)]
Use the 'count' attribute to calculate the upper bound of an array.
The count attribute is more accurate with regards to the size of an array. It
also obviates the upper bound attribute in the subrange. We can also better
handle an unbound array by setting the count to -1 instead of the lower bound to
1 and upper bound to 0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Tue, 4 Dec 2012 21:18:26 +0000 (21:18 +0000)]
Currently, with -fsanitize=address, the driver appends libclang_rt.asan.a to
the link command. This all works fine when the driver is also responsible for
adding -lstdc++ to the link command. But, if -lstdc++ (or libstdc++.a, etc) is
passed explicitly to the driver, the ASan runtime will appear in the link
command after the standard library, leading to multiple-definition errors for
the global 'operator new' and 'operator delete'. Fix this in a painfully
simple way, by inserting libclang_rt.asan.a at the start of the link command
instead of the end.
If we need to do something more clever, we can walk the link command looking
for something that resembles libstdc++ and insert libclang_rt.asan.a as late
as possible, but the simple solution works for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 4 Dec 2012 21:15:23 +0000 (21:15 +0000)]
Testing C declarations embedded in
<declaration> tag of Comment XML and fixed a
missing block literal printout as result of the testing.
// rdar://
12378714
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169307
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Dec 2012 21:05:31 +0000 (21:05 +0000)]
Add missing destructors found with -Wnon-virtual-dtor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 4 Dec 2012 18:38:10 +0000 (18:38 +0000)]
Adapt to LLVM commit 169291 which streamlines the usage of NaCl/NativeClient
in the triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169292
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 4 Dec 2012 18:25:34 +0000 (18:25 +0000)]
additional test for declaration tag of a class extension.
// rdar://
12378714
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169289
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Tue, 4 Dec 2012 17:27:50 +0000 (17:27 +0000)]
Error recovery part 2
Summary: Adds recovery for structural errors in clang-format.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D164
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169286
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 4 Dec 2012 17:20:57 +0000 (17:20 +0000)]
objective-c blocks: Consider padding due to alignment
after the fixed size block header when generating
captured block variable info. // rdar://
12773256
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169285
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Tue, 4 Dec 2012 15:40:36 +0000 (15:40 +0000)]
Clang-format error recovery part 1
Reviewers: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D163
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169278
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 15:32:03 +0000 (15:32 +0000)]
c-index-test.c: Make C89-compliant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169277
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Tue, 4 Dec 2012 15:13:46 +0000 (15:13 +0000)]
libclang: Add a function to libclang for retrieving the bit width value
Patch by Jyun-Yan You.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Dec 2012 14:54:30 +0000 (14:54 +0000)]
Make parenthesis counting and aligning a bit saner.
Review: http://llvm-reviews.chandlerc.com/D162
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Tue, 4 Dec 2012 14:46:19 +0000 (14:46 +0000)]
Enum formatting implementation
Reviewers: djasper, klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D161
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169272
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 4 Dec 2012 14:42:08 +0000 (14:42 +0000)]
Fix spelling I ran over while proof-reading tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169271
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 14:31:59 +0000 (14:31 +0000)]
ToolChains.cpp: Fixup r169260, clang/Config/config.h needs to be listed *last*, or llvm/Config/llvm-config.h could not be read in header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 4 Dec 2012 13:40:29 +0000 (13:40 +0000)]
Fixes crash in isDerivedFrom for recursive templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169262
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Dec 2012 13:02:32 +0000 (13:02 +0000)]
Small fixes to unary operator recognition and handling of include
directives.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 12:24:59 +0000 (12:24 +0000)]
Autotools has the same include guard for both Clang and LLVM's config.h.
Shuffling order causes the wrong one to win.
CMake didn't exhibit this problem because Clang's has *no* guards.
I'll fix this properly tomorrow when Eric and I can check both build
systems and get them to DTRT, but for now unbreak some bots by hoisting
this header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169260
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Dec 2012 12:08:08 +0000 (12:08 +0000)]
Update matcher documentation with script.
We still need to make the python script understand some of the new
matchers, but this should be an improvement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Dec 2012 11:54:27 +0000 (11:54 +0000)]
Add parameterCountIs() matcher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 4 Dec 2012 10:50:12 +0000 (10:50 +0000)]
Replace workarounds with correct fixes.
Also fix header guard.
http://llvm-reviews.chandlerc.com/D159
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 09:53:39 +0000 (09:53 +0000)]
Sort the #include lines under utils/...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 09:53:37 +0000 (09:53 +0000)]
Really sort the #include lines in unittests/...
I forgot to re-sort after fixing main module headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169244
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 09:45:34 +0000 (09:45 +0000)]
Sort the #include lines for unittests/...
I've tried to place sensible headers at the top as main-module headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169243
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 09:37:22 +0000 (09:37 +0000)]
Sort the #include lines for examples/...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169241
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 09:25:21 +0000 (09:25 +0000)]
Sort #include lines for tools/...
Completely automated with sort_includes.py
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169240
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 09:18:49 +0000 (09:18 +0000)]
Sort #include lines for all files under include/...
This is a simpler sort, entirely automatic with the help of
llvm/utils/sort_includes.py -- no manual edits here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 4 Dec 2012 09:13:33 +0000 (09:13 +0000)]
Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 08:20:41 +0000 (08:20 +0000)]
ASTTests, ASTMatchersTests: Move clangEdit before clangAst in USEDLIB.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169236
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 08:20:35 +0000 (08:20 +0000)]
Untabify (in USEDLIBS, Makefile(s)).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169235
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 07:40:33 +0000 (07:40 +0000)]
clang/Lex: [CMake] Update CMakefiles since r169229.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 4 Dec 2012 07:33:40 +0000 (07:33 +0000)]
Don't test for ASM output but for IR output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169232
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:27:05 +0000 (07:27 +0000)]
Refactor recording the preprocessor conditional directive regions out of
PreprocessingRecord and into its own class, PPConditionalDirectiveRecord.
Decoupling allows a client to use the functionality of PPConditionalDirectiveRecord
without needing a PreprocessingRecord.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169229
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:53 +0000 (07:26 +0000)]
In the PreprocessingRecord, to identify the different conditional directive regions
use the SourceLocation at the start of the respective region, instead of a unique integer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169228
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:48 +0000 (07:26 +0000)]
[libclang] Avoid copying the CompileCommand related strings when wrapping them to a CXString.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169227
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 4 Dec 2012 07:26:44 +0000 (07:26 +0000)]
Introduce CompilationDatabase::getAllCompileCommands() that returns all
compile commands of the database and expose it via the libclang API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169226
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 06:58:05 +0000 (06:58 +0000)]
clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp: Add explicit triple, x86_64-unknown-unknown. It was incompatible to i686.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169220
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 4 Dec 2012 06:21:27 +0000 (06:21 +0000)]
Add a 'count' field to the DWARF subrange.
The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169219
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Tue, 4 Dec 2012 02:48:16 +0000 (02:48 +0000)]
Document the existence of -fsanitize=bounds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169207
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 4 Dec 2012 01:03:31 +0000 (01:03 +0000)]
clang/test/Index/comment-objc-decls.m: Try to fix r169193, to add x86_64-darwin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169199
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 4 Dec 2012 00:47:33 +0000 (00:47 +0000)]
Testing objective-C declarations embedded in
<declaration> tag of Comment XML and fixed a
missing declaration of ivars private to @implementation
as result of the testing. // rdar://
12378714
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169193
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Tue, 4 Dec 2012 00:36:06 +0000 (00:36 +0000)]
Have clang use LLVM IR's fast-math flags when in FastMath or FiniteMathOnly modes. Test cases included.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Tue, 4 Dec 2012 00:29:55 +0000 (00:29 +0000)]
remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169187
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 3 Dec 2012 23:29:49 +0000 (23:29 +0000)]
clang/test/Driver/fsanitize-blacklist.c: Mark it as XFAIL:cygming, due to PR12920.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 3 Dec 2012 22:39:14 +0000 (22:39 +0000)]
Fix test failure when building Clang with g++4.7 -- don't use a Twine temporary
after its lifetime has ended!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Mon, 3 Dec 2012 20:55:42 +0000 (20:55 +0000)]
Fixes a compile warning and crash in the tests.
The necessity of this fix points to a problem with the design
of the addToken during the optimiation phase, which we need to address
in a much more principled way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 3 Dec 2012 19:12:58 +0000 (19:12 +0000)]
Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169144
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 3 Dec 2012 18:28:52 +0000 (18:28 +0000)]
libclangFormat is not libclangTooling, but it depends on it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 3 Dec 2012 18:28:12 +0000 (18:28 +0000)]
Fix PR14474: don't emit debug info for interface types in -gline-tables-only mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 3 Dec 2012 18:12:45 +0000 (18:12 +0000)]
Initial version of formatting library.
This formatting library will be used by a stand-alone clang-format tool
and can also be used when writing other refactorings.
Manuel's original design document:
https://docs.google.com/a/google.com/document/d/1gpckL2U_6QuU9YW2L1ABsc4Fcogn5UngKk7fE5dDOoA/edit
The library can already successfully format itself.
Review: http://llvm-reviews.chandlerc.com/D80
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 3 Dec 2012 15:43:25 +0000 (15:43 +0000)]
Make hasDeclaration work for enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169129
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 3 Dec 2012 13:20:43 +0000 (13:20 +0000)]
Add -fsanitize=memory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169124
91177308 -0d34-0410-b5e6-
96231b3b80d8
Will Dietz [Sun, 2 Dec 2012 19:50:33 +0000 (19:50 +0000)]
[ubsan] Add flag to enable recovery from checks when possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 20:58:01 +0000 (20:58 +0000)]
Make helper classes anonymous. Make helper functions static instead of private members so the anonymous class doesn't leak out.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Sat, 1 Dec 2012 18:27:21 +0000 (18:27 +0000)]
[MIPS] Add -mxgot/-mno-xgot command line options
to enable/disable support of GOT larger than 64k.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 17:54:07 +0000 (17:54 +0000)]
Add raw_ostream include to pacify MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 17:22:05 +0000 (17:22 +0000)]
Update unit tests not to rely on transitive includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169096
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 17:12:56 +0000 (17:12 +0000)]
Include pruning and general cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 16:35:25 +0000 (16:35 +0000)]
Don't include Type.h in DeclarationName.h.
Recursively prune some includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 15:18:03 +0000 (15:18 +0000)]
Make ASTVector.h standalone without including all of ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 15:09:41 +0000 (15:09 +0000)]
Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.
Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Sat, 1 Dec 2012 13:50:51 +0000 (13:50 +0000)]
Fix a test that was redefining FileCheck variables while referencing old ones.
In preparation for the FileCheck enhancement to support backreferences.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Sat, 1 Dec 2012 13:07:22 +0000 (13:07 +0000)]
Switch to using -### as mentioned by chandlerc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169089
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Sat, 1 Dec 2012 12:15:28 +0000 (12:15 +0000)]
Add -emit-llvm to test/Driver/fsanitize.c to stop this failing on the ARM bot. Approved by d0k.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169088
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 1 Dec 2012 12:08:08 +0000 (12:08 +0000)]
Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Han [Sat, 1 Dec 2012 04:35:48 +0000 (04:35 +0000)]
Fix a typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 1 Dec 2012 03:15:03 +0000 (03:15 +0000)]
Make these functions more clearly express the test they are performing. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169077
91177308 -0d34-0410-b5e6-
96231b3b80d8