/external/llvm-project/clang-tools-extra/clangd/unittests/ |
D | ConfigProviderTests.cpp | 60 CapturedDiags Diags; in TEST() local 64 Config Cfg = Combined->getConfig(Params(), Diags.callback()); in TEST() 65 EXPECT_THAT(Diags.Diagnostics, in TEST() 68 Diags.Diagnostics.clear(); in TEST() 70 Cfg = Combined->getConfig(Params(), Diags.callback()); in TEST() 71 EXPECT_THAT(Diags.Diagnostics, in TEST() 94 CapturedDiags Diags; in TEST() local 96 auto Cfg = P->getConfig(Params(), Diags.callback()); in TEST() 97 EXPECT_THAT(Diags.Diagnostics, in TEST() 99 EXPECT_THAT(Diags.Files, ElementsAre(testPath("foo.yaml"))); in TEST() [all …]
|
D | ConfigYAMLTests.cpp | 48 CapturedDiags Diags; in TEST() local 68 auto Results = Fragment::parseYAML(YAML, "config.yaml", Diags.callback()); in TEST() 69 EXPECT_THAT(Diags.Diagnostics, IsEmpty()); in TEST() 70 EXPECT_THAT(Diags.Files, ElementsAre("config.yaml")); in TEST() 86 CapturedDiags Diags; in TEST() local 92 Fragment::parseYAML(YAML.code(), "config.yaml", Diags.callback()); in TEST() 93 EXPECT_THAT(Diags.Diagnostics, IsEmpty()); in TEST() 102 CapturedDiags Diags; in TEST() local 112 Fragment::parseYAML(YAML.code(), "config.yaml", Diags.callback()); in TEST() 115 Diags.Diagnostics, in TEST() [all …]
|
D | ConfigCompileTests.cpp | 36 CapturedDiags Diags; member in clang::clangd::config::__anon1dffab660111::ConfigCompileTests 43 Diags.Diagnostics.clear(); in compileAndApply() 44 auto Compiled = std::move(Frag).compile(Diags.callback()); in compileAndApply() 54 EXPECT_THAT(Diags.Diagnostics, IsEmpty()); in TEST_F() 61 EXPECT_THAT(Diags.Diagnostics, IsEmpty()); in TEST_F() 71 EXPECT_THAT(Diags.Diagnostics, IsEmpty()); in TEST_F() 78 EXPECT_THAT(Diags.Diagnostics, IsEmpty()); in TEST_F() 85 EXPECT_THAT(Diags.Diagnostics, IsEmpty()); in TEST_F() 91 EXPECT_THAT(Diags.Diagnostics, SizeIs(1)); in TEST_F() 92 EXPECT_THAT(Diags.Diagnostics.front().Message, StartsWith("Invalid regex")); in TEST_F() [all …]
|
/external/clang/unittests/Basic/ |
D | DiagnosticTest.cpp | 21 DiagnosticsEngine Diags(new DiagnosticIDs(), in TEST() local 24 Diags.setSuppressAllDiagnostics(true); in TEST() 27 DiagnosticErrorTrap trap(Diags); in TEST() 30 Diags.Report(diag::err_target_unknown_triple) << "unknown"; in TEST() 33 Diags.Report(diag::err_cannot_open_file) << "file" << "error"; in TEST() 37 Diags.Report(diag::warn_mt_message) << "warning"; in TEST() 43 EXPECT_FALSE(Diags.hasErrorOccurred()); in TEST() 44 EXPECT_FALSE(Diags.hasFatalErrorOccurred()); in TEST() 45 EXPECT_FALSE(Diags.hasUncompilableErrorOccurred()); in TEST() 46 EXPECT_FALSE(Diags.hasUnrecoverableErrorOccurred()); in TEST() [all …]
|
/external/clang/lib/Basic/ |
D | Warnings.cpp | 35 static void EmitUnknownDiagWarning(DiagnosticsEngine &Diags, in EmitUnknownDiagWarning() argument 39 Diags.Report(diag::warn_unknown_diag_option) in EmitUnknownDiagWarning() 44 void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, in ProcessWarningOptions() argument 47 Diags.setSuppressSystemWarnings(true); // Default to -Wno-system-headers in ProcessWarningOptions() 48 Diags.setIgnoreAllWarnings(Opts.IgnoreWarnings); in ProcessWarningOptions() 49 Diags.setShowOverloads(Opts.getShowOverloads()); in ProcessWarningOptions() 51 Diags.setElideType(Opts.ElideType); in ProcessWarningOptions() 52 Diags.setPrintTemplateTree(Opts.ShowTemplateTree); in ProcessWarningOptions() 53 Diags.setShowColors(Opts.ShowColors); in ProcessWarningOptions() 57 Diags.setErrorLimit(Opts.ErrorLimit); in ProcessWarningOptions() [all …]
|
/external/llvm-project/clang/lib/Basic/ |
D | Warnings.cpp | 34 static void EmitUnknownDiagWarning(DiagnosticsEngine &Diags, in EmitUnknownDiagWarning() argument 38 Diags.Report(diag::warn_unknown_diag_option) in EmitUnknownDiagWarning() 44 void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, in ProcessWarningOptions() argument 47 Diags.setSuppressSystemWarnings(true); // Default to -Wno-system-headers in ProcessWarningOptions() 48 Diags.setIgnoreAllWarnings(Opts.IgnoreWarnings); in ProcessWarningOptions() 49 Diags.setShowOverloads(Opts.getShowOverloads()); in ProcessWarningOptions() 51 Diags.setElideType(Opts.ElideType); in ProcessWarningOptions() 52 Diags.setPrintTemplateTree(Opts.ShowTemplateTree); in ProcessWarningOptions() 53 Diags.setShowColors(Opts.ShowColors); in ProcessWarningOptions() 57 Diags.setErrorLimit(Opts.ErrorLimit); in ProcessWarningOptions() [all …]
|
/external/llvm-project/clang/unittests/Basic/ |
D | DiagnosticTest.cpp | 21 DiagnosticsEngine Diags(new DiagnosticIDs(), in TEST() local 24 Diags.setSuppressAllDiagnostics(true); in TEST() 27 DiagnosticErrorTrap trap(Diags); in TEST() 30 Diags.Report(diag::err_target_unknown_triple) << "unknown"; in TEST() 33 Diags.Report(diag::err_cannot_open_file) << "file" << "error"; in TEST() 37 Diags.Report(diag::warn_mt_message) << "warning"; in TEST() 43 EXPECT_FALSE(Diags.hasErrorOccurred()); in TEST() 44 EXPECT_FALSE(Diags.hasFatalErrorOccurred()); in TEST() 45 EXPECT_FALSE(Diags.hasUncompilableErrorOccurred()); in TEST() 46 EXPECT_FALSE(Diags.hasUnrecoverableErrorOccurred()); in TEST() [all …]
|
/external/llvm-project/clang/unittests/StaticAnalyzer/ |
D | RegisterCustomCheckersTest.cpp | 52 std::string Diags; in TEST() local 53 EXPECT_TRUE(runCheckerOnCode<addCustomChecker>("void f() {;}", Diags)); in TEST() 54 EXPECT_EQ(Diags, "test.CustomChecker:Custom diagnostic description\n"); in TEST() 170 std::string Diags; in TEST() local 171 EXPECT_TRUE(runCheckerOnCode<addDep>("void f() {int i;}", Diags)); in TEST() 172 EXPECT_EQ(Diags, "test.RegistrationOrder:test.RegistrationOrder\n"); in TEST() 272 std::string Diags; in TEST() local 274 "void f() {int i;}", Diags)); in TEST() 275 EXPECT_EQ(Diags, "test.RegistrationOrder:test.WeakDep\ntest." in TEST() 277 Diags.clear(); in TEST() [all …]
|
D | CheckerRegistration.h | 27 void FlushDiagnosticsImpl(std::vector<const PathDiagnostic *> &Diags, in FlushDiagnosticsImpl() argument 29 for (const auto *PD : Diags) in FlushDiagnosticsImpl() 79 bool runCheckerOnCode(const std::string &Code, std::string &Diags) { in runCheckerOnCode() argument 81 llvm::raw_string_ostream OS(Diags); in runCheckerOnCode() 88 std::string Diags; in runCheckerOnCode() local 89 return runCheckerOnCode<Fns...>(Code, Diags); in runCheckerOnCode() 95 std::string &Diags) { in runCheckerOnCodeWithArgs() argument 97 llvm::raw_string_ostream OS(Diags); in runCheckerOnCodeWithArgs() 105 std::string Diags; in runCheckerOnCodeWithArgs() local 106 return runCheckerOnCodeWithArgs<Fns...>(Code, Args, Diags); in runCheckerOnCodeWithArgs()
|
/external/llvm-project/clang/unittests/Frontend/ |
D | CompilerInvocationTest.cpp | 26 IntrusiveRefCntPtr<DiagnosticsEngine> Diags; member in __anon3ef532710111::CommandLineTest 36 : Diags(CompilerInstance::createDiagnostics(new DiagnosticOptions(), in CommandLineTest() 47 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F() 49 ASSERT_FALSE(Diags->hasErrorOccurred()); in TEST_F() 60 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F() 62 ASSERT_FALSE(Diags->hasErrorOccurred()); in TEST_F() 73 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F() 76 ASSERT_TRUE(Diags->hasErrorOccurred()); in TEST_F() 83 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F() 85 ASSERT_FALSE(Diags->hasErrorOccurred()); in TEST_F() [all …]
|
D | ASTUnitTest.cpp | 32 IntrusiveRefCntPtr<DiagnosticsEngine> Diags; member in __anon30b699440111::ASTUnitTest 44 Diags = CompilerInstance::createDiagnostics(new DiagnosticOptions()); in createASTUnit() 46 CInvok = createInvocationFromCommandLine(Args, Diags); in createASTUnit() 56 CInvok, PCHContainerOps, Diags, FileMgr, false, CaptureDiagsKind::None, in createASTUnit() 93 ASTUnit::LoadEverything, Diags, FileSystemOptions(), in TEST_F() 135 Diags = CompilerInstance::createDiagnostics(new DiagnosticOptions()); in TEST_F() 136 CInvok = createInvocationFromCommandLine(Args, Diags); in TEST_F() 143 CInvok, PCHContainerOps, Diags, FileMgr, false, CaptureDiagsKind::None, 1, in TEST_F() 161 auto Diags = CompilerInstance::createDiagnostics(new DiagnosticOptions()); in TEST_F() local 166 &Args[0], &Args[4], PCHContainerOps, Diags, "", false, in TEST_F() [all …]
|
/external/llvm-project/polly/lib/External/isl/interface/ |
D | extract_interface.cc | 179 static Driver *construct_driver(const char *binary, DiagnosticsEngine &Diags) in construct_driver() argument 182 "", false, false, Diags); in construct_driver() 185 static Driver *construct_driver(const char *binary, DiagnosticsEngine &Diags) in construct_driver() argument 188 "", false, Diags); in construct_driver() 191 static Driver *construct_driver(const char *binary, DiagnosticsEngine &Diags) in construct_driver() argument 194 "", Diags); in construct_driver() 197 static Driver *construct_driver(const char *binary, DiagnosticsEngine &Diags) in construct_driver() argument 199 return new Driver(binary, llvm::sys::getDefaultTargetTriple(), Diags); in construct_driver() 220 const ArgStringList *args, DiagnosticsEngine &Diags) in create_from_args() argument 222 CompilerInvocation::CreateFromArgs(invocation, *args, Diags); in create_from_args() [all …]
|
/external/llvm-project/clang/examples/CallSuperAttribute/ |
D | CallSuperAttrInfo.cpp | 72 CallSuperVisitor(DiagnosticsEngine &Diags) : Diags(Diags) { in CallSuperVisitor() argument 73 WarningSuperNotCalled = Diags.getCustomDiagID( in CallSuperVisitor() 77 NotePreviousCallSuperDeclaration = Diags.getCustomDiagID( in CallSuperVisitor() 96 Diags.Report(MethodDecl->getLocation(), WarningSuperNotCalled) in VisitCXXMethodDecl() 98 Diags.Report(LeftOverriddens->getLocation(), in VisitCXXMethodDecl() 106 DiagnosticsEngine &Diags; member in __anone77009790111::CallSuperVisitor 114 auto &Diags = Context.getDiagnostics(); in HandleTranslationUnit() local 116 lateDiagAppertainsToDecl(Diags, Method); in HandleTranslationUnit() 128 void lateDiagAppertainsToDecl(DiagnosticsEngine &Diags, in lateDiagAppertainsToDecl() argument 131 unsigned ID = Diags.getCustomDiagID( in lateDiagAppertainsToDecl() [all …]
|
/external/llvm-project/clang/tools/clang-refactor/ |
D | ToolRefactoringResultConsumer.h | 25 assert(!Diags && "Diags has been set"); in beginTU() 26 Diags = &Context.getDiagnostics(); in beginTU() 31 assert(Diags && "Diags unset"); in endTU() 32 Diags = nullptr; in endTU() 36 assert(Diags && "no diags"); in getDiags() 37 return *Diags; in getDiags() 41 DiagnosticsEngine *Diags = nullptr;
|
/external/llvm-project/clang/lib/ARCMigrate/ |
D | ARCMT.cpp | 81 void CapturedDiagList::reportDiagnostics(DiagnosticsEngine &Diags) const { in reportDiagnostics() 83 Diags.Report(*I); in reportDiagnostics() 97 DiagnosticsEngine &Diags; member in __anon2137c0960111::CaptureDiagnosticConsumer 105 : Diags(diags), DiagClient(client), CapturedDiags(capturedDiags), in CaptureDiagnosticConsumer() 143 Diags.setLastDiagnosticIgnored(true); in HandleDiagnostic() 184 IntrusiveRefCntPtr<DiagnosticsEngine> Diags( in createInvocationForMigration() local 188 PPOpts.ImplicitPCHInclude, FileMgr, PCHContainerRdr, *Diags); in createInvocationForMigration() 223 IntrusiveRefCntPtr<DiagnosticsEngine> Diags( in emitPremigrationErrors() local 226 Diags->setSourceManager(&PP.getSourceManager()); in emitPremigrationErrors() 229 arcDiags.reportDiagnostics(*Diags); in emitPremigrationErrors() [all …]
|
/external/clang/lib/ARCMigrate/ |
D | ARCMT.cpp | 80 void CapturedDiagList::reportDiagnostics(DiagnosticsEngine &Diags) const { in reportDiagnostics() 82 Diags.Report(*I); in reportDiagnostics() 96 DiagnosticsEngine &Diags; member in __anonc1210f680111::CaptureDiagnosticConsumer 104 : Diags(diags), DiagClient(client), CapturedDiags(capturedDiags), in CaptureDiagnosticConsumer() 142 Diags.setLastDiagnosticIgnored(); in HandleDiagnostic() 183 IntrusiveRefCntPtr<DiagnosticsEngine> Diags( in createInvocationForMigration() local 187 PPOpts.ImplicitPCHInclude, FileMgr, PCHContainerRdr, *Diags); in createInvocationForMigration() 224 IntrusiveRefCntPtr<DiagnosticsEngine> Diags( in emitPremigrationErrors() local 227 Diags->setSourceManager(&PP.getSourceManager()); in emitPremigrationErrors() 230 arcDiags.reportDiagnostics(*Diags); in emitPremigrationErrors() [all …]
|
/external/clang/lib/Frontend/ |
D | TextDiagnosticBuffer.cpp | 48 void TextDiagnosticBuffer::FlushDiagnostics(DiagnosticsEngine &Diags) const { in FlushDiagnostics() 51 Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Error, "%0")) in FlushDiagnostics() 54 Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Warning, "%0")) in FlushDiagnostics() 57 Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Remark, "%0")) in FlushDiagnostics() 60 Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Note, "%0")) in FlushDiagnostics()
|
D | CompilerInvocation.cpp | 82 DiagnosticsEngine &Diags) { in getOptimizationLevel() argument 100 return getLastArgIntValue(Args, OPT_O, DefaultOpt, Diags); in getOptimizationLevel() 156 DiagnosticsEngine &Diags) { in ParseAnalyzerArgs() argument 167 Diags.Report(diag::err_drv_invalid_value) in ParseAnalyzerArgs() 183 Diags.Report(diag::err_drv_invalid_value) in ParseAnalyzerArgs() 199 Diags.Report(diag::err_drv_invalid_value) in ParseAnalyzerArgs() 215 Diags.Report(diag::err_drv_invalid_value) in ParseAnalyzerArgs() 231 Diags.Report(diag::err_drv_invalid_value) in ParseAnalyzerArgs() 256 getLastArgIntValue(Args, OPT_analyzer_max_loop, 4, Diags); in ParseAnalyzerArgs() 260 Opts.InlineMaxStackDepth, Diags); in ParseAnalyzerArgs() [all …]
|
D | VerifyDiagnosticConsumer.cpp | 31 : Diags(Diags_), in VerifyDiagnosticConsumer() 32 PrimaryClient(Diags.getClient()), PrimaryClientOwner(Diags.takeClient()), in VerifyDiagnosticConsumer() 37 if (Diags.hasSourceManager()) in VerifyDiagnosticConsumer() 38 setSourceManager(Diags.getSourceManager()); in VerifyDiagnosticConsumer() 46 Diags.takeClient().release(); in ~VerifyDiagnosticConsumer() 311 DiagnosticsEngine &Diags = PP ? PP->getDiagnostics() : SM.getDiagnostics(); in ParseDirective() local 338 Diags.Report(Pos, diag::err_verify_invalid_no_diags) in ParseDirective() 348 Diags.Report(Pos, diag::err_verify_invalid_no_diags) in ParseDirective() 404 Diags.Report(Pos.getLocWithOffset(PH.C-PH.Begin), in ParseDirective() 421 Diags.Report(Pos.getLocWithOffset(PH.C-PH.Begin), in ParseDirective() [all …]
|
/external/llvm-project/clang/lib/Frontend/ |
D | VerifyDiagnosticConsumer.cpp | 298 void attachDirective(DiagnosticsEngine &Diags, const UnattachedDirective &UD, in attachDirective() argument 309 Diags.Report(UD.ContentBegin, diag::err_verify_invalid_content) in attachDirective() 329 DiagnosticsEngine &Diags; member in VerifyDiagnosticConsumer::MarkerTracker 343 MarkerTracker(DiagnosticsEngine &Diags) : Diags(Diags) {} in MarkerTracker() argument 361 attachDirective(Diags, UD, Pos); in addMarker() 375 return attachDirective(Diags, UD, M.DefLoc); in addDirective() 387 Diags.Report(M.UseLoc, diag::err_verify_ambiguous_marker) << Name; in finalize() 388 Diags.Report(M.DefLoc, diag::note_verify_ambiguous_marker) << Name; in finalize() 389 Diags.Report(M.RedefLoc, diag::note_verify_ambiguous_marker) << Name; in finalize() 394 Diags.Report(DeferredPair.second.front().DirectivePos, in finalize() [all …]
|
D | CompilerInvocation.cpp | 134 DiagnosticsEngine &Diags) { in normalizeSimpleFlag() argument 226 DiagnosticsEngine &Diags) { in normalizeSimpleEnum() argument 238 Diags.Report(diag::err_drv_invalid_value) in normalizeSimpleEnum() 281 DiagnosticsEngine &Diags) { in normalizeTriple() argument 324 DiagnosticsEngine &Diags) { in getOptimizationLevel() argument 345 return getLastArgIntValue(Args, OPT_O, DefaultOpt, Diags); in getOptimizationLevel() 391 DiagnosticsEngine *Diags); 408 DiagnosticsEngine &Diags) { in ParseAnalyzerArgs() argument 418 Diags.Report(diag::err_drv_invalid_value) in ParseAnalyzerArgs() 434 Diags.Report(diag::err_drv_invalid_value) in ParseAnalyzerArgs() [all …]
|
/external/llvm-project/clang/lib/Lex/ |
D | LiteralSupport.cpp | 78 static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, in Diag() argument 85 return Diags->Report(Begin, DiagID) << in Diag() 95 DiagnosticsEngine *Diags, in ProcessCharEscape() argument 118 if (Diags) in ProcessCharEscape() 119 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape() 124 if (Diags) in ProcessCharEscape() 125 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape() 147 if (Diags) in ProcessCharEscape() 148 Diag(Diags, Features, Loc, ThisTokBegin, EscapeBegin, ThisTokBuf, in ProcessCharEscape() 173 if (Overflow && Diags) // Too many digits to fit in in ProcessCharEscape() [all …]
|
/external/clang/lib/CodeGen/ |
D | ModuleBuilder.cpp | 34 DiagnosticsEngine &Diags; member in __anon0b8128540111::CodeGeneratorImpl 75 : Diags(diags), Ctx(nullptr), HeaderSearchOpts(HSO), in CodeGeneratorImpl() 84 Diags.hasErrorOccurred()); in ~CodeGeneratorImpl() 125 *M, Diags, CoverageInfo)); in Initialize() 134 if (Diags.hasErrorOccurred()) in HandleCXXStaticMemberVarInstantiation() 141 if (Diags.hasErrorOccurred()) in HandleTopLevelDecl() 167 if (Diags.hasErrorOccurred()) in HandleInlineFunctionDefinition() 205 if (Diags.hasErrorOccurred()) in HandleTagDeclDefinition() 238 if (Diags.hasErrorOccurred()) in HandleTagDeclRequiredDefinition() 252 if (!Diags.hasErrorOccurred() && Builder) in HandleTranslationUnit() [all …]
|
/external/llvm-project/clang/lib/Driver/ |
D | OptionUtils.cpp | 20 IntTy Default, DiagnosticsEngine *Diags, in getLastArgIntValueImpl() argument 25 if (Diags) in getLastArgIntValueImpl() 26 Diags->Report(diag::err_drv_invalid_int_value) in getLastArgIntValueImpl() 37 DiagnosticsEngine *Diags, unsigned Base) { in getLastArgIntValue() argument 38 return getLastArgIntValueImpl<int>(Args, Id, Default, Diags, Base); in getLastArgIntValue() 42 uint64_t Default, DiagnosticsEngine *Diags, in getLastArgUInt64Value() argument 44 return getLastArgIntValueImpl<uint64_t>(Args, Id, Default, Diags, Base); in getLastArgUInt64Value()
|
/external/llvm-project/clang/lib/CodeGen/ |
D | ModuleBuilder.cpp | 33 DiagnosticsEngine &Diags; member in __anon35bbc6420111::CodeGeneratorImpl 81 : Diags(diags), Ctx(nullptr), HeaderSearchOpts(HSO), in CodeGeneratorImpl() 91 Diags.hasErrorOccurred()); in ~CodeGeneratorImpl() 147 *M, Diags, CoverageInfo)); in Initialize() 156 if (Diags.hasErrorOccurred()) in HandleCXXStaticMemberVarInstantiation() 163 if (Diags.hasErrorOccurred()) in HandleTopLevelDecl() 189 if (Diags.hasErrorOccurred()) in HandleInlineFunctionDefinition() 216 if (Diags.hasErrorOccurred()) in HandleTagDeclDefinition() 252 if (Diags.hasErrorOccurred()) in HandleTagDeclRequiredDefinition() 266 if (!Diags.hasErrorOccurred() && Builder) in HandleTranslationUnit() [all …]
|