[clang-tools-extra] r345971 - Reapply Logging: make os_log buffer size an integer constant expression.
Tim Northover via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 2 06:14:11 PDT 2018
Author: tnorthover
Date: Fri Nov 2 06:14:11 2018
New Revision: 345971
URL: http://llvm.org/viewvc/llvm-project?rev=345971&view=rev
Log:
Reapply Logging: make os_log buffer size an integer constant expression.
The size of an os_log buffer is known at any stage of compilation, so making it
a constant expression means that the common idiom of declaring a buffer for it
won't result in a VLA. That allows the compiler to skip saving and restoring
the stack pointer around such buffers.
This also moves the OSLog and other FormatString helpers from
libclangAnalysis to libclangAST to avoid a circular dependency.
Modified:
clang-tools-extra/trunk/clang-tidy/cert/CMakeLists.txt
clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/cert/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cert/CMakeLists.txt?rev=345971&r1=345970&r2=345971&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cert/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/clang-tidy/cert/CMakeLists.txt Fri Nov 2 06:14:11 2018
@@ -15,7 +15,6 @@ add_clang_library(clangTidyCERTModule
VariadicFunctionDefCheck.cpp
LINK_LIBS
- clangAnalysis
clangAST
clangASTMatchers
clangBasic
Modified: clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp?rev=345971&r1=345970&r2=345971&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cert/StrToNumCheck.cpp Fri Nov 2 06:14:11 2018
@@ -10,7 +10,7 @@
#include "StrToNumCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
-#include "clang/Analysis/Analyses/FormatString.h"
+#include "clang/AST/FormatString.h"
#include "llvm/ADT/StringSwitch.h"
#include <cassert>
More information about the cfe-commits
mailing list