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

Bug 537272 - Offer "Create local variable" based on compiler errors

This patch introduces an additional message pattern for the
CreateLocalVariable QuickFix that matches GCC's C++ error message for
undefined entities.

Change-Id: I44d6579d41d9c93dc23366907fa52caf1c6f3b21
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
This commit is contained in:
Felix Morgner 2018-07-24 09:39:51 +02:00 committed by Nathan Ridge
parent 9853ba09d9
commit 52fab3d8af
2 changed files with 5 additions and 0 deletions

View file

@ -17,3 +17,4 @@ GCCFixitNoPointerOpCPP=request for member \u2018.*\u2019 in \u2018(.*)\u2019, wh
GCCFixitNoPointerOperator.errormsg=\u2018(.*)\u2019 is a pointer(.*)did you mean to use \u2018->\u2019.*
GCCFixitInvalidPtrTypeCPP=base operand of \u2018->\u2019 has non-pointer type \u2018(.*)\u2019.*
GCCFixitInvalidPtrStruct.errormsg=invalid type argument of \u2018->\u2019.*have \u2018struct (.*)\u2019.*
GCCNotDeclaredInThisScope.errormsg=\u2018(.*)\u2019 was not declared in this scope

View file

@ -82,5 +82,9 @@
<universalResolution
class="org.eclipse.cdt.codan.internal.checkers.ui.quickfix.QuickFixSuppressProblem">
</universalResolution>
<resolution
class="org.eclipse.cdt.codan.internal.checkers.ui.quickfix.QuickFixCreateLocalVariable"
messagePattern="%GCCNotDeclaredInThisScope.errormsg">
</resolution>
</extension>
</plugin>