summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-02-17 21:43:43 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-20 15:35:55 (GMT)
commitd58d28a94142bfd290ea8053a60927138ac98d4d (patch)
tree0c3e91778d16cfa2d91dcda429403106731185ce
parent07953c18f3cf64ae599d38bcf3cdc2408fb5533b (diff)
downloadCMake-d58d28a94142bfd290ea8053a60927138ac98d4d.zip
CMake-d58d28a94142bfd290ea8053a60927138ac98d4d.tar.gz
CMake-d58d28a94142bfd290ea8053a60927138ac98d4d.tar.bz2
ParserHelper: Move macros to bottom of files
Since the class name is used in the macros, the iwyu tool gets confused wheter it needs a forward declaration or not. While editing the files, make sure structs have no typedef. Also, remove confusing comments about Java.
-rw-r--r--Source/cmCommandArgumentParserHelper.h22
-rw-r--r--Source/cmDependsJavaParserHelper.h17
-rw-r--r--Source/cmExprParserHelper.h19
3 files changed, 22 insertions, 36 deletions
diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h
index 95bf0ad..5bfb236 100644
--- a/Source/cmCommandArgumentParserHelper.h
+++ b/Source/cmCommandArgumentParserHelper.h
@@ -8,27 +8,15 @@
#include <string>
#include <vector>
-#define YYSTYPE cmCommandArgumentParserHelper::ParserType
-#define YYSTYPE_IS_DECLARED
-#define YY_EXTRA_TYPE cmCommandArgumentParserHelper*
-#define YY_DECL \
- int cmCommandArgument_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
-
-/** \class cmCommandArgumentParserHelper
- * \brief Helper class for parsing java source files
- *
- * Finds dependencies for java file and list of outputs
- */
-
class cmMakefile;
class cmCommandArgumentParserHelper
{
public:
- typedef struct
+ struct ParserType
{
char* str;
- } ParserType;
+ };
cmCommandArgumentParserHelper();
~cmCommandArgumentParserHelper();
@@ -100,4 +88,10 @@ private:
bool RemoveEmpty;
};
+#define YYSTYPE cmCommandArgumentParserHelper::ParserType
+#define YYSTYPE_IS_DECLARED
+#define YY_EXTRA_TYPE cmCommandArgumentParserHelper*
+#define YY_DECL \
+ int cmCommandArgument_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
+
#endif
diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h
index 71b939c..5f28f70 100644
--- a/Source/cmDependsJavaParserHelper.h
+++ b/Source/cmDependsJavaParserHelper.h
@@ -8,26 +8,18 @@
#include <string>
#include <vector>
-class cmDependsJavaParserHelper;
-
-#define YYSTYPE cmDependsJavaParserHelper::ParserType
-#define YYSTYPE_IS_DECLARED
-#define YY_EXTRA_TYPE cmDependsJavaParserHelper*
-#define YY_DECL int cmDependsJava_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
-
/** \class cmDependsJavaParserHelper
* \brief Helper class for parsing java source files
*
* Finds dependencies for java file and list of outputs
*/
-
class cmDependsJavaParserHelper
{
public:
- typedef struct
+ struct ParserType
{
char* str;
- } ParserType;
+ };
cmDependsJavaParserHelper();
~cmDependsJavaParserHelper();
@@ -96,4 +88,9 @@ private:
void CleanupParser();
};
+#define YYSTYPE cmDependsJavaParserHelper::ParserType
+#define YYSTYPE_IS_DECLARED
+#define YY_EXTRA_TYPE cmDependsJavaParserHelper*
+#define YY_DECL int cmDependsJava_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
+
#endif
diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h
index 8f00f1d..df365fc 100644
--- a/Source/cmExprParserHelper.h
+++ b/Source/cmExprParserHelper.h
@@ -8,23 +8,13 @@
#include <string>
#include <vector>
-#define YYSTYPE cmExprParserHelper::ParserType
-#define YYSTYPE_IS_DECLARED
-#define YY_EXTRA_TYPE cmExprParserHelper*
-#define YY_DECL int cmExpr_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
-
-/** \class cmExprParserHelper
- * \brief Helper class for parsing java source files
- *
- * Finds dependencies for java file and list of outputs
- */
class cmExprParserHelper
{
public:
- typedef struct
+ struct ParserType
{
int Number;
- } ParserType;
+ };
cmExprParserHelper();
~cmExprParserHelper();
@@ -57,4 +47,9 @@ private:
std::string ErrorString;
};
+#define YYSTYPE cmExprParserHelper::ParserType
+#define YYSTYPE_IS_DECLARED
+#define YY_EXTRA_TYPE cmExprParserHelper*
+#define YY_DECL int cmExpr_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner)
+
#endif