From: Kovarththanan Rajaratnam Date: Thu, 7 Jan 2010 16:01:54 +0000 (+0000) Subject: Tigthen scope of local char array X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a66a31940a459a16160d318ed1767f5c1c1e013e;p=clang Tigthen scope of local char array git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92917 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index c1fc92d3b0..e5c6ed0d99 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -266,7 +266,6 @@ static void DefineExactWidthIntType(TargetInfo::IntType Ty, static void InitializePredefinedMacros(const TargetInfo &TI, const LangOptions &LangOpts, std::vector &Buf) { - char MacroBuf[60]; // Compiler version introspection macros. DefineBuiltinMacro(Buf, "__llvm__=1"); // LLVM Backend DefineBuiltinMacro(Buf, "__clang__=1"); // Clang Frontend @@ -415,6 +414,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI, DefineFloatMacros(Buf, "LDBL", &TI.getLongDoubleFormat()); // Define a __POINTER_WIDTH__ macro for stdint.h. + char MacroBuf[60]; sprintf(MacroBuf, "__POINTER_WIDTH__=%d", (int)TI.getPointerWidth(0)); DefineBuiltinMacro(Buf, MacroBuf);