Preprocessor fixes:
- Correctly handle non-directive lines starting with "#" - Correctly ignore unrecognized #pragma - Partial fix for new lines in the middle of macro invocation git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24266 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -75,5 +75,30 @@ float foo()
|
||||
#define BIGARGS3(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
|
||||
#define BIGARGS4(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
|
||||
|
||||
|
||||
#define foobar(a, b) a + b
|
||||
|
||||
#if foobar(1.1, 2.2)
|
||||
#error good macro
|
||||
#else
|
||||
#error bad macro
|
||||
#endif
|
||||
|
||||
#if foobar(1
|
||||
;
|
||||
#
|
||||
#
|
||||
#endif
|
||||
#if foobar(1,
|
||||
;
|
||||
#
|
||||
#
|
||||
#endif
|
||||
float c = foobar(1.1, 2.2
|
||||
);
|
||||
#if foobar(1.1, 2.2
|
||||
)
|
||||
#if foobar(1.1, 2.2
|
||||
|
||||
#if 0
|
||||
// ERROR, EOF
|
||||
Reference in New Issue
Block a user