Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Camelon2004-09-21 18:29:36 +0000
committerJohn Camelon2004-09-21 18:29:36 +0000
commit726c0f77b1a120a038bdd316247040e054803e0c (patch)
tree3c299b3e1feefb4c72236bfb54e2404e19b90091 /core/org.eclipse.cdt.core.tests
parent8ec09a9e375a87aec7a6527769153249fc6d0208 (diff)
downloadorg.eclipse.cdt-726c0f77b1a120a038bdd316247040e054803e0c.tar.gz
org.eclipse.cdt-726c0f77b1a120a038bdd316247040e054803e0c.tar.xz
org.eclipse.cdt-726c0f77b1a120a038bdd316247040e054803e0c.zip
Fixed 71733 - [Scanner] Comment within multi-line macro definition not scanned properly
- Thanks to David Pickens who pointed me to the right place in Scanner2.
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java
index c253b67d6f0..b41138487a3 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/CompleteParseASTTest.java
@@ -2124,6 +2124,18 @@ public class CompleteParseASTTest extends CompleteParseBaseTest
parse( writer.toString() );
}
+ public void testBug71733() throws Exception
+ {
+ Writer writer = new StringWriter();
+ writer.write( "void foo( int );\n");
+ writer.write( "#define BLAH() \\\n");
+ writer.write( " foo ( /* slash / is misinterpreted as end of comment */ \\\n");
+ writer.write( " 4 );\n");
+ writer.write( "int f() { BLAH() }\n");
+ parse( writer.toString() );
+ assertEquals( callback.getReferences().size(), 1 );
+ }
+
public void testBug69526() throws Exception
{
Writer writer = new StringWriter();

Back to the top