Commit Graph

24905 Commits

Author SHA1 Message Date
Sebastian Redl 539c506152 Rename pch namespace to serialization.
llvm-svn: 111478
2010-08-18 23:57:32 +00:00
Sebastian Redl 47c369f4ed Rename PCHBitCodes.h -> ASTBitCodes.h
llvm-svn: 111476
2010-08-18 23:57:26 +00:00
Sebastian Redl f164204baa Rename stuff in PCHBitCodes.h
llvm-svn: 111475
2010-08-18 23:57:22 +00:00
Sebastian Redl f5b1346738 Rename the ASTReader header files.
llvm-svn: 111474
2010-08-18 23:57:17 +00:00
Sebastian Redl 3b3c874f68 Rename the ASTReader implementation files.
llvm-svn: 111473
2010-08-18 23:57:11 +00:00
Sebastian Redl d44cd6adba More PCH -> AST renaming.
llvm-svn: 111472
2010-08-18 23:57:06 +00:00
Sebastian Redl 3e31c72497 Rename various classes from PCH to AST.
llvm-svn: 111471
2010-08-18 23:56:56 +00:00
Sebastian Redl 70c751de76 Rename PCHStmtReader -> ASTStmtReader.
llvm-svn: 111470
2010-08-18 23:56:52 +00:00
Sebastian Redl b3298c3bb6 Rename PCHDeclReader -> ASTDeclReader.
llvm-svn: 111469
2010-08-18 23:56:48 +00:00
Sebastian Redl 2c499f6561 Rename PCHReader to ASTReader.
llvm-svn: 111467
2010-08-18 23:56:43 +00:00
Sebastian Redl 1914c6fef8 Rename PCHWriter.h to ASTWriter.h
llvm-svn: 111466
2010-08-18 23:56:37 +00:00
Sebastian Redl d6522cfc6d Rename the ASTWriter implementation files
llvm-svn: 111465
2010-08-18 23:56:31 +00:00
Sebastian Redl 42a0f6a7f2 Do the PCH->AST rename for ASTWriter's implementation parts.
llvm-svn: 111464
2010-08-18 23:56:27 +00:00
Sebastian Redl 55c0ad5772 Rename PCHWriter to ASTWriter
llvm-svn: 111463
2010-08-18 23:56:21 +00:00
Douglas Gregor 4c6ed904bf 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.

llvm-svn: 111457
2010-08-18 23:38:21 +00:00
Alexis Hunt dcfba7b35b 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.

llvm-svn: 111455
2010-08-18 23:23:40 +00:00
Daniel Dunbar 79acdd9402 libclang: Put clang_reparseTranslationUnit inside a crash recovery context.
llvm-svn: 111451
2010-08-18 23:09:31 +00:00
Daniel Dunbar 211a787eaf CrashRecovery: Add #pragma clang __debug handle_crash, useful when debugging
CrashRecovery since it avoids sending a signal which may be intercepted by the
debugger.

llvm-svn: 111449
2010-08-18 23:09:23 +00:00
Daniel Dunbar ec29d712d4 c-index-test: Change -test-load-source-repase to only use remapped files for the
reparse, to allow testing distinct inputs.

llvm-svn: 111448
2010-08-18 23:09:16 +00:00
Douglas Gregor f0708dee83 Fix crasher with IgnoringDiagClient
llvm-svn: 111447
2010-08-18 23:03:13 +00:00
Douglas Gregor 2dd19f1d5f Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.

llvm-svn: 111437
2010-08-18 22:29:43 +00:00
Douglas Gregor fb640869ed There is no pointer conversion between to similar types (i.e., same
type ignoring cv-qualifiers). These are qualification
conversions. Fixes PR7934.

llvm-svn: 111428
2010-08-18 21:25:30 +00:00
Dan Gohman b37af7de47 Call llvm::remove_fatal_error_handler before deallocating objects
which are used by the error handling functions.

llvm-svn: 111427
2010-08-18 21:23:17 +00:00
Tom Care b9933f365e 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

llvm-svn: 111426
2010-08-18 21:17:24 +00:00
John McCall 78fbb61ed7 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.

llvm-svn: 111395
2010-08-18 19:18:59 +00:00
Daniel Dunbar 583c3b775e libclang: Put clang_parseTranslationUnit inside a crash recovery context.
llvm-svn: 111387
2010-08-18 18:43:17 +00:00
Daniel Dunbar c91f2fff98 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.
llvm-svn: 111386
2010-08-18 18:43:14 +00:00
Chris Lattner 396639db95 zap dead code.
llvm-svn: 111365
2010-08-18 16:09:06 +00:00
Chris Lattner 66b67d209e no need to pass bumppointer allocator into macroinfo::destroy
llvm-svn: 111364
2010-08-18 16:08:51 +00:00
Douglas Gregor c1a42fdd53 Make sure to add MallocAttr to explicitly-declared operator new/new[]
when -fassume-sane-operator-new. Patch by Tom Jablin!

llvm-svn: 111363
2010-08-18 15:06:25 +00:00
Douglas Gregor b13f5d99af Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!

llvm-svn: 111362
2010-08-18 14:24:02 +00:00
John McCall 8f42893aff Flesh out the test cases a little.
llvm-svn: 111359
2010-08-18 09:58:15 +00:00
John McCall 02db245d5e 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.

llvm-svn: 111357
2010-08-18 09:41:07 +00:00
Argyrios Kyrtzidis 6e617ea509 Remove -Wunused-member-function from the 'Extra' diagnostic group too; llvm uses it.
This effectively disables -Wunused-member-function for building llvm/clang.

llvm-svn: 111356
2010-08-18 08:32:33 +00:00
Chandler Carruth 33646fd72a Check whether errors should be included in the diagnostic counts. Previously,
only warnings did this check.

llvm-svn: 111355
2010-08-18 06:46:41 +00:00
Jordy Rose 8258499f42 Remove dead malloc symbols from the symbol-state map.
llvm-svn: 111353
2010-08-18 04:33:47 +00:00
Jordy Rose bc80329f1f Use RegionStateTy everywhere we mean ImmutableMap<SymbolRef, RefState>
llvm-svn: 111351
2010-08-18 04:26:59 +00:00
Chris Lattner 2a2a468d1a zap dead code.
llvm-svn: 111347
2010-08-18 02:45:56 +00:00
Chris Lattner e876fcd77a zap a big dead method.
llvm-svn: 111346
2010-08-18 02:44:19 +00:00
Douglas Gregor caa1bf434d 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>.

llvm-svn: 111338
2010-08-18 00:39:00 +00:00
Chris Lattner aa94cc3fcd fix typo
llvm-svn: 111334
2010-08-18 00:13:52 +00:00
Chris Lattner b1995dffaf Fix PR7889 by generalizing some over specialized code. There is no
reason that this should be limited to simple lvalues.

llvm-svn: 111331
2010-08-18 00:08:27 +00:00
Chris Lattner 00d5141aef fix PR7892, a crash on valid in c++ codegen of __PRETTY_FUNCTION__
llvm-svn: 111330
2010-08-17 23:58:10 +00:00
Ted Kremenek e890042c7b 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.
llvm-svn: 111329
2010-08-17 23:51:30 +00:00
Fariborz Jahanian 358acd5dff Get rid of extra nesting when checking for invalid type,
per Doug's comment.

llvm-svn: 111328
2010-08-17 23:50:37 +00:00
Ted Kremenek 5322150a7f Rewrite code fragment to avoide ICE in MSVC. Fixes PR 7875. Patch by Dimitry Andric!
llvm-svn: 111327
2010-08-17 23:29:06 +00:00
Fariborz Jahanian 9d7d3d84ac Diagnose if type of iboutletcollection attribute is a builtin type.
llvm-svn: 111324
2010-08-17 23:19:16 +00:00
Sebastian Redl dd0087154a Get rid of pretty non-ASCII quotes.
llvm-svn: 111316
2010-08-17 22:42:34 +00:00
Daniel Dunbar 56df97761d StringRef'ication of lots stuff, patch by Peter Davies!
llvm-svn: 111314
2010-08-17 22:39:59 +00:00
Daniel Dunbar f2cf329ccd Lex: Add #pragma clang __debug {llvm_fatal_error, llvm_unreachable}, for testing
those crash paths.

llvm-svn: 111311
2010-08-17 22:32:48 +00:00