summaryrefslogtreecommitdiff
path: root/Source/cmCommandArgumentParserHelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.h')
-rw-r--r--Source/cmCommandArgumentParserHelper.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h
index 465ca9e28..25e689224 100644
--- a/Source/cmCommandArgumentParserHelper.h
+++ b/Source/cmCommandArgumentParserHelper.h
@@ -3,7 +3,7 @@
#ifndef cmCommandArgumentParserHelper_h
#define cmCommandArgumentParserHelper_h
-#include "cmConfigure.h"
+#include "cmConfigure.h" // IWYU pragma: keep
#include <string>
#include <vector>
@@ -12,17 +12,19 @@ class cmMakefile;
class cmCommandArgumentParserHelper
{
- CM_DISABLE_COPY(cmCommandArgumentParserHelper)
-
public:
struct ParserType
{
- char* str;
+ const char* str;
};
cmCommandArgumentParserHelper();
~cmCommandArgumentParserHelper();
+ cmCommandArgumentParserHelper(cmCommandArgumentParserHelper const&) = delete;
+ cmCommandArgumentParserHelper& operator=(
+ cmCommandArgumentParserHelper const&) = delete;
+
int ParseString(const char* str, int verb);
// For the lexer:
@@ -35,11 +37,11 @@ public:
void Error(const char* str);
// For yacc
- char* CombineUnions(char* in1, char* in2);
+ const char* CombineUnions(const char* in1, const char* in2);
- char* ExpandSpecialVariable(const char* key, const char* var);
- char* ExpandVariable(const char* var);
- char* ExpandVariableForAt(const char* var);
+ const char* ExpandSpecialVariable(const char* key, const char* var);
+ const char* ExpandVariable(const char* var);
+ const char* ExpandVariableForAt(const char* var);
void SetResult(const char* value);
void SetMakefile(const cmMakefile* mf);
@@ -53,13 +55,6 @@ public:
void SetRemoveEmpty(bool b) { this->RemoveEmpty = b; }
const char* GetError() { return this->ErrorString.c_str(); }
- char EmptyVariable[1];
- char DCURLYVariable[3];
- char RCURLYVariable[3];
- char ATVariable[3];
- char DOLLARVariable[3];
- char LCURLYVariable[3];
- char BSLASHVariable[3];
private:
std::string::size_type InputBufferPos;
@@ -69,7 +64,7 @@ private:
void Print(const char* place, const char* str);
void SafePrintMissing(const char* str, int line, int cnt);
- char* AddString(const std::string& str);
+ const char* AddString(const std::string& str);
void CleanupParser();
void SetError(std::string const& msg);
@@ -82,8 +77,6 @@ private:
long FileLine;
int CurrentLine;
int Verbose;
- bool WarnUninitialized;
- bool CheckSystemVars;
bool EscapeQuotes;
bool NoEscapeMode;
bool ReplaceAtSyntax;