aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/StaticAnalyzer/SValTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/StaticAnalyzer/SValTest.cpp')
-rw-r--r--clang/unittests/StaticAnalyzer/SValTest.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/unittests/StaticAnalyzer/SValTest.cpp b/clang/unittests/StaticAnalyzer/SValTest.cpp
index 1f4a18b..f96456a 100644
--- a/clang/unittests/StaticAnalyzer/SValTest.cpp
+++ b/clang/unittests/StaticAnalyzer/SValTest.cpp
@@ -34,13 +34,12 @@ namespace clang {
// getType() tests include whole bunch of type comparisons,
// so when something is wrong, it's good to have gtest telling us
// what are those types.
-LLVM_ATTRIBUTE_UNUSED std::ostream &operator<<(std::ostream &OS,
- const QualType &T) {
+[[maybe_unused]] std::ostream &operator<<(std::ostream &OS, const QualType &T) {
return OS << T.getAsString();
}
-LLVM_ATTRIBUTE_UNUSED std::ostream &operator<<(std::ostream &OS,
- const CanQualType &T) {
+[[maybe_unused]] std::ostream &operator<<(std::ostream &OS,
+ const CanQualType &T) {
return OS << QualType{T};
}
@@ -302,13 +301,13 @@ void foo(int x) {
ASSERT_FALSE(B.getType(Context).isNull());
const auto *BRecordType = dyn_cast<RecordType>(B.getType(Context));
ASSERT_NE(BRecordType, nullptr);
- EXPECT_EQ("TestStruct", BRecordType->getOriginalDecl()->getName());
+ EXPECT_EQ("TestStruct", BRecordType->getDecl()->getName());
SVal C = getByName("c");
ASSERT_FALSE(C.getType(Context).isNull());
const auto *CRecordType = dyn_cast<RecordType>(C.getType(Context));
ASSERT_NE(CRecordType, nullptr);
- EXPECT_EQ("TestUnion", CRecordType->getOriginalDecl()->getName());
+ EXPECT_EQ("TestUnion", CRecordType->getDecl()->getName());
auto D = getByName("d").getAs<nonloc::CompoundVal>();
ASSERT_TRUE(D.has_value());
@@ -322,7 +321,7 @@ void foo(int x) {
ASSERT_FALSE(LDT.isNull());
const auto *DRecordType = dyn_cast<RecordType>(LDT);
ASSERT_NE(DRecordType, nullptr);
- EXPECT_EQ("TestStruct", DRecordType->getOriginalDecl()->getName());
+ EXPECT_EQ("TestStruct", DRecordType->getDecl()->getName());
}
SVAL_TEST(GetStringType, R"(
@@ -351,7 +350,7 @@ void TestClass::foo() {
ASSERT_NE(APtrTy, nullptr);
const auto *ARecordType = dyn_cast<RecordType>(APtrTy->getPointeeType());
ASSERT_NE(ARecordType, nullptr);
- EXPECT_EQ("TestClass", ARecordType->getOriginalDecl()->getName());
+ EXPECT_EQ("TestClass", ARecordType->getDecl()->getName());
}
SVAL_TEST(GetFunctionPtrType, R"(