]>
granicus.if.org Git - clang/log
Roman Divacky [Fri, 21 Dec 2012 17:23:52 +0000 (17:23 +0000)]
Sort the includes according to the coding standard.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170905
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 21 Dec 2012 17:14:23 +0000 (17:14 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Fri, 21 Dec 2012 17:07:08 +0000 (17:07 +0000)]
Remove duplicate includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 21 Dec 2012 14:37:20 +0000 (14:37 +0000)]
Basic support for formatting for-loops.
We used to not really format them. Now we do:
for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
SE = BB->succ_end();
SI != SE; ++SI) {
This is just one example and I am sure we still mess some of them up, but it
is a step forward.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170899
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Dec 2012 13:22:55 +0000 (13:22 +0000)]
Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170890
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 21 Dec 2012 12:10:20 +0000 (12:10 +0000)]
Temporary fix of tests to make buildbots happy.
Permanent solution coming up after checking back with Fariborz/Douglas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170887
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 21 Dec 2012 10:53:20 +0000 (10:53 +0000)]
Slight rewording of -fsanitize=memory docs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170880
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 21 Dec 2012 10:50:00 +0000 (10:50 +0000)]
User manual chapter on MemorySanitizer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170879
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 21 Dec 2012 10:20:02 +0000 (10:20 +0000)]
Use OperatorPrecedence.h in clang-format
No indented functional changes other than handling more operators
correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170875
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 21 Dec 2012 09:41:31 +0000 (09:41 +0000)]
Formatting fixes for PR14680
Also, some (automated) formatting fixes and slight cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170873
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitry Vyukov [Fri, 21 Dec 2012 08:21:25 +0000 (08:21 +0000)]
Remove the working that ThreadSanitizer is *experimental*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 21 Dec 2012 08:13:35 +0000 (08:13 +0000)]
Fix regression in r170489: when instantiating a direct initializer which is a
CXXScalarValueInitExpr (or an ImplicitValueInitExpr), strip it back down to an
empty pair of parentheses so that the initialization code can tell that we're
performing value-initialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 21 Dec 2012 08:04:28 +0000 (08:04 +0000)]
Extend checkUnsafeAssigns() to also handle assigning an object literal to a weak reference.
Thanks to Jordan Rose and John McCall for their sage code review.
Fixes <rdar://problem/
12569201 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 21 Dec 2012 08:04:20 +0000 (08:04 +0000)]
Refactor checkUnsafeAssigns() to avoid code duplication with while loop.
This is just a minor bit of refactoring, but it is nice cleanup for
the subsequent patch that adds warning support for assigning literals
to weak variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 21 Dec 2012 03:17:28 +0000 (03:17 +0000)]
Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for a value-initialized bool!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170837
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 21 Dec 2012 02:50:38 +0000 (02:50 +0000)]
Revert r170806, "Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member."
It broke stage2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170835
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 21 Dec 2012 01:51:12 +0000 (01:51 +0000)]
[libclang] Follow-up to r170824, provide the correct number of arguments for
a not-fully-formed macro invocation during code-completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 21 Dec 2012 01:50:14 +0000 (01:50 +0000)]
[analyzer] Address Jordan's nitpicks as per code review of r170625.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Dec 2012 01:30:23 +0000 (01:30 +0000)]
Revert r170826. The output of
./bin/clang -cc1 -internal-isystem /home/espindola/llvm/build/lib/clang/3.3/include/ -analyze -analyzer-checker=debug.DumpCallGraph /home/espindola/llvm/clang/test/Analysis/debug-CallGraph.c -fblocks
changes in each run.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170829
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 21 Dec 2012 01:21:33 +0000 (01:21 +0000)]
Don't eagerly emit a global static merged with a local extern.
When we are visiting the extern declaration of 'i' in
static int i = 99;
int foo() {
extern int i;
return i;
}
We should not try to handle it as if it was an function static. That is, we
must consider the written storage class.
Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the
if leading to its call are not completely accurate. They were passing before
because the second decl was marked as having external storage. I changed them
to check the linkage, which I find easier to understand.
Last but not least, there is something strange going on with cuda and opencl.
My guess is that the linkage computation for these languages needs to be
audited, but I didn't want to change that in this patch so I just updated
the storage classes to keep the current behavior.
Thanks to Reed Kotler for reporting this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170827
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 21 Dec 2012 01:19:22 +0000 (01:19 +0000)]
[analyzer] Traverse the Call Graph in topological order.
Modify the call graph by removing the parentless nodes. Instead all
nodes are children of root to ensure they are all reachable. Remove the
tracking of nodes that are "top level" or global. This information is
not used and can be obtained from the Decls stored inside
CallGraphNodes.
Instead of existing ordering hacks, analyze the functions in topological
order over the Call Graph.
Together with the addition of devirtualizable ObjC message sends and
blocks to the call graph, this gives around 6% performance improvement
on several large ObjC benchmarks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 21 Dec 2012 01:19:15 +0000 (01:19 +0000)]
[analyzer] Add blocks and ObjC messages to the call graph.
This paves the road for constructing a better function dependency graph.
If we analyze a function before the functions it calls and inlines,
there is more opportunity for optimization.
Note, we add call edges to the called methods that correspond to
function definitions (declarations with bodies).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170825
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 21 Dec 2012 01:17:20 +0000 (01:17 +0000)]
[libclang] Make sure we can code-complete inside a macro argument even though
the macro invocation is not fully formed.
rdar://
11290992
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170824
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 21 Dec 2012 00:21:02 +0000 (00:21 +0000)]
EditedSource.cpp: Appease msvc, to add <cctype>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 21 Dec 2012 00:17:02 +0000 (00:17 +0000)]
docs: Convert ObjectiveCLiterals to reST.
Sphinx's syntax highlighter doesn't recognize the new literals, so the
syntax highlighting is pretty pathetic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170814
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 21 Dec 2012 00:16:58 +0000 (00:16 +0000)]
docs: fix Sphinx toctree warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170813
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 21 Dec 2012 00:16:53 +0000 (00:16 +0000)]
docs: Convert DriverInternals to reST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 20 Dec 2012 23:49:09 +0000 (23:49 +0000)]
Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 20 Dec 2012 23:36:52 +0000 (23:36 +0000)]
Revert r170801, which breaks the mingw build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 20 Dec 2012 23:11:42 +0000 (23:11 +0000)]
Eliminate errors when running the 'PrintFunctionNames' plugin, from Li Qun!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 20 Dec 2012 22:31:27 +0000 (22:31 +0000)]
Revert "Warn if a __weak variable is initialized with an Objective-C object literal."
Per code feedback, I want to see if there is a more general way to do this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 20 Dec 2012 21:05:53 +0000 (21:05 +0000)]
Use some heuristics so that when a fixit removes a source range, we try
to also remove a trailing space if possible.
For example, removing '__bridge' from:
i = (__bridge I*)p;
should result in:
i = (I*)p;
not:
i = ( I*)p;
rdar://
11314821
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170764
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 20 Dec 2012 20:55:03 +0000 (20:55 +0000)]
Warn if a __weak variable is initialized with an Objective-C object literal.
Such variables may immediately become nil or may have unpredictable
behavior.
Fixes <rdar://problem/
12569201 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 20 Dec 2012 20:51:59 +0000 (20:51 +0000)]
Documentation: use monospaced font in BlockLanguageSpec, and fix a link to this
document
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170762
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 20 Dec 2012 20:37:53 +0000 (20:37 +0000)]
Use the MaybeParseMicrosoftAttributes function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170761
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 20 Dec 2012 20:31:38 +0000 (20:31 +0000)]
Remove namespace qualifier that lead to build breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Thu, 20 Dec 2012 20:25:19 +0000 (20:25 +0000)]
Move operator precedence calculation to new header
Thereby, it can be reused by clang-format and others.
Review: http://llvm-reviews.chandlerc.com/D229
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170757
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 20 Dec 2012 19:54:13 +0000 (19:54 +0000)]
Add objective-C style formatting to clang format and
use it to format xml declaration tags.
// rdar://
12378714
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170727
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 20 Dec 2012 19:36:22 +0000 (19:36 +0000)]
Update RetainCountChecker to understand attribute ns_returns_autoreleased.
Fixes <rdar://problem/
12887356 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170724
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 20 Dec 2012 19:36:20 +0000 (19:36 +0000)]
Attribute 'cf_returns_autoreleased' doesn't really exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 20 Dec 2012 19:27:06 +0000 (19:27 +0000)]
Rename llvm::Attributes to llvm::Attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 20 Dec 2012 19:22:21 +0000 (19:22 +0000)]
Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 20 Dec 2012 16:15:07 +0000 (16:15 +0000)]
Fix Generic_GCC::GCCVersion::operator<
Without this patch comparing two equal versions without patch numbers (4.7 for
example) will result in A < B and B < A.
Patch by Simon Atanasyan.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170705
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 20 Dec 2012 13:30:10 +0000 (13:30 +0000)]
c-index-test/Makefile: Add clangFormat to USEDLIBS for libclang-unavailable hosts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170693
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 20 Dec 2012 13:30:05 +0000 (13:30 +0000)]
c-index-test/Makefile: Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170692
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 20 Dec 2012 12:23:54 +0000 (12:23 +0000)]
Minor coding style issue: NULL -> 0
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 20 Dec 2012 12:03:13 +0000 (12:03 +0000)]
Add __has_feature(memory_sanitizer).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 20 Dec 2012 11:08:38 +0000 (11:08 +0000)]
ASTDumper coding style fixes.
http://llvm-reviews.chandlerc.com/D226
Patch by Philip Craig!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170684
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 20 Dec 2012 11:08:13 +0000 (11:08 +0000)]
clang/test/Driver/warning-options.cpp: Appease MSYS bash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170683
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 20 Dec 2012 03:30:30 +0000 (03:30 +0000)]
clang/test/Misc/ast-dump-decl.c: Add triple. __thread is not supported on all targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 20 Dec 2012 03:23:52 +0000 (03:23 +0000)]
Updated link in LanguageExtensions.rst to point to BlockLanguageSpec.rst instead of BlockLanguageSpec.txt.
Thanks to Jean-Daniel Dupas for comments!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 20 Dec 2012 03:23:49 +0000 (03:23 +0000)]
Changed UTF-8 emdashes to --- ala Dmitri Gribenko's comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170643
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 20 Dec 2012 02:47:01 +0000 (02:47 +0000)]
Fix another uninitialized bool member bug found by -fsanitize=bool. This one
appears to currently be benign (we happen to test the flags in the right
order, so we never depend on the uninitialized value).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170640
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 20 Dec 2012 02:45:14 +0000 (02:45 +0000)]
Robustify the @encode code and add support for _Atomic.
Fixes PR14628.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 20 Dec 2012 02:22:15 +0000 (02:22 +0000)]
Fix code that attempted to produce a diagnostic with one DiagnosticEngine, then
produce a note for that diagnostic either with a different DiagnosticEngine or
after calling DiagnosticEngine::Reset(). That didn't make any sense, and did the
wrong thing if the original diagnostic was suppressed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170636
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 20 Dec 2012 02:20:09 +0000 (02:20 +0000)]
Provide couple of DeclPrint tests for my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 20 Dec 2012 02:09:13 +0000 (02:09 +0000)]
Implement AST dumper for Decls.
http://llvm-reviews.chandlerc.com/D52
Patch by Philip Craig!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Thu, 20 Dec 2012 00:38:25 +0000 (00:38 +0000)]
[analyzer] Add the pointer escaped callback.
Instead of using several callbacks to identify the pointer escape event,
checkers now can register for the checkPointerEscape.
Converted the Malloc checker to use the new callback.
SimpleStreamChecker will be converted next.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 19 Dec 2012 23:55:44 +0000 (23:55 +0000)]
[preprocessor] When "merging" macro argument tokens into one SLocEntry chunk,
make sure they came from the same kind of FileIDs.
Thanks to Abramo Bagnara for providing the test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 19 Dec 2012 23:47:16 +0000 (23:47 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 19 Dec 2012 23:41:50 +0000 (23:41 +0000)]
[driver] Have -isysroot warn on nonexistent paths.
rdar://
12282267
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 19 Dec 2012 23:36:00 +0000 (23:36 +0000)]
Audit DeclPrinter with -ast-dump on Cocoa.h and
fix any bad objectiveC syntax coming out of
DeclPrinter. This is on going. Also, introduce a new
PrintPolicy and use it as needed when declaration tag
is to be produced via DeclPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 19 Dec 2012 22:21:18 +0000 (22:21 +0000)]
[PCH/Modules] In ASTReader::completeVisibleDeclsMap, make sure to visit all
modules when getting the decls for a namespace or translation unit.
Otherwise the code-completion results will not be complete.
rdar://
12889089
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 19 Dec 2012 22:06:59 +0000 (22:06 +0000)]
Documentation: UsersManual.rst: some cleanups after semi-automatic conversion
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 19 Dec 2012 18:58:55 +0000 (18:58 +0000)]
objective-C: Don't warn of unimplemented property of protocols in
category, when those properties will be implemented in category's
primary class or one of its super classes. // rdar://
12568064
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 19 Dec 2012 18:42:42 +0000 (18:42 +0000)]
Forgot to remove trailing whitespace when I converted the BlockLanguageSpec.txt => BlockLanguageSpec.rst. It has been eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170572
91177308 -0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 19 Dec 2012 18:41:09 +0000 (18:41 +0000)]
Converted BlockLanguageSpec.txt => BlockLanguageSpec.rst.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 19 Dec 2012 18:30:38 +0000 (18:30 +0000)]
Change test to dump Filecheck output to an intermediate file. This makes it easier to update this test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 19 Dec 2012 17:34:55 +0000 (17:34 +0000)]
Fix PR14591: Windows newlines in doxygen comments cause failed assertion in
TextDiagnostic
Patch by Janusz Chorko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 19 Dec 2012 17:29:30 +0000 (17:29 +0000)]
Add a missing 'else'. Found by grep '} if'
No testcase because this did not affect correctness: a declaration can only be
ClassTemplateDecl or a FunctionTemplateDecl, not both.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170565
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 19 Dec 2012 17:17:09 +0000 (17:17 +0000)]
Comment parsing: add a missing 'else'. Found by inspection.
No testcase because we were just building an extra AST node and eventually
throwing it away, so it did not affect correctness.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 19 Dec 2012 17:03:46 +0000 (17:03 +0000)]
Improve on header comment suggested by James Dennet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170555
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 19 Dec 2012 07:18:12 +0000 (07:18 +0000)]
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Dec 2012 03:15:32 +0000 (03:15 +0000)]
Attempt to clarify a vexing-parse diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Dec 2012 02:27:38 +0000 (02:27 +0000)]
Fix assertion failure in self-host (and probably bogus template instantiation
too). When instantiating a direct-initializer, if we find it has zero
arguments, produce an empty ParenListExpr rather than returning a null
expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 19 Dec 2012 01:39:02 +0000 (01:39 +0000)]
PR13470: Ensure that copy-list-initialization isntantiates as
copy-list-initialization (and doesn't add an additional copy step):
Fill in the ListInitialization bit when creating a CXXConstructExpr. Use it
when instantiating initializers in order to correctly handle instantiation of
copy-list-initialization. Teach TreeTransform that function arguments are
initializations, and so need this special treatment too. Finally, remove some
hacks which were working around SubstInitializer's shortcomings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 19 Dec 2012 01:35:35 +0000 (01:35 +0000)]
Pass AnalyzerOptions to PathDiagnosticConsumer to make analyzer options accessible there.
This is plumbing needed for later functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 19 Dec 2012 01:16:49 +0000 (01:16 +0000)]
Simplify logic to use SourceManager::getFileLoc(), per Argyrios's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 19 Dec 2012 01:00:36 +0000 (01:00 +0000)]
fixes a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170485
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 19 Dec 2012 00:57:48 +0000 (00:57 +0000)]
test/Index/preamble_macro_template.cpp: Suppress this probably due to Lit/win32 issue. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170484
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 19 Dec 2012 00:45:41 +0000 (00:45 +0000)]
Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as per review discussion in r170365
This does limit these typedefs to being sequences, but no current usage
requires them to be contiguous (we could expand this to a more general
iterator pair range concept at some point).
Also, it'd be nice if SmallVector were constructible directly from an ArrayRef
but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the
inverse conversion. (& generalizing over all range-like things, while nice,
would require some nontrivial SFINAE I haven't thought about yet)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 19 Dec 2012 00:35:23 +0000 (00:35 +0000)]
Increas number of iterations before a new libclang format object
is created to 1000.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 19 Dec 2012 00:26:58 +0000 (00:26 +0000)]
Make sure CodeGen uses a value of the correct type as the result of
of assignment to a bool bitfield. PR14638.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 19 Dec 2012 00:01:48 +0000 (00:01 +0000)]
Some code refactoring per Dimitri's comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 18 Dec 2012 23:32:47 +0000 (23:32 +0000)]
Fix a crash in diagnostic printing when a template class type is diff'ed
against itself. PR14489.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 18 Dec 2012 23:10:16 +0000 (23:10 +0000)]
Enable the loop vectorizer in clang via -fvectorize
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 18 Dec 2012 23:08:58 +0000 (23:08 +0000)]
Fix the fvectorize testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 18 Dec 2012 23:07:30 +0000 (23:07 +0000)]
Have clang_getSpellingLocation() use the same logic as DiagnosticRenderer for plowing through macros.
This fixes a subtle bug reported in <rdar://problem/
12584554 > where a double-nested
macro could lead to an incorrect fixit location with live issues.
This fix also uncovers a bunch of subtle bugs in our indexer test cases which
are now fixed (mostly around source ranges for attributes).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 18 Dec 2012 23:02:59 +0000 (23:02 +0000)]
This is the libclang patch providing minimal API to
use clang's formatter. Currently, formatter is used
to format declaration tags for xml comments. Since formatter
is in flux and its change will break several of the clang comment
tests, only a single tests is formatted using this facility.
Doug has reviewed and approved it for check-in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170467
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 18 Dec 2012 23:02:07 +0000 (23:02 +0000)]
Be defensive when printing module import locations; the diagnostic printer needs to be robust
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 18 Dec 2012 22:22:16 +0000 (22:22 +0000)]
Similar to 170440 - fix build warning with gcc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 18 Dec 2012 21:09:25 +0000 (21:09 +0000)]
Add tests to check recent changes to some builtins.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170458
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 18 Dec 2012 21:05:13 +0000 (21:05 +0000)]
Better support for constructor initializers.
We used to format initializers like this (with a sort of hacky implementation):
Constructor()
: Val1(A),
Val2(B) {
and now format like this (with a somewhat better solution):
Constructor()
: Val1(A), Val2(B) {
assuming this would not fit on a single line. Also added tests.
As a side effect we now first analyze whether an UnwrappedLine needs to be
split at all. If not, not splitting it is the best solution by definition. As
this should be a very common case in normal code, not exploring the entire
solution space can provide significant speedup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170457
91177308 -0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Tue, 18 Dec 2012 20:58:04 +0000 (20:58 +0000)]
CodeGen: Expand creal and cimag into complex field loads
PR 14529 was opened because neither Clang or LLVM was expanding
calls to creal* or cimag* into instructions that just load the
respective complex field. After some discussion, it was not
considered realistic to do this in LLVM because of the platform
specific way complex types are expanded. Thus a way to solve
this in Clang was pursued. GCC does a similar expansion.
This patch adds the feature to Clang by making the creal* and
cimag* functions library builtins and modifying the builtin code
generator to look for the new builtin types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 18 Dec 2012 19:56:56 +0000 (19:56 +0000)]
Make the format scrambler understand line comments.
This allows for writing tests including line comments easier and more readable.
We will need more of those tests in the future and also line comments are
useful to force line breaks in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 18 Dec 2012 19:39:40 +0000 (19:39 +0000)]
CMake: Make sure to detect LibXml2 when Clang is built standalone
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 18 Dec 2012 18:53:14 +0000 (18:53 +0000)]
Fix a compilation warning with gcc 4.6
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Guy Benyei [Tue, 18 Dec 2012 14:38:23 +0000 (14:38 +0000)]
Re-commit r170428 changes with Linux style file endings.
Add OpenCL images as clang builtin types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Guy Benyei [Tue, 18 Dec 2012 14:30:41 +0000 (14:30 +0000)]
Revert changes from r170428, as I accidentally changed the line endings of these files to Windows style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Guy Benyei [Tue, 18 Dec 2012 12:30:03 +0000 (12:30 +0000)]
Add OpenCL images as clang builtin types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428
91177308 -0d34-0410-b5e6-
96231b3b80d8