]> granicus.if.org Git - clang/commitdiff
[Analyzer] Add dummy implementation to call_once to avoid linkage warnings in tests.
authorGeorge Karpenkov <ekarpenkov@apple.com>
Sat, 30 Sep 2017 01:15:35 +0000 (01:15 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Sat, 30 Sep 2017 01:15:35 +0000 (01:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314580 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/call_once.cpp

index be0dc456e7fcbd26a52636ac7487678e77c3eada..030b34342904cd75cf670dc35bd25b573ba08ab5 100644 (file)
@@ -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,