- Oct 27, 2008
-
-
Daniel Dunbar authored
llvm-svn: 58281
-
Douglas Gregor authored
- CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. llvm-svn: 58264
-
Steve Naroff authored
This simplifies debug of this particular diagnostic (and removes some code clutter). llvm-svn: 58242
-
rdar://problem/6315646Steve Naroff authored
Fix <rdar://problem/6315646> clang on xcode: error: invalid operands to binary expression ('id<NSTableViewDelegate>' and 'XCExtendedArrayController *'). There is still a bug here (as the FIXME in the test case indicates). Prior to this patch, the bug would generate an error. Now, we simply do nothing (which is less harmful until we can get it right). The complete bug fix will require changing ASTContext::mergeTypes(), which I'd like to defer for now. llvm-svn: 58241
-
Chris Lattner authored
llvm-svn: 58218
-
Chris Lattner authored
support as far as I know. llvm-svn: 58217
-
- Oct 26, 2008
-
-
Argyrios Kyrtzidis authored
Don't give a default argument to ASTContext::getFunctionType for the TypeQuals parameter, it causes subtle bugs where TypeQuals, while necessary, are omitted from the call. -Remove the default argument. -Update all call sites of ASTContext::getFunctionType. llvm-svn: 58187
-
Oscar Fuentes authored
must be under the `tools' subdirectory of the LLVM *source* tree. llvm-svn: 58180
-
- Oct 24, 2008
-
-
Argyrios Kyrtzidis authored
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier. llvm-svn: 58120
-
Douglas Gregor authored
llvm-svn: 58100
-
Douglas Gregor authored
llvm-svn: 58096
-
Douglas Gregor authored
llvm-svn: 58094
-
Douglas Gregor authored
conversions. Added PerformImplicitConversion, which follows an implicit conversion sequence computed by TryCopyInitialization and actually performs the implicit conversions, including the extra check for ambiguity mentioned above. llvm-svn: 58071
-
Daniel Dunbar authored
created with LHS and RHS whose types didn't match. llvm-svn: 58049
-
- Oct 23, 2008
-
-
Douglas Gregor authored
llvm-svn: 58040
-
Douglas Gregor authored
pointer-to-base. Also, add overload ranking for pointer conversions (for both pointer-to-void and derived-to-base pointer conversions). Note that we do not yet diagnose derived-to-base pointer conversion errors that stem from ambiguous or inacessible base classes. These aren't handled during overload resolution; rather, when the conversion is actually used we go ahead and diagnose the error. llvm-svn: 58017
-
Argyrios Kyrtzidis authored
Restrict creation of OverloadedFunctionDecl only to C++ (it was getting used for invalid redeclarations on C). llvm-svn: 58008
-
rdar://problem/6311947Steve Naroff authored
Fix <rdar://problem/6311947> clang on xcode (regression): error: use of undeclared identifier 'expandedValue'. Mea culpa: I introduced this regresson in the following 2 commits: r57529 (10/14), r57841 (10/20). llvm-svn: 58007
-
- Oct 22, 2008
-
-
Douglas Gregor authored
Factored the QualTypeOrdering predicate into its own header (TypeOrdering.h), now that it is used in two places. llvm-svn: 58001
-
Argyrios Kyrtzidis authored
Now that DeclRefExpr accepts a NamedDecl, use a DeclRefExpr for when a CXXFieldDecl is referenced inside a method. llvm-svn: 58000
-
rdar://problem/6257675Steve Naroff authored
Fix <rdar://problem/6257675> error: member reference base type ('NSUserDefaults *') is not a structure or union. Teach Sema::ActOnMemberReferenceExpr() to look through local category implementations associated with the class. llvm-svn: 57995
-
Douglas Gregor authored
don't have duplicated direct base classes. Seriliazation of base class specifiers is not yet implemented. llvm-svn: 57991
-
Douglas Gregor authored
aren't trying to compare with address-space qualifiers (for now). Clean up handing of DeclRefExprs in Expr::isLvalue and refactor part of the check into a static DeclCanBeLvalue. llvm-svn: 57980
-
Douglas Gregor authored
conversions (e.g., comparing int* -> const int* against int* -> const volatile int*); see C++ 13.3.3.2p3 bullet 3. Add Sema::UnwrapSimilarPointerTypes to simplify the control flow of IsQualificationConversion and CompareQualificationConversion (and fix the handling of the int* -> volatile int* conversion in the former). llvm-svn: 57978
-
Douglas Gregor authored
llvm-svn: 57951
-
Douglas Gregor authored
Fix a thinko in the qualification-conversion check when the qualificaitons are disjoint, and add some overloading-based tests of qualification conversions llvm-svn: 57942
-
Douglas Gregor authored
Changes: - Sema::IsQualificationConversion determines whether we have a qualification conversion. - Sema::CheckSingleAssignment constraints now follows the C++ rules in C++, performing an implicit conversion from the right-hand side to the type of the left-hand side rather than checking based on the C notion of "compatibility". We now rely on the implicit-conversion code to determine whether the conversion can happen or not. Sema::TryCopyInitialization has an ugly reference-related hack to cope with the initialization of references, for now. - When building DeclRefExprs, strip away the reference type, since there are no expressions whose type is a reference. We'll need to do this throughout Sema. - Expr::isLvalue now permits functions to be lvalues in C++ (but not in C). llvm-svn: 57935
-
- Oct 21, 2008
-
-
Daniel Dunbar authored
llvm-svn: 57927
-
Douglas Gregor authored
llvm-svn: 57909
-
Steve Naroff authored
llvm-svn: 57899
-
rdar://problem/6261178Steve Naroff authored
Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings. Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature. Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this. llvm-svn: 57898
-
-
- Oct 20, 2008
-
-
Steve Naroff authored
Sema::CheckCompareOperands() and ASTContext::mergeTypes(): Change handling of ObjC qualified id types to be consistent with gcc. This changes a handful of test case errors into warnings (diff will tell you which cases have changed). llvm-svn: 57841
-
rdar://6257721Chris Lattner authored
move it to its own predicate to make it more clear. llvm-svn: 57796
-
Chris Lattner authored
llvm-svn: 57789
-
- Oct 19, 2008
-
-
Daniel Dunbar authored
- Support noreturn on function-typed variables. - Extend isFunctionOrMethod to return true for K&R functions and provide hasFunctionProto to check if a decl has information about its arguments. This code needs some serious cleaning, but works. - Add/improve test cases for noreturn and unused. llvm-svn: 57778
-
- Oct 16, 2008
-
-
Argyrios Kyrtzidis authored
llvm-svn: 57646
-
Daniel Dunbar authored
- Disables the freeing of the ASTContext and the TranslationUnit after parsing & sema. - Primarily for timing the impact on -fsyntax-only timings. llvm-svn: 57643
-
rdar://problem/6239726Steve Naroff authored
and http://llvm.org/bugs/show_bug.cgi?id=2893 llvm-svn: 57640
-
Daniel Dunbar authored
is to encode the state of the #pragma pack stack as an attribute when the structure is declared. - Extend PackedAttr to take an alignment (in bits), and reuse for both __attribute__((packed)) (which takes no argument, instead packing tightly (to "minimize the memory required") and for #pragma pack (which allows specification of the maximum alignment in bytes). __attribute__((packed)) is just encoded as Alignment=1. This conflates two related but different mechanisms, but it didn't seem worth another attribute. - I have attempted to follow the MSVC semantics as opposed to the gcc ones, since if I understand correctly #pragma pack originated with MSVC. The semantics are generally equivalent except when the stack is altered during the definition of a structure; its not clear if anyone does this in practice. See testcase if curious. llvm-svn: 57623
-