]>
granicus.if.org Git - clang/log
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
Richard Smith [Sat, 1 Dec 2012 02:35:44 +0000 (02:35 +0000)]
Consistently use 'needsImplicit<special member>' to determine whether we need
an implicit special member, rather than sometimes using '!hasDeclared<special
member>'. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 1 Dec 2012 01:15:54 +0000 (01:15 +0000)]
Try to make the source location information for token pastes a bit more consistent.
Fixes a crash printing diagnostics on the gcc testsuite, and also makes
diagnostic range printing print nicer results for token pastes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169068
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 1 Dec 2012 01:02:45 +0000 (01:02 +0000)]
Remove restriction on combining ubsan with asan or tsan. This has worked for a while.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169066
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 1 Dec 2012 01:01:09 +0000 (01:01 +0000)]
Fix the determination of whether a capture refers to an enclosing
scope when dealing with nested blocks. Fixes <rdar://problem/
12778708 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169065
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 30 Nov 2012 23:46:56 +0000 (23:46 +0000)]
Don't emit a warning with an input/output parameter. We assume the user knows what they're doing here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169059
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 30 Nov 2012 23:40:49 +0000 (23:40 +0000)]
Fix test for Windows path separators
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169058
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 30 Nov 2012 23:32:31 +0000 (23:32 +0000)]
Teach the serialized diagnostic writer to clone() itself, sharing
state so that all of the various clones end up rendering their
diagnostics into the same serialized-diagnostics file. This is
important when we actually want failures during module build to be
reported back to the translation unit that tried to import the
not-yet-built or out-of-date module. <rdar://problem/
12565727 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169057
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 30 Nov 2012 23:18:12 +0000 (23:18 +0000)]
Don't warn if the input size is less than the register size. Also don't warn if
the output size is greater than the register size. No truncation occurs with
those. Reword warning to make it clearer what's the problem is.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 30 Nov 2012 23:09:29 +0000 (23:09 +0000)]
Make -Wtautological-constant-out-of-range-compare behave sanely for enums with a signed fixed type.
<rdar://problem/
12780159 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 30 Nov 2012 22:11:57 +0000 (22:11 +0000)]
Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169045
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 30 Nov 2012 21:58:49 +0000 (21:58 +0000)]
When we're emitting a diagnostic with a source location in an imported
module, provide a module import stack similar to what we would get for
an include stack, e.g.,
In module 'DependsOnModule' imported from build-fail-notes.m:4:
In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1:
Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here
@interface Module
<rdar://problem/
12696425 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169042
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 30 Nov 2012 21:44:01 +0000 (21:44 +0000)]
Fixing a precedence issue with my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 30 Nov 2012 21:15:20 +0000 (21:15 +0000)]
Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a logical operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 30 Nov 2012 20:04:39 +0000 (20:04 +0000)]
Comments: no need to escape any characters in \code ... \endcode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 30 Nov 2012 19:52:30 +0000 (19:52 +0000)]
Support for #pragma region/endregion for MSVC compatibility. Patch thanks to pravic!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 30 Nov 2012 19:28:05 +0000 (19:28 +0000)]
Actually keep track of the source locations at which particular module
files are loaded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 30 Nov 2012 18:38:50 +0000 (18:38 +0000)]
When an error occurs while building a module on demand, provide "While
building module 'Foo' imported from..." notes (the same we we provide
"In file included from..." notes) in the diagnostic, so that we know
how this module got included in the first place. This is part of
<rdar://problem/
12696425 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169021
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Fri, 30 Nov 2012 13:45:19 +0000 (13:45 +0000)]
Allow matchers to access the ASTContext.
Patch by Edwin Vane.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Nov 2012 11:04:44 +0000 (11:04 +0000)]
Update to reflect the change of macro name in r168993.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168994
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 30 Nov 2012 06:19:40 +0000 (06:19 +0000)]
Fix the computation of highlight ranges so we produce something sane when
the beginning and end of the range are in different macro arguments.
PR14399.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 30 Nov 2012 05:11:39 +0000 (05:11 +0000)]
Refactor to reduce duplication in handling of special member functions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 30 Nov 2012 01:34:36 +0000 (01:34 +0000)]
Add a test case for the new cortex-a5 switch
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168968
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 30 Nov 2012 01:15:32 +0000 (01:15 +0000)]
Use the new LLVM_LVALUE_FUNCTION to ban two getAs() calls on rvalues.
If 'x' is a temporary, x.getAs<Foo>() may not be safe if the result is
supposed to persist (if its address is stored somewhere). Since getAs()
can return a null value, the result is almost always stored into a
variable, which of course is not safe when the original value dies.
This has caused several bugs with GCC's "Temporaries May Vanish Sooner Than
You Expect" optimization; in C++11 builds, at least, we'll be able to catch
these problems now.
I would suggest applying these to other getAs() and get*As() methods
(castAs is "better" because sometimes the result is used directly, which
means the temporary will still be live), but these two have both caused
trouble in the analyzer in the past.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 30 Nov 2012 00:01:57 +0000 (00:01 +0000)]
Fix unit tests for ModuleLoader change in r168961.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 29 Nov 2012 23:55:25 +0000 (23:55 +0000)]
Keep track of modules that have failed to build. If we encounter an
import of that module elsewhere, don't try to build the module again:
it won't work, and the experience is quite dreadful. We track this
information somewhat globally, shared among all of the related
CompilerInvocations used to build modules on-the-fly, so that a
particular Clang instance will only try to build a given module once.
Fixes <rdar://problem/
12552849 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 29 Nov 2012 23:21:04 +0000 (23:21 +0000)]
Fix a small calling-convention bug for x86-32. PR14453.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168959
91177308 -0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 29 Nov 2012 23:15:27 +0000 (23:15 +0000)]
Add ARM cortex-a5 subtarget
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168958
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 29 Nov 2012 23:09:57 +0000 (23:09 +0000)]
Remove out-of-date comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 29 Nov 2012 23:07:08 +0000 (23:07 +0000)]
Revert commit revision r168953, to change the commit message, which was empty
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168956
91177308 -0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 29 Nov 2012 22:58:40 +0000 (22:58 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 29 Nov 2012 22:36:21 +0000 (22:36 +0000)]
This patch exposes to Clang users three more sanitizers are experimental features of ASan:
1) init-order sanitizer: initialization-order checker.
Status: usable, but may produce false positives w/o proper blacklisting.
2) use-after-return sanitizer
Status: implemented, but heavily understed.
Should be optional, as it significanlty slows program down.
3) use-after-scope sanitizer
Status: in progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168950
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 29 Nov 2012 20:01:14 +0000 (20:01 +0000)]
Make the test less sensitive to DWARF emission implementation details.
Note: the ":" goes into the regex because FileCheck wrongly complains about
unbalanced brackets otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168934
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Nov 2012 18:51:05 +0000 (18:51 +0000)]
Make sure that we put the rest of the sanitizer libraries on the link line
before libstdc++ like we do with ubsan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168918
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Nov 2012 18:08:24 +0000 (18:08 +0000)]
Use newer command line option here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168908
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Nov 2012 18:08:22 +0000 (18:08 +0000)]
Remove duplicate test run lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168907
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 29 Nov 2012 16:38:22 +0000 (16:38 +0000)]
Now that the underlying problem has been fixed, add r168411 back.
Original commit message:
Remove redundant code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 29 Nov 2012 16:09:03 +0000 (16:09 +0000)]
Merge function types in C.
Among other differences, GCC accepts
typedef int IA[];
typedef int A10[10];
static A10 *f(void);
static IA *f(void);
void g(void) {
(void)sizeof(*f());
}
but clang used to reject it with:
invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []')
The intention of c99's 6.2.7 seems to be that we should use the composite type
and accept as gcc does.
Doing the type merging required some extra fixes:
* Use the type from the function type in initializations, even if an parameter
is available.
* Fix the merging of the noreturn attribute in function types.
* Make CodeGen handle the fact that an parameter type can be different from
the corresponding type in the function type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168895
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 29 Nov 2012 10:22:40 +0000 (10:22 +0000)]
ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Remove i128 stuff. Conditioning-out in macro argument was not accepted on MS cl.exe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168867
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 29 Nov 2012 09:57:11 +0000 (09:57 +0000)]
ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Suppress i128 according to r168856, for now.
I think "i128", that I conditioned out, could be completely removed.
MS Compiler doesn't accept i128. We can assume no one would use i128.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168865
91177308 -0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 29 Nov 2012 08:58:47 +0000 (08:58 +0000)]
[-cxx-abi microsoft] Also spill the argument-back-references context when mangling templates
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168862
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 29 Nov 2012 05:41:51 +0000 (05:41 +0000)]
Reject uses of __int128 on platforms that don't support it. Also move the ugly
'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be
properly cleaned up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168856
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 29 Nov 2012 05:29:23 +0000 (05:29 +0000)]
Fix sentence construction-o.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168855
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 29 Nov 2012 03:13:49 +0000 (03:13 +0000)]
Fix crash-on-invalid. <rdar://problem/
12765391 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168851
91177308 -0d34-0410-b5e6-
96231b3b80d8