aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Analysis/PathDiagnostic.cpp6
-rw-r--r--clang/lib/Basic/FileManager.cpp2
-rw-r--r--clang/lib/Index/FileIndexRecord.cpp2
-rw-r--r--clang/lib/Index/IndexDecl.cpp4
4 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Analysis/PathDiagnostic.cpp b/clang/lib/Analysis/PathDiagnostic.cpp
index 35472e7..5b14d13 100644
--- a/clang/lib/Analysis/PathDiagnostic.cpp
+++ b/clang/lib/Analysis/PathDiagnostic.cpp
@@ -484,10 +484,10 @@ SourceLocation PathDiagnosticLocation::getValidSourceLocation(
// source code, so find an enclosing statement and use its location.
if (!L.isValid()) {
AnalysisDeclContext *ADC;
- if (LAC.is<const LocationContext*>())
- ADC = LAC.get<const LocationContext*>()->getAnalysisDeclContext();
+ if (auto *LC = dyn_cast<const LocationContext *>(LAC))
+ ADC = LC->getAnalysisDeclContext();
else
- ADC = LAC.get<AnalysisDeclContext*>();
+ ADC = cast<AnalysisDeclContext *>(LAC);
ParentMap &PM = ADC->getParentMap();
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index 2876c29..f44b5e4 100644
--- a/clang/lib/Basic/FileManager.cpp
+++ b/clang/lib/Basic/FileManager.cpp
@@ -398,7 +398,7 @@ FileEntryRef FileManager::getVirtualFileRef(StringRef Filename, off_t Size,
{Filename, std::errc::no_such_file_or_directory}).first;
if (NamedFileEnt.second) {
FileEntryRef::MapValue Value = *NamedFileEnt.second;
- if (LLVM_LIKELY(Value.V.is<FileEntry *>()))
+ if (LLVM_LIKELY(isa<FileEntry *>(Value.V)))
return FileEntryRef(NamedFileEnt);
return FileEntryRef(*Value.V.get<const FileEntryRef::MapEntry *>());
}
diff --git a/clang/lib/Index/FileIndexRecord.cpp b/clang/lib/Index/FileIndexRecord.cpp
index f3a5e6b..449c336 100644
--- a/clang/lib/Index/FileIndexRecord.cpp
+++ b/clang/lib/Index/FileIndexRecord.cpp
@@ -65,7 +65,7 @@ void FileIndexRecord::print(llvm::raw_ostream &OS, SourceManager &SM) const {
OS << ' ' << ND->getDeclName();
}
} else {
- const auto *MI = DclInfo.DeclOrMacro.get<const MacroInfo *>();
+ const auto *MI = cast<const MacroInfo *>(DclInfo.DeclOrMacro);
SourceLocation Loc = SM.getFileLoc(MI->getDefinitionLoc());
PresumedLoc PLoc = SM.getPresumedLoc(Loc);
OS << llvm::sys::path::filename(PLoc.getFilename()) << ':'
diff --git a/clang/lib/Index/IndexDecl.cpp b/clang/lib/Index/IndexDecl.cpp
index a7fa6c5..19cff03 100644
--- a/clang/lib/Index/IndexDecl.cpp
+++ b/clang/lib/Index/IndexDecl.cpp
@@ -665,9 +665,9 @@ public:
ClassTemplatePartialSpecializationDecl *>
Template = D->getSpecializedTemplateOrPartial();
const Decl *SpecializationOf =
- Template.is<ClassTemplateDecl *>()
+ isa<ClassTemplateDecl *>(Template)
? (Decl *)Template.get<ClassTemplateDecl *>()
- : Template.get<ClassTemplatePartialSpecializationDecl *>();
+ : cast<ClassTemplatePartialSpecializationDecl *>(Template);
if (!D->isThisDeclarationADefinition())
IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), D);
IndexCtx.indexTagDecl(