Move all of Sema's member-access-related checking out of SemaExpr.cpp

and into a new file, SemaExprMember.cpp, bringing SemaExpr.cpp just
under 10,000 lines of code (ugh). No functionality change, although I
intend to do some refactoring of this code to address PR8368 at some
point in the "near" future.

llvm-svn: 133674
This commit is contained in:
Douglas Gregor 2011-06-23 00:49:38 +00:00
parent c0a2ab6421
commit 5476205b9b
5 changed files with 1617 additions and 1588 deletions

View File

@ -849,6 +849,18 @@ public:
return isDestructedTypeImpl(*this);
}
/// \brief Determine whether expressions of the given type are forbidden
/// from being lvalues in C.
///
/// The expression types that are forbidden to be lvalues are:
/// - 'void', but not qualified void
/// - function types
///
/// The exact rule here is C99 6.3.2.1:
/// An lvalue is an expression with an object type or an incomplete
/// type other than void.
bool isCForbiddenLValueType() const;
/// \brief Determine whether this type has trivial copy-assignment semantics.
bool hasTrivialCopyAssignment(ASTContext &Context) const;
@ -1457,7 +1469,7 @@ public:
bool isElaboratedTypeSpecifier() const;
bool canDecayToPointerType() const;
/// hasPointerRepresentation - Whether this type is represented
/// natively as a pointer; this includes pointers, references, block
/// pointers, and Objective-C interface, qualified id, and qualified
@ -4473,6 +4485,11 @@ inline QualType QualType::getNonReferenceType() const {
return *this;
}
inline bool QualType::isCForbiddenLValueType() const {
return ((getTypePtr()->isVoidType() && !hasQualifiers()) ||
getTypePtr()->isFunctionType());
}
/// \brief Tests whether the type is categorized as a fundamental type.
///
/// \returns True for types specified in C++0x [basic.fundamental].

View File

@ -2215,6 +2215,11 @@ public:
ExprResult ActOnIdExpression(Scope *S, CXXScopeSpec &SS, UnqualifiedId &Name,
bool HasTrailingLParen, bool IsAddressOfOperand);
void DecomposeUnqualifiedId(const UnqualifiedId &Id,
TemplateArgumentListInfo &Buffer,
DeclarationNameInfo &NameInfo,
const TemplateArgumentListInfo *&TemplateArgs);
bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
CorrectTypoContext CTC = CTC_Unknown);

View File

@ -23,6 +23,7 @@ add_clang_library(clangSema
SemaExceptionSpec.cpp
SemaExpr.cpp
SemaExprCXX.cpp
SemaExprMember.cpp
SemaExprObjC.cpp
SemaInit.cpp
SemaLookup.cpp

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff