summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to theKen Dyck2009-12-181-1/+2
| | | | | | | new opaque value type, CharUnits. This will help us avoid accidentally mixing quantities that are in bit and character units. llvm-svn: 91689
* Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()Ken Dyck2009-12-181-1/+1
| | | | | | | and getTypeSizeInChars() to reflect their basis in character type units, not that of a possibly independent architecture-specific byte. llvm-svn: 91688
* Fix regression I introduced when dynamic_cast-ing to a reference type.Anders Carlsson2009-12-181-1/+1
| | | | llvm-svn: 91687
* It's perfectly fine to see UserDefinedConversion casts when emitting scalar ↵Anders Carlsson2009-12-181-1/+1
| | | | | | expressions. llvm-svn: 91686
* Tweaks for PS3 target.John Thompson2009-12-181-0/+3
| | | | llvm-svn: 91685
* Removing trailing directory separator, to make stat workJohn Thompson2009-12-181-0/+5
| | | | llvm-svn: 91684
* Set up the semantic context correctly when declaring a friend class template.John McCall2009-12-181-4/+5
| | | | llvm-svn: 91678
* Look through using decls when checking whether a name is an acceptableJohn McCall2009-12-181-1/+13
| | | | | | | | | | nested-name specifier name. I accidentally checked in the test case for this in the last commit --- fortunately, that refactor was inspired by having debugged this problem already, so I can fix the bug quick (though probably not fast enough for the buildbots). llvm-svn: 91677
* Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria intoJohn McCall2009-12-184-130/+107
| | | | | | | | | | | | | | | different functions and pick the function at lookup initialization time. In theory we could actually divide the criteria functions into N different functions for the N cases, but it's so not worth it. Among other things, lets us invoke LookupQualifiedName without recomputing IDNS info every time. Do some refactoring in SemaDecl to avoid an awkward special case in LQN that was only necessary for redeclaration testing for anonymous structs/unions --- which could be done more efficiently with a scoped lookup anyway. llvm-svn: 91676
* clang -cc1: Rename -mcpu to -target-cpu to match other target options and ↵Daniel Dunbar2009-12-182-4/+4
| | | | | | not alias driver/backend option. llvm-svn: 91671
* Address some of Anders commentsDouglas Gregor2009-12-181-4/+8
| | | | llvm-svn: 91670
* Switch the initialization required by return statements over to theDouglas Gregor2009-12-187-47/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | new InitializationSequence. This fixes some bugs (e.g., PR5808), changed some diagnostics, and caused more churn than expected. What's new: - InitializationSequence now has a "C conversion sequence" category and step kind, which falls back to - Changed the diagnostics for returns to always have the result type of the function first and the type of the expression second. CheckSingleAssignmentConstraints to peform checking in C. - Improved ASTs for initialization of return values. The ASTs now capture all of the temporaries we need to create, but intentionally do not bind the tempoary that is actually returned, so that it won't get destroyed twice. - Make sure to perform an (elidable!) copy of the class object that is returned from a class. - Fix copy elision in CodeGen to properly see through the subexpressions that occur with elidable copies. - Give "new" its own entity kind; as with return values and thrown objects, we don't bind the expression so we don't call a destructor for it. Note that, with this patch, I've broken returning move-only types in C++0x. We'll fix it later, when we tackle NRVO. llvm-svn: 91669
* Add -dwarf-debug-flags, which provides a way to embed the cc1 level options usedDaniel Dunbar2009-12-185-7/+30
| | | | | | | | to compile a translation unit into the debug info for that file. - Used by parts of Darwin build process to check compiler flags, etc. - <rdar://problem/7256886> clang does not emit AT_APPLE_flags llvm-svn: 91661
* Handle case when DestPtr is 0.Mike Stump2009-12-181-3/+22
| | | | llvm-svn: 91658
* Implemented rewriting of invocation of a block ivar.Fariborz Jahanian2009-12-181-0/+2
| | | | | | | (radar 7482224). llvm-svn: 91652
* Patch over yet more problems with friend declarations which were provokingJohn McCall2009-12-173-25/+35
| | | | | | | problems on LLVM-Code-Syntax. This proved remarkably easy to "fix" once I settled on how I was going to approach it. llvm-svn: 91633
* Revert r91073.Mike Stump2009-12-171-5/+0
| | | | llvm-svn: 91629
* Tweak formatting and comments.Ted Kremenek2009-12-171-6/+4
| | | | llvm-svn: 91615
* Convert GRExprEngine::VisitCallExpr() to use a worklist instead of recursion ↵Ted Kremenek2009-12-171-45/+64
| | | | | | to evaluate the arguments of a CallExpr. This simplifies the logic and makes it easier to read. (it also avoids any issues with blowing out the stack if the CallExpr had a ridiculous number of arguments) llvm-svn: 91613
* Reduce nesting by using early exits. No functionality change.Ted Kremenek2009-12-171-35/+46
| | | | llvm-svn: 91610
* implement PR3962: diagnose more faulty cases of usage of the restrict ↵Nuno Lopes2009-12-171-1/+9
| | | | | | qualifier. this also removes a FIXME llvm-svn: 91601
* revert part of my last patch, and mark only the c++ global new operator as ↵Nuno Lopes2009-12-171-5/+0
| | | | | | noalias. the rest will be infered by llvm optz llvm-svn: 91600
* Sort switch statement. No functionality change.Ted Kremenek2009-12-171-15/+15
| | | | llvm-svn: 91591
* Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that ↵Anders Carlsson2009-12-175-81/+69
| | | | | | takes a CXXRecordDecl since we were just creating a QualType from it anyway. llvm-svn: 91590
* Ensure we run cleanups for CXXTemporaries on the exceptional edge. WIP.Mike Stump2009-12-172-1/+48
| | | | llvm-svn: 91588
* reimplement r90860, fixing a couple of problems:Chris Lattner2009-12-171-9/+21
| | | | | | | | | 1. Don't make a copy of LangOptions every time a lexer is created. 2. Don't make CharInfo global mutable state. 3. Fix the implementation to properly treat ^Z as EOF instead of as horizontal whitespace, which matches the semantic implemented by VC++. llvm-svn: 91586
* Simplify RTTIBuilder::finish.Anders Carlsson2009-12-171-11/+9
| | | | llvm-svn: 91585
* Move the Info vector into the RTTIBuilder struct. No functionality change.Anders Carlsson2009-12-171-18/+19
| | | | llvm-svn: 91583
* Fix check in GRExprEngine for the 'main' function to handle NULL ↵Ted Kremenek2009-12-171-16/+17
| | | | | | IdentifierInfo*'s. llvm-svn: 91577
* Diagnose duplicate declaration of a property. FixesFariborz Jahanian2009-12-171-1/+8
| | | | | | PR5809 llvm-svn: 91575
* Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.Eli Friedman2009-12-171-0/+3
| | | | llvm-svn: 91573
* Completely remove ObjCObjectRegion (tests pass this time).Ted Kremenek2009-12-164-20/+9
| | | | llvm-svn: 91572
* Allow pointer convesion of an objective-c pointer toFariborz Jahanian2009-12-161-2/+28
| | | | | | 'void *' to mimic gcc's behavior. (fixes radar 7477351). llvm-svn: 91570
* Make sure C-specific enum warning doesn't trigger in C++.Eli Friedman2009-12-161-1/+1
| | | | llvm-svn: 91563
* Fix -fdollars-in-identifiers Clang translation.Daniel Dunbar2009-12-162-7/+6
| | | | llvm-svn: 91562
* Correctly calcluate abstract-ness in the case where an implicitly declaredEli Friedman2009-12-161-3/+6
| | | | | | method overrides a pure virtual method. llvm-svn: 91558
* Temporarily revert 91553.Ted Kremenek2009-12-161-5/+9
| | | | llvm-svn: 91557
* Remove use of ObjCObjectRegion from BasicStoreManager.Ted Kremenek2009-12-161-9/+5
| | | | llvm-svn: 91553
* When value-initializing a class with no user-defined constructors butDouglas Gregor2009-12-168-29/+69
| | | | | | | with a non-trivial default constructor, zero-initialize the storage and then call the default constructor. Fixes PR5800. llvm-svn: 91548
* Diagnose property of reference type as unsupportedFariborz Jahanian2009-12-161-0/+4
| | | | | | instead of crashing for now. llvm-svn: 91546
* Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.Anders Carlsson2009-12-162-0/+21
| | | | llvm-svn: 91545
* implement PR5654: add -fassume-sane-operator-new, which is enabled by ↵Nuno Lopes2009-12-165-4/+23
| | | | | | | | default, and adds the malloc attribute to the global function new() and to the overloaded new operators. feel free to chage the name to this lengthy argument llvm-svn: 91543
* In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an ↵Douglas Gregor2009-12-161-5/+11
| | | | | | InitializationSequence llvm-svn: 91542
* fix PR5689: add support for 'o' and 'V' asm input operandsNuno Lopes2009-12-161-0/+2
| | | | llvm-svn: 91540
* fix buildNuno Lopes2009-12-161-1/+1
| | | | llvm-svn: 91539
* Shift things around so that it's easier to recover from a missingJohn McCall2009-12-164-262/+182
| | | | | | | | | function in a C++ call using an arbitrary call-expression type. Actually exploit this to fix the recovery implemented earlier. The diagnostic is still iffy, though. llvm-svn: 91538
* Add a new kind of region: CXXObjectRegion. Currently it has only one Zhongxing Xu2009-12-164-15/+54
| | | | | | | | attribute: the object type. Add initial support for visiting CXXThisExpr. Fix a bunch of 80-col violations. llvm-svn: 91535
* Introduce a centralized routine in Sema for diagnosing failed lookups (whenJohn McCall2009-12-163-12/+118
| | | | | | | | | used as expressions). In dependent contexts, try to recover by doing a lookup in previously-dependent base classes. We get better diagnostics out, but unfortunately the recovery fails: we need to turn it into a method call expression, not a bare call expression. Thus this is still a WIP. llvm-svn: 91525
* Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. ↵Anders Carlsson2009-12-164-38/+8
| | | | | | With this change, we can now compile and link TableGen. llvm-svn: 91520
* Handle ImplicitValueInitExpr in AggExprEmitter.Anders Carlsson2009-12-161-2/+8
| | | | llvm-svn: 91519
OpenPOWER on IntegriCloud