};
-}
+} // namespace
static FrontendPluginRegistry::Add<PrintFunctionNamesAction>
X("print-fns", "print function names");
bool BeginInvocation(CompilerInstance &CI) override;
};
-}
-}
+} // namespace arcmt
+} // namespace clang
#endif
bool IsStructurallyEquivalent(QualType From, QualType To,
bool Complain = true);
};
-}
+} // namespace clang
#endif // LLVM_CLANG_AST_ASTIMPORTER_H
return DC->getParent();
}
-} // clang
+} // namespace clang
#endif
Capacity.setPointer(Begin+NewCapacity);
}
-} // end: clang namespace
+} // namespace clang
#endif
static const bool value = true;
};
-}
+} // namespace llvm
#endif
return CanProxy<Type>(*this);
}
-}
+} // namespace clang
#endif
operator NamedDecl*() const { return getDecl(); }
NamedDecl *operator->() const { return getDecl(); }
};
-}
+} // namespace clang
// Take a moment to tell SmallVector that DeclAccessPair is POD.
namespace llvm {
class StoredDeclsMap;
class TranslationUnitDecl;
class UsingDirectiveDecl;
-}
+} // namespace clang
namespace clang {
};
-} // end clang.
+} // namespace clang
namespace llvm {
data().FirstFriend = FD;
}
-}
+} // namespace clang
#endif
}
};
-} // end clang namespace
+} // namespace clang
namespace llvm {
// DeclGroupRef is "like a pointer", implement PointerLikeTypeTraits.
}
enum { NumLowBitsAvailable = 0 };
};
-}
+} // namespace llvm
#endif
return ddiag_range(ddiag_iterator(Map->FirstDiagnostic), ddiag_iterator());
}
-}
+} // namespace clang
#endif
EvaluatedExprVisitorBase<make_const_ptr, ImplClass>(Context) { }
};
-}
+} // namespace clang
#endif // LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H
NumLowBitsAvailable = PointerLikeTypeTraits<T>::NumLowBitsAvailable - 1
};
};
-}
+} // namespace llvm
namespace clang {
/// \brief Represents a lazily-loaded vector of data.
static MicrosoftMangleContext *create(ASTContext &Context,
DiagnosticsEngine &Diags);
};
-}
+} // namespace clang
#endif
return DB;
}
-}
+} // namespace clang
#endif
OBC_BridgeRetained
};
-}
+} // namespace clang
#endif
}
};
-} // end clang namespace
+} // namespace clang
#endif
bool isFirstDecl() const { return getFirstDecl() == this; }
};
-}
+} // namespace clang
#endif
template <>
struct isPodLike<clang::QualType> { static const bool value = true; };
-}
+} // namespace llvm
namespace clang {
class ASTContext;
static DestructionKind isDestructedTypeImpl(QualType type);
};
-} // end clang.
+} // namespace clang
namespace llvm {
/// Implement simplify_type for QualType, so that we can dyn_cast from QualType
};
-}
+} // namespace clang
#endif
return LHS == RHS;
}
};
-}
+} // namespace llvm
#endif
};
-}
+} // namespace clang
#endif
void mapReachability(const CFGBlock *Dst);
};
-}
+} // namespace clang
#endif
/// exactly once.
void run(AnalysisDeclContext &AC);
};
-}} // end namespace clang::consumed
+} // namespace consumed
+} // namespace clang
#endif
static bool namedTypeToLengthModifier(QualType QT, LengthModifier &LM);
};
-} // end analyze_format_string namespace
+} // namespace analyze_format_string
//===----------------------------------------------------------------------===//
/// Pieces specific to fprintf format strings.
bool hasValidPrecision() const;
bool hasValidFieldWidth() const;
};
-} // end analyze_printf namespace
+} // namespace analyze_printf
//===----------------------------------------------------------------------===//
/// Pieces specific to fscanf format strings.
static ScanfSpecifier Parse(const char *beg, const char *end);
};
-} // end analyze_scanf namespace
+} // namespace analyze_scanf
//===----------------------------------------------------------------------===//
// Parsing and processing of format strings (both fprintf and fscanf).
const char *beg, const char *end, const LangOptions &LO,
const TargetInfo &Target);
-} // end analyze_format_string namespace
-} // end clang namespace
+} // namespace analyze_format_string
+} // namespace clang
#endif
static PostOrderCFGView *create(AnalysisDeclContext &analysisContext);
};
-} // end clang namespace
+} // namespace clang
#endif
bool Analyzed;
};
-}
+} // namespace clang
#endif
void FindUnreachableCode(AnalysisDeclContext &AC, Preprocessor &PP,
Callback &CB);
-}} // end namespace clang::reachable_code
+} // namespace reachable_code
+} // namespace clang
#endif
/// of access.
LockKind getLockKindFromAccessKind(AccessKind AK);
-}} // end namespace clang::threadSafety
+} // namespace threadSafety
+} // namespace clang
#endif
return lexpr::implies(this, RHS);
}
-}
-}
-}
+} // namespace lexpr
+} // namespace threadSafety
+} // namespace clang
#endif
UninitVariablesHandler &handler,
UninitVariablesAnalysisStats &stats);
-}
+} // namespace clang
#endif
}
};
-} // end clang namespace
+} // namespace clang
#endif
return F->nodes_end();
}
};
-} // end llvm namespace
+} // namespace llvm
#endif
}
};
-} // end clang namespace
+} // namespace clang
#endif
void dump() const;
};
-} // end clang namespace
+} // namespace clang
// Graph traits for iteration, viewing.
namespace llvm {
}
};
-} // end llvm namespace
+} // namespace llvm
#endif
virtual Stmt *getBody(const FunctionDecl *D) = 0;
virtual Stmt *getBody(const ObjCMethodDecl *D) = 0;
};
-}
+} // namespace clang
#endif
bool followsCreateRule(const FunctionDecl *FD);
}
-}} // end: "clang:ento"
+} // namespace ento
+} // namespace clang
#endif
/// return.
bool isImplicitNoReturn(const ObjCMessageExpr *ME);
};
-}
+} // namespace clang
#endif
Capacity = Begin+NewCapacity;
}
-} // end: clang namespace
+} // namespace clang
#endif
/// to target-specific ones.
typedef unsigned Map[Count];
-}
+} // namespace LangAS
-}
+} // namespace clang
#endif
const char *Fmt) const;
};
-}
+} // namespace Builtin
} // end namespace clang
#endif
Remark ///< A diagnostic that indicates normal progress through
///< compilation.
};
- }
+ } // namespace diag
class DiagnosticMapping {
unsigned Severity : 3;
class raw_ostream;
class raw_pwrite_stream;
// TODO: DenseMap, ...
-}
+} // namespace llvm
namespace clang {
/// \return true - the clause is a threadprivate clause, otherwise - false.
bool isOpenMPThreadPrivate(OpenMPClauseKind Kind);
-}
+} // namespace clang
#endif
Multiplicative = 13, // *, /, %
PointerToMember = 14 // .*, ->*
};
-}
+} // namespace prec
/// \brief Return the precedence of the specified binary operator token.
prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator,
EmitLocation(o, SM, R.getEnd(), FM, indent + 1);
Indent(o, indent) << "</array>\n";
}
-}
-}
+} // namespace markup
+} // namespace clang
#endif
: SM(sm), Loc(L), Message(Msg) {}
void print(raw_ostream &OS) const override;
};
-}
+} // namespace clang
#endif
const SanitizerMask ID##Group = 1ULL << SO_##ID##Group;
#include "clang/Basic/Sanitizers.def"
-}
+} // namespace SanitizerKind
struct SanitizerSet {
SanitizerSet();
return E;
}
};
-} // end SrcMgr namespace.
+} // namespace SrcMgr
/// \brief External source of source location entries.
class ExternalSLocEntrySource {
TNK_Dependent_template_name
};
-}
+} // namespace clang
#endif
UETT_AlignOf,
UETT_VecStep
};
-}
+} // namespace clang
#endif
/// for use in the CPP __VERSION__ macro, which includes the clang version
/// number, the repository version, and the vendor tag.
std::string getClangFullCPPVersion();
-}
+} // namespace clang
#endif // LLVM_CLANG_BASIC_VERSION_H
if (withVis) mergeVisibility(other);
}
};
-}
+} // namespace clang
#endif // LLVM_CLANG_BASIC_VISIBILITY_H
const TargetOptions &TOpts, const LangOptions &LOpts,
StringRef TDesc, llvm::Module *M, BackendAction Action,
raw_pwrite_stream *OS);
-}
+} // namespace clang
#endif
EmitObjAction(llvm::LLVMContext *_VMContext = nullptr);
};
-}
+} // namespace clang
#endif
const CodeGenOptions &CGO,
llvm::LLVMContext& C,
CoverageSourceInfo *CoverageInfo = nullptr);
-}
+} // namespace clang
#endif
};
raw_ostream &operator<<(raw_ostream &OS, const MultilibSet &MS);
-}
-}
+} // namespace driver
+} // namespace clang
#endif
LastOption
#undef OPTION
};
-}
+} // namespace options
llvm::opt::OptTable *createDriverOptTable();
-}
-}
+} // namespace driver
+} // namespace clang
#endif
}
};
-}
+} // namespace edit
} // end namespace clang
FileEditsTy::iterator getActionForOffset(FileOffset Offs);
};
-}
+} // namespace edit
} // end namespace clang
virtual void remove(CharSourceRange range);
};
-}
+} // namespace edit
} // end namespace clang
}
};
-}
+} // namespace edit
} // end namespace clang
bool rewriteToObjCSubscriptSyntax(const ObjCMessageExpr *Msg,
const NSAPI &NS, Commit &commit);
-}
+} // namespace edit
} // end namespace clang
// to stderr; this is intended for debugging.
std::unique_ptr<ASTConsumer> CreateDeclContextPrinter();
-} // end clang namespace
+} // namespace clang
#endif
}
};
-} // end namspace clang
+} // namespace clang
#endif
}
};
-}
+} // namespace clang
namespace llvm {
namespace cl {
return false;
}
- }
-}
+ } // namespace cl
+} // namespace llvm
#endif
virtual void emitNote(SourceLocation Loc, StringRef Message,
const SourceManager *SM) = 0;
};
-} // end clang namespace
+} // namespace clang
#endif
MigrateSource, ///< Run migrator.
RunPreprocessorOnly ///< Just lex, no output.
};
-}
+} // namespace frontend
enum InputKind {
IK_None,
ImplicitInt = (1 << 11)
};
-}
+} // namespace frontend
/// LangStandard - Information about the properties of a particular language
/// standard.
/// \brief Dump the overridden layouts.
void dump();
};
-}
+} // namespace clang
#endif
}
};
-}
+} // namespace clang
#endif
DiagnosticOptions *Diags,
bool MergeChildRecords = false);
-} // end serialized_diags namespace
-} // end clang namespace
+} // namespace serialized_diags
+} // namespace clang
#endif
};
};
-} // end serialized_diags namespace
-} // end clang namespace
+} // namespace serialized_diags
+} // namespace clang
namespace std {
template <>
/// \brief The serialized diagnostics version number.
enum { VersionNumber = 2 };
-} // end serialized_diags namespace
-} // end clang namespace
+} // namespace serialized_diags
+} // namespace clang
#endif
void FlushDiagnostics(DiagnosticsEngine &Diags) const;
};
-} // end namspace clang
+} // namespace clang
#endif
const Diagnostic &Info) override;
};
-} // end namspace clang
+} // namespace clang
#endif
virtual void CodeCompleteNaturalLanguage() { }
};
-}
+} // namespace clang
#endif // LLVM_CLANG_LEX_CODECOMPLETIONHANDLER_H
virtual Module *getModule(unsigned ModuleID) = 0;
};
-}
+} // namespace clang
#endif
ObjCXXSystem, ///< Like System, but only used for ObjC++.
After ///< Like System, but searched after the system directories.
};
-}
+} // namespace frontend
/// HeaderSearchOptions - Helper class for storing options related to the
/// initialization of the HeaderSearch object.
bool HadFatalFailure;
};
-}
+} // namespace clang
#endif
module_iterator module_end() const { return Modules.end(); }
};
-}
+} // namespace clang
#endif
/// is literally 'L', 'u', 'U', or 'u8'.
bool IsIdentifierStringPrefix(const Token &Tok) const;
};
- } // end clang namespace
+ } // namespace clang
#endif
/// reasonably close.
void HighlightMacros(Rewriter &R, FileID FID, const Preprocessor &PP);
-} // end html namespace
-} // end clang namespace
+} // namespace html
+} // namespace clang
#endif
bool SyntaxHighlight = true,
bool HighlightMacros = true);
-} // end clang namespace
+} // namespace clang
#endif
void Diag(SourceLocation Loc, unsigned DiagID);
};
-}
+} // namespace clang
#endif
void PrintStats() const;
};
-}} // end namespace clang::sema
+} // namespace sema
+} // namespace clang
#endif
bool pool_empty() const { return Diagnostics.empty(); }
};
-}
+} // namespace sema
/// Add a diagnostic to the current delay pool.
inline void Sema::DelayedDiagnostics::add(const sema::DelayedDiagnostic &diag) {
}
-}
+} // namespace clang
#endif
iterator end() { return iterator(Decls.end()); }
};
-}
+} // namespace clang
#endif
}
};
-}
+} // namespace clang
#endif
return *this;
}
};
-}
+} // namespace clang
namespace llvm {
template <class T>
template <class T>
struct isPodLike<clang::OpaquePtr<T> > { static const bool value = true; };
-}
+} // namespace llvm
namespace clang {
// Basic
assert(!R.isInvalid() && "operation was asserted to never fail!");
return R.get();
}
-}
+} // namespace clang
#endif
/// Retrieves the range of the given template parameter lists.
SourceRange getTemplateParamsRange(TemplateParameterList const *const *Params,
unsigned NumParams);
-}
+} // namespace clang
#endif
void print(raw_ostream &OS) const override;
};
-}
+} // namespace clang
#endif
class LambdaScopeInfo;
class PossiblyUnreachableDiag;
class TemplateDeductionInfo;
-}
+} // namespace sema
namespace threadSafety {
class BeforeSet;
return Consumer->SemaConsumer;
}
};
-}
+} // namespace clang
#endif
}
};
-} // endof namespace clang
+} // namespace clang
#endif
ArrayRef<const sema::FunctionScopeInfo *> FunctionScopes,
VarDecl *VarToCapture, Sema &S);
-} // clang
+} // namespace clang
#endif
VarTemplatePartialSpecializationDecl *PartialSpec);
void InstantiateEnumDefinition(EnumDecl *Enum, EnumDecl *Pattern);
};
-}
+} // namespace clang
#endif // LLVM_CLANG_SEMA_TEMPLATE_H
}
};
-}
+} // namespace clang
#endif
};
/// @}
- }
+ } // namespace serialization
} // end namespace clang
#endif
/// \brief A module definition was read from the AST file.
virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) {}
};
-}
+} // namespace clang
#endif
friend class Builder;
};
-}
+} // namespace clang
#endif
StringRef Path);
};
-}
+} // namespace clang
#endif
void viewGraph();
};
-} } // end namespace clang::serialization
+} // namespace serialization
+ } // namespace clang
#endif
static CallEffects getEffect(const FunctionDecl *FD);
};
-}}}
+} // namespace objc_retain
+} // namespace ento
+} // namespace clang
#endif
typedef IntrusiveRefCntPtr<AnalyzerOptions> AnalyzerOptionsRef;
-}
+} // namespace clang
#endif
virtual void Profile(llvm::FoldingSetNodeID& hash) const;
};
-} // end ento namespace
-} // end clang namespace
+} // namespace ento
+} // namespace clang
namespace llvm {
template<> struct ilist_traits<clang::ento::BugReport>
private:
mutable ilist_half_node<clang::ento::BugReport> Sentinel;
};
-}
+} // namespace llvm
namespace clang {
namespace ento {
virtual BugReport::NodeResolver& getNodeResolver() = 0;
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
bool isDeclRefExprToReference(const Expr *E);
-} // end namespace clang
+} // namespace bugreporter
} // end namespace ento
-} // end namespace bugreporter
+} // namespace clang
#endif
StringRef getDescription() const { return desc; }
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
void FullProfile(llvm::FoldingSetNodeID &ID) const;
};
-} // end GR namespace
+} // namespace ento
-} //end clang namespace
+} // namespace clang
#endif
}
};
-} // end check namespace
+} // namespace check
namespace eval {
}
};
-} // end eval namespace
+} // namespace eval
class CheckerBase : public ProgramPointTag {
CheckName Name;
DefaultBool &operator=(bool b) { val = b; return *this; }
};
-} // end ento namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
EventsTy Events;
};
-} // end ento namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
const Preprocessor &PP);
#include "clang/StaticAnalyzer/Core/Analyses.def"
-} // end 'ento' namespace
-} // end 'clang' namespace
+} // namespace ento
+} // namespace clang
#endif
}
};
-} // end ento namespace
-} // end clang namespace
+} // namespace ento
+} // namespace clang
#endif
}
};
-} // enAnaCtxMgrspace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
const SVal* getPersistentSVal(SVal X);
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
friend class Factory;
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
return Val.get();
}
};
-}
+} // namespace llvm
#endif
}
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
return false;
}
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
CreateRangeConstraintManager(ProgramStateManager &statemgr,
SubEngine *subengine);
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
}
};
-} // end ento namespace
-} // end clang namespace
+} // namespace ento
+} // namespace clang
#endif
}
};
-} // end ento
-} // end clang
+} // namespace ento
+} // namespace clang
#endif
ProgramStateRef state);
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
inline const_iterator end() const { return Impl.end(); }
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
// GraphTraits
}
};
-} // end llvm namespace
+} // namespace llvm
#endif
static void *GDMIndex() { static int index = 0; return &index; }
};
-} // end ento namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
};
-}} // end clang ento namespaces
+} // namespace ento
+} // namespace clang
#endif
bool hasTrait(const MemRegion *MR, InvalidationKinds IK);
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
//===----------------------------------------------------------------------===//
// Pretty-printing regions.
bool scan(const SymExpr *sym);
};
-} // end ento namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
}
};
-} // end ento namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
ASTContext &context,
ProgramStateManager &stateMgr);
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
}
};
-} // end namespace ento::nonloc
+} // namespace nonloc
//==------------------------------------------------------------------------==//
// Subclasses of Loc.
}
};
-} // end ento::loc namespace
+} // namespace loc
-} // end ento namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
namespace llvm {
static inline raw_ostream &operator<<(raw_ostream &os,
static const bool value = true;
};
-} // end llvm namespace
+} // namespace llvm
#endif
std::unique_ptr<StoreManager>
CreateFieldsOnlyRegionStoreManager(ProgramStateManager &StMgr);
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
const StoreManager &getStoreManager() const { return mgr; }
};
-}}
+} // namespace ento
+} // namespace clang
#endif
virtual void processEndWorklist(bool hasWorkRemaining) = 0;
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
virtual ~SymbolVisitor();
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
namespace llvm {
static inline raw_ostream &operator<<(raw_ostream &os,
TaintManager() {}
};
-}
-}
+} // namespace ento
+} // namespace clang
#endif
static WorkList *makeBFSBlockDFSContents();
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
std::unique_ptr<AnalysisASTConsumer>
CreateAnalysisConsumer(CompilerInstance &CI);
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
void printCheckerHelp(raw_ostream &OS, ArrayRef<std::string> plugins);
-} // end GR namespace
+} // namespace ento
} // end namespace clang
private:
llvm::StringMap<Stmt *> &Bodies;
};
-}
-}
+} // namespace ento
+} // namespace clang
#endif
}
};
-}
+} // namespace
ObjCMigrateAction::ObjCMigrateAction(FrontendAction *WrappedAction,
StringRef migrateDir,
return true;
}
};
-}
+} // namespace
void ObjCMigrateASTConsumer::migrateDecl(Decl *D) {
if (!D)
}
};
-}
+} // namespace
void ObjCMigrateASTConsumer::HandleTranslationUnit(ASTContext &Ctx) {
LHS.Text == RHS.Text;
}
};
-}
+} // namespace llvm
namespace {
class RemapFileParser {
Entries.push_back(Entry);
}
};
-}
+} // namespace
static bool reportDiag(const Twine &Err, DiagnosticsEngine &Diag) {
Diag.Report(Diag.getCustomDiagID(DiagnosticsEngine::Error, "%0"))
}
};
-}
+} // namespace
namespace {
}
};
-}
+} // namespace
MigrationContext::~MigrationContext() {
for (traverser_iterator
void visitVerbatimBlockLineComment(const VerbatimBlockLineComment *C);
void visitVerbatimLineComment(const VerbatimLineComment *C);
};
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Utilities
Expr *VisitMemberExpr(MemberExpr *E);
Expr *VisitCallExpr(CallExpr *E);
};
-}
+} // namespace clang
using namespace clang;
//----------------------------------------------------------------------------
return C2.getDiagnostics().Report(Loc, DiagID);
}
};
-}
+} // namespace
static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
QualType T1, QualType T2);
/// Creates an instance of a C++ ABI class.
CXXABI *CreateItaniumCXXABI(ASTContext &Ctx);
CXXABI *CreateMicrosoftCXXABI(ASTContext &Ctx);
-}
+} // namespace clang
#endif
const CXXRecordDecl *InVirtualSubobject,
CXXFinalOverriderMap &Overriders);
};
-}
+} // namespace
void FinalOverriderCollector::Collect(const CXXRecordDecl *RD,
bool VirtualBase,
return LV;
}
};
-}
+} // namespace clang
static LinkageInfo getLVForDecl(const NamedDecl *D,
LVComputationKind computation) {
const SynthesizeIvarChunk &RHS) {
return LHS.Size < RHS.Size;
}
-}
+} // namespace
/// all_declared_ivar_begin - return first ivar declared in this class,
/// its extensions and its implementation. Lazily build the list on first
void prettyPrintAttributes(Decl *D);
void printDeclType(QualType T, StringRef DeclName, bool Pack = false);
};
-}
+} // namespace
void Decl::print(raw_ostream &Out, unsigned Indentation,
bool PrintInstantiation) const {
SourceLocation (Expr::*v)() const) {
return static_cast<const E*>(expr)->getLocStart();
}
-}
+} // namespace
SourceLocation Expr::getExprLoc() const {
switch (getStmtClass()) {
HasSideEffects = true;
}
};
-}
+} // namespace
bool Expr::HasSideEffects(const ASTContext &Ctx,
bool IncludePossibleEffects) const {
NonTrivial = true;
}
};
-}
+} // namespace
bool Expr::hasNonTrivialCall(const ASTContext &Ctx) const {
NonTrivialCallFinder Finder(Ctx);
};
typedef ScopeRAII<false> BlockScopeRAII;
typedef ScopeRAII<true> FullExpressionRAII;
-}
+} // namespace
bool SubobjectDesignator::checkSubobject(EvalInfo &Info, const Expr *E,
CheckSubobjectKind CSK) {
return false;
return LHS.Path == RHS.Path;
}
-}
+} // namespace
static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
static bool EvaluateInPlace(APValue &Result, EvalInfo &Info,
/// Still scanning for 'case' or 'default' statement.
ESR_CaseNotFound
};
-}
+} // namespace
static bool EvaluateDecl(EvalInfo &Info, const Decl *D) {
if (const VarDecl *VD = dyn_cast<VarDecl>(D)) {
}
};
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Common base class for lvalue and temporary evaluation.
}
}
};
-}
+} // namespace
//===----------------------------------------------------------------------===//
// LValue Evaluation
bool VisitCXXConstructExpr(const CXXConstructExpr *E);
bool VisitCXXStdInitializerListExpr(const CXXStdInitializerListExpr *E);
};
-}
+} // namespace
/// Perform zero-initialization on an object of non-union class type.
/// C++11 [dcl.init]p5:
}
};
-}
+} // namespace
bool DataRecursiveIntBinOpEvaluator::
VisitBinOpLHSOnly(EvalResult &LHSResult, const BinaryOperator *E,
ICEDiag(ICEKind IK, SourceLocation l) : Kind(IK), Loc(l) {}
};
-}
+} // namespace
static ICEDiag NoDiag() { return ICEDiag(IK_ICE, SourceLocation()); }
return new ItaniumNumberingContext();
}
};
-}
+} // namespace
CXXABI *clang::CreateItaniumCXXABI(ASTContext &Ctx) {
return new ItaniumCXXABI(Ctx);
void mangleFunctionParam(const ParmVarDecl *parm);
};
-}
+} // namespace
bool ItaniumMangleContextImpl::shouldMangleCXXName(const NamedDecl *D) {
const FunctionDecl *FD = dyn_cast<FunctionDecl>(D);
return new MicrosoftNumberingContext();
}
};
-}
+} // namespace
// getNumBases() seems to only give us the number of direct bases, and not the
// total. This function tells us if we inherit from anybody that uses MI, or if
void mangleTemplateArg(const TemplateDecl *TD, const TemplateArgument &TA,
const NamedDecl *Parm);
};
-}
+} // namespace
bool MicrosoftMangleContextImpl::shouldMangleCXXName(const NamedDecl *D) {
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
memcpy(&Result, static_cast<char *>(Data) + Offset, sizeof(void*));
return Result;
}
-}
+} // namespace
SourceRange NestedNameSpecifierLoc::getSourceRange() const {
if (!Qualifier)
reinterpret_cast<char *>(&Ptr) + sizeof(void *),
Buffer, BufferSize, BufferCapacity);
}
-}
+} // namespace
NestedNameSpecifierLocBuilder::
NestedNameSpecifierLocBuilder(const NestedNameSpecifierLocBuilder &Other)
(void) is_good(implements_getLocStart(&type::getLocStart))
#define ASSERT_IMPLEMENTS_getLocEnd(type) \
(void) is_good(implements_getLocEnd(&type::getLocEnd))
-}
+} // namespace
/// Check whether the various Stmt classes implement their member
/// functions.
return SourceRange(static_cast<const S*>(stmt)->getLocStart(),
static_cast<const S*>(stmt)->getLocEnd());
}
-}
+} // namespace
SourceRange Stmt::getSourceRange() const {
switch (getStmtClass()) {
void Visit##CLASS(CLASS *Node);
#include "clang/AST/StmtNodes.inc"
};
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Stmt printing methods.
OS << ")";
}
}
-}
+} // namespace
//===----------------------------------------------------------------------===//
// OpenMP directives printing methods
/// \brief Visit a single template argument.
void VisitTemplateArgument(const TemplateArgument &Arg);
};
-}
+} // namespace
void StmtProfiler::VisitStmt(const Stmt *S) {
ID.AddInteger(S->getStmtClass());
void OMPClauseProfiler::VisitOMPFlushClause(const OMPFlushClause *C) {
VisitOMPClauseList(C);
}
-}
+} // namespace
void
StmtProfiler::VisitOMPExecutableDirective(const OMPExecutableDirective *S) {
return Visit(T->getOriginalType());
}
};
-}
+} // namespace
AutoType *Type::getContainedAutoType() const {
return GetContainedAutoVisitor().Visit(this);
L.hasLocalOrUnnamedType() | R.hasLocalOrUnnamedType());
}
};
-}
+} // namespace
static CachedProperties computeCachedProperties(const Type *T);
T->TypeBits.CachedLocalOrUnnamed = Result.hasLocalOrUnnamedType();
}
};
-}
+} // namespace clang
// Instantiate the friend template at a private class. In a
// reasonable implementation, these symbols will be internal.
}
#include "clang/AST/TypeLocNodes.def"
};
-}
+} // namespace
SourceRange TypeLoc::getLocalSourceRangeImpl(TypeLoc TL) {
if (TL.isNull()) return SourceRange();
}
#include "clang/AST/TypeLocNodes.def"
};
-}
+} // namespace
/// \brief Returns the alignment of the type source info data block.
unsigned TypeLoc::getLocalAlignmentForType(QualType Ty) {
}
#include "clang/AST/TypeLocNodes.def"
};
-}
+} // namespace
/// \brief Returns the size of the type source info data block.
unsigned TypeLoc::getFullDataSizeForType(QualType Ty) {
}
#include "clang/AST/TypeLocNodes.def"
};
-}
+} // namespace
/// \brief Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the
/// TypeLoc is a PointerLoc and next TypeLoc is for "int".
}
#include "clang/AST/TypeLocNodes.def"
};
-}
+} // namespace
/// \brief Determines if the given type loc corresponds to a
void print##CLASS##After(const CLASS##Type *T, raw_ostream &OS);
#include "clang/AST/TypeNodes.def"
};
-}
+} // namespace
static void AppendTypeQualList(raw_ostream &OS, unsigned TypeQuals, bool C99) {
bool appendSpace = false;
Out << '\n';
}
-}
+} // namespace
VTableLayout::VTableLayout(uint64_t NumVTableComponents,
const VTableComponent *VTableComponents,
private:
ASTContext &C;
};
-}
+} // namespace
BinaryOperator *ASTMaker::makeAssignment(const Expr *LHS, const Expr *RHS,
QualType Ty) {
BodyMap Bodies;
CodeInjector *Injector;
};
-}
+} // namespace clang
#endif
}
};
-}
+} // namespace llvm
StateMap->setState(Var, consumed::CS_Unknown);
}
}
-}} // end clang::consumed::ConsumedStmtVisitor
+} // namespace consumed
+} // namespace clang
namespace clang {
namespace consumed {
WarningsHandler.emitDiagnostics();
}
-}} // end namespace clang::consumed
+} // namespace consumed
+} // namespace clang
const T &getValue() { return FS; }
};
-} // end analyze_format_string namespace
-} // end clang namespace
+} // namespace analyze_format_string
+} // namespace clang
#endif
void sortWorklist();
};
-}
+} // namespace
void DataflowWorklist::enqueueBlock(const clang::CFGBlock *block) {
if (block && !enqueuedBlocks[block->getBlockID()]) {
DSetFact(false), // This is a *major* performance win.
killAtAssign(KillAtAssign) {}
};
-}
+} // namespace
static LiveVariablesImpl &getImpl(void *x) {
return *((LiveVariablesImpl *) x);
}
return A;
}
-}
+} // namespace
void LiveVariables::Observer::anchor() { }
void VisitUnaryOperator(UnaryOperator *UO);
void Visit(Stmt *S);
};
-}
+} // namespace
static const VariableArrayType *FindVA(QualType Ty) {
const Type *ty = Ty.getTypePtr();
const Stmt *S,
clang::reachable_code::Callback &CB);
};
-}
+} // namespace
void DeadCodeScan::enqueue(const CFGBlock *block) {
unsigned blockID = block->getBlockID();
}
}
-}} // end namespace clang::reachable_code
+} // namespace reachable_code
+} // namespace clang
}
}
}
-}
+} // namespace clang
/// Returns the bit vector index for a given declaration.
Optional<unsigned> getValueIndex(const VarDecl *d) const;
};
-}
+} // namespace
void DeclToIndex::computeMap(const DeclContext &dc) {
unsigned count = 0;
void enqueueSuccessors(const CFGBlock *block);
const CFGBlock *dequeue();
};
-}
+} // namespace
void DataflowWorklist::enqueueSuccessors(const clang::CFGBlock *block) {
for (CFGBlock::const_succ_iterator I = block->succ_begin(),
return Init;
}
};
-}
+} // namespace
static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) {
if (VD->getType()->isRecordType()) return nullptr;
return Use;
}
};
-}
+} // namespace
void TransferFunctions::reportUse(const Expr *ex, const VarDecl *vd) {
Value v = vals[vd];
hadAnyUse = true;
}
};
-}
+} // namespace
void clang::runUninitializedVariablesAnalysis(
const DeclContext &dc,
}
};
-} // namespace anonymous
+} // namespace
static const StaticDiagInfoRec StaticDiagInfo[] = {
#define DIAG(ENUM, CLASS, DEFAULT_SEVERITY, DESC, GROUP, SFINAE, NOWERROR, \
return StringRef(NameStr, NameLen);
}
};
-}
+} // namespace
// Unfortunately, the split between DiagnosticIDs and Diagnostic is not
// particularly clean, but for now we just implement this method here so we can
}
};
- } // end diag namespace
-} // end clang namespace
+ } // namespace diag
+} // namespace clang
//===----------------------------------------------------------------------===//
DiagGroupNames[NameOffset]);
}
};
-}
+} // namespace
// Second the table of options, sorted by name for fast binary lookup.
static const WarningOption OptionTable[] = {
KS_Enabled, // Enabled
KS_Future // Is a keyword in future standard
};
-}
+} // namespace
/// \brief Translates flags as specified in TokenKinds.def into keyword status
/// in the given language standard.
return EC;
}
};
-}
+} // namespace
directory_iterator RealFileSystem::dir_begin(const Twine &Dir,
std::error_code &EC) {
JSONWriter(llvm::raw_ostream &OS) : OS(OS) {}
void write(ArrayRef<YAMLVFSEntry> Entries, Optional<bool> IsCaseSensitive);
};
-}
+} // namespace
bool JSONWriter::containedIn(StringRef Parent, StringRef Path) {
using namespace llvm::sys;
const LangOptions &LangOpts;
};
-}
+} // namespace
static void addObjCARCAPElimPass(const PassManagerBuilder &Builder, PassManagerBase &PM) {
if (Builder.OptLevel > 0)
void EmitAtomicUpdateOp(llvm::AtomicOrdering AO, RValue UpdateRal,
bool IsVolatile);
};
-}
+} // namespace
AtomicExpr::AtomicOrderingKind
AtomicInfo::translateAtomicOrdering(const llvm::AtomicOrdering AO) {
return LeftValue > RightValue;
}
-}
+} // namespace
/// Determines if the given type is safe for constant capture in C++.
static bool isSafeForCXXConstantCapture(QualType type) {
CGF.BuildBlockRelease(Addr, BLOCK_FIELD_IS_BYREF);
}
};
-}
+} // namespace
/// Enter a cleanup to destroy a __block variable. Note that this
/// cleanup should be a no-op if the variable hasn't left the stack
class PointerType;
class Value;
class LLVMContext;
-}
+} // namespace llvm
namespace clang {
llvm::Function *makeModuleDtorFunction() override;
};
-}
+} // namespace
CGNVCUDARuntime::CGNVCUDARuntime(CodeGenModule &CGM)
: CGCUDARuntime(CGM), Context(CGM.getLLVMContext()),
/// Creates an instance of a CUDA runtime class.
CGCUDARuntime *CreateNVCUDARuntime(CodeGenModule &CGM);
-}
-}
+} // namespace CodeGen
+} // namespace clang
#endif
/// Creates a Microsoft-family ABI.
CGCXXABI *CreateMicrosoftCXXABI(CodeGenModule &CGM);
-}
-}
+} // namespace CodeGen
+} // namespace clang
#endif
}
};
-}
+} // namespace
struct DisableDebugLocationUpdates {
CodeGenFunction &CGF;
// external code might potentially access the vtable.
void VisitCXXThisExpr(const CXXThisExpr *E) { UsesThis = true; }
};
-}
+} // namespace
static bool BaseInitializerUsesThis(ASTContext &C, const Expr *Init) {
DynamicThisUseChecker Checker(C);
CodeGenFunction &CGF;
SanitizerSet OldSanOpts;
};
-}
+} // namespace
namespace {
class FieldMemcpyizer {
}
};
-}
+} // namespace
/// EmitCtorPrologue - This routine generates necessary code to initialize
/// base classes and non-static data members belonging to this constructor.
flags.isForNormalCleanup() && useEHCleanupForArray);
}
};
-}
+} // namespace
/// \brief Emit all code that comes at the end of class's
/// destructor. This is to call destructors on members and base classes
/*Delegating=*/true, Addr);
}
};
-}
+} // namespace
void
CodeGenFunction::EmitDelegatingCXXConstructorCall(const CXXConstructorDecl *Ctor,
/*Delegating=*/false, Addr);
}
};
-}
+} // namespace
void CodeGenFunction::PushDestructorCleanup(const CXXDestructorDecl *D,
llvm::Value *Addr) {
return stable_iterator(EndOfBuffer - ir.Ptr);
}
-}
-}
+} // namespace CodeGen
+} // namespace clang
#endif
CGF.EmitLifetimeEnd(Size, Addr);
}
};
-}
+} // namespace
/// EmitAutoVarWithLifetime - Does the setup required for an automatic
/// variable with lifetime.
ElementType, Destroyer);
}
};
-}
+} // namespace
/// pushIrregularPartialArrayCleanup - Push an EH cleanup to destroy
/// already-constructed elements of the given array. The cleanup
CGF.EmitARCRelease(Param, Precise);
}
};
-}
+} // namespace
/// Emit an alloca (or GlobalValue depending on target)
/// for the specified parameter and set up LocalDeclMap.
static const EHPersonality MSVC_C_specific_handler;
static const EHPersonality MSVC_CxxFrameHandler3;
};
-}
+} // namespace
const EHPersonality EHPersonality::GNU_C = { "__gcc_personality_v0", nullptr };
const EHPersonality
CGF.EmitNounwindRuntimeCall(getFreeExceptionFn(CGF.CGM), exn);
}
};
-}
+} // namespace
// Emits an exception expression into the given location. This
// differs from EmitAnyExprToMem only in that, if a final copy-ctor
CGF.EnsureInsertPoint();
}
};
-}
+} // namespace
/// Enters a finally block for an implementation using zero-cost
/// exceptions. This is mostly general, but hard-codes some
CGF.EmitCall(FnInfo, OutlinedFinally, ReturnValueSlot(), Args);
}
};
-}
+} // namespace
namespace {
/// Find all local variable captures in the statement.
Captures.push_back(ParentThis);
}
};
-}
+} // namespace
void CodeGenFunction::EmitCapturedLocals(CodeGenFunction &ParentCGF,
const Stmt *OutlinedStmt,
/// Runtime conditionally aborts, always need to support recovery.
AlwaysRecoverable
};
-}
+} // namespace
static CheckRecoverableKind getRecoverableKind(SanitizerMask Kind) {
assert(llvm::countPopulation(Kind) == 1);
EmitNewDeleteCall(CGF, OperatorDelete, FPT, DeleteArgs);
}
};
-}
+} // namespace
/// Enter a cleanup to call 'operator delete' if the initializer in a
/// new-expression throws.
CGF.EmitDeleteCall(OperatorDelete, Ptr, ElementType);
}
};
-}
+} // namespace
void
CodeGenFunction::pushCallObjectDeleteCleanup(const FunctionDecl *OperatorDelete,
EmitNewDeleteCall(CGF, OperatorDelete, DeleteFTy, Args);
}
};
-}
+} // namespace
/// Emit the code for deleting an array of objects.
static void EmitArrayDelete(CodeGenFunction &CGF,
bool operator<(const BaseInfo &O) const { return Offset < O.Offset; }
};
-}
+} // namespace
void ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD,
bool IsPrimaryBase,
method);
}
};
-}
+} // namespace
/// StartObjCMethod - Begin emission of an ObjCMethod. This generates
/// the LLVM function and sets the other context used by
CharUnits IvarSize;
CharUnits IvarAlignment;
};
-}
+} // namespace
/// Pick an implementation strategy for the given property synthesis.
PropertyImplStrategy::PropertyImplStrategy(CodeGenModule &CGM,
flags.isForNormalCleanup() && useEHCleanupForArray);
}
};
-}
+} // namespace
/// Like CodeGenFunction::destroyARCStrong, but do it with a call.
static void destroyARCStrongWithStore(CodeGenFunction &CGF,
CGF.EmitARCRelease(object, ARCImpreciseLifetime);
}
};
-}
+} // namespace
/// Produce the code for a CK_ARCConsumeObject. Does a primitive
/// release at the end of the full-expression.
CGF.EmitObjCMRRAutoreleasePoolPop(Token);
}
};
-}
+} // namespace
void CodeGenFunction::EmitObjCAutoreleasePoolCleanup(llvm::Value *Ptr) {
if (CGM.getLangOpts().ObjCAutoRefCount)
void emitWriteHazard();
void emitHazardsInNewBlocks();
};
-}
+} // namespace
/// Create the fragile-ABI read and write hazards based on the current
/// state of the function, which is presumed to be immediately prior
CGF.EmitRuntimeCallOrInvoke(Fn);
}
};
-}
+} // namespace
void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
CGF.Builder.CreateCall(SyncExitFn, SyncArg)->setDoesNotThrow();
}
};
-}
+} // namespace
void CGObjCRuntime::EmitAtSynchronizedStmt(CodeGenFunction &CGF,
const ObjCAtSynchronizedStmt &S,
//TODO: This should include some way of selecting which runtime to target.
CGObjCRuntime *CreateGNUObjCRuntime(CodeGenModule &CGM);
CGObjCRuntime *CreateMacObjCRuntime(CodeGenModule &CGM);
-}
-}
+} // namespace CodeGen
+} // namespace clang
#endif
virtual llvm::Type *convertOpenCLSpecificType(const Type *T);
};
-}
-}
+} // namespace CodeGen
+} // namespace clang
#endif
CGRecordLowering(const CGRecordLowering &) = delete;
void operator =(const CGRecordLowering &) = delete;
};
-} // namespace {
+} // namespace
CGRecordLowering::CGRecordLowering(CodeGenTypes &Types, const RecordDecl *D, bool Packed)
: Types(Types), Context(Types.getContext()), D(D),
};
void BackendConsumer::anchor() {}
-}
+} // namespace clang
/// ConvertBackendLocation - Convert a location in a temporary llvm::SourceMgr
/// buffer to be a valid FullSourceLoc.
return true;
}
};
-}
+} // namespace
// isTriviallyRecursive - Check if this function calls another
// decl that, because of the asm attribute or the other decl being a builtin,
class FunctionType;
class LLVMContext;
class IndexedInstrProfReader;
-}
+} // namespace llvm
namespace clang {
class TargetCodeGenInfo;
RecordNextStmtCount = true;
}
};
-}
+} // namespace
void PGOHash::combine(HashType Type) {
// Check that we never combine 0 and only have six bits.
// propagate counts into them.
}
};
-}
+} // namespace
static bool isMachO(const CodeGenModule &CGM) {
return CGM.getTarget().getTriple().isOSBinFormatMachO();
// ARM64 libraries are prepared for non-unique RTTI.
bool shouldRTTIBeUnique() const override { return false; }
};
-}
+} // namespace
CodeGen::CGCXXABI *CodeGen::CreateItaniumCXXABI(CodeGenModule &CGM) {
switch (CGM.getTarget().getCXXABI().getKind()) {
Guard);
}
};
-}
+} // namespace
/// The ARM code here follows the Itanium code closely enough that we
/// just special-case it at particular places.
/// \param Force - true to force the creation of this RTTI value
llvm::Constant *BuildTypeInfo(QualType Ty, bool Force = false);
};
-}
+} // namespace
llvm::GlobalVariable *ItaniumRTTIBuilder::GetAddrOfTypeName(
QualType Ty, llvm::GlobalVariable::LinkageTypes Linkage) {
CGF.EmitRuntimeCallOrInvoke(getEndCatchFn(CGF.CGM));
}
};
-}
+} // namespace
/// Emits a call to __cxa_begin_catch and enters a cleanup to call
/// __cxa_end_catch.
llvm::StructType *CatchHandlerTypeType;
};
-}
+} // namespace
CGCXXABI::RecordArgABI
MicrosoftCXXABI::getRecordArgABI(const CXXRecordDecl *RD) const {
CGF.EmitNounwindRuntimeCall(getInitThreadAbortFn(CGF.CGM), Guard);
}
};
-}
+} // namespace
void MicrosoftCXXABI::EmitGuardedInit(CodeGenFunction &CGF, const VarDecl &D,
llvm::GlobalVariable *GV,
Builder->AddDependentLib(Lib);
}
};
-}
+} // namespace
void CodeGenerator::anchor() { }
}
};
-}
+} // namespace
/// Rewrite input constraint references after adding some output constraints.
/// In the case where there is one output and one input and we add one output,
addStackProbeSizeTargetAttribute(D, GV, CGM);
}
-}
+} // namespace
void X86_64ABIInfo::postMerge(unsigned AggregateSize, Class &Lo,
Class &Hi) const {
}
};
-}
+} // namespace
llvm::Value *PPC32_SVR4_ABIInfo::EmitVAArg(llvm::Value *VAListAddr,
QualType Ty,
}
};
-}
+} // namespace
// Return true if the ABI requires Ty to be passed sign- or zero-
// extended to 64 bits.
bool doesReturnSlotInterfereWithArgs() const override { return false; }
};
-}
+} // namespace
ABIArgInfo AArch64ABIInfo::classifyArgumentType(QualType Ty) const {
Ty = useFirstFieldIfTransparentUnion(Ty);
ARMTargetCodeGenInfo::setTargetAttributes(D, GV, CGM);
addStackProbeSizeTargetAttribute(D, GV, CGM);
}
-}
+} // namespace
void ARMABIInfo::computeInfo(CGFunctionInfo &FI) const {
if (!getCXXABI().classifyReturnType(FI))
// Append metadata to nvvm.annotations
MD->addOperand(llvm::MDNode::get(Ctx, MDVals));
}
-}
+} // namespace
//===----------------------------------------------------------------------===//
// SystemZ ABI Implementation
: TargetCodeGenInfo(new SystemZABIInfo(CGT, HasVector)) {}
};
-}
+} // namespace
bool SystemZABIInfo::isPromotableIntegerType(QualType Ty) const {
// Treat an enum type as its underlying type.
CodeGen::CodeGenModule &M) const override;
};
-}
+} // namespace
void MSP430TargetCodeGenInfo::setTargetAttributes(const Decl *D,
llvm::GlobalValue *GV,
return SizeOfUnwindException;
}
};
-}
+} // namespace
void MipsABIInfo::CoerceToIntArgs(
uint64_t TySize, SmallVectorImpl<llvm::Type *> &ArgList) const {
}
}
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Hexagon ABI Implementation
}
};
-}
+} // namespace
void HexagonABIInfo::computeInfo(CGFunctionInfo &FI) const {
if (!getCXXABI().classifyReturnType(FI))
CodeGen::CodeGenModule &M) const override;
};
-}
+} // namespace
void AMDGPUTargetCodeGenInfo::setTargetAttributes(
const Decl *D,
return 0;
}
};
-}
+} // namespace clang
#endif
/// on this runtime library name.
OMPRT_IOMP5
};
-}
+} // namespace
/// Compute the desired OpenMP runtime from the flag provided.
static OpenMPRuntimeKind getOpenMPRuntime(const ToolChain &TC,
const char* getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch);
void appendEBLinkFlags(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple);
-}
+} // namespace arm
namespace mips {
typedef enum {
StringRef ABIName, StringRef FloatABI);
bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
StringRef CPUName, StringRef ABIName, StringRef FloatABI);
-}
+} // namespace mips
namespace ppc {
bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value);
const char *LinkingOutput) const override;
};
-}
+} // namespace darwin
/// openbsd -- Directly call GNU Binutils assembler and linker
namespace openbsd {
const llvm::opt::ArgList &TCArgs,
const char *LinkingOutput) const override;
};
-}
+} // namespace gnutools
namespace nacltools {
class LLVM_LIBRARY_VISIBILITY AssembleARM : public gnutools::Assemble {
const llvm::opt::ArgList &TCArgs,
const char *LinkingOutput) const override;
};
-}
+} // namespace nacltools
/// minix -- Directly call GNU Binutils assembler and linker
namespace minix {
const llvm::opt::ArgList &TCArgs,
const char *LinkingOutput) const override;
};
-}
+} // namespace CrossWindows
/// SHAVE tools -- Directly call moviCompile and moviAsm
namespace SHAVE {
return Seq[Index];
}
};
-}
-}
+} // namespace yaml
+} // namespace llvm
namespace clang {
namespace format {
void HandleTopLevelSingleDecl(Decl *D);
};
-}
+} // namespace
void ASTViewer::HandleTopLevelSingleDecl(Decl *D) {
if (isa<FunctionDecl>(D) || isa<ObjCMethodDecl>(D)) {
/// \brief Erase temporary files and the preamble file.
void Cleanup();
};
-}
+} // namespace
static llvm::sys::SmartMutex<false> &getOnDiskMutex() {
static llvm::sys::SmartMutex<false> M(/* recursive = */ true);
}
};
-}
+} // namespace
std::unique_ptr<ASTConsumer>
PrecompilePreambleAction::CreateASTConsumer(CompilerInstance &CI,
return Next.getCodeCompletionTUInfo();
}
};
-}
+} // namespace
/// \brief Helper function that computes which global names are hidden by the
/// local code-completion results.
void ReadMethodPool(Selector Sel) override;
bool LookupUnqualified(LookupResult &R, Scope *S) override;
};
-}
+} // namespace
static ASTReader *
createASTReader(CompilerInstance &CI, StringRef pchFile,
llvm::APInt getAsInteger() const;
};
-}
+} // namespace
void ModuleSignature::add(uint64_t Value, unsigned int NumBits) {
CurValue |= Value << CurBit;
bool visitInputFile(StringRef Filename, bool isSystem,
bool isOverridden) override;
};
-}
+} // namespace
DependencyFileGenerator::DependencyFileGenerator(void *Impl)
: Impl(Impl) { }
}
};
-}
+} // namespace
void clang::AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile,
StringRef SysRoot) {
}
};
-}
+} // namespace
static void mergeFixits(ArrayRef<FixItHint> FixItHints,
const SourceManager &SM, const LangOptions &LangOpts,
}
#undef DUMP_BOOLEAN
};
-}
+} // namespace
void DumpModuleInfoAction::ExecuteAction() {
// Set up the output file.
SrcMgr::CharacteristicKind FileType,
FileID PrevFID) override;
};
-}
+} // namespace
void clang::AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders,
StringRef OutputPath, bool ShowDepth,
bool visitInputFile(StringRef Filename, bool IsSystem,
bool IsOverridden) override;
};
-}
+} // namespace
void ModuleDependencyCollector::attachToASTReader(ASTReader &R) {
R.addListener(llvm::make_unique<ModuleDependencyListener>(*this));
}
};
-}
+} // namespace
bool FixItRewriter::WriteFixedFiles(
std::vector<std::pair<std::string, std::string> > *RewrittenFiles) {
void Initialize(ASTContext &context) override;
void HandleTranslationUnit(ASTContext &Ctx) override;
};
-}
+} // namespace
std::unique_ptr<ASTConsumer> clang::CreateHTMLPrinter(raw_ostream *OS,
Preprocessor &PP,
}
};
-}
+} // namespace
void RewriteModernObjC::RewriteBlocksInFunctionProtoType(QualType funcType,
NamedDecl *D) {
std::string &Result) override;
Stmt *RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) override;
};
-}
+} // namespace
void RewriteObjC::RewriteBlocksInFunctionProtoType(QualType funcType,
NamedDecl *D) {
llvm_unreachable("Unknown error type!");
}
};
-}
+} // namespace
static llvm::ManagedStatic<SDErrorCategoryType> ErrorCategory;
const std::error_category &clang::serialized_diags::SDErrorCategory() {
const char *PEnd; // previous next/search subject end (1-past)
};
-} // namespace anonymous
+} // namespace
/// ParseDirective - Go through the comment and see if it indicates expected
/// diagnostics. If so, then put them in the appropriate directive list.
bool parseModuleMapFile();
};
-}
+} // namespace clang
SourceLocation ModuleMapParser::consumeToken() {
retry:
/// \brief The 'exhaustive' attribute.
AT_exhaustive
};
-}
+} // namespace
/// \brief Parse a module declaration.
///
void setEnd(SourceLocation L) { Range.setEnd(L); }
};
-}
+} // namespace
static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec,
Token &PeekTok, bool ValueLive,
return CacheExists;
}
};
-}
+} // namespace clang
std::unique_ptr<FileSystemStatCache> PTHManager::createStatCache() {
return llvm::make_unique<PTHStatCache>(*FileLookup);
Failed = true;
}
};
-}
+} // namespace
/// Handle_Pragma - Read a _Pragma directive, slice it up, process it, then
/// return the first token after the directive. The _Pragma token has just
}
};
-}
+} // namespace
unsigned PreprocessingRecord::findBeginLocalPreprocessedEntity(
SourceLocation Loc) const {
Token NextToken;
bool AllowNonTypes;
};
-}
+} // namespace
/// \brief Parse a cast-expression, or, if \pisUnaryExpression is true, parse
/// a unary-expression.
private:
Token NextToken;
};
-}
+} // namespace
StmtResult
Parser::ParseStatementOrDeclarationAfterAttributes(StmtVector &Stmts,
TheParser.Diag(Loc, diag::err_inline_ms_asm_parsing) << D.getMessage();
}
};
-}
+} // namespace
/// Parse an identifier in an MS-style inline assembly block.
///
return CorrectionCandidateCallback::ValidateCandidate(Candidate);
}
};
-}
+} // namespace
/// isCXXDeclarationSpecifier - Returns TPResult::True if it is a declaration
/// specifier, TPResult::False if it is not, TPResult::Ambiguous if it could
/// be either a decl-specifier or a function-style cast, and TPResult::Error
static inline bool classof(const DeltaTreeNode *N) { return !N->isLeaf(); }
};
-}
+} // namespace
/// Destroy - A 'virtual' destructor.
}
}
};
-}
+} // namespace
/// CheckUnreachable - Check for unreachable code.
static void CheckUnreachable(Sema &S, AnalysisDeclContext &AC) {
}
};
-}
+} // namespace
/// 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
bool doesContainReference() const { return FoundReference; }
};
-}
+} // namespace
static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) {
QualType VariableTy = VD->getType().getCanonicalType();
Sema &S;
llvm::SmallPtrSet<const CFGBlock *, 16> ReachableBlocks;
};
-}
+} // namespace
static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC,
bool PerFunction) {
});
}
};
-}
+} // namespace
namespace clang {
namespace {
return SM.isBeforeInTranslationUnit(left.first.first, right.first.first);
}
};
-}}
+} // namespace
+} // namespace clang
//===----------------------------------------------------------------------===//
// -Wthread-safety
Warnings.emplace_back(std::move(Warning), OptionalNotes());
}
};
-}}}
+} // namespace
+} // namespace consumed
+} // namespace clang
//===----------------------------------------------------------------------===//
// AnalysisBasedWarnings - Worker object used by Sema to execute analysis-based
const CXXRecordDecl *DeclaringClass;
};
-}
+} // namespace
/// Checks whether one class might instantiate to the other.
static bool MightInstantiateTo(const CXXRecordDecl *From,
return findFriendship(Cur, 0);
}
};
-}
+} // namespace
/// Search for a class P that EC is a friend of, under the constraint
/// InstanceContext <= P
Sema &SRef;
};
-}
+} // namespace
/// \brief Build a new nested-name-specifier for "identifier::", as described
/// by ActOnCXXNestedNameSpecifier.
PlaceholderKind = (BuiltinType::Kind) 0;
}
};
-}
+} // namespace
// The Try functions attempt a specific way of casting. If they succeed, they
// return TC_Success. If their way of casting is not appropriate for the given
bool IsStringLocation, Range StringRange,
ArrayRef<FixItHint> Fixit = None);
};
-}
+} // namespace
SourceRange CheckFormatHandler::getFormatStringRange() {
return OrigFormatExpr->getSourceRange();
const Expr *E);
};
-}
+} // namespace
bool CheckPrintfHandler::HandleInvalidPrintfConversionSpecifier(
const analyze_printf::PrintfSpecifier &FS,
void HandleIncompleteScanList(const char *start, const char *end) override;
};
-}
+} // namespace
void CheckScanfHandler::HandleIncompleteScanList(const char *start,
const char *end) {
Tree.merge(Elts[I]);
}
};
-}
+} // namespace
void Sema::CheckUnsequencedOperations(Expr *E) {
SmallVector<Expr *, 8> WorkList;
Range = e->getSourceRange();
}
};
-}
+} // namespace
/// Consider whether capturing the given variable can possibly lead to
/// a retain cycle.
}
}
};
-}
+} // namespace
/// Check whether the given argument is a block which captures a
/// variable.
return false;
}
-}
+} // namespace
//===--- CHECK: pointer_with_type_tag attribute: datatypes should match ----//
bool IsImpossibleToSatisfy(const NamedDecl *ND) const;
//@}
};
-}
+} // namespace
class ResultBuilder::ShadowMapEntry::iterator {
llvm::PointerUnion<const NamedDecl *, const DeclIndexPair *> DeclOrIterator;
Results.AddResult(Result, CurContext, Hiding, InBaseClass);
}
};
-}
+} // namespace
/// \brief Add type specifiers for the current language as keyword results.
static void AddTypeSpecifierResults(const LangOptions &LangOpts,
bool AllowClassTemplates;
};
-}
+} // namespace
/// \brief Determine whether the token kind starts a simple-type-specifier.
bool Sema::isSimpleTypeSpecifier(tok::TokenKind Kind) const {
QualType PromotedType;
};
-}
+} // namespace
/// getSpecialMember - get the special member enum for a method.
Sema::CXXSpecialMember Sema::getSpecialMember(const CXXMethodDecl *MD) {
CXXRecordDecl *ExpectedParent;
};
-}
+} // namespace
/// \brief Generate diagnostics for an invalid function redeclaration.
///
SelfReferenceChecker(S, OrigDecl).CheckExpr(E);
}
-}
+} // namespace
/// AddInitializerToDecl - Adds the initializer Init to the
/// declaration dcl. If DirectInit is true, this is C++ direct
return S->Diag(Lambda->getLocStart(),
diag::err_lambda_capture_default_arg);
}
-}
+} // namespace
void
Sema::ImplicitExceptionSpecification::CalledDecl(SourceLocation CallLoc,
CXXRecordDecl *ClassDecl;
};
-}
+} // namespace
/// \brief Handle a C++ member initializer.
MemInitResult
return false;
}
};
-}
+} // namespace
/// \brief Determine whether the given type is an incomplete or zero-lenfgth
/// array type.
return false;
}
-}
+} // namespace
/// ActOnMemInitializers - Handle the member initializers for a constructor.
void Sema::ActOnMemInitializers(Decl *ConstructorDecl,
CheckAbstractUsage(*this, D).Visit(TL, Sel);
}
-}
+} // namespace
/// Check for invalid uses of an abstract type in a method declaration.
static void CheckAbstractClassUsage(AbstractUsageInfo &Info,
bool isAccessible(Subobject Subobj, CXXMethodDecl *D);
};
-}
+} // namespace
/// Is the given special member inaccessible when used on the given
/// sub-object.
}
};
-}
+} // namespace
static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc,
CXXScopeSpec &SS,
return WasAlreadyBeingDeclared;
}
};
-}
+} // namespace
CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor(
CXXRecordDecl *ClassDecl) {
typedef llvm::DenseMap<const Type *, InheritingConstructorsForType> MapType;
MapType Map;
};
-}
+} // namespace
void Sema::DeclareInheritingConstructors(CXXRecordDecl *ClassDecl) {
// Defer declaring the inheriting constructors until the class is
return false;
}
};
-}
+} // namespace
bool Sema::checkThisInStaticMemberFunctionType(CXXMethodDecl *Method) {
TypeSourceInfo *TSInfo = Method->getTypeSourceInfo();
ObjCInterfaceDecl *CurrentIDecl;
};
-}
+} // namespace
static void diagnoseUseOfProtocols(Sema &TheSema,
ObjCContainerDecl *CD,
searchFromContainer(container);
}
};
-}
+} // namespace
void Sema::CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod,
ObjCInterfaceDecl *CurrentClass,
return true;
}
};
-}
+} // namespace
void Sema::DiagnoseUnusedBackingIvarInAccessor(Scope *S,
const ObjCImplementationDecl *ImplD) {
return S.ImpCastExprToType(op, S.Context.getComplexType(toType),
CK_IntegralComplexCast);
}
-}
+} // namespace
/// \brief Handle integer arithmetic conversions. Helper function of
/// UsualArithmeticConversions()
private:
const IdentifierInfo *const FunctionName;
};
-}
+} // namespace
static TypoCorrection TryTypoCorrectionForCall(Sema &S, Expr *Fn,
FunctionDecl *FDecl,
return E;
}
};
-}
+} // namespace
ExprResult Sema::TransformToPotentiallyEvaluated(Expr *E) {
assert(isUnevaluatedContext() &&
bool TraverseTemplateArgument(const TemplateArgument &Arg);
bool TraverseRecordType(RecordType *T);
};
-}
+} // namespace
bool MarkReferencedDecls::TraverseTemplateArgument(
const TemplateArgument &Arg) {
S.UpdateMarkingForLValueToRValue(E->getSubExpr());
}
};
-}
+} // namespace
/// \brief Mark any declarations that appear within this expression or any
/// potentially-evaluated subexpressions as "referenced".
return resolveDecl(E, E->getDecl());
}
};
-}
+} // namespace
/// Given a function expression of unknown-any type, try to rebuild it
/// to have a function type.
return resolveDecl(E, E->getDecl());
}
};
-}
+} // namespace
/// Rebuilds a call expression which yielded __unknown_anytype.
ExprResult RebuildUnknownAnyExpr::VisitCallExpr(CallExpr *E) {
/// in-class initializer.
MismatchResult analyzeInClassInitializer();
};
-}
+} // namespace
MismatchingNewDeleteDetector::MismatchResult
MismatchingNewDeleteDetector::analyzeDeleteExpr(const CXXDeleteExpr *DE) {
return CacheEntry = ExprError();
}
};
-}
+} // namespace
ExprResult
Sema::CorrectDelayedTyposInExpr(Expr *E, VarDecl *InitDecl,
const RecordDecl *const Record;
};
-}
+} // namespace
static bool LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R,
Expr *BaseExpr,
}
};
-}
+} // namespace
Sema::ObjCMessageKind Sema::getObjCMessageKind(Scope *S,
IdentifierInfo *Name,
}
}
};
-}
+} // namespace
bool Sema::isKnownName(StringRef name) {
if (name.empty())
RecordDecl *Record;
};
-}
+} // namespace
/// @brief Check the well-formedness of a C99 designated initializer.
///
UnqualUsingEntry::Comparator()));
}
};
-}
+} // namespace
// Retrieve the set of identifier namespaces that correspond to a
// specific kind of name lookup.
LookupResult &R;
bool OldFindLocalExtern;
};
-}
+} // namespace
bool Sema::CppLookupName(LookupResult &R, Scope *S) {
assert(getLangOpts().CPlusPlus && "Can perform only C++ lookup");
Sema::AssociatedClassSet &Classes;
SourceLocation InstantiationLoc;
};
-}
+} // namespace
static void
addAssociatedClassesAndNamespaces(AssociatedLookup &Result, QualType T);
Diags.popMappings(SavedLoc);
}
};
-}
+} // namespace
OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList,
SourceLocation StartLoc,
struct DFIParamWithArguments : DFIArguments {
TemplateParameter Param;
};
-}
+} // namespace
/// \brief Convert from Sema's representation of template deduction information
/// to the form used in overload-candidate information.
*i->Addr = i->Saved;
}
};
-}
+} // namespace
/// checkPlaceholderForOverload - Do any interesting placeholder-like
/// preprocessing on the given expression.
return S.SourceMgr.isBeforeInTranslationUnit(LLoc, RLoc);
}
};
-}
+} // namespace
/// CompleteNonViableCandidate - Normally, overload resolution only
/// computes up to the first. Produces the FixIt set if possible.
return S.SourceMgr.isBeforeInTranslationUnit(LLoc, RLoc);
}
};
-}
+} // namespace
/// Diagnose a template argument deduction failure.
/// We are treating these failures as overload failures due to bad
return &Matches[0].first;
}
};
-}
+} // namespace
/// ResolveAddressOfOverloadedFunction - Try to resolve the address of
/// an overloaded function (C++ [over.over]), where @p From is an
}
};
-}
+} // namespace
static std::unique_ptr<CorrectionCandidateCallback>
MakeValidator(Sema &SemaRef, MemberExpr *ME, size_t NumArgs,
ExprResult buildGet() override;
ExprResult buildSet(Expr *op, SourceLocation, bool) override;
};
-}
+} // namespace
/// Capture the given expression in an OpaqueValueExpr.
OpaqueValueExpr *PseudoOpBuilder::capture(Expr *e) {
return LHS < RHS.first;
}
};
-}
+} // namespace
/// CmpCaseVals - Comparison predicate for sorting case values.
///
return Decl;
}
-}
+} // namespace
static bool ObjCEnumerationCollection(Expr *Collection) {
return !Collection->isTypeDependent()
Decl *D;
bool Enabled;
};
-}
+} // namespace
/// BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
StmtResult
S.MarkAnyDeclReferenced(T->getLocation(), T, /*OdrUse=*/false);
return true;
}
-}
+} // namespace
TypeLoc Sema::getReturnTypeLoc(FunctionDecl *FD) const {
TypeLoc TL = FD->getTypeSourceInfo()->getTypeLoc().IgnoreParens();
template <> struct isPodLike<CatchHandlerType> {
static const bool value = true;
};
-}
+} // namespace llvm
namespace {
class CatchTypePublicBases {
return false;
}
};
-}
+} // namespace
/// ActOnCXXTryBlock - Takes a try compound-statement and a number of
/// handlers and creates a try statement from them.
return TraverseType(T->getInjectedSpecializationType());
}
};
-}
+} // namespace
/// Determines whether a given type depends on the given parameter
/// list.
bool VisitTagDecl(const TagDecl *Tag);
bool VisitNestedNameSpecifier(NestedNameSpecifier *NNS);
};
-}
+} // namespace
bool UnnamedLocalNoLinkageFinder::VisitBuiltinType(const BuiltinType*) {
return false;
return E;
}
};
-}
+} // namespace
/// \brief Rebuilds a type within the context of the current instantiation.
///
/// terms of noreturn and default calling convention adjustments.
TDF_InOverloadResolution = 0x20
};
-}
+} // namespace clang
using namespace clang;
return TransformType(TLB, TL);
}
};
-}
+} // namespace
Sema::DeduceAutoResult
Sema::DeduceAutoType(TypeSourceInfo *Type, Expr *&Init, QualType &Result) {
SourceLocation loc,
TemplateArgument arg);
};
-}
+} // namespace
bool TemplateInstantiator::AlreadyTransformed(QualType T) {
if (T.isNull())
return true;
}
};
-}
+} // namespace
/// \brief Determine whether it's possible for an unexpanded parameter pack to
/// be valid in this location. This only happens when we're in a declaration
}
};
-}
+} // namespace
/// \brief Called when an expression computing the size of a parameter pack
/// is parsed.
savedAttrs.back()->setNext(nullptr);
}
};
-}
+} // namespace
static void spliceAttrIntoList(AttributeList &attr, AttributeList *&head) {
attr.setNext(head);
///
/// The values of this enum are used in diagnostics.
enum QualifiedFunctionKind { QFK_BlockPointer, QFK_Pointer, QFK_Reference };
-}
+} // namespace
/// Check whether the type T is a qualified function type, and if it is,
/// diagnose that it cannot be contained within the given kind of declarator.
llvm_unreachable("unsupported TypeLoc kind in declarator!");
}
};
-}
+} // namespace
static void fillAtomicQualLoc(AtomicTypeLoc ATL, const DeclaratorChunk &Chunk) {
SourceLocation Loc;
llvm_unreachable("unknown wrapping kind");
}
};
-}
+} // namespace
static bool handleMSPointerTypeQualifierAttr(TypeProcessingState &State,
AttributeList &Attr,
S.Diag(Loc, DiagID) << T;
}
};
-}
+} // namespace
bool Sema::RequireCompleteExprType(Expr *E, unsigned DiagID) {
TypeDiagnoserDiag Diagnoser(DiagID);
}
};
-}
+} // namespace clang
#endif
// files.
IdentifierInfo *getIdentifierInfo() const { return Found; }
};
-}
+} // namespace
void ASTReader::updateOutOfDateIdentifier(IdentifierInfo &II) {
// Note that we are loading an identifier.
SuggestedPredefines, ExistingLangOpts);
}
};
-}
+} // namespace
bool ASTReader::readASTFileControlBlock(
StringRef Filename, FileManager &FileMgr,
}
};
-}
+} // namespace
PreprocessedEntityID ASTReader::findPreprocessedEntity(SourceLocation Loc,
bool EndsAfter) const {
Optional<HeaderFileInfo> getHeaderFileInfo() const { return HFI; }
};
-}
+} // namespace
HeaderFileInfo ASTReader::GetHeaderFileInfo(const FileEntry *FE) {
HeaderFileInfoVisitor Visitor(FE);
return false;
}
};
-}
+} // namespace
ExternalLoadResult ASTReader::FindExternalLexicalDecls(const DeclContext *DC,
bool (*isKindWeWant)(Decl::Kind),
}
};
-}
+} // namespace
void ASTReader::FindFileRegionDecls(FileID File,
unsigned Offset, unsigned Length,
return FoundAnything;
}
};
-}
+} // namespace
/// \brief Retrieve the "definitive" module file for the definition of the
/// given declaration context, if there is one.
return FoundAnything && !This->VisitAll;
}
};
-}
+} // namespace
void ASTReader::completeVisibleDeclsMap(const DeclContext *DC) {
if (!DC->hasExternalVisibleStorage())
StringRef Next() override;
};
-}
+} // namespace clang
ASTIdentifierIterator::ASTIdentifierIterator(const ASTReader &Reader)
: Reader(Reader), Index(Reader.ModuleMgr.size() - 1) {
}
bool factoryHasMoreThanOneDecl() const { return FactoryHasMoreThanOneDecl; }
};
-} } // end namespace clang::serialization
+} // namespace serialization
+ } // namespace clang
/// \brief Add the given set of methods to the method list.
static void addMethodsToPool(Sema &S, ArrayRef<ObjCMethodDecl *> Methods,
}
}
};
-}
+} // namespace clang
namespace {
/// Iterator over the redeclarations of a declaration that have already
return A.Current != B.Current;
}
};
-}
+} // namespace
template<typename DeclT>
llvm::iterator_range<MergedRedeclIterator<DeclT>> merged_redecls(DeclT *D) {
return llvm::iterator_range<MergedRedeclIterator<DeclT>>(
std::make_pair(Canon, IsUnresolved ? PrevFD : FD));
}
}
-}
+} // namespace clang
void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, ...) {
llvm_unreachable("attachPreviousDecl on non-redeclarable declaration");
}
return Chain;
}
};
-}
+} // namespace
void ASTReader::loadPendingDeclChain(Decl *CanonDecl) {
// The decl might have been merged into something else after being added to
return true;
}
};
-}
+} // namespace
void ASTReader::loadObjCCategories(serialization::GlobalDeclID ID,
ObjCInterfaceDecl *D,
typedef llvm::OnDiskChainedHashTable<HeaderFileInfoTrait>
HeaderFileInfoLookupTable;
-} // end namespace clang::serialization::reader
-} // end namespace clang::serialization
+} // namespace reader
+} // namespace serialization
} // end namespace clang
void Visit##Type(Type *);
#include "clang/AST/StmtNodes.inc"
};
-}
+} // namespace clang
void ASTStmtReader::
ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args,
#include "clang/Basic/OpenMPKinds.def"
OMPClause *readClause();
};
-}
+} // namespace clang
OMPClause *OMPClauseReader::readClause() {
OMPClause *C;
#define ABSTRACT_TYPE(Class, Base)
#include "clang/AST/TypeNodes.def"
};
-}
+} // namespace
void ASTTypeWriter::VisitBuiltinType(const BuiltinType *T) {
llvm_unreachable("Built-in types are never serialized");
void VisitFunctionTypeLoc(FunctionTypeLoc TyLoc);
};
-}
+} // namespace
void TypeLocWriter::VisitQualifiedTypeLoc(QualifiedTypeLoc TL) {
// nothing to do
Record.append(LazySpecializations.begin(), LazySpecializations.end());
}
};
-}
+} // namespace clang
void ASTDeclWriter::Visit(Decl *D) {
DeclVisitor<ASTDeclWriter>::Visit(D);
void Visit##Type(Type *);
#include "clang/AST/StmtNodes.inc"
};
-}
+} // namespace clang
void ASTStmtWriter::
AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &Args) {
#include "clang/Basic/OpenMPKinds.def"
void writeClause(OMPClause *C);
};
-}
+} // namespace clang
void OMPClauseWriter::writeClause(OMPClause *C) {
Record.push_back(C->getClauseKind());
/// \brief The index for identifiers.
IDENTIFIER_INDEX
};
-}
+} // namespace
/// \brief The name of the global index file.
static const char * const IndexFileName = "modules.idx";
typedef llvm::OnDiskIterableChainedHashTable<IdentifierIndexReaderTrait>
IdentifierIndexTable;
-}
+} // namespace
GlobalModuleIndex::GlobalModuleIndex(std::unique_ptr<llvm::MemoryBuffer> Buffer,
llvm::BitstreamCursor Cursor)
/// \brief Write the index to the given bitstream.
void writeIndex(llvm::BitstreamWriter &Stream);
};
-}
+} // namespace
static void emitBlockID(unsigned ID, const char *Name,
llvm::BitstreamWriter &Stream,
return std::make_pair(k, IsInteresting);
}
};
-}
+} // namespace
bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) {
// Open the module file.
}
};
-}
+} // namespace
void GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
using namespace llvm;
return Result;
}
};
-}
+} // namespace
IdentifierIterator *GlobalModuleIndex::createIdentifierIterator() const {
IdentifierIndexTable &Table =
return M->ModuleName;
}
};
-}
+} // namespace llvm
void ModuleManager::viewGraph() {
llvm::ViewGraph(*this, "Modules");
void dump() const;
void dumpToStream(raw_ostream &os) const;
};
-}
+} // namespace
static SVal computeExtentBegin(SValBuilder &svalBuilder,
const MemRegion *region) {
void checkPostStmt(const ObjCArrayLiteral *AL,
CheckerContext &C) const;
};
-}
+} // namespace
void NilArgChecker::warnIfNilExpr(const Expr *E,
const char *Msg,
public:
void checkPreObjCMessage(const ObjCMethodCall &msg, CheckerContext &C) const;
};
-}
+} // namespace
void ClassReleaseChecker::checkPreObjCMessage(const ObjCMethodCall &msg,
CheckerContext &C) const {
public:
void checkPreObjCMessage(const ObjCMethodCall &msg, CheckerContext &C) const;
};
-}
+} // namespace
/// isVariadicMessage - Returns whether the given message is a variadic message,
/// where all arguments must be Objective-C types.
const CallEvent *Call,
PointerEscapeKind Kind) const;
};
-}
+} // namespace
static bool isKnownNonNilCollectionType(QualType T) {
const ObjCObjectPointerType *PT = T->getAs<ObjCObjectPointerType>();
void checkPostObjCMessage(const ObjCMethodCall &M, CheckerContext &C) const;
};
-}
+} // namespace
ProgramStateRef
ObjCNonNilReturnValueChecker::assumeExprIsNonNull(const Expr *NonNullExpr,
walker.Visit(D->getBody());
}
};
-}
+} // namespace
void ento::registerCStringSyntaxChecker(CheckerManager &mgr) {
mgr.registerChecker<CStringSyntaxChecker>();
BR);
}
};
-}
+} // namespace
void ento::registerObjCDeallocChecker(CheckerManager &mgr) {
mgr.registerChecker<ObjCDeallocChecker>();
walker.Visit(D->getBody());
}
};
-}
+} // namespace
#define REGISTER_CHECKER(name) \
void ento::register##name(CheckerManager &mgr) { \
void VisitStmt(Stmt *S) { VisitChildren(S); }
void VisitChildren(Stmt *S);
};
-}
+} // namespace
void WalkAST::VisitChildren(Stmt *S) {
for (Stmt::child_iterator I = S->child_begin(), E = S->child_end(); I!=E; ++I)
#undef CHECKER
#undef GET_CHECKERS
-} // end ento namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
return reachable[block->getBlockID()];
}
};
-}
+} // namespace
void ReachableCode::computeReachableBlocks() {
if (!cfg.getNumBlockIDs())
}
}
};
-}
+} // namespace
void ento::registerDeadStoresChecker(CheckerManager &mgr) {
mgr.registerChecker<DeadStoresChecker>();
}
}
};
-}
+} // namespace
void ento::registerDominatorsTreeDumper(CheckerManager &mgr) {
mgr.registerChecker<DominatorsTreeDumper>();
}
}
};
-}
+} // namespace
void ento::registerLiveVariablesDumper(CheckerManager &mgr) {
mgr.registerChecker<LiveVariablesDumper>();
}
}
};
-}
+} // namespace
void ento::registerCFGViewer(CheckerManager &mgr) {
mgr.registerChecker<CFGViewer>();
}
}
};
-}
+} // namespace
void ento::registerCFGDumper(CheckerManager &mgr) {
mgr.registerChecker<CFGDumper>();
CG.viewGraph();
}
};
-}
+} // namespace
void ento::registerCallGraphViewer(CheckerManager &mgr) {
mgr.registerChecker<CallGraphViewer>();
CG.dump();
}
};
-}
+} // namespace
void ento::registerCallGraphDumper(CheckerManager &mgr) {
mgr.registerChecker<CallGraphDumper>();
llvm::errs() << "[stats]\n" << "num-entries = " << Keys.size() << '\n';
}
};
-}
+} // namespace
void ento::registerConfigDumper(CheckerManager &mgr) {
mgr.registerChecker<ConfigDumper>();
}
}
}
-}
+} // namespace
// Register the checker that checks for direct accesses in all functions,
// except for the initialization and copy routines.
void checkPostStmt(const ImplicitCastExpr *CastE, CheckerContext &C) const;
void checkPostStmt(const CXXNewExpr *NewE, CheckerContext &C) const;
};
-}
+} // namespace
static void recordFixedType(const MemRegion *Region, const CXXMethodDecl *MD,
CheckerContext &C) {
public:
bool evalCall(const CallExpr *CE, CheckerContext &C) const;
};
-}
+} // namespace
bool ExprInspectionChecker::evalCall(const CallExpr *CE,
CheckerContext &C) const {
VisitStmt(ME);
}
-}
+} // namespace
// Register the checkers.
namespace {
Walker.visit(D);
}
};
-}
+} // namespace
#define REGISTER_CHECKER(name) \
void ento::register##name(CheckerManager &mgr) { \
CheckStringRefAssignedTemporary(D, BR, this);
}
};
-}
+} // namespace
void ento::registerLLVMConventionsChecker(CheckerManager &mgr) {
mgr.registerChecker<LLVMConventionsChecker>();
BugReport &BR) override;
};
};
-}
+} // namespace
/// ProgramState traits to store the currently allocated (and not yet freed)
/// symbols. This is a map from the allocated content symbol to the
toScanFor(v), Context(ctx)
{ }
};
-}
+} // namespace
// OutputPossibleOverflows - We've found a possible overflow earlier,
// now check whether Body might contain a comparison which might be
}
};
-}
+} // namespace
void ento::registerMallocSizeofChecker(CheckerManager &mgr) {
mgr.registerChecker<MallocSizeofChecker>();
void checkASTDecl(const ObjCMethodDecl *D,
AnalysisManager &mgr, BugReporter &BR) const;
};
-}
+} // namespace
void NSErrorMethodChecker::checkASTDecl(const ObjCMethodDecl *D,
AnalysisManager &mgr,
void checkASTDecl(const FunctionDecl *D,
AnalysisManager &mgr, BugReporter &BR) const;
};
-}
+} // namespace
void CFErrorFunctionChecker::checkASTDecl(const FunctionDecl *D,
AnalysisManager &mgr,
"Coding conventions (Apple)") {}
};
-}
+} // namespace
namespace {
class NSOrCFErrorDerefChecker
CheckerContext &C) const;
void checkEvent(ImplicitNullDerefEvent event) const;
};
-}
+} // namespace
typedef llvm::ImmutableMap<SymbolRef, unsigned> ErrorOutFlag;
REGISTER_TRAIT_WITH_PROGRAMSTATE(NSErrorOut, ErrorOutFlag)
void checkPostObjCMessage(const ObjCMethodCall &msg, CheckerContext &C) const;
};
-}
+} // namespace
void NoReturnFunctionChecker::checkPostCall(const CallEvent &CE,
CheckerContext &C) const {
walker.Visit(D->getBody());
}
};
-}
+} // namespace
void ento::registerObjCContainersASTChecker(CheckerManager &mgr) {
mgr.registerChecker<ObjCContainersASTChecker>();
mutable bool IsInitialized;
};
-}
+} // namespace
/// \brief Determine whether the given class has a superclass that we want
/// to check. The name of the found superclass is stored in SuperclassName.
ID.AddInteger((unsigned) X.getObjKind());
}
};
-} // end llvm namespace
+} // namespace llvm
//===----------------------------------------------------------------------===//
// Reference-counting logic (typestate + counts).
IdentifierInfo *getIdentifier() const { return II; }
Selector getSelector() const { return S; }
};
-}
+} // namespace
namespace llvm {
template <> struct DenseMapInfo<ObjCSummaryKey> {
}
};
-} // end llvm namespace
+} // namespace llvm
namespace {
class ObjCSummaryCache {
#undef createCallEffect
-}}}
+} // namespace objc_retain
+} // namespace ento
+} // namespace clang
public:
void checkPreStmt(const ReturnStmt *RS, CheckerContext &C) const;
};
-}
+} // namespace
void ReturnUndefChecker::checkPreStmt(const ReturnStmt *RS,
CheckerContext &C) const {
static SourceRange genName(raw_ostream &os, const MemRegion *R,
ASTContext &Ctx);
};
-}
+} // namespace
SourceRange StackAddrEscapeChecker::genName(raw_ostream &os, const MemRegion *R,
ASTContext &Ctx) {
public:
void checkPostStmt(const Expr *E, CheckerContext &C) const;
};
-}
+} // namespace
inline void TaintTesterChecker::initBugType() const {
if (!BT)
void checkBranchCondition(const Stmt *Condition, CheckerContext &Ctx) const;
};
-}
+} // namespace
void UndefBranchChecker::checkBranchCondition(const Stmt *Condition,
CheckerContext &Ctx) const {
static bool isInvalidPath(const CFGBlock *CB, const ParentMap &PM);
static inline bool isEmptyCFGBlock(const CFGBlock *CB);
};
-}
+} // namespace
void UnreachableCodeChecker::checkEndAnalysis(ExplodedGraph &G,
BugReporter &B,
}
}
};
-}
+} // namespace
void ento::registerVirtualCallChecker(CheckerManager &mgr) {
mgr.registerChecker<VirtualCallChecker>();
X.second.Profile(ID);
}
};
-}
+} // namespace llvm
typedef llvm::FoldingSet<llvm::FoldingSetNodeWrapper<SValData> >
PersistentSValsTy;
}
};
-}
+} // namespace
typedef llvm::ImmutableMap<CountKey, unsigned> CountMap;
bool popNextReportGraph(ReportGraph &GraphWrapper);
};
-}
+} // namespace
TrimmedGraph::TrimmedGraph(const ExplodedGraph *OriginalGraph,
ArrayRef<const ExplodedNode *> Nodes) {
checkFn(S, C);
}
};
-}
+} // namespace
/// \brief Run checkers for visiting Stmts.
void CheckerManager::runCheckersForStmt(bool isPreVisit,
checkFn(*Msg.cloneWithState<ObjCMethodCall>(Pred->getState()), C);
}
};
-}
+} // namespace
/// \brief Run checkers for visiting obj-c messages.
void CheckerManager::runCheckersForObjCMessage(bool isPreVisit,
checkFn(*Call.cloneWithState(Pred->getState()), C);
}
};
-}
+} // namespace
/// \brief Run checkers for visiting an abstract call event.
void CheckerManager::runCheckersForCallEvent(bool isPreVisit,
checkFn(Loc, IsLoad, BoundEx, C);
}
};
-}
+} // namespace
/// \brief Run checkers for load/store of a location.
checkFn(Loc, Val, S, C);
}
};
-}
+} // namespace
/// \brief Run checkers for binding of a value to a location.
void CheckerManager::runCheckersForBind(ExplodedNodeSet &Dst,
checkFn(Condition, C);
}
};
-}
+} // namespace
/// \brief Run checkers for branch condition.
void CheckerManager::runCheckersForBranchCondition(const Stmt *Condition,
checkFn(SR, C);
}
};
-}
+} // namespace
/// \brief Run checkers for dead symbols.
void CheckerManager::runCheckersForDeadSymbols(ExplodedNodeSet &Dst,
return Out.str();
}
};
-} // end llvm namespace
+} // namespace llvm
#endif
void ExprEngine::ViewGraph(bool trim) {
}
};
-} // end ento namespace
-} // end clang namespace
+} // namespace ento
+} // namespace clang
#endif
Mgr.freeStates.push_back(s);
}
}
-}}
+} // namespace ento
+} // namespace clang
ProgramState::ProgramState(ProgramStateManager *mgr, const Environment& env,
StoreRef st, GenericDataMap gdm)
template <> struct isPodLike<BindingKey> {
static const bool value = true;
};
-} // end llvm namespace
+} // namespace llvm
LLVM_DUMP_METHOD void BindingKey::dump() const { llvm::errs() << *this; }
bool supportsFields() const { return SupportsFields; }
};
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Main RegionStore logic.
static_cast<DERIVED*>(this)->VisitCluster(BaseR, C);
}
};
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Binding invalidation.
void VisitCluster(const MemRegion *baseR, const ClusterBindings *C);
void VisitBinding(SVal V);
};
-}
+} // namespace
void invalidateRegionsWorker::VisitBinding(SVal V) {
// A symbol? Mark it touched by the invalidation.
bool UpdatePostponed();
void VisitBinding(SVal V);
};
-}
+} // namespace
void removeDeadBindingsWorker::VisitAddedToCluster(const MemRegion *baseR,
const ClusterBindings &C) {
bool Assumption);
};
-} // end GR namespace
+} // namespace ento
-} // end clang namespace
+} // namespace clang
#endif
// BodyFarm.
llvm::StringMap<Stmt *> Bodies;
};
-}
-}
+} // namespace ento
+} // namespace clang
#endif
FrontendAction *create() override { return Action; }
};
-}
+} // namespace
ToolInvocation::ToolInvocation(
std::vector<std::string> CommandLine, ToolAction *Action,
}
};
-}
+} // namespace
int ClangTool::buildASTs(std::vector<std::unique_ptr<ASTUnit>> &ASTs) {
ASTBuilderAction Action(ASTs);
RegisterDiagTool() { diagTools->registerTool(new DIAGTOOL()); }
};
-} // end diagtool namespace
+} // namespace diagtool
#define DEF_DIAGTOOL(NAME, DESC, CLSNAME)\
namespace {\
bool operator<(const Entry &x) const { return DiagName < x.DiagName; }
};
-}
+} // namespace
static void printEntries(std::vector<Entry> &entries, llvm::raw_ostream &out) {
for (std::vector<Entry>::iterator it = entries.begin(), ei = entries.end();
bool operator<(const PrettyDiag &x) const { return Name < x.Name; }
};
-}
+} // namespace
static void printUsage() {
llvm::errs() << "Usage: diagtool show-enabled [<flags>] <single-input.c>\n";
DiagnosticsEngine &Diags);
};
-}
+} // namespace
bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
ArrayRef<const char *> Argv,
void EnqueueChildren(const Stmt *S);
void EnqueueChildren(const OMPClause *S);
};
-} // end anonyous namespace
+} // namespace
void EnqueueVisitor::AddDeclarationNameInfo(const Stmt *S) {
// 'S' should always be non-null, since it comes from the
void OMPClauseEnqueue::VisitOMPFlushClause(const OMPFlushClause *C) {
VisitOMPClauseList(C);
}
-}
+} // namespace
void EnqueueVisitor::EnqueueChildren(const OMPClause *S) {
unsigned size = WL.size();
return Pieces;
}
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Misc. API hooks.
assert(PostChildrenInfos.empty());
}
};
-}
+} // namespace
void AnnotateTokensWorker::AnnotateTokens() {
// Walk the AST within the region of interest, annotating tokens
SafetyStackThreadSize = Value;
}
-}
+} // namespace clang
void clang::setThreadBackgroundPriority() {
if (getenv("LIBCLANG_BGPRIO_DISABLE"))
StoredResults.clear();
}
};
-}
+} // namespace
extern "C" {
struct CodeCompleteAtInfo {
return result < 0;
}
};
-}
+} // namespace
extern "C" {
void clang_sortCodeCompletionResults(CXCompletionResult *Results,
CXDiagnosticSetImpl *CurrentSet;
CXDiagnosticSetImpl *MainSet;
};
-}
+} // namespace
CXDiagnosticSetImpl *cxdiag::lazyCreateDiags(CXTranslationUnit TU,
bool checkIfChanged) {
MacroDefinitionRecord *checkForMacroInMacroDefinition(const MacroInfo *MI,
const Token &Tok,
CXTranslationUnit TU);
- }
- }
+ } // namespace cxindex
+ } // namespace clang
#endif
Logger &operator<<(const llvm::format_object_base &Fmt);
};
-}
-}
+} // namespace cxindex
+} // namespace clang
/// \brief Macros to automate common uses of Logger. Like this:
/// \code
x.data[1] == y.data[1];
}
};
-}
+} // namespace llvm
extern "C" {
CXCursorSet clang_createCXCursorSet() {
}
}
};
-}
+} // namespace
void *cxcursor::createOverridenCXCursorsPool() {
return new OverridenCursorsPool();
/// first in a declaration group.
bool isFirstInDeclGroup(CXCursor C);
-}} // end namespace: clang::cxcursor
+} // namespace cxcursor
+} // namespace clang
#endif
return mem;
}
};
-}
+} // namespace
//===----------------------------------------------------------------------===//
// Cleanup.
CXDiagnosticSet load(const char *file);
};
-}
+} // namespace
CXDiagnosticSet DiagLoader::load(const char *file) {
TopDiags = llvm::make_unique<CXLoadedDiagnosticSetImpl>();
unsigned severity;
unsigned category;
};
-}
+} // namespace clang
#endif
}
-}} // end namespace: clang::cxloc
+} // namespace cxloc
+} // namespace clang
#endif
/// \brief Returns true if the CXString data is managed by a pool.
bool isManagedByPool(CXString str);
-}
+} // namespace cxstring
static inline StringRef getContents(const CXUnsavedFile &UF) {
return StringRef(UF.Contents, UF.Length);
}
-}
+} // namespace clang
#endif
};
-}} // end namespace clang::cxtu
+} // namespace cxtu
+} // namespace clang
#endif
LLVM_ATTRIBUTE_NOINLINE bool Visit(const Stmt *S);
};
-}
-}
+} // namespace cxcursor
+} // namespace clang
#endif
return LHS == RHS;
}
};
-}
+} // namespace llvm
namespace {
return IdxCtx.StrScratch.Allocate<T>();
}
-}} // end clang::cxindex
+} // namespace cxindex
+} // namespace clang
#endif
}
};
};
-}
+} // namespace
TEST(EvaluateAsRValue, FailsGracefullyForUnknownTypes) {
// This is a regression test; the AST library used to trigger assertion
EXPECT_FALSE(Diags.hasUnrecoverableErrorOccurred());
}
-}
+} // namespace
}
};
-}
+} // namespace
TEST_F(SourceManagerTest, isBeforeInTranslationUnitWithMacroInInclude) {
const char *header =
}
operator StringRef() { return Path.str(); }
};
-}
+} // namespace
TEST(VirtualFileSystemTest, BasicRealFSIteration) {
ScopedDir TestDirectory("virtual-file-system-test", /*Unique*/true);
clang::ParseAST(compiler.getSema(), false, false);
}
-}
+} // namespace
verifyFormat("var x: {[k: string]: v};");
}
-} // end namespace tooling
+} // namespace format
} // end namespace clang
" void f() {}"));
}
-} // end namespace tooling
+} // namespace format
} // end namespace clang
"};");
}
-} // end namespace tooling
+} // namespace format
} // end namespace clang
ASSERT_EQ(ExpectedState, Parameters.State);
}
-} // anonoymous namespace
+} // namespace
Callback);
}
-} // end namespace ast_matchers
+} // namespace tooling
} // end namespace clang
std::vector<MatchCandidate> DisallowedMatches;
std::vector<ExpectedMatch> ExpectedMatches;
};
-}
+} // namespace clang
#endif
clang_VirtualFileOverlay_dispose(VFO);
}
};
-}
+} // namespace
TEST(libclang, VirtualFileOverlay_Basic) {
const char *contents =
getType(), "SA->get" + std::string(getUpperName()) + "Loc()");
}
};
-}
+} // namespace
static std::unique_ptr<Argument>
createArgument(const Record &Arg, StringRef Attr,
Float32,
Float64
};
-}
+} // namespace NeonTypeFlags
class Intrinsic;
class NeonEmitter;
return false;
}
-}
+} // namespace
int main(int argc, char **argv) {
sys::PrintStackTraceOnErrorSignal();