summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* An inherited virtual (where "virtual" wasn't written explicitly) canDouglas Gregor2009-12-011-1/+1
| | | | | | be defined as pure. Fixes PR5656. llvm-svn: 90237
* Add ASTUnit::LoadFromCompilerInvocation, which does what it says.Daniel Dunbar2009-12-011-4/+95
| | | | | | | Also, add an -ast-from-source option to index-test which allows index-test to run on source files directly. llvm-svn: 90223
* Switch the clang-to-CIndex interface for code-completion to a binary format, ↵Douglas Gregor2009-12-013-337/+198
| | | | | | for a massive speedup llvm-svn: 90209
* Update for llvm intrinsics change.Eric Christopher2009-12-011-0/+7
| | | | llvm-svn: 90208
* Much work on try/catch statement. WIP.Mike Stump2009-12-011-69/+250
| | | | | | | | | | | | | | | | | Highlights include: Fix __cxa_begin_catch so it now returns a value. Added getUnwindResumeOrRethrowFn helper to build up calls to _Unwind_Resume_or_Rethrow. Broke out object copying code into CopyObject from EmitCXXThrowExpr. Built up another version of CopyObject that can copy from memory for use in the catch parameter code. RTTI generation for type matching for catch. Code to check for the type match for catch. Code to generate the catch parameter, WIP, need make sure references and pointers and copy ctors work. llvm-svn: 90205
* Eliminate warning in Release-Asserts mode. No functionality changeDouglas Gregor2009-12-011-0/+1
| | | | llvm-svn: 90204
* clang -cc1: Move CompilerInvocation deserialization into CompilerInvocation.cpp,Daniel Dunbar2009-12-012-672/+681
| | | | | | where it belongs. llvm-svn: 90198
* Allocate MultipleDC objects using the allocator associated withTed Kremenek2009-12-011-5/+5
| | | | | | | | | | ASTContext instead of malloc. Besides reducing malloc traffic, this also removes a source of memory leaks when using a BumpPtrAllocator for the allocator of ASTContext. There are still leaks when using MallocAllocator because Decl::Destroy() isn't fully finished. Fixes: <rdar://problem/7431556> llvm-svn: 90174
* Fix and test for a problem caught by the clang-on-clang buildbot: qualifiedJohn McCall2009-11-301-17/+24
| | | | | | IDs in dependent contexts are not dependent if the context names a namespace. llvm-svn: 90171
* Have ASTRecordLayout keep track of the key function, in preparation of ↵Anders Carlsson2009-11-306-68/+79
| | | | | | fixing a synthetic ctor/dtor bug. llvm-svn: 90168
* Remove all of Sema's explicit uses of OverloadedFunctionDecl except forJohn McCall2009-11-305-102/+0
| | | | | | those associated with TemplateNames. llvm-svn: 90162
* Eliminate the use of OverloadedFunctionDecl in member expressions.John McCall2009-11-3011-538/+853
| | | | | | | | Create a new UnresolvedMemberExpr for these lookups. Assorted hackery around qualified member expressions; this will all go away when we implement the correct (i.e. extremely delayed) implicit-member semantics. llvm-svn: 90161
* More support for virtual destructor calls.Fariborz Jahanian2009-11-301-15/+26
| | | | | | Fixes pr5619 llvm-svn: 90158
* When we're trying to define an implicit virtual destructor, make sure that ↵Anders Carlsson2009-11-302-8/+23
| | | | | | we have a valid delete operator. llvm-svn: 90156
* Add const to accessors that don't modify the object.Mike Stump2009-11-301-1/+1
| | | | llvm-svn: 90153
* Reflow comments and fix 80-col violation.Mike Stump2009-11-301-29/+27
| | | | llvm-svn: 90152
* Fix an assert.Anders Carlsson2009-11-301-2/+2
| | | | llvm-svn: 90149
* Fix a crash when ivar type is a __strong SEL. Fallout fromFariborz Jahanian2009-11-301-5/+5
| | | | | | recent change to make SEL a builtin type (fixes radar 7425510). llvm-svn: 90145
* Use StringRef in Attr constructors.Benjamin Kramer2009-11-302-14/+6
| | | | llvm-svn: 90140
* Eliminate another VISIBILITY_HIDDENDouglas Gregor2009-11-301-4/+1
| | | | llvm-svn: 90139
* Adapt to the DOTGraphTraits changes in LLVM.Tobias Grosser2009-11-304-6/+14
| | | | llvm-svn: 90137
* Add CodeGenOptions::{SoftFloat,FloatABI}, and update the all the (far too ↵Daniel Dunbar2009-11-304-4/+18
| | | | | | many) places to use this instead of using the backend -soft-float and -float-abi= options. llvm-svn: 90127
* clang -cc1: Fix initialization of PreprocessorOptions::TokenCache.Daniel Dunbar2009-11-301-1/+4
| | | | llvm-svn: 90126
* Add TextDiagnosticBuffer::FlushDiagnostics, for forwarding the buffered ↵Daniel Dunbar2009-11-301-0/+10
| | | | | | diagnostics to a different diagnostics engine. llvm-svn: 90125
* clang -cc1: Fix -include-pch now that the test code is in clang-cc.Daniel Dunbar2009-11-301-5/+3
| | | | llvm-svn: 90124
* clang -cc1: Initialize LangOptions::{Optimize,NoInline}Daniel Dunbar2009-11-301-2/+12
| | | | llvm-svn: 90123
* Always pass -fmessage-length using separate arguments.Daniel Dunbar2009-11-301-2/+2
| | | | llvm-svn: 90121
* clang -cc1: Initialize LangOptions::DollarIdents correctly.Daniel Dunbar2009-11-301-1/+1
| | | | llvm-svn: 90120
OpenPOWER on IntegriCloud