// the comma operator in C99 mode.
// 2: This expression is not an ICE, and is not a legal subexpression for one.
+namespace {
+
struct ICEDiag {
unsigned Val;
SourceLocation Loc;
ICEDiag() : Val(0) {}
};
-ICEDiag NoDiag() { return ICEDiag(); }
+}
+
+static ICEDiag NoDiag() { return ICEDiag(); }
static ICEDiag CheckEvalInICE(const Expr* E, ASTContext &Ctx) {
Expr::EvalResult EVResult;
#include "clang/AST/Type.h"
#include "llvm/Support/raw_ostream.h"
+namespace clang {
+
template <typename T>
class UpdateOnReturn {
T &ValueToUpdate;
}
};
-namespace clang {
namespace analyze_format_string {
OptionalAmount ParseAmount(const char *&Beg, const char *E);
using clang::analyze_format_string::ConversionSpecifier;
using clang::analyze_scanf::ScanfConversionSpecifier;
using clang::analyze_scanf::ScanfSpecifier;
+using clang::UpdateOnReturn;
typedef clang::analyze_format_string::SpecifierResult<ScanfSpecifier>
ScanfSpecifierResult;
// Builtin Diagnostic information
//===----------------------------------------------------------------------===//
+namespace {
+
// Diagnostic classes.
enum {
CLASS_NOTE = 0x01,
}
};
+}
+
static const StaticDiagInfoRec StaticDiagInfo[] = {
#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC,GROUP,SFINAE, CATEGORY) \
{ diag::ENUM, DEFAULT_MAPPING, CLASS, SFINAE, CATEGORY, DESC, GROUP },
#include "llvm/ADT/APSInt.h"
using namespace clang;
+namespace {
+
/// PPValue - Represents the value of a subexpression of a preprocessor
/// conditional and the source range covered by it.
class PPValue {
void setEnd(SourceLocation L) { Range.setEnd(L); }
};
+}
+
static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec,
Token &PeekTok, bool ValueLive,
Preprocessor &PP);
return AlwaysFallThrough;
}
+namespace {
+
struct CheckFallThroughDiagnostics {
unsigned diag_MaybeFallThrough_HasNoReturn;
unsigned diag_MaybeFallThrough_ReturnsNonVoid;
}
};
+}
+
/// CheckFallThroughForFunctionDef - Check that we don't fall off the end of a
/// function that should return a value. Check that we don't fall off the end
/// of a noreturn function. We assume that functions and blocks not marked
/// the same kind of pointer (plain or to-member). Unlike the Sema function,
/// this one doesn't care if the two pointers-to-member don't point into the
/// same class. This is because CastsAwayConstness doesn't care.
-bool UnwrapDissimilarPointerTypes(QualType& T1, QualType& T2) {
+static bool UnwrapDissimilarPointerTypes(QualType& T1, QualType& T2) {
const PointerType *T1PtrType = T1->getAs<PointerType>(),
*T2PtrType = T2->getAs<PointerType>();
if (T1PtrType && T2PtrType) {
}
}
+namespace {
+
/// Used in MergeFunctionDecl to keep track of function parameters in
/// C.
struct GNUCompatibleParamWarning {
QualType PromotedType;
};
+}
/// getSpecialMember - get the special member enum for a method.
Sema::CXXSpecialMember Sema::getSpecialMember(const CXXMethodDecl *MD) {
HandlerBlock.takeAs<Stmt>()));
}
+namespace {
+
class TypeWithHandler {
QualType t;
CXXCatchStmt *stmt;
}
};
+}
+
/// ActOnCXXTryBlock - Takes a try compound-statement and a number of
/// handlers and creates a try statement from them.
Action::OwningStmtResult