[cfe-commits] r49219 - /cfe/trunk/include/clang/AST/Type.h
Chris Lattner
sabre at nondot.org
Fri Apr 4 09:51:46 PDT 2008
Author: lattner
Date: Fri Apr 4 11:51:46 2008
New Revision: 49219
URL: http://llvm.org/viewvc/llvm-project?rev=49219&view=rev
Log:
add an isAnyComplexType() method, which returns true for both
integer and FP complexes.
Modified:
cfe/trunk/include/clang/AST/Type.h
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=49219&r1=49218&r2=49219&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Fri Apr 4 11:51:46 2008
@@ -293,6 +293,7 @@
/// isComplexType() does *not* include complex integers (a GCC extension).
/// isComplexIntegerType() can be used to test for complex integers.
bool isComplexType() const; // C99 6.2.5p11 (complex)
+ bool isAnyComplexType() const; // C99 6.2.5p11 (complex) + Complex Int.
bool isFloatingType() const; // C99 6.2.5p11 (real floating + complex)
bool isRealType() const; // C99 6.2.5p17 (real floating + integer)
bool isArithmeticType() const; // C99 6.2.5p18 (integer + floating)
@@ -1170,6 +1171,9 @@
inline bool Type::isRecordType() const {
return isa<RecordType>(CanonicalType.getUnqualifiedType());
}
+inline bool Type::isAnyComplexType() const {
+ return isa<ComplexType>(CanonicalType);
+}
inline bool Type::isVectorType() const {
return isa<VectorType>(CanonicalType.getUnqualifiedType());
}
More information about the cfe-commits
mailing list