Index: clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp +++ clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp @@ -24,6 +24,8 @@ if (const auto *D = Node.getDeclContext()->getEnclosingNamespaceContext()) if (D->isStdNamespace()) return true; + if (Node.getLocation().isInvalid()) + return false; return Node.getASTContext().getSourceManager().isInSystemHeader( Node.getLocation()); } Index: clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment.cpp =================================================================== --- clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment.cpp +++ clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment.cpp @@ -151,3 +151,8 @@ my_system_header_function(/*not_arg=*/1); } } // namespace system_header + +void testInvalidSlocCxxConstructExpr() { + __builtin_va_list __args; + // __builtin_va_list has no defination in any source file +}