1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Follow up for parameter annotations, bug 254520.

This commit is contained in:
Markus Schorn 2008-11-11 15:50:59 +00:00
parent db3ef0bebe
commit 9bf64fd0e5
2 changed files with 8 additions and 4 deletions

View file

@ -208,11 +208,15 @@ class PDOMCParameter extends PDOMNamedNode implements IParameter, IPDOMBinding {
return null; return null;
} }
protected byte encodeFlags(IParameter param) throws DOMException { protected byte encodeFlags(IParameter param) {
// C99 ISO/IEC 9899: 6.7.5.3.2 // C99 ISO/IEC 9899: 6.7.5.3.2
byte flags= 0; byte flags= 0;
flags |= (param.isAuto() ? 1 : 0) << PDOMCAnnotation.AUTO_OFFSET; try {
flags |= (param.isRegister() ? 1 : 0) << PDOMCAnnotation.REGISTER_OFFSET; flags |= (param.isAuto() ? 1 : 0) << PDOMCAnnotation.AUTO_OFFSET;
flags |= (param.isRegister() ? 1 : 0) << PDOMCAnnotation.REGISTER_OFFSET;
} catch (DOMException e) {
// ignore and miss out on some flags
}
return flags; return flags;
} }

View file

@ -118,7 +118,7 @@ class PDOMCPPParameter extends PDOMNamedNode implements ICPPParameter, IPDOMBind
byte annotations = PDOMCPPAnnotation.encodeAnnotation(param); byte annotations = PDOMCPPAnnotation.encodeAnnotation(param);
db.putByte(record + ANNOTATIONS, annotations); db.putByte(record + ANNOTATIONS, annotations);
} catch (DOMException e) { } catch (DOMException e) {
throw new CoreException(Util.createStatus(e)); // ignore and miss out on some properties of the parameter
} }
} }