Add testRuleOnCXX11Code to be able to test c++11 code.

Add testRuleOnCXX11Code to be able to test c++11 code. Cherry pick from DeleteNullptrIsSafeRule.