summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a cleanup scope for each catch clause.Mike Stump2009-12-021-15/+19
| | | | llvm-svn: 90357
* Add missing branch to exit. Seemingly obvious when I look at theMike Stump2009-12-021-0/+3
| | | | | | code, but to track this down was laborious. llvm-svn: 90356
* Improve source location information for C++ member initializers in aDouglas Gregor2009-12-025-65/+137
| | | | | | | constructor, by keeping the DeclaratorInfo* rather than just the type and a single location. llvm-svn: 90355
* ASTUnit: Explicitly track whether the ASTUnit came from an actual AST or not.Daniel Dunbar2009-12-021-4/+7
| | | | llvm-svn: 90349
* ASTUnit: Fix initialization of OnlyLocalDecls variable, and honor ↵Daniel Dunbar2009-12-021-4/+4
| | | | | | UseBumpAllocator. llvm-svn: 90348
* Fix for PR5522 and PR5666: fix a bunch of mangling issues with extern variablesEli Friedman2009-12-021-11/+25
| | | | | | and funcctions declared locally within a function. llvm-svn: 90344
* Use a more rigorous definition of 'class member'. I don't have any evidenceJohn McCall2009-12-021-7/+19
| | | | | | that this was causing a problem, but it could have. llvm-svn: 90343
* Recognize that EnumConstantDecls can be found by lookup and are not instanceJohn McCall2009-12-021-0/+3
| | | | | | members. Fixes PR5667. llvm-svn: 90341
* Pull the terminate handler up so that we can use it for the catchMike Stump2009-12-021-35/+31
| | | | | | | parameter setup code and set up the catch parameter setup code to protect that code with terminate. llvm-svn: 90340
* Turn off for now.Mike Stump2009-12-021-2/+2
| | | | llvm-svn: 90339
* Put the Builder classes into the anonymous namespace.Mike Stump2009-12-022-1/+4
| | | | llvm-svn: 90335
* Change rtti/Rtti to RTTI, as it is an acronym.Mike Stump2009-12-028-41/+42
| | | | llvm-svn: 90334
* Rename CGRtti.cpp to CGRTTI.cpp.Mike Stump2009-12-022-1/+1
| | | | llvm-svn: 90331
* Avoid warning for getTerminateFn defined but not used.Mike Stump2009-12-021-9/+3
| | | | llvm-svn: 90330
* Extend -remap-file=from;to to permit mapping from a non-existentDouglas Gregor2009-12-022-26/+78
| | | | | | | | | | | | file. This is accomplished by introducing the notion of a "virtual" file into the file manager, which provides a FileEntry* for a named file whose size and modification time are known but which may not exist on disk. Added a cute little test that remaps both a .c file and a .h file it includes to alternative files. llvm-svn: 90329
* In Sema, whenever we think that a function is going to cause a vtable to be ↵Anders Carlsson2009-12-026-17/+54
| | | | | | generated, we mark any virtual implicit member functions as referenced. llvm-svn: 90327
* Move file-remapping logic into InitPreprocesor. No functionality changeDouglas Gregor2009-12-022-39/+53
| | | | llvm-svn: 90322
* r90313, in which OverloadedFunctionDecl is removed and never spoken of again.John McCall2009-12-027-100/+26
| | | | llvm-svn: 90313
* Fix ASTUnit::getOriginalSourceFileName() when using ASTUnit's derived fromDaniel Dunbar2009-12-021-1/+6
| | | | | | source files. llvm-svn: 90311
* ASTUnit: Don't create an LLVMContext, it shouldn't be needed.Daniel Dunbar2009-12-021-2/+1
| | | | llvm-svn: 90310
* Rip out the last remaining implicit use of OverloadedFunctionDecl in Sema:John McCall2009-12-029-76/+19
| | | | | | | LookupResult::getAsSingleDecl() is no more. Shift Sema::LookupSingleName to return null on overloaded results. llvm-svn: 90309
* terminate doesn't throw.Mike Stump2009-12-021-0/+1
| | | | llvm-svn: 90308
* Introduce a new clang-cc option Douglas Gregor2009-12-021-0/+39
| | | | | | | | | | | | | | | | | | -remap-file=from;to which takes the file "from" and transparently replaces its contents with the contents of the file "to" from the source manager's perspective. This is the moral equivalent of cp from saved cp to from <call clang> cp saved from rm saved without all of the pesky file copying. llvm-svn: 90307
* Push overloaded function templates through the parser using a totally differentJohn McCall2009-12-025-102/+58
| | | | | | | leaked data structure than before. This kills off the last remaining explicit uses of OverloadedFunctionDecl in Sema. llvm-svn: 90306
* More exception handling improvements... WIP.Mike Stump2009-12-023-47/+112
| | | | | | | | | | | Highlights include: Add a helper to generate __cxa_free_exception and _ZSt9terminatev. Add a region to handle EH object deallocation for ctor failures for throw. Add a terminate handler for __cxa_end_catch. A framework for adding cleanup actions for the exceptional edges only. llvm-svn: 90305
* Fix another "operator delete missing" crash: make sure we don't checkEli Friedman2009-12-021-2/+6
| | | | | | | isVirtual() before we've actually calculated whether the destructor is virtual. llvm-svn: 90303
* Make sure to call AddOverriddenMethods for implicit copy assignment operators;Eli Friedman2009-12-021-0/+1
| | | | | | it's rare, but possible, for the difference to be significant. llvm-svn: 90301
* Extend the source manager with the ability to override the contents ofDouglas Gregor2009-12-024-102/+97
| | | | | | | | | | files with the contents of an arbitrary memory buffer. Use this new functionality to drastically clean up the way in which we handle file truncation for code-completion: all of the truncation/completion logic is now encapsulated in the preprocessor where it belongs (<rdar://problem/7434737>). llvm-svn: 90300
* Hard bifurcate the state into nil receiver and non-nil receiver, so thatZhongxing Xu2009-12-023-83/+73
| | | | | | | | | | | we don't need to use the DoneEvaluation hack when check for ObjCMessageExpr. PreVisitObjCMessageExpr() only checks for undefined receiver or arguments. Add checker interface EvalNilReceiver(). This is a 'once-and-done' interface. llvm-svn: 90296
* Eliminate the unnecessary FirstFID cache variable from the source manager's ↵Douglas Gregor2009-12-021-6/+27
| | | | | | ContentCache llvm-svn: 90294
* Stop trying to analyze class-hierarchies for dependently-scoped id-expressions;John McCall2009-12-023-125/+34
| | | | | | | | | | | | | there's nothing interesting we can say now that we're correctly not requiring the qualifier to name a known base class in dependent contexts. Require scope specifiers on member access expressions to name complete types if they're not dependent; delay lookup when they are dependent. Use more appropriate diagnostics when qualified implicit member access expressions find declarations from unrelated classes. llvm-svn: 90289
* Add ASTUnit::LoadFromCommandLine, which creates an ASTUnit out of a list ofDaniel Dunbar2009-12-021-0/+55
| | | | | | | | | | | | | | (clang/driver) command line arguments (including the source file). - The arguments are expected to include the source file. - The idea is that even though this is a somewhat odd API, its the form which many tools can most easily use (for example, by interposing with the compiler). Also, switch index-test's -ast-from-source to use this entry point, and provide a -arg command line argument which can be used to test that the command line arguments are handled correctly. llvm-svn: 90288
* Driver: Add Command::Creator member variable, which tracks the tool that wasDaniel Dunbar2009-12-022-20/+21
| | | | | | used to create a particular command. llvm-svn: 90287
* Added an assert.Fariborz Jahanian2009-12-011-1/+4
| | | | llvm-svn: 90285
* Fix a code gen. crash synthesizing a destructor.Fariborz Jahanian2009-12-013-5/+10
| | | | | | Fixes pr5660. llvm-svn: 90283
* In SourceManager::isBeforeInTranslationUnit, if we are trying to compare two ↵Daniel Dunbar2009-12-011-24/+14
| | | | | | | | | | source locations with no common ancestor in the include stack, determine order by assuming memory buffers preceed files, and then that FileIDs are created in order. The later assumption is patently false, but this was already broken -- this situation is conceptually impossible, my feeling is we should fix SourceManager and friends to make it impossible in practice as well. However, we need to fix PR5662 and perhaps some other things involving memory buffers first. In the short term I'm pretty sure this is reliable. Chris, Argiris, is this going to break anything that wasn't already broken? llvm-svn: 90280
* pass the reason for failure up from MemoryBuffer and report itChris Lattner2009-12-013-6/+9
| | | | | | | | | | | | in diagnostics when we fail to open a file. This allows us to report things like: $ clang test.c -I. test.c:2:10: fatal error: error opening file './foo.h': Permission denied #include "foo.h" ^ llvm-svn: 90276
* Make EmitStoreOfScalar generate a more sane representation of boolean stores.Eli Friedman2009-12-011-6/+1
| | | | | | "Fixes" PR5645. llvm-svn: 90272
* Fix IsProvablyNotDerivedFrom to always use record definitions when available.John McCall2009-12-011-5/+5
| | | | | | Gets clang-on-clang passing again. llvm-svn: 90270
* Provide the correct vector size for referenced variables.Ted Kremenek2009-12-011-1/+1
| | | | llvm-svn: 90267
* Rework how we support C++ implicit member accesses. If we can resolve anJohn McCall2009-12-018-273/+549
| | | | | | | | | | | | | | | implicit member access to a specific declaration, go ahead and create it as a DeclRefExpr or a MemberExpr (with implicit CXXThisExpr base) as appropriate. Otherwise, create an UnresolvedMemberExpr or DependentScopeMemberExpr with a null base expression. By representing implicit accesses directly in the AST, we get the ability to correctly delay the decision about whether it's actually an instance member access or not until resolution is complete. This permits us to correctly avoid diagnosing the 'problem' of 'MyType::foo()' where the relationship to the type isn't really known until instantiation. llvm-svn: 90266
* ASTUnit: Make sure to preserve the TargetInfo for later use.Daniel Dunbar2009-12-011-2/+3
| | | | llvm-svn: 90263
* Add {ExternalSemaSource,SemaConsumer}::ForgetSema callback, and update PCHReaderDaniel Dunbar2009-12-011-1/+8
| | | | | | to use it so it at least won't try to access Sema once it is gone. llvm-svn: 90261
* Exit the command line into <built-in> instead of going directly from the ↵Rafael Espindola2009-12-011-0/+5
| | | | | | | | command line to the input file. We passed <built-in> on the way in, so we should pass it again on the way out. llvm-svn: 90250
* (objc2 nonfragile-abi specific). If the translation unit includes an ↵Fariborz Jahanian2009-12-011-11/+10
| | | | | | | | | implementation of a subclass (direct or indirect) of a weak_import root class, emit a weak reference for the root class's metaclass (should complete radar 6815425). llvm-svn: 90249
* Fix early-return logic in scanReachableSymbols() to match the rest of the ↵Ted Kremenek2009-12-011-6/+6
| | | | | | recursive logic in the methods of ScanReachableSymbols. llvm-svn: 90245
* Convert Diagnostic::getCustomDiagID to take a StringRef.Daniel Dunbar2009-12-011-2/+2
| | | | llvm-svn: 90244
* Funtion templates and function template specializations do notDouglas Gregor2009-12-012-4/+5
| | | | | | | override virtual functions. Also, eliminate a (now redundant) call to AddOverriddenMethods. llvm-svn: 90242
* Move the checking of overridden virtual functions into the code pathDouglas Gregor2009-12-014-20/+33
| | | | | | | | | | | | | | | common to both parsing and template instantiation, so that we'll find overridden virtuals for member functions of class templates when they are instantiated. Additionally, factor out the checking for pure virtual functions, so that it will be executed both at parsing time and at template instantiation time. These changes fix PR5656 (for real), although one more tweak w.r.t. member function templates will be coming along shortly. llvm-svn: 90241
* Don't automatically assume that an id-expression refers to aDouglas Gregor2009-12-012-6/+22
| | | | | | | | | | ValueDecl, because that isn't always the case in ill-formed code. Diagnose a common mistake (forgetting to provide a template argument list for a class template, PR5655) and dyn_cast so that we handle the general problem of referring to a non-value declaration gracefully. llvm-svn: 90239
OpenPOWER on IntegriCloud