aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
diff options
context:
space:
mode:
authorPiotr Zegar <me@piotrzegar.pl>2023-08-26 18:35:54 +0000
committerPiotr Zegar <me@piotrzegar.pl>2023-08-27 08:52:10 +0000
commitec5f4be4521c3b28d6bb14f34f39a87c36fe8c00 (patch)
treeb6bf9cbe22fab6c31afbbe5eb0b4742509e8f9dd /clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
parent9c857f2151b48d3447828496295d076c3ec145e6 (diff)
downloadllvm-ec5f4be4521c3b28d6bb14f34f39a87c36fe8c00.zip
llvm-ec5f4be4521c3b28d6bb14f34f39a87c36fe8c00.tar.gz
llvm-ec5f4be4521c3b28d6bb14f34f39a87c36fe8c00.tar.bz2
[clang-tidy][NFC] Fix modernize-return-braced-init-list findings
Fix issues found by clang-tidy in clang-tidy source directory.
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp b/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
index a2fba67..77763a9 100644
--- a/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/StaticAssertCheck.cpp
@@ -141,7 +141,7 @@ SourceLocation StaticAssertCheck::getLastParenLoc(const ASTContext *ASTCtx,
std::optional<llvm::MemoryBufferRef> Buffer =
SM.getBufferOrNone(SM.getFileID(AssertLoc));
if (!Buffer)
- return SourceLocation();
+ return {};
const char *BufferPos = SM.getCharacterData(AssertLoc);
@@ -152,7 +152,7 @@ SourceLocation StaticAssertCheck::getLastParenLoc(const ASTContext *ASTCtx,
// assert first left parenthesis
if (Lexer.LexFromRawLexer(Token) || Lexer.LexFromRawLexer(Token) ||
!Token.is(tok::l_paren))
- return SourceLocation();
+ return {};
unsigned int ParenCount = 1;
while (ParenCount && !Lexer.LexFromRawLexer(Token)) {