]>
granicus.if.org Git - clang/log
Douglas Gregor [Thu, 19 Aug 2010 01:33:06 +0000 (01:33 +0000)]
Plug a leak when precompiling the preamble in ASTUnit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111504
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 19 Aug 2010 01:21:57 +0000 (01:21 +0000)]
Restore the build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111498
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 19 Aug 2010 01:19:08 +0000 (01:19 +0000)]
On second thought, don't warn about reinterpret_casts under -Wcast-align.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 19 Aug 2010 00:55:19 +0000 (00:55 +0000)]
Add a special RecordLayoutBuilder for the Microsoft C++ ABI.
All it does right now is add space for two vtable pointers instead of one
when a class has both virtual methods and virtual bases. This is a requirement
of the Microsoft ABI, since it has separate vtables for methods and bases. Other
stuff will come up over time, but we'll cross those bridges when we get to
them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Aug 2010 00:52:13 +0000 (00:52 +0000)]
Add warning for functions/blocks that have attribute 'noreturn' but return a non-void result. (<rdar://problem/
7562925 >)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 19 Aug 2010 00:51:58 +0000 (00:51 +0000)]
HandleCommonNoReturnAttr() now only has a single caller. Move that logic to HandleAnalyzerNoReturnAttr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Aug 2010 00:45:44 +0000 (00:45 +0000)]
Make sure to initialize ASTUnit::UnsafeToFree
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 19 Aug 2010 00:28:17 +0000 (00:28 +0000)]
Make sure to deallocate the identifier lookup tables and selector tables
when destroying an ASTReader. Plugs a leak that shows up in libclang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111488
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 19 Aug 2010 00:20:19 +0000 (00:20 +0000)]
When deducing the element type of an array, ignore qualifiers if
the context allows us to ignore qualifiers on the array type itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:57:32 +0000 (23:57 +0000)]
Rename pch namespace to serialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:57:26 +0000 (23:57 +0000)]
Rename PCHBitCodes.h -> ASTBitCodes.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:57:22 +0000 (23:57 +0000)]
Rename stuff in PCHBitCodes.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:57:17 +0000 (23:57 +0000)]
Rename the ASTReader header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:57:11 +0000 (23:57 +0000)]
Rename the ASTReader implementation files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:57:06 +0000 (23:57 +0000)]
More PCH -> AST renaming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:56 +0000 (23:56 +0000)]
Rename various classes from PCH to AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:52 +0000 (23:56 +0000)]
Rename PCHStmtReader -> ASTStmtReader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:48 +0000 (23:56 +0000)]
Rename PCHDeclReader -> ASTDeclReader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:43 +0000 (23:56 +0000)]
Rename PCHReader to ASTReader.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:37 +0000 (23:56 +0000)]
Rename PCHWriter.h to ASTWriter.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:31 +0000 (23:56 +0000)]
Rename the ASTWriter implementation files
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111465
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:27 +0000 (23:56 +0000)]
Do the PCH->AST rename for ASTWriter's implementation parts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111464
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Wed, 18 Aug 2010 23:56:21 +0000 (23:56 +0000)]
Rename PCHWriter to ASTWriter
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111463
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 23:38:21 +0000 (23:38 +0000)]
When creating an ASTUnit by parsing source code, set DisableFree to
false (not true), so that the CompilerInstance will actually free data
structures when it's done. This fixes a major leak with libclang's
in-process code completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111457
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Wed, 18 Aug 2010 23:23:40 +0000 (23:23 +0000)]
Generate Attr subclasses with TableGen.
Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.
Some other notes about newly-generated attribute classes:
- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td
- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).
Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Aug 2010 23:09:31 +0000 (23:09 +0000)]
libclang: Put clang_reparseTranslationUnit inside a crash recovery context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Aug 2010 23:09:23 +0000 (23:09 +0000)]
CrashRecovery: Add #pragma clang __debug handle_crash, useful when debugging
CrashRecovery since it avoids sending a signal which may be intercepted by the
debugger.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Aug 2010 23:09:16 +0000 (23:09 +0000)]
c-index-test: Change -test-load-source-repase to only use remapped files for the
reparse, to allow testing distinct inputs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 23:03:13 +0000 (23:03 +0000)]
Fix crasher with IgnoringDiagClient
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 22:29:43 +0000 (22:29 +0000)]
Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 18 Aug 2010 22:15:06 +0000 (22:15 +0000)]
Add/update a bunch of svn:ignore properties; get rid of empty folder
lib/Runtime.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 21:25:30 +0000 (21:25 +0000)]
There is no pointer conversion between to similar types (i.e., same
type ignoring cv-qualifiers). These are qualification
conversions. Fixes PR7934.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 18 Aug 2010 21:23:17 +0000 (21:23 +0000)]
Call llvm::remove_fatal_error_handler before deallocating objects
which are used by the error handling functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Wed, 18 Aug 2010 21:17:24 +0000 (21:17 +0000)]
Added psuedo-constant analysis and integrated it into the false positive reduction stage in IdempotentOperationChecker.
- Renamed IdempotentOperationChecker::isConstant to isConstantOrPseudoConstant to better reflect the function
- Changed IdempotentOperationChecker::PreVisitBinaryOperator to only run 'CanVary' once on undefined assumptions
- Created new PsuedoConstantAnalysis class and added it to AnalysisContext
- Changed IdempotentOperationChecker to exploit the new analysis
- Updated tests with psuedo-constants
- Added check to IdempotentOperationChecker to see if a Decl is const qualified
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111426
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 18 Aug 2010 19:18:59 +0000 (19:18 +0000)]
Contextual arity is a feature of mangling expressions; kill off
mangleCallExpression. Also, operator names with unknown arity should
be mangled as binary operators; this is actually covered by an oddly-
positioned sentence in the ABI document. Fixes PR7891.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Aug 2010 18:43:17 +0000 (18:43 +0000)]
libclang: Put clang_parseTranslationUnit inside a crash recovery context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111387
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 18 Aug 2010 18:43:14 +0000 (18:43 +0000)]
libclang: Implicitly enable crash recovery when using the libclang APIs. We may need to add an explicit API call, but hopefully we can make the crash recovery seamless enough that it doesn't make sense to turn it off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 16:09:06 +0000 (16:09 +0000)]
zap dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 16:08:51 +0000 (16:08 +0000)]
no need to pass bumppointer allocator into macroinfo::destroy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111364
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 15:06:25 +0000 (15:06 +0000)]
Make sure to add MallocAttr to explicitly-declared operator new/new[]
when -fassume-sane-operator-new. Patch by Tom Jablin!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111363
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 14:24:02 +0000 (14:24 +0000)]
Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111362
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 18 Aug 2010 09:58:15 +0000 (09:58 +0000)]
Flesh out the test cases a little.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111359
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 18 Aug 2010 09:41:07 +0000 (09:41 +0000)]
Rip out the existing retroactive abstract-class usage checker,
which in a fit of zeal wanted to walk the entire translation unit,
and replace it with a new checker that walks the types of declarations
nested within the class. Also, look into templates when doing this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 18 Aug 2010 08:32:33 +0000 (08:32 +0000)]
Remove -Wunused-member-function from the 'Extra' diagnostic group too; llvm uses it.
This effectively disables -Wunused-member-function for building llvm/clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 18 Aug 2010 06:46:41 +0000 (06:46 +0000)]
Check whether errors should be included in the diagnostic counts. Previously,
only warnings did this check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111355
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 18 Aug 2010 04:33:47 +0000 (04:33 +0000)]
Remove dead malloc symbols from the symbol-state map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Wed, 18 Aug 2010 04:26:59 +0000 (04:26 +0000)]
Use RegionStateTy everywhere we mean ImmutableMap<SymbolRef, RefState>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111351
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 02:45:56 +0000 (02:45 +0000)]
zap dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 02:44:19 +0000 (02:44 +0000)]
zap a big dead method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 18 Aug 2010 00:39:00 +0000 (00:39 +0000)]
Emit an error if an array is too large. We're slightly more strict
than GCC 4.2 here when building 32-bit (where GCC will allow
allocation of an array for which we can't get a valid past-the-end
pointer), and emulate its odd behavior in 64-bit where it only allows
63 bits worth of storage in the array. The former is a correctness
issue; the latter is harmless in practice (you wouldn't be able to use
such an array anyway) and helps us pass a GCC DejaGNU test.
Fixes <rdar://problem/
8212293 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 00:13:52 +0000 (00:13 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111334
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 18 Aug 2010 00:08:27 +0000 (00:08 +0000)]
Fix PR7889 by generalizing some over specialized code. There is no
reason that this should be limited to simple lvalues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 23:58:10 +0000 (23:58 +0000)]
fix PR7892, a crash on valid in c++ codegen of __PRETTY_FUNCTION__
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 23:51:30 +0000 (23:51 +0000)]
TypedRegion::isBoundable() should return true by default. Since there is no TypedViewRegion anyore, it is not possible that the subclass (which doesn't override isBoundable) could return a null value type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 23:50:37 +0000 (23:50 +0000)]
Get rid of extra nesting when checking for invalid type,
per Doug's comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 23:29:06 +0000 (23:29 +0000)]
Rewrite code fragment to avoide ICE in MSVC. Fixes PR 7875. Patch by Dimitry Andric!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 23:19:16 +0000 (23:19 +0000)]
Diagnose if type of iboutletcollection attribute is a builtin type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 22:42:34 +0000 (22:42 +0000)]
Get rid of pretty non-ASCII quotes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 22:39:59 +0000 (22:39 +0000)]
StringRef'ication of lots stuff, patch by Peter Davies!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 22:32:48 +0000 (22:32 +0000)]
Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing
those crash paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 22:32:45 +0000 (22:32 +0000)]
Driver: Claim the -mlinker-version synthesized argument, it shouldn't be
reported as unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111310
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 17 Aug 2010 22:06:44 +0000 (22:06 +0000)]
Rename -Wunused-method -> -Wunused-member-function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 22:05:33 +0000 (22:05 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111304
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 17 Aug 2010 21:51:21 +0000 (21:51 +0000)]
Whoops. Don't fall through into the overload case when mangling a
dependent call expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 17 Aug 2010 21:43:11 +0000 (21:43 +0000)]
Introduce -Wunused-method option for warning on unused class methods in anonymous namespace.
This option is not part of the Unused diagnostic group until the warnings on llvm codebase are fixed
and we are ready to turn it on. Suggestion by Daniel.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 21:39:27 +0000 (21:39 +0000)]
Diagnose use of iboutletcollection on ivar/property
of non-object types. Radar
8308053 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111296
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 17 Aug 2010 21:27:17 +0000 (21:27 +0000)]
Implicit decl ref expressions might not have name locations; don't silently
fail to instantiate them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111293
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 21:00:23 +0000 (21:00 +0000)]
Fix CMake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111284
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 21:00:06 +0000 (21:00 +0000)]
Fix horrible CFG bug caused by a series of NullStmts appearing at the beginning of a do...while loop. This would cause
the body of the DoStmt to be disconnected from the preceding code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111283
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 17 Aug 2010 20:59:56 +0000 (20:59 +0000)]
CFGBuilder: don't create the empty "loop back" block for DoStmts if the loop edge can never be taken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111282
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 20:43:28 +0000 (20:43 +0000)]
Reintroduce the serialization library, with fixed dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 17 Aug 2010 20:23:12 +0000 (20:23 +0000)]
Patch to add type parameter support for attribute iboutletcollection.
Radar
8308053 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111275
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 19:00:27 +0000 (19:00 +0000)]
Remove the last bit of the Clang Serialization library, for now
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 18:31:01 +0000 (18:31 +0000)]
Revert Sebastian's build-breaking patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 17 Aug 2010 18:07:30 +0000 (18:07 +0000)]
Add the clangSerialization library to libclang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111261
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 17:55:49 +0000 (17:55 +0000)]
Create a new Serialization module that contains all the PCH code, and will contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Tue, 17 Aug 2010 17:55:38 +0000 (17:55 +0000)]
Fix a typo in a diag name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 17 Aug 2010 17:34:48 +0000 (17:34 +0000)]
Remove a gratuitous lie.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 16:09:23 +0000 (16:09 +0000)]
A member function never has "C" linkage. Fixes <rdar://problem/
8318976 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111238
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 16:06:07 +0000 (16:06 +0000)]
When generating code completion patterns for method declarations, give
the resulting pattern the appropriate cursor kind of an instance or
class method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111237
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 16:02:32 +0000 (16:02 +0000)]
apparently msvc defines _STDCALL_SUPPORTED, so we should
too. Patch by Per Linden!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111236
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 16:00:12 +0000 (16:00 +0000)]
Add a slightly better hack for microsoft style inline asm,
patch by Per Linden!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 17 Aug 2010 15:55:45 +0000 (15:55 +0000)]
Implement #pragma push_macro, patch by Francois Pichet!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 15:53:35 +0000 (15:53 +0000)]
1 != I. Fix the formulation of code-completion patterns for
Objective-C method declarations with > 2 parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 17 Aug 2010 12:54:38 +0000 (12:54 +0000)]
Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 17 Aug 2010 07:23:57 +0000 (07:23 +0000)]
Don't try to initialize a reference with a constructed temporary if either
of the classes is invalid. A class is invalid if a base is invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111227
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 17 Aug 2010 00:40:40 +0000 (00:40 +0000)]
When the # of top-level declarations changes after reparsing a
translation unit, refresh code-completion results because they've
probably changed. However, enforce a cooldown period between
refreshes, to avoid thrashing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111218
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 17 Aug 2010 00:36:37 +0000 (00:36 +0000)]
Generate a node instead of a sink. A leak is not a fatal error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111217
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 16 Aug 2010 23:42:35 +0000 (23:42 +0000)]
A field of incomplete type is sufficiently disruptive that we should mark
the record invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 16 Aug 2010 23:27:44 +0000 (23:27 +0000)]
Move a bunch of code out of the ComplexExprEvaluator class definition;
no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 23:25:19 +0000 (23:25 +0000)]
Allow the "size" of a buffer access check to be either signed or unsigned. Fixes PR7925.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111205
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 23:08:34 +0000 (23:08 +0000)]
Move include to the proper place. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 23:05:20 +0000 (23:05 +0000)]
Implement support for cached code completions for
nested-name-specifiers. Also includes fixes to the generation of
nested-name-specifier result in the non-cached case; we were producing
lame results for namespaces and namespace aliases, which (1) didn't
always have nested-name-specifiers when we want them, and (2) did not
have the necessary "::" as part of the completion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111203
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 16 Aug 2010 21:51:12 +0000 (21:51 +0000)]
Diagnose assiging to an interface object in
non-fragile abi mode as sizes are not statically known.
Fixes radar
8315734 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111191
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tom Care [Mon, 16 Aug 2010 21:43:52 +0000 (21:43 +0000)]
Added basic psuedoconstant checking in IdempotentOperationChecker and fixed some test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111190
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 21:23:13 +0000 (21:23 +0000)]
Formatting fixes. No functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 21:18:39 +0000 (21:18 +0000)]
Implement name hiding of cached global code-completion results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 20:53:01 +0000 (20:53 +0000)]
Instead of using operator bool() for testing if a BindingKey is valid, use an explicit isValid() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordy Rose [Mon, 16 Aug 2010 20:34:06 +0000 (20:34 +0000)]
Move GRState::AssumeInBound out of its header file -- it's not really inline-friendly anymore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 16 Aug 2010 20:01:48 +0000 (20:01 +0000)]
Move some code out-of-line which has long since grown too large to be
inlined. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111176
91177308 -0d34-0410-b5e6-
96231b3b80d8