summaryrefslogtreecommitdiffstats
path: root/src/antlr/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-09 07:31:53 +0100
committerSven Gothel <[email protected]>2015-03-09 07:31:53 +0100
commit9d2bc5118f20f6f6defae075da17d34e1716d36d (patch)
treee8ad99895e0bfd332f7f9725d917406cbb2d21ad /src/antlr/com
parent5dd12c17bf5037c7ac6a2ac73caf4d61443c4749 (diff)
Bug 1134 - Refine err/log message of 'previous definition is here'
Diffstat (limited to 'src/antlr/com')
-rw-r--r--src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g
index 8826c13..d159ff3 100644
--- a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g
+++ b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g
@@ -761,8 +761,8 @@ enumSpecifier [int cvAttrs] returns [Type t] {
final EnumType dupE = enumMap.get(eName);
if( null != dupE && !dupE.equalSemantics(e) ) {
throwGlueGenException(enumSpecifier_AST_in,
- String.format("Duplicate enum w/ incompatible type:%n this '%s',%n have '%s',%n previously declared here: %s",
- getTypeString(e), getTypeString(dupE), dupE.getASTLocusTag()));
+ String.format("Duplicate enum w/ incompatible type:%n this '%s',%n have '%s',%n %s: previous definition is here",
+ getTypeString(e), getTypeString(dupE), dupE.getASTLocusTag().toString(new StringBuilder(), "note", true)));
}
enumMap.put(eName, (EnumType)e.clone(locusTag));
}
@@ -879,8 +879,8 @@ initDecl[TypeBox tb] {
final Type dupT = typedefDictionary.get(declName);
if( null != dupT && !dupT.equalSemantics(t) ) {
throwGlueGenException(locusTag,
- String.format("Duplicate typedef w/ incompatible type:%n this '%s',%n have '%s',%n previously declared here: %s",
- getTypeString(t), getTypeString(dupT), dupT.getASTLocusTag()));
+ String.format("Duplicate typedef w/ incompatible type:%n this '%s',%n have '%s',%n %s: previous definition is here",
+ getTypeString(t), getTypeString(dupT), dupT.getASTLocusTag().toString(new StringBuilder(), "note", true)));
}
t = canonicalize(t);
debugPrintln(" - canon -> "+getDebugTypeString(t));