Граф коммитов

23971 Коммитов

Автор SHA1 Сообщение Дата
Argyrios Kyrtzidis 42f81e674b Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112006 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 00:32:19 +00:00
Argyrios Kyrtzidis cfe17e5c82 Use a smart pointer instead of delete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112005 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 00:32:14 +00:00
Argyrios Kyrtzidis ff75dfde6a Make sure CXXABI is destroyed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112004 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 00:32:08 +00:00
Fariborz Jahanian 95f1b86b73 No need to default synthesize property if implementation
has its own getter and setter methods declared.
Fixed 8349319 (nonfragile-abi2).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 00:31:58 +00:00
Devang Patel 0554e0e30d Fix 'for' loop variables' scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112002 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 00:28:56 +00:00
Douglas Gregor eb0d014591 Give a slight preference to functions returning "void" when we're
performing code completion at the statement level (rather than in an
arbitrary expression).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112001 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:58:17 +00:00
John McCall 124300e428 Preserve invalidity of typeof operands in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111999 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:41:43 +00:00
Douglas Gregor d43dd83a97 In code-completion contexts where both types and other values are
present, prefer values to types, since it's more common to compute
with values than it is to declare new entities or perform type
casts. So, tweak the ranking of types vs. other declarations and
constants accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111998 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:40:45 +00:00
John McCall c988fab986 Catch the case of trying to turn '&(X::a)' into a member pointer as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111997 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:26:21 +00:00
Ted Kremenek 28a7f258ae USRs for class extensions should "mangle" in the location of the extension. (<rdar://problem/8350262>)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111991 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:13:41 +00:00
Fariborz Jahanian 957355ebf6 Move the test for radar 8018252 to
SemaCXX/expressions.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111988 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:55:33 +00:00
John McCall fb97e75e62 When trying to resolve the address of an overloaded expression,
only form pointers-to-member if the expression has the appropriate
form.  This avoids assertions later on on invalid code, but also
allows us to properly resolve mixed-staticity overloads.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111987 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:52:39 +00:00
Sebastian Redl 4153a060f4 AST writer support for having specializations of templates from earlier in the chain. This ought to finish C++ chained PCH support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111986 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:50:24 +00:00
Sebastian Redl 6e50e00c2f AST reader support for having specializations of templates from earlier in the chain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:50:19 +00:00
Douglas Gregor ecbd4a84b9 Remove i386 macro check from expected output of preprocessor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:46:25 +00:00
Daniel Dunbar f7c16d903f Frontend: Add basic -H support.
- I didn't implement the GCC "multiple include guard" detection parts, because
   it doesn't seem useful or obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111983 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:44:13 +00:00
Dale Johannesen 545be51fdf Add some missing X86-specific asm constraint letters, and fix
some bugs in setting allowsRegister on the ones there.
8348447.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111980 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:33:12 +00:00
Chris Lattner 23637beead correct the -isystem option to not add the -isysroot path. Only the weird
-iwithsysroot flag should do that.  This fixes rdar://8345942


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:27:37 +00:00
Ted Kremenek 9325eaf08f Fix printf format string checking for '%lc' (which expects a wint_t or compatible argument). Fixes PR 7981.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:24:51 +00:00
Fariborz Jahanian 4020f8703a It is not error in c++ to take address of
register variable (c++03 7.1.1P3). radar 8108252.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:21:48 +00:00
Douglas Gregor f29c523308 Implement code completion for preprocessor expressions and in macro
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111976 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:20:20 +00:00
Daniel Dunbar db918646c0 tests: Use REQUIRES: instead of XFAIL: for crash recovery tests; running them on
Windows breaks things (because it pops up dialogs) since we don't have crash
recovery support there (yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:39:55 +00:00
Chris Lattner 9db9ad3f08 Implement -iwithsysroot, an apple extension which is a close cousin of -isystem.
Instead of implementing -isystem, I accidentally implemented this cousin.  Next
up is to implement -isystem right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111966 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:09:16 +00:00
Tom Care ef52bcb606 Improvements to IdempotentOperationChecker and its use of PseudoConstantAnalysis
- Added wasReferenced function to PseudoConstantAnalysis to determine if a variable was ever referenced in a function (outside of a self-assignment)
- BlockDeclRefExpr referenced variables are now explicitly added to the non-constant list
- Remove unnecessary ignore of implicit casts
- Generalized parameter self-assign detection to detect deliberate self-assigns of variables to avoid unused variable warnings
- Updated test cases with deliberate self-assignments
- Fixed bug with C++ references and pseudoconstants
- Added test case for C++ references and pseudoconstants

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111965 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:09:07 +00:00
John McCall 120d63cd44 Move some of SemaOverload's API to various places in Overload.h, and kill
some of it off completely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 20:38:10 +00:00
Douglas Gregor 1fbb447e9d Implement preprocessor code completion where a macro name is expected,
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 20:21:13 +00:00
Douglas Gregor f44e854ed1 Introduce basic code-completion support for preprocessor directives,
e.g., after a "#" we'll suggest #if, #ifdef, etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111943 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:08:16 +00:00
Fariborz Jahanian cdaa6a8fed Fix a bug in nonfragile-abi2 when attempting to diagnose
previous use of a synthesized 'ivar' with property of same name
declared as @dynamic. In this case, 'ivar' is in the
inherited class and no diagnostics should be issued.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111940 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:48:05 +00:00
Devang Patel ffc52e78a2 Fix enum size and align. Tested by setvar.exp in gdb testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:14:06 +00:00
Ted Kremenek 2fb11ebc36 Document '__clang_analyzer__'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111935 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:12:35 +00:00
Daniel Dunbar 19f1983c42 Debug Info: Put full Clang version into the debug info, to make it easier to
identify what version of the compiler was used to build something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111927 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 17:41:09 +00:00
John McCall aab0132698 Sema doesn't need these STL headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 17:40:45 +00:00
Daniel Dunbar ca0e0545c2 Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111921 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 16:47:49 +00:00
Douglas Gregor 83482d147a When providing completions for a function or method argument that
corresponds to a block pointer, provide the skeleton of a block
literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111918 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 16:15:59 +00:00
Douglas Gregor 713da40fb0 Teach InheritingConcreteTypeLoc to play nicely with dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111916 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 15:53:44 +00:00
Douglas Gregor 09a63c97b9 Parse all kinds of declarations as part of a linkage-specification,
from Francois Pichet! Fixes PR7754. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111912 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 14:14:45 +00:00
John McCall fbce0e1d58 It turns out that this template is only instantiated at one type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 09:05:15 +00:00
John McCall 5f1e0942a3 More header elimination. The goal of all this is to allow Parser to
#include Sema.h while keeping all the AST declarations opaque.  That may
not be reasonably attainable, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 08:50:51 +00:00
John McCall 7a1fad3825 Remove a header dependency from Sema.h at the cost of some type safety.
If someone wants to fix this some other way....



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111905 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 07:32:53 +00:00
John McCall 7cd088e519 Struggle mightily against header inclusion in Sema.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 07:21:54 +00:00
John McCall 60d7b3a319 OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 06:29:42 +00:00
John McCall 182f7093dd Fold ASTOwningResult back into ActionResult.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111902 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 06:09:16 +00:00
John McCall b3d8748e79 Abstract out passing around types and kill off ActionBase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 05:47:05 +00:00
Douglas Gregor 3a91abf311 Diagnose the presence of multiple initializations of static data
members, from Faisal Vali! Fixes PR6904.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111900 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 05:27:49 +00:00
Eli Friedman fb3bb31af0 PR7971: Compute the correct type for an address-of expression containing an
UnresolvedMemberExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111899 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 05:23:20 +00:00
Douglas Gregor 4497dd49f7 State explicitly that we are intentionally not providing macro completions for declarator name completions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111898 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 04:59:56 +00:00
Zhongxing Xu 3bf185b7e6 Improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111897 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 04:26:55 +00:00
Douglas Gregor 72db108011 Consistently switch on PCC_Type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111888 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 01:11:00 +00:00
Douglas Gregor d32b0225e2 Provide code completion results for the context-sensitive Objective-C
keywords "in", "out", "inout", "byref", "bycopy", and "oneway".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 01:06:58 +00:00
Sebastian Redl 5967d6228f Add testcase for C++ chained PCH and fix the bugs it uncovered in name lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111882 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 00:50:16 +00:00