MemberPointerAdjustment
} Kind;
-
struct DTB {
const CastExpr *BasePath;
const CXXRecordDecl *DerivedClass;
}
};
-
//===----------------------------------------------------------------------===//
// Primary Expressions.
//===----------------------------------------------------------------------===//
child_range children() { return child_range(&Val, &Val+1); }
};
-
/// UnaryOperator - This represents the unary-expression's (except sizeof and
/// alignof), the postinc/postdec operators from postfix-expression, and various
/// extensions.
}
};
-
/// CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
/// CallExpr itself represents a normal function call, e.g., "f(x, 2)",
/// while its subclasses may represent alternative syntax that (semantically)
child_range children() { return child_range(&SubStmt, &SubStmt+1); }
};
-
/// ShuffleVectorExpr - clang-specific builtin-in function
/// __builtin_shufflevector.
/// This AST node represents a operator that does a constant
/// Create an empty __builtin_va_arg expression.
explicit VAArgExpr(EmptyShell Empty)
- : Expr(VAArgExprClass, Empty), Val(0), TInfo(0, false) {}
+ : Expr(VAArgExprClass, Empty), Val(nullptr), TInfo(nullptr, false) {}
const Expr *getSubExpr() const { return cast<Expr>(Val); }
Expr *getSubExpr() { return cast<Expr>(Val); }
}
};
-
class ParenListExpr : public Expr {
Stmt **Exprs;
unsigned NumExprs;
friend class ASTStmtWriter;
};
-
/// \brief Represents a C11 generic selection.
///
/// A generic selection (C11 6.5.1.1) contains an unevaluated controlling
// Clang Extensions
//===----------------------------------------------------------------------===//
-
/// ExtVectorElementExpr - This represents access to specific elements of a
/// vector, and may occur on the left hand side or right hand side. For example
/// the following is legal: "V.xy = V.zw" if V is a 4 element extended vector.
child_range children() { return child_range(&Base, &Base+1); }
};
-
/// BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
/// ^{ statement-body } or ^(int arg1, float arg2){ statement-body }
class BlockExpr : public Expr {
}
};
-} // end namespace clang
+} // end namespace clang
-#endif
+#endif // LLVM_CLANG_AST_EXPR_H
///
OMPDeviceClause()
: OMPClause(OMPC_device, SourceLocation(), SourceLocation()),
- LParenLoc(SourceLocation()), Device(0) {}
+ LParenLoc(SourceLocation()), Device(nullptr) {}
/// \brief Sets the location of '('.
void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; }
/// \brief Returns the location of '('.
} // end namespace clang
-#endif
-
+#endif // LLVM_CLANG_AST_OPENMPCLAUSE_H
return static_cast<CXXDeleteExpr *>(Data2.getPointer());
}
-
private:
friend class CFGElement;
CFGDeleteDtor() {}
iterator beginAutomaticObjDtorsInsert(iterator I, size_t Cnt,
BumpVectorContext &C) {
return iterator(Elements.insert(I.base(), Cnt,
- CFGAutomaticObjDtor(nullptr, 0), C));
+ CFGAutomaticObjDtor(nullptr, nullptr), C));
}
iterator insertAutomaticObjDtor(iterator I, VarDecl *VD, Stmt *S) {
*I = CFGAutomaticObjDtor(VD, S);
}
};
} // end llvm namespace
-#endif
+
+#endif // LLVM_CLANG_ANALYSIS_CFG_H
// the case of a SubsetSubject, there's no way to express it without this hack.
def DeclBase : AttrSubject;
def FunctionLike : SubsetSubject<DeclBase,
- [{S->getFunctionType(false) != NULL}]>;
+ [{S->getFunctionType(false) != nullptr}]>;
def OpenCLKernelFunction : SubsetSubject<Function, [{
S->hasAttr<OpenCLKernelAttr>()
// never be specified in a Subjects list along with FunctionLike (due to the
// inclusive nature of subject testing).
def HasFunctionProto : SubsetSubject<DeclBase,
- [{(S->getFunctionType(true) != NULL &&
+ [{(S->getFunctionType(true) != nullptr &&
isa<FunctionProtoType>(S->getFunctionType())) ||
isa<ObjCMethodDecl>(S) ||
isa<BlockDecl>(S)}]>;
llvm::Value *storage,
CGBuilderTy &Builder,
const CGBlockInfo &blockInfo,
- llvm::Instruction *InsertPoint = 0);
+ llvm::Instruction *InsertPoint = nullptr);
/// Emit call to \c llvm.dbg.declare for an argument variable
/// declaration.
} // namespace CodeGen
} // namespace clang
-#endif
+#endif // LLVM_CLANG_LIB_CODEGEN_CGDEBUGINFO_H
/// Return the address of the given function. If Ty is non-null, then this
/// function will use the specified type if it has to create it.
- llvm::Constant *GetAddrOfFunction(GlobalDecl GD, llvm::Type *Ty = 0,
+ llvm::Constant *GetAddrOfFunction(GlobalDecl GD, llvm::Type *Ty = nullptr,
bool ForVTable = false,
bool DontDefer = false,
bool IsForDefinition = false);
// FIXME: Hardcoding priority here is gross.
void AddGlobalCtor(llvm::Function *Ctor, int Priority = 65535,
- llvm::Constant *AssociatedData = 0);
+ llvm::Constant *AssociatedData = nullptr);
void AddGlobalDtor(llvm::Function *Dtor, int Priority = 65535);
/// Generates a global array of functions and priorities using the given list
} // end namespace CodeGen
} // end namespace clang
-#endif
+#endif // LLVM_CLANG_LIB_CODEGEN_CODEGENMODULE_H
public:
// WARNING: Acquires the ownership of ABIInfo.
- TargetCodeGenInfo(ABIInfo *info = 0) : Info(info) {}
+ TargetCodeGenInfo(ABIInfo *info = nullptr) : Info(info) {}
virtual ~TargetCodeGenInfo();
/// getABIInfo() - Returns ABI info helper for the target.
llvm::StringRef Value,
llvm::SmallString<32> &Opt) const {}
};
-}
+} // namespace clang
-#endif
+#endif // LLVM_CLANG_LIB_CODEGEN_TARGETINFO_H
TreeTransform<Derived>::TransformOMPCollapseClause(OMPCollapseClause *C) {
ExprResult E = getDerived().TransformExpr(C->getNumForLoops());
if (E.isInvalid())
- return 0;
+ return nullptr;
return getDerived().RebuildOMPCollapseClause(
E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd());
}
} // end namespace clang
-#endif
+#endif // LLVM_CLANG_LIB_SEMA_TREETRANSFORM_H
}
bool CursorVisitor::VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL) {
- if (Visit(MakeCursorObjCClassRef(TL.getIFaceDecl(), TL.getNameLoc(), TU)))
- return true;
-
- return false;
+ return Visit(MakeCursorObjCClassRef(TL.getIFaceDecl(), TL.getNameLoc(), TU));
}
bool CursorVisitor::VisitObjCObjectTypeLoc(ObjCObjectTypeLoc TL) {
}
bool CursorVisitor::VisitDependentNameTypeLoc(DependentNameTypeLoc TL) {
- if (VisitNestedNameSpecifierLoc(TL.getQualifierLoc()))
- return true;
-
- return false;
+ return VisitNestedNameSpecifierLoc(TL.getQualifierLoc());
}
bool CursorVisitor::VisitDependentTemplateSpecializationTypeLoc(
<< "Length])";
}
void writeCtorDefaultInitializers(raw_ostream &OS) const override {
- OS << getLowerName() << "Length(0)," << getLowerName() << "(0)";
+ OS << getLowerName() << "Length(0)," << getLowerName() << "(nullptr)";
}
void writeCtorParameters(raw_ostream &OS) const override {
OS << "llvm::StringRef " << getUpperName();
// The aligned attribute argument expression is optional.
OS << " if (is" << getLowerName() << "Expr && "
<< getLowerName() << "Expr)\n";
- OS << " " << getLowerName() << "Expr->printPretty(OS, 0, Policy);\n";
+ OS << " " << getLowerName() << "Expr->printPretty(OS, nullptr, Policy);\n";
OS << " OS << \"";
}
void writeDump(raw_ostream &OS) const override {
bool ShouldClone = R.getValueAsBit("Clone");
if (!ShouldClone) {
- OS << " return NULL;\n";
+ OS << " return nullptr;\n";
OS << " }\n";
continue;
}
}
OS << " } // end switch\n"
<< " llvm_unreachable(\"Unknown attribute!\");\n"
- << " return 0;\n"
+ << " return nullptr;\n"
<< "}\n\n"
<< "} // end namespace sema\n"
<< "} // end namespace clang\n";
OS << "const CommandInfo *CommandTraits::getBuiltinCommandInfo(\n"
<< " StringRef Name) {\n";
StringMatcher("Name", Matches, OS).Emit();
- OS << " return NULL;\n"
+ OS << " return nullptr;\n"
<< "}\n\n";
}
}
}
} // end namespace clang
-