aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/cplusplus/pp-engine.h
diff options
context:
space:
mode:
authorLeandro Melo <[email protected]>2012-05-29 12:37:55 +0200
committerhjk <[email protected]>2012-06-01 14:28:03 +0200
commitca7ac8c0358efb0067c47f3135b22f26ea66b2a1 (patch)
treeefcd1f3be7736c2a2da80ed038830770939388a3 /src/libs/cplusplus/pp-engine.h
parent356d5cab238faa942efd6f8ed1dcd129ecebbc9d (diff)
C++: Fix macro uses line info
Make sure the environment line is consistent during preprocessor directives and identifier handling so clients can rely on consistent information. Particularly important for macro usages. New tests also added. Change-Id: I962a39a86cd17b8d945d2959c2c95e2d258ea3e6 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/pp-engine.h')
-rw-r--r--src/libs/cplusplus/pp-engine.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/cplusplus/pp-engine.h b/src/libs/cplusplus/pp-engine.h
index 12afd1f9b83..c310a9e3e3a 100644
--- a/src/libs/cplusplus/pp-engine.h
+++ b/src/libs/cplusplus/pp-engine.h
@@ -92,7 +92,7 @@ private:
void preprocess(const QString &filename,
const QByteArray &source,
QByteArray *result, bool noLines, bool markGeneratedTokens, bool inCondition,
- unsigned offset = 0);
+ unsigned offsetRef = 0, unsigned envLineRef = 1);
enum { MAX_LEVEL = 512 };
@@ -121,6 +121,7 @@ private:
bool m_inDefine;
unsigned m_offsetRef;
+ unsigned m_envLineRef;
};
void handleDefined(PPToken *tk);