[cfe-commits] r64504 - in /cfe/trunk: include/clang/AST/ include/clang/Basic/ lib/AST/ lib/Analysis/ lib/CodeGen/ lib/Sema/ test/Analysis/ test/CodeGen/ test/Sema/

Douglas Gregor dgregor at apple.com
Fri Feb 13 15:40:28 PST 2009


On Feb 13, 2009, at 3:36 PM, Howard Hinnant wrote:

> Is this feature switched off in C++?  Since one must have a  
> prototype in C++, I think it should be.

Yes, this feature is turned off in C++. From Sema::LookupName:

         // In C++, we don't have any predefined library functions like
         // 'malloc'. Instead, we'll just error.
         if (getLangOptions().CPlusPlus &&
             Context.BuiltinInfo.isPredefinedLibFunction(BuiltinID))
           return LookupResult::CreateLookupResult(Context, 0);

>  And a test ensuring that fact would be comforting (I skimmed, and  
> may have missed it).

I'll add a test.

	- Doug



More information about the cfe-commits mailing list