@@ -40,7 +40,8 @@ public partial class VisualCHelper : IVisualCHelper
40
40
{
41
41
///////////////////////////////////////////////////////////////////////
42
42
static int ConfigureFlags ( bool unittestOn , bool debugOn , bool x64 , bool cov , bool doc , bool nobounds , bool gdc ,
43
- int versionLevel , int debugLevel , bool noDeprecated , bool ldc , bool warnings )
43
+ int versionLevel , int debugLevel , bool noDeprecated , bool deprecateInfo ,
44
+ bool ldc , bool warnings , bool warnAsError )
44
45
{
45
46
return ( unittestOn ? 1 : 0 )
46
47
| ( debugOn ? 2 : 0 )
@@ -50,10 +51,12 @@ static int ConfigureFlags(bool unittestOn, bool debugOn, bool x64, bool cov, boo
50
51
| ( nobounds ? 32 : 0 )
51
52
| ( gdc ? 64 : 0 )
52
53
| ( noDeprecated ? 128 : 0 )
54
+ | ( deprecateInfo ? 0x40000000 : 0 )
53
55
| ( ( versionLevel & 0xff ) << 8 )
54
56
| ( ( debugLevel & 0xff ) << 16 )
55
57
| ( ldc ? 0x4000000 : 0 )
56
- | ( warnings ? 0x10000000 : 0 ) ;
58
+ | ( warnings ? 0x10000000 : 0 )
59
+ | ( warnAsError ? 0x20000000 : 0 ) ;
57
60
}
58
61
59
62
@@ -207,13 +210,16 @@ public void GetDCompileOptions(IVsHierarchy proj, uint itemid,
207
210
bool cov = vcprop . GetEvaluatedPropertyValue ( "Coverage" ) == "true" ;
208
211
bool doc = vcprop . GetEvaluatedPropertyValue ( "DocDir" ) != "" || vcprop . GetEvaluatedPropertyValue ( "DocFile" ) != "" ;
209
212
bool nobounds = vcprop . GetEvaluatedPropertyValue ( "BoundsCheck" ) == "On" ;
210
- bool noDeprecated = vcprop . GetEvaluatedPropertyValue ( "Deprecations" ) == "Error" ;
213
+ bool noDeprecated = vcprop . GetEvaluatedPropertyValue ( "Deprecations" ) != "Allow" ;
214
+ bool deprecatedInfo = vcprop . GetEvaluatedPropertyValue ( "Deprecations" ) == "Info" ;
211
215
bool warnings = vcprop . GetEvaluatedPropertyValue ( "Warnings" ) != "None" ;
216
+ bool warnAsError = vcprop . GetEvaluatedPropertyValue ( "Warnings" ) == "Error" ;
212
217
bool gdc = false ;
213
218
int versionLevel = 0 ;
214
219
int debugLevel = 0 ;
215
220
flags = ( uint ) ConfigureFlags ( unittestOn , debugOn , x64 , cov , doc , nobounds , gdc ,
216
- versionLevel , debugLevel , noDeprecated , ldc , warnings ) ;
221
+ versionLevel , debugLevel , noDeprecated , deprecatedInfo ,
222
+ ldc , warnings , warnAsError ) ;
217
223
}
218
224
219
225
0 commit comments