summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclarationName.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/DeclarationName.cpp')
-rw-r--r--clang/lib/AST/DeclarationName.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclarationName.cpp b/clang/lib/AST/DeclarationName.cpp
index c1077c189b6..3815a08a652 100644
--- a/clang/lib/AST/DeclarationName.cpp
+++ b/clang/lib/AST/DeclarationName.cpp
@@ -63,16 +63,19 @@ DeclarationName::DeclarationName(Selector Sel) {
switch (Sel.getNumArgs()) {
case 0:
Ptr = reinterpret_cast<uintptr_t>(Sel.getAsIdentifierInfo());
+ assert((Ptr & PtrMask) == 0 && "Improperly aligned IdentifierInfo");
Ptr |= StoredObjCZeroArgSelector;
break;
case 1:
Ptr = reinterpret_cast<uintptr_t>(Sel.getAsIdentifierInfo());
+ assert((Ptr & PtrMask) == 0 && "Improperly aligned IdentifierInfo");
Ptr |= StoredObjCOneArgSelector;
break;
default:
Ptr = Sel.InfoPtr & ~Selector::ArgFlags;
+ assert((Ptr & PtrMask) == 0 && "Improperly aligned MultiKeywordSelector");
Ptr |= StoredDeclarationNameExtra;
break;
}
OpenPOWER on IntegriCloud