r314580 - [Analyzer] Add dummy implementation to call_once to avoid linkage warnings in tests.

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 18:15:35 PDT 2017


Author: george.karpenkov
Date: Fri Sep 29 18:15:35 2017
New Revision: 314580

URL: http://llvm.org/viewvc/llvm-project?rev=314580&view=rev
Log:
[Analyzer] Add dummy implementation to call_once to avoid linkage warnings in tests.

Modified:
    cfe/trunk/test/Analysis/call_once.cpp

Modified: cfe/trunk/test/Analysis/call_once.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/call_once.cpp?rev=314580&r1=314579&r2=314580&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/call_once.cpp (original)
+++ cfe/trunk/test/Analysis/call_once.cpp Fri Sep 29 18:15:35 2017
@@ -9,7 +9,7 @@ typedef struct once_flag_s {
 } once_flag;
 
 template <class Callable, class... Args>
-void call_once(once_flag &o, Callable func, Args... args);
+void call_once(once_flag &o, Callable func, Args... args) {};
 } // namespace std
 
 // Check with Lambdas.
@@ -115,9 +115,9 @@ template <class _Fp>
 class function; // undefined
 template <class _Rp, class... _ArgTypes>
 struct function<_Rp(_ArgTypes...)> {
-  _Rp operator()(_ArgTypes...) const;
+  _Rp operator()(_ArgTypes...) const {};
   template <class _Fp>
-  function(_Fp);
+  function(_Fp) {};
 };
 
 // Note: currently we do not support calls to std::function,




More information about the cfe-commits mailing list