Index: clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp =================================================================== --- clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -27,6 +27,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Casting.h" +#include using namespace clang; using namespace ento; @@ -879,6 +880,46 @@ void printToken(const Token &Tok); }; +/// Wrapper around a Lexer object that can lex tokens one-by-one. Its possible +/// to "inject" a range of tokens into the stream, in which case the next token +/// is retrieved from the next element of the range, until the end of the range +/// is reached. +class TokenStream { +public: + TokenStream(SourceLocation ExpanLoc, const SourceManager &SM, + const LangOptions &LangOpts) + : ExpanLoc(ExpanLoc) { + FileID File; + unsigned Offset; + std::tie(File, Offset) = SM.getDecomposedLoc(ExpanLoc); + const llvm::MemoryBuffer *MB = SM.getBuffer(File); + const char *MacroNameTokenPos = MB->getBufferStart() + Offset; + + RawLexer = std::make_unique(SM.getLocForStartOfFile(File), LangOpts, + MB->getBufferStart(), MacroNameTokenPos, + MB->getBufferEnd()); + } + + void next(Token &Result) { + if (CurrTokenIt == TokenRange.end()) { + RawLexer->LexFromRawLexer(Result); + return; + } + Result = *CurrTokenIt; + CurrTokenIt++; + } + + void injectRange(const ArgTokensTy &Range) { + TokenRange = Range; + CurrTokenIt = TokenRange.begin(); + } + + std::unique_ptr RawLexer; + ArgTokensTy TokenRange; + ArgTokensTy::iterator CurrTokenIt = TokenRange.begin(); + SourceLocation ExpanLoc; +}; + } // end of anonymous namespace /// The implementation method of getMacroExpansion: It prints the expansion of @@ -933,8 +974,9 @@ /// When \p ExpanLoc references "SET_TO_NULL(a)" within the definition of /// "NOT_SUSPICOUS", the macro name "SET_TO_NULL" and the MacroArgMap map /// { (x, a) } will be returned. -static MacroExpansionInfo getMacroExpansionInfo(SourceLocation ExpanLoc, - const Preprocessor &PP); +static MacroExpansionInfo +getMacroExpansionInfo(const MacroParamMap &PrevParamMap, + SourceLocation ExpanLoc, const Preprocessor &PP); /// Retrieves the ')' token that matches '(' \p It points to. static MacroInfo::tokens_iterator getMatchingRParen( @@ -980,7 +1022,7 @@ const SourceManager &SM = PP.getSourceManager(); MacroExpansionInfo MExpInfo = - getMacroExpansionInfo(SM.getExpansionLoc(MacroLoc), PP); + getMacroExpansionInfo(PrevParamMap, SM.getExpansionLoc(MacroLoc), PP); IdentifierInfo *MacroNameII = PP.getIdentifierInfo(MExpInfo.Name); // TODO: If the macro definition contains another symbol then this function is @@ -1077,24 +1119,20 @@ return MExpInfo.Name; } -static MacroExpansionInfo getMacroExpansionInfo(SourceLocation ExpanLoc, - const Preprocessor &PP) { +static MacroExpansionInfo +getMacroExpansionInfo(const MacroParamMap &PrevParamMap, + SourceLocation ExpanLoc, const Preprocessor &PP) { const SourceManager &SM = PP.getSourceManager(); const LangOptions &LangOpts = PP.getLangOpts(); // First, we create a Lexer to lex *at the expansion location* the tokens // referring to the macro's name and its arguments. - std::pair LocInfo = SM.getDecomposedLoc(ExpanLoc); - const llvm::MemoryBuffer *MB = SM.getBuffer(LocInfo.first); - const char *MacroNameTokenPos = MB->getBufferStart() + LocInfo.second; - - Lexer RawLexer(SM.getLocForStartOfFile(LocInfo.first), LangOpts, - MB->getBufferStart(), MacroNameTokenPos, MB->getBufferEnd()); + TokenStream TStream(ExpanLoc, SM, LangOpts); // Acquire the macro's name. Token TheTok; - RawLexer.LexFromRawLexer(TheTok); + TStream.next(TheTok); std::string MacroName = PP.getSpelling(TheTok); @@ -1122,7 +1160,7 @@ if (MacroParams.empty()) return { MacroName, MI, {} }; - RawLexer.LexFromRawLexer(TheTok); + TStream.next(TheTok); // When this is a token which expands to another macro function then its // parentheses are not at its expansion locaiton. For example: // @@ -1166,7 +1204,7 @@ if (ParenthesesDepth != 0) { // Lex the first token of the next macro parameter. - RawLexer.LexFromRawLexer(TheTok); + TStream.next(TheTok); while ( !(ParenthesesDepth == 1 && @@ -1183,16 +1221,38 @@ if (ParenthesesDepth == 0) break; - if (TheTok.is(tok::raw_identifier)) + if (TheTok.is(tok::raw_identifier)) { PP.LookUpIdentifierInfo(TheTok); + // This token is a variadic parameter: + // + // #define PARAMS_RESOLVE_TO_VA_ARGS(i, fmt) foo(i, fmt); \ + // i = 0; + // #define DISPATCH(...) \ + // PARAMS_RESOLVE_TO_VA_ARGS(__VA_ARGS__); + // // ^~~~~~~~~~~ Variadic parameter here + // + // void mulitpleParamsResolveToVA_ARGS(void) { + // int x = 1; + // DISPATCH(x, "LF1M healer"); // Multiple arguments are mapped to + // // a single __VA_ARGS__ parameter. + // (void)(10 / x); + // } + // + // We will stumble across this while trying to expand + // PARAMS_RESOLVE_TO_VA_ARGS. By this point, we already noted during + // the processing of DISPATCH what __VA_ARGS__ maps to, so we'll + // retrieve the next series of tokens from that. + if (TheTok.getIdentifierInfo() == __VA_ARGS__II) { + TStream.injectRange(PrevParamMap.at(__VA_ARGS__II)); + TStream.next(TheTok); + continue; + } + } ArgTokens.push_back(TheTok); - RawLexer.LexFromRawLexer(TheTok); + TStream.next(TheTok); } } else { - // FIXME: Handle when multiple parameters map to a single argument. - // Currently, we only handle when multiple arguments map to the same - // parameter. assert(CurrParamII == __VA_ARGS__II && "No more macro arguments are found, but the current parameter " "isn't __VA_ARGS__!"); @@ -1295,6 +1355,15 @@ } void TokenPrinter::printToken(const Token &Tok) { + // TODO: Handle GNU extensions where hash and hashhash occurs right before + // __VA_ARGS__. + // cppreference.com: "some compilers offer an extension that allows ## to + // appear after a comma and before __VA_ARGS__, in which case the ## does + // nothing when the variable arguments are present, but removes the comma when + // the variable arguments are not present: this makes it possible to define + // macros such as fprintf (stderr, format, ##__VA_ARGS__)" + // FIXME: Handle named variadic macro parameters (also a GNU extension). + // If this is the first token to be printed, don't print space. if (PrevTok.isNot(tok::unknown)) { // If the tokens were already space separated, or if they must be to avoid Index: clang/test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist =================================================================== --- clang/test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist +++ clang/test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist @@ -16,12 +16,12 @@ start - line25 + line23 col3 file0 - line25 + line23 col5 file0 @@ -29,12 +29,12 @@ end - line26 + line24 col3 file0 - line26 + line24 col21 file0 @@ -46,7 +46,7 @@ kindevent location - line26 + line24 col3 file0 @@ -54,12 +54,12 @@ - line26 + line24 col3 file0 - line26 + line24 col21 file0 @@ -79,12 +79,12 @@ start - line27 + line25 col3 file0 - line27 + line25 col3 file0 @@ -92,12 +92,12 @@ end - line27 + line25 col8 file0 - line27 + line25 col8 file0 @@ -109,7 +109,7 @@ kindevent location - line27 + line25 col8 file0 @@ -117,12 +117,12 @@ - line27 + line25 col4 file0 - line27 + line25 col6 file0 @@ -140,7 +140,7 @@ location - line26 + line24 col3 file0 @@ -159,7 +159,7 @@ issue_hash_function_offset3 location - line27 + line25 col8 file0 @@ -167,10 +167,10 @@ 0 + 22 + 23 24 25 - 26 - 27 @@ -185,12 +185,12 @@ start - line38 + line36 col3 file0 - line38 + line36 col5 file0 @@ -198,12 +198,12 @@ end - line39 + line37 col3 file0 - line39 + line37 col39 file0 @@ -215,7 +215,7 @@ kindevent location - line39 + line37 col3 file0 @@ -223,12 +223,12 @@ - line39 + line37 col3 file0 - line39 + line37 col39 file0 @@ -248,12 +248,12 @@ start - line40 + line38 col3 file0 - line40 + line38 col3 file0 @@ -261,12 +261,12 @@ end - line40 + line38 col8 file0 - line40 + line38 col8 file0 @@ -278,7 +278,7 @@ kindevent location - line40 + line38 col8 file0 @@ -286,12 +286,12 @@ - line40 + line38 col4 file0 - line40 + line38 col6 file0 @@ -309,7 +309,7 @@ location - line39 + line37 col3 file0 @@ -328,7 +328,7 @@ issue_hash_function_offset3 location - line40 + line38 col8 file0 @@ -336,10 +336,10 @@ 0 + 35 + 36 37 38 - 39 - 40 @@ -354,12 +354,12 @@ start - line58 + line56 col3 file0 - line58 + line56 col5 file0 @@ -367,12 +367,12 @@ end - line59 + line57 col3 file0 - line59 + line57 col9 file0 @@ -384,7 +384,7 @@ kindevent location - line59 + line57 col3 file0 @@ -392,12 +392,12 @@ - line59 + line57 col3 file0 - line59 + line57 col15 file0 @@ -413,7 +413,7 @@ kindevent location - line50 + line48 col1 file0 @@ -431,12 +431,12 @@ start - line50 + line48 col1 file0 - line50 + line48 col4 file0 @@ -444,12 +444,12 @@ end - line51 + line49 col3 file0 - line51 + line49 col3 file0 @@ -461,7 +461,7 @@ kindevent location - line51 + line49 col3 file0 @@ -469,12 +469,12 @@ - line51 + line49 col3 file0 - line51 + line49 col17 file0 @@ -490,7 +490,7 @@ kindevent location - line59 + line57 col3 file0 @@ -498,12 +498,12 @@ - line59 + line57 col3 file0 - line59 + line57 col15 file0 @@ -523,12 +523,12 @@ start - line60 + line58 col3 file0 - line60 + line58 col3 file0 @@ -536,12 +536,12 @@ end - line60 + line58 col8 file0 - line60 + line58 col8 file0 @@ -553,7 +553,7 @@ kindevent location - line60 + line58 col8 file0 @@ -561,12 +561,12 @@ - line60 + line58 col4 file0 - line60 + line58 col6 file0 @@ -584,7 +584,7 @@ location - line59 + line57 col3 file0 @@ -603,7 +603,7 @@ issue_hash_function_offset3 location - line60 + line58 col8 file0 @@ -611,12 +611,12 @@ 0 - 50 - 51 + 48 + 49 + 55 + 56 57 58 - 59 - 60 @@ -631,12 +631,12 @@ start - line78 + line76 col3 file0 - line78 + line76 col5 file0 @@ -644,12 +644,12 @@ end - line79 + line77 col3 file0 - line79 + line77 col9 file0 @@ -661,7 +661,7 @@ kindevent location - line79 + line77 col3 file0 @@ -669,12 +669,12 @@ - line79 + line77 col3 file0 - line79 + line77 col13 file0 @@ -690,7 +690,7 @@ kindevent location - line50 + line48 col1 file0 @@ -708,12 +708,12 @@ start - line50 + line48 col1 file0 - line50 + line48 col4 file0 @@ -721,12 +721,12 @@ end - line51 + line49 col3 file0 - line51 + line49 col3 file0 @@ -738,7 +738,7 @@ kindevent location - line51 + line49 col3 file0 @@ -746,12 +746,12 @@ - line51 + line49 col3 file0 - line51 + line49 col17 file0 @@ -767,7 +767,7 @@ kindevent location - line79 + line77 col3 file0 @@ -775,12 +775,12 @@ - line79 + line77 col3 file0 - line79 + line77 col13 file0 @@ -796,7 +796,7 @@ kindevent location - line80 + line78 col12 file0 @@ -804,12 +804,12 @@ - line80 + line78 col3 file0 - line80 + line78 col10 file0 @@ -827,7 +827,7 @@ location - line79 + line77 col3 file0 @@ -837,7 +837,7 @@ location - line80 + line78 col3 file0 @@ -856,7 +856,7 @@ issue_hash_function_offset3 location - line80 + line78 col12 file0 @@ -864,12 +864,12 @@ 0 - 50 - 51 + 48 + 49 + 75 + 76 77 78 - 79 - 80 @@ -884,12 +884,12 @@ start - line97 + line95 col3 file0 - line97 + line95 col5 file0 @@ -897,12 +897,12 @@ end - line98 + line96 col3 file0 - line98 + line96 col28 file0 @@ -914,7 +914,7 @@ kindevent location - line98 + line96 col3 file0 @@ -922,12 +922,12 @@ - line98 + line96 col3 file0 - line98 + line96 col33 file0 @@ -947,12 +947,12 @@ start - line99 + line97 col3 file0 - line99 + line97 col3 file0 @@ -960,12 +960,12 @@ end - line99 + line97 col8 file0 - line99 + line97 col8 file0 @@ -977,7 +977,7 @@ kindevent location - line99 + line97 col8 file0 @@ -985,12 +985,12 @@ - line99 + line97 col4 file0 - line99 + line97 col6 file0 @@ -1008,7 +1008,7 @@ location - line98 + line96 col3 file0 @@ -1027,7 +1027,7 @@ issue_hash_function_offset3 location - line99 + line97 col8 file0 @@ -1035,10 +1035,10 @@ 0 + 94 + 95 96 97 - 98 - 99 @@ -1053,12 +1053,12 @@ start - line114 + line112 col3 file0 - line114 + line112 col5 file0 @@ -1066,12 +1066,12 @@ end - line115 + line113 col3 file0 - line115 + line113 col42 file0 @@ -1083,7 +1083,7 @@ kindevent location - line115 + line113 col3 file0 @@ -1091,12 +1091,12 @@ - line115 + line113 col3 file0 - line115 + line113 col47 file0 @@ -1116,12 +1116,12 @@ start - line116 + line114 col3 file0 - line116 + line114 col3 file0 @@ -1129,12 +1129,12 @@ end - line116 + line114 col8 file0 - line116 + line114 col8 file0 @@ -1146,7 +1146,7 @@ kindevent location - line116 + line114 col8 file0 @@ -1154,12 +1154,12 @@ - line116 + line114 col4 file0 - line116 + line114 col6 file0 @@ -1177,7 +1177,7 @@ location - line115 + line113 col3 file0 @@ -1196,7 +1196,7 @@ issue_hash_function_offset3 location - line116 + line114 col8 file0 @@ -1204,10 +1204,10 @@ 0 + 111 + 112 113 114 - 115 - 116 @@ -1222,12 +1222,12 @@ start - line134 + line132 col3 file0 - line134 + line132 col5 file0 @@ -1235,12 +1235,12 @@ end - line135 + line133 col3 file0 - line135 + line133 col39 file0 @@ -1252,7 +1252,7 @@ kindevent location - line135 + line133 col3 file0 @@ -1260,12 +1260,12 @@ - line135 + line133 col3 file0 - line135 + line133 col44 file0 @@ -1285,12 +1285,12 @@ start - line136 + line134 col3 file0 - line136 + line134 col3 file0 @@ -1298,12 +1298,12 @@ end - line136 + line134 col8 file0 - line136 + line134 col8 file0 @@ -1315,7 +1315,7 @@ kindevent location - line136 + line134 col8 file0 @@ -1323,12 +1323,12 @@ - line136 + line134 col4 file0 - line136 + line134 col6 file0 @@ -1346,7 +1346,7 @@ location - line135 + line133 col3 file0 @@ -1365,7 +1365,7 @@ issue_hash_function_offset3 location - line136 + line134 col8 file0 @@ -1373,10 +1373,10 @@ 0 + 131 + 132 133 134 - 135 - 136 @@ -1391,12 +1391,12 @@ start - line161 + line159 col3 file0 - line161 + line159 col5 file0 @@ -1404,12 +1404,12 @@ end - line162 + line160 col3 file0 - line162 + line160 col19 file0 @@ -1421,7 +1421,7 @@ kindevent location - line162 + line160 col3 file0 @@ -1429,12 +1429,12 @@ - line162 + line160 col3 file0 - line162 + line160 col52 file0 @@ -1454,12 +1454,12 @@ start - line163 + line161 col3 file0 - line163 + line161 col3 file0 @@ -1467,12 +1467,12 @@ end - line163 + line161 col6 file0 - line163 + line161 col6 file0 @@ -1484,7 +1484,7 @@ kindevent location - line163 + line161 col6 file0 @@ -1492,12 +1492,12 @@ - line163 + line161 col4 file0 - line163 + line161 col4 file0 @@ -1515,7 +1515,7 @@ location - line162 + line160 col3 file0 @@ -1534,7 +1534,7 @@ issue_hash_function_offset3 location - line163 + line161 col6 file0 @@ -1542,10 +1542,10 @@ 0 + 158 + 159 160 161 - 162 - 163 @@ -1560,12 +1560,12 @@ start - line170 + line168 col3 file0 - line170 + line168 col5 file0 @@ -1573,12 +1573,12 @@ end - line171 + line169 col3 file0 - line171 + line169 col19 file0 @@ -1590,7 +1590,7 @@ kindevent location - line171 + line169 col3 file0 @@ -1598,12 +1598,12 @@ - line171 + line169 col3 file0 - line171 + line169 col52 file0 @@ -1623,12 +1623,12 @@ start - line172 + line170 col3 file0 - line172 + line170 col3 file0 @@ -1636,12 +1636,12 @@ end - line172 + line170 col6 file0 - line172 + line170 col6 file0 @@ -1653,7 +1653,7 @@ kindevent location - line172 + line170 col6 file0 @@ -1661,12 +1661,12 @@ - line172 + line170 col4 file0 - line172 + line170 col4 file0 @@ -1684,7 +1684,7 @@ location - line171 + line169 col3 file0 @@ -1703,7 +1703,7 @@ issue_hash_function_offset3 location - line172 + line170 col6 file0 @@ -1711,10 +1711,10 @@ 0 + 167 + 168 169 170 - 171 - 172 @@ -1729,12 +1729,12 @@ start - line179 + line177 col3 file0 - line179 + line177 col5 file0 @@ -1742,12 +1742,12 @@ end - line180 + line178 col3 file0 - line180 + line178 col19 file0 @@ -1759,7 +1759,7 @@ kindevent location - line180 + line178 col3 file0 @@ -1767,12 +1767,12 @@ - line180 + line178 col3 file0 - line180 + line178 col52 file0 @@ -1792,12 +1792,12 @@ start - line181 + line179 col3 file0 - line181 + line179 col3 file0 @@ -1805,12 +1805,12 @@ end - line181 + line179 col6 file0 - line181 + line179 col6 file0 @@ -1822,7 +1822,7 @@ kindevent location - line181 + line179 col6 file0 @@ -1830,12 +1830,12 @@ - line181 + line179 col4 file0 - line181 + line179 col4 file0 @@ -1853,7 +1853,7 @@ location - line180 + line178 col3 file0 @@ -1872,7 +1872,7 @@ issue_hash_function_offset3 location - line181 + line179 col6 file0 @@ -1880,10 +1880,10 @@ 0 + 176 + 177 178 179 - 180 - 181 @@ -1898,12 +1898,12 @@ start - line193 + line191 col3 file0 - line193 + line191 col5 file0 @@ -1911,12 +1911,12 @@ end - line194 + line192 col3 file0 - line194 + line192 col15 file0 @@ -1928,7 +1928,7 @@ kindevent location - line194 + line192 col3 file0 @@ -1936,12 +1936,12 @@ - line194 + line192 col3 file0 - line194 + line192 col30 file0 @@ -1957,7 +1957,7 @@ kindevent location - line50 + line48 col1 file0 @@ -1975,12 +1975,12 @@ start - line50 + line48 col1 file0 - line50 + line48 col4 file0 @@ -1988,12 +1988,12 @@ end - line51 + line49 col3 file0 - line51 + line49 col3 file0 @@ -2005,7 +2005,7 @@ kindevent location - line51 + line49 col3 file0 @@ -2013,12 +2013,12 @@ - line51 + line49 col3 file0 - line51 + line49 col17 file0 @@ -2034,7 +2034,7 @@ kindevent location - line194 + line192 col3 file0 @@ -2042,12 +2042,12 @@ - line194 + line192 col3 file0 - line194 + line192 col30 file0 @@ -2067,12 +2067,12 @@ start - line195 + line193 col3 file0 - line195 + line193 col3 file0 @@ -2080,12 +2080,12 @@ end - line195 + line193 col6 file0 - line195 + line193 col6 file0 @@ -2097,7 +2097,7 @@ kindevent location - line195 + line193 col6 file0 @@ -2105,12 +2105,12 @@ - line195 + line193 col4 file0 - line195 + line193 col4 file0 @@ -2128,7 +2128,7 @@ location - line194 + line192 col3 file0 @@ -2147,7 +2147,7 @@ issue_hash_function_offset3 location - line195 + line193 col6 file0 @@ -2155,12 +2155,12 @@ 0 - 50 - 51 + 48 + 49 + 190 + 191 192 193 - 194 - 195 @@ -2175,12 +2175,12 @@ start - line207 + line205 col3 file0 - line207 + line205 col5 file0 @@ -2188,12 +2188,12 @@ end - line208 + line206 col3 file0 - line208 + line206 col15 file0 @@ -2205,7 +2205,7 @@ kindevent location - line208 + line206 col3 file0 @@ -2213,12 +2213,12 @@ - line208 + line206 col3 file0 - line208 + line206 col48 file0 @@ -2234,7 +2234,7 @@ kindevent location - line201 + line199 col1 file0 @@ -2252,12 +2252,12 @@ start - line201 + line199 col1 file0 - line201 + line199 col4 file0 @@ -2265,12 +2265,12 @@ end - line202 + line200 col3 file0 - line202 + line200 col11 file0 @@ -2282,7 +2282,7 @@ kindevent location - line202 + line200 col3 file0 @@ -2290,12 +2290,12 @@ - line202 + line200 col3 file0 - line202 + line200 col17 file0 @@ -2311,7 +2311,7 @@ kindevent location - line50 + line48 col1 file0 @@ -2329,12 +2329,12 @@ start - line50 + line48 col1 file0 - line50 + line48 col4 file0 @@ -2342,12 +2342,12 @@ end - line51 + line49 col3 file0 - line51 + line49 col3 file0 @@ -2359,7 +2359,7 @@ kindevent location - line51 + line49 col3 file0 @@ -2367,12 +2367,12 @@ - line51 + line49 col3 file0 - line51 + line49 col17 file0 @@ -2388,7 +2388,7 @@ kindevent location - line202 + line200 col3 file0 @@ -2396,12 +2396,12 @@ - line202 + line200 col3 file0 - line202 + line200 col17 file0 @@ -2421,12 +2421,12 @@ start - line202 + line200 col3 file0 - line202 + line200 col11 file0 @@ -2434,12 +2434,12 @@ end - line203 + line201 col3 file0 - line203 + line201 col7 file0 @@ -2451,7 +2451,7 @@ kindevent location - line208 + line206 col3 file0 @@ -2459,12 +2459,12 @@ - line208 + line206 col3 file0 - line208 + line206 col48 file0 @@ -2484,12 +2484,12 @@ start - line209 + line207 col3 file0 - line209 + line207 col3 file0 @@ -2497,12 +2497,12 @@ end - line209 + line207 col6 file0 - line209 + line207 col6 file0 @@ -2514,7 +2514,7 @@ kindevent location - line209 + line207 col6 file0 @@ -2522,12 +2522,12 @@ - line209 + line207 col4 file0 - line209 + line207 col4 file0 @@ -2545,7 +2545,7 @@ location - line208 + line206 col3 file0 @@ -2564,7 +2564,7 @@ issue_hash_function_offset3 location - line209 + line207 col6 file0 @@ -2572,15 +2572,15 @@ 0 - 50 - 51 + 48 + 49 + 199 + 200 201 - 202 - 203 + 204 + 205 206 207 - 208 - 209 @@ -2595,12 +2595,12 @@ start - line219 + line217 col3 file0 - line219 + line217 col5 file0 @@ -2608,12 +2608,12 @@ end - line220 + line218 col3 file0 - line220 + line218 col31 file0 @@ -2625,7 +2625,7 @@ kindevent location - line220 + line218 col3 file0 @@ -2633,12 +2633,12 @@ - line220 + line218 col3 file0 - line220 + line218 col64 file0 @@ -2654,7 +2654,7 @@ kindevent location - line201 + line199 col1 file0 @@ -2672,12 +2672,12 @@ start - line201 + line199 col1 file0 - line201 + line199 col4 file0 @@ -2685,12 +2685,12 @@ end - line202 + line200 col3 file0 - line202 + line200 col11 file0 @@ -2702,7 +2702,7 @@ kindevent location - line202 + line200 col3 file0 @@ -2710,12 +2710,12 @@ - line202 + line200 col3 file0 - line202 + line200 col17 file0 @@ -2731,7 +2731,7 @@ kindevent location - line50 + line48 col1 file0 @@ -2749,12 +2749,12 @@ start - line50 + line48 col1 file0 - line50 + line48 col4 file0 @@ -2762,12 +2762,12 @@ end - line51 + line49 col3 file0 - line51 + line49 col3 file0 @@ -2779,7 +2779,7 @@ kindevent location - line51 + line49 col3 file0 @@ -2787,12 +2787,12 @@ - line51 + line49 col3 file0 - line51 + line49 col17 file0 @@ -2808,7 +2808,7 @@ kindevent location - line202 + line200 col3 file0 @@ -2816,12 +2816,12 @@ - line202 + line200 col3 file0 - line202 + line200 col17 file0 @@ -2841,12 +2841,12 @@ start - line202 + line200 col3 file0 - line202 + line200 col11 file0 @@ -2854,12 +2854,12 @@ end - line203 + line201 col3 file0 - line203 + line201 col7 file0 @@ -2871,7 +2871,7 @@ kindevent location - line220 + line218 col3 file0 @@ -2879,12 +2879,12 @@ - line220 + line218 col3 file0 - line220 + line218 col64 file0 @@ -2904,12 +2904,12 @@ start - line221 + line219 col3 file0 - line221 + line219 col3 file0 @@ -2917,12 +2917,12 @@ end - line221 + line219 col6 file0 - line221 + line219 col6 file0 @@ -2934,7 +2934,7 @@ kindevent location - line221 + line219 col6 file0 @@ -2942,12 +2942,12 @@ - line221 + line219 col4 file0 - line221 + line219 col4 file0 @@ -2965,7 +2965,7 @@ location - line220 + line218 col3 file0 @@ -2984,7 +2984,7 @@ issue_hash_function_offset3 location - line221 + line219 col6 file0 @@ -2992,15 +2992,15 @@ 0 - 50 - 51 + 48 + 49 + 199 + 200 201 - 202 - 203 + 216 + 217 218 219 - 220 - 221 @@ -3015,12 +3015,12 @@ start - line231 + line229 col3 file0 - line231 + line229 col5 file0 @@ -3028,12 +3028,12 @@ end - line235 + line233 col3 file0 - line235 + line233 col13 file0 @@ -3045,7 +3045,7 @@ kindevent location - line235 + line233 col3 file0 @@ -3053,12 +3053,12 @@ - line235 + line233 col3 file0 - line235 + line233 col58 file0 @@ -3074,7 +3074,7 @@ kindevent location - line235 + line233 col3 file0 @@ -3088,7 +3088,7 @@ kindevent location - line235 + line233 col3 file0 @@ -3096,12 +3096,12 @@ - line235 + line233 col3 file0 - line235 + line233 col58 file0 @@ -3117,7 +3117,7 @@ kindevent location - line50 + line48 col1 file0 @@ -3135,12 +3135,12 @@ start - line50 + line48 col1 file0 - line50 + line48 col4 file0 @@ -3148,12 +3148,12 @@ end - line51 + line49 col3 file0 - line51 + line49 col3 file0 @@ -3165,7 +3165,7 @@ kindevent location - line51 + line49 col3 file0 @@ -3173,12 +3173,12 @@ - line51 + line49 col3 file0 - line51 + line49 col17 file0 @@ -3194,7 +3194,7 @@ kindevent location - line235 + line233 col3 file0 @@ -3202,12 +3202,12 @@ - line235 + line233 col3 file0 - line235 + line233 col58 file0 @@ -3223,7 +3223,7 @@ kindevent location - line235 + line233 col3 file0 @@ -3231,12 +3231,12 @@ - line235 + line233 col3 file0 - line235 + line233 col58 file0 @@ -3256,12 +3256,12 @@ start - line236 + line234 col3 file0 - line236 + line234 col3 file0 @@ -3269,12 +3269,12 @@ end - line236 + line234 col8 file0 - line236 + line234 col8 file0 @@ -3286,7 +3286,7 @@ kindevent location - line236 + line234 col8 file0 @@ -3294,12 +3294,12 @@ - line236 + line234 col4 file0 - line236 + line234 col6 file0 @@ -3317,7 +3317,7 @@ location - line235 + line233 col3 file0 @@ -3327,7 +3327,7 @@ location - line235 + line233 col3 file0 @@ -3346,7 +3346,7 @@ issue_hash_function_offset6 location - line236 + line234 col8 file0 @@ -3354,13 +3354,13 @@ 0 - 50 - 51 + 48 + 49 + 228 + 229 230 - 231 - 232 - 235 - 236 + 233 + 234 @@ -3371,7 +3371,7 @@ kindevent location - line246 + line244 col3 file0 @@ -3379,12 +3379,12 @@ - line246 + line244 col3 file0 - line254 + line252 col4 file0 @@ -3400,7 +3400,7 @@ kindevent location - line246 + line244 col3 file0 @@ -3408,12 +3408,12 @@ - line246 + line244 col3 file0 - line254 + line252 col4 file0 @@ -3431,7 +3431,7 @@ location - line246 + line244 col3 file0 @@ -3450,7 +3450,7 @@ issue_hash_function_offset1 location - line246 + line244 col3 file0 @@ -3458,8 +3458,8 @@ 0 - 245 - 246 + 243 + 244 @@ -3474,12 +3474,12 @@ start - line268 + line266 col3 file0 - line268 + line266 col5 file0 @@ -3487,12 +3487,12 @@ end - line270 + line268 col3 file0 - line270 + line268 col25 file0 @@ -3504,7 +3504,7 @@ kindevent location - line270 + line268 col3 file0 @@ -3512,12 +3512,12 @@ - line270 + line268 col3 file0 - line270 + line268 col31 file0 @@ -3537,12 +3537,12 @@ start - line271 + line269 col3 file0 - line271 + line269 col3 file0 @@ -3550,12 +3550,12 @@ end - line271 + line269 col8 file0 - line271 + line269 col8 file0 @@ -3567,7 +3567,7 @@ kindevent location - line271 + line269 col8 file0 @@ -3575,12 +3575,12 @@ - line271 + line269 col4 file0 - line271 + line269 col6 file0 @@ -3598,7 +3598,7 @@ location - line270 + line268 col3 file0 @@ -3617,7 +3617,7 @@ issue_hash_function_offset4 location - line271 + line269 col8 file0 @@ -3625,10 +3625,10 @@ 0 - 267 + 265 + 266 268 - 270 - 271 + 269 @@ -3643,12 +3643,12 @@ start - line282 + line280 col3 file0 - line282 + line280 col5 file0 @@ -3656,12 +3656,12 @@ end - line284 + line282 col3 file0 - line284 + line282 col20 file0 @@ -3673,7 +3673,7 @@ kindevent location - line284 + line282 col3 file0 @@ -3681,12 +3681,12 @@ - line284 + line282 col3 file0 - line284 + line282 col27 file0 @@ -3706,12 +3706,12 @@ start - line285 + line283 col3 file0 - line285 + line283 col3 file0 @@ -3719,12 +3719,12 @@ end - line285 + line283 col8 file0 - line285 + line283 col8 file0 @@ -3736,7 +3736,7 @@ kindevent location - line285 + line283 col8 file0 @@ -3744,12 +3744,12 @@ - line285 + line283 col4 file0 - line285 + line283 col6 file0 @@ -3767,7 +3767,7 @@ location - line284 + line282 col3 file0 @@ -3786,7 +3786,7 @@ issue_hash_function_offset4 location - line285 + line283 col8 file0 @@ -3794,10 +3794,10 @@ 0 - 281 + 279 + 280 282 - 284 - 285 + 283 @@ -3812,12 +3812,12 @@ start - line295 + line293 col3 file0 - line295 + line293 col5 file0 @@ -3825,12 +3825,12 @@ end - line296 + line294 col3 file0 - line296 + line294 col44 file0 @@ -3842,7 +3842,7 @@ kindevent location - line296 + line294 col3 file0 @@ -3850,12 +3850,12 @@ - line296 + line294 col3 file0 - line296 + line294 col61 file0 @@ -3871,7 +3871,7 @@ kindevent location - line50 + line48 col1 file0 @@ -3889,12 +3889,12 @@ start - line50 + line48 col1 file0 - line50 + line48 col4 file0 @@ -3902,12 +3902,12 @@ end - line51 + line49 col3 file0 - line51 + line49 col3 file0 @@ -3919,7 +3919,7 @@ kindevent location - line51 + line49 col3 file0 @@ -3927,12 +3927,12 @@ - line51 + line49 col3 file0 - line51 + line49 col17 file0 @@ -3948,7 +3948,7 @@ kindevent location - line296 + line294 col3 file0 @@ -3956,12 +3956,12 @@ - line296 + line294 col3 file0 - line296 + line294 col61 file0 @@ -3981,12 +3981,12 @@ start - line297 + line295 col3 file0 - line297 + line295 col3 file0 @@ -3994,12 +3994,12 @@ end - line297 + line295 col8 file0 - line297 + line295 col8 file0 @@ -4011,7 +4011,7 @@ kindevent location - line297 + line295 col8 file0 @@ -4019,12 +4019,12 @@ - line297 + line295 col4 file0 - line297 + line295 col6 file0 @@ -4042,7 +4042,7 @@ location - line296 + line294 col3 file0 @@ -4061,7 +4061,7 @@ issue_hash_function_offset3 location - line297 + line295 col8 file0 @@ -4069,12 +4069,12 @@ 0 - 50 - 51 + 48 + 49 + 292 + 293 294 295 - 296 - 297 @@ -4089,12 +4089,12 @@ start - line315 + line313 col3 file0 - line315 + line313 col5 file0 @@ -4102,12 +4102,12 @@ end - line316 + line314 col3 file0 - line316 + line314 col22 file0 @@ -4119,7 +4119,7 @@ kindevent location - line316 + line314 col3 file0 @@ -4127,12 +4127,12 @@ - line316 + line314 col3 file0 - line316 + line314 col42 file0 @@ -4152,12 +4152,12 @@ start - line317 + line315 col3 file0 - line317 + line315 col3 file0 @@ -4165,12 +4165,12 @@ end - line317 + line315 col8 file0 - line317 + line315 col8 file0 @@ -4182,7 +4182,7 @@ kindevent location - line317 + line315 col8 file0 @@ -4190,12 +4190,12 @@ - line317 + line315 col4 file0 - line317 + line315 col6 file0 @@ -4213,7 +4213,7 @@ location - line316 + line314 col3 file0 @@ -4232,7 +4232,7 @@ issue_hash_function_offset3 location - line317 + line315 col8 file0 @@ -4240,10 +4240,10 @@ 0 + 312 + 313 314 315 - 316 - 317 @@ -4258,12 +4258,12 @@ start - line324 + line322 col3 file0 - line324 + line322 col5 file0 @@ -4271,12 +4271,12 @@ end - line327 + line325 col3 file0 - line327 + line325 col22 file0 @@ -4288,7 +4288,7 @@ kindevent location - line327 + line325 col3 file0 @@ -4296,12 +4296,12 @@ - line327 + line325 col3 file0 - line327 + line325 col27 file0 @@ -4321,12 +4321,12 @@ start - line328 + line326 col3 file0 - line328 + line326 col3 file0 @@ -4334,12 +4334,12 @@ end - line328 + line326 col8 file0 - line328 + line326 col8 file0 @@ -4351,7 +4351,7 @@ kindevent location - line328 + line326 col8 file0 @@ -4359,12 +4359,12 @@ - line328 + line326 col4 file0 - line328 + line326 col6 file0 @@ -4382,7 +4382,7 @@ location - line327 + line325 col3 file0 @@ -4401,7 +4401,7 @@ issue_hash_function_offset5 location - line328 + line326 col8 file0 @@ -4409,10 +4409,10 @@ 0 - 323 - 324 - 327 - 328 + 321 + 322 + 325 + 326 @@ -4427,12 +4427,12 @@ start - line343 + line341 col3 file0 - line343 + line341 col5 file0 @@ -4440,12 +4440,12 @@ end - line344 + line342 col3 file0 - line344 + line342 col30 file0 @@ -4457,7 +4457,7 @@ kindevent location - line344 + line342 col3 file0 @@ -4465,12 +4465,12 @@ - line344 + line342 col3 file0 - line344 + line342 col45 file0 @@ -4490,12 +4490,12 @@ start - line345 + line343 col3 file0 - line345 + line343 col3 file0 @@ -4503,12 +4503,12 @@ end - line345 + line343 col8 file0 - line345 + line343 col8 file0 @@ -4520,7 +4520,7 @@ kindevent location - line345 + line343 col8 file0 @@ -4528,12 +4528,12 @@ - line345 + line343 col4 file0 - line345 + line343 col6 file0 @@ -4551,7 +4551,7 @@ location - line344 + line342 col3 file0 @@ -4570,7 +4570,7 @@ issue_hash_function_offset3 location - line345 + line343 col8 file0 @@ -4578,10 +4578,10 @@ 0 + 340 + 341 342 343 - 344 - 345 @@ -4596,12 +4596,12 @@ start - line352 + line350 col3 file0 - line352 + line350 col5 file0 @@ -4609,12 +4609,12 @@ end - line353 + line351 col3 file0 - line353 + line351 col19 file0 @@ -4626,7 +4626,7 @@ kindevent location - line353 + line351 col3 file0 @@ -4634,12 +4634,12 @@ - line353 + line351 col3 file0 - line353 + line351 col53 file0 @@ -4659,12 +4659,12 @@ start - line354 + line352 col3 file0 - line354 + line352 col3 file0 @@ -4672,12 +4672,12 @@ end - line354 + line352 col6 file0 - line354 + line352 col6 file0 @@ -4689,7 +4689,7 @@ kindevent location - line354 + line352 col6 file0 @@ -4697,12 +4697,12 @@ - line354 + line352 col4 file0 - line354 + line352 col4 file0 @@ -4720,7 +4720,7 @@ location - line353 + line351 col3 file0 @@ -4739,7 +4739,7 @@ issue_hash_function_offset3 location - line354 + line352 col6 file0 @@ -4747,10 +4747,10 @@ 0 + 349 + 350 351 352 - 353 - 354 @@ -4765,12 +4765,12 @@ start - line365 + line363 col3 file0 - line365 + line363 col5 file0 @@ -4778,12 +4778,12 @@ end - line366 + line364 col3 file0 - line366 + line364 col11 file0 @@ -4795,7 +4795,7 @@ kindevent location - line366 + line364 col3 file0 @@ -4803,12 +4803,12 @@ - line366 + line364 col3 file0 - line366 + line364 col23 file0 @@ -4828,12 +4828,12 @@ start - line367 + line365 col3 file0 - line367 + line365 col3 file0 @@ -4841,12 +4841,12 @@ end - line367 + line365 col8 file0 - line367 + line365 col8 file0 @@ -4858,7 +4858,7 @@ kindevent location - line367 + line365 col8 file0 @@ -4866,12 +4866,12 @@ - line367 + line365 col4 file0 - line367 + line365 col6 file0 @@ -4889,7 +4889,7 @@ location - line366 + line364 col3 file0 @@ -4908,7 +4908,7 @@ issue_hash_function_offset3 location - line367 + line365 col8 file0 @@ -4916,10 +4916,10 @@ 0 + 362 + 363 364 365 - 366 - 367 @@ -4934,12 +4934,12 @@ start - line374 + line372 col3 file0 - line374 + line372 col5 file0 @@ -4947,12 +4947,12 @@ end - line375 + line373 col3 file0 - line375 + line373 col19 file0 @@ -4964,7 +4964,7 @@ kindevent location - line375 + line373 col3 file0 @@ -4972,12 +4972,12 @@ - line375 + line373 col3 file0 - line375 + line373 col52 file0 @@ -4997,12 +4997,12 @@ start - line376 + line374 col3 file0 - line376 + line374 col3 file0 @@ -5010,12 +5010,12 @@ end - line376 + line374 col6 file0 - line376 + line374 col6 file0 @@ -5027,7 +5027,7 @@ kindevent location - line376 + line374 col6 file0 @@ -5035,12 +5035,12 @@ - line376 + line374 col4 file0 - line376 + line374 col4 file0 @@ -5058,7 +5058,7 @@ location - line375 + line373 col3 file0 @@ -5077,7 +5077,7 @@ issue_hash_function_offset3 location - line376 + line374 col6 file0 @@ -5085,10 +5085,10 @@ 0 + 371 + 372 373 374 - 375 - 376 @@ -5103,12 +5103,12 @@ start - line422 + line420 col3 file0 - line422 + line420 col5 file0 @@ -5116,12 +5116,12 @@ end - line422 + line420 col18 file0 - line422 + line420 col43 file0 @@ -5133,7 +5133,7 @@ kindevent location - line422 + line420 col18 file0 @@ -5141,12 +5141,12 @@ - line422 + line420 col18 file0 - line422 + line420 col49 file0 @@ -5162,7 +5162,7 @@ kindevent location - line417 + line415 col1 file0 @@ -5180,12 +5180,12 @@ start - line417 + line415 col1 file0 - line417 + line415 col3 file0 @@ -5193,12 +5193,12 @@ end - line418 + line416 col3 file0 - line418 + line416 col21 file0 @@ -5210,7 +5210,7 @@ kindpop-up location - line418 + line416 col3 file0 @@ -5218,12 +5218,12 @@ - line418 + line416 col3 file0 - line418 + line416 col27 file0 @@ -5238,7 +5238,7 @@ kindpop-up location - line418 + line416 col3 file0 @@ -5246,12 +5246,12 @@ - line418 + line416 col3 file0 - line418 + line416 col27 file0 @@ -5266,7 +5266,7 @@ kindevent location - line418 + line416 col3 file0 @@ -5274,12 +5274,12 @@ - line418 + line416 col3 file0 - line418 + line416 col27 file0 @@ -5297,7 +5297,7 @@ location - line418 + line416 col3 file0 @@ -5316,7 +5316,7 @@ issue_hash_function_offset1 location - line418 + line416 col3 file0 @@ -5324,10 +5324,10 @@ 0 - 417 - 418 - 421 - 422 + 415 + 416 + 419 + 420 @@ -5342,12 +5342,12 @@ start - line437 + line435 col3 file0 - line437 + line435 col5 file0 @@ -5355,12 +5355,12 @@ end - line438 + line436 col3 file0 - line438 + line436 col25 file0 @@ -5372,7 +5372,7 @@ kindevent location - line438 + line436 col3 file0 @@ -5380,12 +5380,12 @@ - line438 + line436 col3 file0 - line438 + line436 col67 file0 @@ -5405,12 +5405,12 @@ start - line439 + line437 col3 file0 - line439 + line437 col3 file0 @@ -5418,12 +5418,12 @@ end - line439 + line437 col8 file0 - line439 + line437 col8 file0 @@ -5435,7 +5435,7 @@ kindevent location - line439 + line437 col8 file0 @@ -5443,12 +5443,12 @@ - line439 + line437 col4 file0 - line439 + line437 col6 file0 @@ -5466,7 +5466,7 @@ location - line438 + line436 col3 file0 @@ -5485,7 +5485,7 @@ issue_hash_function_offset3 location - line439 + line437 col8 file0 @@ -5493,10 +5493,10 @@ 0 + 434 + 435 436 437 - 438 - 439 @@ -5511,12 +5511,12 @@ start - line450 + line448 col3 file0 - line450 + line448 col4 file0 @@ -5524,12 +5524,12 @@ end - line450 + line448 col7 file0 - line450 + line448 col11 file0 @@ -5541,7 +5541,7 @@ kindevent location - line450 + line448 col7 file0 @@ -5549,12 +5549,12 @@ - line450 + line448 col7 file0 - line450 + line448 col16 file0 @@ -5570,7 +5570,7 @@ kindevent location - line451 + line449 col7 file0 @@ -5578,12 +5578,12 @@ - line451 + line449 col5 file0 - line451 + line449 col13 file0 @@ -5601,7 +5601,7 @@ location - line450 + line448 col7 file0 @@ -5620,7 +5620,7 @@ issue_hash_function_offset2 location - line451 + line449 col7 file0 @@ -5628,9 +5628,9 @@ 0 + 447 + 448 449 - 450 - 451 @@ -5645,12 +5645,12 @@ start - line462 + line460 col33 file0 - line462 + line460 col33 file0 @@ -5658,12 +5658,12 @@ end - line462 + line460 col37 file0 - line462 + line460 col39 file0 @@ -5675,7 +5675,7 @@ kindevent location - line462 + line460 col37 file0 @@ -5683,12 +5683,12 @@ - line462 + line460 col37 file0 - line462 + line460 col41 file0 @@ -5704,7 +5704,7 @@ kindevent location - line461 + line459 col1 file0 @@ -5718,7 +5718,7 @@ kindevent location - line461 + line459 col1 file0 @@ -5726,12 +5726,12 @@ - line461 + line459 col1 file0 - line461 + line459 col16 file0 @@ -5747,7 +5747,7 @@ kindevent location - line462 + line460 col37 file0 @@ -5755,12 +5755,12 @@ - line462 + line460 col37 file0 - line462 + line460 col41 file0 @@ -5780,12 +5780,12 @@ start - line462 + line460 col37 file0 - line462 + line460 col39 file0 @@ -5793,12 +5793,12 @@ end - line462 + line460 col35 file0 - line462 + line460 col35 file0 @@ -5810,7 +5810,7 @@ kindevent location - line462 + line460 col35 file0 @@ -5818,12 +5818,12 @@ - line462 + line460 col33 file0 - line462 + line460 col41 file0 @@ -5841,7 +5841,7 @@ location - line461 + line459 col1 file0 @@ -5860,7 +5860,7 @@ issue_hash_function_offset0 location - line462 + line460 col35 file0 @@ -5868,8 +5868,8 @@ 0 - 461 - 462 + 459 + 460 @@ -5884,12 +5884,12 @@ start - line471 + line469 col33 file0 - line471 + line469 col33 file0 @@ -5897,12 +5897,12 @@ end - line471 + line469 col37 file0 - line471 + line469 col39 file0 @@ -5914,7 +5914,7 @@ kindevent location - line471 + line469 col37 file0 @@ -5922,12 +5922,12 @@ - line471 + line469 col37 file0 - line471 + line469 col41 file0 @@ -5943,7 +5943,7 @@ kindevent location - line470 + line468 col1 file0 @@ -5957,7 +5957,7 @@ kindevent location - line470 + line468 col1 file0 @@ -5965,12 +5965,12 @@ - line470 + line468 col1 file0 - line470 + line468 col11 file0 @@ -5986,7 +5986,7 @@ kindevent location - line471 + line469 col37 file0 @@ -5994,12 +5994,12 @@ - line471 + line469 col37 file0 - line471 + line469 col41 file0 @@ -6019,12 +6019,12 @@ start - line471 + line469 col37 file0 - line471 + line469 col39 file0 @@ -6032,12 +6032,12 @@ end - line471 + line469 col35 file0 - line471 + line469 col35 file0 @@ -6049,7 +6049,7 @@ kindevent location - line471 + line469 col35 file0 @@ -6057,12 +6057,12 @@ - line471 + line469 col33 file0 - line471 + line469 col41 file0 @@ -6080,7 +6080,7 @@ location - line470 + line468 col1 file0 @@ -6099,7 +6099,7 @@ issue_hash_function_offset0 location - line471 + line469 col35 file0 @@ -6107,8 +6107,683 @@ 0 - 470 - 471 + 468 + 469 + + + + + path + + + kindcontrol + edges + + + start + + + line481 + col3 + file0 + + + line481 + col5 + file0 + + + end + + + line482 + col3 + file0 + + + line482 + col10 + file0 + + + + + + + kindevent + location + + line482 + col3 + file0 + + ranges + + + + line482 + col3 + file0 + + + line482 + col28 + file0 + + + + depth0 + extended_message + The value 0 is assigned to 'x' + message + The value 0 is assigned to 'x' + + + kindevent + location + + line483 + col13 + file0 + + ranges + + + + line483 + col10 + file0 + + + line483 + col15 + file0 + + + + depth0 + extended_message + Division by zero + message + Division by zero + + + macro_expansions + + + location + + line482 + col3 + file0 + + nameDISPATCH + expansionfoo(x, "LF1M healer");x = 0;; + + + descriptionDivision by zero + categoryLogic error + typeDivision by zero + check_namecore.DivideZero + + issue_hash_content_of_line_in_context0911a97774745d4fa0ac03cd9680dfe1 + issue_context_kindfunction + issue_contextmulitpleParamsResolveToVA_ARGS + issue_hash_function_offset3 + location + + line483 + col13 + file0 + + ExecutedLines + + 0 + + 480 + 481 + 482 + 483 + + + + + path + + + kindcontrol + edges + + + start + + + line494 + col3 + file0 + + + line494 + col5 + file0 + + + end + + + line495 + col3 + file0 + + + line495 + col16 + file0 + + + + + + + kindevent + location + + line495 + col3 + file0 + + ranges + + + + line495 + col3 + file0 + + + line495 + col71 + file0 + + + + depth0 + extended_message + The value 0 is assigned to 'x' + message + The value 0 is assigned to 'x' + + + kindevent + location + + line496 + col13 + file0 + + ranges + + + + line496 + col10 + file0 + + + line496 + col15 + file0 + + + + depth0 + extended_message + Division by zero + message + Division by zero + + + macro_expansions + + + location + + line495 + col3 + file0 + + nameCONCAT_VA_ARGS + expansionvariadicCFunction(x, "You need to construct additional pylons.",'c', 9);x = 0; + + + descriptionDivision by zero + categoryLogic error + typeDivision by zero + check_namecore.DivideZero + + issue_hash_content_of_line_in_contexted592fb952ed786e7efdc81bbc538e94 + issue_context_kindfunction + issue_contextconcatVA_ARGS + issue_hash_function_offset3 + location + + line496 + col13 + file0 + + ExecutedLines + + 0 + + 493 + 494 + 495 + 496 + + + + + path + + + kindcontrol + edges + + + start + + + line502 + col3 + file0 + + + line502 + col5 + file0 + + + end + + + line503 + col3 + file0 + + + line503 + col16 + file0 + + + + + + + kindevent + location + + line503 + col3 + file0 + + ranges + + + + line503 + col3 + file0 + + + line503 + col44 + file0 + + + + depth0 + extended_message + The value 0 is assigned to 'x' + message + The value 0 is assigned to 'x' + + + kindevent + location + + line504 + col13 + file0 + + ranges + + + + line504 + col10 + file0 + + + line504 + col15 + file0 + + + + depth0 + extended_message + Division by zero + message + Division by zero + + + macro_expansions + + + location + + line503 + col3 + file0 + + nameCONCAT_VA_ARGS + expansionvariadicCFunction(x, "You need to construct",);x = 0; + + + descriptionDivision by zero + categoryLogic error + typeDivision by zero + check_namecore.DivideZero + + issue_hash_content_of_line_in_context4b0ab46d7a972d0a388b4bb59351480a + issue_context_kindfunction + issue_contextconcatVA_ARGSEmpty + issue_hash_function_offset3 + location + + line504 + col13 + file0 + + ExecutedLines + + 0 + + 501 + 502 + 503 + 504 + + + + + path + + + kindcontrol + edges + + + start + + + line514 + col3 + file0 + + + line514 + col5 + file0 + + + end + + + line515 + col3 + file0 + + + line515 + col21 + file0 + + + + + + + kindevent + location + + line515 + col3 + file0 + + ranges + + + + line515 + col3 + file0 + + + line515 + col71 + file0 + + + + depth0 + extended_message + The value 0 is assigned to 'x' + message + The value 0 is assigned to 'x' + + + kindevent + location + + line516 + col13 + file0 + + ranges + + + + line516 + col10 + file0 + + + line516 + col15 + file0 + + + + depth0 + extended_message + Division by zero + message + Division by zero + + + macro_expansions + + + location + + line515 + col3 + file0 + + nameSTRINGIFIED_VA_ARGS + expansionvariadicCFunction(x, "Additional supply depots required.", "'a'", 10);x = 0; + + + descriptionDivision by zero + categoryLogic error + typeDivision by zero + check_namecore.DivideZero + + issue_hash_content_of_line_in_context6622e3f0651f97e6cbf4e075e6b07707 + issue_context_kindfunction + issue_contextstringifyVA_ARGS + issue_hash_function_offset3 + location + + line516 + col13 + file0 + + ExecutedLines + + 0 + + 513 + 514 + 515 + 516 + + + + + path + + + kindcontrol + edges + + + start + + + line524 + col3 + file0 + + + line524 + col5 + file0 + + + end + + + line525 + col3 + file0 + + + line525 + col21 + file0 + + + + + + + kindevent + location + + line525 + col3 + file0 + + ranges + + + + line525 + col3 + file0 + + + line525 + col62 + file0 + + + + depth0 + extended_message + The value 0 is assigned to 'x' + message + The value 0 is assigned to 'x' + + + kindevent + location + + line526 + col13 + file0 + + ranges + + + + line526 + col10 + file0 + + + line526 + col15 + file0 + + + + depth0 + extended_message + Division by zero + message + Division by zero + + + macro_expansions + + + location + + line525 + col3 + file0 + + nameSTRINGIFIED_VA_ARGS + expansionvariadicCFunction(x, "Additional supply depots required.", ")";x = 0; + + + descriptionDivision by zero + categoryLogic error + typeDivision by zero + check_namecore.DivideZero + + issue_hash_content_of_line_in_context86c6e52c81f1129e6c9f51e6938d9ee7 + issue_context_kindfunction + issue_contextstringifyVA_ARGSEmpty + issue_hash_function_offset3 + location + + line526 + col13 + file0 + + ExecutedLines + + 0 + + 523 + 524 + 525 + 526 Index: clang/test/Analysis/plist-macros-with-expansion.cpp =================================================================== --- clang/test/Analysis/plist-macros-with-expansion.cpp +++ clang/test/Analysis/plist-macros-with-expansion.cpp @@ -1,5 +1,3 @@ -// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core -verify %s -// // RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core %s \ // RUN: -analyzer-output=plist -o %t.plist \ // RUN: -analyzer-config expand-macros=true @@ -472,3 +470,62 @@ // CHECK: nameAPPLY_ZERO2 // CHECK-NEXT: expansionint bar() { return 0; } + +void foo(int &x, const char *str); + +#define PARAMS_RESOLVE_TO_VA_ARGS(i, fmt) foo(i, fmt); \ + i = 0; +#define DISPATCH(...) PARAMS_RESOLVE_TO_VA_ARGS(__VA_ARGS__); + +void mulitpleParamsResolveToVA_ARGS(void) { + int x = 1; + DISPATCH(x, "LF1M healer"); + (void)(10 / x); // expected-warning{{Division by zero}} +} +// CHECK: nameDISPATCH +// CHECK-NEXT: expansionfoo(x, "LF1M healer");x = 0;; + +void variadicCFunction(int &x, const char *str, ...); + +#define CONCAT_VA_ARGS(i, fmt, ...) variadicCFunction(i, fmt, ##__VA_ARGS__); \ + i = 0; + +void concatVA_ARGS(void) { + int x = 1; + CONCAT_VA_ARGS(x, "You need to construct additional pylons.", 'c', 9); + (void)(10 / x); // expected-warning{{Division by zero}} +} +// CHECK: nameCONCAT_VA_ARGS +// CHECK-NEXT: expansionvariadicCFunction(x, "You need to construct additional pylons.",'c', 9);x = 0; + +void concatVA_ARGSEmpty(void) { + int x = 1; + CONCAT_VA_ARGS(x, "You need to construct"); + (void)(10 / x); // expected-warning{{Division by zero}} +} +// FIXME: The comma shouldn't be present after the last argument. +// CHECK: nameCONCAT_VA_ARGS +// CHECK-NEXT: expansionvariadicCFunction(x, "You need to construct",);x = 0; + +#define STRINGIFIED_VA_ARGS(i, fmt, ...) variadicCFunction(i, fmt, #__VA_ARGS__); \ + i = 0; + +void stringifyVA_ARGS(void) { + int x = 1; + STRINGIFIED_VA_ARGS(x, "Additional supply depots required.", 'a', 10); + (void)(10 / x); // expected-warning{{Division by zero}} +} + +// FIXME: Stringify and escape __VA_ARGS__ correctly. +// CHECK: nameSTRINGIFIED_VA_ARGS +// CHECK-NEXT: expansionvariadicCFunction(x, "Additional supply depots required.", "'a'", 10);x = 0; + +void stringifyVA_ARGSEmpty(void) { + int x = 1; + STRINGIFIED_VA_ARGS(x, "Additional supply depots required."); + (void)(10 / x); // expected-warning{{Division by zero}} +} + +// FIXME: Stringify and escape __VA_ARGS__ correctly. +// CHECK: nameSTRINGIFIED_VA_ARGS +// CHECK-NEXT: expansionvariadicCFunction(x, "Additional supply depots required.", ")";x = 0;