Skip to content

Commit 57a261a

Browse files
committed
removed need to build astutils.cpp with testrunner for Visual Studio by actually exporting symbols
1 parent aa8e4d3 commit 57a261a

3 files changed

Lines changed: 9 additions & 17 deletions

File tree

‎lib/astutils.h‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ bool isTemporary(bool cpp, const Token* tok, const Library* library, bool unknow
178178
const Token* previousBeforeAstLeftmostLeaf(const Token* tok);
179179
Token* previousBeforeAstLeftmostLeaf(Token* tok);
180180

181-
const Token * nextAfterAstRightmostLeaf(const Token * tok);
181+
CPPCHECKLIB const Token * nextAfterAstRightmostLeaf(const Token * tok);
182182
Token* nextAfterAstRightmostLeaf(Token* tok);
183183

184184
Token* astParentSkipParens(Token* tok);
@@ -240,7 +240,7 @@ SmallVector<ReferenceToken> followAllReferences(const Token* tok,
240240
int depth = 20);
241241
const Token* followReferences(const Token* tok, ErrorPath* errors = nullptr);
242242

243-
bool isSameExpression(bool cpp, bool macro, const Token *tok1, const Token *tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr);
243+
CPPCHECKLIB bool isSameExpression(bool cpp, bool macro, const Token *tok1, const Token *tok2, const Library& library, bool pure, bool followVar, ErrorPath* errors=nullptr);
244244

245245
bool isEqualKnownValue(const Token * const tok1, const Token * const tok2);
246246

@@ -249,7 +249,7 @@ bool isStructuredBindingVariable(const Variable* var);
249249
/**
250250
* Is token used a boolean, that is to say cast to a bool, or used as a condition in a if/while/for
251251
*/
252-
bool isUsedAsBool(const Token * const tok);
252+
CPPCHECKLIB bool isUsedAsBool(const Token * const tok);
253253

254254
/**
255255
* Are two conditions opposite
@@ -275,7 +275,7 @@ bool isUniqueExpression(const Token* tok);
275275
bool isEscapeFunction(const Token* ftok, const Library* library);
276276

277277
/** Is scope a return scope (scope will unconditionally return) */
278-
bool isReturnScope(const Token* const endToken,
278+
CPPCHECKLIB bool isReturnScope(const Token* const endToken,
279279
const Library* library = nullptr,
280280
const Token** unknownFunc = nullptr,
281281
bool functionScope = false);
@@ -310,10 +310,10 @@ bool isVariableChangedByFunctionCall(const Token *tok, int indirect, nonneg int
310310
* @param settings program settings
311311
* @param inconclusive pointer to output variable which indicates that the answer of the question is inconclusive
312312
*/
313-
bool isVariableChangedByFunctionCall(const Token *tok, int indirect, const Settings *settings, bool *inconclusive);
313+
CPPCHECKLIB bool isVariableChangedByFunctionCall(const Token *tok, int indirect, const Settings *settings, bool *inconclusive);
314314

315315
/** Is variable changed in block of code? */
316-
bool isVariableChanged(const Token *start, const Token *end, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20);
316+
CPPCHECKLIB bool isVariableChanged(const Token *start, const Token *end, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20);
317317
bool isVariableChanged(const Token *start, const Token *end, int indirect, const nonneg int exprid, bool globalvar, const Settings *settings, bool cpp, int depth = 20);
318318

319319
bool isVariableChanged(const Token *tok, int indirect, const Settings *settings, bool cpp, int depth = 20);
@@ -378,14 +378,14 @@ int getArgumentPos(const Variable* var, const Function* f);
378378
*/
379379
bool isIteratorPair(std::vector<const Token*> args);
380380

381-
const Token *findLambdaStartToken(const Token *last);
381+
CPPCHECKLIB const Token *findLambdaStartToken(const Token *last);
382382

383383
/**
384384
* find lambda function end token
385385
* \param first The [ token
386386
* \return nullptr or the }
387387
*/
388-
const Token *findLambdaEndToken(const Token *first);
388+
CPPCHECKLIB const Token *findLambdaEndToken(const Token *first);
389389
Token* findLambdaEndToken(Token* first);
390390

391391
bool isLikelyStream(bool cpp, const Token *stream);
@@ -416,7 +416,7 @@ const Token* findAllocFuncCallToken(const Token *expr, const Library &library);
416416

417417
bool isScopeBracket(const Token* tok);
418418

419-
bool isNullOperand(const Token *expr);
419+
CPPCHECKLIB bool isNullOperand(const Token *expr);
420420

421421
bool isGlobalData(const Token *expr, bool cpp);
422422

‎test/testrunner.vcxproj‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
<ClCompile Include="..\cli\executor.cpp" />
3232
<ClCompile Include="..\cli\processexecutor.cpp" />
3333
<ClCompile Include="..\cli\threadexecutor.cpp" />
34-
<ClCompile Include="..\lib\astutils.cpp" />
3534
<ClCompile Include="options.cpp" />
3635
<ClCompile Include="test64bit.cpp" />
3736
<ClCompile Include="testanalyzerinformation.cpp" />
@@ -107,7 +106,6 @@
107106
<ClInclude Include="..\cli\cmdlineparser.h" />
108107
<ClInclude Include="..\cli\filelister.h" />
109108
<ClInclude Include="..\cli\threadexecutor.h" />
110-
<ClInclude Include="..\lib\config.h" />
111109
<ClInclude Include="options.h" />
112110
<ClInclude Include="precompiled.h" />
113111
<ClInclude Include="redirect.h" />

‎test/testrunner.vcxproj.filters‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@
211211
<ClCompile Include="testastutils.cpp">
212212
<Filter>Source Files</Filter>
213213
</ClCompile>
214-
<ClCompile Include="..\lib\astutils.cpp">
215-
<Filter>Source Files</Filter>
216-
</ClCompile>
217214
<ClCompile Include="testsimplifyusing.cpp">
218215
<Filter>Source Files</Filter>
219216
</ClCompile>
@@ -252,9 +249,6 @@
252249
<ClInclude Include="..\cli\cmdlineparser.h">
253250
<Filter>Header Files</Filter>
254251
</ClInclude>
255-
<ClInclude Include="..\lib\config.h">
256-
<Filter>Header Files</Filter>
257-
</ClInclude>
258252
<ClInclude Include="precompiled.h">
259253
<Filter>Header Files</Filter>
260254
</ClInclude>

0 commit comments

Comments
 (0)