]>
granicus.if.org Git - clang/log
Daniel Dunbar [Tue, 16 Feb 2010 01:54:33 +0000 (01:54 +0000)]
Switch clang to use its own LLVMContext (not the global one).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96313
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Feb 2010 01:47:05 +0000 (01:47 +0000)]
Fix test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Feb 2010 01:46:59 +0000 (01:46 +0000)]
Refactor the logic for printf argument type-checking into analyze_printf::ArgTypeResult.
Implement printf argument type checking for '%s'.
Fixes <rdar://problem/
3065808 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 16 Feb 2010 01:46:47 +0000 (01:46 +0000)]
Added 'AsWideChar' flag to LengthModifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96309
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 16 Feb 2010 01:20:57 +0000 (01:20 +0000)]
Skeleton for importing Objective-C classes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Feb 2010 00:23:21 +0000 (00:23 +0000)]
mark __builtin_longjmp noreturn, PR6312
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96302
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 16 Feb 2010 00:04:46 +0000 (00:04 +0000)]
Don't import __va_list_tag or __builtin_va_list when merging
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 15 Feb 2010 23:54:17 +0000 (23:54 +0000)]
Cope with anonymous tags defined within declarators by structurally
comparing their types under the assumption that they are equivalent,
rather than importing the types and then checking for compatibility. A
few minor tweaks here:
- Teach structural matching to handle compatibility between
function types with prototypes and those without prototypes.
- Teach structural matching that an incomplete record decl is the
same as any other record decl with the same name.
- Keep track of pairs of declarations that we have already checked
(but failed to find as structurally matching), so we don't emit
diagnostics repeatedly.
- When importing a typedef of an anonymous tag, be sure to link the
imported tag type to its typedef.
With these changes, we survive a repeated import of <stdlib.h> and
<stdio.h>. Alas, the ASTNodeImporter is getting a little grotty.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 15 Feb 2010 23:02:46 +0000 (23:02 +0000)]
Convert GRExprEngine's handling of ObjCMessageExprs to use a worklist
to evaluate arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 15 Feb 2010 22:42:31 +0000 (22:42 +0000)]
Add Sema support for __builtin_fpclassify by extending the existing check for __builtin_isinf and friends. Part of PR6083.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96291
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 15 Feb 2010 22:20:11 +0000 (22:20 +0000)]
Issue a bettter diagnostics for incorrect property setter name.
(radar
7647953 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96284
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 15 Feb 2010 22:12:26 +0000 (22:12 +0000)]
Fix instantiation of template functions with local classes that contain virtual
methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 15 Feb 2010 22:05:17 +0000 (22:05 +0000)]
Tell ASTMerge to merge every declaration it sees, rather than cherry-picking those declarations that we know will work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 15 Feb 2010 22:01:00 +0000 (22:01 +0000)]
Reimplement the structural-equality checks used to determine whether
two types in different AST contexts are equivalent. Rather than
transforming the type from one context into the other context, we
perform a deep structural comparison of the types. This change
addresses a serious problem with recursive data types like
struct ListNode {
int value;
struct ListNode *Next;
} xList;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96278
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 15 Feb 2010 21:55:26 +0000 (21:55 +0000)]
Class continuation now has its own property ast for
those declared in it. This is to allow duplicate
property diagnostics for properties declared in class extensions
multiple times (radar
7629420 ) and for future use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 15 Feb 2010 21:37:11 +0000 (21:37 +0000)]
Test to compile the rewritten file for my last patch.
(radar
7649577 related).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 15 Feb 2010 21:11:41 +0000 (21:11 +0000)]
Fix a broken rewritin of @implementation keyword.
(fixes radar
7649577 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96270
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 15 Feb 2010 19:38:00 +0000 (19:38 +0000)]
Optimize the implementation of IdDeclInfo pooling in the IdentifierResolver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Feb 2010 18:08:38 +0000 (18:08 +0000)]
Use getLocStart(), instead of getLocEnd(), to record starting location of objc method. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Mon, 15 Feb 2010 18:02:12 +0000 (18:02 +0000)]
reverting back 96242 as it still causes a test failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96244
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Mon, 15 Feb 2010 17:19:13 +0000 (17:19 +0000)]
Re-applying 96173 with corresponding changes in test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 15 Feb 2010 16:14:01 +0000 (16:14 +0000)]
Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 15 Feb 2010 11:53:20 +0000 (11:53 +0000)]
Defer covariance checks for dependent types. Add test cases that also ensure
they are re-checked on instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96217
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 15 Feb 2010 04:28:35 +0000 (04:28 +0000)]
Simplify code. If we can reach here, the base must be virtual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96211
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 15 Feb 2010 01:23:36 +0000 (01:23 +0000)]
When emitting an aggregate into a temporary, make sure we set the alignment
on the alloca.
The fact that codegen makes this class of bug so wonderfully easy to make is
embarrassing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 22:58:16 +0000 (22:58 +0000)]
clang::Attr objects should be treated as AST nodes as well by
the LLVMConventionsChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96202
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 19:09:13 +0000 (19:09 +0000)]
Add LLVM conventions check that scans for AST elements (types, stmts, decls)
that allocate heap memory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 19:09:05 +0000 (19:09 +0000)]
Change LLVMConventionsChecker to accept an entire translation unit instead
of operating on each code decl. This exposes two flaws in AnalysisConsumer
that should eventually be fixed:
(1) It is not possible to associate multiple "actions" with a single
command line argument. This will require the notion of an
"analysis" group, and possibly tablegen support. (although eventually
we want to support dynamically loading analyses as well)
(2) AnalysisConsumer may not actually be scanning the declarations in namespaces.
We'll experiment first in LLVMConventionsChecker before changing the
behavior in AnalysisConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 19:08:51 +0000 (19:08 +0000)]
Rework translation unit actions to actually take an entire translation unit
as imput.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 19:08:43 +0000 (19:08 +0000)]
For the StringRef check, also visit the children of DeclStmts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 19:08:36 +0000 (19:08 +0000)]
Place type-checking static methods at type of file (where they will congregate).
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96180
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Feb 2010 18:38:38 +0000 (18:38 +0000)]
temporarily revert 96173, it is causing test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Sun, 14 Feb 2010 18:20:18 +0000 (18:20 +0000)]
renamed pic16 specifiic macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 14 Feb 2010 17:05:59 +0000 (17:05 +0000)]
Don't compute final overriders or build vtables for bases that don't need a vtable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96171
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 14 Feb 2010 14:14:16 +0000 (14:14 +0000)]
Pass StringRefs to InsertText/ReplaceText in RewriteObjC and remove a ton of unnecessary length arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96164
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 10:02:57 +0000 (10:02 +0000)]
CIndex: Switch CXSourceRange to proper half-open intervals.
- Doug, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 10:02:42 +0000 (10:02 +0000)]
CIndex: Avoid an unnecessary getLocForEndOfToken call, the region of interest
doesn't need to be a full token.
- Doug, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96161
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 08:32:51 +0000 (08:32 +0000)]
c-index-test: Unify and always print half-open extents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96160
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 08:32:32 +0000 (08:32 +0000)]
c-index-test: Simplify file scanning code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96159
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 08:32:24 +0000 (08:32 +0000)]
c-index-test: Unify syntax for printing extents. Yes, there were 4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 08:32:11 +0000 (08:32 +0000)]
CIndex: Simplify (remove provably dead code).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 08:32:05 +0000 (08:32 +0000)]
CIndex: Inline CompareRegionOfInterest(CXSourceRange) into sole caller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 08:31:57 +0000 (08:31 +0000)]
Rename translateSourceRange(CXSourceRange) translateCXSourceRange, instead of
having overloaded functions with inverse semantics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96155
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 14 Feb 2010 06:49:48 +0000 (06:49 +0000)]
Fix pr6293. If ptr is NULL, no operation is preformed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 02:45:18 +0000 (02:45 +0000)]
Add new static analyzer for checking LLVM coding conventions: -analyzer-check-llvm-conventions
Currently these checks are intended to be largely syntactical, but may get more
sophisticated over time.
As an initial foray into this brave new world, emit a static analyzer warning
when binding a temporary 'std::string' to an 'llvm::StringRef' where the
lifetime of the 'std::string' does not outlive the 'llvm::StringRef'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96147
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 14 Feb 2010 02:44:52 +0000 (02:44 +0000)]
Two changes to AnalysisConsumer::HandleTopLevelSingleDecl():
(1) Since CXXMethodDecl subclasses FunctionDecl (and CXXDestructorDecl
and CXXConversion subclass CXXMethodDecl), refactor switch statement
to handle them all in one spot.
(2) Use 'DeclarationName::getAsString()' to handle all functions that
don't have simple identifiers (fixing a null dereference when scanning
for specific functions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 01:47:36 +0000 (01:47 +0000)]
CIndex: Kill off CXSourceLocationPtr, and AtEnd arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96145
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 14 Feb 2010 01:47:29 +0000 (01:47 +0000)]
CIndex: Stop hiding magic end bit in CXSourceRange locations where clients can't
see it. Instead, translate the locations up-front when we create a
CXSourceRange.
- This is part of a move to make CXSourceRange a pure half-open range, which is
a more natural API for clients to deal with. More cleanups to follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96144
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 14 Feb 2010 01:03:10 +0000 (01:03 +0000)]
Improve the diagnostic given when referring to a tag type without a tag (in C)
or that's been hidden by a non-type (in C++).
The ideal C++ diagnostic here would note the hiding declaration, but this
is a good start.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 14 Feb 2010 00:44:19 +0000 (00:44 +0000)]
Build fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96140
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 14 Feb 2010 00:37:35 +0000 (00:37 +0000)]
Baby steps towards teaching FinalOverriders about virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96139
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 14 Feb 2010 00:22:59 +0000 (00:22 +0000)]
Don't try to layout construction vtables for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 14 Feb 2010 00:16:19 +0000 (00:16 +0000)]
Improve support for non-virtual 'this' pointer adjustments. With this, it should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 23:40:17 +0000 (23:40 +0000)]
Add basic support for simple non-virtual 'this' pointer adjustments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 23:17:31 +0000 (23:17 +0000)]
Add support for very simple non-virtual this adjustments in the FinalOverriders class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 22:39:18 +0000 (22:39 +0000)]
Cleanup; remove some duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 22:23:31 +0000 (22:23 +0000)]
Assert if we encounter this adjustments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96125
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 22:05:23 +0000 (22:05 +0000)]
Start laying out secondary vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96123
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 21:33:22 +0000 (21:33 +0000)]
Merge base offsets and dump them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96121
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 21:16:54 +0000 (21:16 +0000)]
Don't make return adjustments for pure virtual member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96120
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 21:07:32 +0000 (21:07 +0000)]
Handle virtual bases in return adjustment types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 20:41:15 +0000 (20:41 +0000)]
Handle virtual bases in ComputeBaseOffset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96117
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 13 Feb 2010 20:24:39 +0000 (20:24 +0000)]
Add newline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96116
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 20:11:51 +0000 (20:11 +0000)]
More work on covariant return types. We now handle non-virtual adjustments fine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 13 Feb 2010 19:18:26 +0000 (19:18 +0000)]
add support for t Fedora 12 (February 2010), patch by
Dyachenko Dmitry. Our system is "not so elegant" here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 13 Feb 2010 18:33:28 +0000 (18:33 +0000)]
cindex/Python: Fix cindex-{dump,includes} examples to just pass all args
directly to Index, instead of requiring the input file to be first. This makes
the examples behave more like 'clang'.
For example,
ddunbar@giles:tmp$ echo '#include <string>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c++ - | wc -l
114
ddunbar@giles:tmp$ echo '#include <stdio.h>' | python ~/llvm/tools/clang/bindings/python/examples/cindex/cindex-includes.py -- -x c - | wc -l
10
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 13 Feb 2010 18:33:18 +0000 (18:33 +0000)]
cindex/Python: Add TranslationUnit.get_includes, patch by Andrew Sutton!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 13 Feb 2010 18:33:03 +0000 (18:33 +0000)]
cindex/Python: Update for clang_getDiagnosticRange... API changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96105
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Sat, 13 Feb 2010 15:54:06 +0000 (15:54 +0000)]
Emit the 'alignstack' LLVM function attribute when we encounter a function
marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish
up the backend.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Feb 2010 10:42:55 +0000 (10:42 +0000)]
Fix think-o, attributes can't come *within* the type of the variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Feb 2010 10:38:52 +0000 (10:38 +0000)]
Silence unused variable warning in a build without assertions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Feb 2010 10:17:50 +0000 (10:17 +0000)]
Skip implicit instantiation of templated variables where a more recent
redeclaration provides an explicit instantiation or is invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Feb 2010 09:15:07 +0000 (09:15 +0000)]
Remove dead {include, semicolon, variable}.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 13 Feb 2010 09:11:28 +0000 (09:11 +0000)]
Use a different name for this iterator. MSVC and clang++ didn't like "I" in the same scope twice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 13 Feb 2010 07:23:01 +0000 (07:23 +0000)]
Silence a GCC warning about a possibly uninitialized variable. It's data flow
only flows so far it seems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 13 Feb 2010 06:05:33 +0000 (06:05 +0000)]
Fix a fiendinshly fun little type-canonicalization bug, where we were
rebuilding a typename type terminating in a template-id (with
dependent template name, naturally) as a TypenameType when, because
its context could be fully resolved, we should have been building it
as a QualifiedNameType. Fixes PR6268.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 13 Feb 2010 05:23:25 +0000 (05:23 +0000)]
Permit the use of typedefs of class template specializations in
qualified declarator-ids. This patch is actually due to Cornelius;
fixes PR6179.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96082
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 13 Feb 2010 03:50:24 +0000 (03:50 +0000)]
Raise the responsibility for passing -disable-llvm-verifier in NDEBUG builds
to the driver, and support it in CodeGenOptsToArgs(). Note that this changes
the default behavior of clang -cc1 to always run the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96077
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 13 Feb 2010 02:02:03 +0000 (02:02 +0000)]
More work on return type adjustments in the new vtable builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 13 Feb 2010 01:52:33 +0000 (01:52 +0000)]
Enhance RegionStore::InvalidateRegions() to correctly invalidate bindings
by scanning through the values of LazyCompoundVals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96067
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 13 Feb 2010 01:04:05 +0000 (01:04 +0000)]
Switch the standard DeclarationName comparator to be a tri-valued comparator.
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96062
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 13 Feb 2010 00:54:03 +0000 (00:54 +0000)]
Pull logic for visiting value bindings in InvalidateRegionsWorker into a separate method.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96060
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 13 Feb 2010 00:10:10 +0000 (00:10 +0000)]
Fix for PR6274: teach constant folding to evaluate __builtin_expect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 13 Feb 2010 00:03:21 +0000 (00:03 +0000)]
if-0 out printf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96052
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 12 Feb 2010 23:47:27 +0000 (23:47 +0000)]
Add an option to disable the LLVM verifier pass (which is still always
disabled in NDEBUG builds). The option applies only to -cc1 invocations and is:
-disable_llvm_verifier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Feb 2010 23:44:20 +0000 (23:44 +0000)]
Funnel changes to the ImportedDecls list in the ASTImporter through a
single Imported function, in preparation for fixing a serious design
flaw.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Feb 2010 23:31:14 +0000 (23:31 +0000)]
Fix bug I introduced with assinging a temporary to a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Feb 2010 22:54:40 +0000 (22:54 +0000)]
Make the following functions thread-safe but having them return an std::string that is reconstructed
every time they are called:
getClangRevision()
getClangFullRepositoryVersion()
getClangFullVersion()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Feb 2010 22:17:39 +0000 (22:17 +0000)]
Implement AST importing and merging for enumeration types and
enumerators, along with ImplicitCastExprs to make it work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96024
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 12 Feb 2010 21:53:14 +0000 (21:53 +0000)]
Complain if block-literal expression's parameter name is
missing (in c/objc mode). Fixes radar
7528255 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96017
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 12 Feb 2010 21:05:44 +0000 (21:05 +0000)]
(1) Correctly format external Javascript link.
(2) Reformat "annotations" topics list to use a collapsable tree.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96013
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 12 Feb 2010 21:02:28 +0000 (21:02 +0000)]
Don't error when setting a sub-structure variable via objc properties
in objective-c++ mode (do it for objective-c only).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96012
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Feb 2010 19:31:35 +0000 (19:31 +0000)]
fix a bug in SourceManager::getInstantiationLocSlowCase, where
we'd add an offset from the spelling location space to the
instantiation location, which doesn't make sense and would
lead up to the text diagnostics crashing when presented with
non-sensical locations.
This fixes rdar://
7597492 , a crash on 255.vortex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96004
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 12 Feb 2010 19:27:33 +0000 (19:27 +0000)]
Patch to fix a warning which exposed a bug in building
a qualified objective-c pointer type. Fixes radar
7638810 .
(Also removes a FIXME).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96003
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 12 Feb 2010 18:52:52 +0000 (18:52 +0000)]
restructure code a bit: there are two potential issues
worth asserting about in this code: 1) if the source range
is bogus (begin loc after end loc), and 2) if the client
is trying to highlight a range that is purely whitespace.
It is possible to just silently ignore #2, but it seems like
it is always a bug, so lets keep asserting on this condition,
but with a better assert message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95998
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 12 Feb 2010 18:14:46 +0000 (18:14 +0000)]
Fix a refacto that broke the clang-on-clang build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95994
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 12 Feb 2010 17:52:31 +0000 (17:52 +0000)]
Fixes a rewriter bug rewriting function decl.
with block-pointer-type as one or more of its
arguments. Fixes radar
7638400 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Feb 2010 17:40:34 +0000 (17:40 +0000)]
Improve representation of tag declarations first declared or defined
within the declarator of another declaration, from Enea Zaffanella!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 12 Feb 2010 17:37:14 +0000 (17:37 +0000)]
Start stubbing out more of the covariant thunk support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 12 Feb 2010 17:28:41 +0000 (17:28 +0000)]
Improve documentation for DependentTypeOfExprType, DependentDecltypeType. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95989
91177308 -0d34-0410-b5e6-
96231b3b80d8